From 35366aa18e221922477f50407cec8f5d48795b8f Mon Sep 17 00:00:00 2001 From: jonatanklosko Date: Mon, 28 Jun 2021 21:48:47 +0000 Subject: [PATCH] Update assets --- priv/static/css/app.css | 2 +- priv/static/js/app.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/priv/static/css/app.css b/priv/static/css/app.css index 5e9390947..4cc01d89b 100644 --- a/priv/static/css/app.css +++ b/priv/static/css/app.css @@ -1 +1 @@ -/*! tailwindcss v2.1.1 | MIT License | https://tailwindcss.com *//*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;margin:0}hr{color:inherit;height:0}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}::-moz-focus-inner{border-style:none;padding:0}:-moz-focusring{outline:1px dotted ButtonText}:-moz-ui-invalid{box-shadow:none}legend{padding:0}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,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}button{background-color:transparent;background-image:none}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}fieldset,ol,ul{margin:0;padding:0}ol,ul{list-style:none}html{font-family:Inter;line-height:1.5}body{font-family:inherit;line-height:inherit}*,:after,:before{border:0 solid #e1e8f0;box-sizing:border-box}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#91a4b7;opacity:1}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#91a4b7;opacity:1}input::placeholder,textarea::placeholder{color:#91a4b7;opacity:1}[role=button],button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{color:inherit;line-height:inherit;padding:0}code,kbd,pre,samp{font-family:JetBrains Mono}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}*{--tw-shadow:0 0 transparent;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(101,131,255,0.5);--tw-ring-offset-shadow:0 0 transparent;--tw-ring-shadow:0 0 transparent}.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}}.button{border-radius:.5rem;border-width:1px;font-size:.875rem;font-weight:500;line-height:1.25rem;padding:.5rem 1.25rem}.button,.button-blue{border-color:transparent}.button-blue{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgba(62,100,255,var(--tw-bg-opacity));color:rgba(255,255,255,var(--tw-text-opacity))}.button-blue:focus,.button-blue:hover{--tw-bg-opacity:1;background-color:rgba(45,76,219,var(--tw-bg-opacity))}.button-red{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgba(255,62,56,var(--tw-bg-opacity));border-color:transparent;color:rgba(255,255,255,var(--tw-text-opacity))}.button-red:focus,.button-red:hover{--tw-bg-opacity:1;background-color:rgba(219,40,50,var(--tw-bg-opacity))}.button-gray{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgba(240,245,249,var(--tw-bg-opacity));border-color:rgba(225,232,240,var(--tw-border-opacity));color:rgba(68,86,104,var(--tw-text-opacity))}.button-gray:focus,.button-gray:hover{--tw-bg-opacity:1;background-color:rgba(225,232,240,var(--tw-bg-opacity))}.button-outlined-red{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgba(255,245,245,var(--tw-bg-opacity));border-color:rgba(255,62,56,var(--tw-border-opacity));color:rgba(255,62,56,var(--tw-text-opacity))}.button-outlined-red:focus,.button-outlined-red:hover{--tw-bg-opacity:1;background-color:rgba(255,236,236,var(--tw-bg-opacity))}.button-outlined-gray{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity));border-color:rgba(202,213,224,var(--tw-border-opacity));color:rgba(68,86,104,var(--tw-text-opacity))}.button-outlined-gray:focus,.button-outlined-gray:hover,.button:disabled{--tw-bg-opacity:1;background-color:rgba(240,245,249,var(--tw-bg-opacity))}.button:disabled{--tw-text-opacity:1;border-color:transparent;color:rgba(145,164,183,var(--tw-text-opacity));cursor:default;pointer-events:none}.button-small{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgba(248,250,252,var(--tw-bg-opacity));border-color:rgba(225,232,240,var(--tw-border-opacity));color:rgba(68,86,104,var(--tw-text-opacity));padding:.25rem .5rem}.button-small:focus,.button-small:hover{--tw-bg-opacity:1;background-color:rgba(240,245,249,var(--tw-bg-opacity))}.button-square-icon{align-items:center;display:flex;justify-content:center;padding:.5rem}.button-square-icon i{font-size:1.25rem;line-height:1.75rem;line-height:1}.choice-button{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity));border-color:rgba(225,232,240,var(--tw-border-opacity));border-radius:.5rem;border-width:1px;color:rgba(48,66,84,var(--tw-text-opacity));padding:.5rem 1.25rem}.choice-button.active{--tw-border-opacity:1;--tw-bg-opacity:1;background-color:rgba(236,240,255,var(--tw-bg-opacity));border-color:rgba(62,100,255,var(--tw-border-opacity))}.icon-button{--tw-text-opacity:1;align-items:center;border-radius:9999px;color:rgba(145,164,183,var(--tw-text-opacity));display:flex;justify-content:center;padding:.25rem}.icon-button:hover{--tw-text-opacity:1;color:rgba(28,42,58,var(--tw-text-opacity))}.icon-button:focus{--tw-bg-opacity:1;background-color:rgba(240,245,249,var(--tw-bg-opacity))}.icon-button i{line-height:1}.icon-outlined-button{border-radius:9999px;border-width:2px}.input{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgba(248,250,252,var(--tw-bg-opacity));border-color:rgba(225,232,240,var(--tw-border-opacity));border-radius:.5rem;border-width:1px;color:rgba(68,86,104,var(--tw-text-opacity));font-size:.875rem;line-height:1.25rem;padding:.5rem .75rem;width:100%}.input::-moz-placeholder{--tw-placeholder-opacity:1;color:rgba(145,164,183,var(--tw-placeholder-opacity))}.input:-ms-input-placeholder{--tw-placeholder-opacity:1;color:rgba(145,164,183,var(--tw-placeholder-opacity))}.input::placeholder{--tw-placeholder-opacity:1;color:rgba(145,164,183,var(--tw-placeholder-opacity))}.input[type=color]{padding-bottom:0;padding-top:0;width:4rem}.input--error{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgba(255,245,245,var(--tw-bg-opacity));border-color:rgba(255,62,56,var(--tw-border-opacity));color:rgba(255,62,56,var(--tw-text-opacity))}.input-label{--tw-text-opacity:1;color:rgba(28,42,58,var(--tw-text-opacity));font-size:.875rem;font-weight:500;line-height:1.25rem;margin-bottom:.125rem}.input-error{--tw-text-opacity:1;color:rgba(255,62,56,var(--tw-text-opacity));font-size:.75rem;font-style:italic;line-height:1rem;margin-top:.5rem}.switch-button{display:inline-block;height:1.75rem;margin-right:.5rem;position:relative;transition-duration:.15s;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:3.5rem}.switch-button__checkbox{-webkit-appearance:none;-moz-appearance:none;appearance:none;--tw-border-opacity:1;background-color:rgba(145,164,183,var(--tw-bg-opacity));border-color:rgba(240,245,249,var(--tw-border-opacity));border-width:5px;height:1.75rem;position:absolute;width:1.75rem}.switch-button__bg,.switch-button__checkbox{--tw-bg-opacity:1;border-radius:9999px;cursor:pointer;display:block;transition-duration:.15s;transition-duration:.3s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.switch-button__bg{background-color:rgba(240,245,249,var(--tw-bg-opacity));height:100%;width:100%}.switch-button__checkbox:checked{--tw-border-opacity:1;--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity));border-color:rgba(62,100,255,var(--tw-border-opacity));transform:translateX(100%)}.switch-button__checkbox:checked+.switch-button__bg{--tw-bg-opacity:1;background-color:rgba(62,100,255,var(--tw-bg-opacity))}.tiny-scrollbar::-webkit-scrollbar{height:.4rem;width:.4rem}.tiny-scrollbar::-webkit-scrollbar-thumb{--tw-bg-opacity:1;background-color:rgba(145,164,183,var(--tw-bg-opacity));border-radius:.25rem}.tiny-scrollbar::-webkit-scrollbar-track{--tw-bg-opacity:1;background-color:rgba(240,245,249,var(--tw-bg-opacity))}.tabs{display:flex;width:100%}.tabs .tab{align-items:center;display:flex}.tabs .tab>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.tabs .tab{border-bottom-width:2px;border-color:rgba(240,245,249,var(--tw-border-opacity));color:rgba(145,164,183,var(--tw-text-opacity));padding:.5rem .75rem}.tabs .tab,.tabs .tab.active{--tw-border-opacity:1;--tw-text-opacity:1}.tabs .tab.active{border-color:rgba(62,100,255,var(--tw-border-opacity));color:rgba(62,100,255,var(--tw-text-opacity))}.menu{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity));border-radius:.5rem;box-shadow:0 15px 99px rgba(13,24,41,.15);display:flex;flex-direction:column;padding-bottom:.5rem;padding-top:.5rem;position:absolute;right:0;z-index:30}.menu__item{align-items:center;display:flex}.menu__item>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.75rem*var(--tw-space-x-reverse))}.menu__item{padding:.5rem 1.25rem;white-space:nowrap}.menu__item:hover{--tw-bg-opacity:1;background-color:rgba(248,250,252,var(--tw-bg-opacity))}.error-box{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgba(255,236,236,var(--tw-bg-opacity));border-radius:.5rem;color:rgba(255,139,136,var(--tw-text-opacity));font-weight:500;padding:.5rem 1rem}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.static{position:static}.relative{position:relative}.absolute{position:absolute}.fixed{position:fixed}.inset-0{bottom:0;left:0;right:0;top:0}.top-\[50\%\]{top:50%}.left-\[-12px\]{left:-12px}.top-6{top:1.5rem}.right-6{right:1.5rem}.top-0{top:0}.left-\[64px\]{left:64px}.bottom-\[0\.4rem\]{bottom:.4rem}.right-\[1\.5rem\]{right:1.5rem}.right-2{right:.5rem}.top-1{top:.25rem}.right-4{right:1rem}.-left-3{left:-.75rem}.bottom-2{bottom:.5rem}.top-0\.5{top:.125rem}.right-5{right:1.25rem}.bottom-5{bottom:1.25rem}.z-\[10000\]{z-index:10000}.z-0{z-index:0}.z-30{z-index:30}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.-m-1{margin:-.25rem}.m-0{margin:0}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-bottom:.25rem;margin-top:.25rem}.mt-4{margin-top:1rem}.mt-2{margin-top:.5rem}.mr-1{margin-right:.25rem}.mb-4{margin-bottom:1rem}.ml-1{margin-left:.25rem}.mb-2{margin-bottom:.5rem}.mt-8{margin-top:2rem}.mb-6{margin-bottom:1.5rem}.-ml-1{margin-left:-.25rem}.mt-5{margin-top:1.25rem}.mb-1{margin-bottom:.25rem}.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}.h-full{height:100%}.h-\[50px\]{height:50px}.h-80{height:20rem}.h-screen{height:100vh}.h-\[150px\]{height:150px}.h-7{height:1.75rem}.h-10{height:2.5rem}.h-8{height:2rem}.h-20{height:5rem}.h-5{height:1.25rem}.h-4{height:1rem}.h-3{height:.75rem}.h-2{height:.5rem}.h-52{height:13rem}.max-h-full{max-height:100%}.max-h-40{max-height:10rem}.w-full{width:100%}.w-7{width:1.75rem}.w-16{width:4rem}.w-10{width:2.5rem}.w-8{width:2rem}.w-20{width:5rem}.w-5{width:1.25rem}.w-3\/4{width:75%}.w-5\/6{width:83.333333%}.w-1{width:.25rem}.w-3{width:.75rem}.max-w-screen-md{max-width:768px}.max-w-sm{max-width:24rem}.max-w-screen-lg{max-width:1024px}.max-w-xl{max-width:36rem}.max-w-\[75\%\]{max-width:75%}.max-w-xs{max-width:20rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-2xl{max-width:42rem}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.transform{--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;transform:translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y:-50%}.-translate-x-full{--tw-translate-x:-100%}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}.animate-pulse{-webkit-animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite;animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@-webkit-keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}.animate-ping{-webkit-animation:ping 1s cubic-bezier(0,0,.2,1) infinite;animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@-webkit-keyframes spin{to{transform:rotate(1turn)}}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.resize-none{resize:none}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-4{gap:1rem}.gap-2{gap:.5rem}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.75rem*var(--tw-space-x-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(2rem*var(--tw-space-y-reverse));margin-top:calc(2rem*(1 - var(--tw-space-y-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.25rem*var(--tw-space-x-reverse))}.space-x-5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1.25rem*var(--tw-space-x-reverse))}.space-y-16>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(4rem*var(--tw-space-y-reverse));margin-top:calc(4rem*(1 - var(--tw-space-y-reverse)))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.25rem*var(--tw-space-y-reverse));margin-top:calc(1.25rem*(1 - var(--tw-space-y-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgba(225,232,240,var(--tw-divide-opacity))}.self-end{align-self:flex-end}.overflow-y-auto{overflow-y:auto}.overflow-hidden{overflow:hidden}.overflow-auto{overflow:auto}.overflow-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.rounded-2xl{border-radius:1rem}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-t-2xl{border-top-left-radius:1rem;border-top-right-radius:1rem}.rounded-b-2xl{border-bottom-left-radius:1rem;border-bottom-right-radius:1rem}.border{border-width:1px}.border-2{border-width:2px}.border-\[3px\]{border-width:3px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-dashed{border-style:dashed}.border-gray-200{--tw-border-opacity:1;border-color:rgba(225,232,240,var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity:1;border-color:rgba(240,245,249,var(--tw-border-opacity))}.border-gray-400{--tw-border-opacity:1;border-color:rgba(145,164,183,var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-gray-300{--tw-border-opacity:1;border-color:rgba(202,213,224,var(--tw-border-opacity))}.border-blue-400{--tw-border-opacity:1;border-color:rgba(139,162,255,var(--tw-border-opacity))}.border-green-300{--tw-border-opacity:1;border-color:rgba(110,231,183,var(--tw-border-opacity))}.border-yellow-200{--tw-border-opacity:1;border-color:rgba(253,230,138,var(--tw-border-opacity))}.bg-gray-900{--tw-bg-opacity:1;background-color:rgba(13,24,41,var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity:1;background-color:rgba(97,117,138,var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgba(240,245,249,var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgba(248,250,252,var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity:1;background-color:rgba(48,66,84,var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgba(225,232,240,var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgba(101,131,255,var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity:1;background-color:rgba(139,162,255,var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity:1;background-color:rgba(145,164,183,var(--tw-bg-opacity))}.bg-green-400{--tw-bg-opacity:1;background-color:rgba(52,211,153,var(--tw-bg-opacity))}.bg-yellow-200{--tw-bg-opacity:1;background-color:rgba(253,230,138,var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity:1;background-color:rgba(255,139,136,var(--tw-bg-opacity))}.bg-blue-200{--tw-bg-opacity:1;background-color:rgba(216,224,255,var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity:1;background-color:rgba(62,100,255,var(--tw-bg-opacity))}.bg-blue-100{--tw-bg-opacity:1;background-color:rgba(236,240,255,var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity:1;background-color:rgba(255,236,236,var(--tw-bg-opacity))}.p-8{padding:2rem}.p-5{padding:1.25rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-8{padding-bottom:2rem;padding-top:2rem}.px-4{padding-left:1rem;padding-right:1rem}.py-12{padding-bottom:3rem;padding-top:3rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-10{padding-bottom:2.5rem;padding-top:2.5rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-7{padding-bottom:1.75rem;padding-top:1.75rem}.px-16{padding-left:4rem;padding-right:4rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.px-8{padding-left:2rem;padding-right:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.pb-8{padding-bottom:2rem}.pt-2{padding-top:.5rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pt-4{padding-top:1rem}.pr-3{padding-right:.75rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.font-mono{font-family:JetBrains Mono}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-semibold{font-weight:600}.font-medium{font-weight:500}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-none{line-height:1}.text-gray-700{--tw-text-opacity:1;color:rgba(48,66,84,var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgba(28,42,58,var(--tw-text-opacity))}.text-gray-50{--tw-text-opacity:1;color:rgba(248,250,252,var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgba(202,213,224,var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity:1;color:rgba(62,100,255,var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgba(145,164,183,var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgba(68,86,104,var(--tw-text-opacity))}.text-green-300{--tw-text-opacity:1;color:rgba(110,231,183,var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgba(97,117,138,var(--tw-text-opacity))}.text-green-400{--tw-text-opacity:1;color:rgba(52,211,153,var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgba(13,24,41,var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgba(255,62,56,var(--tw-text-opacity))}.text-gray-100{--tw-text-opacity:1;color:rgba(240,245,249,var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgba(101,131,255,var(--tw-text-opacity))}.text-yellow-300{--tw-text-opacity:1;color:rgba(252,211,77,var(--tw-text-opacity))}.text-red-400{--tw-text-opacity:1;color:rgba(255,139,136,var(--tw-text-opacity))}.opacity-75{opacity:.75}.opacity-100{opacity:1}.opacity-0{opacity:0}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,0.1),0 10px 10px -5px rgba(0,0,0,0.04);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.filter{--tw-blur:var(--tw-empty,/*!*/ /*!*/);--tw-brightness:var(--tw-empty,/*!*/ /*!*/);--tw-contrast:var(--tw-empty,/*!*/ /*!*/);--tw-grayscale:var(--tw-empty,/*!*/ /*!*/);--tw-hue-rotate:var(--tw-empty,/*!*/ /*!*/);--tw-invert:var(--tw-empty,/*!*/ /*!*/);--tw-saturate:var(--tw-empty,/*!*/ /*!*/);--tw-sepia:var(--tw-empty,/*!*/ /*!*/);--tw-drop-shadow:var(--tw-empty,/*!*/ /*!*/);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)}.blur{--tw-blur:blur(8px)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration,.transition-all{transition-duration:.15s}.duration-1000{transition-duration:1s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.bg-editor{background-color:#282c34}.font-editor{font-family:JetBrains Mono,Droid Sans Mono,"monospace";font-size:14px}.shadow-xl-center{box-shadow:0 0 25px -5px rgba(0,0,0,.1),0 0 10px -5px rgba(0,0,0,.04)}:focus,button:focus{outline:none}body{font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji}.phx-no-feedback.invalid-feedback,.phx-no-feedback .invalid-feedback,iframe[hidden]{display:none}.phx-click-loading{opacity:.5;transition:opacity 1s ease-out}.phx-disconnected{cursor:wait}.phx-disconnected *{pointer-events:none}.markdown{--tw-text-opacity:1;color:rgba(48,66,84,var(--tw-text-opacity))}.markdown h1{font-size:1.875rem;line-height:2.25rem}.markdown h1,.markdown h2{--tw-text-opacity:1;color:rgba(28,42,58,var(--tw-text-opacity));font-weight:600;margin-bottom:1rem;margin-top:2rem}.markdown h2{font-size:1.5rem;line-height:2rem}.markdown h3{font-size:1.25rem}.markdown h3,.markdown h4{--tw-text-opacity:1;color:rgba(28,42,58,var(--tw-text-opacity));font-weight:600;line-height:1.75rem;margin-bottom:1rem;margin-top:2rem}.markdown h4{font-size:1.125rem}.markdown h5,.markdown h6{--tw-text-opacity:1;color:rgba(28,42,58,var(--tw-text-opacity));font-size:1rem;font-weight:600;line-height:1.5rem;margin-bottom:1rem;margin-top:2rem}.markdown p{margin-bottom:1rem;margin-top:1rem}.markdown ul{list-style-type:disc}.markdown ol,.markdown ul{list-style-position:outside;margin-bottom:1.25rem;margin-left:2rem;margin-top:1.25rem}.markdown ol{list-style-type:decimal}.markdown ul ul{list-style-type:circle}.markdown ul ul ul{list-style-type:square}.markdown ol>li,.markdown ul>li{margin-bottom:.25rem;margin-top:.25rem}.markdown blockquote{--tw-border-opacity:1;--tw-text-opacity:1;border-color:rgba(225,232,240,var(--tw-border-opacity));border-left-width:4px;color:rgba(97,117,138,var(--tw-text-opacity));margin-bottom:1rem;margin-top:1rem;padding-bottom:.5rem;padding-left:1rem;padding-top:.5rem}.markdown a{--tw-text-opacity:1;color:rgba(13,24,41,var(--tw-text-opacity));font-weight:500;text-decoration:underline}.markdown a:hover{text-decoration:none}.markdown img{margin:1rem auto}.markdown table{margin-bottom:1rem;margin-top:1rem}.markdown table::-webkit-scrollbar{height:.4rem;width:.4rem}.markdown table::-webkit-scrollbar-thumb{--tw-bg-opacity:1;background-color:rgba(145,164,183,var(--tw-bg-opacity));border-radius:.25rem}.markdown table::-webkit-scrollbar-track{--tw-bg-opacity:1;background-color:rgba(240,245,249,var(--tw-bg-opacity))}.markdown table{border-radius:.5rem;box-shadow:0 0 25px -5px rgba(0,0,0,.1),0 0 10px -5px rgba(0,0,0,.04);width:100%}.markdown table thead{text-align:left}.markdown table tbody tr,.markdown table thead tr{--tw-border-opacity:1;border-bottom-width:1px;border-color:rgba(225,232,240,var(--tw-border-opacity))}.markdown table tbody tr:last-child{border-bottom-width:0}.markdown table tbody tr:hover{--tw-bg-opacity:1;background-color:rgba(248,250,252,var(--tw-bg-opacity))}.markdown table th{color:rgba(48,66,84,var(--tw-text-opacity));font-weight:600}.markdown table td,.markdown table th{--tw-text-opacity:1;padding:.75rem 1.5rem}.markdown table td{color:rgba(97,117,138,var(--tw-text-opacity))}.markdown table td[align=center],.markdown table th[align=center]{text-align:center}.markdown table td[align=right],.markdown table th[align=right]{text-align:right}.markdown code{--tw-bg-opacity:1;background-color:rgba(225,232,240,var(--tw-bg-opacity));border-radius:.5rem;font-family:JetBrains Mono;font-size:.875rem;line-height:1.25rem;padding:.1rem .5rem;vertical-align:middle}.markdown pre{display:flex;overflow:hidden}.markdown pre>code{background-color:#282c34;color:#abb2bf;flex:1 1 0%;font-size:.875rem;line-height:1.25rem;overflow:auto;padding:1rem}.markdown kbd,.markdown pre>code{border-radius:.5rem;font-family:JetBrains Mono;vertical-align:middle}.markdown kbd{--tw-border-opacity:1;border-color:rgba(202,213,224,var(--tw-border-opacity));border-width:1px;box-shadow:inset 0 -2px 0 0 #cad5e0;font-size:.75rem;line-height:1rem;padding:.2rem .5rem}.markdown>:first-child{margin-top:0}.markdown>:last-child{margin-bottom:0}.markdown .katex-display{margin-bottom:2rem;margin-top:2rem}[data-element=cell][data-type=markdown] .markdown h1,[data-element=cell][data-type=markdown] .markdown h2{font-size:0}[data-element=cell][data-type=markdown] .markdown h1:after,[data-element=cell][data-type=markdown] .markdown h2:after{--tw-text-opacity:1;color:rgba(255,139,136,var(--tw-text-opacity));content:"warning: heading levels 1 and 2 are reserved for notebook and section names, please use heading 3 and above.";font-size:1rem;font-weight:500;line-height:1.5rem}:root{--ansi-color-black:#000;--ansi-color-red:#e06c75;--ansi-color-green:#98c379;--ansi-color-yellow:#e5c07b;--ansi-color-blue:#61afef;--ansi-color-magenta:#c678dd;--ansi-color-cyan:#56b6c2;--ansi-color-white:#fff;--ansi-color-light-black:#5c6370;--ansi-color-light-red:#f87171;--ansi-color-light-green:#34d399;--ansi-color-light-yellow:#fde68a;--ansi-color-light-blue:#93c5fd;--ansi-color-light-magenta:#f472b6;--ansi-color-light-cyan:#6be3f2;--ansi-color-light-white:#fff}[data-element=menu]:not([data-js-open])>[data-content]{display:none}[data-element=session]:not([data-js-insert-mode]) [data-element=insert-mode-indicator]{visibility:hidden}[data-element=session] [data-element=cell][data-type=markdown] [data-element=editor-box]{display:none}[data-element=session][data-js-insert-mode] [data-element=cell][data-type=markdown][data-js-focused] [data-element=editor-box]{display:block}[data-element=session]:not([data-js-insert-mode]) [data-element=cell][data-type=markdown][data-js-focused] [data-element=insert-image-button],[data-element=session][data-js-insert-mode] [data-element=cell][data-type=markdown][data-js-focused] [data-element=enable-insert-mode-button]{display:none}[data-element=cell][data-js-focused]{--tw-border-opacity:1;border-color:rgba(178,193,255,var(--tw-border-opacity))}[data-element=cell]:not([data-js-focused]) [data-element=actions]:not(:focus-within){opacity:0}[data-element=cell]:not([data-js-focused]) [data-element=actions]:not([data-primary]):not(:focus-within){pointer-events:none}[data-element=cell]:not([data-js-focused]):hover [data-element=actions][data-primary]{opacity:1;pointer-events:auto}[data-element=cell] [data-element=change-indicator]:not([data-js-shown]){visibility:hidden}[data-element=sections-list-item][data-js-is-viewed]{--tw-text-opacity:1;color:rgba(13,24,41,var(--tw-text-opacity))}[data-element=cell]:not([data-js-focused]):hover [data-element=cell-focus-indicator]{--tw-bg-opacity:1;background-color:rgba(216,224,255,var(--tw-bg-opacity))}[data-element=cell][data-js-focused] [data-element=cell-focus-indicator]{--tw-bg-opacity:1;background-color:rgba(178,193,255,var(--tw-bg-opacity))}[data-element=session]:not([data-js-side-panel-content=clients-list]) [data-element=clients-list],[data-element=session]:not([data-js-side-panel-content=sections-list]) [data-element=sections-list],[data-element=session]:not([data-js-side-panel-content]) [data-element=side-panel]{display:none}[data-element=session][data-js-side-panel-content=clients-list] [data-element=clients-list-toggle],[data-element=session][data-js-side-panel-content=sections-list] [data-element=sections-list-toggle]{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgba(48,66,84,var(--tw-bg-opacity));color:rgba(248,250,252,var(--tw-text-opacity))}[data-element=clients-list-item]:not([data-js-followed]) [data-meta=unfollow],[data-element=clients-list-item][data-js-followed] [data-meta=follow],[data-element=section-headline]:not(:hover) [data-element=section-name]:not(:focus)+[data-element=section-actions],[phx-hook=VirtualizedLines]:not(:hover) [data-clipboard]{display:none}.tooltip{--distance:4px;--arrow-size:5px;--show-delay:0.5s;display:flex;position:relative}.tooltip.distant{--distance:28px}.tooltip.distant-medium{--distance:10px}.tooltip:before{background-color:#1c273c;border-radius:4px;color:#f0f5f9;content:attr(aria-label);font-size:12px;font-weight:500;padding:3px 12px;text-align:center;white-space:pre;z-index:100}.tooltip:after,.tooltip:before{display:block;position:absolute;transition-delay:0s;transition-duration:0s;transition-property:visibility;visibility:hidden}.tooltip:after{border:var(--arrow-size) solid #1c273c;content:""}.tooltip:hover:after,.tooltip:hover:before{transition-delay:var(--show-delay);visibility:visible}.tooltip.top:before{bottom:100%;left:50%;transform:translate(-50%,calc(1px - var(--arrow-size) - var(--distance)))}.tooltip.top:after{border-bottom:none;border-left-color:transparent;border-right-color:transparent;bottom:100%;left:50%;transform:translate(-50%,calc(0px - var(--distance)))}.tooltip.bottom:before{left:50%;top:100%;transform:translate(-50%,calc(var(--arrow-size) - 1px + var(--distance)))}.tooltip.bottom:after{border-left-color:transparent;border-right-color:transparent;border-top:none;left:50%;top:100%;transform:translate(-50%,var(--distance))}.tooltip.right:before{left:100%;top:50%;transform:translate(calc(var(--arrow-size) - 1px + var(--distance)),-50%)}.tooltip.right:after{border-bottom-color:transparent;border-left:none;border-top-color:transparent;left:100%;top:50%;transform:translate(var(--distance),-50%)}.tooltip.left:before{right:100%;top:50%;transform:translate(calc(1px - var(--arrow-size) - var(--distance)),-50%)}.tooltip.left:after{border-bottom-color:transparent;border-right:none;border-top-color:transparent;right:100%;top:50%;transform:translate(calc(0px - var(--distance)),-50%)}div.suggest-details-container div.monaco-tokenized-source{margin-bottom:.5rem;margin-top:.5rem}.monaco-cursor-widget-container{pointer-events:none;z-index:100}.monaco-cursor-widget-container .monaco-cursor-widget-cursor{pointer-events:auto;width:2px}.monaco-cursor-widget-container .monaco-cursor-widget-label{color:#f8fafc;font-size:12px;padding:1px 8px;pointer-events:auto;transform:translateY(-200%);transition-delay:1.5s;transition-duration:0s;transition-property:visibility;visibility:hidden;white-space:nowrap}.monaco-cursor-widget-container .monaco-cursor-widget-label:hover{visibility:visible}.monaco-cursor-widget-container .monaco-cursor-widget-cursor:hover+.monaco-cursor-widget-label{transition-delay:0s;visibility:visible}.monaco-cursor-widget-container.inline{display:flex}.monaco-cursor-widget-container.inline .monaco-cursor-widget-label{margin-left:2px;transform:none}.ri-livebook-runtime,.ri-livebook-save,.ri-livebook-sections,.ri-livebook-shortcuts{font-size:1.25rem;line-height:1.75rem;vertical-align:middle}.ri-livebook-sections:before{content:"\eade"}.ri-livebook-runtime:before{content:"\ebf0"}.ri-livebook-shortcuts:before{content:"\ee72"}.ri-livebook-save:before{content:"\f0b3"}.last\:border-b-0:last-child{border-bottom-width:0}.focus-within\:opacity-100:focus-within{opacity:1}.hover\:border-blue-200:hover{--tw-border-opacity:1;border-color:rgba(216,224,255,var(--tw-border-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgba(240,245,249,var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgba(248,250,252,var(--tw-bg-opacity))}.hover\:bg-blue-50:hover{--tw-bg-opacity:1;background-color:rgba(245,247,255,var(--tw-bg-opacity))}.hover\:bg-green-50:hover{--tw-bg-opacity:1;background-color:rgba(236,253,245,var(--tw-bg-opacity))}.hover\:bg-yellow-50:hover{--tw-bg-opacity:1;background-color:rgba(255,251,235,var(--tw-bg-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgba(13,24,41,var(--tw-text-opacity))}.hover\:text-gray-50:hover{--tw-text-opacity:1;color:rgba(248,250,252,var(--tw-text-opacity))}.hover\:text-gray-800:hover{--tw-text-opacity:1;color:rgba(28,42,58,var(--tw-text-opacity))}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-75:hover{opacity:.75}.focus\:border-blue-300:focus{--tw-border-opacity:1;border-color:rgba(178,193,255,var(--tw-border-opacity))}.focus\:bg-blue-50:focus{--tw-bg-opacity:1;background-color:rgba(245,247,255,var(--tw-bg-opacity))}.focus\:bg-green-50:focus{--tw-bg-opacity:1;background-color:rgba(236,253,245,var(--tw-bg-opacity))}.focus\:bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgba(240,245,249,var(--tw-bg-opacity))}.focus\:bg-yellow-50:focus{--tw-bg-opacity:1;background-color:rgba(255,251,235,var(--tw-bg-opacity))}.focus\:text-gray-50:focus{--tw-text-opacity:1;color:rgba(248,250,252,var(--tw-text-opacity))}.focus\:text-gray-800:focus{--tw-text-opacity:1;color:rgba(28,42,58,var(--tw-text-opacity))}.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 transparent)}.focus\:ring-gray-400:focus{--tw-ring-opacity:1;--tw-ring-color:rgba(145,164,183,var(--tw-ring-opacity))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:text-gray-300:disabled{--tw-text-opacity:1;color:rgba(202,213,224,var(--tw-text-opacity))}@media (min-width:640px){.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:justify-between{justify-content:space-between}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(0px*var(--tw-space-y-reverse));margin-top:calc(0px*(1 - var(--tw-space-y-reverse)))}.sm\:pb-4{padding-bottom:1rem}}@media (min-width:768px){.md\:static{position:static}.md\:block{display:block}.md\:flex{display:flex}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:shadow-none{--tw-shadow:0 0 transparent;box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}}@media (min-width:1024px){.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@font-face{font-display:swap;font-family:remixicon;src:url(/js/5cb99e6cba5a4619063f73d47b775f6f.eot);src:url(/js/5cb99e6cba5a4619063f73d47b775f6f.eot#iefix) format("embedded-opentype"),url(/js/90668f6f9b3c2c18a090f132d1793c67.woff2) format("woff2"),url(/js/8d09fa11700ed63cf96e1d1c038368f3.woff) format("woff"),url(/js/f2616f597cf98f38d2347c9648bfe049.ttf) format("truetype"),url(/js/9cedd2150922ead848695530d71a212f.svg#remixicon) format("svg")}[class*=" ri-"],[class^=ri-]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:remixicon!important;font-style:normal}.ri-lg{font-size:1.3333em;line-height:.75em;vertical-align:-.0667em}.ri-xl{font-size:1.5em;line-height:.6666em;vertical-align:-.075em}.ri-xxs{font-size:.5em}.ri-xs{font-size:.75em}.ri-sm{font-size:.875em}.ri-1x{font-size:1em}.ri-2x{font-size:2em}.ri-3x{font-size:3em}.ri-4x{font-size:4em}.ri-5x{font-size:5em}.ri-6x{font-size:6em}.ri-7x{font-size:7em}.ri-8x{font-size:8em}.ri-9x{font-size:9em}.ri-10x{font-size:10em}.ri-fw{text-align:center;width:1.25em}.ri-24-hours-fill:before{content:"\ea01"}.ri-24-hours-line:before{content:"\ea02"}.ri-4k-fill:before{content:"\ea03"}.ri-4k-line:before{content:"\ea04"}.ri-a-b:before{content:"\ea05"}.ri-account-box-fill:before{content:"\ea06"}.ri-account-box-line:before{content:"\ea07"}.ri-account-circle-fill:before{content:"\ea08"}.ri-account-circle-line:before{content:"\ea09"}.ri-account-pin-box-fill:before{content:"\ea0a"}.ri-account-pin-box-line:before{content:"\ea0b"}.ri-account-pin-circle-fill:before{content:"\ea0c"}.ri-account-pin-circle-line:before{content:"\ea0d"}.ri-add-box-fill:before{content:"\ea0e"}.ri-add-box-line:before{content:"\ea0f"}.ri-add-circle-fill:before{content:"\ea10"}.ri-add-circle-line:before{content:"\ea11"}.ri-add-fill:before{content:"\ea12"}.ri-add-line:before{content:"\ea13"}.ri-admin-fill:before{content:"\ea14"}.ri-admin-line:before{content:"\ea15"}.ri-advertisement-fill:before{content:"\ea16"}.ri-advertisement-line:before{content:"\ea17"}.ri-airplay-fill:before{content:"\ea18"}.ri-airplay-line:before{content:"\ea19"}.ri-alarm-fill:before{content:"\ea1a"}.ri-alarm-line:before{content:"\ea1b"}.ri-alarm-warning-fill:before{content:"\ea1c"}.ri-alarm-warning-line:before{content:"\ea1d"}.ri-album-fill:before{content:"\ea1e"}.ri-album-line:before{content:"\ea1f"}.ri-alert-fill:before{content:"\ea20"}.ri-alert-line:before{content:"\ea21"}.ri-aliens-fill:before{content:"\ea22"}.ri-aliens-line:before{content:"\ea23"}.ri-align-bottom:before{content:"\ea24"}.ri-align-center:before{content:"\ea25"}.ri-align-justify:before{content:"\ea26"}.ri-align-left:before{content:"\ea27"}.ri-align-right:before{content:"\ea28"}.ri-align-top:before{content:"\ea29"}.ri-align-vertically:before{content:"\ea2a"}.ri-alipay-fill:before{content:"\ea2b"}.ri-alipay-line:before{content:"\ea2c"}.ri-amazon-fill:before{content:"\ea2d"}.ri-amazon-line:before{content:"\ea2e"}.ri-anchor-fill:before{content:"\ea2f"}.ri-anchor-line:before{content:"\ea30"}.ri-ancient-gate-fill:before{content:"\ea31"}.ri-ancient-gate-line:before{content:"\ea32"}.ri-ancient-pavilion-fill:before{content:"\ea33"}.ri-ancient-pavilion-line:before{content:"\ea34"}.ri-android-fill:before{content:"\ea35"}.ri-android-line:before{content:"\ea36"}.ri-angularjs-fill:before{content:"\ea37"}.ri-angularjs-line:before{content:"\ea38"}.ri-anticlockwise-2-fill:before{content:"\ea39"}.ri-anticlockwise-2-line:before{content:"\ea3a"}.ri-anticlockwise-fill:before{content:"\ea3b"}.ri-anticlockwise-line:before{content:"\ea3c"}.ri-app-store-fill:before{content:"\ea3d"}.ri-app-store-line:before{content:"\ea3e"}.ri-apple-fill:before{content:"\ea3f"}.ri-apple-line:before{content:"\ea40"}.ri-apps-2-fill:before{content:"\ea41"}.ri-apps-2-line:before{content:"\ea42"}.ri-apps-fill:before{content:"\ea43"}.ri-apps-line:before{content:"\ea44"}.ri-archive-drawer-fill:before{content:"\ea45"}.ri-archive-drawer-line:before{content:"\ea46"}.ri-archive-fill:before{content:"\ea47"}.ri-archive-line:before{content:"\ea48"}.ri-arrow-down-circle-fill:before{content:"\ea49"}.ri-arrow-down-circle-line:before{content:"\ea4a"}.ri-arrow-down-fill:before{content:"\ea4b"}.ri-arrow-down-line:before{content:"\ea4c"}.ri-arrow-down-s-fill:before{content:"\ea4d"}.ri-arrow-down-s-line:before{content:"\ea4e"}.ri-arrow-drop-down-fill:before{content:"\ea4f"}.ri-arrow-drop-down-line:before{content:"\ea50"}.ri-arrow-drop-left-fill:before{content:"\ea51"}.ri-arrow-drop-left-line:before{content:"\ea52"}.ri-arrow-drop-right-fill:before{content:"\ea53"}.ri-arrow-drop-right-line:before{content:"\ea54"}.ri-arrow-drop-up-fill:before{content:"\ea55"}.ri-arrow-drop-up-line:before{content:"\ea56"}.ri-arrow-go-back-fill:before{content:"\ea57"}.ri-arrow-go-back-line:before{content:"\ea58"}.ri-arrow-go-forward-fill:before{content:"\ea59"}.ri-arrow-go-forward-line:before{content:"\ea5a"}.ri-arrow-left-circle-fill:before{content:"\ea5b"}.ri-arrow-left-circle-line:before{content:"\ea5c"}.ri-arrow-left-down-fill:before{content:"\ea5d"}.ri-arrow-left-down-line:before{content:"\ea5e"}.ri-arrow-left-fill:before{content:"\ea5f"}.ri-arrow-left-line:before{content:"\ea60"}.ri-arrow-left-right-fill:before{content:"\ea61"}.ri-arrow-left-right-line:before{content:"\ea62"}.ri-arrow-left-s-fill:before{content:"\ea63"}.ri-arrow-left-s-line:before{content:"\ea64"}.ri-arrow-left-up-fill:before{content:"\ea65"}.ri-arrow-left-up-line:before{content:"\ea66"}.ri-arrow-right-circle-fill:before{content:"\ea67"}.ri-arrow-right-circle-line:before{content:"\ea68"}.ri-arrow-right-down-fill:before{content:"\ea69"}.ri-arrow-right-down-line:before{content:"\ea6a"}.ri-arrow-right-fill:before{content:"\ea6b"}.ri-arrow-right-line:before{content:"\ea6c"}.ri-arrow-right-s-fill:before{content:"\ea6d"}.ri-arrow-right-s-line:before{content:"\ea6e"}.ri-arrow-right-up-fill:before{content:"\ea6f"}.ri-arrow-right-up-line:before{content:"\ea70"}.ri-arrow-up-circle-fill:before{content:"\ea71"}.ri-arrow-up-circle-line:before{content:"\ea72"}.ri-arrow-up-down-fill:before{content:"\ea73"}.ri-arrow-up-down-line:before{content:"\ea74"}.ri-arrow-up-fill:before{content:"\ea75"}.ri-arrow-up-line:before{content:"\ea76"}.ri-arrow-up-s-fill:before{content:"\ea77"}.ri-arrow-up-s-line:before{content:"\ea78"}.ri-artboard-2-fill:before{content:"\ea79"}.ri-artboard-2-line:before{content:"\ea7a"}.ri-artboard-fill:before{content:"\ea7b"}.ri-artboard-line:before{content:"\ea7c"}.ri-article-fill:before{content:"\ea7d"}.ri-article-line:before{content:"\ea7e"}.ri-aspect-ratio-fill:before{content:"\ea7f"}.ri-aspect-ratio-line:before{content:"\ea80"}.ri-asterisk:before{content:"\ea81"}.ri-at-fill:before{content:"\ea82"}.ri-at-line:before{content:"\ea83"}.ri-attachment-2:before{content:"\ea84"}.ri-attachment-fill:before{content:"\ea85"}.ri-attachment-line:before{content:"\ea86"}.ri-auction-fill:before{content:"\ea87"}.ri-auction-line:before{content:"\ea88"}.ri-award-fill:before{content:"\ea89"}.ri-award-line:before{content:"\ea8a"}.ri-baidu-fill:before{content:"\ea8b"}.ri-baidu-line:before{content:"\ea8c"}.ri-ball-pen-fill:before{content:"\ea8d"}.ri-ball-pen-line:before{content:"\ea8e"}.ri-bank-card-2-fill:before{content:"\ea8f"}.ri-bank-card-2-line:before{content:"\ea90"}.ri-bank-card-fill:before{content:"\ea91"}.ri-bank-card-line:before{content:"\ea92"}.ri-bank-fill:before{content:"\ea93"}.ri-bank-line:before{content:"\ea94"}.ri-bar-chart-2-fill:before{content:"\ea95"}.ri-bar-chart-2-line:before{content:"\ea96"}.ri-bar-chart-box-fill:before{content:"\ea97"}.ri-bar-chart-box-line:before{content:"\ea98"}.ri-bar-chart-fill:before{content:"\ea99"}.ri-bar-chart-grouped-fill:before{content:"\ea9a"}.ri-bar-chart-grouped-line:before{content:"\ea9b"}.ri-bar-chart-horizontal-fill:before{content:"\ea9c"}.ri-bar-chart-horizontal-line:before{content:"\ea9d"}.ri-bar-chart-line:before{content:"\ea9e"}.ri-barcode-box-fill:before{content:"\ea9f"}.ri-barcode-box-line:before{content:"\eaa0"}.ri-barcode-fill:before{content:"\eaa1"}.ri-barcode-line:before{content:"\eaa2"}.ri-barricade-fill:before{content:"\eaa3"}.ri-barricade-line:before{content:"\eaa4"}.ri-base-station-fill:before{content:"\eaa5"}.ri-base-station-line:before{content:"\eaa6"}.ri-basketball-fill:before{content:"\eaa7"}.ri-basketball-line:before{content:"\eaa8"}.ri-battery-2-charge-fill:before{content:"\eaa9"}.ri-battery-2-charge-line:before{content:"\eaaa"}.ri-battery-2-fill:before{content:"\eaab"}.ri-battery-2-line:before{content:"\eaac"}.ri-battery-charge-fill:before{content:"\eaad"}.ri-battery-charge-line:before{content:"\eaae"}.ri-battery-fill:before{content:"\eaaf"}.ri-battery-line:before{content:"\eab0"}.ri-battery-low-fill:before{content:"\eab1"}.ri-battery-low-line:before{content:"\eab2"}.ri-battery-saver-fill:before{content:"\eab3"}.ri-battery-saver-line:before{content:"\eab4"}.ri-battery-share-fill:before{content:"\eab5"}.ri-battery-share-line:before{content:"\eab6"}.ri-bear-smile-fill:before{content:"\eab7"}.ri-bear-smile-line:before{content:"\eab8"}.ri-behance-fill:before{content:"\eab9"}.ri-behance-line:before{content:"\eaba"}.ri-bell-fill:before{content:"\eabb"}.ri-bell-line:before{content:"\eabc"}.ri-bike-fill:before{content:"\eabd"}.ri-bike-line:before{content:"\eabe"}.ri-bilibili-fill:before{content:"\eabf"}.ri-bilibili-line:before{content:"\eac0"}.ri-bill-fill:before{content:"\eac1"}.ri-bill-line:before{content:"\eac2"}.ri-billiards-fill:before{content:"\eac3"}.ri-billiards-line:before{content:"\eac4"}.ri-bit-coin-fill:before{content:"\eac5"}.ri-bit-coin-line:before{content:"\eac6"}.ri-blaze-fill:before{content:"\eac7"}.ri-blaze-line:before{content:"\eac8"}.ri-bluetooth-connect-fill:before{content:"\eac9"}.ri-bluetooth-connect-line:before{content:"\eaca"}.ri-bluetooth-fill:before{content:"\eacb"}.ri-bluetooth-line:before{content:"\eacc"}.ri-blur-off-fill:before{content:"\eacd"}.ri-blur-off-line:before{content:"\eace"}.ri-body-scan-fill:before{content:"\eacf"}.ri-body-scan-line:before{content:"\ead0"}.ri-bold:before{content:"\ead1"}.ri-book-2-fill:before{content:"\ead2"}.ri-book-2-line:before{content:"\ead3"}.ri-book-3-fill:before{content:"\ead4"}.ri-book-3-line:before{content:"\ead5"}.ri-book-fill:before{content:"\ead6"}.ri-book-line:before{content:"\ead7"}.ri-book-mark-fill:before{content:"\ead8"}.ri-book-mark-line:before{content:"\ead9"}.ri-book-open-fill:before{content:"\eada"}.ri-book-open-line:before{content:"\eadb"}.ri-book-read-fill:before{content:"\eadc"}.ri-book-read-line:before{content:"\eadd"}.ri-booklet-fill:before{content:"\eade"}.ri-booklet-line:before{content:"\eadf"}.ri-bookmark-2-fill:before{content:"\eae0"}.ri-bookmark-2-line:before{content:"\eae1"}.ri-bookmark-3-fill:before{content:"\eae2"}.ri-bookmark-3-line:before{content:"\eae3"}.ri-bookmark-fill:before{content:"\eae4"}.ri-bookmark-line:before{content:"\eae5"}.ri-boxing-fill:before{content:"\eae6"}.ri-boxing-line:before{content:"\eae7"}.ri-braces-fill:before{content:"\eae8"}.ri-braces-line:before{content:"\eae9"}.ri-brackets-fill:before{content:"\eaea"}.ri-brackets-line:before{content:"\eaeb"}.ri-briefcase-2-fill:before{content:"\eaec"}.ri-briefcase-2-line:before{content:"\eaed"}.ri-briefcase-3-fill:before{content:"\eaee"}.ri-briefcase-3-line:before{content:"\eaef"}.ri-briefcase-4-fill:before{content:"\eaf0"}.ri-briefcase-4-line:before{content:"\eaf1"}.ri-briefcase-5-fill:before{content:"\eaf2"}.ri-briefcase-5-line:before{content:"\eaf3"}.ri-briefcase-fill:before{content:"\eaf4"}.ri-briefcase-line:before{content:"\eaf5"}.ri-bring-forward:before{content:"\eaf6"}.ri-bring-to-front:before{content:"\eaf7"}.ri-broadcast-fill:before{content:"\eaf8"}.ri-broadcast-line:before{content:"\eaf9"}.ri-brush-2-fill:before{content:"\eafa"}.ri-brush-2-line:before{content:"\eafb"}.ri-brush-3-fill:before{content:"\eafc"}.ri-brush-3-line:before{content:"\eafd"}.ri-brush-4-fill:before{content:"\eafe"}.ri-brush-4-line:before{content:"\eaff"}.ri-brush-fill:before{content:"\eb00"}.ri-brush-line:before{content:"\eb01"}.ri-bubble-chart-fill:before{content:"\eb02"}.ri-bubble-chart-line:before{content:"\eb03"}.ri-bug-2-fill:before{content:"\eb04"}.ri-bug-2-line:before{content:"\eb05"}.ri-bug-fill:before{content:"\eb06"}.ri-bug-line:before{content:"\eb07"}.ri-building-2-fill:before{content:"\eb08"}.ri-building-2-line:before{content:"\eb09"}.ri-building-3-fill:before{content:"\eb0a"}.ri-building-3-line:before{content:"\eb0b"}.ri-building-4-fill:before{content:"\eb0c"}.ri-building-4-line:before{content:"\eb0d"}.ri-building-fill:before{content:"\eb0e"}.ri-building-line:before{content:"\eb0f"}.ri-bus-2-fill:before{content:"\eb10"}.ri-bus-2-line:before{content:"\eb11"}.ri-bus-fill:before{content:"\eb12"}.ri-bus-line:before{content:"\eb13"}.ri-bus-wifi-fill:before{content:"\eb14"}.ri-bus-wifi-line:before{content:"\eb15"}.ri-cactus-fill:before{content:"\eb16"}.ri-cactus-line:before{content:"\eb17"}.ri-cake-2-fill:before{content:"\eb18"}.ri-cake-2-line:before{content:"\eb19"}.ri-cake-3-fill:before{content:"\eb1a"}.ri-cake-3-line:before{content:"\eb1b"}.ri-cake-fill:before{content:"\eb1c"}.ri-cake-line:before{content:"\eb1d"}.ri-calculator-fill:before{content:"\eb1e"}.ri-calculator-line:before{content:"\eb1f"}.ri-calendar-2-fill:before{content:"\eb20"}.ri-calendar-2-line:before{content:"\eb21"}.ri-calendar-check-fill:before{content:"\eb22"}.ri-calendar-check-line:before{content:"\eb23"}.ri-calendar-event-fill:before{content:"\eb24"}.ri-calendar-event-line:before{content:"\eb25"}.ri-calendar-fill:before{content:"\eb26"}.ri-calendar-line:before{content:"\eb27"}.ri-calendar-todo-fill:before{content:"\eb28"}.ri-calendar-todo-line:before{content:"\eb29"}.ri-camera-2-fill:before{content:"\eb2a"}.ri-camera-2-line:before{content:"\eb2b"}.ri-camera-3-fill:before{content:"\eb2c"}.ri-camera-3-line:before{content:"\eb2d"}.ri-camera-fill:before{content:"\eb2e"}.ri-camera-lens-fill:before{content:"\eb2f"}.ri-camera-lens-line:before{content:"\eb30"}.ri-camera-line:before{content:"\eb31"}.ri-camera-off-fill:before{content:"\eb32"}.ri-camera-off-line:before{content:"\eb33"}.ri-camera-switch-fill:before{content:"\eb34"}.ri-camera-switch-line:before{content:"\eb35"}.ri-capsule-fill:before{content:"\eb36"}.ri-capsule-line:before{content:"\eb37"}.ri-car-fill:before{content:"\eb38"}.ri-car-line:before{content:"\eb39"}.ri-car-washing-fill:before{content:"\eb3a"}.ri-car-washing-line:before{content:"\eb3b"}.ri-caravan-fill:before{content:"\eb3c"}.ri-caravan-line:before{content:"\eb3d"}.ri-cast-fill:before{content:"\eb3e"}.ri-cast-line:before{content:"\eb3f"}.ri-cellphone-fill:before{content:"\eb40"}.ri-cellphone-line:before{content:"\eb41"}.ri-celsius-fill:before{content:"\eb42"}.ri-celsius-line:before{content:"\eb43"}.ri-centos-fill:before{content:"\eb44"}.ri-centos-line:before{content:"\eb45"}.ri-character-recognition-fill:before{content:"\eb46"}.ri-character-recognition-line:before{content:"\eb47"}.ri-charging-pile-2-fill:before{content:"\eb48"}.ri-charging-pile-2-line:before{content:"\eb49"}.ri-charging-pile-fill:before{content:"\eb4a"}.ri-charging-pile-line:before{content:"\eb4b"}.ri-chat-1-fill:before{content:"\eb4c"}.ri-chat-1-line:before{content:"\eb4d"}.ri-chat-2-fill:before{content:"\eb4e"}.ri-chat-2-line:before{content:"\eb4f"}.ri-chat-3-fill:before{content:"\eb50"}.ri-chat-3-line:before{content:"\eb51"}.ri-chat-4-fill:before{content:"\eb52"}.ri-chat-4-line:before{content:"\eb53"}.ri-chat-check-fill:before{content:"\eb54"}.ri-chat-check-line:before{content:"\eb55"}.ri-chat-delete-fill:before{content:"\eb56"}.ri-chat-delete-line:before{content:"\eb57"}.ri-chat-download-fill:before{content:"\eb58"}.ri-chat-download-line:before{content:"\eb59"}.ri-chat-follow-up-fill:before{content:"\eb5a"}.ri-chat-follow-up-line:before{content:"\eb5b"}.ri-chat-forward-fill:before{content:"\eb5c"}.ri-chat-forward-line:before{content:"\eb5d"}.ri-chat-heart-fill:before{content:"\eb5e"}.ri-chat-heart-line:before{content:"\eb5f"}.ri-chat-history-fill:before{content:"\eb60"}.ri-chat-history-line:before{content:"\eb61"}.ri-chat-new-fill:before{content:"\eb62"}.ri-chat-new-line:before{content:"\eb63"}.ri-chat-off-fill:before{content:"\eb64"}.ri-chat-off-line:before{content:"\eb65"}.ri-chat-poll-fill:before{content:"\eb66"}.ri-chat-poll-line:before{content:"\eb67"}.ri-chat-private-fill:before{content:"\eb68"}.ri-chat-private-line:before{content:"\eb69"}.ri-chat-quote-fill:before{content:"\eb6a"}.ri-chat-quote-line:before{content:"\eb6b"}.ri-chat-settings-fill:before{content:"\eb6c"}.ri-chat-settings-line:before{content:"\eb6d"}.ri-chat-smile-2-fill:before{content:"\eb6e"}.ri-chat-smile-2-line:before{content:"\eb6f"}.ri-chat-smile-3-fill:before{content:"\eb70"}.ri-chat-smile-3-line:before{content:"\eb71"}.ri-chat-smile-fill:before{content:"\eb72"}.ri-chat-smile-line:before{content:"\eb73"}.ri-chat-upload-fill:before{content:"\eb74"}.ri-chat-upload-line:before{content:"\eb75"}.ri-chat-voice-fill:before{content:"\eb76"}.ri-chat-voice-line:before{content:"\eb77"}.ri-check-double-fill:before{content:"\eb78"}.ri-check-double-line:before{content:"\eb79"}.ri-check-fill:before{content:"\eb7a"}.ri-check-line:before{content:"\eb7b"}.ri-checkbox-blank-circle-fill:before{content:"\eb7c"}.ri-checkbox-blank-circle-line:before{content:"\eb7d"}.ri-checkbox-blank-fill:before{content:"\eb7e"}.ri-checkbox-blank-line:before{content:"\eb7f"}.ri-checkbox-circle-fill:before{content:"\eb80"}.ri-checkbox-circle-line:before{content:"\eb81"}.ri-checkbox-fill:before{content:"\eb82"}.ri-checkbox-indeterminate-fill:before{content:"\eb83"}.ri-checkbox-indeterminate-line:before{content:"\eb84"}.ri-checkbox-line:before{content:"\eb85"}.ri-checkbox-multiple-blank-fill:before{content:"\eb86"}.ri-checkbox-multiple-blank-line:before{content:"\eb87"}.ri-checkbox-multiple-fill:before{content:"\eb88"}.ri-checkbox-multiple-line:before{content:"\eb89"}.ri-china-railway-fill:before{content:"\eb8a"}.ri-china-railway-line:before{content:"\eb8b"}.ri-chrome-fill:before{content:"\eb8c"}.ri-chrome-line:before{content:"\eb8d"}.ri-clapperboard-fill:before{content:"\eb8e"}.ri-clapperboard-line:before{content:"\eb8f"}.ri-clipboard-fill:before{content:"\eb90"}.ri-clipboard-line:before{content:"\eb91"}.ri-clockwise-2-fill:before{content:"\eb92"}.ri-clockwise-2-line:before{content:"\eb93"}.ri-clockwise-fill:before{content:"\eb94"}.ri-clockwise-line:before{content:"\eb95"}.ri-close-circle-fill:before{content:"\eb96"}.ri-close-circle-line:before{content:"\eb97"}.ri-close-fill:before{content:"\eb98"}.ri-close-line:before{content:"\eb99"}.ri-closed-captioning-fill:before{content:"\eb9a"}.ri-closed-captioning-line:before{content:"\eb9b"}.ri-cloud-fill:before{content:"\eb9c"}.ri-cloud-line:before{content:"\eb9d"}.ri-cloud-off-fill:before{content:"\eb9e"}.ri-cloud-off-line:before{content:"\eb9f"}.ri-cloud-windy-fill:before{content:"\eba0"}.ri-cloud-windy-line:before{content:"\eba1"}.ri-cloudy-2-fill:before{content:"\eba2"}.ri-cloudy-2-line:before{content:"\eba3"}.ri-cloudy-fill:before{content:"\eba4"}.ri-cloudy-line:before{content:"\eba5"}.ri-code-box-fill:before{content:"\eba6"}.ri-code-box-line:before{content:"\eba7"}.ri-code-fill:before{content:"\eba8"}.ri-code-line:before{content:"\eba9"}.ri-code-s-fill:before{content:"\ebaa"}.ri-code-s-line:before{content:"\ebab"}.ri-code-s-slash-fill:before{content:"\ebac"}.ri-code-s-slash-line:before{content:"\ebad"}.ri-code-view:before{content:"\ebae"}.ri-codepen-fill:before{content:"\ebaf"}.ri-codepen-line:before{content:"\ebb0"}.ri-coin-fill:before{content:"\ebb1"}.ri-coin-line:before{content:"\ebb2"}.ri-coins-fill:before{content:"\ebb3"}.ri-coins-line:before{content:"\ebb4"}.ri-collage-fill:before{content:"\ebb5"}.ri-collage-line:before{content:"\ebb6"}.ri-command-fill:before{content:"\ebb7"}.ri-command-line:before{content:"\ebb8"}.ri-community-fill:before{content:"\ebb9"}.ri-community-line:before{content:"\ebba"}.ri-compass-2-fill:before{content:"\ebbb"}.ri-compass-2-line:before{content:"\ebbc"}.ri-compass-3-fill:before{content:"\ebbd"}.ri-compass-3-line:before{content:"\ebbe"}.ri-compass-4-fill:before{content:"\ebbf"}.ri-compass-4-line:before{content:"\ebc0"}.ri-compass-discover-fill:before{content:"\ebc1"}.ri-compass-discover-line:before{content:"\ebc2"}.ri-compass-fill:before{content:"\ebc3"}.ri-compass-line:before{content:"\ebc4"}.ri-compasses-2-fill:before{content:"\ebc5"}.ri-compasses-2-line:before{content:"\ebc6"}.ri-compasses-fill:before{content:"\ebc7"}.ri-compasses-line:before{content:"\ebc8"}.ri-computer-fill:before{content:"\ebc9"}.ri-computer-line:before{content:"\ebca"}.ri-contacts-book-2-fill:before{content:"\ebcb"}.ri-contacts-book-2-line:before{content:"\ebcc"}.ri-contacts-book-fill:before{content:"\ebcd"}.ri-contacts-book-line:before{content:"\ebce"}.ri-contacts-book-upload-fill:before{content:"\ebcf"}.ri-contacts-book-upload-line:before{content:"\ebd0"}.ri-contacts-fill:before{content:"\ebd1"}.ri-contacts-line:before{content:"\ebd2"}.ri-contrast-2-fill:before{content:"\ebd3"}.ri-contrast-2-line:before{content:"\ebd4"}.ri-contrast-drop-2-fill:before{content:"\ebd5"}.ri-contrast-drop-2-line:before{content:"\ebd6"}.ri-contrast-drop-fill:before{content:"\ebd7"}.ri-contrast-drop-line:before{content:"\ebd8"}.ri-contrast-fill:before{content:"\ebd9"}.ri-contrast-line:before{content:"\ebda"}.ri-copper-coin-fill:before{content:"\ebdb"}.ri-copper-coin-line:before{content:"\ebdc"}.ri-copper-diamond-fill:before{content:"\ebdd"}.ri-copper-diamond-line:before{content:"\ebde"}.ri-copyleft-fill:before{content:"\ebdf"}.ri-copyleft-line:before{content:"\ebe0"}.ri-copyright-fill:before{content:"\ebe1"}.ri-copyright-line:before{content:"\ebe2"}.ri-coreos-fill:before{content:"\ebe3"}.ri-coreos-line:before{content:"\ebe4"}.ri-coupon-2-fill:before{content:"\ebe5"}.ri-coupon-2-line:before{content:"\ebe6"}.ri-coupon-3-fill:before{content:"\ebe7"}.ri-coupon-3-line:before{content:"\ebe8"}.ri-coupon-4-fill:before{content:"\ebe9"}.ri-coupon-4-line:before{content:"\ebea"}.ri-coupon-5-fill:before{content:"\ebeb"}.ri-coupon-5-line:before{content:"\ebec"}.ri-coupon-fill:before{content:"\ebed"}.ri-coupon-line:before{content:"\ebee"}.ri-cpu-fill:before{content:"\ebef"}.ri-cpu-line:before{content:"\ebf0"}.ri-creative-commons-by-fill:before{content:"\ebf1"}.ri-creative-commons-by-line:before{content:"\ebf2"}.ri-creative-commons-fill:before{content:"\ebf3"}.ri-creative-commons-line:before{content:"\ebf4"}.ri-creative-commons-nc-fill:before{content:"\ebf5"}.ri-creative-commons-nc-line:before{content:"\ebf6"}.ri-creative-commons-nd-fill:before{content:"\ebf7"}.ri-creative-commons-nd-line:before{content:"\ebf8"}.ri-creative-commons-sa-fill:before{content:"\ebf9"}.ri-creative-commons-sa-line:before{content:"\ebfa"}.ri-creative-commons-zero-fill:before{content:"\ebfb"}.ri-creative-commons-zero-line:before{content:"\ebfc"}.ri-criminal-fill:before{content:"\ebfd"}.ri-criminal-line:before{content:"\ebfe"}.ri-crop-2-fill:before{content:"\ebff"}.ri-crop-2-line:before{content:"\ec00"}.ri-crop-fill:before{content:"\ec01"}.ri-crop-line:before{content:"\ec02"}.ri-css3-fill:before{content:"\ec03"}.ri-css3-line:before{content:"\ec04"}.ri-cup-fill:before{content:"\ec05"}.ri-cup-line:before{content:"\ec06"}.ri-currency-fill:before{content:"\ec07"}.ri-currency-line:before{content:"\ec08"}.ri-cursor-fill:before{content:"\ec09"}.ri-cursor-line:before{content:"\ec0a"}.ri-customer-service-2-fill:before{content:"\ec0b"}.ri-customer-service-2-line:before{content:"\ec0c"}.ri-customer-service-fill:before{content:"\ec0d"}.ri-customer-service-line:before{content:"\ec0e"}.ri-dashboard-2-fill:before{content:"\ec0f"}.ri-dashboard-2-line:before{content:"\ec10"}.ri-dashboard-3-fill:before{content:"\ec11"}.ri-dashboard-3-line:before{content:"\ec12"}.ri-dashboard-fill:before{content:"\ec13"}.ri-dashboard-line:before{content:"\ec14"}.ri-database-2-fill:before{content:"\ec15"}.ri-database-2-line:before{content:"\ec16"}.ri-database-fill:before{content:"\ec17"}.ri-database-line:before{content:"\ec18"}.ri-delete-back-2-fill:before{content:"\ec19"}.ri-delete-back-2-line:before{content:"\ec1a"}.ri-delete-back-fill:before{content:"\ec1b"}.ri-delete-back-line:before{content:"\ec1c"}.ri-delete-bin-2-fill:before{content:"\ec1d"}.ri-delete-bin-2-line:before{content:"\ec1e"}.ri-delete-bin-3-fill:before{content:"\ec1f"}.ri-delete-bin-3-line:before{content:"\ec20"}.ri-delete-bin-4-fill:before{content:"\ec21"}.ri-delete-bin-4-line:before{content:"\ec22"}.ri-delete-bin-5-fill:before{content:"\ec23"}.ri-delete-bin-5-line:before{content:"\ec24"}.ri-delete-bin-6-fill:before{content:"\ec25"}.ri-delete-bin-6-line:before{content:"\ec26"}.ri-delete-bin-7-fill:before{content:"\ec27"}.ri-delete-bin-7-line:before{content:"\ec28"}.ri-delete-bin-fill:before{content:"\ec29"}.ri-delete-bin-line:before{content:"\ec2a"}.ri-delete-column:before{content:"\ec2b"}.ri-delete-row:before{content:"\ec2c"}.ri-device-fill:before{content:"\ec2d"}.ri-device-line:before{content:"\ec2e"}.ri-device-recover-fill:before{content:"\ec2f"}.ri-device-recover-line:before{content:"\ec30"}.ri-dingding-fill:before{content:"\ec31"}.ri-dingding-line:before{content:"\ec32"}.ri-direction-fill:before{content:"\ec33"}.ri-direction-line:before{content:"\ec34"}.ri-disc-fill:before{content:"\ec35"}.ri-disc-line:before{content:"\ec36"}.ri-discord-fill:before{content:"\ec37"}.ri-discord-line:before{content:"\ec38"}.ri-discuss-fill:before{content:"\ec39"}.ri-discuss-line:before{content:"\ec3a"}.ri-dislike-fill:before{content:"\ec3b"}.ri-dislike-line:before{content:"\ec3c"}.ri-disqus-fill:before{content:"\ec3d"}.ri-disqus-line:before{content:"\ec3e"}.ri-divide-fill:before{content:"\ec3f"}.ri-divide-line:before{content:"\ec40"}.ri-donut-chart-fill:before{content:"\ec41"}.ri-donut-chart-line:before{content:"\ec42"}.ri-door-closed-fill:before{content:"\ec43"}.ri-door-closed-line:before{content:"\ec44"}.ri-door-fill:before{content:"\ec45"}.ri-door-line:before{content:"\ec46"}.ri-door-lock-box-fill:before{content:"\ec47"}.ri-door-lock-box-line:before{content:"\ec48"}.ri-door-lock-fill:before{content:"\ec49"}.ri-door-lock-line:before{content:"\ec4a"}.ri-door-open-fill:before{content:"\ec4b"}.ri-door-open-line:before{content:"\ec4c"}.ri-dossier-fill:before{content:"\ec4d"}.ri-dossier-line:before{content:"\ec4e"}.ri-douban-fill:before{content:"\ec4f"}.ri-douban-line:before{content:"\ec50"}.ri-double-quotes-l:before{content:"\ec51"}.ri-double-quotes-r:before{content:"\ec52"}.ri-download-2-fill:before{content:"\ec53"}.ri-download-2-line:before{content:"\ec54"}.ri-download-cloud-2-fill:before{content:"\ec55"}.ri-download-cloud-2-line:before{content:"\ec56"}.ri-download-cloud-fill:before{content:"\ec57"}.ri-download-cloud-line:before{content:"\ec58"}.ri-download-fill:before{content:"\ec59"}.ri-download-line:before{content:"\ec5a"}.ri-draft-fill:before{content:"\ec5b"}.ri-draft-line:before{content:"\ec5c"}.ri-drag-drop-fill:before{content:"\ec5d"}.ri-drag-drop-line:before{content:"\ec5e"}.ri-drag-move-2-fill:before{content:"\ec5f"}.ri-drag-move-2-line:before{content:"\ec60"}.ri-drag-move-fill:before{content:"\ec61"}.ri-drag-move-line:before{content:"\ec62"}.ri-dribbble-fill:before{content:"\ec63"}.ri-dribbble-line:before{content:"\ec64"}.ri-drive-fill:before{content:"\ec65"}.ri-drive-line:before{content:"\ec66"}.ri-drizzle-fill:before{content:"\ec67"}.ri-drizzle-line:before{content:"\ec68"}.ri-drop-fill:before{content:"\ec69"}.ri-drop-line:before{content:"\ec6a"}.ri-dropbox-fill:before{content:"\ec6b"}.ri-dropbox-line:before{content:"\ec6c"}.ri-dual-sim-1-fill:before{content:"\ec6d"}.ri-dual-sim-1-line:before{content:"\ec6e"}.ri-dual-sim-2-fill:before{content:"\ec6f"}.ri-dual-sim-2-line:before{content:"\ec70"}.ri-dv-fill:before{content:"\ec71"}.ri-dv-line:before{content:"\ec72"}.ri-dvd-fill:before{content:"\ec73"}.ri-dvd-line:before{content:"\ec74"}.ri-e-bike-2-fill:before{content:"\ec75"}.ri-e-bike-2-line:before{content:"\ec76"}.ri-e-bike-fill:before{content:"\ec77"}.ri-e-bike-line:before{content:"\ec78"}.ri-earth-fill:before{content:"\ec79"}.ri-earth-line:before{content:"\ec7a"}.ri-earthquake-fill:before{content:"\ec7b"}.ri-earthquake-line:before{content:"\ec7c"}.ri-edge-fill:before{content:"\ec7d"}.ri-edge-line:before{content:"\ec7e"}.ri-edit-2-fill:before{content:"\ec7f"}.ri-edit-2-line:before{content:"\ec80"}.ri-edit-box-fill:before{content:"\ec81"}.ri-edit-box-line:before{content:"\ec82"}.ri-edit-circle-fill:before{content:"\ec83"}.ri-edit-circle-line:before{content:"\ec84"}.ri-edit-fill:before{content:"\ec85"}.ri-edit-line:before{content:"\ec86"}.ri-eject-fill:before{content:"\ec87"}.ri-eject-line:before{content:"\ec88"}.ri-emotion-2-fill:before{content:"\ec89"}.ri-emotion-2-line:before{content:"\ec8a"}.ri-emotion-fill:before{content:"\ec8b"}.ri-emotion-happy-fill:before{content:"\ec8c"}.ri-emotion-happy-line:before{content:"\ec8d"}.ri-emotion-laugh-fill:before{content:"\ec8e"}.ri-emotion-laugh-line:before{content:"\ec8f"}.ri-emotion-line:before{content:"\ec90"}.ri-emotion-normal-fill:before{content:"\ec91"}.ri-emotion-normal-line:before{content:"\ec92"}.ri-emotion-sad-fill:before{content:"\ec93"}.ri-emotion-sad-line:before{content:"\ec94"}.ri-emotion-unhappy-fill:before{content:"\ec95"}.ri-emotion-unhappy-line:before{content:"\ec96"}.ri-empathize-fill:before{content:"\ec97"}.ri-empathize-line:before{content:"\ec98"}.ri-emphasis-cn:before{content:"\ec99"}.ri-emphasis:before{content:"\ec9a"}.ri-english-input:before{content:"\ec9b"}.ri-equalizer-fill:before{content:"\ec9c"}.ri-equalizer-line:before{content:"\ec9d"}.ri-eraser-fill:before{content:"\ec9e"}.ri-eraser-line:before{content:"\ec9f"}.ri-error-warning-fill:before{content:"\eca0"}.ri-error-warning-line:before{content:"\eca1"}.ri-evernote-fill:before{content:"\eca2"}.ri-evernote-line:before{content:"\eca3"}.ri-exchange-box-fill:before{content:"\eca4"}.ri-exchange-box-line:before{content:"\eca5"}.ri-exchange-cny-fill:before{content:"\eca6"}.ri-exchange-cny-line:before{content:"\eca7"}.ri-exchange-dollar-fill:before{content:"\eca8"}.ri-exchange-dollar-line:before{content:"\eca9"}.ri-exchange-fill:before{content:"\ecaa"}.ri-exchange-funds-fill:before{content:"\ecab"}.ri-exchange-funds-line:before{content:"\ecac"}.ri-exchange-line:before{content:"\ecad"}.ri-external-link-fill:before{content:"\ecae"}.ri-external-link-line:before{content:"\ecaf"}.ri-eye-2-fill:before{content:"\ecb0"}.ri-eye-2-line:before{content:"\ecb1"}.ri-eye-close-fill:before{content:"\ecb2"}.ri-eye-close-line:before{content:"\ecb3"}.ri-eye-fill:before{content:"\ecb4"}.ri-eye-line:before{content:"\ecb5"}.ri-eye-off-fill:before{content:"\ecb6"}.ri-eye-off-line:before{content:"\ecb7"}.ri-facebook-box-fill:before{content:"\ecb8"}.ri-facebook-box-line:before{content:"\ecb9"}.ri-facebook-circle-fill:before{content:"\ecba"}.ri-facebook-circle-line:before{content:"\ecbb"}.ri-facebook-fill:before{content:"\ecbc"}.ri-facebook-line:before{content:"\ecbd"}.ri-fahrenheit-fill:before{content:"\ecbe"}.ri-fahrenheit-line:before{content:"\ecbf"}.ri-feedback-fill:before{content:"\ecc0"}.ri-feedback-line:before{content:"\ecc1"}.ri-file-2-fill:before{content:"\ecc2"}.ri-file-2-line:before{content:"\ecc3"}.ri-file-3-fill:before{content:"\ecc4"}.ri-file-3-line:before{content:"\ecc5"}.ri-file-4-fill:before{content:"\ecc6"}.ri-file-4-line:before{content:"\ecc7"}.ri-file-add-fill:before{content:"\ecc8"}.ri-file-add-line:before{content:"\ecc9"}.ri-file-chart-2-fill:before{content:"\ecca"}.ri-file-chart-2-line:before{content:"\eccb"}.ri-file-chart-fill:before{content:"\eccc"}.ri-file-chart-line:before{content:"\eccd"}.ri-file-cloud-fill:before{content:"\ecce"}.ri-file-cloud-line:before{content:"\eccf"}.ri-file-code-fill:before{content:"\ecd0"}.ri-file-code-line:before{content:"\ecd1"}.ri-file-copy-2-fill:before{content:"\ecd2"}.ri-file-copy-2-line:before{content:"\ecd3"}.ri-file-copy-fill:before{content:"\ecd4"}.ri-file-copy-line:before{content:"\ecd5"}.ri-file-damage-fill:before{content:"\ecd6"}.ri-file-damage-line:before{content:"\ecd7"}.ri-file-download-fill:before{content:"\ecd8"}.ri-file-download-line:before{content:"\ecd9"}.ri-file-edit-fill:before{content:"\ecda"}.ri-file-edit-line:before{content:"\ecdb"}.ri-file-excel-2-fill:before{content:"\ecdc"}.ri-file-excel-2-line:before{content:"\ecdd"}.ri-file-excel-fill:before{content:"\ecde"}.ri-file-excel-line:before{content:"\ecdf"}.ri-file-fill:before{content:"\ece0"}.ri-file-forbid-fill:before{content:"\ece1"}.ri-file-forbid-line:before{content:"\ece2"}.ri-file-gif-fill:before{content:"\ece3"}.ri-file-gif-line:before{content:"\ece4"}.ri-file-history-fill:before{content:"\ece5"}.ri-file-history-line:before{content:"\ece6"}.ri-file-hwp-fill:before{content:"\ece7"}.ri-file-hwp-line:before{content:"\ece8"}.ri-file-info-fill:before{content:"\ece9"}.ri-file-info-line:before{content:"\ecea"}.ri-file-line:before{content:"\eceb"}.ri-file-list-2-fill:before{content:"\ecec"}.ri-file-list-2-line:before{content:"\eced"}.ri-file-list-3-fill:before{content:"\ecee"}.ri-file-list-3-line:before{content:"\ecef"}.ri-file-list-fill:before{content:"\ecf0"}.ri-file-list-line:before{content:"\ecf1"}.ri-file-lock-fill:before{content:"\ecf2"}.ri-file-lock-line:before{content:"\ecf3"}.ri-file-mark-fill:before{content:"\ecf4"}.ri-file-mark-line:before{content:"\ecf5"}.ri-file-music-fill:before{content:"\ecf6"}.ri-file-music-line:before{content:"\ecf7"}.ri-file-paper-2-fill:before{content:"\ecf8"}.ri-file-paper-2-line:before{content:"\ecf9"}.ri-file-paper-fill:before{content:"\ecfa"}.ri-file-paper-line:before{content:"\ecfb"}.ri-file-pdf-fill:before{content:"\ecfc"}.ri-file-pdf-line:before{content:"\ecfd"}.ri-file-ppt-2-fill:before{content:"\ecfe"}.ri-file-ppt-2-line:before{content:"\ecff"}.ri-file-ppt-fill:before{content:"\ed00"}.ri-file-ppt-line:before{content:"\ed01"}.ri-file-reduce-fill:before{content:"\ed02"}.ri-file-reduce-line:before{content:"\ed03"}.ri-file-search-fill:before{content:"\ed04"}.ri-file-search-line:before{content:"\ed05"}.ri-file-settings-fill:before{content:"\ed06"}.ri-file-settings-line:before{content:"\ed07"}.ri-file-shield-2-fill:before{content:"\ed08"}.ri-file-shield-2-line:before{content:"\ed09"}.ri-file-shield-fill:before{content:"\ed0a"}.ri-file-shield-line:before{content:"\ed0b"}.ri-file-shred-fill:before{content:"\ed0c"}.ri-file-shred-line:before{content:"\ed0d"}.ri-file-text-fill:before{content:"\ed0e"}.ri-file-text-line:before{content:"\ed0f"}.ri-file-transfer-fill:before{content:"\ed10"}.ri-file-transfer-line:before{content:"\ed11"}.ri-file-unknow-fill:before{content:"\ed12"}.ri-file-unknow-line:before{content:"\ed13"}.ri-file-upload-fill:before{content:"\ed14"}.ri-file-upload-line:before{content:"\ed15"}.ri-file-user-fill:before{content:"\ed16"}.ri-file-user-line:before{content:"\ed17"}.ri-file-warning-fill:before{content:"\ed18"}.ri-file-warning-line:before{content:"\ed19"}.ri-file-word-2-fill:before{content:"\ed1a"}.ri-file-word-2-line:before{content:"\ed1b"}.ri-file-word-fill:before{content:"\ed1c"}.ri-file-word-line:before{content:"\ed1d"}.ri-file-zip-fill:before{content:"\ed1e"}.ri-file-zip-line:before{content:"\ed1f"}.ri-film-fill:before{content:"\ed20"}.ri-film-line:before{content:"\ed21"}.ri-filter-2-fill:before{content:"\ed22"}.ri-filter-2-line:before{content:"\ed23"}.ri-filter-3-fill:before{content:"\ed24"}.ri-filter-3-line:before{content:"\ed25"}.ri-filter-fill:before{content:"\ed26"}.ri-filter-line:before{content:"\ed27"}.ri-filter-off-fill:before{content:"\ed28"}.ri-filter-off-line:before{content:"\ed29"}.ri-find-replace-fill:before{content:"\ed2a"}.ri-find-replace-line:before{content:"\ed2b"}.ri-finder-fill:before{content:"\ed2c"}.ri-finder-line:before{content:"\ed2d"}.ri-fingerprint-2-fill:before{content:"\ed2e"}.ri-fingerprint-2-line:before{content:"\ed2f"}.ri-fingerprint-fill:before{content:"\ed30"}.ri-fingerprint-line:before{content:"\ed31"}.ri-fire-fill:before{content:"\ed32"}.ri-fire-line:before{content:"\ed33"}.ri-firefox-fill:before{content:"\ed34"}.ri-firefox-line:before{content:"\ed35"}.ri-first-aid-kit-fill:before{content:"\ed36"}.ri-first-aid-kit-line:before{content:"\ed37"}.ri-flag-2-fill:before{content:"\ed38"}.ri-flag-2-line:before{content:"\ed39"}.ri-flag-fill:before{content:"\ed3a"}.ri-flag-line:before{content:"\ed3b"}.ri-flashlight-fill:before{content:"\ed3c"}.ri-flashlight-line:before{content:"\ed3d"}.ri-flask-fill:before{content:"\ed3e"}.ri-flask-line:before{content:"\ed3f"}.ri-flight-land-fill:before{content:"\ed40"}.ri-flight-land-line:before{content:"\ed41"}.ri-flight-takeoff-fill:before{content:"\ed42"}.ri-flight-takeoff-line:before{content:"\ed43"}.ri-flood-fill:before{content:"\ed44"}.ri-flood-line:before{content:"\ed45"}.ri-flow-chart:before{content:"\ed46"}.ri-flutter-fill:before{content:"\ed47"}.ri-flutter-line:before{content:"\ed48"}.ri-focus-2-fill:before{content:"\ed49"}.ri-focus-2-line:before{content:"\ed4a"}.ri-focus-3-fill:before{content:"\ed4b"}.ri-focus-3-line:before{content:"\ed4c"}.ri-focus-fill:before{content:"\ed4d"}.ri-focus-line:before{content:"\ed4e"}.ri-foggy-fill:before{content:"\ed4f"}.ri-foggy-line:before{content:"\ed50"}.ri-folder-2-fill:before{content:"\ed51"}.ri-folder-2-line:before{content:"\ed52"}.ri-folder-3-fill:before{content:"\ed53"}.ri-folder-3-line:before{content:"\ed54"}.ri-folder-4-fill:before{content:"\ed55"}.ri-folder-4-line:before{content:"\ed56"}.ri-folder-5-fill:before{content:"\ed57"}.ri-folder-5-line:before{content:"\ed58"}.ri-folder-add-fill:before{content:"\ed59"}.ri-folder-add-line:before{content:"\ed5a"}.ri-folder-chart-2-fill:before{content:"\ed5b"}.ri-folder-chart-2-line:before{content:"\ed5c"}.ri-folder-chart-fill:before{content:"\ed5d"}.ri-folder-chart-line:before{content:"\ed5e"}.ri-folder-download-fill:before{content:"\ed5f"}.ri-folder-download-line:before{content:"\ed60"}.ri-folder-fill:before{content:"\ed61"}.ri-folder-forbid-fill:before{content:"\ed62"}.ri-folder-forbid-line:before{content:"\ed63"}.ri-folder-history-fill:before{content:"\ed64"}.ri-folder-history-line:before{content:"\ed65"}.ri-folder-info-fill:before{content:"\ed66"}.ri-folder-info-line:before{content:"\ed67"}.ri-folder-keyhole-fill:before{content:"\ed68"}.ri-folder-keyhole-line:before{content:"\ed69"}.ri-folder-line:before{content:"\ed6a"}.ri-folder-lock-fill:before{content:"\ed6b"}.ri-folder-lock-line:before{content:"\ed6c"}.ri-folder-music-fill:before{content:"\ed6d"}.ri-folder-music-line:before{content:"\ed6e"}.ri-folder-open-fill:before{content:"\ed6f"}.ri-folder-open-line:before{content:"\ed70"}.ri-folder-received-fill:before{content:"\ed71"}.ri-folder-received-line:before{content:"\ed72"}.ri-folder-reduce-fill:before{content:"\ed73"}.ri-folder-reduce-line:before{content:"\ed74"}.ri-folder-settings-fill:before{content:"\ed75"}.ri-folder-settings-line:before{content:"\ed76"}.ri-folder-shared-fill:before{content:"\ed77"}.ri-folder-shared-line:before{content:"\ed78"}.ri-folder-shield-2-fill:before{content:"\ed79"}.ri-folder-shield-2-line:before{content:"\ed7a"}.ri-folder-shield-fill:before{content:"\ed7b"}.ri-folder-shield-line:before{content:"\ed7c"}.ri-folder-transfer-fill:before{content:"\ed7d"}.ri-folder-transfer-line:before{content:"\ed7e"}.ri-folder-unknow-fill:before{content:"\ed7f"}.ri-folder-unknow-line:before{content:"\ed80"}.ri-folder-upload-fill:before{content:"\ed81"}.ri-folder-upload-line:before{content:"\ed82"}.ri-folder-user-fill:before{content:"\ed83"}.ri-folder-user-line:before{content:"\ed84"}.ri-folder-warning-fill:before{content:"\ed85"}.ri-folder-warning-line:before{content:"\ed86"}.ri-folder-zip-fill:before{content:"\ed87"}.ri-folder-zip-line:before{content:"\ed88"}.ri-folders-fill:before{content:"\ed89"}.ri-folders-line:before{content:"\ed8a"}.ri-font-color:before{content:"\ed8b"}.ri-font-size-2:before{content:"\ed8c"}.ri-font-size:before{content:"\ed8d"}.ri-football-fill:before{content:"\ed8e"}.ri-football-line:before{content:"\ed8f"}.ri-footprint-fill:before{content:"\ed90"}.ri-footprint-line:before{content:"\ed91"}.ri-forbid-2-fill:before{content:"\ed92"}.ri-forbid-2-line:before{content:"\ed93"}.ri-forbid-fill:before{content:"\ed94"}.ri-forbid-line:before{content:"\ed95"}.ri-format-clear:before{content:"\ed96"}.ri-fridge-fill:before{content:"\ed97"}.ri-fridge-line:before{content:"\ed98"}.ri-fullscreen-exit-fill:before{content:"\ed99"}.ri-fullscreen-exit-line:before{content:"\ed9a"}.ri-fullscreen-fill:before{content:"\ed9b"}.ri-fullscreen-line:before{content:"\ed9c"}.ri-function-fill:before{content:"\ed9d"}.ri-function-line:before{content:"\ed9e"}.ri-functions:before{content:"\ed9f"}.ri-funds-box-fill:before{content:"\eda0"}.ri-funds-box-line:before{content:"\eda1"}.ri-funds-fill:before{content:"\eda2"}.ri-funds-line:before{content:"\eda3"}.ri-gallery-fill:before{content:"\eda4"}.ri-gallery-line:before{content:"\eda5"}.ri-gallery-upload-fill:before{content:"\eda6"}.ri-gallery-upload-line:before{content:"\eda7"}.ri-game-fill:before{content:"\eda8"}.ri-game-line:before{content:"\eda9"}.ri-gamepad-fill:before{content:"\edaa"}.ri-gamepad-line:before{content:"\edab"}.ri-gas-station-fill:before{content:"\edac"}.ri-gas-station-line:before{content:"\edad"}.ri-gatsby-fill:before{content:"\edae"}.ri-gatsby-line:before{content:"\edaf"}.ri-genderless-fill:before{content:"\edb0"}.ri-genderless-line:before{content:"\edb1"}.ri-ghost-2-fill:before{content:"\edb2"}.ri-ghost-2-line:before{content:"\edb3"}.ri-ghost-fill:before{content:"\edb4"}.ri-ghost-line:before{content:"\edb5"}.ri-ghost-smile-fill:before{content:"\edb6"}.ri-ghost-smile-line:before{content:"\edb7"}.ri-gift-2-fill:before{content:"\edb8"}.ri-gift-2-line:before{content:"\edb9"}.ri-gift-fill:before{content:"\edba"}.ri-gift-line:before{content:"\edbb"}.ri-git-branch-fill:before{content:"\edbc"}.ri-git-branch-line:before{content:"\edbd"}.ri-git-commit-fill:before{content:"\edbe"}.ri-git-commit-line:before{content:"\edbf"}.ri-git-merge-fill:before{content:"\edc0"}.ri-git-merge-line:before{content:"\edc1"}.ri-git-pull-request-fill:before{content:"\edc2"}.ri-git-pull-request-line:before{content:"\edc3"}.ri-git-repository-commits-fill:before{content:"\edc4"}.ri-git-repository-commits-line:before{content:"\edc5"}.ri-git-repository-fill:before{content:"\edc6"}.ri-git-repository-line:before{content:"\edc7"}.ri-git-repository-private-fill:before{content:"\edc8"}.ri-git-repository-private-line:before{content:"\edc9"}.ri-github-fill:before{content:"\edca"}.ri-github-line:before{content:"\edcb"}.ri-gitlab-fill:before{content:"\edcc"}.ri-gitlab-line:before{content:"\edcd"}.ri-global-fill:before{content:"\edce"}.ri-global-line:before{content:"\edcf"}.ri-globe-fill:before{content:"\edd0"}.ri-globe-line:before{content:"\edd1"}.ri-goblet-fill:before{content:"\edd2"}.ri-goblet-line:before{content:"\edd3"}.ri-google-fill:before{content:"\edd4"}.ri-google-line:before{content:"\edd5"}.ri-google-play-fill:before{content:"\edd6"}.ri-google-play-line:before{content:"\edd7"}.ri-government-fill:before{content:"\edd8"}.ri-government-line:before{content:"\edd9"}.ri-gps-fill:before{content:"\edda"}.ri-gps-line:before{content:"\eddb"}.ri-gradienter-fill:before{content:"\eddc"}.ri-gradienter-line:before{content:"\eddd"}.ri-grid-fill:before{content:"\edde"}.ri-grid-line:before{content:"\eddf"}.ri-group-2-fill:before{content:"\ede0"}.ri-group-2-line:before{content:"\ede1"}.ri-group-fill:before{content:"\ede2"}.ri-group-line:before{content:"\ede3"}.ri-guide-fill:before{content:"\ede4"}.ri-guide-line:before{content:"\ede5"}.ri-h-1:before{content:"\ede6"}.ri-h-2:before{content:"\ede7"}.ri-h-3:before{content:"\ede8"}.ri-h-4:before{content:"\ede9"}.ri-h-5:before{content:"\edea"}.ri-h-6:before{content:"\edeb"}.ri-hail-fill:before{content:"\edec"}.ri-hail-line:before{content:"\eded"}.ri-hammer-fill:before{content:"\edee"}.ri-hammer-line:before{content:"\edef"}.ri-hand-coin-fill:before{content:"\edf0"}.ri-hand-coin-line:before{content:"\edf1"}.ri-hand-heart-fill:before{content:"\edf2"}.ri-hand-heart-line:before{content:"\edf3"}.ri-hand-sanitizer-fill:before{content:"\edf4"}.ri-hand-sanitizer-line:before{content:"\edf5"}.ri-handbag-fill:before{content:"\edf6"}.ri-handbag-line:before{content:"\edf7"}.ri-hard-drive-2-fill:before{content:"\edf8"}.ri-hard-drive-2-line:before{content:"\edf9"}.ri-hard-drive-fill:before{content:"\edfa"}.ri-hard-drive-line:before{content:"\edfb"}.ri-hashtag:before{content:"\edfc"}.ri-haze-2-fill:before{content:"\edfd"}.ri-haze-2-line:before{content:"\edfe"}.ri-haze-fill:before{content:"\edff"}.ri-haze-line:before{content:"\ee00"}.ri-hd-fill:before{content:"\ee01"}.ri-hd-line:before{content:"\ee02"}.ri-heading:before{content:"\ee03"}.ri-headphone-fill:before{content:"\ee04"}.ri-headphone-line:before{content:"\ee05"}.ri-health-book-fill:before{content:"\ee06"}.ri-health-book-line:before{content:"\ee07"}.ri-heart-2-fill:before{content:"\ee08"}.ri-heart-2-line:before{content:"\ee09"}.ri-heart-3-fill:before{content:"\ee0a"}.ri-heart-3-line:before{content:"\ee0b"}.ri-heart-add-fill:before{content:"\ee0c"}.ri-heart-add-line:before{content:"\ee0d"}.ri-heart-fill:before{content:"\ee0e"}.ri-heart-line:before{content:"\ee0f"}.ri-heart-pulse-fill:before{content:"\ee10"}.ri-heart-pulse-line:before{content:"\ee11"}.ri-hearts-fill:before{content:"\ee12"}.ri-hearts-line:before{content:"\ee13"}.ri-heavy-showers-fill:before{content:"\ee14"}.ri-heavy-showers-line:before{content:"\ee15"}.ri-history-fill:before{content:"\ee16"}.ri-history-line:before{content:"\ee17"}.ri-home-2-fill:before{content:"\ee18"}.ri-home-2-line:before{content:"\ee19"}.ri-home-3-fill:before{content:"\ee1a"}.ri-home-3-line:before{content:"\ee1b"}.ri-home-4-fill:before{content:"\ee1c"}.ri-home-4-line:before{content:"\ee1d"}.ri-home-5-fill:before{content:"\ee1e"}.ri-home-5-line:before{content:"\ee1f"}.ri-home-6-fill:before{content:"\ee20"}.ri-home-6-line:before{content:"\ee21"}.ri-home-7-fill:before{content:"\ee22"}.ri-home-7-line:before{content:"\ee23"}.ri-home-8-fill:before{content:"\ee24"}.ri-home-8-line:before{content:"\ee25"}.ri-home-fill:before{content:"\ee26"}.ri-home-gear-fill:before{content:"\ee27"}.ri-home-gear-line:before{content:"\ee28"}.ri-home-heart-fill:before{content:"\ee29"}.ri-home-heart-line:before{content:"\ee2a"}.ri-home-line:before{content:"\ee2b"}.ri-home-smile-2-fill:before{content:"\ee2c"}.ri-home-smile-2-line:before{content:"\ee2d"}.ri-home-smile-fill:before{content:"\ee2e"}.ri-home-smile-line:before{content:"\ee2f"}.ri-home-wifi-fill:before{content:"\ee30"}.ri-home-wifi-line:before{content:"\ee31"}.ri-honor-of-kings-fill:before{content:"\ee32"}.ri-honor-of-kings-line:before{content:"\ee33"}.ri-honour-fill:before{content:"\ee34"}.ri-honour-line:before{content:"\ee35"}.ri-hospital-fill:before{content:"\ee36"}.ri-hospital-line:before{content:"\ee37"}.ri-hotel-bed-fill:before{content:"\ee38"}.ri-hotel-bed-line:before{content:"\ee39"}.ri-hotel-fill:before{content:"\ee3a"}.ri-hotel-line:before{content:"\ee3b"}.ri-hotspot-fill:before{content:"\ee3c"}.ri-hotspot-line:before{content:"\ee3d"}.ri-hq-fill:before{content:"\ee3e"}.ri-hq-line:before{content:"\ee3f"}.ri-html5-fill:before{content:"\ee40"}.ri-html5-line:before{content:"\ee41"}.ri-ie-fill:before{content:"\ee42"}.ri-ie-line:before{content:"\ee43"}.ri-image-2-fill:before{content:"\ee44"}.ri-image-2-line:before{content:"\ee45"}.ri-image-add-fill:before{content:"\ee46"}.ri-image-add-line:before{content:"\ee47"}.ri-image-edit-fill:before{content:"\ee48"}.ri-image-edit-line:before{content:"\ee49"}.ri-image-fill:before{content:"\ee4a"}.ri-image-line:before{content:"\ee4b"}.ri-inbox-archive-fill:before{content:"\ee4c"}.ri-inbox-archive-line:before{content:"\ee4d"}.ri-inbox-fill:before{content:"\ee4e"}.ri-inbox-line:before{content:"\ee4f"}.ri-inbox-unarchive-fill:before{content:"\ee50"}.ri-inbox-unarchive-line:before{content:"\ee51"}.ri-increase-decrease-fill:before{content:"\ee52"}.ri-increase-decrease-line:before{content:"\ee53"}.ri-indent-decrease:before{content:"\ee54"}.ri-indent-increase:before{content:"\ee55"}.ri-indeterminate-circle-fill:before{content:"\ee56"}.ri-indeterminate-circle-line:before{content:"\ee57"}.ri-information-fill:before{content:"\ee58"}.ri-information-line:before{content:"\ee59"}.ri-infrared-thermometer-fill:before{content:"\ee5a"}.ri-infrared-thermometer-line:before{content:"\ee5b"}.ri-ink-bottle-fill:before{content:"\ee5c"}.ri-ink-bottle-line:before{content:"\ee5d"}.ri-input-cursor-move:before{content:"\ee5e"}.ri-input-method-fill:before{content:"\ee5f"}.ri-input-method-line:before{content:"\ee60"}.ri-insert-column-left:before{content:"\ee61"}.ri-insert-column-right:before{content:"\ee62"}.ri-insert-row-bottom:before{content:"\ee63"}.ri-insert-row-top:before{content:"\ee64"}.ri-instagram-fill:before{content:"\ee65"}.ri-instagram-line:before{content:"\ee66"}.ri-install-fill:before{content:"\ee67"}.ri-install-line:before{content:"\ee68"}.ri-invision-fill:before{content:"\ee69"}.ri-invision-line:before{content:"\ee6a"}.ri-italic:before{content:"\ee6b"}.ri-kakao-talk-fill:before{content:"\ee6c"}.ri-kakao-talk-line:before{content:"\ee6d"}.ri-key-2-fill:before{content:"\ee6e"}.ri-key-2-line:before{content:"\ee6f"}.ri-key-fill:before{content:"\ee70"}.ri-key-line:before{content:"\ee71"}.ri-keyboard-box-fill:before{content:"\ee72"}.ri-keyboard-box-line:before{content:"\ee73"}.ri-keyboard-fill:before{content:"\ee74"}.ri-keyboard-line:before{content:"\ee75"}.ri-keynote-fill:before{content:"\ee76"}.ri-keynote-line:before{content:"\ee77"}.ri-knife-blood-fill:before{content:"\ee78"}.ri-knife-blood-line:before{content:"\ee79"}.ri-knife-fill:before{content:"\ee7a"}.ri-knife-line:before{content:"\ee7b"}.ri-landscape-fill:before{content:"\ee7c"}.ri-landscape-line:before{content:"\ee7d"}.ri-layout-2-fill:before{content:"\ee7e"}.ri-layout-2-line:before{content:"\ee7f"}.ri-layout-3-fill:before{content:"\ee80"}.ri-layout-3-line:before{content:"\ee81"}.ri-layout-4-fill:before{content:"\ee82"}.ri-layout-4-line:before{content:"\ee83"}.ri-layout-5-fill:before{content:"\ee84"}.ri-layout-5-line:before{content:"\ee85"}.ri-layout-6-fill:before{content:"\ee86"}.ri-layout-6-line:before{content:"\ee87"}.ri-layout-bottom-2-fill:before{content:"\ee88"}.ri-layout-bottom-2-line:before{content:"\ee89"}.ri-layout-bottom-fill:before{content:"\ee8a"}.ri-layout-bottom-line:before{content:"\ee8b"}.ri-layout-column-fill:before{content:"\ee8c"}.ri-layout-column-line:before{content:"\ee8d"}.ri-layout-fill:before{content:"\ee8e"}.ri-layout-grid-fill:before{content:"\ee8f"}.ri-layout-grid-line:before{content:"\ee90"}.ri-layout-left-2-fill:before{content:"\ee91"}.ri-layout-left-2-line:before{content:"\ee92"}.ri-layout-left-fill:before{content:"\ee93"}.ri-layout-left-line:before{content:"\ee94"}.ri-layout-line:before{content:"\ee95"}.ri-layout-masonry-fill:before{content:"\ee96"}.ri-layout-masonry-line:before{content:"\ee97"}.ri-layout-right-2-fill:before{content:"\ee98"}.ri-layout-right-2-line:before{content:"\ee99"}.ri-layout-right-fill:before{content:"\ee9a"}.ri-layout-right-line:before{content:"\ee9b"}.ri-layout-row-fill:before{content:"\ee9c"}.ri-layout-row-line:before{content:"\ee9d"}.ri-layout-top-2-fill:before{content:"\ee9e"}.ri-layout-top-2-line:before{content:"\ee9f"}.ri-layout-top-fill:before{content:"\eea0"}.ri-layout-top-line:before{content:"\eea1"}.ri-leaf-fill:before{content:"\eea2"}.ri-leaf-line:before{content:"\eea3"}.ri-lifebuoy-fill:before{content:"\eea4"}.ri-lifebuoy-line:before{content:"\eea5"}.ri-lightbulb-fill:before{content:"\eea6"}.ri-lightbulb-flash-fill:before{content:"\eea7"}.ri-lightbulb-flash-line:before{content:"\eea8"}.ri-lightbulb-line:before{content:"\eea9"}.ri-line-chart-fill:before{content:"\eeaa"}.ri-line-chart-line:before{content:"\eeab"}.ri-line-fill:before{content:"\eeac"}.ri-line-height:before{content:"\eead"}.ri-line-line:before{content:"\eeae"}.ri-link-m:before{content:"\eeaf"}.ri-link-unlink-m:before{content:"\eeb0"}.ri-link-unlink:before{content:"\eeb1"}.ri-link:before{content:"\eeb2"}.ri-linkedin-box-fill:before{content:"\eeb3"}.ri-linkedin-box-line:before{content:"\eeb4"}.ri-linkedin-fill:before{content:"\eeb5"}.ri-linkedin-line:before{content:"\eeb6"}.ri-links-fill:before{content:"\eeb7"}.ri-links-line:before{content:"\eeb8"}.ri-list-check-2:before{content:"\eeb9"}.ri-list-check:before{content:"\eeba"}.ri-list-ordered:before{content:"\eebb"}.ri-list-settings-fill:before{content:"\eebc"}.ri-list-settings-line:before{content:"\eebd"}.ri-list-unordered:before{content:"\eebe"}.ri-live-fill:before{content:"\eebf"}.ri-live-line:before{content:"\eec0"}.ri-loader-2-fill:before{content:"\eec1"}.ri-loader-2-line:before{content:"\eec2"}.ri-loader-3-fill:before{content:"\eec3"}.ri-loader-3-line:before{content:"\eec4"}.ri-loader-4-fill:before{content:"\eec5"}.ri-loader-4-line:before{content:"\eec6"}.ri-loader-5-fill:before{content:"\eec7"}.ri-loader-5-line:before{content:"\eec8"}.ri-loader-fill:before{content:"\eec9"}.ri-loader-line:before{content:"\eeca"}.ri-lock-2-fill:before{content:"\eecb"}.ri-lock-2-line:before{content:"\eecc"}.ri-lock-fill:before{content:"\eecd"}.ri-lock-line:before{content:"\eece"}.ri-lock-password-fill:before{content:"\eecf"}.ri-lock-password-line:before{content:"\eed0"}.ri-lock-unlock-fill:before{content:"\eed1"}.ri-lock-unlock-line:before{content:"\eed2"}.ri-login-box-fill:before{content:"\eed3"}.ri-login-box-line:before{content:"\eed4"}.ri-login-circle-fill:before{content:"\eed5"}.ri-login-circle-line:before{content:"\eed6"}.ri-logout-box-fill:before{content:"\eed7"}.ri-logout-box-line:before{content:"\eed8"}.ri-logout-box-r-fill:before{content:"\eed9"}.ri-logout-box-r-line:before{content:"\eeda"}.ri-logout-circle-fill:before{content:"\eedb"}.ri-logout-circle-line:before{content:"\eedc"}.ri-logout-circle-r-fill:before{content:"\eedd"}.ri-logout-circle-r-line:before{content:"\eede"}.ri-luggage-cart-fill:before{content:"\eedf"}.ri-luggage-cart-line:before{content:"\eee0"}.ri-luggage-deposit-fill:before{content:"\eee1"}.ri-luggage-deposit-line:before{content:"\eee2"}.ri-lungs-fill:before{content:"\eee3"}.ri-lungs-line:before{content:"\eee4"}.ri-mac-fill:before{content:"\eee5"}.ri-mac-line:before{content:"\eee6"}.ri-macbook-fill:before{content:"\eee7"}.ri-macbook-line:before{content:"\eee8"}.ri-magic-fill:before{content:"\eee9"}.ri-magic-line:before{content:"\eeea"}.ri-mail-add-fill:before{content:"\eeeb"}.ri-mail-add-line:before{content:"\eeec"}.ri-mail-check-fill:before{content:"\eeed"}.ri-mail-check-line:before{content:"\eeee"}.ri-mail-close-fill:before{content:"\eeef"}.ri-mail-close-line:before{content:"\eef0"}.ri-mail-download-fill:before{content:"\eef1"}.ri-mail-download-line:before{content:"\eef2"}.ri-mail-fill:before{content:"\eef3"}.ri-mail-forbid-fill:before{content:"\eef4"}.ri-mail-forbid-line:before{content:"\eef5"}.ri-mail-line:before{content:"\eef6"}.ri-mail-lock-fill:before{content:"\eef7"}.ri-mail-lock-line:before{content:"\eef8"}.ri-mail-open-fill:before{content:"\eef9"}.ri-mail-open-line:before{content:"\eefa"}.ri-mail-send-fill:before{content:"\eefb"}.ri-mail-send-line:before{content:"\eefc"}.ri-mail-settings-fill:before{content:"\eefd"}.ri-mail-settings-line:before{content:"\eefe"}.ri-mail-star-fill:before{content:"\eeff"}.ri-mail-star-line:before{content:"\ef00"}.ri-mail-unread-fill:before{content:"\ef01"}.ri-mail-unread-line:before{content:"\ef02"}.ri-mail-volume-fill:before{content:"\ef03"}.ri-mail-volume-line:before{content:"\ef04"}.ri-map-2-fill:before{content:"\ef05"}.ri-map-2-line:before{content:"\ef06"}.ri-map-fill:before{content:"\ef07"}.ri-map-line:before{content:"\ef08"}.ri-map-pin-2-fill:before{content:"\ef09"}.ri-map-pin-2-line:before{content:"\ef0a"}.ri-map-pin-3-fill:before{content:"\ef0b"}.ri-map-pin-3-line:before{content:"\ef0c"}.ri-map-pin-4-fill:before{content:"\ef0d"}.ri-map-pin-4-line:before{content:"\ef0e"}.ri-map-pin-5-fill:before{content:"\ef0f"}.ri-map-pin-5-line:before{content:"\ef10"}.ri-map-pin-add-fill:before{content:"\ef11"}.ri-map-pin-add-line:before{content:"\ef12"}.ri-map-pin-fill:before{content:"\ef13"}.ri-map-pin-line:before{content:"\ef14"}.ri-map-pin-range-fill:before{content:"\ef15"}.ri-map-pin-range-line:before{content:"\ef16"}.ri-map-pin-time-fill:before{content:"\ef17"}.ri-map-pin-time-line:before{content:"\ef18"}.ri-map-pin-user-fill:before{content:"\ef19"}.ri-map-pin-user-line:before{content:"\ef1a"}.ri-mark-pen-fill:before{content:"\ef1b"}.ri-mark-pen-line:before{content:"\ef1c"}.ri-markdown-fill:before{content:"\ef1d"}.ri-markdown-line:before{content:"\ef1e"}.ri-markup-fill:before{content:"\ef1f"}.ri-markup-line:before{content:"\ef20"}.ri-mastercard-fill:before{content:"\ef21"}.ri-mastercard-line:before{content:"\ef22"}.ri-mastodon-fill:before{content:"\ef23"}.ri-mastodon-line:before{content:"\ef24"}.ri-medal-2-fill:before{content:"\ef25"}.ri-medal-2-line:before{content:"\ef26"}.ri-medal-fill:before{content:"\ef27"}.ri-medal-line:before{content:"\ef28"}.ri-medicine-bottle-fill:before{content:"\ef29"}.ri-medicine-bottle-line:before{content:"\ef2a"}.ri-medium-fill:before{content:"\ef2b"}.ri-medium-line:before{content:"\ef2c"}.ri-men-fill:before{content:"\ef2d"}.ri-men-line:before{content:"\ef2e"}.ri-mental-health-fill:before{content:"\ef2f"}.ri-mental-health-line:before{content:"\ef30"}.ri-menu-2-fill:before{content:"\ef31"}.ri-menu-2-line:before{content:"\ef32"}.ri-menu-3-fill:before{content:"\ef33"}.ri-menu-3-line:before{content:"\ef34"}.ri-menu-4-fill:before{content:"\ef35"}.ri-menu-4-line:before{content:"\ef36"}.ri-menu-5-fill:before{content:"\ef37"}.ri-menu-5-line:before{content:"\ef38"}.ri-menu-add-fill:before{content:"\ef39"}.ri-menu-add-line:before{content:"\ef3a"}.ri-menu-fill:before{content:"\ef3b"}.ri-menu-fold-fill:before{content:"\ef3c"}.ri-menu-fold-line:before{content:"\ef3d"}.ri-menu-line:before{content:"\ef3e"}.ri-menu-unfold-fill:before{content:"\ef3f"}.ri-menu-unfold-line:before{content:"\ef40"}.ri-merge-cells-horizontal:before{content:"\ef41"}.ri-merge-cells-vertical:before{content:"\ef42"}.ri-message-2-fill:before{content:"\ef43"}.ri-message-2-line:before{content:"\ef44"}.ri-message-3-fill:before{content:"\ef45"}.ri-message-3-line:before{content:"\ef46"}.ri-message-fill:before{content:"\ef47"}.ri-message-line:before{content:"\ef48"}.ri-messenger-fill:before{content:"\ef49"}.ri-messenger-line:before{content:"\ef4a"}.ri-meteor-fill:before{content:"\ef4b"}.ri-meteor-line:before{content:"\ef4c"}.ri-mic-2-fill:before{content:"\ef4d"}.ri-mic-2-line:before{content:"\ef4e"}.ri-mic-fill:before{content:"\ef4f"}.ri-mic-line:before{content:"\ef50"}.ri-mic-off-fill:before{content:"\ef51"}.ri-mic-off-line:before{content:"\ef52"}.ri-mickey-fill:before{content:"\ef53"}.ri-mickey-line:before{content:"\ef54"}.ri-microscope-fill:before{content:"\ef55"}.ri-microscope-line:before{content:"\ef56"}.ri-microsoft-fill:before{content:"\ef57"}.ri-microsoft-line:before{content:"\ef58"}.ri-mind-map:before{content:"\ef59"}.ri-mini-program-fill:before{content:"\ef5a"}.ri-mini-program-line:before{content:"\ef5b"}.ri-mist-fill:before{content:"\ef5c"}.ri-mist-line:before{content:"\ef5d"}.ri-money-cny-box-fill:before{content:"\ef5e"}.ri-money-cny-box-line:before{content:"\ef5f"}.ri-money-cny-circle-fill:before{content:"\ef60"}.ri-money-cny-circle-line:before{content:"\ef61"}.ri-money-dollar-box-fill:before{content:"\ef62"}.ri-money-dollar-box-line:before{content:"\ef63"}.ri-money-dollar-circle-fill:before{content:"\ef64"}.ri-money-dollar-circle-line:before{content:"\ef65"}.ri-money-euro-box-fill:before{content:"\ef66"}.ri-money-euro-box-line:before{content:"\ef67"}.ri-money-euro-circle-fill:before{content:"\ef68"}.ri-money-euro-circle-line:before{content:"\ef69"}.ri-money-pound-box-fill:before{content:"\ef6a"}.ri-money-pound-box-line:before{content:"\ef6b"}.ri-money-pound-circle-fill:before{content:"\ef6c"}.ri-money-pound-circle-line:before{content:"\ef6d"}.ri-moon-clear-fill:before{content:"\ef6e"}.ri-moon-clear-line:before{content:"\ef6f"}.ri-moon-cloudy-fill:before{content:"\ef70"}.ri-moon-cloudy-line:before{content:"\ef71"}.ri-moon-fill:before{content:"\ef72"}.ri-moon-foggy-fill:before{content:"\ef73"}.ri-moon-foggy-line:before{content:"\ef74"}.ri-moon-line:before{content:"\ef75"}.ri-more-2-fill:before{content:"\ef76"}.ri-more-2-line:before{content:"\ef77"}.ri-more-fill:before{content:"\ef78"}.ri-more-line:before{content:"\ef79"}.ri-motorbike-fill:before{content:"\ef7a"}.ri-motorbike-line:before{content:"\ef7b"}.ri-mouse-fill:before{content:"\ef7c"}.ri-mouse-line:before{content:"\ef7d"}.ri-movie-2-fill:before{content:"\ef7e"}.ri-movie-2-line:before{content:"\ef7f"}.ri-movie-fill:before{content:"\ef80"}.ri-movie-line:before{content:"\ef81"}.ri-music-2-fill:before{content:"\ef82"}.ri-music-2-line:before{content:"\ef83"}.ri-music-fill:before{content:"\ef84"}.ri-music-line:before{content:"\ef85"}.ri-mv-fill:before{content:"\ef86"}.ri-mv-line:before{content:"\ef87"}.ri-navigation-fill:before{content:"\ef88"}.ri-navigation-line:before{content:"\ef89"}.ri-netease-cloud-music-fill:before{content:"\ef8a"}.ri-netease-cloud-music-line:before{content:"\ef8b"}.ri-netflix-fill:before{content:"\ef8c"}.ri-netflix-line:before{content:"\ef8d"}.ri-newspaper-fill:before{content:"\ef8e"}.ri-newspaper-line:before{content:"\ef8f"}.ri-node-tree:before{content:"\ef90"}.ri-notification-2-fill:before{content:"\ef91"}.ri-notification-2-line:before{content:"\ef92"}.ri-notification-3-fill:before{content:"\ef93"}.ri-notification-3-line:before{content:"\ef94"}.ri-notification-4-fill:before{content:"\ef95"}.ri-notification-4-line:before{content:"\ef96"}.ri-notification-badge-fill:before{content:"\ef97"}.ri-notification-badge-line:before{content:"\ef98"}.ri-notification-fill:before{content:"\ef99"}.ri-notification-line:before{content:"\ef9a"}.ri-notification-off-fill:before{content:"\ef9b"}.ri-notification-off-line:before{content:"\ef9c"}.ri-npmjs-fill:before{content:"\ef9d"}.ri-npmjs-line:before{content:"\ef9e"}.ri-number-0:before{content:"\ef9f"}.ri-number-1:before{content:"\efa0"}.ri-number-2:before{content:"\efa1"}.ri-number-3:before{content:"\efa2"}.ri-number-4:before{content:"\efa3"}.ri-number-5:before{content:"\efa4"}.ri-number-6:before{content:"\efa5"}.ri-number-7:before{content:"\efa6"}.ri-number-8:before{content:"\efa7"}.ri-number-9:before{content:"\efa8"}.ri-numbers-fill:before{content:"\efa9"}.ri-numbers-line:before{content:"\efaa"}.ri-nurse-fill:before{content:"\efab"}.ri-nurse-line:before{content:"\efac"}.ri-oil-fill:before{content:"\efad"}.ri-oil-line:before{content:"\efae"}.ri-omega:before{content:"\efaf"}.ri-open-arm-fill:before{content:"\efb0"}.ri-open-arm-line:before{content:"\efb1"}.ri-open-source-fill:before{content:"\efb2"}.ri-open-source-line:before{content:"\efb3"}.ri-opera-fill:before{content:"\efb4"}.ri-opera-line:before{content:"\efb5"}.ri-order-play-fill:before{content:"\efb6"}.ri-order-play-line:before{content:"\efb7"}.ri-organization-chart:before{content:"\efb8"}.ri-outlet-2-fill:before{content:"\efb9"}.ri-outlet-2-line:before{content:"\efba"}.ri-outlet-fill:before{content:"\efbb"}.ri-outlet-line:before{content:"\efbc"}.ri-page-separator:before{content:"\efbd"}.ri-pages-fill:before{content:"\efbe"}.ri-pages-line:before{content:"\efbf"}.ri-paint-brush-fill:before{content:"\efc0"}.ri-paint-brush-line:before{content:"\efc1"}.ri-paint-fill:before{content:"\efc2"}.ri-paint-line:before{content:"\efc3"}.ri-palette-fill:before{content:"\efc4"}.ri-palette-line:before{content:"\efc5"}.ri-pantone-fill:before{content:"\efc6"}.ri-pantone-line:before{content:"\efc7"}.ri-paragraph:before{content:"\efc8"}.ri-parent-fill:before{content:"\efc9"}.ri-parent-line:before{content:"\efca"}.ri-parentheses-fill:before{content:"\efcb"}.ri-parentheses-line:before{content:"\efcc"}.ri-parking-box-fill:before{content:"\efcd"}.ri-parking-box-line:before{content:"\efce"}.ri-parking-fill:before{content:"\efcf"}.ri-parking-line:before{content:"\efd0"}.ri-passport-fill:before{content:"\efd1"}.ri-passport-line:before{content:"\efd2"}.ri-patreon-fill:before{content:"\efd3"}.ri-patreon-line:before{content:"\efd4"}.ri-pause-circle-fill:before{content:"\efd5"}.ri-pause-circle-line:before{content:"\efd6"}.ri-pause-fill:before{content:"\efd7"}.ri-pause-line:before{content:"\efd8"}.ri-pause-mini-fill:before{content:"\efd9"}.ri-pause-mini-line:before{content:"\efda"}.ri-paypal-fill:before{content:"\efdb"}.ri-paypal-line:before{content:"\efdc"}.ri-pen-nib-fill:before{content:"\efdd"}.ri-pen-nib-line:before{content:"\efde"}.ri-pencil-fill:before{content:"\efdf"}.ri-pencil-line:before{content:"\efe0"}.ri-pencil-ruler-2-fill:before{content:"\efe1"}.ri-pencil-ruler-2-line:before{content:"\efe2"}.ri-pencil-ruler-fill:before{content:"\efe3"}.ri-pencil-ruler-line:before{content:"\efe4"}.ri-percent-fill:before{content:"\efe5"}.ri-percent-line:before{content:"\efe6"}.ri-phone-camera-fill:before{content:"\efe7"}.ri-phone-camera-line:before{content:"\efe8"}.ri-phone-fill:before{content:"\efe9"}.ri-phone-find-fill:before{content:"\efea"}.ri-phone-find-line:before{content:"\efeb"}.ri-phone-line:before{content:"\efec"}.ri-phone-lock-fill:before{content:"\efed"}.ri-phone-lock-line:before{content:"\efee"}.ri-picture-in-picture-2-fill:before{content:"\efef"}.ri-picture-in-picture-2-line:before{content:"\eff0"}.ri-picture-in-picture-exit-fill:before{content:"\eff1"}.ri-picture-in-picture-exit-line:before{content:"\eff2"}.ri-picture-in-picture-fill:before{content:"\eff3"}.ri-picture-in-picture-line:before{content:"\eff4"}.ri-pie-chart-2-fill:before{content:"\eff5"}.ri-pie-chart-2-line:before{content:"\eff6"}.ri-pie-chart-box-fill:before{content:"\eff7"}.ri-pie-chart-box-line:before{content:"\eff8"}.ri-pie-chart-fill:before{content:"\eff9"}.ri-pie-chart-line:before{content:"\effa"}.ri-pin-distance-fill:before{content:"\effb"}.ri-pin-distance-line:before{content:"\effc"}.ri-ping-pong-fill:before{content:"\effd"}.ri-ping-pong-line:before{content:"\effe"}.ri-pinterest-fill:before{content:"\efff"}.ri-pinterest-line:before{content:"\f000"}.ri-pinyin-input:before{content:"\f001"}.ri-pixelfed-fill:before{content:"\f002"}.ri-pixelfed-line:before{content:"\f003"}.ri-plane-fill:before{content:"\f004"}.ri-plane-line:before{content:"\f005"}.ri-plant-fill:before{content:"\f006"}.ri-plant-line:before{content:"\f007"}.ri-play-circle-fill:before{content:"\f008"}.ri-play-circle-line:before{content:"\f009"}.ri-play-fill:before{content:"\f00a"}.ri-play-line:before{content:"\f00b"}.ri-play-list-2-fill:before{content:"\f00c"}.ri-play-list-2-line:before{content:"\f00d"}.ri-play-list-add-fill:before{content:"\f00e"}.ri-play-list-add-line:before{content:"\f00f"}.ri-play-list-fill:before{content:"\f010"}.ri-play-list-line:before{content:"\f011"}.ri-play-mini-fill:before{content:"\f012"}.ri-play-mini-line:before{content:"\f013"}.ri-playstation-fill:before{content:"\f014"}.ri-playstation-line:before{content:"\f015"}.ri-plug-2-fill:before{content:"\f016"}.ri-plug-2-line:before{content:"\f017"}.ri-plug-fill:before{content:"\f018"}.ri-plug-line:before{content:"\f019"}.ri-polaroid-2-fill:before{content:"\f01a"}.ri-polaroid-2-line:before{content:"\f01b"}.ri-polaroid-fill:before{content:"\f01c"}.ri-polaroid-line:before{content:"\f01d"}.ri-police-car-fill:before{content:"\f01e"}.ri-police-car-line:before{content:"\f01f"}.ri-price-tag-2-fill:before{content:"\f020"}.ri-price-tag-2-line:before{content:"\f021"}.ri-price-tag-3-fill:before{content:"\f022"}.ri-price-tag-3-line:before{content:"\f023"}.ri-price-tag-fill:before{content:"\f024"}.ri-price-tag-line:before{content:"\f025"}.ri-printer-cloud-fill:before{content:"\f026"}.ri-printer-cloud-line:before{content:"\f027"}.ri-printer-fill:before{content:"\f028"}.ri-printer-line:before{content:"\f029"}.ri-product-hunt-fill:before{content:"\f02a"}.ri-product-hunt-line:before{content:"\f02b"}.ri-profile-fill:before{content:"\f02c"}.ri-profile-line:before{content:"\f02d"}.ri-projector-2-fill:before{content:"\f02e"}.ri-projector-2-line:before{content:"\f02f"}.ri-projector-fill:before{content:"\f030"}.ri-projector-line:before{content:"\f031"}.ri-psychotherapy-fill:before{content:"\f032"}.ri-psychotherapy-line:before{content:"\f033"}.ri-pulse-fill:before{content:"\f034"}.ri-pulse-line:before{content:"\f035"}.ri-pushpin-2-fill:before{content:"\f036"}.ri-pushpin-2-line:before{content:"\f037"}.ri-pushpin-fill:before{content:"\f038"}.ri-pushpin-line:before{content:"\f039"}.ri-qq-fill:before{content:"\f03a"}.ri-qq-line:before{content:"\f03b"}.ri-qr-code-fill:before{content:"\f03c"}.ri-qr-code-line:before{content:"\f03d"}.ri-qr-scan-2-fill:before{content:"\f03e"}.ri-qr-scan-2-line:before{content:"\f03f"}.ri-qr-scan-fill:before{content:"\f040"}.ri-qr-scan-line:before{content:"\f041"}.ri-question-answer-fill:before{content:"\f042"}.ri-question-answer-line:before{content:"\f043"}.ri-question-fill:before{content:"\f044"}.ri-question-line:before{content:"\f045"}.ri-question-mark:before{content:"\f046"}.ri-questionnaire-fill:before{content:"\f047"}.ri-questionnaire-line:before{content:"\f048"}.ri-quill-pen-fill:before{content:"\f049"}.ri-quill-pen-line:before{content:"\f04a"}.ri-radar-fill:before{content:"\f04b"}.ri-radar-line:before{content:"\f04c"}.ri-radio-2-fill:before{content:"\f04d"}.ri-radio-2-line:before{content:"\f04e"}.ri-radio-button-fill:before{content:"\f04f"}.ri-radio-button-line:before{content:"\f050"}.ri-radio-fill:before{content:"\f051"}.ri-radio-line:before{content:"\f052"}.ri-rainbow-fill:before{content:"\f053"}.ri-rainbow-line:before{content:"\f054"}.ri-rainy-fill:before{content:"\f055"}.ri-rainy-line:before{content:"\f056"}.ri-reactjs-fill:before{content:"\f057"}.ri-reactjs-line:before{content:"\f058"}.ri-record-circle-fill:before{content:"\f059"}.ri-record-circle-line:before{content:"\f05a"}.ri-record-mail-fill:before{content:"\f05b"}.ri-record-mail-line:before{content:"\f05c"}.ri-recycle-fill:before{content:"\f05d"}.ri-recycle-line:before{content:"\f05e"}.ri-red-packet-fill:before{content:"\f05f"}.ri-red-packet-line:before{content:"\f060"}.ri-reddit-fill:before{content:"\f061"}.ri-reddit-line:before{content:"\f062"}.ri-refresh-fill:before{content:"\f063"}.ri-refresh-line:before{content:"\f064"}.ri-refund-2-fill:before{content:"\f065"}.ri-refund-2-line:before{content:"\f066"}.ri-refund-fill:before{content:"\f067"}.ri-refund-line:before{content:"\f068"}.ri-registered-fill:before{content:"\f069"}.ri-registered-line:before{content:"\f06a"}.ri-remixicon-fill:before{content:"\f06b"}.ri-remixicon-line:before{content:"\f06c"}.ri-remote-control-2-fill:before{content:"\f06d"}.ri-remote-control-2-line:before{content:"\f06e"}.ri-remote-control-fill:before{content:"\f06f"}.ri-remote-control-line:before{content:"\f070"}.ri-repeat-2-fill:before{content:"\f071"}.ri-repeat-2-line:before{content:"\f072"}.ri-repeat-fill:before{content:"\f073"}.ri-repeat-line:before{content:"\f074"}.ri-repeat-one-fill:before{content:"\f075"}.ri-repeat-one-line:before{content:"\f076"}.ri-reply-all-fill:before{content:"\f077"}.ri-reply-all-line:before{content:"\f078"}.ri-reply-fill:before{content:"\f079"}.ri-reply-line:before{content:"\f07a"}.ri-reserved-fill:before{content:"\f07b"}.ri-reserved-line:before{content:"\f07c"}.ri-rest-time-fill:before{content:"\f07d"}.ri-rest-time-line:before{content:"\f07e"}.ri-restart-fill:before{content:"\f07f"}.ri-restart-line:before{content:"\f080"}.ri-restaurant-2-fill:before{content:"\f081"}.ri-restaurant-2-line:before{content:"\f082"}.ri-restaurant-fill:before{content:"\f083"}.ri-restaurant-line:before{content:"\f084"}.ri-rewind-fill:before{content:"\f085"}.ri-rewind-line:before{content:"\f086"}.ri-rewind-mini-fill:before{content:"\f087"}.ri-rewind-mini-line:before{content:"\f088"}.ri-rhythm-fill:before{content:"\f089"}.ri-rhythm-line:before{content:"\f08a"}.ri-riding-fill:before{content:"\f08b"}.ri-riding-line:before{content:"\f08c"}.ri-road-map-fill:before{content:"\f08d"}.ri-road-map-line:before{content:"\f08e"}.ri-roadster-fill:before{content:"\f08f"}.ri-roadster-line:before{content:"\f090"}.ri-robot-fill:before{content:"\f091"}.ri-robot-line:before{content:"\f092"}.ri-rocket-2-fill:before{content:"\f093"}.ri-rocket-2-line:before{content:"\f094"}.ri-rocket-fill:before{content:"\f095"}.ri-rocket-line:before{content:"\f096"}.ri-rotate-lock-fill:before{content:"\f097"}.ri-rotate-lock-line:before{content:"\f098"}.ri-rounded-corner:before{content:"\f099"}.ri-route-fill:before{content:"\f09a"}.ri-route-line:before{content:"\f09b"}.ri-router-fill:before{content:"\f09c"}.ri-router-line:before{content:"\f09d"}.ri-rss-fill:before{content:"\f09e"}.ri-rss-line:before{content:"\f09f"}.ri-ruler-2-fill:before{content:"\f0a0"}.ri-ruler-2-line:before{content:"\f0a1"}.ri-ruler-fill:before{content:"\f0a2"}.ri-ruler-line:before{content:"\f0a3"}.ri-run-fill:before{content:"\f0a4"}.ri-run-line:before{content:"\f0a5"}.ri-safari-fill:before{content:"\f0a6"}.ri-safari-line:before{content:"\f0a7"}.ri-safe-2-fill:before{content:"\f0a8"}.ri-safe-2-line:before{content:"\f0a9"}.ri-safe-fill:before{content:"\f0aa"}.ri-safe-line:before{content:"\f0ab"}.ri-sailboat-fill:before{content:"\f0ac"}.ri-sailboat-line:before{content:"\f0ad"}.ri-save-2-fill:before{content:"\f0ae"}.ri-save-2-line:before{content:"\f0af"}.ri-save-3-fill:before{content:"\f0b0"}.ri-save-3-line:before{content:"\f0b1"}.ri-save-fill:before{content:"\f0b2"}.ri-save-line:before{content:"\f0b3"}.ri-scales-2-fill:before{content:"\f0b4"}.ri-scales-2-line:before{content:"\f0b5"}.ri-scales-3-fill:before{content:"\f0b6"}.ri-scales-3-line:before{content:"\f0b7"}.ri-scales-fill:before{content:"\f0b8"}.ri-scales-line:before{content:"\f0b9"}.ri-scan-2-fill:before{content:"\f0ba"}.ri-scan-2-line:before{content:"\f0bb"}.ri-scan-fill:before{content:"\f0bc"}.ri-scan-line:before{content:"\f0bd"}.ri-scissors-2-fill:before{content:"\f0be"}.ri-scissors-2-line:before{content:"\f0bf"}.ri-scissors-cut-fill:before{content:"\f0c0"}.ri-scissors-cut-line:before{content:"\f0c1"}.ri-scissors-fill:before{content:"\f0c2"}.ri-scissors-line:before{content:"\f0c3"}.ri-screenshot-2-fill:before{content:"\f0c4"}.ri-screenshot-2-line:before{content:"\f0c5"}.ri-screenshot-fill:before{content:"\f0c6"}.ri-screenshot-line:before{content:"\f0c7"}.ri-sd-card-fill:before{content:"\f0c8"}.ri-sd-card-line:before{content:"\f0c9"}.ri-sd-card-mini-fill:before{content:"\f0ca"}.ri-sd-card-mini-line:before{content:"\f0cb"}.ri-search-2-fill:before{content:"\f0cc"}.ri-search-2-line:before{content:"\f0cd"}.ri-search-eye-fill:before{content:"\f0ce"}.ri-search-eye-line:before{content:"\f0cf"}.ri-search-fill:before{content:"\f0d0"}.ri-search-line:before{content:"\f0d1"}.ri-secure-payment-fill:before{content:"\f0d2"}.ri-secure-payment-line:before{content:"\f0d3"}.ri-seedling-fill:before{content:"\f0d4"}.ri-seedling-line:before{content:"\f0d5"}.ri-send-backward:before{content:"\f0d6"}.ri-send-plane-2-fill:before{content:"\f0d7"}.ri-send-plane-2-line:before{content:"\f0d8"}.ri-send-plane-fill:before{content:"\f0d9"}.ri-send-plane-line:before{content:"\f0da"}.ri-send-to-back:before{content:"\f0db"}.ri-sensor-fill:before{content:"\f0dc"}.ri-sensor-line:before{content:"\f0dd"}.ri-separator:before{content:"\f0de"}.ri-server-fill:before{content:"\f0df"}.ri-server-line:before{content:"\f0e0"}.ri-service-fill:before{content:"\f0e1"}.ri-service-line:before{content:"\f0e2"}.ri-settings-2-fill:before{content:"\f0e3"}.ri-settings-2-line:before{content:"\f0e4"}.ri-settings-3-fill:before{content:"\f0e5"}.ri-settings-3-line:before{content:"\f0e6"}.ri-settings-4-fill:before{content:"\f0e7"}.ri-settings-4-line:before{content:"\f0e8"}.ri-settings-5-fill:before{content:"\f0e9"}.ri-settings-5-line:before{content:"\f0ea"}.ri-settings-6-fill:before{content:"\f0eb"}.ri-settings-6-line:before{content:"\f0ec"}.ri-settings-fill:before{content:"\f0ed"}.ri-settings-line:before{content:"\f0ee"}.ri-shape-2-fill:before{content:"\f0ef"}.ri-shape-2-line:before{content:"\f0f0"}.ri-shape-fill:before{content:"\f0f1"}.ri-shape-line:before{content:"\f0f2"}.ri-share-box-fill:before{content:"\f0f3"}.ri-share-box-line:before{content:"\f0f4"}.ri-share-circle-fill:before{content:"\f0f5"}.ri-share-circle-line:before{content:"\f0f6"}.ri-share-fill:before{content:"\f0f7"}.ri-share-forward-2-fill:before{content:"\f0f8"}.ri-share-forward-2-line:before{content:"\f0f9"}.ri-share-forward-box-fill:before{content:"\f0fa"}.ri-share-forward-box-line:before{content:"\f0fb"}.ri-share-forward-fill:before{content:"\f0fc"}.ri-share-forward-line:before{content:"\f0fd"}.ri-share-line:before{content:"\f0fe"}.ri-shield-check-fill:before{content:"\f0ff"}.ri-shield-check-line:before{content:"\f100"}.ri-shield-cross-fill:before{content:"\f101"}.ri-shield-cross-line:before{content:"\f102"}.ri-shield-fill:before{content:"\f103"}.ri-shield-flash-fill:before{content:"\f104"}.ri-shield-flash-line:before{content:"\f105"}.ri-shield-keyhole-fill:before{content:"\f106"}.ri-shield-keyhole-line:before{content:"\f107"}.ri-shield-line:before{content:"\f108"}.ri-shield-star-fill:before{content:"\f109"}.ri-shield-star-line:before{content:"\f10a"}.ri-shield-user-fill:before{content:"\f10b"}.ri-shield-user-line:before{content:"\f10c"}.ri-ship-2-fill:before{content:"\f10d"}.ri-ship-2-line:before{content:"\f10e"}.ri-ship-fill:before{content:"\f10f"}.ri-ship-line:before{content:"\f110"}.ri-shirt-fill:before{content:"\f111"}.ri-shirt-line:before{content:"\f112"}.ri-shopping-bag-2-fill:before{content:"\f113"}.ri-shopping-bag-2-line:before{content:"\f114"}.ri-shopping-bag-3-fill:before{content:"\f115"}.ri-shopping-bag-3-line:before{content:"\f116"}.ri-shopping-bag-fill:before{content:"\f117"}.ri-shopping-bag-line:before{content:"\f118"}.ri-shopping-basket-2-fill:before{content:"\f119"}.ri-shopping-basket-2-line:before{content:"\f11a"}.ri-shopping-basket-fill:before{content:"\f11b"}.ri-shopping-basket-line:before{content:"\f11c"}.ri-shopping-cart-2-fill:before{content:"\f11d"}.ri-shopping-cart-2-line:before{content:"\f11e"}.ri-shopping-cart-fill:before{content:"\f11f"}.ri-shopping-cart-line:before{content:"\f120"}.ri-showers-fill:before{content:"\f121"}.ri-showers-line:before{content:"\f122"}.ri-shuffle-fill:before{content:"\f123"}.ri-shuffle-line:before{content:"\f124"}.ri-shut-down-fill:before{content:"\f125"}.ri-shut-down-line:before{content:"\f126"}.ri-side-bar-fill:before{content:"\f127"}.ri-side-bar-line:before{content:"\f128"}.ri-signal-tower-fill:before{content:"\f129"}.ri-signal-tower-line:before{content:"\f12a"}.ri-signal-wifi-1-fill:before{content:"\f12b"}.ri-signal-wifi-1-line:before{content:"\f12c"}.ri-signal-wifi-2-fill:before{content:"\f12d"}.ri-signal-wifi-2-line:before{content:"\f12e"}.ri-signal-wifi-3-fill:before{content:"\f12f"}.ri-signal-wifi-3-line:before{content:"\f130"}.ri-signal-wifi-error-fill:before{content:"\f131"}.ri-signal-wifi-error-line:before{content:"\f132"}.ri-signal-wifi-fill:before{content:"\f133"}.ri-signal-wifi-line:before{content:"\f134"}.ri-signal-wifi-off-fill:before{content:"\f135"}.ri-signal-wifi-off-line:before{content:"\f136"}.ri-sim-card-2-fill:before{content:"\f137"}.ri-sim-card-2-line:before{content:"\f138"}.ri-sim-card-fill:before{content:"\f139"}.ri-sim-card-line:before{content:"\f13a"}.ri-single-quotes-l:before{content:"\f13b"}.ri-single-quotes-r:before{content:"\f13c"}.ri-sip-fill:before{content:"\f13d"}.ri-sip-line:before{content:"\f13e"}.ri-skip-back-fill:before{content:"\f13f"}.ri-skip-back-line:before{content:"\f140"}.ri-skip-back-mini-fill:before{content:"\f141"}.ri-skip-back-mini-line:before{content:"\f142"}.ri-skip-forward-fill:before{content:"\f143"}.ri-skip-forward-line:before{content:"\f144"}.ri-skip-forward-mini-fill:before{content:"\f145"}.ri-skip-forward-mini-line:before{content:"\f146"}.ri-skull-2-fill:before{content:"\f147"}.ri-skull-2-line:before{content:"\f148"}.ri-skull-fill:before{content:"\f149"}.ri-skull-line:before{content:"\f14a"}.ri-skype-fill:before{content:"\f14b"}.ri-skype-line:before{content:"\f14c"}.ri-slack-fill:before{content:"\f14d"}.ri-slack-line:before{content:"\f14e"}.ri-slice-fill:before{content:"\f14f"}.ri-slice-line:before{content:"\f150"}.ri-slideshow-2-fill:before{content:"\f151"}.ri-slideshow-2-line:before{content:"\f152"}.ri-slideshow-3-fill:before{content:"\f153"}.ri-slideshow-3-line:before{content:"\f154"}.ri-slideshow-4-fill:before{content:"\f155"}.ri-slideshow-4-line:before{content:"\f156"}.ri-slideshow-fill:before{content:"\f157"}.ri-slideshow-line:before{content:"\f158"}.ri-smartphone-fill:before{content:"\f159"}.ri-smartphone-line:before{content:"\f15a"}.ri-snapchat-fill:before{content:"\f15b"}.ri-snapchat-line:before{content:"\f15c"}.ri-snowy-fill:before{content:"\f15d"}.ri-snowy-line:before{content:"\f15e"}.ri-sort-asc:before{content:"\f15f"}.ri-sort-desc:before{content:"\f160"}.ri-sound-module-fill:before{content:"\f161"}.ri-sound-module-line:before{content:"\f162"}.ri-soundcloud-fill:before{content:"\f163"}.ri-soundcloud-line:before{content:"\f164"}.ri-space-ship-fill:before{content:"\f165"}.ri-space-ship-line:before{content:"\f166"}.ri-space:before{content:"\f167"}.ri-spam-2-fill:before{content:"\f168"}.ri-spam-2-line:before{content:"\f169"}.ri-spam-3-fill:before{content:"\f16a"}.ri-spam-3-line:before{content:"\f16b"}.ri-spam-fill:before{content:"\f16c"}.ri-spam-line:before{content:"\f16d"}.ri-speaker-2-fill:before{content:"\f16e"}.ri-speaker-2-line:before{content:"\f16f"}.ri-speaker-3-fill:before{content:"\f170"}.ri-speaker-3-line:before{content:"\f171"}.ri-speaker-fill:before{content:"\f172"}.ri-speaker-line:before{content:"\f173"}.ri-spectrum-fill:before{content:"\f174"}.ri-spectrum-line:before{content:"\f175"}.ri-speed-fill:before{content:"\f176"}.ri-speed-line:before{content:"\f177"}.ri-speed-mini-fill:before{content:"\f178"}.ri-speed-mini-line:before{content:"\f179"}.ri-split-cells-horizontal:before{content:"\f17a"}.ri-split-cells-vertical:before{content:"\f17b"}.ri-spotify-fill:before{content:"\f17c"}.ri-spotify-line:before{content:"\f17d"}.ri-spy-fill:before{content:"\f17e"}.ri-spy-line:before{content:"\f17f"}.ri-stack-fill:before{content:"\f180"}.ri-stack-line:before{content:"\f181"}.ri-stack-overflow-fill:before{content:"\f182"}.ri-stack-overflow-line:before{content:"\f183"}.ri-stackshare-fill:before{content:"\f184"}.ri-stackshare-line:before{content:"\f185"}.ri-star-fill:before{content:"\f186"}.ri-star-half-fill:before{content:"\f187"}.ri-star-half-line:before{content:"\f188"}.ri-star-half-s-fill:before{content:"\f189"}.ri-star-half-s-line:before{content:"\f18a"}.ri-star-line:before{content:"\f18b"}.ri-star-s-fill:before{content:"\f18c"}.ri-star-s-line:before{content:"\f18d"}.ri-star-smile-fill:before{content:"\f18e"}.ri-star-smile-line:before{content:"\f18f"}.ri-steam-fill:before{content:"\f190"}.ri-steam-line:before{content:"\f191"}.ri-steering-2-fill:before{content:"\f192"}.ri-steering-2-line:before{content:"\f193"}.ri-steering-fill:before{content:"\f194"}.ri-steering-line:before{content:"\f195"}.ri-stethoscope-fill:before{content:"\f196"}.ri-stethoscope-line:before{content:"\f197"}.ri-sticky-note-2-fill:before{content:"\f198"}.ri-sticky-note-2-line:before{content:"\f199"}.ri-sticky-note-fill:before{content:"\f19a"}.ri-sticky-note-line:before{content:"\f19b"}.ri-stock-fill:before{content:"\f19c"}.ri-stock-line:before{content:"\f19d"}.ri-stop-circle-fill:before{content:"\f19e"}.ri-stop-circle-line:before{content:"\f19f"}.ri-stop-fill:before{content:"\f1a0"}.ri-stop-line:before{content:"\f1a1"}.ri-stop-mini-fill:before{content:"\f1a2"}.ri-stop-mini-line:before{content:"\f1a3"}.ri-store-2-fill:before{content:"\f1a4"}.ri-store-2-line:before{content:"\f1a5"}.ri-store-3-fill:before{content:"\f1a6"}.ri-store-3-line:before{content:"\f1a7"}.ri-store-fill:before{content:"\f1a8"}.ri-store-line:before{content:"\f1a9"}.ri-strikethrough-2:before{content:"\f1aa"}.ri-strikethrough:before{content:"\f1ab"}.ri-subscript-2:before{content:"\f1ac"}.ri-subscript:before{content:"\f1ad"}.ri-subtract-fill:before{content:"\f1ae"}.ri-subtract-line:before{content:"\f1af"}.ri-subway-fill:before{content:"\f1b0"}.ri-subway-line:before{content:"\f1b1"}.ri-subway-wifi-fill:before{content:"\f1b2"}.ri-subway-wifi-line:before{content:"\f1b3"}.ri-suitcase-2-fill:before{content:"\f1b4"}.ri-suitcase-2-line:before{content:"\f1b5"}.ri-suitcase-3-fill:before{content:"\f1b6"}.ri-suitcase-3-line:before{content:"\f1b7"}.ri-suitcase-fill:before{content:"\f1b8"}.ri-suitcase-line:before{content:"\f1b9"}.ri-sun-cloudy-fill:before{content:"\f1ba"}.ri-sun-cloudy-line:before{content:"\f1bb"}.ri-sun-fill:before{content:"\f1bc"}.ri-sun-foggy-fill:before{content:"\f1bd"}.ri-sun-foggy-line:before{content:"\f1be"}.ri-sun-line:before{content:"\f1bf"}.ri-superscript-2:before{content:"\f1c0"}.ri-superscript:before{content:"\f1c1"}.ri-surgical-mask-fill:before{content:"\f1c2"}.ri-surgical-mask-line:before{content:"\f1c3"}.ri-surround-sound-fill:before{content:"\f1c4"}.ri-surround-sound-line:before{content:"\f1c5"}.ri-survey-fill:before{content:"\f1c6"}.ri-survey-line:before{content:"\f1c7"}.ri-swap-box-fill:before{content:"\f1c8"}.ri-swap-box-line:before{content:"\f1c9"}.ri-swap-fill:before{content:"\f1ca"}.ri-swap-line:before{content:"\f1cb"}.ri-switch-fill:before{content:"\f1cc"}.ri-switch-line:before{content:"\f1cd"}.ri-sword-fill:before{content:"\f1ce"}.ri-sword-line:before{content:"\f1cf"}.ri-syringe-fill:before{content:"\f1d0"}.ri-syringe-line:before{content:"\f1d1"}.ri-t-box-fill:before{content:"\f1d2"}.ri-t-box-line:before{content:"\f1d3"}.ri-t-shirt-2-fill:before{content:"\f1d4"}.ri-t-shirt-2-line:before{content:"\f1d5"}.ri-t-shirt-air-fill:before{content:"\f1d6"}.ri-t-shirt-air-line:before{content:"\f1d7"}.ri-t-shirt-fill:before{content:"\f1d8"}.ri-t-shirt-line:before{content:"\f1d9"}.ri-table-2:before{content:"\f1da"}.ri-table-alt-fill:before{content:"\f1db"}.ri-table-alt-line:before{content:"\f1dc"}.ri-table-fill:before{content:"\f1dd"}.ri-table-line:before{content:"\f1de"}.ri-tablet-fill:before{content:"\f1df"}.ri-tablet-line:before{content:"\f1e0"}.ri-takeaway-fill:before{content:"\f1e1"}.ri-takeaway-line:before{content:"\f1e2"}.ri-taobao-fill:before{content:"\f1e3"}.ri-taobao-line:before{content:"\f1e4"}.ri-tape-fill:before{content:"\f1e5"}.ri-tape-line:before{content:"\f1e6"}.ri-task-fill:before{content:"\f1e7"}.ri-task-line:before{content:"\f1e8"}.ri-taxi-fill:before{content:"\f1e9"}.ri-taxi-line:before{content:"\f1ea"}.ri-taxi-wifi-fill:before{content:"\f1eb"}.ri-taxi-wifi-line:before{content:"\f1ec"}.ri-team-fill:before{content:"\f1ed"}.ri-team-line:before{content:"\f1ee"}.ri-telegram-fill:before{content:"\f1ef"}.ri-telegram-line:before{content:"\f1f0"}.ri-temp-cold-fill:before{content:"\f1f1"}.ri-temp-cold-line:before{content:"\f1f2"}.ri-temp-hot-fill:before{content:"\f1f3"}.ri-temp-hot-line:before{content:"\f1f4"}.ri-terminal-box-fill:before{content:"\f1f5"}.ri-terminal-box-line:before{content:"\f1f6"}.ri-terminal-fill:before{content:"\f1f7"}.ri-terminal-line:before{content:"\f1f8"}.ri-terminal-window-fill:before{content:"\f1f9"}.ri-terminal-window-line:before{content:"\f1fa"}.ri-test-tube-fill:before{content:"\f1fb"}.ri-test-tube-line:before{content:"\f1fc"}.ri-text-direction-l:before{content:"\f1fd"}.ri-text-direction-r:before{content:"\f1fe"}.ri-text-spacing:before{content:"\f1ff"}.ri-text-wrap:before{content:"\f200"}.ri-text:before{content:"\f201"}.ri-thermometer-fill:before{content:"\f202"}.ri-thermometer-line:before{content:"\f203"}.ri-thumb-down-fill:before{content:"\f204"}.ri-thumb-down-line:before{content:"\f205"}.ri-thumb-up-fill:before{content:"\f206"}.ri-thumb-up-line:before{content:"\f207"}.ri-thunderstorms-fill:before{content:"\f208"}.ri-thunderstorms-line:before{content:"\f209"}.ri-ticket-2-fill:before{content:"\f20a"}.ri-ticket-2-line:before{content:"\f20b"}.ri-ticket-fill:before{content:"\f20c"}.ri-ticket-line:before{content:"\f20d"}.ri-time-fill:before{content:"\f20e"}.ri-time-line:before{content:"\f20f"}.ri-timer-2-fill:before{content:"\f210"}.ri-timer-2-line:before{content:"\f211"}.ri-timer-fill:before{content:"\f212"}.ri-timer-flash-fill:before{content:"\f213"}.ri-timer-flash-line:before{content:"\f214"}.ri-timer-line:before{content:"\f215"}.ri-todo-fill:before{content:"\f216"}.ri-todo-line:before{content:"\f217"}.ri-toggle-fill:before{content:"\f218"}.ri-toggle-line:before{content:"\f219"}.ri-tools-fill:before{content:"\f21a"}.ri-tools-line:before{content:"\f21b"}.ri-tornado-fill:before{content:"\f21c"}.ri-tornado-line:before{content:"\f21d"}.ri-trademark-fill:before{content:"\f21e"}.ri-trademark-line:before{content:"\f21f"}.ri-traffic-light-fill:before{content:"\f220"}.ri-traffic-light-line:before{content:"\f221"}.ri-train-fill:before{content:"\f222"}.ri-train-line:before{content:"\f223"}.ri-train-wifi-fill:before{content:"\f224"}.ri-train-wifi-line:before{content:"\f225"}.ri-translate-2:before{content:"\f226"}.ri-translate:before{content:"\f227"}.ri-travesti-fill:before{content:"\f228"}.ri-travesti-line:before{content:"\f229"}.ri-treasure-map-fill:before{content:"\f22a"}.ri-treasure-map-line:before{content:"\f22b"}.ri-trello-fill:before{content:"\f22c"}.ri-trello-line:before{content:"\f22d"}.ri-trophy-fill:before{content:"\f22e"}.ri-trophy-line:before{content:"\f22f"}.ri-truck-fill:before{content:"\f230"}.ri-truck-line:before{content:"\f231"}.ri-tumblr-fill:before{content:"\f232"}.ri-tumblr-line:before{content:"\f233"}.ri-tv-2-fill:before{content:"\f234"}.ri-tv-2-line:before{content:"\f235"}.ri-tv-fill:before{content:"\f236"}.ri-tv-line:before{content:"\f237"}.ri-twitch-fill:before{content:"\f238"}.ri-twitch-line:before{content:"\f239"}.ri-twitter-fill:before{content:"\f23a"}.ri-twitter-line:before{content:"\f23b"}.ri-typhoon-fill:before{content:"\f23c"}.ri-typhoon-line:before{content:"\f23d"}.ri-u-disk-fill:before{content:"\f23e"}.ri-u-disk-line:before{content:"\f23f"}.ri-ubuntu-fill:before{content:"\f240"}.ri-ubuntu-line:before{content:"\f241"}.ri-umbrella-fill:before{content:"\f242"}.ri-umbrella-line:before{content:"\f243"}.ri-underline:before{content:"\f244"}.ri-uninstall-fill:before{content:"\f245"}.ri-uninstall-line:before{content:"\f246"}.ri-unsplash-fill:before{content:"\f247"}.ri-unsplash-line:before{content:"\f248"}.ri-upload-2-fill:before{content:"\f249"}.ri-upload-2-line:before{content:"\f24a"}.ri-upload-cloud-2-fill:before{content:"\f24b"}.ri-upload-cloud-2-line:before{content:"\f24c"}.ri-upload-cloud-fill:before{content:"\f24d"}.ri-upload-cloud-line:before{content:"\f24e"}.ri-upload-fill:before{content:"\f24f"}.ri-upload-line:before{content:"\f250"}.ri-usb-fill:before{content:"\f251"}.ri-usb-line:before{content:"\f252"}.ri-user-2-fill:before{content:"\f253"}.ri-user-2-line:before{content:"\f254"}.ri-user-3-fill:before{content:"\f255"}.ri-user-3-line:before{content:"\f256"}.ri-user-4-fill:before{content:"\f257"}.ri-user-4-line:before{content:"\f258"}.ri-user-5-fill:before{content:"\f259"}.ri-user-5-line:before{content:"\f25a"}.ri-user-6-fill:before{content:"\f25b"}.ri-user-6-line:before{content:"\f25c"}.ri-user-add-fill:before{content:"\f25d"}.ri-user-add-line:before{content:"\f25e"}.ri-user-fill:before{content:"\f25f"}.ri-user-follow-fill:before{content:"\f260"}.ri-user-follow-line:before{content:"\f261"}.ri-user-heart-fill:before{content:"\f262"}.ri-user-heart-line:before{content:"\f263"}.ri-user-line:before{content:"\f264"}.ri-user-location-fill:before{content:"\f265"}.ri-user-location-line:before{content:"\f266"}.ri-user-received-2-fill:before{content:"\f267"}.ri-user-received-2-line:before{content:"\f268"}.ri-user-received-fill:before{content:"\f269"}.ri-user-received-line:before{content:"\f26a"}.ri-user-search-fill:before{content:"\f26b"}.ri-user-search-line:before{content:"\f26c"}.ri-user-settings-fill:before{content:"\f26d"}.ri-user-settings-line:before{content:"\f26e"}.ri-user-shared-2-fill:before{content:"\f26f"}.ri-user-shared-2-line:before{content:"\f270"}.ri-user-shared-fill:before{content:"\f271"}.ri-user-shared-line:before{content:"\f272"}.ri-user-smile-fill:before{content:"\f273"}.ri-user-smile-line:before{content:"\f274"}.ri-user-star-fill:before{content:"\f275"}.ri-user-star-line:before{content:"\f276"}.ri-user-unfollow-fill:before{content:"\f277"}.ri-user-unfollow-line:before{content:"\f278"}.ri-user-voice-fill:before{content:"\f279"}.ri-user-voice-line:before{content:"\f27a"}.ri-video-add-fill:before{content:"\f27b"}.ri-video-add-line:before{content:"\f27c"}.ri-video-chat-fill:before{content:"\f27d"}.ri-video-chat-line:before{content:"\f27e"}.ri-video-download-fill:before{content:"\f27f"}.ri-video-download-line:before{content:"\f280"}.ri-video-fill:before{content:"\f281"}.ri-video-line:before{content:"\f282"}.ri-video-upload-fill:before{content:"\f283"}.ri-video-upload-line:before{content:"\f284"}.ri-vidicon-2-fill:before{content:"\f285"}.ri-vidicon-2-line:before{content:"\f286"}.ri-vidicon-fill:before{content:"\f287"}.ri-vidicon-line:before{content:"\f288"}.ri-vimeo-fill:before{content:"\f289"}.ri-vimeo-line:before{content:"\f28a"}.ri-vip-crown-2-fill:before{content:"\f28b"}.ri-vip-crown-2-line:before{content:"\f28c"}.ri-vip-crown-fill:before{content:"\f28d"}.ri-vip-crown-line:before{content:"\f28e"}.ri-vip-diamond-fill:before{content:"\f28f"}.ri-vip-diamond-line:before{content:"\f290"}.ri-vip-fill:before{content:"\f291"}.ri-vip-line:before{content:"\f292"}.ri-virus-fill:before{content:"\f293"}.ri-virus-line:before{content:"\f294"}.ri-visa-fill:before{content:"\f295"}.ri-visa-line:before{content:"\f296"}.ri-voice-recognition-fill:before{content:"\f297"}.ri-voice-recognition-line:before{content:"\f298"}.ri-voiceprint-fill:before{content:"\f299"}.ri-voiceprint-line:before{content:"\f29a"}.ri-volume-down-fill:before{content:"\f29b"}.ri-volume-down-line:before{content:"\f29c"}.ri-volume-mute-fill:before{content:"\f29d"}.ri-volume-mute-line:before{content:"\f29e"}.ri-volume-off-vibrate-fill:before{content:"\f29f"}.ri-volume-off-vibrate-line:before{content:"\f2a0"}.ri-volume-up-fill:before{content:"\f2a1"}.ri-volume-up-line:before{content:"\f2a2"}.ri-volume-vibrate-fill:before{content:"\f2a3"}.ri-volume-vibrate-line:before{content:"\f2a4"}.ri-vuejs-fill:before{content:"\f2a5"}.ri-vuejs-line:before{content:"\f2a6"}.ri-walk-fill:before{content:"\f2a7"}.ri-walk-line:before{content:"\f2a8"}.ri-wallet-2-fill:before{content:"\f2a9"}.ri-wallet-2-line:before{content:"\f2aa"}.ri-wallet-3-fill:before{content:"\f2ab"}.ri-wallet-3-line:before{content:"\f2ac"}.ri-wallet-fill:before{content:"\f2ad"}.ri-wallet-line:before{content:"\f2ae"}.ri-water-flash-fill:before{content:"\f2af"}.ri-water-flash-line:before{content:"\f2b0"}.ri-webcam-fill:before{content:"\f2b1"}.ri-webcam-line:before{content:"\f2b2"}.ri-wechat-2-fill:before{content:"\f2b3"}.ri-wechat-2-line:before{content:"\f2b4"}.ri-wechat-fill:before{content:"\f2b5"}.ri-wechat-line:before{content:"\f2b6"}.ri-wechat-pay-fill:before{content:"\f2b7"}.ri-wechat-pay-line:before{content:"\f2b8"}.ri-weibo-fill:before{content:"\f2b9"}.ri-weibo-line:before{content:"\f2ba"}.ri-whatsapp-fill:before{content:"\f2bb"}.ri-whatsapp-line:before{content:"\f2bc"}.ri-wheelchair-fill:before{content:"\f2bd"}.ri-wheelchair-line:before{content:"\f2be"}.ri-wifi-fill:before{content:"\f2bf"}.ri-wifi-line:before{content:"\f2c0"}.ri-wifi-off-fill:before{content:"\f2c1"}.ri-wifi-off-line:before{content:"\f2c2"}.ri-window-2-fill:before{content:"\f2c3"}.ri-window-2-line:before{content:"\f2c4"}.ri-window-fill:before{content:"\f2c5"}.ri-window-line:before{content:"\f2c6"}.ri-windows-fill:before{content:"\f2c7"}.ri-windows-line:before{content:"\f2c8"}.ri-windy-fill:before{content:"\f2c9"}.ri-windy-line:before{content:"\f2ca"}.ri-wireless-charging-fill:before{content:"\f2cb"}.ri-wireless-charging-line:before{content:"\f2cc"}.ri-women-fill:before{content:"\f2cd"}.ri-women-line:before{content:"\f2ce"}.ri-wubi-input:before{content:"\f2cf"}.ri-xbox-fill:before{content:"\f2d0"}.ri-xbox-line:before{content:"\f2d1"}.ri-xing-fill:before{content:"\f2d2"}.ri-xing-line:before{content:"\f2d3"}.ri-youtube-fill:before{content:"\f2d4"}.ri-youtube-line:before{content:"\f2d5"}.ri-zcool-fill:before{content:"\f2d6"}.ri-zcool-line:before{content:"\f2d7"}.ri-zhihu-fill:before{content:"\f2d8"}.ri-zhihu-line:before{content:"\f2d9"}.ri-zoom-in-fill:before{content:"\f2da"}.ri-zoom-in-line:before{content:"\f2db"}.ri-zoom-out-fill:before{content:"\f2dc"}.ri-zoom-out-line:before{content:"\f2dd"}.ri-zzz-fill:before{content:"\f2de"}.ri-zzz-line:before{content:"\f2df"}@font-face{font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/js/1de15e70fec550ef4554de45895cd073.woff2) format("woff2"),url(/js/96a57080955dae1ca302c76abb8af909.woff) format("woff"),url(/js/f453c078392f0c23335ea604c6765a12.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/js/5839401331dd0fbe22436cb27c8fcb73.woff2) format("woff2"),url(/js/c6297f9142925c50bd7828b90c103526.woff) format("woff"),url(/js/ec522b9ccc3e18028de1440991b38119.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/js/f96fac9755151d0fabd8ed9abdca9521.woff2) format("woff2"),url(/js/5079e051e18b6b617208b8cb5beb1082.woff) format("woff"),url(/js/703345f865eeee24c474248079a0ba93.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/js/49cc6a3cab050d7c2ec2336cb804e1fc.woff2) format("woff2"),url(/js/0e5b99ca96d68358cdbbf0eb132e0bf3.woff) format("woff"),url(/js/459e524c11f9d9848bd73bfffdc62077.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/js/77291f2c01508dbfa5a0e8fc8de4acb6.woff2) format("woff2"),url(/js/a33d4c9142212ef3479287135a87faac.woff) format("woff"),url(/js/1b0be9b9502d481bf047c11fd3afce41.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/js/fc4e48b59849688ac61c0d6daa6c3894.woff2) format("woff2"),url(/js/e8c40ca220bf98110e3d2a9bccc040b4.woff) format("woff"),url(/js/c0ad9a0fcd3872a71585a52543d02054.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/js/7e6803e0645cc02029a2b4b9b5c12dd0.woff2) format("woff2"),url(/js/4e9fb7097be319b4a3a323dca0626460.woff) format("woff"),url(/js/8b9b3524a9cd80e00610682ca9d48b7a.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/js/83915f6ea43188e031f15a41a2a13d0e.woff2) format("woff2"),url(/js/993cef711838adabce3a8b5b1c4a1901.woff) format("woff"),url(/js/7712cfa8ed8093a0c556b7ff8abf14f9.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/js/6f4b7338e13e491465211e73cc3d9ab2.woff2) format("woff2"),url(/js/3402ceebbaf069244380e282045d5615.woff) format("woff"),url(/js/9f78515e97ad0ff068507c103e83409d.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/js/2ffefb11f0c8412c11682bd0e1413b69.woff2) format("woff2"),url(/js/1d2e94d7e1264031867f942653f8139a.woff) format("woff"),url(/js/4ad93799ba7ea7199a6f27826a40b061.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/js/f9f7662953c4ef2ee65e1f3a935f9017.woff2) format("woff2"),url(/js/23820bbae1b543ae8cb70fe44d40809f.woff) format("woff"),url(/js/ac5aad6c4efef1a3d20b75397b7e6218.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url(/js/2bd0c2b5932c7e74bc69ff108c7746e3.woff2) format("woff2"),url(/js/31faa94a6e7e3e4dc3a777c1244a3d0b.woff) format("woff"),url(/js/04adc05e48582c893f35f05dfdc35cbc.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url(/js/fd4eccab43b2f46bac37538fc682154d.woff2) format("woff2"),url(/js/374a109b61e7c419be444a6ad27c8f8c.woff) format("woff"),url(/js/775f93f04f3a0bdcfecbc62e733847f1.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url(/js/7c3661bed01acdb90f0d0d6e8c2af175.woff2) format("woff2"),url(/js/8f5c4dcd24a0f3aa86380f0b3562eccd.woff) format("woff"),url(/js/1e909f1c2ba50ad8581dc75d86559eda.ttf) format("truetype")}@font-face{font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/js/3c431f15b18a392c1711d7de01edf4f3.woff2) format("woff2"),url(/js/8cb4c7b5986d922a2dcdb6599a6106a9.woff) format("woff"),url(/js/36d2c2a98402f4c0cb1029a69f2b9806.ttf) format("truetype")}@font-face{font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/js/b3e926468f875c4b6a966d901c879696.woff2) format("woff2"),url(/js/b609c3dc1fbbb105ce2856c03d8db6e1.woff) format("woff"),url(/js/70d540a088e8e125414815b6afda0e3d.ttf) format("truetype")}@font-face{font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/js/a4aae3d505525c8eb88b9158c4649a7b.woff2) format("woff2"),url(/js/ca8ea1e72772a43ae46c4f7fb986b1fa.woff) format("woff"),url(/js/7534552259d59c1cba3e86a3c774b8e8.ttf) format("truetype")}@font-face{font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(/js/08fca0137fd475f7852ab73e275e2208.woff2) format("woff2"),url(/js/cddcf234909da33bbfc0c37ecd11f60f.woff) format("woff"),url(/js/c7977d0148e0d53d73a8adda49f2fd8e.ttf) format("truetype")}@font-face{font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/js/1b0cff973201019de91c24530ab219c3.woff2) format("woff2"),url(/js/e84eaeda24afadafd7b6e246209d7a05.woff) format("woff"),url(/js/f93eac2f0543333d30a6abf9262ec864.ttf) format("truetype")}@font-face{font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/js/209b10f4e35040ca859c96177c458cc6.woff2) format("woff2"),url(/js/b6a56b14d09ea3eb5f01e0bbd2b20101.woff) format("woff"),url(/js/834915271cbece10d426ea41e479cfff.ttf) format("truetype")}.katex{font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.13.2"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.27777778em;margin-right:-.55555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.83333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.71428571em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.85714286em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14285714em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571429em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857143em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71428571em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714286em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857143em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96285714em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55428571em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.55555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.66666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.77777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.88888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.41666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.58333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.66666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.83333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.34722222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.41666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.48611111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.55555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.69444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.83333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44027778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.28935185em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.34722222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.40509259em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.46296296em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.52083333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.69444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.83333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023148em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981481em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108004em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.28929605em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.33751205em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.38572806em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.43394407em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216008em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.57859209em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.69431051em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.83317261em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961427em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.20096463em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.24115756em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.28135048em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.32154341em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.36173633em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.40192926em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.48231511em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.57877814em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.69453376em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.83360129em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-content;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:400;src:url(/js/54de81abbcf869efd1dc2b595a68fe7e.woff2) format("woff2"),url(/js/10f84849b8a69b4844b2925080f81a97.woff) format("woff");unicode-range:U+0460-052f,U+1c80-1c88,U+20b4,U+2de0-2dff,U+a640-a69f,U+fe2e-fe2f}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:400;src:url(/js/3164eabdbb931859ae7ca8ca62a3c332.woff2) format("woff2"),url(/js/10f84849b8a69b4844b2925080f81a97.woff) format("woff");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:400;src:url(/js/c2a24f65668ba8f3fdf78ce8e467889e.woff2) format("woff2"),url(/js/10f84849b8a69b4844b2925080f81a97.woff) format("woff");unicode-range:U+1f??}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:400;src:url(/js/75a1d3c8eb035b420ce68a0c44757916.woff2) format("woff2"),url(/js/10f84849b8a69b4844b2925080f81a97.woff) format("woff");unicode-range:U+0370-03ff}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:400;src:url(/js/c15997f1d022aff0bd008085732b8d87.woff2) format("woff2"),url(/js/10f84849b8a69b4844b2925080f81a97.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01a0-01a1,U+01af-01b0,U+1ea0-1ef9,U+20ab}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:400;src:url(/js/29df4aa934ecc94620708eea295782a5.woff2) format("woff2"),url(/js/10f84849b8a69b4844b2925080f81a97.woff) format("woff");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:400;src:url(/js/a05a0d687a088c4efed303a504befad7.woff2) format("woff2"),url(/js/10f84849b8a69b4844b2925080f81a97.woff) format("woff");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:500;src:url(/js/54de81abbcf869efd1dc2b595a68fe7e.woff2) format("woff2"),url(/js/5431f9f71fc665274a10721c239cd333.woff) format("woff");unicode-range:U+0460-052f,U+1c80-1c88,U+20b4,U+2de0-2dff,U+a640-a69f,U+fe2e-fe2f}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:500;src:url(/js/3164eabdbb931859ae7ca8ca62a3c332.woff2) format("woff2"),url(/js/5431f9f71fc665274a10721c239cd333.woff) format("woff");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:500;src:url(/js/c2a24f65668ba8f3fdf78ce8e467889e.woff2) format("woff2"),url(/js/5431f9f71fc665274a10721c239cd333.woff) format("woff");unicode-range:U+1f??}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:500;src:url(/js/75a1d3c8eb035b420ce68a0c44757916.woff2) format("woff2"),url(/js/5431f9f71fc665274a10721c239cd333.woff) format("woff");unicode-range:U+0370-03ff}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:500;src:url(/js/c15997f1d022aff0bd008085732b8d87.woff2) format("woff2"),url(/js/5431f9f71fc665274a10721c239cd333.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01a0-01a1,U+01af-01b0,U+1ea0-1ef9,U+20ab}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:500;src:url(/js/29df4aa934ecc94620708eea295782a5.woff2) format("woff2"),url(/js/5431f9f71fc665274a10721c239cd333.woff) format("woff");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:500;src:url(/js/a05a0d687a088c4efed303a504befad7.woff2) format("woff2"),url(/js/5431f9f71fc665274a10721c239cd333.woff) format("woff");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:600;src:url(/js/54de81abbcf869efd1dc2b595a68fe7e.woff2) format("woff2"),url(/js/016b603e010d5dcae8ea8fa4aa580228.woff) format("woff");unicode-range:U+0460-052f,U+1c80-1c88,U+20b4,U+2de0-2dff,U+a640-a69f,U+fe2e-fe2f}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:600;src:url(/js/3164eabdbb931859ae7ca8ca62a3c332.woff2) format("woff2"),url(/js/016b603e010d5dcae8ea8fa4aa580228.woff) format("woff");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:600;src:url(/js/c2a24f65668ba8f3fdf78ce8e467889e.woff2) format("woff2"),url(/js/016b603e010d5dcae8ea8fa4aa580228.woff) format("woff");unicode-range:U+1f??}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:600;src:url(/js/75a1d3c8eb035b420ce68a0c44757916.woff2) format("woff2"),url(/js/016b603e010d5dcae8ea8fa4aa580228.woff) format("woff");unicode-range:U+0370-03ff}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:600;src:url(/js/c15997f1d022aff0bd008085732b8d87.woff2) format("woff2"),url(/js/016b603e010d5dcae8ea8fa4aa580228.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01a0-01a1,U+01af-01b0,U+1ea0-1ef9,U+20ab}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:600;src:url(/js/29df4aa934ecc94620708eea295782a5.woff2) format("woff2"),url(/js/016b603e010d5dcae8ea8fa4aa580228.woff) format("woff");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:600;src:url(/js/a05a0d687a088c4efed303a504befad7.woff2) format("woff2"),url(/js/016b603e010d5dcae8ea8fa4aa580228.woff) format("woff");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:JetBrains Mono;font-style:normal;font-weight:400;src:url(/js/953c8aeb6c2394cec010f8daa27c3fa2.woff2) format("woff2"),url(/js/8e08cd86133caec43c49a139a36424e8.woff) format("woff");unicode-range:U+0460-052f,U+1c80-1c88,U+20b4,U+2de0-2dff,U+a640-a69f,U+fe2e-fe2f}@font-face{font-display:swap;font-family:JetBrains Mono;font-style:normal;font-weight:400;src:url(/js/47bb5e1a429a97dcc3b35e434386f912.woff2) format("woff2"),url(/js/8e08cd86133caec43c49a139a36424e8.woff) format("woff");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:JetBrains Mono;font-style:normal;font-weight:400;src:url(/js/663c2351f9f20696b3a4cee9f20832f3.woff2) format("woff2"),url(/js/8e08cd86133caec43c49a139a36424e8.woff) format("woff");unicode-range:U+0370-03ff}@font-face{font-display:swap;font-family:JetBrains Mono;font-style:normal;font-weight:400;src:url(/js/1b95ebd96a4c3e90b1b08bd187f056b0.woff2) format("woff2"),url(/js/8e08cd86133caec43c49a139a36424e8.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01a0-01a1,U+01af-01b0,U+1ea0-1ef9,U+20ab}@font-face{font-display:swap;font-family:JetBrains Mono;font-style:normal;font-weight:400;src:url(/js/913520c3f0ae87c1d9aa23fc52b8c0b0.woff2) format("woff2"),url(/js/8e08cd86133caec43c49a139a36424e8.woff) format("woff");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:JetBrains Mono;font-style:normal;font-weight:400;src:url(/js/4cdaaa8fe839542200b080dc9b08b7b5.woff2) format("woff2"),url(/js/8e08cd86133caec43c49a139a36424e8.woff) format("woff");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}.monaco-editor .accessibilityHelpWidget{overflow:scroll;padding:10px;vertical-align:middle}.monaco-aria-container{left:-999em;position:absolute}.monaco-editor .selection-anchor{background-color:#007acc;width:2px!important}.monaco-editor .bracket-match{box-sizing:border-box}.monaco-editor .monaco-editor-overlaymessage{padding-bottom:8px;z-index:10000}.monaco-editor .monaco-editor-overlaymessage.below{padding-bottom:0;padding-top:8px;z-index:10000}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.monaco-editor .monaco-editor-overlaymessage.fadeIn{-webkit-animation:fadeIn .15s ease-out;animation:fadeIn .15s ease-out}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.monaco-editor .monaco-editor-overlaymessage.fadeOut{-webkit-animation:fadeOut .1s ease-out;animation:fadeOut .1s ease-out}.monaco-editor .monaco-editor-overlaymessage .message{padding:1px 4px}.monaco-editor .monaco-editor-overlaymessage .anchor{border:8px solid transparent;height:0!important;position:absolute;width:0!important;z-index:1000}.monaco-editor .monaco-editor-overlaymessage.below .anchor.below,.monaco-editor .monaco-editor-overlaymessage:not(.below) .anchor.top{display:none}.monaco-editor .monaco-editor-overlaymessage.below .anchor.top{display:inherit;top:-8px}.monaco-editor .contentWidgets .codicon-light-bulb,.monaco-editor .contentWidgets .codicon-lightbulb-autofix{align-items:center;display:flex;justify-content:center}.monaco-editor .contentWidgets .codicon-light-bulb:hover,.monaco-editor .contentWidgets .codicon-lightbulb-autofix:hover{cursor:pointer}.monaco-editor .codelens-decoration{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .codelens-decoration>a,.monaco-editor .codelens-decoration>span{-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none;vertical-align:sub;white-space:nowrap}.monaco-editor .codelens-decoration>a{text-decoration:none}.monaco-editor .codelens-decoration>a:hover{cursor:pointer}.monaco-editor .codelens-decoration .codicon{color:currentColor!important;vertical-align:middle}.monaco-editor .codelens-decoration>a:hover .codicon:before{cursor:pointer}@-webkit-keyframes fadein{0%{opacity:0;visibility:visible}to{opacity:1}}@keyframes fadein{0%{opacity:0;visibility:visible}to{opacity:1}}.monaco-editor .codelens-decoration.fadein,.monaco-hover{-webkit-animation:fadein .1s linear;animation:fadein .1s linear}.monaco-hover{box-sizing:initial;cursor:default;line-height:1.5em;overflow:hidden;position:absolute;-moz-user-select:text;user-select:text;-webkit-user-select:text;-ms-user-select:text;z-index:50}.monaco-hover.hidden{display:none}.monaco-hover .hover-contents{padding:4px 8px}.monaco-hover .markdown-hover>.hover-contents:not(.code-hover-contents){word-wrap:break-word;max-width:500px}.monaco-hover .markdown-hover>.hover-contents:not(.code-hover-contents) hr{min-width:100%}.monaco-hover .code,.monaco-hover p,.monaco-hover ul{margin:8px 0}.monaco-hover code{font-family:var(--monaco-monospace-font)}.monaco-hover hr{border-left:0;border-right:0;box-sizing:border-box;height:1px;margin:4px -8px -4px}.monaco-hover .code:first-child,.monaco-hover p:first-child,.monaco-hover ul:first-child{margin-top:0}.monaco-hover .code:last-child,.monaco-hover p:last-child,.monaco-hover ul:last-child{margin-bottom:0}.monaco-hover ol,.monaco-hover ul{padding-left:20px}.monaco-hover li>p{margin-bottom:0}.monaco-hover li>ul{margin-top:0}.monaco-hover code{border-radius:3px;padding:0 .4em}.monaco-hover .monaco-tokenized-source{white-space:pre-wrap}.monaco-hover .hover-row.status-bar{font-size:12px;line-height:22px}.monaco-hover .hover-row.status-bar .actions{display:flex;padding:0 8px}.monaco-hover .hover-row.status-bar .actions .action-container{cursor:pointer;margin-right:16px}.monaco-hover .hover-row.status-bar .actions .action-container .action .icon{padding-right:4px}.monaco-hover .markdown-hover .hover-contents .codicon{color:inherit;font-size:inherit;vertical-align:middle}.monaco-hover .hover-contents a.code-link:before{content:"("}.monaco-hover .hover-contents a.code-link:after{content:")"}.monaco-hover .hover-contents a.code-link{color:inherit}.monaco-hover .hover-contents a.code-link>span{border-bottom:1px solid transparent;text-decoration:underline;text-underline-position:under}.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents) span{display:inline-block;margin-bottom:4px}.monaco-hover-content .action-container a{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.monaco-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.monaco-scrollable-element>.visible{background:transparent;opacity:1;transition:opacity .1s linear}.monaco-scrollable-element>.invisible{opacity:0;pointer-events:none}.monaco-scrollable-element>.invisible.fade{transition:opacity .8s linear}.monaco-scrollable-element>.shadow{display:none;position:absolute}.monaco-scrollable-element>.shadow.top{box-shadow:inset 0 6px 6px -6px #ddd;display:block;height:3px;left:3px;top:0;width:100%}.monaco-scrollable-element>.shadow.left{box-shadow:inset 6px 0 6px -6px #ddd;display:block;height:100%;left:0;top:3px;width:3px}.monaco-scrollable-element>.shadow.top-left-corner{display:block;height:3px;left:0;top:0;width:3px}.monaco-scrollable-element>.shadow.top.left{box-shadow:inset 6px 6px 6px -6px #ddd}.vs .monaco-scrollable-element>.scrollbar>.slider{background:hsla(0,0%,39.2%,.4)}.vs-dark .monaco-scrollable-element>.scrollbar>.slider{background:hsla(0,0%,47.5%,.4)}.hc-black .monaco-scrollable-element>.scrollbar>.slider{background:rgba(111,195,223,.6)}.monaco-scrollable-element>.scrollbar>.slider:hover{background:hsla(0,0%,39.2%,.7)}.hc-black .monaco-scrollable-element>.scrollbar>.slider:hover{background:rgba(111,195,223,.8)}.monaco-scrollable-element>.scrollbar>.slider.active{background:rgba(0,0,0,.6)}.vs-dark .monaco-scrollable-element>.scrollbar>.slider.active{background:hsla(0,0%,74.9%,.4)}.hc-black .monaco-scrollable-element>.scrollbar>.slider.active{background:#6fc3df}.vs-dark .monaco-scrollable-element .shadow.top{box-shadow:none}.vs-dark .monaco-scrollable-element .shadow.left{box-shadow:inset 6px 0 6px -6px #000}.vs-dark .monaco-scrollable-element .shadow.top.left{box-shadow:inset 6px 6px 6px -6px #000}.hc-black .monaco-scrollable-element .shadow.left,.hc-black .monaco-scrollable-element .shadow.top,.hc-black .monaco-scrollable-element .shadow.top.left{box-shadow:none}.monaco-editor .peekview-widget .head .peekview-title .severity-icon{display:inline-block;margin-right:4px;vertical-align:text-top}.monaco-editor .marker-widget{text-overflow:ellipsis;white-space:nowrap}.monaco-editor .marker-widget>.stale{font-style:italic;opacity:.6}.monaco-editor .marker-widget .title{display:inline-block;padding-right:5px}.monaco-editor .marker-widget .descriptioncontainer{padding:8px 12px 0 20px;position:absolute;-moz-user-select:text;user-select:text;-webkit-user-select:text;-ms-user-select:text;white-space:pre}.monaco-editor .marker-widget .descriptioncontainer .message{display:flex;flex-direction:column}.monaco-editor .marker-widget .descriptioncontainer .message .details{padding-left:6px}.monaco-editor .marker-widget .descriptioncontainer .message .source,.monaco-editor .marker-widget .descriptioncontainer .message span.code{opacity:.6}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link{color:inherit;opacity:.6}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:before{content:"("}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:after{content:")"}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link>span{border-bottom:1px solid transparent;text-decoration:underline;text-underline-position:under}.monaco-editor .marker-widget .descriptioncontainer .filename{cursor:pointer}.monaco-editor .peekview-widget .head{box-sizing:border-box;display:flex}.monaco-editor .peekview-widget .head .peekview-title{align-items:center;cursor:pointer;display:flex;font-size:13px;margin-left:20px;min-width:0}.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty){font-size:.9em;margin-left:.5em}.monaco-editor .peekview-widget .head .peekview-title .dirname,.monaco-editor .peekview-widget .head .peekview-title .meta{white-space:nowrap}.monaco-editor .peekview-widget .head .peekview-title .filename{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .peekview-widget .head .peekview-title .meta:not(:empty):before{content:"-";padding:0 .3em}.monaco-editor .peekview-widget .head .peekview-actions{flex:1;padding-right:2px;text-align:right}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar{display:inline-block}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar,.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar>.actions-container{height:100%}.monaco-editor .peekview-widget>.body{border-top:1px solid;position:relative}.monaco-editor .peekview-widget .head .peekview-title .codicon{margin-right:4px}.monaco-action-bar{height:100%;white-space:nowrap}.monaco-action-bar .actions-container{align-items:center;display:flex;height:100%;margin:0 auto;padding:0;width:100%}.monaco-action-bar.vertical .actions-container{display:inline-block}.monaco-action-bar .action-item{align-items:center;cursor:pointer;display:block;justify-content:center;position:relative}.monaco-action-bar .action-item.disabled{cursor:default}.monaco-action-bar .action-item .codicon,.monaco-action-bar .action-item .icon{display:block}.monaco-action-bar .action-item .codicon{align-items:center;display:flex;height:16px;width:16px}.monaco-action-bar .action-label{border-radius:5px;font-size:11px;padding:3px}.monaco-action-bar .action-item.disabled .action-label,.monaco-action-bar .action-item.disabled .action-label:before,.monaco-action-bar .action-item.disabled .action-label:hover{opacity:.4}.monaco-action-bar.vertical{text-align:left}.monaco-action-bar.vertical .action-item{display:block}.monaco-action-bar.vertical .action-label.separator{border-bottom:1px solid #bbb;display:block;margin-left:.8em;margin-right:.8em;padding-top:1px}.monaco-action-bar .action-item .action-label.separator{background-color:#bbb;cursor:default;height:16px;margin:5px 4px!important;min-width:1px;padding:0;width:1px}.secondary-actions .monaco-action-bar .action-label{margin-left:6px}.monaco-action-bar .action-item.select-container{align-items:center;display:flex;flex:1;justify-content:center;margin-right:10px;max-width:170px;min-width:60px;overflow:hidden}.monaco-action-bar .action-item.action-dropdown-item{display:flex}.monaco-action-bar .action-item.action-dropdown-item>.action-label{margin-right:1px}::-ms-clear{display:none}.monaco-editor .editor-widget input{color:inherit}.monaco-editor{overflow:visible;position:relative;-webkit-text-size-adjust:100%}.monaco-editor .overflow-guard{overflow:hidden;position:relative}.monaco-editor .view-overlays{position:absolute;top:0}.monaco-editor .inputarea{background-color:transparent;border:none;color:transparent;margin:0;min-height:0;min-width:0;outline:none!important;overflow:hidden;padding:0;position:absolute;resize:none}.monaco-editor .inputarea.ime-input{z-index:10}.monaco-editor .margin-view-overlays .line-numbers{box-sizing:border-box;cursor:default;display:inline-block;font-variant-numeric:tabular-nums;height:100%;position:absolute;text-align:right;vertical-align:middle}.monaco-editor .relative-current-line-number{display:inline-block;text-align:left;width:100%}.monaco-editor .margin-view-overlays .line-numbers.lh-odd{margin-top:1px}.monaco-mouse-cursor-text{cursor:text}.hc-black.mac .monaco-mouse-cursor-text,.hc-black .mac .monaco-mouse-cursor-text,.vs-dark.mac .monaco-mouse-cursor-text,.vs-dark .mac .monaco-mouse-cursor-text{cursor:-webkit-image-set(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=) 1x,url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC) 2x) 5 8,text}.monaco-editor .margin-view-overlays .current-line,.monaco-editor .view-overlays .current-line{box-sizing:border-box;display:block;left:0;position:absolute;top:0}.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both{border-right:0}.monaco-editor .lines-content .cdr{position:absolute}.monaco-editor .glyph-margin{position:absolute;top:0}.monaco-editor .margin-view-overlays .cgmr{align-items:center;display:flex;justify-content:center;position:absolute}.monaco-editor .lines-content .cigr,.monaco-editor .lines-content .cigra{position:absolute}.monaco-editor.no-user-select .lines-content,.monaco-editor.no-user-select .view-line,.monaco-editor.no-user-select .view-lines{-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-editor .view-lines{white-space:nowrap}.monaco-editor .view-line{position:absolute;width:100%}.monaco-editor .mtkz{display:inline-block}.monaco-editor .lines-decorations{background:#fff;position:absolute;top:0}.monaco-editor .margin-view-overlays .cldr{height:100%;position:absolute}.monaco-editor .margin-view-overlays .cmdr{height:100%;left:0;position:absolute;width:100%}.monaco-editor .minimap.slider-mouseover .minimap-slider{opacity:0;transition:opacity .1s linear}.monaco-editor .minimap.slider-mouseover .minimap-slider.active,.monaco-editor .minimap.slider-mouseover:hover .minimap-slider{opacity:1}.monaco-editor .minimap-shadow-hidden{position:absolute;width:0}.monaco-editor .minimap-shadow-visible{left:-6px;position:absolute;width:6px}.monaco-editor.no-minimap-shadow .minimap-shadow-visible{left:-1px;position:absolute;width:1px}.monaco-editor .overlayWidgets{left:0;position:absolute;top:0}.monaco-editor .view-ruler{position:absolute;top:0}.monaco-editor .scroll-decoration{height:6px;left:0;position:absolute;top:0}.monaco-editor .lines-content .cslr{position:absolute}.monaco-editor .top-left-radius{border-top-left-radius:3px}.monaco-editor .bottom-left-radius{border-bottom-left-radius:3px}.monaco-editor .top-right-radius{border-top-right-radius:3px}.monaco-editor .bottom-right-radius{border-bottom-right-radius:3px}.monaco-editor.hc-black .top-left-radius{border-top-left-radius:0}.monaco-editor.hc-black .bottom-left-radius{border-bottom-left-radius:0}.monaco-editor.hc-black .top-right-radius{border-top-right-radius:0}.monaco-editor.hc-black .bottom-right-radius{border-bottom-right-radius:0}.monaco-editor .cursors-layer{position:absolute;top:0}.monaco-editor .cursors-layer>.cursor{overflow:hidden;position:absolute}.monaco-editor .cursors-layer.cursor-smooth-caret-animation>.cursor{transition:all 80ms}.monaco-editor .cursors-layer.cursor-block-outline-style>.cursor{background:transparent!important;border-style:solid;border-width:1px;box-sizing:border-box}.monaco-editor .cursors-layer.cursor-underline-style>.cursor{background:transparent!important;border-bottom-style:solid;border-bottom-width:2px;box-sizing:border-box}.monaco-editor .cursors-layer.cursor-underline-thin-style>.cursor{background:transparent!important;border-bottom-style:solid;border-bottom-width:1px;box-sizing:border-box}@-webkit-keyframes monaco-cursor-smooth{0%,20%{opacity:1}60%,to{opacity:0}}@keyframes monaco-cursor-smooth{0%,20%{opacity:1}60%,to{opacity:0}}@-webkit-keyframes monaco-cursor-phase{0%,20%{opacity:1}90%,to{opacity:0}}@keyframes monaco-cursor-phase{0%,20%{opacity:1}90%,to{opacity:0}}@-webkit-keyframes monaco-cursor-expand{0%,20%{transform:scaleY(1)}80%,to{transform:scaleY(0)}}@keyframes monaco-cursor-expand{0%,20%{transform:scaleY(1)}80%,to{transform:scaleY(0)}}.cursor-smooth{-webkit-animation:monaco-cursor-smooth .5s ease-in-out 0s 20 alternate;animation:monaco-cursor-smooth .5s ease-in-out 0s 20 alternate}.cursor-phase{-webkit-animation:monaco-cursor-phase .5s ease-in-out 0s 20 alternate;animation:monaco-cursor-phase .5s ease-in-out 0s 20 alternate}.cursor-expand>.cursor{-webkit-animation:monaco-cursor-expand .5s ease-in-out 0s 20 alternate;animation:monaco-cursor-expand .5s ease-in-out 0s 20 alternate}.monaco-editor .zone-widget{position:absolute;z-index:10}.monaco-editor .zone-widget .zone-widget-container{border-bottom-style:solid;border-bottom-width:0;border-top-style:solid;border-top-width:0;position:relative}:root{--sash-size:4px}.monaco-sash{position:absolute;touch-action:none;z-index:35}.monaco-sash.disabled{pointer-events:none}.monaco-sash.mac.vertical{cursor:col-resize}.monaco-sash.vertical.minimum{cursor:e-resize}.monaco-sash.vertical.maximum{cursor:w-resize}.monaco-sash.mac.horizontal{cursor:row-resize}.monaco-sash.horizontal.minimum{cursor:s-resize}.monaco-sash.horizontal.maximum{cursor:n-resize}.monaco-sash.disabled{cursor:default!important;pointer-events:none!important}.monaco-sash.vertical{cursor:ew-resize;height:100%;top:0;width:var(--sash-size)}.monaco-sash.horizontal{cursor:ns-resize;height:var(--sash-size);left:0;width:100%}.monaco-sash:not(.disabled)>.orthogonal-drag-handle{content:" ";cursor:all-scroll;display:block;height:calc(var(--sash-size)*2);position:absolute;width:calc(var(--sash-size)*2);z-index:100}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)>.orthogonal-drag-handle.start,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)>.orthogonal-drag-handle.end{cursor:nwse-resize}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)>.orthogonal-drag-handle.end,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)>.orthogonal-drag-handle.start{cursor:nesw-resize}.monaco-sash.vertical>.orthogonal-drag-handle.start{left:calc(var(--sash-size)*-.5);top:calc(var(--sash-size)*-1)}.monaco-sash.vertical>.orthogonal-drag-handle.end{bottom:calc(var(--sash-size)*-1);left:calc(var(--sash-size)*-.5)}.monaco-sash.horizontal>.orthogonal-drag-handle.start{left:calc(var(--sash-size)*-1);top:calc(var(--sash-size)*-.5)}.monaco-sash.horizontal>.orthogonal-drag-handle.end{right:calc(var(--sash-size)*-1);top:calc(var(--sash-size)*-.5)}.monaco-sash:before{background:transparent;content:"";height:100%;pointer-events:none;position:absolute;transition:background-color .1s ease-out;width:100%}.monaco-sash.vertical:before{left:calc(50% - var(--sash-hover-size)/2);width:var(--sash-hover-size)}.monaco-sash.horizontal:before{height:var(--sash-hover-size);top:calc(50% - var(--sash-hover-size)/2)}.monaco-sash.debug{background:#0ff}.monaco-sash.debug.disabled{background:rgba(0,255,255,.2)}.monaco-sash.debug:not(.disabled)>.orthogonal-drag-handle{background:red}.monaco-action-bar .action-item.menu-entry .action-label.icon{background-position:50%;background-repeat:no-repeat;background-size:16px;height:16px;width:16px}.monaco-action-bar .action-item.menu-entry .action-label{background-image:var(--menu-entry-icon-light)}.hc-black .monaco-action-bar .action-item.menu-entry .action-label,.vs-dark .monaco-action-bar .action-item.menu-entry .action-label{background-image:var(--menu-entry-icon-dark)}.monaco-dropdown{height:100%;padding:0}.monaco-dropdown>.dropdown-label{align-items:center;cursor:pointer;display:flex;height:100%;justify-content:center}.monaco-dropdown>.dropdown-label>.action-label.disabled{cursor:default}.monaco-dropdown-with-primary{border-radius:5px;display:flex!important;flex-direction:row}.monaco-dropdown-with-primary>.action-container>.action-label{margin-right:0}.monaco-dropdown-with-primary>.dropdown-action-container>.monaco-dropdown>.dropdown-label .codicon[class*=codicon-]{font-size:12px;line-height:16px;margin-left:-4px;padding-left:0;padding-right:0}.monaco-dropdown-with-primary>.dropdown-action-container>.monaco-dropdown>.dropdown-label>.action-label{background-position:50%;background-repeat:no-repeat;background-size:16px;display:block}.monaco-editor .suggest-preview-additional-widget{white-space:nowrap}.monaco-editor .suggest-preview-additional-widget .content-spacer{color:transparent;white-space:pre}.monaco-editor .suggest-preview-additional-widget .button{cursor:pointer;display:inline-block;text-decoration:underline;text-underline-position:under}.monaco-editor .snippet-placeholder{min-width:2px}.monaco-editor .finish-snippet-placeholder,.monaco-editor .snippet-placeholder{outline-style:solid;outline-width:1px}.monaco-editor .suggest-widget{display:flex;flex-direction:column;width:430px;z-index:40}.monaco-editor .suggest-widget.message{align-items:center;flex-direction:row}.monaco-editor .suggest-details,.monaco-editor .suggest-widget{border-style:solid;border-width:1px;flex:0 1 auto;width:100%}.monaco-editor.hc-black .suggest-details,.monaco-editor.hc-black .suggest-widget{border-width:2px}.monaco-editor .suggest-widget .suggest-status-bar{border-top:1px solid transparent;box-sizing:border-box;display:none;flex-flow:row nowrap;font-size:80%;justify-content:space-between;overflow:hidden;padding:0 4px;width:100%}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar{display:flex}.monaco-editor .suggest-widget .suggest-status-bar .left{padding-right:8px}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-label{color:inherit;opacity:.5}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label{margin-right:0}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label:after{content:", ";margin-right:.3em}.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore,.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget.with-status-bar:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label{width:100%}.monaco-editor .suggest-widget>.message{padding-left:22px}.monaco-editor .suggest-widget>.tree{height:100%;width:100%}.monaco-editor .suggest-widget .monaco-list{-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row{background-position:2px 2px;background-repeat:no-repeat;-mox-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:flex;padding-right:10px;touch-action:none;white-space:nowrap}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents{flex:1;height:100%;overflow:hidden;padding-left:2px}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main{display:flex;justify-content:space-between;overflow:hidden;text-overflow:ellipsis;white-space:pre}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right{display:flex}.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight{font-weight:700}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:before{color:inherit;cursor:pointer;font-size:14px;opacity:1}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close{position:absolute;right:2px;top:6px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close:hover,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:hover{opacity:1}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.qualifier-label,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.signature-label,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{opacity:.7}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.signature-label{overflow:hidden;text-overflow:ellipsis}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.qualifier-label{align-self:center;font-size:90%;margin-left:4px;opacity:.4;overflow:hidden;text-overflow:ellipsis}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{margin-left:1.1em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label>.monaco-tokenized-source{display:inline}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{display:none}.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused:not(.string-label)>.contents>.main>.right>.details-label,.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.right>.details-label,.monaco-editor .suggest-widget:not(.shows-details) .monaco-list .monaco-list-row.focused>.contents>.main>.right>.details-label{display:inline}.monaco-editor .suggest-widget:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label{width:calc(100% - 26px)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left{flex-grow:1;flex-shrink:1;overflow:hidden}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.monaco-icon-label{flex-shrink:0}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.left>.monaco-icon-label{max-width:100%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.left>.monaco-icon-label{flex-shrink:1}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right{flex-shrink:4;max-width:70%;overflow:hidden}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:inline-block;height:18px;position:absolute;right:10px;visibility:hidden;width:18px}.monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:none!important}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore{display:inline-block}.monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:hover>.contents>.main>.right>.readMore{visibility:visible}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated{opacity:.66;text-decoration:unset}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated>.monaco-icon-label-container>.monaco-icon-name-container{text-decoration:line-through}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label:before{height:100%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon{background-position:50%;background-repeat:no-repeat;background-size:80%;display:block;height:16px;margin-left:2px;width:16px}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.hide{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .suggest-icon{align-items:center;display:flex;margin-right:4px}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .suggest-icon{color:inherit}.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .icon,.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .suggest-icon:before{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan{border:.1em solid #000;display:inline-block;height:.7em;margin:0 0 0 .3em;width:.7em}.monaco-editor .suggest-details-container{z-index:41}.monaco-editor .suggest-details{cursor:default;display:flex;flex-direction:column}.monaco-editor .suggest-details.no-docs{display:none}.monaco-editor .suggest-details>.monaco-scrollable-element{flex:1}.monaco-editor .suggest-details>.monaco-scrollable-element>.body{box-sizing:border-box;height:100%;width:100%}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type{flex:2;margin:0 24px 0 0;opacity:.7;overflow:hidden;padding:4px 0 12px 5px;text-overflow:ellipsis;white-space:pre}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type.auto-wrap{white-space:normal;word-break:break-all}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs{margin:0;padding:4px 5px;white-space:pre-wrap}.monaco-editor .suggest-details.no-type>.monaco-scrollable-element>.body>.docs{margin-right:24px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs{min-height:calc(1rem + 8px);padding:0;white-space:normal}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div,.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>span:not(:empty){padding:4px 5px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:first-child{margin-top:0}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:last-child{margin-bottom:0}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs .code{word-wrap:break-word;white-space:pre-wrap}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .codicon{vertical-align:sub}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>p:empty{display:none}.monaco-editor .suggest-details code{border-radius:3px;padding:0 .4em}.monaco-editor .suggest-details ol,.monaco-editor .suggest-details ul{padding-left:20px}.monaco-editor .suggest-details p code{font-family:var(--monaco-monospace-font)}@font-face{font-family:codicon;src:url(/js/0e0f4555ac984d9d78c1a07738e98d58.ttf) format("truetype")}.codicon[class*=codicon-]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font:normal normal normal 16px/1 codicon;text-align:center;text-decoration:none;text-rendering:auto;-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none}.codicon-wrench-subaction{opacity:.5}@-webkit-keyframes codicon-spin{to{transform:rotate(1turn)}}@keyframes codicon-spin{to{transform:rotate(1turn)}}.codicon-gear.codicon-modifier-spin,.codicon-loading.codicon-modifier-spin,.codicon-notebook-state-executing.codicon-modifier-spin,.codicon-sync.codicon-modifier-spin{-webkit-animation:codicon-spin 1.5s steps(30) infinite;animation:codicon-spin 1.5s steps(30) infinite}.codicon-modifier-disabled{opacity:.4}.codicon-loading,.codicon-tree-item-loading:before{-webkit-animation-duration:1s!important;animation-duration:1s!important;-webkit-animation-timing-function:cubic-bezier(.53,.21,.29,.67)!important;animation-timing-function:cubic-bezier(.53,.21,.29,.67)!important}.monaco-list{height:100%;position:relative;white-space:nowrap;width:100%}.monaco-list.mouse-support{-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-list>.monaco-scrollable-element{height:100%}.monaco-list-rows{height:100%;position:relative;width:100%}.monaco-list.horizontal-scrolling .monaco-list-rows{min-width:100%;width:auto}.monaco-list-row{box-sizing:border-box;overflow:hidden;position:absolute;width:100%}.monaco-list.mouse-support .monaco-list-row{cursor:pointer;touch-action:none}.monaco-list-row.scrolling{display:none!important}.monaco-list.element-focused,.monaco-list.selection-multiple,.monaco-list.selection-single{outline:0!important}.monaco-list:focus .monaco-list-row.selected .codicon{color:inherit}.monaco-drag-image{border-radius:10px;display:inline-block;font-size:12px;padding:1px 7px;position:absolute;z-index:1000}.monaco-list-type-filter{align-items:center;border-radius:2px;box-sizing:border-box;cursor:all-scroll;display:flex;font-size:13px;height:20px;line-height:18px;max-width:calc(100% - 10px);overflow:hidden;padding:0 3px;position:absolute;text-align:right;text-overflow:ellipsis;top:4px;z-index:1}.monaco-list-type-filter.dragging{transition:top .2s,left .2s}.monaco-list-type-filter.ne{right:4px}.monaco-list-type-filter.nw{left:4px}.monaco-list-type-filter>.controls{align-items:center;box-sizing:border-box;display:flex;transition:width .2s;width:0}.monaco-list-type-filter.dragging>.controls,.monaco-list-type-filter:hover>.controls{width:36px}.monaco-list-type-filter>.controls>*{-webkit-appearance:none;-moz-appearance:none;align-items:center;background:none;border:none;box-sizing:border-box;cursor:pointer;display:flex;flex-shrink:0;height:16px;justify-content:center;margin:0;padding:0;width:16px}.monaco-list-type-filter>.controls>.filter{margin-left:4px}.monaco-list-type-filter-message{box-sizing:border-box;height:100%;left:0;opacity:.7;padding:40px 1em 1em;pointer-events:none;position:absolute;text-align:center;top:0;white-space:normal;width:100%}.monaco-list-type-filter-message:empty{display:none}.monaco-list-type-filter{cursor:-webkit-grab;cursor:grab}.monaco-list-type-filter.dragging{cursor:-webkit-grabbing;cursor:grabbing}.monaco-icon-label{display:flex;overflow:hidden;text-overflow:ellipsis}.monaco-icon-label:before{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-position:0;background-repeat:no-repeat;background-size:16px;display:inline-block;flex-shrink:0;height:22px;line-height:inherit!important;padding-right:6px;vertical-align:top;width:16px}.monaco-icon-label>.monaco-icon-label-container{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{color:inherit;white-space:pre}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name>.label-separator{margin:0 2px;opacity:.5}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{font-size:.9em;margin-left:.5em;opacity:.7;white-space:pre}.monaco-icon-label.nowrap>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{white-space:nowrap}.vs .monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{opacity:.95}.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-description-container>.label-description,.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{font-style:italic}.monaco-icon-label.deprecated{opacity:.66;text-decoration:line-through}.monaco-icon-label.italic:after{font-style:italic}.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-description-container>.label-description,.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{text-decoration:line-through}.monaco-icon-label:after{font-size:90%;font-weight:600;opacity:.75;padding:0 16px 0 5px;text-align:center}.monaco-list:focus .selected .monaco-icon-label,.monaco-list:focus .selected .monaco-icon-label:after{color:inherit!important}.monaco-list-row.focused.selected .label-description,.monaco-list-row.selected .label-description{opacity:.8}.colorpicker-widget{height:190px;-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-editor .colorpicker-hover:focus{outline:none}.colorpicker-header{-ms-interpolation-mode:nearest-neighbor;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=");background-size:9px 9px;display:flex;height:24px;image-rendering:-moz-crisp-edges;image-rendering:pixelated;position:relative}.colorpicker-header .picked-color{color:#fff;cursor:pointer;flex:1;line-height:24px;text-align:center;width:216px}.colorpicker-header .picked-color.light{color:#000}.colorpicker-header .original-color{cursor:pointer;width:74px;z-index:inherit}.colorpicker-body{display:flex;padding:8px;position:relative}.colorpicker-body .saturation-wrap{flex:1;height:150px;min-width:220px;overflow:hidden;position:relative}.colorpicker-body .saturation-box{height:150px;position:absolute}.colorpicker-body .saturation-selection{border:1px solid #fff;border-radius:100%;box-shadow:0 0 2px rgba(0,0,0,.8);height:9px;margin:-5px 0 0 -5px;position:absolute;width:9px}.colorpicker-body .strip{height:150px;width:25px}.colorpicker-body .hue-strip{background:linear-gradient(180deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.colorpicker-body .hue-strip,.colorpicker-body .opacity-strip{cursor:-webkit-grab;cursor:grab;margin-left:8px;position:relative}.colorpicker-body .opacity-strip{-ms-interpolation-mode:nearest-neighbor;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=");background-size:9px 9px;image-rendering:-moz-crisp-edges;image-rendering:pixelated}.colorpicker-body .strip.grabbing{cursor:-webkit-grabbing;cursor:grabbing}.colorpicker-body .slider{border:1px solid hsla(0,0%,100%,.71);box-shadow:0 0 1px rgba(0,0,0,.85);box-sizing:border-box;height:4px;left:-2px;position:absolute;top:0;width:calc(100% + 4px)}.colorpicker-body .strip .overlay{height:150px;pointer-events:none}.monaco-editor .goto-definition-link{cursor:pointer;text-decoration:underline}.monaco-editor .zone-widget .zone-widget-container.reference-zone-widget{border-bottom-width:1px;border-top-width:1px}.monaco-editor .reference-zone-widget .inline{display:inline-block;vertical-align:top}.monaco-editor .reference-zone-widget .messages{height:100%;padding:3em 0;text-align:center;width:100%}.monaco-editor .reference-zone-widget .ref-tree{line-height:23px}.monaco-editor .reference-zone-widget .ref-tree .reference{overflow:hidden;text-overflow:ellipsis}.monaco-editor .reference-zone-widget .ref-tree .reference-file{display:inline-flex;height:100%;width:100%}.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .selected .reference-file{color:inherit!important}.monaco-editor .reference-zone-widget .ref-tree .reference-file .count{margin-left:auto;margin-right:12px}.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file{font-weight:700}.monaco-count-badge{border-radius:11px;box-sizing:border-box;display:inline-block;font-size:11px;font-weight:400;line-height:11px;min-height:18px;min-width:18px;padding:3px 6px;text-align:center}.monaco-count-badge.long{border-radius:2px;line-height:normal;min-height:auto;padding:2px 3px}.monaco-tl-row{align-items:center;display:flex;height:100%;position:relative}.monaco-tl-indent{height:100%;left:16px;pointer-events:none;position:absolute;top:0}.hide-arrows .monaco-tl-indent{left:12px}.monaco-tl-indent>.indent-guide{border-left:1px solid transparent;box-sizing:border-box;display:inline-block;height:100%;transition:border-color .1s linear}.monaco-tl-contents,.monaco-tl-twistie{height:100%}.monaco-tl-twistie{align-items:center;color:inherit!important;display:flex!important;flex-shrink:0;font-size:10px;justify-content:center;padding-right:6px;text-align:right;transform:translateX(3px);width:16px}.monaco-tl-contents{flex:1;overflow:hidden}.monaco-tl-twistie:before{border-radius:20px}.monaco-tl-twistie.collapsed:before{transform:rotate(-90deg)}.monaco-tl-twistie.codicon-tree-item-loading:before{-webkit-animation:codicon-spin 1.25s steps(30) infinite;animation:codicon-spin 1.25s steps(30) infinite}.monaco-table{display:flex;flex-direction:column;height:100%;position:relative;white-space:nowrap;width:100%}.monaco-table>.monaco-split-view2{border-bottom:1px solid transparent}.monaco-table>.monaco-list{flex:1}.monaco-table-tr{display:flex;height:100%}.monaco-table-th{font-weight:700;height:100%;overflow:hidden;text-overflow:ellipsis;width:100%}.monaco-table-td,.monaco-table-th{box-sizing:border-box;flex-shrink:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-table>.monaco-split-view2 .monaco-sash.vertical:before{border-left:1px solid transparent;content:"";left:calc(var(--sash-size)/2);position:absolute;width:0}.monaco-table>.monaco-split-view2,.monaco-table>.monaco-split-view2 .monaco-sash.vertical:before{transition:border-color .2s ease-out}.monaco-split-view2{height:100%;position:relative;width:100%}.monaco-split-view2>.sash-container{height:100%;pointer-events:none;position:absolute;width:100%}.monaco-split-view2>.sash-container>.monaco-sash{pointer-events:auto}.monaco-split-view2>.monaco-scrollable-element{height:100%;width:100%}.monaco-split-view2>.monaco-scrollable-element>.split-view-container{height:100%;position:relative;white-space:nowrap;width:100%}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view{position:absolute;white-space:normal}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view:not(.visible){display:none}.monaco-split-view2.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view{width:100%}.monaco-split-view2.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view{height:100%}.monaco-split-view2.separator-border>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{background-color:var(--separator-border);content:" ";left:0;pointer-events:none;position:absolute;top:0;z-index:5}.monaco-split-view2.separator-border.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:100%;width:1px}.monaco-split-view2.separator-border.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:1px;width:100%}.monaco-editor.vs .dnd-target{border-right:2px dotted #000;color:#fff}.monaco-editor.vs-dark .dnd-target{border-right:2px dotted #aeafad;color:#51504f}.monaco-editor.hc-black .dnd-target{border-right:2px dotted #fff;color:#000}.monaco-editor.hc-black.mac.mouse-default .view-lines,.monaco-editor.mouse-default .view-lines,.monaco-editor.vs-dark.mac.mouse-default .view-lines{cursor:default}.monaco-editor.hc-black.mac.mouse-copy .view-lines,.monaco-editor.mouse-copy .view-lines,.monaco-editor.vs-dark.mac.mouse-copy .view-lines{cursor:copy}.monaco-custom-checkbox{border:1px solid transparent;box-sizing:border-box;cursor:pointer;float:left;height:20px;margin-left:2px;opacity:.7;overflow:hidden;padding:1px;-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none;width:20px}.monaco-custom-checkbox.checked,.monaco-custom-checkbox:hover{opacity:1}.hc-black .monaco-custom-checkbox,.hc-black .monaco-custom-checkbox:hover{background:none}.monaco-custom-checkbox.monaco-simple-checkbox{background-size:16px!important;border:1px solid transparent;border-radius:3px;height:18px;margin-left:0;margin-right:9px;opacity:1;padding:0;width:18px}.monaco-custom-checkbox.monaco-simple-checkbox:not(.checked):before{visibility:hidden}.monaco-editor .find-widget{box-sizing:border-box;height:33px;line-height:19px;overflow:hidden;padding:0 4px;position:absolute;transform:translateY(calc(-100% - 10px));transition:transform .2s linear;z-index:35}.monaco-editor .find-widget textarea{margin:0}.monaco-editor .find-widget.hiddenEditor{display:none}.monaco-editor .find-widget.replaceToggled>.replace-part{display:flex}.monaco-editor .find-widget.visible{transform:translateY(0)}.monaco-editor .find-widget .monaco-inputbox.synthetic-focus{outline:1px solid -webkit-focus-ring-color;outline-offset:-1px}.monaco-editor .find-widget .monaco-inputbox .input{background-color:transparent;min-height:0}.monaco-editor .find-widget .monaco-findInput .input{font-size:13px}.monaco-editor .find-widget>.find-part,.monaco-editor .find-widget>.replace-part{display:flex;font-size:12px;margin:4px 0 0 17px}.monaco-editor .find-widget>.find-part .monaco-inputbox,.monaco-editor .find-widget>.replace-part .monaco-inputbox{min-height:25px}.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.mirror{padding-right:22px}.monaco-editor .find-widget>.find-part .monaco-inputbox>.ibwrapper>.input,.monaco-editor .find-widget>.find-part .monaco-inputbox>.ibwrapper>.mirror,.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.input,.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.mirror{padding-bottom:2px;padding-top:2px}.monaco-editor .find-widget>.find-part .find-actions,.monaco-editor .find-widget>.replace-part .replace-actions{align-items:center;display:flex;height:25px}.monaco-editor .find-widget .monaco-findInput{display:flex;flex:1;vertical-align:middle}.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element{width:100%}.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element .scrollbar.vertical{opacity:0}.monaco-editor .find-widget .matchesCount{box-sizing:border-box;display:flex;flex:initial;height:25px;line-height:23px;margin:0 0 0 3px;padding:2px 0 0 2px;text-align:center;vertical-align:middle}.monaco-editor .find-widget .button{align-items:center;background-position:50%;background-repeat:no-repeat;cursor:pointer;display:flex;flex:initial;height:20px;justify-content:center;margin-left:3px;width:20px}.monaco-editor .find-widget .button.left{margin-left:0;margin-right:3px}.monaco-editor .find-widget .button.wide{padding:1px 6px;top:-1px;width:auto}.monaco-editor .find-widget .button.toggle{box-sizing:border-box;height:100%;left:3px;position:absolute;top:0;width:18px}.monaco-editor .find-widget .button.toggle.disabled{display:none}.monaco-editor .find-widget .disabled{cursor:default;opacity:.3}.monaco-editor .find-widget>.replace-part{display:none}.monaco-editor .find-widget>.replace-part>.monaco-findInput{display:flex;flex:auto;flex-grow:0;flex-shrink:0;position:relative;vertical-align:middle}.monaco-editor .find-widget>.replace-part>.monaco-findInput>.controls{position:absolute;right:2px;top:3px}.monaco-editor .find-widget.reduced-find-widget .matchesCount{display:none}.monaco-editor .find-widget.narrow-find-widget{max-width:257px!important}.monaco-editor .find-widget.collapsed-find-widget{max-width:170px!important}.monaco-editor .find-widget.collapsed-find-widget .button.next,.monaco-editor .find-widget.collapsed-find-widget .button.previous,.monaco-editor .find-widget.collapsed-find-widget .button.replace,.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,.monaco-editor .find-widget.collapsed-find-widget>.find-part .monaco-findInput .controls{display:none}.monaco-editor .findMatch{-webkit-animation-duration:0;animation-duration:0;-webkit-animation-name:inherit!important;animation-name:inherit!important}.monaco-editor .find-widget .monaco-sash{left:0!important}.monaco-editor.hc-black .find-widget .button:before{left:2px;position:relative;top:1px}.monaco-findInput{position:relative}.monaco-findInput .monaco-inputbox{font-size:13px;width:100%}.monaco-findInput>.controls{position:absolute;right:2px;top:3px}.vs .monaco-findInput.disabled{background-color:#e1e1e1}.vs-dark .monaco-findInput.disabled{background-color:#333}.monaco-findInput.highlight-0 .controls{-webkit-animation:monaco-findInput-highlight-0 .1s linear 0s;animation:monaco-findInput-highlight-0 .1s linear 0s}.monaco-findInput.highlight-1 .controls{-webkit-animation:monaco-findInput-highlight-1 .1s linear 0s;animation:monaco-findInput-highlight-1 .1s linear 0s}.hc-black .monaco-findInput.highlight-0 .controls,.vs-dark .monaco-findInput.highlight-0 .controls{-webkit-animation:monaco-findInput-highlight-dark-0 .1s linear 0s;animation:monaco-findInput-highlight-dark-0 .1s linear 0s}.hc-black .monaco-findInput.highlight-1 .controls,.vs-dark .monaco-findInput.highlight-1 .controls{-webkit-animation:monaco-findInput-highlight-dark-1 .1s linear 0s;animation:monaco-findInput-highlight-dark-1 .1s linear 0s}@-webkit-keyframes monaco-findInput-highlight-0{0%{background:rgba(253,255,0,.8)}to{background:transparent}}@keyframes monaco-findInput-highlight-0{0%{background:rgba(253,255,0,.8)}to{background:transparent}}@-webkit-keyframes monaco-findInput-highlight-1{0%{background:rgba(253,255,0,.8)}99%{background:transparent}}@keyframes monaco-findInput-highlight-1{0%{background:rgba(253,255,0,.8)}99%{background:transparent}}@-webkit-keyframes monaco-findInput-highlight-dark-0{0%{background:hsla(0,0%,100%,.44)}to{background:transparent}}@keyframes monaco-findInput-highlight-dark-0{0%{background:hsla(0,0%,100%,.44)}to{background:transparent}}@-webkit-keyframes monaco-findInput-highlight-dark-1{0%{background:hsla(0,0%,100%,.44)}99%{background:transparent}}@keyframes monaco-findInput-highlight-dark-1{0%{background:hsla(0,0%,100%,.44)}99%{background:transparent}}.monaco-inputbox{box-sizing:border-box;display:block;font-size:inherit;padding:0;position:relative}.monaco-inputbox.idle{border:1px solid transparent}.monaco-inputbox>.ibwrapper>.input,.monaco-inputbox>.ibwrapper>.mirror{padding:4px}.monaco-inputbox>.ibwrapper{height:100%;position:relative;width:100%}.monaco-inputbox>.ibwrapper>.input{border:none;box-sizing:border-box;color:inherit;display:inline-block;font-family:inherit;font-size:inherit;height:100%;line-height:inherit;resize:none;width:100%}.monaco-inputbox>.ibwrapper>input{text-overflow:ellipsis}.monaco-inputbox>.ibwrapper>textarea.input{-ms-overflow-style:none;scrollbar-width:none;display:block;outline:none}.monaco-inputbox>.ibwrapper>textarea.input::-webkit-scrollbar{display:none}.monaco-inputbox>.ibwrapper>textarea.input.empty{white-space:nowrap}.monaco-inputbox>.ibwrapper>.mirror{word-wrap:break-word;box-sizing:border-box;display:inline-block;left:0;position:absolute;top:0;visibility:hidden;white-space:pre-wrap;width:100%}.monaco-inputbox-container{text-align:right}.monaco-inputbox-container .monaco-inputbox-message{word-wrap:break-word;box-sizing:border-box;display:inline-block;font-size:12px;line-height:17px;margin-top:-1px;overflow:hidden;padding:.4em;text-align:left;width:100%}.monaco-inputbox .monaco-action-bar{position:absolute;right:2px;top:4px}.monaco-inputbox .monaco-action-bar .action-item{margin-left:2px}.monaco-inputbox .monaco-action-bar .action-item .codicon{background-repeat:no-repeat;height:16px;width:16px}.monaco-editor .margin-view-overlays .codicon-folding-collapsed,.monaco-editor .margin-view-overlays .codicon-folding-expanded{align-items:center;cursor:pointer;display:flex;font-size:140%;justify-content:center;margin-left:2px;opacity:0;transition:opacity .5s}.monaco-editor .margin-view-overlays .codicon.alwaysShowFoldIcons,.monaco-editor .margin-view-overlays .codicon.codicon-folding-collapsed,.monaco-editor .margin-view-overlays:hover .codicon{opacity:1}.monaco-editor .inline-folded:after{color:grey;content:"⋯";cursor:pointer;display:inline;line-height:1em;margin:.1em .2em 0}.monaco-editor .iPadShowKeyboard{background:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgY2xpcC1wYXRoPSJ1cmwoI2EpIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTQ4LjAzNiA0LjAxSDQuMDA4VjMyLjAzaDQ0LjAyOFY0LjAxek00LjAwOC4wMDhBNC4wMDMgNC4wMDMgMCAwIDAgLjAwNSA0LjAxVjMyLjAzYTQuMDAzIDQuMDAzIDAgMCAwIDQuMDAzIDQuMDAyaDQ0LjAyOGE0LjAwMyA0LjAwMyAwIDAgMCA0LjAwMy00LjAwMlY0LjAxQTQuMDAzIDQuMDAzIDAgMCAwIDQ4LjAzNi4wMDhINC4wMDh6TTguMDEgOC4wMTNoNC4wMDN2NC4wMDNIOC4wMVY4LjAxM3ptMTIuMDA4IDBoLTQuMDAydjQuMDAzaDQuMDAyVjguMDEzem00LjAwMyAwaDQuMDAydjQuMDAzaC00LjAwMlY4LjAxM3ptMTIuMDA4IDBoLTQuMDAzdjQuMDAzaDQuMDAzVjguMDEzem00LjAwMiAwaDQuMDAzdjQuMDAzSDQwLjAzVjguMDEzem0tMjQuMDE1IDguMDA1SDguMDF2NC4wMDNoOC4wMDZ2LTQuMDAzem00LjAwMiAwaDQuMDAzdjQuMDAzaC00LjAwM3YtNC4wMDN6bTEyLjAwOCAwaC00LjAwM3Y0LjAwM2g0LjAwM3YtNC4wMDN6bTEyLjAwOCAwdjQuMDAzaC04LjAwNXYtNC4wMDNoOC4wMDV6bS0zMi4wMjEgOC4wMDVIOC4wMXY0LjAwM2g0LjAwM3YtNC4wMDN6bTQuMDAzIDBoMjAuMDEzdjQuMDAzSDE2LjAxNnYtNC4wMDN6bTI4LjAxOCAwSDQwLjAzdjQuMDAzaDQuMDAzdi00LjAwM3oiIGZpbGw9IiM0MjQyNDIiLz48L2c+PGRlZnM+PGNsaXBQYXRoIGlkPSJhIj48cGF0aCBmaWxsPSIjZmZmIiBkPSJNMCAwaDUzdjM2SDB6Ii8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+") 50% no-repeat;border:4px solid #f6f6f6;border-radius:4px;height:36px;margin:0;min-height:0;min-width:0;overflow:hidden;padding:0;position:absolute;resize:none;width:58px}.monaco-editor.vs-dark .iPadShowKeyboard{background:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgY2xpcC1wYXRoPSJ1cmwoI2EpIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTQ4LjAzNiA0LjAxSDQuMDA4VjMyLjAzaDQ0LjAyOFY0LjAxek00LjAwOC4wMDhBNC4wMDMgNC4wMDMgMCAwIDAgLjAwNSA0LjAxVjMyLjAzYTQuMDAzIDQuMDAzIDAgMCAwIDQuMDAzIDQuMDAyaDQ0LjAyOGE0LjAwMyA0LjAwMyAwIDAgMCA0LjAwMy00LjAwMlY0LjAxQTQuMDAzIDQuMDAzIDAgMCAwIDQ4LjAzNi4wMDhINC4wMDh6TTguMDEgOC4wMTNoNC4wMDN2NC4wMDNIOC4wMVY4LjAxM3ptMTIuMDA4IDBoLTQuMDAydjQuMDAzaDQuMDAyVjguMDEzem00LjAwMyAwaDQuMDAydjQuMDAzaC00LjAwMlY4LjAxM3ptMTIuMDA4IDBoLTQuMDAzdjQuMDAzaDQuMDAzVjguMDEzem00LjAwMiAwaDQuMDAzdjQuMDAzSDQwLjAzVjguMDEzem0tMjQuMDE1IDguMDA1SDguMDF2NC4wMDNoOC4wMDZ2LTQuMDAzem00LjAwMiAwaDQuMDAzdjQuMDAzaC00LjAwM3YtNC4wMDN6bTEyLjAwOCAwaC00LjAwM3Y0LjAwM2g0LjAwM3YtNC4wMDN6bTEyLjAwOCAwdjQuMDAzaC04LjAwNXYtNC4wMDNoOC4wMDV6bS0zMi4wMjEgOC4wMDVIOC4wMXY0LjAwM2g0LjAwM3YtNC4wMDN6bTQuMDAzIDBoMjAuMDEzdjQuMDAzSDE2LjAxNnYtNC4wMDN6bTI4LjAxOCAwSDQwLjAzdjQuMDAzaDQuMDAzdi00LjAwM3oiIGZpbGw9IiNDNUM1QzUiLz48L2c+PGRlZnM+PGNsaXBQYXRoIGlkPSJhIj48cGF0aCBmaWxsPSIjZmZmIiBkPSJNMCAwaDUzdjM2SDB6Ii8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+") 50% no-repeat;border:4px solid #252526}.monaco-editor .tokens-inspect-widget{padding:10px;-moz-user-select:text;user-select:text;-webkit-user-select:text;-ms-user-select:text;z-index:50}.tokens-inspect-separator{border:0;height:1px}.monaco-editor .tokens-inspect-widget .tm-token{font-family:var(--monaco-monospace-font)}.monaco-editor .tokens-inspect-widget .tm-token-length{float:right;font-size:60%;font-weight:400}.monaco-editor .tokens-inspect-widget .tm-metadata-table{width:100%}.monaco-editor .tokens-inspect-widget .tm-metadata-value{font-family:var(--monaco-monospace-font);text-align:right}.monaco-editor .tokens-inspect-widget .tm-token-type{font-family:var(--monaco-monospace-font)}.monaco-editor .detected-link,.monaco-editor .detected-link-active{text-decoration:underline;text-underline-position:under}.monaco-editor .detected-link-active{cursor:pointer}.monaco-editor .parameter-hints-widget{display:flex;flex-direction:column;line-height:1.5em;z-index:10}.monaco-editor .parameter-hints-widget>.phwrapper{display:flex;flex-direction:row;max-width:440px}.monaco-editor .parameter-hints-widget.multiple{min-height:3.3em;padding:0}.monaco-editor .parameter-hints-widget.visible{transition:left .05s ease-in-out}.monaco-editor .parameter-hints-widget p,.monaco-editor .parameter-hints-widget ul{margin:8px 0}.monaco-editor .parameter-hints-widget .body,.monaco-editor .parameter-hints-widget .monaco-scrollable-element{display:flex;flex:1;flex-direction:column;min-height:100%}.monaco-editor .parameter-hints-widget .signature{padding:4px 5px}.monaco-editor .parameter-hints-widget .docs{padding:0 10px 0 5px;white-space:pre-wrap}.monaco-editor .parameter-hints-widget .docs.empty{display:none}.monaco-editor .parameter-hints-widget .docs .markdown-docs{white-space:normal}.monaco-editor .parameter-hints-widget .docs .markdown-docs code{font-family:var(--monaco-monospace-font)}.monaco-editor .parameter-hints-widget .docs .code{white-space:pre-wrap}.monaco-editor .parameter-hints-widget .docs code{border-radius:3px;padding:0 .4em}.monaco-editor .parameter-hints-widget .controls{align-items:center;display:none;flex-direction:column;justify-content:flex-end;min-width:22px}.monaco-editor .parameter-hints-widget.multiple .controls{display:flex;padding:0 2px}.monaco-editor .parameter-hints-widget.multiple .button{background-repeat:no-repeat;cursor:pointer;height:16px;width:16px}.monaco-editor .parameter-hints-widget .button.previous{bottom:24px}.monaco-editor .parameter-hints-widget .overloads{font-family:var(--monaco-monospace-font);height:12px;line-height:12px;opacity:.5;text-align:center}.monaco-editor .parameter-hints-widget .signature .parameter.active{font-weight:700;text-decoration:underline}.monaco-editor .parameter-hints-widget .documentation-parameter>.parameter{font-weight:700;margin-right:.5em}.monaco-editor .rename-box{color:inherit;z-index:100}.monaco-editor .rename-box.preview{padding:3px 3px 0}.monaco-editor .rename-box .rename-input{padding:3px;width:calc(100% - 6px)}.monaco-editor .rename-box .rename-label{display:none;opacity:.8}.monaco-editor .rename-box.preview .rename-label{display:inherit}.monaco-editor{--monaco-monospace-font:"SF Mono",Monaco,Menlo,Consolas,"Ubuntu Mono","Liberation Mono","DejaVu Sans Mono","Courier New",monospace;font-family:-apple-system,BlinkMacSystemFont,Segoe WPC,Segoe UI,HelveticaNeue-Light,system-ui,Ubuntu,Droid Sans,sans-serif}.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label{stroke-width:1.2px}.monaco-hover p{margin:0}.monaco-aria-container{clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute!important;width:1px}.monaco-editor.hc-black{-ms-high-contrast-adjust:none}@media screen and (-ms-high-contrast:active){.monaco-editor.vs-dark .view-overlays .current-line,.monaco-editor.vs .view-overlays .current-line{border-color:windowtext!important;border-left:0;border-right:0}.monaco-editor.vs-dark .cursor,.monaco-editor.vs .cursor{background-color:windowtext!important}.monaco-editor.vs-dark .dnd-target,.monaco-editor.vs .dnd-target{border-color:windowtext!important}.monaco-editor.vs-dark .selected-text,.monaco-editor.vs .selected-text{background-color:highlight!important}.monaco-editor.vs-dark .view-line,.monaco-editor.vs .view-line{-ms-high-contrast-adjust:none}.monaco-editor.vs-dark .view-line span,.monaco-editor.vs .view-line span{color:windowtext!important}.monaco-editor.vs-dark .view-line span.inline-selected-text,.monaco-editor.vs .view-line span.inline-selected-text{color:highlighttext!important}.monaco-editor.vs-dark .view-overlays,.monaco-editor.vs .view-overlays{-ms-high-contrast-adjust:none}.monaco-editor.vs-dark .reference-decoration,.monaco-editor.vs-dark .selectionHighlight,.monaco-editor.vs-dark .wordHighlight,.monaco-editor.vs-dark .wordHighlightStrong,.monaco-editor.vs .reference-decoration,.monaco-editor.vs .selectionHighlight,.monaco-editor.vs .wordHighlight,.monaco-editor.vs .wordHighlightStrong{background:transparent!important;border:2px dotted highlight!important;box-sizing:border-box}.monaco-editor.vs-dark .rangeHighlight,.monaco-editor.vs .rangeHighlight{background:transparent!important;border:1px dotted activeborder!important;box-sizing:border-box}.monaco-editor.vs-dark .bracket-match,.monaco-editor.vs .bracket-match{background:transparent!important;border-color:windowtext!important}.monaco-editor.vs-dark .currentFindMatch,.monaco-editor.vs-dark .findMatch,.monaco-editor.vs .currentFindMatch,.monaco-editor.vs .findMatch{background:transparent!important;border:2px dotted activeborder!important;box-sizing:border-box}.monaco-editor.vs-dark .find-widget,.monaco-editor.vs .find-widget{border:1px solid windowtext}.monaco-editor.vs-dark .monaco-list .monaco-list-row,.monaco-editor.vs .monaco-list .monaco-list-row{-ms-high-contrast-adjust:none;color:windowtext!important}.monaco-editor.vs-dark .monaco-list .monaco-list-row.focused,.monaco-editor.vs .monaco-list .monaco-list-row.focused{background-color:highlight!important;color:highlighttext!important}.monaco-editor.vs-dark .monaco-list .monaco-list-row:hover,.monaco-editor.vs .monaco-list .monaco-list-row:hover{background:transparent!important;border:1px solid highlight;box-sizing:border-box}.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar,.monaco-editor.vs .monaco-scrollable-element>.scrollbar{-ms-high-contrast-adjust:none;background:background!important;border:1px solid windowtext;box-sizing:border-box}.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider,.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider{background:windowtext!important}.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider.active,.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider:hover,.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider.active,.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider:hover{background:highlight!important}.monaco-editor.vs-dark .decorationsOverviewRuler,.monaco-editor.vs .decorationsOverviewRuler{opacity:0}.monaco-editor.vs-dark .minimap,.monaco-editor.vs .minimap{display:none}.monaco-editor.vs-dark .squiggly-d-error,.monaco-editor.vs .squiggly-d-error{background:transparent!important;border-bottom:4px double #e47777}.monaco-editor.vs-dark .squiggly-b-info,.monaco-editor.vs-dark .squiggly-c-warning,.monaco-editor.vs .squiggly-b-info,.monaco-editor.vs .squiggly-c-warning{border-bottom:4px double #71b771}.monaco-editor.vs-dark .squiggly-a-hint,.monaco-editor.vs .squiggly-a-hint{border-bottom:4px double #6c6c6c}.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label{-ms-high-contrast-adjust:none;background-color:highlight!important;color:highlighttext!important}.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label,.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label{-ms-high-contrast-adjust:none;background:transparent!important;border:1px solid highlight;box-sizing:border-box}.monaco-diff-editor.vs-dark .diffOverviewRuler,.monaco-diff-editor.vs .diffOverviewRuler{display:none}.monaco-editor.vs-dark .line-delete,.monaco-editor.vs-dark .line-insert,.monaco-editor.vs .line-delete,.monaco-editor.vs .line-insert{background:transparent!important;border:1px solid highlight!important;box-sizing:border-box}.monaco-editor.vs-dark .char-delete,.monaco-editor.vs-dark .char-insert,.monaco-editor.vs .char-delete,.monaco-editor.vs .char-insert{background:transparent!important}}.monaco-diff-editor .diffOverview{z-index:9}.monaco-diff-editor .diffOverview .diffViewport{z-index:10}.monaco-diff-editor.vs .diffOverview{background:rgba(0,0,0,.03)}.monaco-diff-editor.vs-dark .diffOverview{background:hsla(0,0%,100%,.01)}.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark .scrollbar,.monaco-scrollable-element.modified-in-monaco-diff-editor.vs .scrollbar{background:transparent}.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black .scrollbar{background:none}.monaco-scrollable-element.modified-in-monaco-diff-editor .slider{z-index:10}.modified-in-monaco-diff-editor .slider.active{background:hsla(0,0%,67.1%,.4)}.modified-in-monaco-diff-editor.hc-black .slider.active{background:none}.monaco-diff-editor .delete-sign,.monaco-diff-editor .insert-sign,.monaco-editor .delete-sign,.monaco-editor .insert-sign{align-items:center;display:flex!important;font-size:11px!important;opacity:.7!important}.monaco-diff-editor.hc-black .delete-sign,.monaco-diff-editor.hc-black .insert-sign,.monaco-editor.hc-black .delete-sign,.monaco-editor.hc-black .insert-sign{opacity:1}.monaco-editor .inline-added-margin-view-zone,.monaco-editor .inline-deleted-margin-view-zone{text-align:right}.monaco-editor .view-zones .view-lines .view-line span{display:inline-block}.monaco-editor .margin-view-zones .lightbulb-glyph:hover{cursor:pointer}.monaco-diff-editor .diff-review-line-number{display:inline-block;text-align:right}.monaco-diff-editor .diff-review{position:absolute;-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-diff-editor .diff-review-summary{padding-left:10px}.monaco-diff-editor .diff-review-shadow{position:absolute}.monaco-diff-editor .diff-review-row{white-space:pre}.monaco-diff-editor .diff-review-table{display:table;min-width:100%}.monaco-diff-editor .diff-review-row{display:table-row;width:100%}.monaco-diff-editor .diff-review-spacer{display:inline-block;vertical-align:middle;width:10px}.monaco-diff-editor .diff-review-spacer>.codicon{font-size:9px!important}.monaco-diff-editor .diff-review-actions{display:inline-block;position:absolute;right:10px;top:2px}.monaco-diff-editor .diff-review-actions .action-label{height:16px;margin:2px 0;width:16px}.context-view .monaco-menu{min-width:130px}.context-view{position:absolute;z-index:2500}.context-view.fixed{all:initial;color:inherit;font-family:inherit;font-size:13px;position:fixed;z-index:2500}.quick-input-widget{font-size:13px}.quick-input-widget .monaco-highlighted-label .highlight{color:#0066bf}.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight{color:#9dddff}.vs-dark .quick-input-widget .monaco-highlighted-label .highlight{color:#0097fb}.hc-black .quick-input-widget .monaco-highlighted-label .highlight{color:#f38518}.monaco-keybinding>.monaco-keybinding-key{background-color:hsla(0,0%,86.7%,.4);border:1px solid hsla(0,0%,80%,.4);border-bottom-color:hsla(0,0%,73.3%,.4);box-shadow:inset 0 -1px 0 hsla(0,0%,73.3%,.4);color:#555}.hc-black .monaco-keybinding>.monaco-keybinding-key{background-color:transparent;border:1px solid #6fc3df;box-shadow:none;color:#fff}.vs-dark .monaco-keybinding>.monaco-keybinding-key{background-color:hsla(0,0%,50.2%,.17);border:1px solid rgba(51,51,51,.6);border-bottom-color:rgba(68,68,68,.6);box-shadow:inset 0 -1px 0 rgba(68,68,68,.6);color:#ccc}.quick-input-widget{left:50%;margin-left:-300px;padding:0 1px 6px;position:absolute;width:600px;z-index:2000}.quick-input-titlebar{align-items:center;display:flex}.quick-input-left-action-bar{display:flex;flex:1;margin-left:4px}.quick-input-title{padding:3px 0;text-align:center}.quick-input-right-action-bar{display:flex;flex:1;margin-right:4px}.quick-input-right-action-bar>.actions-container{justify-content:flex-end}.quick-input-titlebar .monaco-action-bar .action-label.codicon{background-position:50%;background-repeat:no-repeat;padding:2px}.quick-input-description{margin:6px}.quick-input-header .quick-input-description{margin:4px 2px}.quick-input-header{display:flex;margin-bottom:-2px;padding:6px 6px 0}.quick-input-widget.hidden-input .quick-input-header{margin-bottom:0;padding:0}.quick-input-and-message{display:flex;flex-direction:column;flex-grow:1;position:relative}.quick-input-check-all{align-self:center;margin:0}.quick-input-filter{display:flex;flex-grow:1;position:relative}.quick-input-box{flex-grow:1}.quick-input-widget.show-checkboxes .quick-input-box,.quick-input-widget.show-checkboxes .quick-input-message{margin-left:5px}.quick-input-visible-count{left:-10000px;position:absolute}.quick-input-count{align-items:center;align-self:center;display:flex;position:absolute;right:4px}.quick-input-count .monaco-count-badge{border-radius:2px;line-height:normal;min-height:auto;padding:2px 4px;vertical-align:middle}.quick-input-action{margin-left:6px}.quick-input-action .monaco-text-button{align-items:center;display:flex;font-size:11px;height:27.5px;padding:0 6px}.quick-input-message{margin-top:-1px;padding:5px 5px 2px}.quick-input-message>.codicon{margin:0 .2em;vertical-align:text-bottom}.quick-input-progress.monaco-progress-container{position:relative}.quick-input-progress.monaco-progress-container,.quick-input-progress.monaco-progress-container .progress-bit{height:2px}.quick-input-list{line-height:22px;margin-top:6px}.quick-input-widget.hidden-input .quick-input-list{margin-top:0}.quick-input-list .monaco-list{max-height:440px;overflow:hidden}.quick-input-list .quick-input-list-entry{box-sizing:border-box;display:flex;height:100%;overflow:hidden;padding:0 6px}.quick-input-list .quick-input-list-entry.quick-input-list-separator-border{border-top-style:solid;border-top-width:1px}.quick-input-list .monaco-list-row[data-index="0"] .quick-input-list-entry.quick-input-list-separator-border{border-top-style:none}.quick-input-list .quick-input-list-label{display:flex;flex:1;height:100%;overflow:hidden}.quick-input-list .quick-input-list-checkbox{align-self:center;margin:0}.quick-input-list .quick-input-list-rows{display:flex;flex:1;flex-direction:column;height:100%;margin-left:5px;overflow:hidden;text-overflow:ellipsis}.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-rows{margin-left:10px}.quick-input-widget .quick-input-list .quick-input-list-checkbox{display:none}.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-checkbox{display:inline}.quick-input-list .quick-input-list-rows>.quick-input-list-row{align-items:center;display:flex}.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label,.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label .monaco-icon-label-container>.monaco-icon-name-container{flex:1}.quick-input-list .quick-input-list-rows>.quick-input-list-row .codicon[class*=codicon-]{vertical-align:sub}.quick-input-list .quick-input-list-rows .monaco-highlighted-label span{opacity:1}.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding{margin-right:8px}.quick-input-list .quick-input-list-label-meta{line-height:normal;opacity:.7;overflow:hidden;text-overflow:ellipsis}.quick-input-list .monaco-highlighted-label .highlight{font-weight:700}.quick-input-list .quick-input-list-entry .quick-input-list-separator{margin-right:8px}.quick-input-list .quick-input-list-entry-action-bar{display:flex;flex:0;overflow:visible}.quick-input-list .quick-input-list-entry-action-bar .action-label{display:none}.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon{margin-right:4px;padding:2px}.quick-input-list .quick-input-list-entry-action-bar{margin-right:4px;margin-top:1px}.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label,.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label{display:flex}.quick-input-list .monaco-list-row.focused .monaco-keybinding-key,.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .codicon,.quick-input-list .monaco-list-row.focused .quick-input-list-entry .quick-input-list-separator,.quick-input-list .monaco-list-row.focused .quick-input-list-rows .quick-input-list-row .codicon{color:inherit}.quick-input-list .monaco-list-row.focused .monaco-keybinding-key{background:none}.monaco-keybinding{align-items:center;display:flex;line-height:10px}.monaco-keybinding>.monaco-keybinding-key{border-radius:3px;border-style:solid;border-width:1px;display:inline-block;font-size:11px;margin:0 2px;padding:3px 5px;vertical-align:middle}.monaco-keybinding>.monaco-keybinding-key:first-child{margin-left:0}.monaco-keybinding>.monaco-keybinding-key:last-child{margin-right:0}.monaco-keybinding>.monaco-keybinding-key-separator{display:inline-block}.monaco-keybinding>.monaco-keybinding-key-chord-separator{width:6px}.monaco-progress-container{height:5px;overflow:hidden;width:100%}.monaco-progress-container .progress-bit{display:none;height:5px;left:0;position:absolute;width:2%}.monaco-progress-container.active .progress-bit{display:inherit}.monaco-progress-container.discrete .progress-bit{left:0;transition:width .1s linear}.monaco-progress-container.discrete.done .progress-bit{width:100%}.monaco-progress-container.infinite .progress-bit{-webkit-animation-duration:4s;animation-duration:4s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:progress;animation-name:progress;-webkit-animation-timing-function:linear;animation-timing-function:linear;transform:translateZ(0)}@-webkit-keyframes progress{0%{transform:translateX(0) scaleX(1)}50%{transform:translateX(2500%) scaleX(3)}to{transform:translateX(4900%) scaleX(1)}}@keyframes progress{0%{transform:translateX(0) scaleX(1)}50%{transform:translateX(2500%) scaleX(3)}to{transform:translateX(4900%) scaleX(1)}}.monaco-text-button{align-items:center;box-sizing:border-box;cursor:pointer;display:flex;justify-content:center;padding:4px;text-align:center;width:100%}.monaco-text-button:focus{outline-offset:2px!important}.monaco-text-button:hover{text-decoration:none!important}.monaco-button.disabled,.monaco-button.disabled:focus{cursor:default;opacity:.4!important}.monaco-text-button>.codicon{color:inherit!important;margin:0 .2em}.monaco-button-dropdown{cursor:pointer;display:flex}.monaco-button-dropdown>.monaco-dropdown-button{margin-left:1px}.monaco-description-button{flex-direction:column}.monaco-description-button .monaco-button-label{font-weight:500}.monaco-description-button .monaco-button-description{font-style:italic} \ No newline at end of file +/*! tailwindcss v2.1.1 | MIT License | https://tailwindcss.com *//*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */:root{-moz-tab-size:4;-o-tab-size:4;tab-size:4}html{line-height:1.15;-webkit-text-size-adjust:100%}body{font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;margin:0}hr{color:inherit;height:0}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}::-moz-focus-inner{border-style:none;padding:0}:-moz-focusring{outline:1px dotted ButtonText}:-moz-ui-invalid{box-shadow:none}legend{padding:0}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,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}button{background-color:transparent;background-image:none}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}fieldset,ol,ul{margin:0;padding:0}ol,ul{list-style:none}html{font-family:Inter;line-height:1.5}body{font-family:inherit;line-height:inherit}*,:after,:before{border:0 solid #e1e8f0;box-sizing:border-box}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#91a4b7;opacity:1}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#91a4b7;opacity:1}input::placeholder,textarea::placeholder{color:#91a4b7;opacity:1}[role=button],button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{color:inherit;line-height:inherit;padding:0}code,kbd,pre,samp{font-family:JetBrains Mono}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}*{--tw-shadow:0 0 transparent;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(101,131,255,0.5);--tw-ring-offset-shadow:0 0 transparent;--tw-ring-shadow:0 0 transparent}.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}}.button{border-radius:.5rem;border-width:1px;font-size:.875rem;font-weight:500;line-height:1.25rem;padding:.5rem 1.25rem}.button,.button-blue{border-color:transparent}.button-blue{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgba(62,100,255,var(--tw-bg-opacity));color:rgba(255,255,255,var(--tw-text-opacity))}.button-blue:focus,.button-blue:hover{--tw-bg-opacity:1;background-color:rgba(45,76,219,var(--tw-bg-opacity))}.button-red{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgba(255,62,56,var(--tw-bg-opacity));border-color:transparent;color:rgba(255,255,255,var(--tw-text-opacity))}.button-red:focus,.button-red:hover{--tw-bg-opacity:1;background-color:rgba(219,40,50,var(--tw-bg-opacity))}.button-gray{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgba(240,245,249,var(--tw-bg-opacity));border-color:rgba(225,232,240,var(--tw-border-opacity));color:rgba(68,86,104,var(--tw-text-opacity))}.button-gray:focus,.button-gray:hover{--tw-bg-opacity:1;background-color:rgba(225,232,240,var(--tw-bg-opacity))}.button-outlined-red{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgba(255,245,245,var(--tw-bg-opacity));border-color:rgba(255,62,56,var(--tw-border-opacity));color:rgba(255,62,56,var(--tw-text-opacity))}.button-outlined-red:focus,.button-outlined-red:hover{--tw-bg-opacity:1;background-color:rgba(255,236,236,var(--tw-bg-opacity))}.button-outlined-gray{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity));border-color:rgba(202,213,224,var(--tw-border-opacity));color:rgba(68,86,104,var(--tw-text-opacity))}.button-outlined-gray:focus,.button-outlined-gray:hover,.button:disabled{--tw-bg-opacity:1;background-color:rgba(240,245,249,var(--tw-bg-opacity))}.button:disabled{--tw-text-opacity:1;border-color:transparent;color:rgba(145,164,183,var(--tw-text-opacity));cursor:default;pointer-events:none}.button-small{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgba(248,250,252,var(--tw-bg-opacity));border-color:rgba(225,232,240,var(--tw-border-opacity));color:rgba(68,86,104,var(--tw-text-opacity));padding:.25rem .5rem}.button-small:focus,.button-small:hover{--tw-bg-opacity:1;background-color:rgba(240,245,249,var(--tw-bg-opacity))}.button-square-icon{align-items:center;display:flex;justify-content:center;padding:.5rem}.button-square-icon i{font-size:1.25rem;line-height:1.75rem;line-height:1}.choice-button{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity));border-color:rgba(225,232,240,var(--tw-border-opacity));border-radius:.5rem;border-width:1px;color:rgba(48,66,84,var(--tw-text-opacity));padding:.5rem 1.25rem}.choice-button.active{--tw-border-opacity:1;--tw-bg-opacity:1;background-color:rgba(236,240,255,var(--tw-bg-opacity));border-color:rgba(62,100,255,var(--tw-border-opacity))}.icon-button{--tw-text-opacity:1;align-items:center;border-radius:9999px;color:rgba(145,164,183,var(--tw-text-opacity));display:flex;justify-content:center;padding:.25rem}.icon-button:hover{--tw-text-opacity:1;color:rgba(28,42,58,var(--tw-text-opacity))}.icon-button:focus{--tw-bg-opacity:1;background-color:rgba(240,245,249,var(--tw-bg-opacity))}.icon-button i{line-height:1}.icon-outlined-button{border-radius:9999px;border-width:2px}.input{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgba(248,250,252,var(--tw-bg-opacity));border-color:rgba(225,232,240,var(--tw-border-opacity));border-radius:.5rem;border-width:1px;color:rgba(68,86,104,var(--tw-text-opacity));font-size:.875rem;line-height:1.25rem;padding:.5rem .75rem;width:100%}.input::-moz-placeholder{--tw-placeholder-opacity:1;color:rgba(145,164,183,var(--tw-placeholder-opacity))}.input:-ms-input-placeholder{--tw-placeholder-opacity:1;color:rgba(145,164,183,var(--tw-placeholder-opacity))}.input::placeholder{--tw-placeholder-opacity:1;color:rgba(145,164,183,var(--tw-placeholder-opacity))}.input[type=color]{padding-bottom:0;padding-top:0;width:4rem}.input--error{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgba(255,245,245,var(--tw-bg-opacity));border-color:rgba(255,62,56,var(--tw-border-opacity));color:rgba(255,62,56,var(--tw-text-opacity))}.input-label{--tw-text-opacity:1;color:rgba(28,42,58,var(--tw-text-opacity));font-size:.875rem;font-weight:500;line-height:1.25rem;margin-bottom:.125rem}.input-error{--tw-text-opacity:1;color:rgba(255,62,56,var(--tw-text-opacity));font-size:.75rem;font-style:italic;line-height:1rem;margin-top:.5rem}.switch-button{display:inline-block;height:1.75rem;margin-right:.5rem;position:relative;transition-duration:.15s;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:background-color,border-color,color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:3.5rem}.switch-button--disabled{opacity:.5;pointer-events:none}.switch-button__checkbox{-webkit-appearance:none;-moz-appearance:none;appearance:none;--tw-border-opacity:1;background-color:rgba(145,164,183,var(--tw-bg-opacity));border-color:rgba(240,245,249,var(--tw-border-opacity));border-width:5px;height:1.75rem;position:absolute;width:1.75rem}.switch-button__bg,.switch-button__checkbox{--tw-bg-opacity:1;border-radius:9999px;cursor:pointer;display:block;transition-duration:.15s;transition-duration:.3s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.switch-button__bg{background-color:rgba(240,245,249,var(--tw-bg-opacity));height:100%;width:100%}.switch-button__checkbox:checked{--tw-border-opacity:1;--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity));border-color:rgba(62,100,255,var(--tw-border-opacity));transform:translateX(100%)}.switch-button__checkbox:checked+.switch-button__bg{--tw-bg-opacity:1;background-color:rgba(62,100,255,var(--tw-bg-opacity))}.tiny-scrollbar::-webkit-scrollbar{height:.4rem;width:.4rem}.tiny-scrollbar::-webkit-scrollbar-thumb{--tw-bg-opacity:1;background-color:rgba(145,164,183,var(--tw-bg-opacity));border-radius:.25rem}.tiny-scrollbar::-webkit-scrollbar-track{--tw-bg-opacity:1;background-color:rgba(240,245,249,var(--tw-bg-opacity))}.tabs{display:flex;width:100%}.tabs .tab{align-items:center;display:flex}.tabs .tab>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.tabs .tab{border-bottom-width:2px;border-color:rgba(240,245,249,var(--tw-border-opacity));color:rgba(145,164,183,var(--tw-text-opacity));padding:.5rem .75rem}.tabs .tab,.tabs .tab.active{--tw-border-opacity:1;--tw-text-opacity:1}.tabs .tab.active{border-color:rgba(62,100,255,var(--tw-border-opacity));color:rgba(62,100,255,var(--tw-text-opacity))}.menu{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity));border-radius:.5rem;box-shadow:0 15px 99px rgba(13,24,41,.15);display:flex;flex-direction:column;padding-bottom:.5rem;padding-top:.5rem;position:absolute;right:0;z-index:30}.menu__item{align-items:center;display:flex}.menu__item>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.75rem*var(--tw-space-x-reverse))}.menu__item{padding:.5rem 1.25rem;white-space:nowrap}.menu__item:hover{--tw-bg-opacity:1;background-color:rgba(248,250,252,var(--tw-bg-opacity))}.error-box{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgba(255,236,236,var(--tw-bg-opacity));border-radius:.5rem;color:rgba(255,139,136,var(--tw-text-opacity));font-weight:500;padding:.5rem 1rem}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.visible{visibility:visible}.static{position:static}.relative{position:relative}.absolute{position:absolute}.fixed{position:fixed}.inset-0{bottom:0;left:0;right:0;top:0}.top-\[50\%\]{top:50%}.left-\[-12px\]{left:-12px}.top-6{top:1.5rem}.right-6{right:1.5rem}.top-0{top:0}.left-\[64px\]{left:64px}.bottom-\[0\.4rem\]{bottom:.4rem}.right-\[1\.5rem\]{right:1.5rem}.right-2{right:.5rem}.top-1{top:.25rem}.right-4{right:1rem}.-left-3{left:-.75rem}.bottom-2{bottom:.5rem}.top-0\.5{top:.125rem}.right-5{right:1.25rem}.bottom-5{bottom:1.25rem}.z-\[10000\]{z-index:10000}.z-0{z-index:0}.z-30{z-index:30}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.-m-1{margin:-.25rem}.m-0{margin:0}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-bottom:.25rem;margin-top:.25rem}.mt-4{margin-top:1rem}.mt-2{margin-top:.5rem}.mr-1{margin-right:.25rem}.mb-4{margin-bottom:1rem}.ml-1{margin-left:.25rem}.mb-2{margin-bottom:.5rem}.mt-8{margin-top:2rem}.mb-6{margin-bottom:1.5rem}.-ml-1{margin-left:-.25rem}.mt-5{margin-top:1.25rem}.mb-1{margin-bottom:.25rem}.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}.h-full{height:100%}.h-\[50px\]{height:50px}.h-80{height:20rem}.h-screen{height:100vh}.h-\[150px\]{height:150px}.h-7{height:1.75rem}.h-10{height:2.5rem}.h-8{height:2rem}.h-20{height:5rem}.h-5{height:1.25rem}.h-4{height:1rem}.h-3{height:.75rem}.h-2{height:.5rem}.h-52{height:13rem}.max-h-full{max-height:100%}.max-h-40{max-height:10rem}.w-full{width:100%}.w-7{width:1.75rem}.w-16{width:4rem}.w-10{width:2.5rem}.w-8{width:2rem}.w-20{width:5rem}.w-5{width:1.25rem}.w-3\/4{width:75%}.w-5\/6{width:83.333333%}.w-1{width:.25rem}.w-3{width:.75rem}.max-w-screen-md{max-width:768px}.max-w-sm{max-width:24rem}.max-w-screen-lg{max-width:1024px}.max-w-xl{max-width:36rem}.max-w-\[75\%\]{max-width:75%}.max-w-xs{max-width:20rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-2xl{max-width:42rem}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.transform{--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;transform:translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y:-50%}.-translate-x-full{--tw-translate-x:-100%}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}.animate-pulse{-webkit-animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite;animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@-webkit-keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}.animate-ping{-webkit-animation:ping 1s cubic-bezier(0,0,.2,1) infinite;animation:ping 1s cubic-bezier(0,0,.2,1) infinite}@-webkit-keyframes spin{to{transform:rotate(1turn)}}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.cursor-default{cursor:default}.resize-none{resize:none}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-4{gap:1rem}.gap-2{gap:.5rem}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.75rem*var(--tw-space-x-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(2rem*var(--tw-space-y-reverse));margin-top:calc(2rem*(1 - var(--tw-space-y-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1rem*var(--tw-space-x-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.25rem*var(--tw-space-x-reverse))}.space-x-5>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1.25rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1.25rem*var(--tw-space-x-reverse))}.space-y-16>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(4rem*var(--tw-space-y-reverse));margin-top:calc(4rem*(1 - var(--tw-space-y-reverse)))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.25rem*var(--tw-space-y-reverse));margin-top:calc(1.25rem*(1 - var(--tw-space-y-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1.5rem*var(--tw-space-y-reverse));margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-bottom-width:calc(1px*var(--tw-divide-y-reverse));border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgba(225,232,240,var(--tw-divide-opacity))}.self-end{align-self:flex-end}.overflow-y-auto{overflow-y:auto}.overflow-hidden{overflow:hidden}.overflow-auto{overflow:auto}.overflow-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-wrap{white-space:pre-wrap}.rounded-2xl{border-radius:1rem}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-t-2xl{border-top-left-radius:1rem;border-top-right-radius:1rem}.rounded-b-2xl{border-bottom-left-radius:1rem;border-bottom-right-radius:1rem}.border{border-width:1px}.border-2{border-width:2px}.border-\[3px\]{border-width:3px}.border-b{border-bottom-width:1px}.border-r{border-right-width:1px}.border-dashed{border-style:dashed}.border-gray-200{--tw-border-opacity:1;border-color:rgba(225,232,240,var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity:1;border-color:rgba(240,245,249,var(--tw-border-opacity))}.border-gray-400{--tw-border-opacity:1;border-color:rgba(145,164,183,var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-gray-300{--tw-border-opacity:1;border-color:rgba(202,213,224,var(--tw-border-opacity))}.border-blue-400{--tw-border-opacity:1;border-color:rgba(139,162,255,var(--tw-border-opacity))}.border-green-300{--tw-border-opacity:1;border-color:rgba(110,231,183,var(--tw-border-opacity))}.border-yellow-200{--tw-border-opacity:1;border-color:rgba(253,230,138,var(--tw-border-opacity))}.bg-gray-900{--tw-bg-opacity:1;background-color:rgba(13,24,41,var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity:1;background-color:rgba(97,117,138,var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgba(240,245,249,var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgba(248,250,252,var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity:1;background-color:rgba(48,66,84,var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgba(225,232,240,var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgba(101,131,255,var(--tw-bg-opacity))}.bg-blue-400{--tw-bg-opacity:1;background-color:rgba(139,162,255,var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity:1;background-color:rgba(145,164,183,var(--tw-bg-opacity))}.bg-green-400{--tw-bg-opacity:1;background-color:rgba(52,211,153,var(--tw-bg-opacity))}.bg-yellow-200{--tw-bg-opacity:1;background-color:rgba(253,230,138,var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity:1;background-color:rgba(255,139,136,var(--tw-bg-opacity))}.bg-blue-200{--tw-bg-opacity:1;background-color:rgba(216,224,255,var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity:1;background-color:rgba(62,100,255,var(--tw-bg-opacity))}.bg-blue-100{--tw-bg-opacity:1;background-color:rgba(236,240,255,var(--tw-bg-opacity))}.bg-red-100{--tw-bg-opacity:1;background-color:rgba(255,236,236,var(--tw-bg-opacity))}.p-8{padding:2rem}.p-5{padding:1.25rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-1{padding:.25rem}.p-2{padding:.5rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-8{padding-bottom:2rem;padding-top:2rem}.px-4{padding-left:1rem;padding-right:1rem}.py-12{padding-bottom:3rem;padding-top:3rem}.py-4{padding-bottom:1rem;padding-top:1rem}.py-10{padding-bottom:2.5rem;padding-top:2.5rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-7{padding-bottom:1.75rem;padding-top:1.75rem}.px-16{padding-left:4rem;padding-right:4rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.px-8{padding-left:2rem;padding-right:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.pb-8{padding-bottom:2rem}.pt-2{padding-top:.5rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pt-4{padding-top:1rem}.pr-3{padding-right:.75rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.font-mono{font-family:JetBrains Mono}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-semibold{font-weight:600}.font-medium{font-weight:500}.capitalize{text-transform:capitalize}.italic{font-style:italic}.leading-none{line-height:1}.text-gray-700{--tw-text-opacity:1;color:rgba(48,66,84,var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgba(28,42,58,var(--tw-text-opacity))}.text-gray-50{--tw-text-opacity:1;color:rgba(248,250,252,var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgba(202,213,224,var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity:1;color:rgba(62,100,255,var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgba(145,164,183,var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgba(68,86,104,var(--tw-text-opacity))}.text-green-300{--tw-text-opacity:1;color:rgba(110,231,183,var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgba(97,117,138,var(--tw-text-opacity))}.text-green-400{--tw-text-opacity:1;color:rgba(52,211,153,var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgba(13,24,41,var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgba(255,62,56,var(--tw-text-opacity))}.text-gray-100{--tw-text-opacity:1;color:rgba(240,245,249,var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgba(101,131,255,var(--tw-text-opacity))}.text-yellow-300{--tw-text-opacity:1;color:rgba(252,211,77,var(--tw-text-opacity))}.text-red-400{--tw-text-opacity:1;color:rgba(255,139,136,var(--tw-text-opacity))}.opacity-75{opacity:.75}.opacity-100{opacity:1}.opacity-0{opacity:0}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,0.1),0 10px 10px -5px rgba(0,0,0,0.04);box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}.filter{--tw-blur:var(--tw-empty,/*!*/ /*!*/);--tw-brightness:var(--tw-empty,/*!*/ /*!*/);--tw-contrast:var(--tw-empty,/*!*/ /*!*/);--tw-grayscale:var(--tw-empty,/*!*/ /*!*/);--tw-hue-rotate:var(--tw-empty,/*!*/ /*!*/);--tw-invert:var(--tw-empty,/*!*/ /*!*/);--tw-saturate:var(--tw-empty,/*!*/ /*!*/);--tw-sepia:var(--tw-empty,/*!*/ /*!*/);--tw-drop-shadow:var(--tw-empty,/*!*/ /*!*/);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)}.blur{--tw-blur:blur(8px)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration,.transition-all{transition-duration:.15s}.duration-1000{transition-duration:1s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.bg-editor{background-color:#282c34}.font-editor{font-family:JetBrains Mono,Droid Sans Mono,"monospace";font-size:14px}.shadow-xl-center{box-shadow:0 0 25px -5px rgba(0,0,0,.1),0 0 10px -5px rgba(0,0,0,.04)}:focus,button:focus{outline:none}body{font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji}.phx-no-feedback.invalid-feedback,.phx-no-feedback .invalid-feedback,iframe[hidden]{display:none}.phx-click-loading{opacity:.5;transition:opacity 1s ease-out}.phx-disconnected{cursor:wait}.phx-disconnected *{pointer-events:none}.markdown{--tw-text-opacity:1;color:rgba(48,66,84,var(--tw-text-opacity))}.markdown h1{font-size:1.875rem;line-height:2.25rem}.markdown h1,.markdown h2{--tw-text-opacity:1;color:rgba(28,42,58,var(--tw-text-opacity));font-weight:600;margin-bottom:1rem;margin-top:2rem}.markdown h2{font-size:1.5rem;line-height:2rem}.markdown h3{font-size:1.25rem}.markdown h3,.markdown h4{--tw-text-opacity:1;color:rgba(28,42,58,var(--tw-text-opacity));font-weight:600;line-height:1.75rem;margin-bottom:1rem;margin-top:2rem}.markdown h4{font-size:1.125rem}.markdown h5,.markdown h6{--tw-text-opacity:1;color:rgba(28,42,58,var(--tw-text-opacity));font-size:1rem;font-weight:600;line-height:1.5rem;margin-bottom:1rem;margin-top:2rem}.markdown p{margin-bottom:1rem;margin-top:1rem}.markdown ul{list-style-type:disc}.markdown ol,.markdown ul{list-style-position:outside;margin-bottom:1.25rem;margin-left:2rem;margin-top:1.25rem}.markdown ol{list-style-type:decimal}.markdown ul ul{list-style-type:circle}.markdown ul ul ul{list-style-type:square}.markdown ol>li,.markdown ul>li{margin-bottom:.25rem;margin-top:.25rem}.markdown blockquote{--tw-border-opacity:1;--tw-text-opacity:1;border-color:rgba(225,232,240,var(--tw-border-opacity));border-left-width:4px;color:rgba(97,117,138,var(--tw-text-opacity));margin-bottom:1rem;margin-top:1rem;padding-bottom:.5rem;padding-left:1rem;padding-top:.5rem}.markdown a{--tw-text-opacity:1;color:rgba(13,24,41,var(--tw-text-opacity));font-weight:500;text-decoration:underline}.markdown a:hover{text-decoration:none}.markdown img{margin:1rem auto}.markdown table{margin-bottom:1rem;margin-top:1rem}.markdown table::-webkit-scrollbar{height:.4rem;width:.4rem}.markdown table::-webkit-scrollbar-thumb{--tw-bg-opacity:1;background-color:rgba(145,164,183,var(--tw-bg-opacity));border-radius:.25rem}.markdown table::-webkit-scrollbar-track{--tw-bg-opacity:1;background-color:rgba(240,245,249,var(--tw-bg-opacity))}.markdown table{border-radius:.5rem;box-shadow:0 0 25px -5px rgba(0,0,0,.1),0 0 10px -5px rgba(0,0,0,.04);width:100%}.markdown table thead{text-align:left}.markdown table tbody tr,.markdown table thead tr{--tw-border-opacity:1;border-bottom-width:1px;border-color:rgba(225,232,240,var(--tw-border-opacity))}.markdown table tbody tr:last-child{border-bottom-width:0}.markdown table tbody tr:hover{--tw-bg-opacity:1;background-color:rgba(248,250,252,var(--tw-bg-opacity))}.markdown table th{color:rgba(48,66,84,var(--tw-text-opacity));font-weight:600}.markdown table td,.markdown table th{--tw-text-opacity:1;padding:.75rem 1.5rem}.markdown table td{color:rgba(97,117,138,var(--tw-text-opacity))}.markdown table td[align=center],.markdown table th[align=center]{text-align:center}.markdown table td[align=right],.markdown table th[align=right]{text-align:right}.markdown code{--tw-bg-opacity:1;background-color:rgba(225,232,240,var(--tw-bg-opacity));border-radius:.5rem;font-family:JetBrains Mono;font-size:.875rem;line-height:1.25rem;padding:.1rem .5rem;vertical-align:middle}.markdown pre{display:flex;overflow:hidden}.markdown pre>code{background-color:#282c34;color:#abb2bf;flex:1 1 0%;font-size:.875rem;line-height:1.25rem;overflow:auto;padding:1rem}.markdown kbd,.markdown pre>code{border-radius:.5rem;font-family:JetBrains Mono;vertical-align:middle}.markdown kbd{--tw-border-opacity:1;border-color:rgba(202,213,224,var(--tw-border-opacity));border-width:1px;box-shadow:inset 0 -2px 0 0 #cad5e0;font-size:.75rem;line-height:1rem;padding:.2rem .5rem}.markdown>:first-child{margin-top:0}.markdown>:last-child{margin-bottom:0}.markdown .katex-display{margin-bottom:2rem;margin-top:2rem}[data-element=cell][data-type=markdown] .markdown h1,[data-element=cell][data-type=markdown] .markdown h2{font-size:0}[data-element=cell][data-type=markdown] .markdown h1:after,[data-element=cell][data-type=markdown] .markdown h2:after{--tw-text-opacity:1;color:rgba(255,139,136,var(--tw-text-opacity));content:"warning: heading levels 1 and 2 are reserved for notebook and section names, please use heading 3 and above.";font-size:1rem;font-weight:500;line-height:1.5rem}:root{--ansi-color-black:#000;--ansi-color-red:#e06c75;--ansi-color-green:#98c379;--ansi-color-yellow:#e5c07b;--ansi-color-blue:#61afef;--ansi-color-magenta:#c678dd;--ansi-color-cyan:#56b6c2;--ansi-color-white:#fff;--ansi-color-light-black:#5c6370;--ansi-color-light-red:#f87171;--ansi-color-light-green:#34d399;--ansi-color-light-yellow:#fde68a;--ansi-color-light-blue:#93c5fd;--ansi-color-light-magenta:#f472b6;--ansi-color-light-cyan:#6be3f2;--ansi-color-light-white:#fff}[data-element=menu]:not([data-js-open])>[data-content]{display:none}[data-element=session]:not([data-js-insert-mode]) [data-element=insert-mode-indicator]{visibility:hidden}[data-element=session] [data-element=cell][data-type=markdown] [data-element=editor-box]{display:none}[data-element=session][data-js-insert-mode] [data-element=cell][data-type=markdown][data-js-focused] [data-element=editor-box]{display:block}[data-element=session]:not([data-js-insert-mode]) [data-element=cell][data-type=markdown][data-js-focused] [data-element=insert-image-button],[data-element=session][data-js-insert-mode] [data-element=cell][data-type=markdown][data-js-focused] [data-element=enable-insert-mode-button]{display:none}[data-element=cell][data-js-focused]{--tw-border-opacity:1;border-color:rgba(178,193,255,var(--tw-border-opacity))}[data-element=cell]:not([data-js-focused]) [data-element=actions]:not(:focus-within){opacity:0}[data-element=cell]:not([data-js-focused]) [data-element=actions]:not([data-primary]):not(:focus-within){pointer-events:none}[data-element=cell]:not([data-js-focused]):hover [data-element=actions][data-primary]{opacity:1;pointer-events:auto}[data-element=cell] [data-element=change-indicator]:not([data-js-shown]){visibility:hidden}[data-element=sections-list-item][data-js-is-viewed]{--tw-text-opacity:1;color:rgba(13,24,41,var(--tw-text-opacity))}[data-element=cell]:not([data-js-focused]):hover [data-element=cell-focus-indicator]{--tw-bg-opacity:1;background-color:rgba(216,224,255,var(--tw-bg-opacity))}[data-element=cell][data-js-focused] [data-element=cell-focus-indicator]{--tw-bg-opacity:1;background-color:rgba(178,193,255,var(--tw-bg-opacity))}[data-element=session]:not([data-js-side-panel-content=clients-list]) [data-element=clients-list],[data-element=session]:not([data-js-side-panel-content=sections-list]) [data-element=sections-list],[data-element=session]:not([data-js-side-panel-content]) [data-element=side-panel]{display:none}[data-element=session][data-js-side-panel-content=clients-list] [data-element=clients-list-toggle],[data-element=session][data-js-side-panel-content=sections-list] [data-element=sections-list-toggle]{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgba(48,66,84,var(--tw-bg-opacity));color:rgba(248,250,252,var(--tw-text-opacity))}[data-element=clients-list-item]:not([data-js-followed]) [data-meta=unfollow],[data-element=clients-list-item][data-js-followed] [data-meta=follow],[data-element=section-headline]:not(:hover) [data-element=section-name]:not(:focus)+[data-element=section-actions],[phx-hook=VirtualizedLines]:not(:hover) [data-clipboard]{display:none}.tooltip{--distance:4px;--arrow-size:5px;--show-delay:0.5s;display:flex;position:relative}.tooltip.distant{--distance:28px}.tooltip.distant-medium{--distance:10px}.tooltip:before{background-color:#1c273c;border-radius:4px;color:#f0f5f9;content:attr(aria-label);font-size:12px;font-weight:500;padding:3px 12px;text-align:center;white-space:pre;z-index:100}.tooltip:after,.tooltip:before{display:block;position:absolute;transition-delay:0s;transition-duration:0s;transition-property:visibility;visibility:hidden}.tooltip:after{border:var(--arrow-size) solid #1c273c;content:""}.tooltip:hover:after,.tooltip:hover:before{transition-delay:var(--show-delay);visibility:visible}.tooltip.top:before{bottom:100%;left:50%;transform:translate(-50%,calc(1px - var(--arrow-size) - var(--distance)))}.tooltip.top:after{border-bottom:none;border-left-color:transparent;border-right-color:transparent;bottom:100%;left:50%;transform:translate(-50%,calc(0px - var(--distance)))}.tooltip.bottom:before{left:50%;top:100%;transform:translate(-50%,calc(var(--arrow-size) - 1px + var(--distance)))}.tooltip.bottom:after{border-left-color:transparent;border-right-color:transparent;border-top:none;left:50%;top:100%;transform:translate(-50%,var(--distance))}.tooltip.right:before{left:100%;top:50%;transform:translate(calc(var(--arrow-size) - 1px + var(--distance)),-50%)}.tooltip.right:after{border-bottom-color:transparent;border-left:none;border-top-color:transparent;left:100%;top:50%;transform:translate(var(--distance),-50%)}.tooltip.left:before{right:100%;top:50%;transform:translate(calc(1px - var(--arrow-size) - var(--distance)),-50%)}.tooltip.left:after{border-bottom-color:transparent;border-right:none;border-top-color:transparent;right:100%;top:50%;transform:translate(calc(0px - var(--distance)),-50%)}div.suggest-details-container div.monaco-tokenized-source{margin-bottom:.5rem;margin-top:.5rem}.monaco-cursor-widget-container{pointer-events:none;z-index:100}.monaco-cursor-widget-container .monaco-cursor-widget-cursor{pointer-events:auto;width:2px}.monaco-cursor-widget-container .monaco-cursor-widget-label{color:#f8fafc;font-size:12px;padding:1px 8px;pointer-events:auto;transform:translateY(-200%);transition-delay:1.5s;transition-duration:0s;transition-property:visibility;visibility:hidden;white-space:nowrap}.monaco-cursor-widget-container .monaco-cursor-widget-label:hover{visibility:visible}.monaco-cursor-widget-container .monaco-cursor-widget-cursor:hover+.monaco-cursor-widget-label{transition-delay:0s;visibility:visible}.monaco-cursor-widget-container.inline{display:flex}.monaco-cursor-widget-container.inline .monaco-cursor-widget-label{margin-left:2px;transform:none}.ri-livebook-runtime,.ri-livebook-save,.ri-livebook-sections,.ri-livebook-shortcuts{font-size:1.25rem;line-height:1.75rem;vertical-align:middle}.ri-livebook-sections:before{content:"\eade"}.ri-livebook-runtime:before{content:"\ebf0"}.ri-livebook-shortcuts:before{content:"\ee72"}.ri-livebook-save:before{content:"\f0b3"}.last\:border-b-0:last-child{border-bottom-width:0}.focus-within\:opacity-100:focus-within{opacity:1}.hover\:border-blue-200:hover{--tw-border-opacity:1;border-color:rgba(216,224,255,var(--tw-border-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgba(240,245,249,var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgba(248,250,252,var(--tw-bg-opacity))}.hover\:bg-blue-50:hover{--tw-bg-opacity:1;background-color:rgba(245,247,255,var(--tw-bg-opacity))}.hover\:bg-green-50:hover{--tw-bg-opacity:1;background-color:rgba(236,253,245,var(--tw-bg-opacity))}.hover\:bg-yellow-50:hover{--tw-bg-opacity:1;background-color:rgba(255,251,235,var(--tw-bg-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgba(13,24,41,var(--tw-text-opacity))}.hover\:text-gray-50:hover{--tw-text-opacity:1;color:rgba(248,250,252,var(--tw-text-opacity))}.hover\:text-gray-800:hover{--tw-text-opacity:1;color:rgba(28,42,58,var(--tw-text-opacity))}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-75:hover{opacity:.75}.focus\:border-blue-300:focus{--tw-border-opacity:1;border-color:rgba(178,193,255,var(--tw-border-opacity))}.focus\:bg-blue-50:focus{--tw-bg-opacity:1;background-color:rgba(245,247,255,var(--tw-bg-opacity))}.focus\:bg-green-50:focus{--tw-bg-opacity:1;background-color:rgba(236,253,245,var(--tw-bg-opacity))}.focus\:bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgba(240,245,249,var(--tw-bg-opacity))}.focus\:bg-yellow-50:focus{--tw-bg-opacity:1;background-color:rgba(255,251,235,var(--tw-bg-opacity))}.focus\:text-gray-50:focus{--tw-text-opacity:1;color:rgba(248,250,252,var(--tw-text-opacity))}.focus\:text-gray-800:focus{--tw-text-opacity:1;color:rgba(28,42,58,var(--tw-text-opacity))}.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 transparent)}.focus\:ring-gray-400:focus{--tw-ring-opacity:1;--tw-ring-color:rgba(145,164,183,var(--tw-ring-opacity))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:text-gray-300:disabled{--tw-text-opacity:1;color:rgba(202,213,224,var(--tw-text-opacity))}@media (min-width:640px){.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:justify-between{justify-content:space-between}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(0px*var(--tw-space-y-reverse));margin-top:calc(0px*(1 - var(--tw-space-y-reverse)))}.sm\:pb-4{padding-bottom:1rem}}@media (min-width:768px){.md\:static{position:static}.md\:block{display:block}.md\:flex{display:flex}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:shadow-none{--tw-shadow:0 0 transparent;box-shadow:var(--tw-ring-offset-shadow,0 0 transparent),var(--tw-ring-shadow,0 0 transparent),var(--tw-shadow)}}@media (min-width:1024px){.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@font-face{font-display:swap;font-family:remixicon;src:url(/js/5cb99e6cba5a4619063f73d47b775f6f.eot);src:url(/js/5cb99e6cba5a4619063f73d47b775f6f.eot#iefix) format("embedded-opentype"),url(/js/90668f6f9b3c2c18a090f132d1793c67.woff2) format("woff2"),url(/js/8d09fa11700ed63cf96e1d1c038368f3.woff) format("woff"),url(/js/f2616f597cf98f38d2347c9648bfe049.ttf) format("truetype"),url(/js/9cedd2150922ead848695530d71a212f.svg#remixicon) format("svg")}[class*=" ri-"],[class^=ri-]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:remixicon!important;font-style:normal}.ri-lg{font-size:1.3333em;line-height:.75em;vertical-align:-.0667em}.ri-xl{font-size:1.5em;line-height:.6666em;vertical-align:-.075em}.ri-xxs{font-size:.5em}.ri-xs{font-size:.75em}.ri-sm{font-size:.875em}.ri-1x{font-size:1em}.ri-2x{font-size:2em}.ri-3x{font-size:3em}.ri-4x{font-size:4em}.ri-5x{font-size:5em}.ri-6x{font-size:6em}.ri-7x{font-size:7em}.ri-8x{font-size:8em}.ri-9x{font-size:9em}.ri-10x{font-size:10em}.ri-fw{text-align:center;width:1.25em}.ri-24-hours-fill:before{content:"\ea01"}.ri-24-hours-line:before{content:"\ea02"}.ri-4k-fill:before{content:"\ea03"}.ri-4k-line:before{content:"\ea04"}.ri-a-b:before{content:"\ea05"}.ri-account-box-fill:before{content:"\ea06"}.ri-account-box-line:before{content:"\ea07"}.ri-account-circle-fill:before{content:"\ea08"}.ri-account-circle-line:before{content:"\ea09"}.ri-account-pin-box-fill:before{content:"\ea0a"}.ri-account-pin-box-line:before{content:"\ea0b"}.ri-account-pin-circle-fill:before{content:"\ea0c"}.ri-account-pin-circle-line:before{content:"\ea0d"}.ri-add-box-fill:before{content:"\ea0e"}.ri-add-box-line:before{content:"\ea0f"}.ri-add-circle-fill:before{content:"\ea10"}.ri-add-circle-line:before{content:"\ea11"}.ri-add-fill:before{content:"\ea12"}.ri-add-line:before{content:"\ea13"}.ri-admin-fill:before{content:"\ea14"}.ri-admin-line:before{content:"\ea15"}.ri-advertisement-fill:before{content:"\ea16"}.ri-advertisement-line:before{content:"\ea17"}.ri-airplay-fill:before{content:"\ea18"}.ri-airplay-line:before{content:"\ea19"}.ri-alarm-fill:before{content:"\ea1a"}.ri-alarm-line:before{content:"\ea1b"}.ri-alarm-warning-fill:before{content:"\ea1c"}.ri-alarm-warning-line:before{content:"\ea1d"}.ri-album-fill:before{content:"\ea1e"}.ri-album-line:before{content:"\ea1f"}.ri-alert-fill:before{content:"\ea20"}.ri-alert-line:before{content:"\ea21"}.ri-aliens-fill:before{content:"\ea22"}.ri-aliens-line:before{content:"\ea23"}.ri-align-bottom:before{content:"\ea24"}.ri-align-center:before{content:"\ea25"}.ri-align-justify:before{content:"\ea26"}.ri-align-left:before{content:"\ea27"}.ri-align-right:before{content:"\ea28"}.ri-align-top:before{content:"\ea29"}.ri-align-vertically:before{content:"\ea2a"}.ri-alipay-fill:before{content:"\ea2b"}.ri-alipay-line:before{content:"\ea2c"}.ri-amazon-fill:before{content:"\ea2d"}.ri-amazon-line:before{content:"\ea2e"}.ri-anchor-fill:before{content:"\ea2f"}.ri-anchor-line:before{content:"\ea30"}.ri-ancient-gate-fill:before{content:"\ea31"}.ri-ancient-gate-line:before{content:"\ea32"}.ri-ancient-pavilion-fill:before{content:"\ea33"}.ri-ancient-pavilion-line:before{content:"\ea34"}.ri-android-fill:before{content:"\ea35"}.ri-android-line:before{content:"\ea36"}.ri-angularjs-fill:before{content:"\ea37"}.ri-angularjs-line:before{content:"\ea38"}.ri-anticlockwise-2-fill:before{content:"\ea39"}.ri-anticlockwise-2-line:before{content:"\ea3a"}.ri-anticlockwise-fill:before{content:"\ea3b"}.ri-anticlockwise-line:before{content:"\ea3c"}.ri-app-store-fill:before{content:"\ea3d"}.ri-app-store-line:before{content:"\ea3e"}.ri-apple-fill:before{content:"\ea3f"}.ri-apple-line:before{content:"\ea40"}.ri-apps-2-fill:before{content:"\ea41"}.ri-apps-2-line:before{content:"\ea42"}.ri-apps-fill:before{content:"\ea43"}.ri-apps-line:before{content:"\ea44"}.ri-archive-drawer-fill:before{content:"\ea45"}.ri-archive-drawer-line:before{content:"\ea46"}.ri-archive-fill:before{content:"\ea47"}.ri-archive-line:before{content:"\ea48"}.ri-arrow-down-circle-fill:before{content:"\ea49"}.ri-arrow-down-circle-line:before{content:"\ea4a"}.ri-arrow-down-fill:before{content:"\ea4b"}.ri-arrow-down-line:before{content:"\ea4c"}.ri-arrow-down-s-fill:before{content:"\ea4d"}.ri-arrow-down-s-line:before{content:"\ea4e"}.ri-arrow-drop-down-fill:before{content:"\ea4f"}.ri-arrow-drop-down-line:before{content:"\ea50"}.ri-arrow-drop-left-fill:before{content:"\ea51"}.ri-arrow-drop-left-line:before{content:"\ea52"}.ri-arrow-drop-right-fill:before{content:"\ea53"}.ri-arrow-drop-right-line:before{content:"\ea54"}.ri-arrow-drop-up-fill:before{content:"\ea55"}.ri-arrow-drop-up-line:before{content:"\ea56"}.ri-arrow-go-back-fill:before{content:"\ea57"}.ri-arrow-go-back-line:before{content:"\ea58"}.ri-arrow-go-forward-fill:before{content:"\ea59"}.ri-arrow-go-forward-line:before{content:"\ea5a"}.ri-arrow-left-circle-fill:before{content:"\ea5b"}.ri-arrow-left-circle-line:before{content:"\ea5c"}.ri-arrow-left-down-fill:before{content:"\ea5d"}.ri-arrow-left-down-line:before{content:"\ea5e"}.ri-arrow-left-fill:before{content:"\ea5f"}.ri-arrow-left-line:before{content:"\ea60"}.ri-arrow-left-right-fill:before{content:"\ea61"}.ri-arrow-left-right-line:before{content:"\ea62"}.ri-arrow-left-s-fill:before{content:"\ea63"}.ri-arrow-left-s-line:before{content:"\ea64"}.ri-arrow-left-up-fill:before{content:"\ea65"}.ri-arrow-left-up-line:before{content:"\ea66"}.ri-arrow-right-circle-fill:before{content:"\ea67"}.ri-arrow-right-circle-line:before{content:"\ea68"}.ri-arrow-right-down-fill:before{content:"\ea69"}.ri-arrow-right-down-line:before{content:"\ea6a"}.ri-arrow-right-fill:before{content:"\ea6b"}.ri-arrow-right-line:before{content:"\ea6c"}.ri-arrow-right-s-fill:before{content:"\ea6d"}.ri-arrow-right-s-line:before{content:"\ea6e"}.ri-arrow-right-up-fill:before{content:"\ea6f"}.ri-arrow-right-up-line:before{content:"\ea70"}.ri-arrow-up-circle-fill:before{content:"\ea71"}.ri-arrow-up-circle-line:before{content:"\ea72"}.ri-arrow-up-down-fill:before{content:"\ea73"}.ri-arrow-up-down-line:before{content:"\ea74"}.ri-arrow-up-fill:before{content:"\ea75"}.ri-arrow-up-line:before{content:"\ea76"}.ri-arrow-up-s-fill:before{content:"\ea77"}.ri-arrow-up-s-line:before{content:"\ea78"}.ri-artboard-2-fill:before{content:"\ea79"}.ri-artboard-2-line:before{content:"\ea7a"}.ri-artboard-fill:before{content:"\ea7b"}.ri-artboard-line:before{content:"\ea7c"}.ri-article-fill:before{content:"\ea7d"}.ri-article-line:before{content:"\ea7e"}.ri-aspect-ratio-fill:before{content:"\ea7f"}.ri-aspect-ratio-line:before{content:"\ea80"}.ri-asterisk:before{content:"\ea81"}.ri-at-fill:before{content:"\ea82"}.ri-at-line:before{content:"\ea83"}.ri-attachment-2:before{content:"\ea84"}.ri-attachment-fill:before{content:"\ea85"}.ri-attachment-line:before{content:"\ea86"}.ri-auction-fill:before{content:"\ea87"}.ri-auction-line:before{content:"\ea88"}.ri-award-fill:before{content:"\ea89"}.ri-award-line:before{content:"\ea8a"}.ri-baidu-fill:before{content:"\ea8b"}.ri-baidu-line:before{content:"\ea8c"}.ri-ball-pen-fill:before{content:"\ea8d"}.ri-ball-pen-line:before{content:"\ea8e"}.ri-bank-card-2-fill:before{content:"\ea8f"}.ri-bank-card-2-line:before{content:"\ea90"}.ri-bank-card-fill:before{content:"\ea91"}.ri-bank-card-line:before{content:"\ea92"}.ri-bank-fill:before{content:"\ea93"}.ri-bank-line:before{content:"\ea94"}.ri-bar-chart-2-fill:before{content:"\ea95"}.ri-bar-chart-2-line:before{content:"\ea96"}.ri-bar-chart-box-fill:before{content:"\ea97"}.ri-bar-chart-box-line:before{content:"\ea98"}.ri-bar-chart-fill:before{content:"\ea99"}.ri-bar-chart-grouped-fill:before{content:"\ea9a"}.ri-bar-chart-grouped-line:before{content:"\ea9b"}.ri-bar-chart-horizontal-fill:before{content:"\ea9c"}.ri-bar-chart-horizontal-line:before{content:"\ea9d"}.ri-bar-chart-line:before{content:"\ea9e"}.ri-barcode-box-fill:before{content:"\ea9f"}.ri-barcode-box-line:before{content:"\eaa0"}.ri-barcode-fill:before{content:"\eaa1"}.ri-barcode-line:before{content:"\eaa2"}.ri-barricade-fill:before{content:"\eaa3"}.ri-barricade-line:before{content:"\eaa4"}.ri-base-station-fill:before{content:"\eaa5"}.ri-base-station-line:before{content:"\eaa6"}.ri-basketball-fill:before{content:"\eaa7"}.ri-basketball-line:before{content:"\eaa8"}.ri-battery-2-charge-fill:before{content:"\eaa9"}.ri-battery-2-charge-line:before{content:"\eaaa"}.ri-battery-2-fill:before{content:"\eaab"}.ri-battery-2-line:before{content:"\eaac"}.ri-battery-charge-fill:before{content:"\eaad"}.ri-battery-charge-line:before{content:"\eaae"}.ri-battery-fill:before{content:"\eaaf"}.ri-battery-line:before{content:"\eab0"}.ri-battery-low-fill:before{content:"\eab1"}.ri-battery-low-line:before{content:"\eab2"}.ri-battery-saver-fill:before{content:"\eab3"}.ri-battery-saver-line:before{content:"\eab4"}.ri-battery-share-fill:before{content:"\eab5"}.ri-battery-share-line:before{content:"\eab6"}.ri-bear-smile-fill:before{content:"\eab7"}.ri-bear-smile-line:before{content:"\eab8"}.ri-behance-fill:before{content:"\eab9"}.ri-behance-line:before{content:"\eaba"}.ri-bell-fill:before{content:"\eabb"}.ri-bell-line:before{content:"\eabc"}.ri-bike-fill:before{content:"\eabd"}.ri-bike-line:before{content:"\eabe"}.ri-bilibili-fill:before{content:"\eabf"}.ri-bilibili-line:before{content:"\eac0"}.ri-bill-fill:before{content:"\eac1"}.ri-bill-line:before{content:"\eac2"}.ri-billiards-fill:before{content:"\eac3"}.ri-billiards-line:before{content:"\eac4"}.ri-bit-coin-fill:before{content:"\eac5"}.ri-bit-coin-line:before{content:"\eac6"}.ri-blaze-fill:before{content:"\eac7"}.ri-blaze-line:before{content:"\eac8"}.ri-bluetooth-connect-fill:before{content:"\eac9"}.ri-bluetooth-connect-line:before{content:"\eaca"}.ri-bluetooth-fill:before{content:"\eacb"}.ri-bluetooth-line:before{content:"\eacc"}.ri-blur-off-fill:before{content:"\eacd"}.ri-blur-off-line:before{content:"\eace"}.ri-body-scan-fill:before{content:"\eacf"}.ri-body-scan-line:before{content:"\ead0"}.ri-bold:before{content:"\ead1"}.ri-book-2-fill:before{content:"\ead2"}.ri-book-2-line:before{content:"\ead3"}.ri-book-3-fill:before{content:"\ead4"}.ri-book-3-line:before{content:"\ead5"}.ri-book-fill:before{content:"\ead6"}.ri-book-line:before{content:"\ead7"}.ri-book-mark-fill:before{content:"\ead8"}.ri-book-mark-line:before{content:"\ead9"}.ri-book-open-fill:before{content:"\eada"}.ri-book-open-line:before{content:"\eadb"}.ri-book-read-fill:before{content:"\eadc"}.ri-book-read-line:before{content:"\eadd"}.ri-booklet-fill:before{content:"\eade"}.ri-booklet-line:before{content:"\eadf"}.ri-bookmark-2-fill:before{content:"\eae0"}.ri-bookmark-2-line:before{content:"\eae1"}.ri-bookmark-3-fill:before{content:"\eae2"}.ri-bookmark-3-line:before{content:"\eae3"}.ri-bookmark-fill:before{content:"\eae4"}.ri-bookmark-line:before{content:"\eae5"}.ri-boxing-fill:before{content:"\eae6"}.ri-boxing-line:before{content:"\eae7"}.ri-braces-fill:before{content:"\eae8"}.ri-braces-line:before{content:"\eae9"}.ri-brackets-fill:before{content:"\eaea"}.ri-brackets-line:before{content:"\eaeb"}.ri-briefcase-2-fill:before{content:"\eaec"}.ri-briefcase-2-line:before{content:"\eaed"}.ri-briefcase-3-fill:before{content:"\eaee"}.ri-briefcase-3-line:before{content:"\eaef"}.ri-briefcase-4-fill:before{content:"\eaf0"}.ri-briefcase-4-line:before{content:"\eaf1"}.ri-briefcase-5-fill:before{content:"\eaf2"}.ri-briefcase-5-line:before{content:"\eaf3"}.ri-briefcase-fill:before{content:"\eaf4"}.ri-briefcase-line:before{content:"\eaf5"}.ri-bring-forward:before{content:"\eaf6"}.ri-bring-to-front:before{content:"\eaf7"}.ri-broadcast-fill:before{content:"\eaf8"}.ri-broadcast-line:before{content:"\eaf9"}.ri-brush-2-fill:before{content:"\eafa"}.ri-brush-2-line:before{content:"\eafb"}.ri-brush-3-fill:before{content:"\eafc"}.ri-brush-3-line:before{content:"\eafd"}.ri-brush-4-fill:before{content:"\eafe"}.ri-brush-4-line:before{content:"\eaff"}.ri-brush-fill:before{content:"\eb00"}.ri-brush-line:before{content:"\eb01"}.ri-bubble-chart-fill:before{content:"\eb02"}.ri-bubble-chart-line:before{content:"\eb03"}.ri-bug-2-fill:before{content:"\eb04"}.ri-bug-2-line:before{content:"\eb05"}.ri-bug-fill:before{content:"\eb06"}.ri-bug-line:before{content:"\eb07"}.ri-building-2-fill:before{content:"\eb08"}.ri-building-2-line:before{content:"\eb09"}.ri-building-3-fill:before{content:"\eb0a"}.ri-building-3-line:before{content:"\eb0b"}.ri-building-4-fill:before{content:"\eb0c"}.ri-building-4-line:before{content:"\eb0d"}.ri-building-fill:before{content:"\eb0e"}.ri-building-line:before{content:"\eb0f"}.ri-bus-2-fill:before{content:"\eb10"}.ri-bus-2-line:before{content:"\eb11"}.ri-bus-fill:before{content:"\eb12"}.ri-bus-line:before{content:"\eb13"}.ri-bus-wifi-fill:before{content:"\eb14"}.ri-bus-wifi-line:before{content:"\eb15"}.ri-cactus-fill:before{content:"\eb16"}.ri-cactus-line:before{content:"\eb17"}.ri-cake-2-fill:before{content:"\eb18"}.ri-cake-2-line:before{content:"\eb19"}.ri-cake-3-fill:before{content:"\eb1a"}.ri-cake-3-line:before{content:"\eb1b"}.ri-cake-fill:before{content:"\eb1c"}.ri-cake-line:before{content:"\eb1d"}.ri-calculator-fill:before{content:"\eb1e"}.ri-calculator-line:before{content:"\eb1f"}.ri-calendar-2-fill:before{content:"\eb20"}.ri-calendar-2-line:before{content:"\eb21"}.ri-calendar-check-fill:before{content:"\eb22"}.ri-calendar-check-line:before{content:"\eb23"}.ri-calendar-event-fill:before{content:"\eb24"}.ri-calendar-event-line:before{content:"\eb25"}.ri-calendar-fill:before{content:"\eb26"}.ri-calendar-line:before{content:"\eb27"}.ri-calendar-todo-fill:before{content:"\eb28"}.ri-calendar-todo-line:before{content:"\eb29"}.ri-camera-2-fill:before{content:"\eb2a"}.ri-camera-2-line:before{content:"\eb2b"}.ri-camera-3-fill:before{content:"\eb2c"}.ri-camera-3-line:before{content:"\eb2d"}.ri-camera-fill:before{content:"\eb2e"}.ri-camera-lens-fill:before{content:"\eb2f"}.ri-camera-lens-line:before{content:"\eb30"}.ri-camera-line:before{content:"\eb31"}.ri-camera-off-fill:before{content:"\eb32"}.ri-camera-off-line:before{content:"\eb33"}.ri-camera-switch-fill:before{content:"\eb34"}.ri-camera-switch-line:before{content:"\eb35"}.ri-capsule-fill:before{content:"\eb36"}.ri-capsule-line:before{content:"\eb37"}.ri-car-fill:before{content:"\eb38"}.ri-car-line:before{content:"\eb39"}.ri-car-washing-fill:before{content:"\eb3a"}.ri-car-washing-line:before{content:"\eb3b"}.ri-caravan-fill:before{content:"\eb3c"}.ri-caravan-line:before{content:"\eb3d"}.ri-cast-fill:before{content:"\eb3e"}.ri-cast-line:before{content:"\eb3f"}.ri-cellphone-fill:before{content:"\eb40"}.ri-cellphone-line:before{content:"\eb41"}.ri-celsius-fill:before{content:"\eb42"}.ri-celsius-line:before{content:"\eb43"}.ri-centos-fill:before{content:"\eb44"}.ri-centos-line:before{content:"\eb45"}.ri-character-recognition-fill:before{content:"\eb46"}.ri-character-recognition-line:before{content:"\eb47"}.ri-charging-pile-2-fill:before{content:"\eb48"}.ri-charging-pile-2-line:before{content:"\eb49"}.ri-charging-pile-fill:before{content:"\eb4a"}.ri-charging-pile-line:before{content:"\eb4b"}.ri-chat-1-fill:before{content:"\eb4c"}.ri-chat-1-line:before{content:"\eb4d"}.ri-chat-2-fill:before{content:"\eb4e"}.ri-chat-2-line:before{content:"\eb4f"}.ri-chat-3-fill:before{content:"\eb50"}.ri-chat-3-line:before{content:"\eb51"}.ri-chat-4-fill:before{content:"\eb52"}.ri-chat-4-line:before{content:"\eb53"}.ri-chat-check-fill:before{content:"\eb54"}.ri-chat-check-line:before{content:"\eb55"}.ri-chat-delete-fill:before{content:"\eb56"}.ri-chat-delete-line:before{content:"\eb57"}.ri-chat-download-fill:before{content:"\eb58"}.ri-chat-download-line:before{content:"\eb59"}.ri-chat-follow-up-fill:before{content:"\eb5a"}.ri-chat-follow-up-line:before{content:"\eb5b"}.ri-chat-forward-fill:before{content:"\eb5c"}.ri-chat-forward-line:before{content:"\eb5d"}.ri-chat-heart-fill:before{content:"\eb5e"}.ri-chat-heart-line:before{content:"\eb5f"}.ri-chat-history-fill:before{content:"\eb60"}.ri-chat-history-line:before{content:"\eb61"}.ri-chat-new-fill:before{content:"\eb62"}.ri-chat-new-line:before{content:"\eb63"}.ri-chat-off-fill:before{content:"\eb64"}.ri-chat-off-line:before{content:"\eb65"}.ri-chat-poll-fill:before{content:"\eb66"}.ri-chat-poll-line:before{content:"\eb67"}.ri-chat-private-fill:before{content:"\eb68"}.ri-chat-private-line:before{content:"\eb69"}.ri-chat-quote-fill:before{content:"\eb6a"}.ri-chat-quote-line:before{content:"\eb6b"}.ri-chat-settings-fill:before{content:"\eb6c"}.ri-chat-settings-line:before{content:"\eb6d"}.ri-chat-smile-2-fill:before{content:"\eb6e"}.ri-chat-smile-2-line:before{content:"\eb6f"}.ri-chat-smile-3-fill:before{content:"\eb70"}.ri-chat-smile-3-line:before{content:"\eb71"}.ri-chat-smile-fill:before{content:"\eb72"}.ri-chat-smile-line:before{content:"\eb73"}.ri-chat-upload-fill:before{content:"\eb74"}.ri-chat-upload-line:before{content:"\eb75"}.ri-chat-voice-fill:before{content:"\eb76"}.ri-chat-voice-line:before{content:"\eb77"}.ri-check-double-fill:before{content:"\eb78"}.ri-check-double-line:before{content:"\eb79"}.ri-check-fill:before{content:"\eb7a"}.ri-check-line:before{content:"\eb7b"}.ri-checkbox-blank-circle-fill:before{content:"\eb7c"}.ri-checkbox-blank-circle-line:before{content:"\eb7d"}.ri-checkbox-blank-fill:before{content:"\eb7e"}.ri-checkbox-blank-line:before{content:"\eb7f"}.ri-checkbox-circle-fill:before{content:"\eb80"}.ri-checkbox-circle-line:before{content:"\eb81"}.ri-checkbox-fill:before{content:"\eb82"}.ri-checkbox-indeterminate-fill:before{content:"\eb83"}.ri-checkbox-indeterminate-line:before{content:"\eb84"}.ri-checkbox-line:before{content:"\eb85"}.ri-checkbox-multiple-blank-fill:before{content:"\eb86"}.ri-checkbox-multiple-blank-line:before{content:"\eb87"}.ri-checkbox-multiple-fill:before{content:"\eb88"}.ri-checkbox-multiple-line:before{content:"\eb89"}.ri-china-railway-fill:before{content:"\eb8a"}.ri-china-railway-line:before{content:"\eb8b"}.ri-chrome-fill:before{content:"\eb8c"}.ri-chrome-line:before{content:"\eb8d"}.ri-clapperboard-fill:before{content:"\eb8e"}.ri-clapperboard-line:before{content:"\eb8f"}.ri-clipboard-fill:before{content:"\eb90"}.ri-clipboard-line:before{content:"\eb91"}.ri-clockwise-2-fill:before{content:"\eb92"}.ri-clockwise-2-line:before{content:"\eb93"}.ri-clockwise-fill:before{content:"\eb94"}.ri-clockwise-line:before{content:"\eb95"}.ri-close-circle-fill:before{content:"\eb96"}.ri-close-circle-line:before{content:"\eb97"}.ri-close-fill:before{content:"\eb98"}.ri-close-line:before{content:"\eb99"}.ri-closed-captioning-fill:before{content:"\eb9a"}.ri-closed-captioning-line:before{content:"\eb9b"}.ri-cloud-fill:before{content:"\eb9c"}.ri-cloud-line:before{content:"\eb9d"}.ri-cloud-off-fill:before{content:"\eb9e"}.ri-cloud-off-line:before{content:"\eb9f"}.ri-cloud-windy-fill:before{content:"\eba0"}.ri-cloud-windy-line:before{content:"\eba1"}.ri-cloudy-2-fill:before{content:"\eba2"}.ri-cloudy-2-line:before{content:"\eba3"}.ri-cloudy-fill:before{content:"\eba4"}.ri-cloudy-line:before{content:"\eba5"}.ri-code-box-fill:before{content:"\eba6"}.ri-code-box-line:before{content:"\eba7"}.ri-code-fill:before{content:"\eba8"}.ri-code-line:before{content:"\eba9"}.ri-code-s-fill:before{content:"\ebaa"}.ri-code-s-line:before{content:"\ebab"}.ri-code-s-slash-fill:before{content:"\ebac"}.ri-code-s-slash-line:before{content:"\ebad"}.ri-code-view:before{content:"\ebae"}.ri-codepen-fill:before{content:"\ebaf"}.ri-codepen-line:before{content:"\ebb0"}.ri-coin-fill:before{content:"\ebb1"}.ri-coin-line:before{content:"\ebb2"}.ri-coins-fill:before{content:"\ebb3"}.ri-coins-line:before{content:"\ebb4"}.ri-collage-fill:before{content:"\ebb5"}.ri-collage-line:before{content:"\ebb6"}.ri-command-fill:before{content:"\ebb7"}.ri-command-line:before{content:"\ebb8"}.ri-community-fill:before{content:"\ebb9"}.ri-community-line:before{content:"\ebba"}.ri-compass-2-fill:before{content:"\ebbb"}.ri-compass-2-line:before{content:"\ebbc"}.ri-compass-3-fill:before{content:"\ebbd"}.ri-compass-3-line:before{content:"\ebbe"}.ri-compass-4-fill:before{content:"\ebbf"}.ri-compass-4-line:before{content:"\ebc0"}.ri-compass-discover-fill:before{content:"\ebc1"}.ri-compass-discover-line:before{content:"\ebc2"}.ri-compass-fill:before{content:"\ebc3"}.ri-compass-line:before{content:"\ebc4"}.ri-compasses-2-fill:before{content:"\ebc5"}.ri-compasses-2-line:before{content:"\ebc6"}.ri-compasses-fill:before{content:"\ebc7"}.ri-compasses-line:before{content:"\ebc8"}.ri-computer-fill:before{content:"\ebc9"}.ri-computer-line:before{content:"\ebca"}.ri-contacts-book-2-fill:before{content:"\ebcb"}.ri-contacts-book-2-line:before{content:"\ebcc"}.ri-contacts-book-fill:before{content:"\ebcd"}.ri-contacts-book-line:before{content:"\ebce"}.ri-contacts-book-upload-fill:before{content:"\ebcf"}.ri-contacts-book-upload-line:before{content:"\ebd0"}.ri-contacts-fill:before{content:"\ebd1"}.ri-contacts-line:before{content:"\ebd2"}.ri-contrast-2-fill:before{content:"\ebd3"}.ri-contrast-2-line:before{content:"\ebd4"}.ri-contrast-drop-2-fill:before{content:"\ebd5"}.ri-contrast-drop-2-line:before{content:"\ebd6"}.ri-contrast-drop-fill:before{content:"\ebd7"}.ri-contrast-drop-line:before{content:"\ebd8"}.ri-contrast-fill:before{content:"\ebd9"}.ri-contrast-line:before{content:"\ebda"}.ri-copper-coin-fill:before{content:"\ebdb"}.ri-copper-coin-line:before{content:"\ebdc"}.ri-copper-diamond-fill:before{content:"\ebdd"}.ri-copper-diamond-line:before{content:"\ebde"}.ri-copyleft-fill:before{content:"\ebdf"}.ri-copyleft-line:before{content:"\ebe0"}.ri-copyright-fill:before{content:"\ebe1"}.ri-copyright-line:before{content:"\ebe2"}.ri-coreos-fill:before{content:"\ebe3"}.ri-coreos-line:before{content:"\ebe4"}.ri-coupon-2-fill:before{content:"\ebe5"}.ri-coupon-2-line:before{content:"\ebe6"}.ri-coupon-3-fill:before{content:"\ebe7"}.ri-coupon-3-line:before{content:"\ebe8"}.ri-coupon-4-fill:before{content:"\ebe9"}.ri-coupon-4-line:before{content:"\ebea"}.ri-coupon-5-fill:before{content:"\ebeb"}.ri-coupon-5-line:before{content:"\ebec"}.ri-coupon-fill:before{content:"\ebed"}.ri-coupon-line:before{content:"\ebee"}.ri-cpu-fill:before{content:"\ebef"}.ri-cpu-line:before{content:"\ebf0"}.ri-creative-commons-by-fill:before{content:"\ebf1"}.ri-creative-commons-by-line:before{content:"\ebf2"}.ri-creative-commons-fill:before{content:"\ebf3"}.ri-creative-commons-line:before{content:"\ebf4"}.ri-creative-commons-nc-fill:before{content:"\ebf5"}.ri-creative-commons-nc-line:before{content:"\ebf6"}.ri-creative-commons-nd-fill:before{content:"\ebf7"}.ri-creative-commons-nd-line:before{content:"\ebf8"}.ri-creative-commons-sa-fill:before{content:"\ebf9"}.ri-creative-commons-sa-line:before{content:"\ebfa"}.ri-creative-commons-zero-fill:before{content:"\ebfb"}.ri-creative-commons-zero-line:before{content:"\ebfc"}.ri-criminal-fill:before{content:"\ebfd"}.ri-criminal-line:before{content:"\ebfe"}.ri-crop-2-fill:before{content:"\ebff"}.ri-crop-2-line:before{content:"\ec00"}.ri-crop-fill:before{content:"\ec01"}.ri-crop-line:before{content:"\ec02"}.ri-css3-fill:before{content:"\ec03"}.ri-css3-line:before{content:"\ec04"}.ri-cup-fill:before{content:"\ec05"}.ri-cup-line:before{content:"\ec06"}.ri-currency-fill:before{content:"\ec07"}.ri-currency-line:before{content:"\ec08"}.ri-cursor-fill:before{content:"\ec09"}.ri-cursor-line:before{content:"\ec0a"}.ri-customer-service-2-fill:before{content:"\ec0b"}.ri-customer-service-2-line:before{content:"\ec0c"}.ri-customer-service-fill:before{content:"\ec0d"}.ri-customer-service-line:before{content:"\ec0e"}.ri-dashboard-2-fill:before{content:"\ec0f"}.ri-dashboard-2-line:before{content:"\ec10"}.ri-dashboard-3-fill:before{content:"\ec11"}.ri-dashboard-3-line:before{content:"\ec12"}.ri-dashboard-fill:before{content:"\ec13"}.ri-dashboard-line:before{content:"\ec14"}.ri-database-2-fill:before{content:"\ec15"}.ri-database-2-line:before{content:"\ec16"}.ri-database-fill:before{content:"\ec17"}.ri-database-line:before{content:"\ec18"}.ri-delete-back-2-fill:before{content:"\ec19"}.ri-delete-back-2-line:before{content:"\ec1a"}.ri-delete-back-fill:before{content:"\ec1b"}.ri-delete-back-line:before{content:"\ec1c"}.ri-delete-bin-2-fill:before{content:"\ec1d"}.ri-delete-bin-2-line:before{content:"\ec1e"}.ri-delete-bin-3-fill:before{content:"\ec1f"}.ri-delete-bin-3-line:before{content:"\ec20"}.ri-delete-bin-4-fill:before{content:"\ec21"}.ri-delete-bin-4-line:before{content:"\ec22"}.ri-delete-bin-5-fill:before{content:"\ec23"}.ri-delete-bin-5-line:before{content:"\ec24"}.ri-delete-bin-6-fill:before{content:"\ec25"}.ri-delete-bin-6-line:before{content:"\ec26"}.ri-delete-bin-7-fill:before{content:"\ec27"}.ri-delete-bin-7-line:before{content:"\ec28"}.ri-delete-bin-fill:before{content:"\ec29"}.ri-delete-bin-line:before{content:"\ec2a"}.ri-delete-column:before{content:"\ec2b"}.ri-delete-row:before{content:"\ec2c"}.ri-device-fill:before{content:"\ec2d"}.ri-device-line:before{content:"\ec2e"}.ri-device-recover-fill:before{content:"\ec2f"}.ri-device-recover-line:before{content:"\ec30"}.ri-dingding-fill:before{content:"\ec31"}.ri-dingding-line:before{content:"\ec32"}.ri-direction-fill:before{content:"\ec33"}.ri-direction-line:before{content:"\ec34"}.ri-disc-fill:before{content:"\ec35"}.ri-disc-line:before{content:"\ec36"}.ri-discord-fill:before{content:"\ec37"}.ri-discord-line:before{content:"\ec38"}.ri-discuss-fill:before{content:"\ec39"}.ri-discuss-line:before{content:"\ec3a"}.ri-dislike-fill:before{content:"\ec3b"}.ri-dislike-line:before{content:"\ec3c"}.ri-disqus-fill:before{content:"\ec3d"}.ri-disqus-line:before{content:"\ec3e"}.ri-divide-fill:before{content:"\ec3f"}.ri-divide-line:before{content:"\ec40"}.ri-donut-chart-fill:before{content:"\ec41"}.ri-donut-chart-line:before{content:"\ec42"}.ri-door-closed-fill:before{content:"\ec43"}.ri-door-closed-line:before{content:"\ec44"}.ri-door-fill:before{content:"\ec45"}.ri-door-line:before{content:"\ec46"}.ri-door-lock-box-fill:before{content:"\ec47"}.ri-door-lock-box-line:before{content:"\ec48"}.ri-door-lock-fill:before{content:"\ec49"}.ri-door-lock-line:before{content:"\ec4a"}.ri-door-open-fill:before{content:"\ec4b"}.ri-door-open-line:before{content:"\ec4c"}.ri-dossier-fill:before{content:"\ec4d"}.ri-dossier-line:before{content:"\ec4e"}.ri-douban-fill:before{content:"\ec4f"}.ri-douban-line:before{content:"\ec50"}.ri-double-quotes-l:before{content:"\ec51"}.ri-double-quotes-r:before{content:"\ec52"}.ri-download-2-fill:before{content:"\ec53"}.ri-download-2-line:before{content:"\ec54"}.ri-download-cloud-2-fill:before{content:"\ec55"}.ri-download-cloud-2-line:before{content:"\ec56"}.ri-download-cloud-fill:before{content:"\ec57"}.ri-download-cloud-line:before{content:"\ec58"}.ri-download-fill:before{content:"\ec59"}.ri-download-line:before{content:"\ec5a"}.ri-draft-fill:before{content:"\ec5b"}.ri-draft-line:before{content:"\ec5c"}.ri-drag-drop-fill:before{content:"\ec5d"}.ri-drag-drop-line:before{content:"\ec5e"}.ri-drag-move-2-fill:before{content:"\ec5f"}.ri-drag-move-2-line:before{content:"\ec60"}.ri-drag-move-fill:before{content:"\ec61"}.ri-drag-move-line:before{content:"\ec62"}.ri-dribbble-fill:before{content:"\ec63"}.ri-dribbble-line:before{content:"\ec64"}.ri-drive-fill:before{content:"\ec65"}.ri-drive-line:before{content:"\ec66"}.ri-drizzle-fill:before{content:"\ec67"}.ri-drizzle-line:before{content:"\ec68"}.ri-drop-fill:before{content:"\ec69"}.ri-drop-line:before{content:"\ec6a"}.ri-dropbox-fill:before{content:"\ec6b"}.ri-dropbox-line:before{content:"\ec6c"}.ri-dual-sim-1-fill:before{content:"\ec6d"}.ri-dual-sim-1-line:before{content:"\ec6e"}.ri-dual-sim-2-fill:before{content:"\ec6f"}.ri-dual-sim-2-line:before{content:"\ec70"}.ri-dv-fill:before{content:"\ec71"}.ri-dv-line:before{content:"\ec72"}.ri-dvd-fill:before{content:"\ec73"}.ri-dvd-line:before{content:"\ec74"}.ri-e-bike-2-fill:before{content:"\ec75"}.ri-e-bike-2-line:before{content:"\ec76"}.ri-e-bike-fill:before{content:"\ec77"}.ri-e-bike-line:before{content:"\ec78"}.ri-earth-fill:before{content:"\ec79"}.ri-earth-line:before{content:"\ec7a"}.ri-earthquake-fill:before{content:"\ec7b"}.ri-earthquake-line:before{content:"\ec7c"}.ri-edge-fill:before{content:"\ec7d"}.ri-edge-line:before{content:"\ec7e"}.ri-edit-2-fill:before{content:"\ec7f"}.ri-edit-2-line:before{content:"\ec80"}.ri-edit-box-fill:before{content:"\ec81"}.ri-edit-box-line:before{content:"\ec82"}.ri-edit-circle-fill:before{content:"\ec83"}.ri-edit-circle-line:before{content:"\ec84"}.ri-edit-fill:before{content:"\ec85"}.ri-edit-line:before{content:"\ec86"}.ri-eject-fill:before{content:"\ec87"}.ri-eject-line:before{content:"\ec88"}.ri-emotion-2-fill:before{content:"\ec89"}.ri-emotion-2-line:before{content:"\ec8a"}.ri-emotion-fill:before{content:"\ec8b"}.ri-emotion-happy-fill:before{content:"\ec8c"}.ri-emotion-happy-line:before{content:"\ec8d"}.ri-emotion-laugh-fill:before{content:"\ec8e"}.ri-emotion-laugh-line:before{content:"\ec8f"}.ri-emotion-line:before{content:"\ec90"}.ri-emotion-normal-fill:before{content:"\ec91"}.ri-emotion-normal-line:before{content:"\ec92"}.ri-emotion-sad-fill:before{content:"\ec93"}.ri-emotion-sad-line:before{content:"\ec94"}.ri-emotion-unhappy-fill:before{content:"\ec95"}.ri-emotion-unhappy-line:before{content:"\ec96"}.ri-empathize-fill:before{content:"\ec97"}.ri-empathize-line:before{content:"\ec98"}.ri-emphasis-cn:before{content:"\ec99"}.ri-emphasis:before{content:"\ec9a"}.ri-english-input:before{content:"\ec9b"}.ri-equalizer-fill:before{content:"\ec9c"}.ri-equalizer-line:before{content:"\ec9d"}.ri-eraser-fill:before{content:"\ec9e"}.ri-eraser-line:before{content:"\ec9f"}.ri-error-warning-fill:before{content:"\eca0"}.ri-error-warning-line:before{content:"\eca1"}.ri-evernote-fill:before{content:"\eca2"}.ri-evernote-line:before{content:"\eca3"}.ri-exchange-box-fill:before{content:"\eca4"}.ri-exchange-box-line:before{content:"\eca5"}.ri-exchange-cny-fill:before{content:"\eca6"}.ri-exchange-cny-line:before{content:"\eca7"}.ri-exchange-dollar-fill:before{content:"\eca8"}.ri-exchange-dollar-line:before{content:"\eca9"}.ri-exchange-fill:before{content:"\ecaa"}.ri-exchange-funds-fill:before{content:"\ecab"}.ri-exchange-funds-line:before{content:"\ecac"}.ri-exchange-line:before{content:"\ecad"}.ri-external-link-fill:before{content:"\ecae"}.ri-external-link-line:before{content:"\ecaf"}.ri-eye-2-fill:before{content:"\ecb0"}.ri-eye-2-line:before{content:"\ecb1"}.ri-eye-close-fill:before{content:"\ecb2"}.ri-eye-close-line:before{content:"\ecb3"}.ri-eye-fill:before{content:"\ecb4"}.ri-eye-line:before{content:"\ecb5"}.ri-eye-off-fill:before{content:"\ecb6"}.ri-eye-off-line:before{content:"\ecb7"}.ri-facebook-box-fill:before{content:"\ecb8"}.ri-facebook-box-line:before{content:"\ecb9"}.ri-facebook-circle-fill:before{content:"\ecba"}.ri-facebook-circle-line:before{content:"\ecbb"}.ri-facebook-fill:before{content:"\ecbc"}.ri-facebook-line:before{content:"\ecbd"}.ri-fahrenheit-fill:before{content:"\ecbe"}.ri-fahrenheit-line:before{content:"\ecbf"}.ri-feedback-fill:before{content:"\ecc0"}.ri-feedback-line:before{content:"\ecc1"}.ri-file-2-fill:before{content:"\ecc2"}.ri-file-2-line:before{content:"\ecc3"}.ri-file-3-fill:before{content:"\ecc4"}.ri-file-3-line:before{content:"\ecc5"}.ri-file-4-fill:before{content:"\ecc6"}.ri-file-4-line:before{content:"\ecc7"}.ri-file-add-fill:before{content:"\ecc8"}.ri-file-add-line:before{content:"\ecc9"}.ri-file-chart-2-fill:before{content:"\ecca"}.ri-file-chart-2-line:before{content:"\eccb"}.ri-file-chart-fill:before{content:"\eccc"}.ri-file-chart-line:before{content:"\eccd"}.ri-file-cloud-fill:before{content:"\ecce"}.ri-file-cloud-line:before{content:"\eccf"}.ri-file-code-fill:before{content:"\ecd0"}.ri-file-code-line:before{content:"\ecd1"}.ri-file-copy-2-fill:before{content:"\ecd2"}.ri-file-copy-2-line:before{content:"\ecd3"}.ri-file-copy-fill:before{content:"\ecd4"}.ri-file-copy-line:before{content:"\ecd5"}.ri-file-damage-fill:before{content:"\ecd6"}.ri-file-damage-line:before{content:"\ecd7"}.ri-file-download-fill:before{content:"\ecd8"}.ri-file-download-line:before{content:"\ecd9"}.ri-file-edit-fill:before{content:"\ecda"}.ri-file-edit-line:before{content:"\ecdb"}.ri-file-excel-2-fill:before{content:"\ecdc"}.ri-file-excel-2-line:before{content:"\ecdd"}.ri-file-excel-fill:before{content:"\ecde"}.ri-file-excel-line:before{content:"\ecdf"}.ri-file-fill:before{content:"\ece0"}.ri-file-forbid-fill:before{content:"\ece1"}.ri-file-forbid-line:before{content:"\ece2"}.ri-file-gif-fill:before{content:"\ece3"}.ri-file-gif-line:before{content:"\ece4"}.ri-file-history-fill:before{content:"\ece5"}.ri-file-history-line:before{content:"\ece6"}.ri-file-hwp-fill:before{content:"\ece7"}.ri-file-hwp-line:before{content:"\ece8"}.ri-file-info-fill:before{content:"\ece9"}.ri-file-info-line:before{content:"\ecea"}.ri-file-line:before{content:"\eceb"}.ri-file-list-2-fill:before{content:"\ecec"}.ri-file-list-2-line:before{content:"\eced"}.ri-file-list-3-fill:before{content:"\ecee"}.ri-file-list-3-line:before{content:"\ecef"}.ri-file-list-fill:before{content:"\ecf0"}.ri-file-list-line:before{content:"\ecf1"}.ri-file-lock-fill:before{content:"\ecf2"}.ri-file-lock-line:before{content:"\ecf3"}.ri-file-mark-fill:before{content:"\ecf4"}.ri-file-mark-line:before{content:"\ecf5"}.ri-file-music-fill:before{content:"\ecf6"}.ri-file-music-line:before{content:"\ecf7"}.ri-file-paper-2-fill:before{content:"\ecf8"}.ri-file-paper-2-line:before{content:"\ecf9"}.ri-file-paper-fill:before{content:"\ecfa"}.ri-file-paper-line:before{content:"\ecfb"}.ri-file-pdf-fill:before{content:"\ecfc"}.ri-file-pdf-line:before{content:"\ecfd"}.ri-file-ppt-2-fill:before{content:"\ecfe"}.ri-file-ppt-2-line:before{content:"\ecff"}.ri-file-ppt-fill:before{content:"\ed00"}.ri-file-ppt-line:before{content:"\ed01"}.ri-file-reduce-fill:before{content:"\ed02"}.ri-file-reduce-line:before{content:"\ed03"}.ri-file-search-fill:before{content:"\ed04"}.ri-file-search-line:before{content:"\ed05"}.ri-file-settings-fill:before{content:"\ed06"}.ri-file-settings-line:before{content:"\ed07"}.ri-file-shield-2-fill:before{content:"\ed08"}.ri-file-shield-2-line:before{content:"\ed09"}.ri-file-shield-fill:before{content:"\ed0a"}.ri-file-shield-line:before{content:"\ed0b"}.ri-file-shred-fill:before{content:"\ed0c"}.ri-file-shred-line:before{content:"\ed0d"}.ri-file-text-fill:before{content:"\ed0e"}.ri-file-text-line:before{content:"\ed0f"}.ri-file-transfer-fill:before{content:"\ed10"}.ri-file-transfer-line:before{content:"\ed11"}.ri-file-unknow-fill:before{content:"\ed12"}.ri-file-unknow-line:before{content:"\ed13"}.ri-file-upload-fill:before{content:"\ed14"}.ri-file-upload-line:before{content:"\ed15"}.ri-file-user-fill:before{content:"\ed16"}.ri-file-user-line:before{content:"\ed17"}.ri-file-warning-fill:before{content:"\ed18"}.ri-file-warning-line:before{content:"\ed19"}.ri-file-word-2-fill:before{content:"\ed1a"}.ri-file-word-2-line:before{content:"\ed1b"}.ri-file-word-fill:before{content:"\ed1c"}.ri-file-word-line:before{content:"\ed1d"}.ri-file-zip-fill:before{content:"\ed1e"}.ri-file-zip-line:before{content:"\ed1f"}.ri-film-fill:before{content:"\ed20"}.ri-film-line:before{content:"\ed21"}.ri-filter-2-fill:before{content:"\ed22"}.ri-filter-2-line:before{content:"\ed23"}.ri-filter-3-fill:before{content:"\ed24"}.ri-filter-3-line:before{content:"\ed25"}.ri-filter-fill:before{content:"\ed26"}.ri-filter-line:before{content:"\ed27"}.ri-filter-off-fill:before{content:"\ed28"}.ri-filter-off-line:before{content:"\ed29"}.ri-find-replace-fill:before{content:"\ed2a"}.ri-find-replace-line:before{content:"\ed2b"}.ri-finder-fill:before{content:"\ed2c"}.ri-finder-line:before{content:"\ed2d"}.ri-fingerprint-2-fill:before{content:"\ed2e"}.ri-fingerprint-2-line:before{content:"\ed2f"}.ri-fingerprint-fill:before{content:"\ed30"}.ri-fingerprint-line:before{content:"\ed31"}.ri-fire-fill:before{content:"\ed32"}.ri-fire-line:before{content:"\ed33"}.ri-firefox-fill:before{content:"\ed34"}.ri-firefox-line:before{content:"\ed35"}.ri-first-aid-kit-fill:before{content:"\ed36"}.ri-first-aid-kit-line:before{content:"\ed37"}.ri-flag-2-fill:before{content:"\ed38"}.ri-flag-2-line:before{content:"\ed39"}.ri-flag-fill:before{content:"\ed3a"}.ri-flag-line:before{content:"\ed3b"}.ri-flashlight-fill:before{content:"\ed3c"}.ri-flashlight-line:before{content:"\ed3d"}.ri-flask-fill:before{content:"\ed3e"}.ri-flask-line:before{content:"\ed3f"}.ri-flight-land-fill:before{content:"\ed40"}.ri-flight-land-line:before{content:"\ed41"}.ri-flight-takeoff-fill:before{content:"\ed42"}.ri-flight-takeoff-line:before{content:"\ed43"}.ri-flood-fill:before{content:"\ed44"}.ri-flood-line:before{content:"\ed45"}.ri-flow-chart:before{content:"\ed46"}.ri-flutter-fill:before{content:"\ed47"}.ri-flutter-line:before{content:"\ed48"}.ri-focus-2-fill:before{content:"\ed49"}.ri-focus-2-line:before{content:"\ed4a"}.ri-focus-3-fill:before{content:"\ed4b"}.ri-focus-3-line:before{content:"\ed4c"}.ri-focus-fill:before{content:"\ed4d"}.ri-focus-line:before{content:"\ed4e"}.ri-foggy-fill:before{content:"\ed4f"}.ri-foggy-line:before{content:"\ed50"}.ri-folder-2-fill:before{content:"\ed51"}.ri-folder-2-line:before{content:"\ed52"}.ri-folder-3-fill:before{content:"\ed53"}.ri-folder-3-line:before{content:"\ed54"}.ri-folder-4-fill:before{content:"\ed55"}.ri-folder-4-line:before{content:"\ed56"}.ri-folder-5-fill:before{content:"\ed57"}.ri-folder-5-line:before{content:"\ed58"}.ri-folder-add-fill:before{content:"\ed59"}.ri-folder-add-line:before{content:"\ed5a"}.ri-folder-chart-2-fill:before{content:"\ed5b"}.ri-folder-chart-2-line:before{content:"\ed5c"}.ri-folder-chart-fill:before{content:"\ed5d"}.ri-folder-chart-line:before{content:"\ed5e"}.ri-folder-download-fill:before{content:"\ed5f"}.ri-folder-download-line:before{content:"\ed60"}.ri-folder-fill:before{content:"\ed61"}.ri-folder-forbid-fill:before{content:"\ed62"}.ri-folder-forbid-line:before{content:"\ed63"}.ri-folder-history-fill:before{content:"\ed64"}.ri-folder-history-line:before{content:"\ed65"}.ri-folder-info-fill:before{content:"\ed66"}.ri-folder-info-line:before{content:"\ed67"}.ri-folder-keyhole-fill:before{content:"\ed68"}.ri-folder-keyhole-line:before{content:"\ed69"}.ri-folder-line:before{content:"\ed6a"}.ri-folder-lock-fill:before{content:"\ed6b"}.ri-folder-lock-line:before{content:"\ed6c"}.ri-folder-music-fill:before{content:"\ed6d"}.ri-folder-music-line:before{content:"\ed6e"}.ri-folder-open-fill:before{content:"\ed6f"}.ri-folder-open-line:before{content:"\ed70"}.ri-folder-received-fill:before{content:"\ed71"}.ri-folder-received-line:before{content:"\ed72"}.ri-folder-reduce-fill:before{content:"\ed73"}.ri-folder-reduce-line:before{content:"\ed74"}.ri-folder-settings-fill:before{content:"\ed75"}.ri-folder-settings-line:before{content:"\ed76"}.ri-folder-shared-fill:before{content:"\ed77"}.ri-folder-shared-line:before{content:"\ed78"}.ri-folder-shield-2-fill:before{content:"\ed79"}.ri-folder-shield-2-line:before{content:"\ed7a"}.ri-folder-shield-fill:before{content:"\ed7b"}.ri-folder-shield-line:before{content:"\ed7c"}.ri-folder-transfer-fill:before{content:"\ed7d"}.ri-folder-transfer-line:before{content:"\ed7e"}.ri-folder-unknow-fill:before{content:"\ed7f"}.ri-folder-unknow-line:before{content:"\ed80"}.ri-folder-upload-fill:before{content:"\ed81"}.ri-folder-upload-line:before{content:"\ed82"}.ri-folder-user-fill:before{content:"\ed83"}.ri-folder-user-line:before{content:"\ed84"}.ri-folder-warning-fill:before{content:"\ed85"}.ri-folder-warning-line:before{content:"\ed86"}.ri-folder-zip-fill:before{content:"\ed87"}.ri-folder-zip-line:before{content:"\ed88"}.ri-folders-fill:before{content:"\ed89"}.ri-folders-line:before{content:"\ed8a"}.ri-font-color:before{content:"\ed8b"}.ri-font-size-2:before{content:"\ed8c"}.ri-font-size:before{content:"\ed8d"}.ri-football-fill:before{content:"\ed8e"}.ri-football-line:before{content:"\ed8f"}.ri-footprint-fill:before{content:"\ed90"}.ri-footprint-line:before{content:"\ed91"}.ri-forbid-2-fill:before{content:"\ed92"}.ri-forbid-2-line:before{content:"\ed93"}.ri-forbid-fill:before{content:"\ed94"}.ri-forbid-line:before{content:"\ed95"}.ri-format-clear:before{content:"\ed96"}.ri-fridge-fill:before{content:"\ed97"}.ri-fridge-line:before{content:"\ed98"}.ri-fullscreen-exit-fill:before{content:"\ed99"}.ri-fullscreen-exit-line:before{content:"\ed9a"}.ri-fullscreen-fill:before{content:"\ed9b"}.ri-fullscreen-line:before{content:"\ed9c"}.ri-function-fill:before{content:"\ed9d"}.ri-function-line:before{content:"\ed9e"}.ri-functions:before{content:"\ed9f"}.ri-funds-box-fill:before{content:"\eda0"}.ri-funds-box-line:before{content:"\eda1"}.ri-funds-fill:before{content:"\eda2"}.ri-funds-line:before{content:"\eda3"}.ri-gallery-fill:before{content:"\eda4"}.ri-gallery-line:before{content:"\eda5"}.ri-gallery-upload-fill:before{content:"\eda6"}.ri-gallery-upload-line:before{content:"\eda7"}.ri-game-fill:before{content:"\eda8"}.ri-game-line:before{content:"\eda9"}.ri-gamepad-fill:before{content:"\edaa"}.ri-gamepad-line:before{content:"\edab"}.ri-gas-station-fill:before{content:"\edac"}.ri-gas-station-line:before{content:"\edad"}.ri-gatsby-fill:before{content:"\edae"}.ri-gatsby-line:before{content:"\edaf"}.ri-genderless-fill:before{content:"\edb0"}.ri-genderless-line:before{content:"\edb1"}.ri-ghost-2-fill:before{content:"\edb2"}.ri-ghost-2-line:before{content:"\edb3"}.ri-ghost-fill:before{content:"\edb4"}.ri-ghost-line:before{content:"\edb5"}.ri-ghost-smile-fill:before{content:"\edb6"}.ri-ghost-smile-line:before{content:"\edb7"}.ri-gift-2-fill:before{content:"\edb8"}.ri-gift-2-line:before{content:"\edb9"}.ri-gift-fill:before{content:"\edba"}.ri-gift-line:before{content:"\edbb"}.ri-git-branch-fill:before{content:"\edbc"}.ri-git-branch-line:before{content:"\edbd"}.ri-git-commit-fill:before{content:"\edbe"}.ri-git-commit-line:before{content:"\edbf"}.ri-git-merge-fill:before{content:"\edc0"}.ri-git-merge-line:before{content:"\edc1"}.ri-git-pull-request-fill:before{content:"\edc2"}.ri-git-pull-request-line:before{content:"\edc3"}.ri-git-repository-commits-fill:before{content:"\edc4"}.ri-git-repository-commits-line:before{content:"\edc5"}.ri-git-repository-fill:before{content:"\edc6"}.ri-git-repository-line:before{content:"\edc7"}.ri-git-repository-private-fill:before{content:"\edc8"}.ri-git-repository-private-line:before{content:"\edc9"}.ri-github-fill:before{content:"\edca"}.ri-github-line:before{content:"\edcb"}.ri-gitlab-fill:before{content:"\edcc"}.ri-gitlab-line:before{content:"\edcd"}.ri-global-fill:before{content:"\edce"}.ri-global-line:before{content:"\edcf"}.ri-globe-fill:before{content:"\edd0"}.ri-globe-line:before{content:"\edd1"}.ri-goblet-fill:before{content:"\edd2"}.ri-goblet-line:before{content:"\edd3"}.ri-google-fill:before{content:"\edd4"}.ri-google-line:before{content:"\edd5"}.ri-google-play-fill:before{content:"\edd6"}.ri-google-play-line:before{content:"\edd7"}.ri-government-fill:before{content:"\edd8"}.ri-government-line:before{content:"\edd9"}.ri-gps-fill:before{content:"\edda"}.ri-gps-line:before{content:"\eddb"}.ri-gradienter-fill:before{content:"\eddc"}.ri-gradienter-line:before{content:"\eddd"}.ri-grid-fill:before{content:"\edde"}.ri-grid-line:before{content:"\eddf"}.ri-group-2-fill:before{content:"\ede0"}.ri-group-2-line:before{content:"\ede1"}.ri-group-fill:before{content:"\ede2"}.ri-group-line:before{content:"\ede3"}.ri-guide-fill:before{content:"\ede4"}.ri-guide-line:before{content:"\ede5"}.ri-h-1:before{content:"\ede6"}.ri-h-2:before{content:"\ede7"}.ri-h-3:before{content:"\ede8"}.ri-h-4:before{content:"\ede9"}.ri-h-5:before{content:"\edea"}.ri-h-6:before{content:"\edeb"}.ri-hail-fill:before{content:"\edec"}.ri-hail-line:before{content:"\eded"}.ri-hammer-fill:before{content:"\edee"}.ri-hammer-line:before{content:"\edef"}.ri-hand-coin-fill:before{content:"\edf0"}.ri-hand-coin-line:before{content:"\edf1"}.ri-hand-heart-fill:before{content:"\edf2"}.ri-hand-heart-line:before{content:"\edf3"}.ri-hand-sanitizer-fill:before{content:"\edf4"}.ri-hand-sanitizer-line:before{content:"\edf5"}.ri-handbag-fill:before{content:"\edf6"}.ri-handbag-line:before{content:"\edf7"}.ri-hard-drive-2-fill:before{content:"\edf8"}.ri-hard-drive-2-line:before{content:"\edf9"}.ri-hard-drive-fill:before{content:"\edfa"}.ri-hard-drive-line:before{content:"\edfb"}.ri-hashtag:before{content:"\edfc"}.ri-haze-2-fill:before{content:"\edfd"}.ri-haze-2-line:before{content:"\edfe"}.ri-haze-fill:before{content:"\edff"}.ri-haze-line:before{content:"\ee00"}.ri-hd-fill:before{content:"\ee01"}.ri-hd-line:before{content:"\ee02"}.ri-heading:before{content:"\ee03"}.ri-headphone-fill:before{content:"\ee04"}.ri-headphone-line:before{content:"\ee05"}.ri-health-book-fill:before{content:"\ee06"}.ri-health-book-line:before{content:"\ee07"}.ri-heart-2-fill:before{content:"\ee08"}.ri-heart-2-line:before{content:"\ee09"}.ri-heart-3-fill:before{content:"\ee0a"}.ri-heart-3-line:before{content:"\ee0b"}.ri-heart-add-fill:before{content:"\ee0c"}.ri-heart-add-line:before{content:"\ee0d"}.ri-heart-fill:before{content:"\ee0e"}.ri-heart-line:before{content:"\ee0f"}.ri-heart-pulse-fill:before{content:"\ee10"}.ri-heart-pulse-line:before{content:"\ee11"}.ri-hearts-fill:before{content:"\ee12"}.ri-hearts-line:before{content:"\ee13"}.ri-heavy-showers-fill:before{content:"\ee14"}.ri-heavy-showers-line:before{content:"\ee15"}.ri-history-fill:before{content:"\ee16"}.ri-history-line:before{content:"\ee17"}.ri-home-2-fill:before{content:"\ee18"}.ri-home-2-line:before{content:"\ee19"}.ri-home-3-fill:before{content:"\ee1a"}.ri-home-3-line:before{content:"\ee1b"}.ri-home-4-fill:before{content:"\ee1c"}.ri-home-4-line:before{content:"\ee1d"}.ri-home-5-fill:before{content:"\ee1e"}.ri-home-5-line:before{content:"\ee1f"}.ri-home-6-fill:before{content:"\ee20"}.ri-home-6-line:before{content:"\ee21"}.ri-home-7-fill:before{content:"\ee22"}.ri-home-7-line:before{content:"\ee23"}.ri-home-8-fill:before{content:"\ee24"}.ri-home-8-line:before{content:"\ee25"}.ri-home-fill:before{content:"\ee26"}.ri-home-gear-fill:before{content:"\ee27"}.ri-home-gear-line:before{content:"\ee28"}.ri-home-heart-fill:before{content:"\ee29"}.ri-home-heart-line:before{content:"\ee2a"}.ri-home-line:before{content:"\ee2b"}.ri-home-smile-2-fill:before{content:"\ee2c"}.ri-home-smile-2-line:before{content:"\ee2d"}.ri-home-smile-fill:before{content:"\ee2e"}.ri-home-smile-line:before{content:"\ee2f"}.ri-home-wifi-fill:before{content:"\ee30"}.ri-home-wifi-line:before{content:"\ee31"}.ri-honor-of-kings-fill:before{content:"\ee32"}.ri-honor-of-kings-line:before{content:"\ee33"}.ri-honour-fill:before{content:"\ee34"}.ri-honour-line:before{content:"\ee35"}.ri-hospital-fill:before{content:"\ee36"}.ri-hospital-line:before{content:"\ee37"}.ri-hotel-bed-fill:before{content:"\ee38"}.ri-hotel-bed-line:before{content:"\ee39"}.ri-hotel-fill:before{content:"\ee3a"}.ri-hotel-line:before{content:"\ee3b"}.ri-hotspot-fill:before{content:"\ee3c"}.ri-hotspot-line:before{content:"\ee3d"}.ri-hq-fill:before{content:"\ee3e"}.ri-hq-line:before{content:"\ee3f"}.ri-html5-fill:before{content:"\ee40"}.ri-html5-line:before{content:"\ee41"}.ri-ie-fill:before{content:"\ee42"}.ri-ie-line:before{content:"\ee43"}.ri-image-2-fill:before{content:"\ee44"}.ri-image-2-line:before{content:"\ee45"}.ri-image-add-fill:before{content:"\ee46"}.ri-image-add-line:before{content:"\ee47"}.ri-image-edit-fill:before{content:"\ee48"}.ri-image-edit-line:before{content:"\ee49"}.ri-image-fill:before{content:"\ee4a"}.ri-image-line:before{content:"\ee4b"}.ri-inbox-archive-fill:before{content:"\ee4c"}.ri-inbox-archive-line:before{content:"\ee4d"}.ri-inbox-fill:before{content:"\ee4e"}.ri-inbox-line:before{content:"\ee4f"}.ri-inbox-unarchive-fill:before{content:"\ee50"}.ri-inbox-unarchive-line:before{content:"\ee51"}.ri-increase-decrease-fill:before{content:"\ee52"}.ri-increase-decrease-line:before{content:"\ee53"}.ri-indent-decrease:before{content:"\ee54"}.ri-indent-increase:before{content:"\ee55"}.ri-indeterminate-circle-fill:before{content:"\ee56"}.ri-indeterminate-circle-line:before{content:"\ee57"}.ri-information-fill:before{content:"\ee58"}.ri-information-line:before{content:"\ee59"}.ri-infrared-thermometer-fill:before{content:"\ee5a"}.ri-infrared-thermometer-line:before{content:"\ee5b"}.ri-ink-bottle-fill:before{content:"\ee5c"}.ri-ink-bottle-line:before{content:"\ee5d"}.ri-input-cursor-move:before{content:"\ee5e"}.ri-input-method-fill:before{content:"\ee5f"}.ri-input-method-line:before{content:"\ee60"}.ri-insert-column-left:before{content:"\ee61"}.ri-insert-column-right:before{content:"\ee62"}.ri-insert-row-bottom:before{content:"\ee63"}.ri-insert-row-top:before{content:"\ee64"}.ri-instagram-fill:before{content:"\ee65"}.ri-instagram-line:before{content:"\ee66"}.ri-install-fill:before{content:"\ee67"}.ri-install-line:before{content:"\ee68"}.ri-invision-fill:before{content:"\ee69"}.ri-invision-line:before{content:"\ee6a"}.ri-italic:before{content:"\ee6b"}.ri-kakao-talk-fill:before{content:"\ee6c"}.ri-kakao-talk-line:before{content:"\ee6d"}.ri-key-2-fill:before{content:"\ee6e"}.ri-key-2-line:before{content:"\ee6f"}.ri-key-fill:before{content:"\ee70"}.ri-key-line:before{content:"\ee71"}.ri-keyboard-box-fill:before{content:"\ee72"}.ri-keyboard-box-line:before{content:"\ee73"}.ri-keyboard-fill:before{content:"\ee74"}.ri-keyboard-line:before{content:"\ee75"}.ri-keynote-fill:before{content:"\ee76"}.ri-keynote-line:before{content:"\ee77"}.ri-knife-blood-fill:before{content:"\ee78"}.ri-knife-blood-line:before{content:"\ee79"}.ri-knife-fill:before{content:"\ee7a"}.ri-knife-line:before{content:"\ee7b"}.ri-landscape-fill:before{content:"\ee7c"}.ri-landscape-line:before{content:"\ee7d"}.ri-layout-2-fill:before{content:"\ee7e"}.ri-layout-2-line:before{content:"\ee7f"}.ri-layout-3-fill:before{content:"\ee80"}.ri-layout-3-line:before{content:"\ee81"}.ri-layout-4-fill:before{content:"\ee82"}.ri-layout-4-line:before{content:"\ee83"}.ri-layout-5-fill:before{content:"\ee84"}.ri-layout-5-line:before{content:"\ee85"}.ri-layout-6-fill:before{content:"\ee86"}.ri-layout-6-line:before{content:"\ee87"}.ri-layout-bottom-2-fill:before{content:"\ee88"}.ri-layout-bottom-2-line:before{content:"\ee89"}.ri-layout-bottom-fill:before{content:"\ee8a"}.ri-layout-bottom-line:before{content:"\ee8b"}.ri-layout-column-fill:before{content:"\ee8c"}.ri-layout-column-line:before{content:"\ee8d"}.ri-layout-fill:before{content:"\ee8e"}.ri-layout-grid-fill:before{content:"\ee8f"}.ri-layout-grid-line:before{content:"\ee90"}.ri-layout-left-2-fill:before{content:"\ee91"}.ri-layout-left-2-line:before{content:"\ee92"}.ri-layout-left-fill:before{content:"\ee93"}.ri-layout-left-line:before{content:"\ee94"}.ri-layout-line:before{content:"\ee95"}.ri-layout-masonry-fill:before{content:"\ee96"}.ri-layout-masonry-line:before{content:"\ee97"}.ri-layout-right-2-fill:before{content:"\ee98"}.ri-layout-right-2-line:before{content:"\ee99"}.ri-layout-right-fill:before{content:"\ee9a"}.ri-layout-right-line:before{content:"\ee9b"}.ri-layout-row-fill:before{content:"\ee9c"}.ri-layout-row-line:before{content:"\ee9d"}.ri-layout-top-2-fill:before{content:"\ee9e"}.ri-layout-top-2-line:before{content:"\ee9f"}.ri-layout-top-fill:before{content:"\eea0"}.ri-layout-top-line:before{content:"\eea1"}.ri-leaf-fill:before{content:"\eea2"}.ri-leaf-line:before{content:"\eea3"}.ri-lifebuoy-fill:before{content:"\eea4"}.ri-lifebuoy-line:before{content:"\eea5"}.ri-lightbulb-fill:before{content:"\eea6"}.ri-lightbulb-flash-fill:before{content:"\eea7"}.ri-lightbulb-flash-line:before{content:"\eea8"}.ri-lightbulb-line:before{content:"\eea9"}.ri-line-chart-fill:before{content:"\eeaa"}.ri-line-chart-line:before{content:"\eeab"}.ri-line-fill:before{content:"\eeac"}.ri-line-height:before{content:"\eead"}.ri-line-line:before{content:"\eeae"}.ri-link-m:before{content:"\eeaf"}.ri-link-unlink-m:before{content:"\eeb0"}.ri-link-unlink:before{content:"\eeb1"}.ri-link:before{content:"\eeb2"}.ri-linkedin-box-fill:before{content:"\eeb3"}.ri-linkedin-box-line:before{content:"\eeb4"}.ri-linkedin-fill:before{content:"\eeb5"}.ri-linkedin-line:before{content:"\eeb6"}.ri-links-fill:before{content:"\eeb7"}.ri-links-line:before{content:"\eeb8"}.ri-list-check-2:before{content:"\eeb9"}.ri-list-check:before{content:"\eeba"}.ri-list-ordered:before{content:"\eebb"}.ri-list-settings-fill:before{content:"\eebc"}.ri-list-settings-line:before{content:"\eebd"}.ri-list-unordered:before{content:"\eebe"}.ri-live-fill:before{content:"\eebf"}.ri-live-line:before{content:"\eec0"}.ri-loader-2-fill:before{content:"\eec1"}.ri-loader-2-line:before{content:"\eec2"}.ri-loader-3-fill:before{content:"\eec3"}.ri-loader-3-line:before{content:"\eec4"}.ri-loader-4-fill:before{content:"\eec5"}.ri-loader-4-line:before{content:"\eec6"}.ri-loader-5-fill:before{content:"\eec7"}.ri-loader-5-line:before{content:"\eec8"}.ri-loader-fill:before{content:"\eec9"}.ri-loader-line:before{content:"\eeca"}.ri-lock-2-fill:before{content:"\eecb"}.ri-lock-2-line:before{content:"\eecc"}.ri-lock-fill:before{content:"\eecd"}.ri-lock-line:before{content:"\eece"}.ri-lock-password-fill:before{content:"\eecf"}.ri-lock-password-line:before{content:"\eed0"}.ri-lock-unlock-fill:before{content:"\eed1"}.ri-lock-unlock-line:before{content:"\eed2"}.ri-login-box-fill:before{content:"\eed3"}.ri-login-box-line:before{content:"\eed4"}.ri-login-circle-fill:before{content:"\eed5"}.ri-login-circle-line:before{content:"\eed6"}.ri-logout-box-fill:before{content:"\eed7"}.ri-logout-box-line:before{content:"\eed8"}.ri-logout-box-r-fill:before{content:"\eed9"}.ri-logout-box-r-line:before{content:"\eeda"}.ri-logout-circle-fill:before{content:"\eedb"}.ri-logout-circle-line:before{content:"\eedc"}.ri-logout-circle-r-fill:before{content:"\eedd"}.ri-logout-circle-r-line:before{content:"\eede"}.ri-luggage-cart-fill:before{content:"\eedf"}.ri-luggage-cart-line:before{content:"\eee0"}.ri-luggage-deposit-fill:before{content:"\eee1"}.ri-luggage-deposit-line:before{content:"\eee2"}.ri-lungs-fill:before{content:"\eee3"}.ri-lungs-line:before{content:"\eee4"}.ri-mac-fill:before{content:"\eee5"}.ri-mac-line:before{content:"\eee6"}.ri-macbook-fill:before{content:"\eee7"}.ri-macbook-line:before{content:"\eee8"}.ri-magic-fill:before{content:"\eee9"}.ri-magic-line:before{content:"\eeea"}.ri-mail-add-fill:before{content:"\eeeb"}.ri-mail-add-line:before{content:"\eeec"}.ri-mail-check-fill:before{content:"\eeed"}.ri-mail-check-line:before{content:"\eeee"}.ri-mail-close-fill:before{content:"\eeef"}.ri-mail-close-line:before{content:"\eef0"}.ri-mail-download-fill:before{content:"\eef1"}.ri-mail-download-line:before{content:"\eef2"}.ri-mail-fill:before{content:"\eef3"}.ri-mail-forbid-fill:before{content:"\eef4"}.ri-mail-forbid-line:before{content:"\eef5"}.ri-mail-line:before{content:"\eef6"}.ri-mail-lock-fill:before{content:"\eef7"}.ri-mail-lock-line:before{content:"\eef8"}.ri-mail-open-fill:before{content:"\eef9"}.ri-mail-open-line:before{content:"\eefa"}.ri-mail-send-fill:before{content:"\eefb"}.ri-mail-send-line:before{content:"\eefc"}.ri-mail-settings-fill:before{content:"\eefd"}.ri-mail-settings-line:before{content:"\eefe"}.ri-mail-star-fill:before{content:"\eeff"}.ri-mail-star-line:before{content:"\ef00"}.ri-mail-unread-fill:before{content:"\ef01"}.ri-mail-unread-line:before{content:"\ef02"}.ri-mail-volume-fill:before{content:"\ef03"}.ri-mail-volume-line:before{content:"\ef04"}.ri-map-2-fill:before{content:"\ef05"}.ri-map-2-line:before{content:"\ef06"}.ri-map-fill:before{content:"\ef07"}.ri-map-line:before{content:"\ef08"}.ri-map-pin-2-fill:before{content:"\ef09"}.ri-map-pin-2-line:before{content:"\ef0a"}.ri-map-pin-3-fill:before{content:"\ef0b"}.ri-map-pin-3-line:before{content:"\ef0c"}.ri-map-pin-4-fill:before{content:"\ef0d"}.ri-map-pin-4-line:before{content:"\ef0e"}.ri-map-pin-5-fill:before{content:"\ef0f"}.ri-map-pin-5-line:before{content:"\ef10"}.ri-map-pin-add-fill:before{content:"\ef11"}.ri-map-pin-add-line:before{content:"\ef12"}.ri-map-pin-fill:before{content:"\ef13"}.ri-map-pin-line:before{content:"\ef14"}.ri-map-pin-range-fill:before{content:"\ef15"}.ri-map-pin-range-line:before{content:"\ef16"}.ri-map-pin-time-fill:before{content:"\ef17"}.ri-map-pin-time-line:before{content:"\ef18"}.ri-map-pin-user-fill:before{content:"\ef19"}.ri-map-pin-user-line:before{content:"\ef1a"}.ri-mark-pen-fill:before{content:"\ef1b"}.ri-mark-pen-line:before{content:"\ef1c"}.ri-markdown-fill:before{content:"\ef1d"}.ri-markdown-line:before{content:"\ef1e"}.ri-markup-fill:before{content:"\ef1f"}.ri-markup-line:before{content:"\ef20"}.ri-mastercard-fill:before{content:"\ef21"}.ri-mastercard-line:before{content:"\ef22"}.ri-mastodon-fill:before{content:"\ef23"}.ri-mastodon-line:before{content:"\ef24"}.ri-medal-2-fill:before{content:"\ef25"}.ri-medal-2-line:before{content:"\ef26"}.ri-medal-fill:before{content:"\ef27"}.ri-medal-line:before{content:"\ef28"}.ri-medicine-bottle-fill:before{content:"\ef29"}.ri-medicine-bottle-line:before{content:"\ef2a"}.ri-medium-fill:before{content:"\ef2b"}.ri-medium-line:before{content:"\ef2c"}.ri-men-fill:before{content:"\ef2d"}.ri-men-line:before{content:"\ef2e"}.ri-mental-health-fill:before{content:"\ef2f"}.ri-mental-health-line:before{content:"\ef30"}.ri-menu-2-fill:before{content:"\ef31"}.ri-menu-2-line:before{content:"\ef32"}.ri-menu-3-fill:before{content:"\ef33"}.ri-menu-3-line:before{content:"\ef34"}.ri-menu-4-fill:before{content:"\ef35"}.ri-menu-4-line:before{content:"\ef36"}.ri-menu-5-fill:before{content:"\ef37"}.ri-menu-5-line:before{content:"\ef38"}.ri-menu-add-fill:before{content:"\ef39"}.ri-menu-add-line:before{content:"\ef3a"}.ri-menu-fill:before{content:"\ef3b"}.ri-menu-fold-fill:before{content:"\ef3c"}.ri-menu-fold-line:before{content:"\ef3d"}.ri-menu-line:before{content:"\ef3e"}.ri-menu-unfold-fill:before{content:"\ef3f"}.ri-menu-unfold-line:before{content:"\ef40"}.ri-merge-cells-horizontal:before{content:"\ef41"}.ri-merge-cells-vertical:before{content:"\ef42"}.ri-message-2-fill:before{content:"\ef43"}.ri-message-2-line:before{content:"\ef44"}.ri-message-3-fill:before{content:"\ef45"}.ri-message-3-line:before{content:"\ef46"}.ri-message-fill:before{content:"\ef47"}.ri-message-line:before{content:"\ef48"}.ri-messenger-fill:before{content:"\ef49"}.ri-messenger-line:before{content:"\ef4a"}.ri-meteor-fill:before{content:"\ef4b"}.ri-meteor-line:before{content:"\ef4c"}.ri-mic-2-fill:before{content:"\ef4d"}.ri-mic-2-line:before{content:"\ef4e"}.ri-mic-fill:before{content:"\ef4f"}.ri-mic-line:before{content:"\ef50"}.ri-mic-off-fill:before{content:"\ef51"}.ri-mic-off-line:before{content:"\ef52"}.ri-mickey-fill:before{content:"\ef53"}.ri-mickey-line:before{content:"\ef54"}.ri-microscope-fill:before{content:"\ef55"}.ri-microscope-line:before{content:"\ef56"}.ri-microsoft-fill:before{content:"\ef57"}.ri-microsoft-line:before{content:"\ef58"}.ri-mind-map:before{content:"\ef59"}.ri-mini-program-fill:before{content:"\ef5a"}.ri-mini-program-line:before{content:"\ef5b"}.ri-mist-fill:before{content:"\ef5c"}.ri-mist-line:before{content:"\ef5d"}.ri-money-cny-box-fill:before{content:"\ef5e"}.ri-money-cny-box-line:before{content:"\ef5f"}.ri-money-cny-circle-fill:before{content:"\ef60"}.ri-money-cny-circle-line:before{content:"\ef61"}.ri-money-dollar-box-fill:before{content:"\ef62"}.ri-money-dollar-box-line:before{content:"\ef63"}.ri-money-dollar-circle-fill:before{content:"\ef64"}.ri-money-dollar-circle-line:before{content:"\ef65"}.ri-money-euro-box-fill:before{content:"\ef66"}.ri-money-euro-box-line:before{content:"\ef67"}.ri-money-euro-circle-fill:before{content:"\ef68"}.ri-money-euro-circle-line:before{content:"\ef69"}.ri-money-pound-box-fill:before{content:"\ef6a"}.ri-money-pound-box-line:before{content:"\ef6b"}.ri-money-pound-circle-fill:before{content:"\ef6c"}.ri-money-pound-circle-line:before{content:"\ef6d"}.ri-moon-clear-fill:before{content:"\ef6e"}.ri-moon-clear-line:before{content:"\ef6f"}.ri-moon-cloudy-fill:before{content:"\ef70"}.ri-moon-cloudy-line:before{content:"\ef71"}.ri-moon-fill:before{content:"\ef72"}.ri-moon-foggy-fill:before{content:"\ef73"}.ri-moon-foggy-line:before{content:"\ef74"}.ri-moon-line:before{content:"\ef75"}.ri-more-2-fill:before{content:"\ef76"}.ri-more-2-line:before{content:"\ef77"}.ri-more-fill:before{content:"\ef78"}.ri-more-line:before{content:"\ef79"}.ri-motorbike-fill:before{content:"\ef7a"}.ri-motorbike-line:before{content:"\ef7b"}.ri-mouse-fill:before{content:"\ef7c"}.ri-mouse-line:before{content:"\ef7d"}.ri-movie-2-fill:before{content:"\ef7e"}.ri-movie-2-line:before{content:"\ef7f"}.ri-movie-fill:before{content:"\ef80"}.ri-movie-line:before{content:"\ef81"}.ri-music-2-fill:before{content:"\ef82"}.ri-music-2-line:before{content:"\ef83"}.ri-music-fill:before{content:"\ef84"}.ri-music-line:before{content:"\ef85"}.ri-mv-fill:before{content:"\ef86"}.ri-mv-line:before{content:"\ef87"}.ri-navigation-fill:before{content:"\ef88"}.ri-navigation-line:before{content:"\ef89"}.ri-netease-cloud-music-fill:before{content:"\ef8a"}.ri-netease-cloud-music-line:before{content:"\ef8b"}.ri-netflix-fill:before{content:"\ef8c"}.ri-netflix-line:before{content:"\ef8d"}.ri-newspaper-fill:before{content:"\ef8e"}.ri-newspaper-line:before{content:"\ef8f"}.ri-node-tree:before{content:"\ef90"}.ri-notification-2-fill:before{content:"\ef91"}.ri-notification-2-line:before{content:"\ef92"}.ri-notification-3-fill:before{content:"\ef93"}.ri-notification-3-line:before{content:"\ef94"}.ri-notification-4-fill:before{content:"\ef95"}.ri-notification-4-line:before{content:"\ef96"}.ri-notification-badge-fill:before{content:"\ef97"}.ri-notification-badge-line:before{content:"\ef98"}.ri-notification-fill:before{content:"\ef99"}.ri-notification-line:before{content:"\ef9a"}.ri-notification-off-fill:before{content:"\ef9b"}.ri-notification-off-line:before{content:"\ef9c"}.ri-npmjs-fill:before{content:"\ef9d"}.ri-npmjs-line:before{content:"\ef9e"}.ri-number-0:before{content:"\ef9f"}.ri-number-1:before{content:"\efa0"}.ri-number-2:before{content:"\efa1"}.ri-number-3:before{content:"\efa2"}.ri-number-4:before{content:"\efa3"}.ri-number-5:before{content:"\efa4"}.ri-number-6:before{content:"\efa5"}.ri-number-7:before{content:"\efa6"}.ri-number-8:before{content:"\efa7"}.ri-number-9:before{content:"\efa8"}.ri-numbers-fill:before{content:"\efa9"}.ri-numbers-line:before{content:"\efaa"}.ri-nurse-fill:before{content:"\efab"}.ri-nurse-line:before{content:"\efac"}.ri-oil-fill:before{content:"\efad"}.ri-oil-line:before{content:"\efae"}.ri-omega:before{content:"\efaf"}.ri-open-arm-fill:before{content:"\efb0"}.ri-open-arm-line:before{content:"\efb1"}.ri-open-source-fill:before{content:"\efb2"}.ri-open-source-line:before{content:"\efb3"}.ri-opera-fill:before{content:"\efb4"}.ri-opera-line:before{content:"\efb5"}.ri-order-play-fill:before{content:"\efb6"}.ri-order-play-line:before{content:"\efb7"}.ri-organization-chart:before{content:"\efb8"}.ri-outlet-2-fill:before{content:"\efb9"}.ri-outlet-2-line:before{content:"\efba"}.ri-outlet-fill:before{content:"\efbb"}.ri-outlet-line:before{content:"\efbc"}.ri-page-separator:before{content:"\efbd"}.ri-pages-fill:before{content:"\efbe"}.ri-pages-line:before{content:"\efbf"}.ri-paint-brush-fill:before{content:"\efc0"}.ri-paint-brush-line:before{content:"\efc1"}.ri-paint-fill:before{content:"\efc2"}.ri-paint-line:before{content:"\efc3"}.ri-palette-fill:before{content:"\efc4"}.ri-palette-line:before{content:"\efc5"}.ri-pantone-fill:before{content:"\efc6"}.ri-pantone-line:before{content:"\efc7"}.ri-paragraph:before{content:"\efc8"}.ri-parent-fill:before{content:"\efc9"}.ri-parent-line:before{content:"\efca"}.ri-parentheses-fill:before{content:"\efcb"}.ri-parentheses-line:before{content:"\efcc"}.ri-parking-box-fill:before{content:"\efcd"}.ri-parking-box-line:before{content:"\efce"}.ri-parking-fill:before{content:"\efcf"}.ri-parking-line:before{content:"\efd0"}.ri-passport-fill:before{content:"\efd1"}.ri-passport-line:before{content:"\efd2"}.ri-patreon-fill:before{content:"\efd3"}.ri-patreon-line:before{content:"\efd4"}.ri-pause-circle-fill:before{content:"\efd5"}.ri-pause-circle-line:before{content:"\efd6"}.ri-pause-fill:before{content:"\efd7"}.ri-pause-line:before{content:"\efd8"}.ri-pause-mini-fill:before{content:"\efd9"}.ri-pause-mini-line:before{content:"\efda"}.ri-paypal-fill:before{content:"\efdb"}.ri-paypal-line:before{content:"\efdc"}.ri-pen-nib-fill:before{content:"\efdd"}.ri-pen-nib-line:before{content:"\efde"}.ri-pencil-fill:before{content:"\efdf"}.ri-pencil-line:before{content:"\efe0"}.ri-pencil-ruler-2-fill:before{content:"\efe1"}.ri-pencil-ruler-2-line:before{content:"\efe2"}.ri-pencil-ruler-fill:before{content:"\efe3"}.ri-pencil-ruler-line:before{content:"\efe4"}.ri-percent-fill:before{content:"\efe5"}.ri-percent-line:before{content:"\efe6"}.ri-phone-camera-fill:before{content:"\efe7"}.ri-phone-camera-line:before{content:"\efe8"}.ri-phone-fill:before{content:"\efe9"}.ri-phone-find-fill:before{content:"\efea"}.ri-phone-find-line:before{content:"\efeb"}.ri-phone-line:before{content:"\efec"}.ri-phone-lock-fill:before{content:"\efed"}.ri-phone-lock-line:before{content:"\efee"}.ri-picture-in-picture-2-fill:before{content:"\efef"}.ri-picture-in-picture-2-line:before{content:"\eff0"}.ri-picture-in-picture-exit-fill:before{content:"\eff1"}.ri-picture-in-picture-exit-line:before{content:"\eff2"}.ri-picture-in-picture-fill:before{content:"\eff3"}.ri-picture-in-picture-line:before{content:"\eff4"}.ri-pie-chart-2-fill:before{content:"\eff5"}.ri-pie-chart-2-line:before{content:"\eff6"}.ri-pie-chart-box-fill:before{content:"\eff7"}.ri-pie-chart-box-line:before{content:"\eff8"}.ri-pie-chart-fill:before{content:"\eff9"}.ri-pie-chart-line:before{content:"\effa"}.ri-pin-distance-fill:before{content:"\effb"}.ri-pin-distance-line:before{content:"\effc"}.ri-ping-pong-fill:before{content:"\effd"}.ri-ping-pong-line:before{content:"\effe"}.ri-pinterest-fill:before{content:"\efff"}.ri-pinterest-line:before{content:"\f000"}.ri-pinyin-input:before{content:"\f001"}.ri-pixelfed-fill:before{content:"\f002"}.ri-pixelfed-line:before{content:"\f003"}.ri-plane-fill:before{content:"\f004"}.ri-plane-line:before{content:"\f005"}.ri-plant-fill:before{content:"\f006"}.ri-plant-line:before{content:"\f007"}.ri-play-circle-fill:before{content:"\f008"}.ri-play-circle-line:before{content:"\f009"}.ri-play-fill:before{content:"\f00a"}.ri-play-line:before{content:"\f00b"}.ri-play-list-2-fill:before{content:"\f00c"}.ri-play-list-2-line:before{content:"\f00d"}.ri-play-list-add-fill:before{content:"\f00e"}.ri-play-list-add-line:before{content:"\f00f"}.ri-play-list-fill:before{content:"\f010"}.ri-play-list-line:before{content:"\f011"}.ri-play-mini-fill:before{content:"\f012"}.ri-play-mini-line:before{content:"\f013"}.ri-playstation-fill:before{content:"\f014"}.ri-playstation-line:before{content:"\f015"}.ri-plug-2-fill:before{content:"\f016"}.ri-plug-2-line:before{content:"\f017"}.ri-plug-fill:before{content:"\f018"}.ri-plug-line:before{content:"\f019"}.ri-polaroid-2-fill:before{content:"\f01a"}.ri-polaroid-2-line:before{content:"\f01b"}.ri-polaroid-fill:before{content:"\f01c"}.ri-polaroid-line:before{content:"\f01d"}.ri-police-car-fill:before{content:"\f01e"}.ri-police-car-line:before{content:"\f01f"}.ri-price-tag-2-fill:before{content:"\f020"}.ri-price-tag-2-line:before{content:"\f021"}.ri-price-tag-3-fill:before{content:"\f022"}.ri-price-tag-3-line:before{content:"\f023"}.ri-price-tag-fill:before{content:"\f024"}.ri-price-tag-line:before{content:"\f025"}.ri-printer-cloud-fill:before{content:"\f026"}.ri-printer-cloud-line:before{content:"\f027"}.ri-printer-fill:before{content:"\f028"}.ri-printer-line:before{content:"\f029"}.ri-product-hunt-fill:before{content:"\f02a"}.ri-product-hunt-line:before{content:"\f02b"}.ri-profile-fill:before{content:"\f02c"}.ri-profile-line:before{content:"\f02d"}.ri-projector-2-fill:before{content:"\f02e"}.ri-projector-2-line:before{content:"\f02f"}.ri-projector-fill:before{content:"\f030"}.ri-projector-line:before{content:"\f031"}.ri-psychotherapy-fill:before{content:"\f032"}.ri-psychotherapy-line:before{content:"\f033"}.ri-pulse-fill:before{content:"\f034"}.ri-pulse-line:before{content:"\f035"}.ri-pushpin-2-fill:before{content:"\f036"}.ri-pushpin-2-line:before{content:"\f037"}.ri-pushpin-fill:before{content:"\f038"}.ri-pushpin-line:before{content:"\f039"}.ri-qq-fill:before{content:"\f03a"}.ri-qq-line:before{content:"\f03b"}.ri-qr-code-fill:before{content:"\f03c"}.ri-qr-code-line:before{content:"\f03d"}.ri-qr-scan-2-fill:before{content:"\f03e"}.ri-qr-scan-2-line:before{content:"\f03f"}.ri-qr-scan-fill:before{content:"\f040"}.ri-qr-scan-line:before{content:"\f041"}.ri-question-answer-fill:before{content:"\f042"}.ri-question-answer-line:before{content:"\f043"}.ri-question-fill:before{content:"\f044"}.ri-question-line:before{content:"\f045"}.ri-question-mark:before{content:"\f046"}.ri-questionnaire-fill:before{content:"\f047"}.ri-questionnaire-line:before{content:"\f048"}.ri-quill-pen-fill:before{content:"\f049"}.ri-quill-pen-line:before{content:"\f04a"}.ri-radar-fill:before{content:"\f04b"}.ri-radar-line:before{content:"\f04c"}.ri-radio-2-fill:before{content:"\f04d"}.ri-radio-2-line:before{content:"\f04e"}.ri-radio-button-fill:before{content:"\f04f"}.ri-radio-button-line:before{content:"\f050"}.ri-radio-fill:before{content:"\f051"}.ri-radio-line:before{content:"\f052"}.ri-rainbow-fill:before{content:"\f053"}.ri-rainbow-line:before{content:"\f054"}.ri-rainy-fill:before{content:"\f055"}.ri-rainy-line:before{content:"\f056"}.ri-reactjs-fill:before{content:"\f057"}.ri-reactjs-line:before{content:"\f058"}.ri-record-circle-fill:before{content:"\f059"}.ri-record-circle-line:before{content:"\f05a"}.ri-record-mail-fill:before{content:"\f05b"}.ri-record-mail-line:before{content:"\f05c"}.ri-recycle-fill:before{content:"\f05d"}.ri-recycle-line:before{content:"\f05e"}.ri-red-packet-fill:before{content:"\f05f"}.ri-red-packet-line:before{content:"\f060"}.ri-reddit-fill:before{content:"\f061"}.ri-reddit-line:before{content:"\f062"}.ri-refresh-fill:before{content:"\f063"}.ri-refresh-line:before{content:"\f064"}.ri-refund-2-fill:before{content:"\f065"}.ri-refund-2-line:before{content:"\f066"}.ri-refund-fill:before{content:"\f067"}.ri-refund-line:before{content:"\f068"}.ri-registered-fill:before{content:"\f069"}.ri-registered-line:before{content:"\f06a"}.ri-remixicon-fill:before{content:"\f06b"}.ri-remixicon-line:before{content:"\f06c"}.ri-remote-control-2-fill:before{content:"\f06d"}.ri-remote-control-2-line:before{content:"\f06e"}.ri-remote-control-fill:before{content:"\f06f"}.ri-remote-control-line:before{content:"\f070"}.ri-repeat-2-fill:before{content:"\f071"}.ri-repeat-2-line:before{content:"\f072"}.ri-repeat-fill:before{content:"\f073"}.ri-repeat-line:before{content:"\f074"}.ri-repeat-one-fill:before{content:"\f075"}.ri-repeat-one-line:before{content:"\f076"}.ri-reply-all-fill:before{content:"\f077"}.ri-reply-all-line:before{content:"\f078"}.ri-reply-fill:before{content:"\f079"}.ri-reply-line:before{content:"\f07a"}.ri-reserved-fill:before{content:"\f07b"}.ri-reserved-line:before{content:"\f07c"}.ri-rest-time-fill:before{content:"\f07d"}.ri-rest-time-line:before{content:"\f07e"}.ri-restart-fill:before{content:"\f07f"}.ri-restart-line:before{content:"\f080"}.ri-restaurant-2-fill:before{content:"\f081"}.ri-restaurant-2-line:before{content:"\f082"}.ri-restaurant-fill:before{content:"\f083"}.ri-restaurant-line:before{content:"\f084"}.ri-rewind-fill:before{content:"\f085"}.ri-rewind-line:before{content:"\f086"}.ri-rewind-mini-fill:before{content:"\f087"}.ri-rewind-mini-line:before{content:"\f088"}.ri-rhythm-fill:before{content:"\f089"}.ri-rhythm-line:before{content:"\f08a"}.ri-riding-fill:before{content:"\f08b"}.ri-riding-line:before{content:"\f08c"}.ri-road-map-fill:before{content:"\f08d"}.ri-road-map-line:before{content:"\f08e"}.ri-roadster-fill:before{content:"\f08f"}.ri-roadster-line:before{content:"\f090"}.ri-robot-fill:before{content:"\f091"}.ri-robot-line:before{content:"\f092"}.ri-rocket-2-fill:before{content:"\f093"}.ri-rocket-2-line:before{content:"\f094"}.ri-rocket-fill:before{content:"\f095"}.ri-rocket-line:before{content:"\f096"}.ri-rotate-lock-fill:before{content:"\f097"}.ri-rotate-lock-line:before{content:"\f098"}.ri-rounded-corner:before{content:"\f099"}.ri-route-fill:before{content:"\f09a"}.ri-route-line:before{content:"\f09b"}.ri-router-fill:before{content:"\f09c"}.ri-router-line:before{content:"\f09d"}.ri-rss-fill:before{content:"\f09e"}.ri-rss-line:before{content:"\f09f"}.ri-ruler-2-fill:before{content:"\f0a0"}.ri-ruler-2-line:before{content:"\f0a1"}.ri-ruler-fill:before{content:"\f0a2"}.ri-ruler-line:before{content:"\f0a3"}.ri-run-fill:before{content:"\f0a4"}.ri-run-line:before{content:"\f0a5"}.ri-safari-fill:before{content:"\f0a6"}.ri-safari-line:before{content:"\f0a7"}.ri-safe-2-fill:before{content:"\f0a8"}.ri-safe-2-line:before{content:"\f0a9"}.ri-safe-fill:before{content:"\f0aa"}.ri-safe-line:before{content:"\f0ab"}.ri-sailboat-fill:before{content:"\f0ac"}.ri-sailboat-line:before{content:"\f0ad"}.ri-save-2-fill:before{content:"\f0ae"}.ri-save-2-line:before{content:"\f0af"}.ri-save-3-fill:before{content:"\f0b0"}.ri-save-3-line:before{content:"\f0b1"}.ri-save-fill:before{content:"\f0b2"}.ri-save-line:before{content:"\f0b3"}.ri-scales-2-fill:before{content:"\f0b4"}.ri-scales-2-line:before{content:"\f0b5"}.ri-scales-3-fill:before{content:"\f0b6"}.ri-scales-3-line:before{content:"\f0b7"}.ri-scales-fill:before{content:"\f0b8"}.ri-scales-line:before{content:"\f0b9"}.ri-scan-2-fill:before{content:"\f0ba"}.ri-scan-2-line:before{content:"\f0bb"}.ri-scan-fill:before{content:"\f0bc"}.ri-scan-line:before{content:"\f0bd"}.ri-scissors-2-fill:before{content:"\f0be"}.ri-scissors-2-line:before{content:"\f0bf"}.ri-scissors-cut-fill:before{content:"\f0c0"}.ri-scissors-cut-line:before{content:"\f0c1"}.ri-scissors-fill:before{content:"\f0c2"}.ri-scissors-line:before{content:"\f0c3"}.ri-screenshot-2-fill:before{content:"\f0c4"}.ri-screenshot-2-line:before{content:"\f0c5"}.ri-screenshot-fill:before{content:"\f0c6"}.ri-screenshot-line:before{content:"\f0c7"}.ri-sd-card-fill:before{content:"\f0c8"}.ri-sd-card-line:before{content:"\f0c9"}.ri-sd-card-mini-fill:before{content:"\f0ca"}.ri-sd-card-mini-line:before{content:"\f0cb"}.ri-search-2-fill:before{content:"\f0cc"}.ri-search-2-line:before{content:"\f0cd"}.ri-search-eye-fill:before{content:"\f0ce"}.ri-search-eye-line:before{content:"\f0cf"}.ri-search-fill:before{content:"\f0d0"}.ri-search-line:before{content:"\f0d1"}.ri-secure-payment-fill:before{content:"\f0d2"}.ri-secure-payment-line:before{content:"\f0d3"}.ri-seedling-fill:before{content:"\f0d4"}.ri-seedling-line:before{content:"\f0d5"}.ri-send-backward:before{content:"\f0d6"}.ri-send-plane-2-fill:before{content:"\f0d7"}.ri-send-plane-2-line:before{content:"\f0d8"}.ri-send-plane-fill:before{content:"\f0d9"}.ri-send-plane-line:before{content:"\f0da"}.ri-send-to-back:before{content:"\f0db"}.ri-sensor-fill:before{content:"\f0dc"}.ri-sensor-line:before{content:"\f0dd"}.ri-separator:before{content:"\f0de"}.ri-server-fill:before{content:"\f0df"}.ri-server-line:before{content:"\f0e0"}.ri-service-fill:before{content:"\f0e1"}.ri-service-line:before{content:"\f0e2"}.ri-settings-2-fill:before{content:"\f0e3"}.ri-settings-2-line:before{content:"\f0e4"}.ri-settings-3-fill:before{content:"\f0e5"}.ri-settings-3-line:before{content:"\f0e6"}.ri-settings-4-fill:before{content:"\f0e7"}.ri-settings-4-line:before{content:"\f0e8"}.ri-settings-5-fill:before{content:"\f0e9"}.ri-settings-5-line:before{content:"\f0ea"}.ri-settings-6-fill:before{content:"\f0eb"}.ri-settings-6-line:before{content:"\f0ec"}.ri-settings-fill:before{content:"\f0ed"}.ri-settings-line:before{content:"\f0ee"}.ri-shape-2-fill:before{content:"\f0ef"}.ri-shape-2-line:before{content:"\f0f0"}.ri-shape-fill:before{content:"\f0f1"}.ri-shape-line:before{content:"\f0f2"}.ri-share-box-fill:before{content:"\f0f3"}.ri-share-box-line:before{content:"\f0f4"}.ri-share-circle-fill:before{content:"\f0f5"}.ri-share-circle-line:before{content:"\f0f6"}.ri-share-fill:before{content:"\f0f7"}.ri-share-forward-2-fill:before{content:"\f0f8"}.ri-share-forward-2-line:before{content:"\f0f9"}.ri-share-forward-box-fill:before{content:"\f0fa"}.ri-share-forward-box-line:before{content:"\f0fb"}.ri-share-forward-fill:before{content:"\f0fc"}.ri-share-forward-line:before{content:"\f0fd"}.ri-share-line:before{content:"\f0fe"}.ri-shield-check-fill:before{content:"\f0ff"}.ri-shield-check-line:before{content:"\f100"}.ri-shield-cross-fill:before{content:"\f101"}.ri-shield-cross-line:before{content:"\f102"}.ri-shield-fill:before{content:"\f103"}.ri-shield-flash-fill:before{content:"\f104"}.ri-shield-flash-line:before{content:"\f105"}.ri-shield-keyhole-fill:before{content:"\f106"}.ri-shield-keyhole-line:before{content:"\f107"}.ri-shield-line:before{content:"\f108"}.ri-shield-star-fill:before{content:"\f109"}.ri-shield-star-line:before{content:"\f10a"}.ri-shield-user-fill:before{content:"\f10b"}.ri-shield-user-line:before{content:"\f10c"}.ri-ship-2-fill:before{content:"\f10d"}.ri-ship-2-line:before{content:"\f10e"}.ri-ship-fill:before{content:"\f10f"}.ri-ship-line:before{content:"\f110"}.ri-shirt-fill:before{content:"\f111"}.ri-shirt-line:before{content:"\f112"}.ri-shopping-bag-2-fill:before{content:"\f113"}.ri-shopping-bag-2-line:before{content:"\f114"}.ri-shopping-bag-3-fill:before{content:"\f115"}.ri-shopping-bag-3-line:before{content:"\f116"}.ri-shopping-bag-fill:before{content:"\f117"}.ri-shopping-bag-line:before{content:"\f118"}.ri-shopping-basket-2-fill:before{content:"\f119"}.ri-shopping-basket-2-line:before{content:"\f11a"}.ri-shopping-basket-fill:before{content:"\f11b"}.ri-shopping-basket-line:before{content:"\f11c"}.ri-shopping-cart-2-fill:before{content:"\f11d"}.ri-shopping-cart-2-line:before{content:"\f11e"}.ri-shopping-cart-fill:before{content:"\f11f"}.ri-shopping-cart-line:before{content:"\f120"}.ri-showers-fill:before{content:"\f121"}.ri-showers-line:before{content:"\f122"}.ri-shuffle-fill:before{content:"\f123"}.ri-shuffle-line:before{content:"\f124"}.ri-shut-down-fill:before{content:"\f125"}.ri-shut-down-line:before{content:"\f126"}.ri-side-bar-fill:before{content:"\f127"}.ri-side-bar-line:before{content:"\f128"}.ri-signal-tower-fill:before{content:"\f129"}.ri-signal-tower-line:before{content:"\f12a"}.ri-signal-wifi-1-fill:before{content:"\f12b"}.ri-signal-wifi-1-line:before{content:"\f12c"}.ri-signal-wifi-2-fill:before{content:"\f12d"}.ri-signal-wifi-2-line:before{content:"\f12e"}.ri-signal-wifi-3-fill:before{content:"\f12f"}.ri-signal-wifi-3-line:before{content:"\f130"}.ri-signal-wifi-error-fill:before{content:"\f131"}.ri-signal-wifi-error-line:before{content:"\f132"}.ri-signal-wifi-fill:before{content:"\f133"}.ri-signal-wifi-line:before{content:"\f134"}.ri-signal-wifi-off-fill:before{content:"\f135"}.ri-signal-wifi-off-line:before{content:"\f136"}.ri-sim-card-2-fill:before{content:"\f137"}.ri-sim-card-2-line:before{content:"\f138"}.ri-sim-card-fill:before{content:"\f139"}.ri-sim-card-line:before{content:"\f13a"}.ri-single-quotes-l:before{content:"\f13b"}.ri-single-quotes-r:before{content:"\f13c"}.ri-sip-fill:before{content:"\f13d"}.ri-sip-line:before{content:"\f13e"}.ri-skip-back-fill:before{content:"\f13f"}.ri-skip-back-line:before{content:"\f140"}.ri-skip-back-mini-fill:before{content:"\f141"}.ri-skip-back-mini-line:before{content:"\f142"}.ri-skip-forward-fill:before{content:"\f143"}.ri-skip-forward-line:before{content:"\f144"}.ri-skip-forward-mini-fill:before{content:"\f145"}.ri-skip-forward-mini-line:before{content:"\f146"}.ri-skull-2-fill:before{content:"\f147"}.ri-skull-2-line:before{content:"\f148"}.ri-skull-fill:before{content:"\f149"}.ri-skull-line:before{content:"\f14a"}.ri-skype-fill:before{content:"\f14b"}.ri-skype-line:before{content:"\f14c"}.ri-slack-fill:before{content:"\f14d"}.ri-slack-line:before{content:"\f14e"}.ri-slice-fill:before{content:"\f14f"}.ri-slice-line:before{content:"\f150"}.ri-slideshow-2-fill:before{content:"\f151"}.ri-slideshow-2-line:before{content:"\f152"}.ri-slideshow-3-fill:before{content:"\f153"}.ri-slideshow-3-line:before{content:"\f154"}.ri-slideshow-4-fill:before{content:"\f155"}.ri-slideshow-4-line:before{content:"\f156"}.ri-slideshow-fill:before{content:"\f157"}.ri-slideshow-line:before{content:"\f158"}.ri-smartphone-fill:before{content:"\f159"}.ri-smartphone-line:before{content:"\f15a"}.ri-snapchat-fill:before{content:"\f15b"}.ri-snapchat-line:before{content:"\f15c"}.ri-snowy-fill:before{content:"\f15d"}.ri-snowy-line:before{content:"\f15e"}.ri-sort-asc:before{content:"\f15f"}.ri-sort-desc:before{content:"\f160"}.ri-sound-module-fill:before{content:"\f161"}.ri-sound-module-line:before{content:"\f162"}.ri-soundcloud-fill:before{content:"\f163"}.ri-soundcloud-line:before{content:"\f164"}.ri-space-ship-fill:before{content:"\f165"}.ri-space-ship-line:before{content:"\f166"}.ri-space:before{content:"\f167"}.ri-spam-2-fill:before{content:"\f168"}.ri-spam-2-line:before{content:"\f169"}.ri-spam-3-fill:before{content:"\f16a"}.ri-spam-3-line:before{content:"\f16b"}.ri-spam-fill:before{content:"\f16c"}.ri-spam-line:before{content:"\f16d"}.ri-speaker-2-fill:before{content:"\f16e"}.ri-speaker-2-line:before{content:"\f16f"}.ri-speaker-3-fill:before{content:"\f170"}.ri-speaker-3-line:before{content:"\f171"}.ri-speaker-fill:before{content:"\f172"}.ri-speaker-line:before{content:"\f173"}.ri-spectrum-fill:before{content:"\f174"}.ri-spectrum-line:before{content:"\f175"}.ri-speed-fill:before{content:"\f176"}.ri-speed-line:before{content:"\f177"}.ri-speed-mini-fill:before{content:"\f178"}.ri-speed-mini-line:before{content:"\f179"}.ri-split-cells-horizontal:before{content:"\f17a"}.ri-split-cells-vertical:before{content:"\f17b"}.ri-spotify-fill:before{content:"\f17c"}.ri-spotify-line:before{content:"\f17d"}.ri-spy-fill:before{content:"\f17e"}.ri-spy-line:before{content:"\f17f"}.ri-stack-fill:before{content:"\f180"}.ri-stack-line:before{content:"\f181"}.ri-stack-overflow-fill:before{content:"\f182"}.ri-stack-overflow-line:before{content:"\f183"}.ri-stackshare-fill:before{content:"\f184"}.ri-stackshare-line:before{content:"\f185"}.ri-star-fill:before{content:"\f186"}.ri-star-half-fill:before{content:"\f187"}.ri-star-half-line:before{content:"\f188"}.ri-star-half-s-fill:before{content:"\f189"}.ri-star-half-s-line:before{content:"\f18a"}.ri-star-line:before{content:"\f18b"}.ri-star-s-fill:before{content:"\f18c"}.ri-star-s-line:before{content:"\f18d"}.ri-star-smile-fill:before{content:"\f18e"}.ri-star-smile-line:before{content:"\f18f"}.ri-steam-fill:before{content:"\f190"}.ri-steam-line:before{content:"\f191"}.ri-steering-2-fill:before{content:"\f192"}.ri-steering-2-line:before{content:"\f193"}.ri-steering-fill:before{content:"\f194"}.ri-steering-line:before{content:"\f195"}.ri-stethoscope-fill:before{content:"\f196"}.ri-stethoscope-line:before{content:"\f197"}.ri-sticky-note-2-fill:before{content:"\f198"}.ri-sticky-note-2-line:before{content:"\f199"}.ri-sticky-note-fill:before{content:"\f19a"}.ri-sticky-note-line:before{content:"\f19b"}.ri-stock-fill:before{content:"\f19c"}.ri-stock-line:before{content:"\f19d"}.ri-stop-circle-fill:before{content:"\f19e"}.ri-stop-circle-line:before{content:"\f19f"}.ri-stop-fill:before{content:"\f1a0"}.ri-stop-line:before{content:"\f1a1"}.ri-stop-mini-fill:before{content:"\f1a2"}.ri-stop-mini-line:before{content:"\f1a3"}.ri-store-2-fill:before{content:"\f1a4"}.ri-store-2-line:before{content:"\f1a5"}.ri-store-3-fill:before{content:"\f1a6"}.ri-store-3-line:before{content:"\f1a7"}.ri-store-fill:before{content:"\f1a8"}.ri-store-line:before{content:"\f1a9"}.ri-strikethrough-2:before{content:"\f1aa"}.ri-strikethrough:before{content:"\f1ab"}.ri-subscript-2:before{content:"\f1ac"}.ri-subscript:before{content:"\f1ad"}.ri-subtract-fill:before{content:"\f1ae"}.ri-subtract-line:before{content:"\f1af"}.ri-subway-fill:before{content:"\f1b0"}.ri-subway-line:before{content:"\f1b1"}.ri-subway-wifi-fill:before{content:"\f1b2"}.ri-subway-wifi-line:before{content:"\f1b3"}.ri-suitcase-2-fill:before{content:"\f1b4"}.ri-suitcase-2-line:before{content:"\f1b5"}.ri-suitcase-3-fill:before{content:"\f1b6"}.ri-suitcase-3-line:before{content:"\f1b7"}.ri-suitcase-fill:before{content:"\f1b8"}.ri-suitcase-line:before{content:"\f1b9"}.ri-sun-cloudy-fill:before{content:"\f1ba"}.ri-sun-cloudy-line:before{content:"\f1bb"}.ri-sun-fill:before{content:"\f1bc"}.ri-sun-foggy-fill:before{content:"\f1bd"}.ri-sun-foggy-line:before{content:"\f1be"}.ri-sun-line:before{content:"\f1bf"}.ri-superscript-2:before{content:"\f1c0"}.ri-superscript:before{content:"\f1c1"}.ri-surgical-mask-fill:before{content:"\f1c2"}.ri-surgical-mask-line:before{content:"\f1c3"}.ri-surround-sound-fill:before{content:"\f1c4"}.ri-surround-sound-line:before{content:"\f1c5"}.ri-survey-fill:before{content:"\f1c6"}.ri-survey-line:before{content:"\f1c7"}.ri-swap-box-fill:before{content:"\f1c8"}.ri-swap-box-line:before{content:"\f1c9"}.ri-swap-fill:before{content:"\f1ca"}.ri-swap-line:before{content:"\f1cb"}.ri-switch-fill:before{content:"\f1cc"}.ri-switch-line:before{content:"\f1cd"}.ri-sword-fill:before{content:"\f1ce"}.ri-sword-line:before{content:"\f1cf"}.ri-syringe-fill:before{content:"\f1d0"}.ri-syringe-line:before{content:"\f1d1"}.ri-t-box-fill:before{content:"\f1d2"}.ri-t-box-line:before{content:"\f1d3"}.ri-t-shirt-2-fill:before{content:"\f1d4"}.ri-t-shirt-2-line:before{content:"\f1d5"}.ri-t-shirt-air-fill:before{content:"\f1d6"}.ri-t-shirt-air-line:before{content:"\f1d7"}.ri-t-shirt-fill:before{content:"\f1d8"}.ri-t-shirt-line:before{content:"\f1d9"}.ri-table-2:before{content:"\f1da"}.ri-table-alt-fill:before{content:"\f1db"}.ri-table-alt-line:before{content:"\f1dc"}.ri-table-fill:before{content:"\f1dd"}.ri-table-line:before{content:"\f1de"}.ri-tablet-fill:before{content:"\f1df"}.ri-tablet-line:before{content:"\f1e0"}.ri-takeaway-fill:before{content:"\f1e1"}.ri-takeaway-line:before{content:"\f1e2"}.ri-taobao-fill:before{content:"\f1e3"}.ri-taobao-line:before{content:"\f1e4"}.ri-tape-fill:before{content:"\f1e5"}.ri-tape-line:before{content:"\f1e6"}.ri-task-fill:before{content:"\f1e7"}.ri-task-line:before{content:"\f1e8"}.ri-taxi-fill:before{content:"\f1e9"}.ri-taxi-line:before{content:"\f1ea"}.ri-taxi-wifi-fill:before{content:"\f1eb"}.ri-taxi-wifi-line:before{content:"\f1ec"}.ri-team-fill:before{content:"\f1ed"}.ri-team-line:before{content:"\f1ee"}.ri-telegram-fill:before{content:"\f1ef"}.ri-telegram-line:before{content:"\f1f0"}.ri-temp-cold-fill:before{content:"\f1f1"}.ri-temp-cold-line:before{content:"\f1f2"}.ri-temp-hot-fill:before{content:"\f1f3"}.ri-temp-hot-line:before{content:"\f1f4"}.ri-terminal-box-fill:before{content:"\f1f5"}.ri-terminal-box-line:before{content:"\f1f6"}.ri-terminal-fill:before{content:"\f1f7"}.ri-terminal-line:before{content:"\f1f8"}.ri-terminal-window-fill:before{content:"\f1f9"}.ri-terminal-window-line:before{content:"\f1fa"}.ri-test-tube-fill:before{content:"\f1fb"}.ri-test-tube-line:before{content:"\f1fc"}.ri-text-direction-l:before{content:"\f1fd"}.ri-text-direction-r:before{content:"\f1fe"}.ri-text-spacing:before{content:"\f1ff"}.ri-text-wrap:before{content:"\f200"}.ri-text:before{content:"\f201"}.ri-thermometer-fill:before{content:"\f202"}.ri-thermometer-line:before{content:"\f203"}.ri-thumb-down-fill:before{content:"\f204"}.ri-thumb-down-line:before{content:"\f205"}.ri-thumb-up-fill:before{content:"\f206"}.ri-thumb-up-line:before{content:"\f207"}.ri-thunderstorms-fill:before{content:"\f208"}.ri-thunderstorms-line:before{content:"\f209"}.ri-ticket-2-fill:before{content:"\f20a"}.ri-ticket-2-line:before{content:"\f20b"}.ri-ticket-fill:before{content:"\f20c"}.ri-ticket-line:before{content:"\f20d"}.ri-time-fill:before{content:"\f20e"}.ri-time-line:before{content:"\f20f"}.ri-timer-2-fill:before{content:"\f210"}.ri-timer-2-line:before{content:"\f211"}.ri-timer-fill:before{content:"\f212"}.ri-timer-flash-fill:before{content:"\f213"}.ri-timer-flash-line:before{content:"\f214"}.ri-timer-line:before{content:"\f215"}.ri-todo-fill:before{content:"\f216"}.ri-todo-line:before{content:"\f217"}.ri-toggle-fill:before{content:"\f218"}.ri-toggle-line:before{content:"\f219"}.ri-tools-fill:before{content:"\f21a"}.ri-tools-line:before{content:"\f21b"}.ri-tornado-fill:before{content:"\f21c"}.ri-tornado-line:before{content:"\f21d"}.ri-trademark-fill:before{content:"\f21e"}.ri-trademark-line:before{content:"\f21f"}.ri-traffic-light-fill:before{content:"\f220"}.ri-traffic-light-line:before{content:"\f221"}.ri-train-fill:before{content:"\f222"}.ri-train-line:before{content:"\f223"}.ri-train-wifi-fill:before{content:"\f224"}.ri-train-wifi-line:before{content:"\f225"}.ri-translate-2:before{content:"\f226"}.ri-translate:before{content:"\f227"}.ri-travesti-fill:before{content:"\f228"}.ri-travesti-line:before{content:"\f229"}.ri-treasure-map-fill:before{content:"\f22a"}.ri-treasure-map-line:before{content:"\f22b"}.ri-trello-fill:before{content:"\f22c"}.ri-trello-line:before{content:"\f22d"}.ri-trophy-fill:before{content:"\f22e"}.ri-trophy-line:before{content:"\f22f"}.ri-truck-fill:before{content:"\f230"}.ri-truck-line:before{content:"\f231"}.ri-tumblr-fill:before{content:"\f232"}.ri-tumblr-line:before{content:"\f233"}.ri-tv-2-fill:before{content:"\f234"}.ri-tv-2-line:before{content:"\f235"}.ri-tv-fill:before{content:"\f236"}.ri-tv-line:before{content:"\f237"}.ri-twitch-fill:before{content:"\f238"}.ri-twitch-line:before{content:"\f239"}.ri-twitter-fill:before{content:"\f23a"}.ri-twitter-line:before{content:"\f23b"}.ri-typhoon-fill:before{content:"\f23c"}.ri-typhoon-line:before{content:"\f23d"}.ri-u-disk-fill:before{content:"\f23e"}.ri-u-disk-line:before{content:"\f23f"}.ri-ubuntu-fill:before{content:"\f240"}.ri-ubuntu-line:before{content:"\f241"}.ri-umbrella-fill:before{content:"\f242"}.ri-umbrella-line:before{content:"\f243"}.ri-underline:before{content:"\f244"}.ri-uninstall-fill:before{content:"\f245"}.ri-uninstall-line:before{content:"\f246"}.ri-unsplash-fill:before{content:"\f247"}.ri-unsplash-line:before{content:"\f248"}.ri-upload-2-fill:before{content:"\f249"}.ri-upload-2-line:before{content:"\f24a"}.ri-upload-cloud-2-fill:before{content:"\f24b"}.ri-upload-cloud-2-line:before{content:"\f24c"}.ri-upload-cloud-fill:before{content:"\f24d"}.ri-upload-cloud-line:before{content:"\f24e"}.ri-upload-fill:before{content:"\f24f"}.ri-upload-line:before{content:"\f250"}.ri-usb-fill:before{content:"\f251"}.ri-usb-line:before{content:"\f252"}.ri-user-2-fill:before{content:"\f253"}.ri-user-2-line:before{content:"\f254"}.ri-user-3-fill:before{content:"\f255"}.ri-user-3-line:before{content:"\f256"}.ri-user-4-fill:before{content:"\f257"}.ri-user-4-line:before{content:"\f258"}.ri-user-5-fill:before{content:"\f259"}.ri-user-5-line:before{content:"\f25a"}.ri-user-6-fill:before{content:"\f25b"}.ri-user-6-line:before{content:"\f25c"}.ri-user-add-fill:before{content:"\f25d"}.ri-user-add-line:before{content:"\f25e"}.ri-user-fill:before{content:"\f25f"}.ri-user-follow-fill:before{content:"\f260"}.ri-user-follow-line:before{content:"\f261"}.ri-user-heart-fill:before{content:"\f262"}.ri-user-heart-line:before{content:"\f263"}.ri-user-line:before{content:"\f264"}.ri-user-location-fill:before{content:"\f265"}.ri-user-location-line:before{content:"\f266"}.ri-user-received-2-fill:before{content:"\f267"}.ri-user-received-2-line:before{content:"\f268"}.ri-user-received-fill:before{content:"\f269"}.ri-user-received-line:before{content:"\f26a"}.ri-user-search-fill:before{content:"\f26b"}.ri-user-search-line:before{content:"\f26c"}.ri-user-settings-fill:before{content:"\f26d"}.ri-user-settings-line:before{content:"\f26e"}.ri-user-shared-2-fill:before{content:"\f26f"}.ri-user-shared-2-line:before{content:"\f270"}.ri-user-shared-fill:before{content:"\f271"}.ri-user-shared-line:before{content:"\f272"}.ri-user-smile-fill:before{content:"\f273"}.ri-user-smile-line:before{content:"\f274"}.ri-user-star-fill:before{content:"\f275"}.ri-user-star-line:before{content:"\f276"}.ri-user-unfollow-fill:before{content:"\f277"}.ri-user-unfollow-line:before{content:"\f278"}.ri-user-voice-fill:before{content:"\f279"}.ri-user-voice-line:before{content:"\f27a"}.ri-video-add-fill:before{content:"\f27b"}.ri-video-add-line:before{content:"\f27c"}.ri-video-chat-fill:before{content:"\f27d"}.ri-video-chat-line:before{content:"\f27e"}.ri-video-download-fill:before{content:"\f27f"}.ri-video-download-line:before{content:"\f280"}.ri-video-fill:before{content:"\f281"}.ri-video-line:before{content:"\f282"}.ri-video-upload-fill:before{content:"\f283"}.ri-video-upload-line:before{content:"\f284"}.ri-vidicon-2-fill:before{content:"\f285"}.ri-vidicon-2-line:before{content:"\f286"}.ri-vidicon-fill:before{content:"\f287"}.ri-vidicon-line:before{content:"\f288"}.ri-vimeo-fill:before{content:"\f289"}.ri-vimeo-line:before{content:"\f28a"}.ri-vip-crown-2-fill:before{content:"\f28b"}.ri-vip-crown-2-line:before{content:"\f28c"}.ri-vip-crown-fill:before{content:"\f28d"}.ri-vip-crown-line:before{content:"\f28e"}.ri-vip-diamond-fill:before{content:"\f28f"}.ri-vip-diamond-line:before{content:"\f290"}.ri-vip-fill:before{content:"\f291"}.ri-vip-line:before{content:"\f292"}.ri-virus-fill:before{content:"\f293"}.ri-virus-line:before{content:"\f294"}.ri-visa-fill:before{content:"\f295"}.ri-visa-line:before{content:"\f296"}.ri-voice-recognition-fill:before{content:"\f297"}.ri-voice-recognition-line:before{content:"\f298"}.ri-voiceprint-fill:before{content:"\f299"}.ri-voiceprint-line:before{content:"\f29a"}.ri-volume-down-fill:before{content:"\f29b"}.ri-volume-down-line:before{content:"\f29c"}.ri-volume-mute-fill:before{content:"\f29d"}.ri-volume-mute-line:before{content:"\f29e"}.ri-volume-off-vibrate-fill:before{content:"\f29f"}.ri-volume-off-vibrate-line:before{content:"\f2a0"}.ri-volume-up-fill:before{content:"\f2a1"}.ri-volume-up-line:before{content:"\f2a2"}.ri-volume-vibrate-fill:before{content:"\f2a3"}.ri-volume-vibrate-line:before{content:"\f2a4"}.ri-vuejs-fill:before{content:"\f2a5"}.ri-vuejs-line:before{content:"\f2a6"}.ri-walk-fill:before{content:"\f2a7"}.ri-walk-line:before{content:"\f2a8"}.ri-wallet-2-fill:before{content:"\f2a9"}.ri-wallet-2-line:before{content:"\f2aa"}.ri-wallet-3-fill:before{content:"\f2ab"}.ri-wallet-3-line:before{content:"\f2ac"}.ri-wallet-fill:before{content:"\f2ad"}.ri-wallet-line:before{content:"\f2ae"}.ri-water-flash-fill:before{content:"\f2af"}.ri-water-flash-line:before{content:"\f2b0"}.ri-webcam-fill:before{content:"\f2b1"}.ri-webcam-line:before{content:"\f2b2"}.ri-wechat-2-fill:before{content:"\f2b3"}.ri-wechat-2-line:before{content:"\f2b4"}.ri-wechat-fill:before{content:"\f2b5"}.ri-wechat-line:before{content:"\f2b6"}.ri-wechat-pay-fill:before{content:"\f2b7"}.ri-wechat-pay-line:before{content:"\f2b8"}.ri-weibo-fill:before{content:"\f2b9"}.ri-weibo-line:before{content:"\f2ba"}.ri-whatsapp-fill:before{content:"\f2bb"}.ri-whatsapp-line:before{content:"\f2bc"}.ri-wheelchair-fill:before{content:"\f2bd"}.ri-wheelchair-line:before{content:"\f2be"}.ri-wifi-fill:before{content:"\f2bf"}.ri-wifi-line:before{content:"\f2c0"}.ri-wifi-off-fill:before{content:"\f2c1"}.ri-wifi-off-line:before{content:"\f2c2"}.ri-window-2-fill:before{content:"\f2c3"}.ri-window-2-line:before{content:"\f2c4"}.ri-window-fill:before{content:"\f2c5"}.ri-window-line:before{content:"\f2c6"}.ri-windows-fill:before{content:"\f2c7"}.ri-windows-line:before{content:"\f2c8"}.ri-windy-fill:before{content:"\f2c9"}.ri-windy-line:before{content:"\f2ca"}.ri-wireless-charging-fill:before{content:"\f2cb"}.ri-wireless-charging-line:before{content:"\f2cc"}.ri-women-fill:before{content:"\f2cd"}.ri-women-line:before{content:"\f2ce"}.ri-wubi-input:before{content:"\f2cf"}.ri-xbox-fill:before{content:"\f2d0"}.ri-xbox-line:before{content:"\f2d1"}.ri-xing-fill:before{content:"\f2d2"}.ri-xing-line:before{content:"\f2d3"}.ri-youtube-fill:before{content:"\f2d4"}.ri-youtube-line:before{content:"\f2d5"}.ri-zcool-fill:before{content:"\f2d6"}.ri-zcool-line:before{content:"\f2d7"}.ri-zhihu-fill:before{content:"\f2d8"}.ri-zhihu-line:before{content:"\f2d9"}.ri-zoom-in-fill:before{content:"\f2da"}.ri-zoom-in-line:before{content:"\f2db"}.ri-zoom-out-fill:before{content:"\f2dc"}.ri-zoom-out-line:before{content:"\f2dd"}.ri-zzz-fill:before{content:"\f2de"}.ri-zzz-line:before{content:"\f2df"}@font-face{font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/js/1de15e70fec550ef4554de45895cd073.woff2) format("woff2"),url(/js/96a57080955dae1ca302c76abb8af909.woff) format("woff"),url(/js/f453c078392f0c23335ea604c6765a12.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/js/5839401331dd0fbe22436cb27c8fcb73.woff2) format("woff2"),url(/js/c6297f9142925c50bd7828b90c103526.woff) format("woff"),url(/js/ec522b9ccc3e18028de1440991b38119.ttf) format("truetype")}@font-face{font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/js/f96fac9755151d0fabd8ed9abdca9521.woff2) format("woff2"),url(/js/5079e051e18b6b617208b8cb5beb1082.woff) format("woff"),url(/js/703345f865eeee24c474248079a0ba93.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/js/49cc6a3cab050d7c2ec2336cb804e1fc.woff2) format("woff2"),url(/js/0e5b99ca96d68358cdbbf0eb132e0bf3.woff) format("woff"),url(/js/459e524c11f9d9848bd73bfffdc62077.ttf) format("truetype")}@font-face{font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/js/77291f2c01508dbfa5a0e8fc8de4acb6.woff2) format("woff2"),url(/js/a33d4c9142212ef3479287135a87faac.woff) format("woff"),url(/js/1b0be9b9502d481bf047c11fd3afce41.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/js/fc4e48b59849688ac61c0d6daa6c3894.woff2) format("woff2"),url(/js/e8c40ca220bf98110e3d2a9bccc040b4.woff) format("woff"),url(/js/c0ad9a0fcd3872a71585a52543d02054.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/js/7e6803e0645cc02029a2b4b9b5c12dd0.woff2) format("woff2"),url(/js/4e9fb7097be319b4a3a323dca0626460.woff) format("woff"),url(/js/8b9b3524a9cd80e00610682ca9d48b7a.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/js/83915f6ea43188e031f15a41a2a13d0e.woff2) format("woff2"),url(/js/993cef711838adabce3a8b5b1c4a1901.woff) format("woff"),url(/js/7712cfa8ed8093a0c556b7ff8abf14f9.ttf) format("truetype")}@font-face{font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/js/6f4b7338e13e491465211e73cc3d9ab2.woff2) format("woff2"),url(/js/3402ceebbaf069244380e282045d5615.woff) format("woff"),url(/js/9f78515e97ad0ff068507c103e83409d.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/js/2ffefb11f0c8412c11682bd0e1413b69.woff2) format("woff2"),url(/js/1d2e94d7e1264031867f942653f8139a.woff) format("woff"),url(/js/4ad93799ba7ea7199a6f27826a40b061.ttf) format("truetype")}@font-face{font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/js/f9f7662953c4ef2ee65e1f3a935f9017.woff2) format("woff2"),url(/js/23820bbae1b543ae8cb70fe44d40809f.woff) format("woff"),url(/js/ac5aad6c4efef1a3d20b75397b7e6218.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:700;src:url(/js/2bd0c2b5932c7e74bc69ff108c7746e3.woff2) format("woff2"),url(/js/31faa94a6e7e3e4dc3a777c1244a3d0b.woff) format("woff"),url(/js/04adc05e48582c893f35f05dfdc35cbc.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:italic;font-weight:400;src:url(/js/fd4eccab43b2f46bac37538fc682154d.woff2) format("woff2"),url(/js/374a109b61e7c419be444a6ad27c8f8c.woff) format("woff"),url(/js/775f93f04f3a0bdcfecbc62e733847f1.ttf) format("truetype")}@font-face{font-family:"KaTeX_SansSerif";font-style:normal;font-weight:400;src:url(/js/7c3661bed01acdb90f0d0d6e8c2af175.woff2) format("woff2"),url(/js/8f5c4dcd24a0f3aa86380f0b3562eccd.woff) format("woff"),url(/js/1e909f1c2ba50ad8581dc75d86559eda.ttf) format("truetype")}@font-face{font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/js/3c431f15b18a392c1711d7de01edf4f3.woff2) format("woff2"),url(/js/8cb4c7b5986d922a2dcdb6599a6106a9.woff) format("woff"),url(/js/36d2c2a98402f4c0cb1029a69f2b9806.ttf) format("truetype")}@font-face{font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/js/b3e926468f875c4b6a966d901c879696.woff2) format("woff2"),url(/js/b609c3dc1fbbb105ce2856c03d8db6e1.woff) format("woff"),url(/js/70d540a088e8e125414815b6afda0e3d.ttf) format("truetype")}@font-face{font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/js/a4aae3d505525c8eb88b9158c4649a7b.woff2) format("woff2"),url(/js/ca8ea1e72772a43ae46c4f7fb986b1fa.woff) format("woff"),url(/js/7534552259d59c1cba3e86a3c774b8e8.ttf) format("truetype")}@font-face{font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(/js/08fca0137fd475f7852ab73e275e2208.woff2) format("woff2"),url(/js/cddcf234909da33bbfc0c37ecd11f60f.woff) format("woff"),url(/js/c7977d0148e0d53d73a8adda49f2fd8e.ttf) format("truetype")}@font-face{font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/js/1b0cff973201019de91c24530ab219c3.woff2) format("woff2"),url(/js/e84eaeda24afadafd7b6e246209d7a05.woff) format("woff"),url(/js/f93eac2f0543333d30a6abf9262ec864.ttf) format("truetype")}@font-face{font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/js/209b10f4e35040ca859c96177c458cc6.woff2) format("woff2"),url(/js/b6a56b14d09ea3eb5f01e0bbd2b20101.woff) format("woff"),url(/js/834915271cbece10d426ea41e479cfff.ttf) format("truetype")}.katex{font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0;text-rendering:auto}.katex *{-ms-high-contrast-adjust:none!important;border-color:currentColor}.katex .katex-version:after{content:"0.13.2"}.katex .katex-mathml{clip:rect(1px,1px,1px,1px);border:0;height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;display:inline-table;table-layout:fixed}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;position:relative;vertical-align:bottom}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;font-size:1px;min-width:2px;vertical-align:bottom;width:2px}.katex .vbox{align-items:baseline;display:inline-flex;flex-direction:column}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{max-width:0;width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{position:relative;width:0}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;display:inline-block;width:100%}.katex .hdashline{border-bottom-style:dashed;display:inline-block;width:100%}.katex .sqrt>.root{margin-left:.27777778em;margin-right:-.55555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.83333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.71428571em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.85714286em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14285714em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571429em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857143em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71428571em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714286em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857143em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96285714em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55428571em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.55555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.66666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.77777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.88888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.41666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.58333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.66666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.83333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.34722222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.41666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.48611111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.55555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.69444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.83333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44027778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.28935185em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.34722222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.40509259em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.46296296em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.52083333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.69444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.83333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023148em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981481em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108004em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.28929605em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.33751205em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.38572806em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.43394407em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216008em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.57859209em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.69431051em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.83317261em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961427em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.20096463em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.24115756em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.28135048em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.32154341em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.36173633em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.40192926em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.48231511em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.57877814em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.69453376em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.83360129em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;display:block;height:inherit;position:absolute;width:100%}.katex svg path{stroke:none}.katex img{border-style:none;max-height:none;max-width:none;min-height:0;min-width:0}.katex .stretchy{display:block;overflow:hidden;position:relative;width:100%}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{overflow:hidden;position:relative;width:100%}.katex .halfarrow-left{left:0;overflow:hidden;position:absolute;width:50.2%}.katex .halfarrow-right{overflow:hidden;position:absolute;right:0;width:50.2%}.katex .brace-left{left:0;overflow:hidden;position:absolute;width:25.1%}.katex .brace-center{left:25%;overflow:hidden;position:absolute;width:50%}.katex .brace-right{overflow:hidden;position:absolute;right:0;width:25.1%}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{border:.04em solid;box-sizing:border-box}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{border-right:.049em solid;border-top:.049em solid;box-sizing:border-content;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;left:calc(50% + .3em);position:absolute;text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{padding-left:2em;text-align:left}body{counter-reset:katexEqnNo mmlEqnNo}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:400;src:url(/js/54de81abbcf869efd1dc2b595a68fe7e.woff2) format("woff2"),url(/js/10f84849b8a69b4844b2925080f81a97.woff) format("woff");unicode-range:U+0460-052f,U+1c80-1c88,U+20b4,U+2de0-2dff,U+a640-a69f,U+fe2e-fe2f}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:400;src:url(/js/3164eabdbb931859ae7ca8ca62a3c332.woff2) format("woff2"),url(/js/10f84849b8a69b4844b2925080f81a97.woff) format("woff");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:400;src:url(/js/c2a24f65668ba8f3fdf78ce8e467889e.woff2) format("woff2"),url(/js/10f84849b8a69b4844b2925080f81a97.woff) format("woff");unicode-range:U+1f??}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:400;src:url(/js/75a1d3c8eb035b420ce68a0c44757916.woff2) format("woff2"),url(/js/10f84849b8a69b4844b2925080f81a97.woff) format("woff");unicode-range:U+0370-03ff}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:400;src:url(/js/c15997f1d022aff0bd008085732b8d87.woff2) format("woff2"),url(/js/10f84849b8a69b4844b2925080f81a97.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01a0-01a1,U+01af-01b0,U+1ea0-1ef9,U+20ab}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:400;src:url(/js/29df4aa934ecc94620708eea295782a5.woff2) format("woff2"),url(/js/10f84849b8a69b4844b2925080f81a97.woff) format("woff");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:400;src:url(/js/a05a0d687a088c4efed303a504befad7.woff2) format("woff2"),url(/js/10f84849b8a69b4844b2925080f81a97.woff) format("woff");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:500;src:url(/js/54de81abbcf869efd1dc2b595a68fe7e.woff2) format("woff2"),url(/js/5431f9f71fc665274a10721c239cd333.woff) format("woff");unicode-range:U+0460-052f,U+1c80-1c88,U+20b4,U+2de0-2dff,U+a640-a69f,U+fe2e-fe2f}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:500;src:url(/js/3164eabdbb931859ae7ca8ca62a3c332.woff2) format("woff2"),url(/js/5431f9f71fc665274a10721c239cd333.woff) format("woff");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:500;src:url(/js/c2a24f65668ba8f3fdf78ce8e467889e.woff2) format("woff2"),url(/js/5431f9f71fc665274a10721c239cd333.woff) format("woff");unicode-range:U+1f??}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:500;src:url(/js/75a1d3c8eb035b420ce68a0c44757916.woff2) format("woff2"),url(/js/5431f9f71fc665274a10721c239cd333.woff) format("woff");unicode-range:U+0370-03ff}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:500;src:url(/js/c15997f1d022aff0bd008085732b8d87.woff2) format("woff2"),url(/js/5431f9f71fc665274a10721c239cd333.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01a0-01a1,U+01af-01b0,U+1ea0-1ef9,U+20ab}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:500;src:url(/js/29df4aa934ecc94620708eea295782a5.woff2) format("woff2"),url(/js/5431f9f71fc665274a10721c239cd333.woff) format("woff");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:500;src:url(/js/a05a0d687a088c4efed303a504befad7.woff2) format("woff2"),url(/js/5431f9f71fc665274a10721c239cd333.woff) format("woff");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:600;src:url(/js/54de81abbcf869efd1dc2b595a68fe7e.woff2) format("woff2"),url(/js/016b603e010d5dcae8ea8fa4aa580228.woff) format("woff");unicode-range:U+0460-052f,U+1c80-1c88,U+20b4,U+2de0-2dff,U+a640-a69f,U+fe2e-fe2f}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:600;src:url(/js/3164eabdbb931859ae7ca8ca62a3c332.woff2) format("woff2"),url(/js/016b603e010d5dcae8ea8fa4aa580228.woff) format("woff");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:600;src:url(/js/c2a24f65668ba8f3fdf78ce8e467889e.woff2) format("woff2"),url(/js/016b603e010d5dcae8ea8fa4aa580228.woff) format("woff");unicode-range:U+1f??}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:600;src:url(/js/75a1d3c8eb035b420ce68a0c44757916.woff2) format("woff2"),url(/js/016b603e010d5dcae8ea8fa4aa580228.woff) format("woff");unicode-range:U+0370-03ff}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:600;src:url(/js/c15997f1d022aff0bd008085732b8d87.woff2) format("woff2"),url(/js/016b603e010d5dcae8ea8fa4aa580228.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01a0-01a1,U+01af-01b0,U+1ea0-1ef9,U+20ab}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:600;src:url(/js/29df4aa934ecc94620708eea295782a5.woff2) format("woff2"),url(/js/016b603e010d5dcae8ea8fa4aa580228.woff) format("woff");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:Inter;font-style:normal;font-weight:600;src:url(/js/a05a0d687a088c4efed303a504befad7.woff2) format("woff2"),url(/js/016b603e010d5dcae8ea8fa4aa580228.woff) format("woff");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}@font-face{font-display:swap;font-family:JetBrains Mono;font-style:normal;font-weight:400;src:url(/js/953c8aeb6c2394cec010f8daa27c3fa2.woff2) format("woff2"),url(/js/8e08cd86133caec43c49a139a36424e8.woff) format("woff");unicode-range:U+0460-052f,U+1c80-1c88,U+20b4,U+2de0-2dff,U+a640-a69f,U+fe2e-fe2f}@font-face{font-display:swap;font-family:JetBrains Mono;font-style:normal;font-weight:400;src:url(/js/47bb5e1a429a97dcc3b35e434386f912.woff2) format("woff2"),url(/js/8e08cd86133caec43c49a139a36424e8.woff) format("woff");unicode-range:U+0400-045f,U+0490-0491,U+04b0-04b1,U+2116}@font-face{font-display:swap;font-family:JetBrains Mono;font-style:normal;font-weight:400;src:url(/js/663c2351f9f20696b3a4cee9f20832f3.woff2) format("woff2"),url(/js/8e08cd86133caec43c49a139a36424e8.woff) format("woff");unicode-range:U+0370-03ff}@font-face{font-display:swap;font-family:JetBrains Mono;font-style:normal;font-weight:400;src:url(/js/1b95ebd96a4c3e90b1b08bd187f056b0.woff2) format("woff2"),url(/js/8e08cd86133caec43c49a139a36424e8.woff) format("woff");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01a0-01a1,U+01af-01b0,U+1ea0-1ef9,U+20ab}@font-face{font-display:swap;font-family:JetBrains Mono;font-style:normal;font-weight:400;src:url(/js/913520c3f0ae87c1d9aa23fc52b8c0b0.woff2) format("woff2"),url(/js/8e08cd86133caec43c49a139a36424e8.woff) format("woff");unicode-range:U+0100-024f,U+0259,U+1e??,U+2020,U+20a0-20ab,U+20ad-20cf,U+2113,U+2c60-2c7f,U+a720-a7ff}@font-face{font-display:swap;font-family:JetBrains Mono;font-style:normal;font-weight:400;src:url(/js/4cdaaa8fe839542200b080dc9b08b7b5.woff2) format("woff2"),url(/js/8e08cd86133caec43c49a139a36424e8.woff) format("woff");unicode-range:U+00??,U+0131,U+0152-0153,U+02bb-02bc,U+02c6,U+02da,U+02dc,U+2000-206f,U+2074,U+20ac,U+2122,U+2191,U+2193,U+2212,U+2215,U+feff,U+fffd}.monaco-editor .accessibilityHelpWidget{overflow:scroll;padding:10px;vertical-align:middle}.monaco-aria-container{left:-999em;position:absolute}.monaco-editor .selection-anchor{background-color:#007acc;width:2px!important}.monaco-editor .bracket-match{box-sizing:border-box}.monaco-editor .monaco-editor-overlaymessage{padding-bottom:8px;z-index:10000}.monaco-editor .monaco-editor-overlaymessage.below{padding-bottom:0;padding-top:8px;z-index:10000}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.monaco-editor .monaco-editor-overlaymessage.fadeIn{-webkit-animation:fadeIn .15s ease-out;animation:fadeIn .15s ease-out}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.monaco-editor .monaco-editor-overlaymessage.fadeOut{-webkit-animation:fadeOut .1s ease-out;animation:fadeOut .1s ease-out}.monaco-editor .monaco-editor-overlaymessage .message{padding:1px 4px}.monaco-editor .monaco-editor-overlaymessage .anchor{border:8px solid transparent;height:0!important;position:absolute;width:0!important;z-index:1000}.monaco-editor .monaco-editor-overlaymessage.below .anchor.below,.monaco-editor .monaco-editor-overlaymessage:not(.below) .anchor.top{display:none}.monaco-editor .monaco-editor-overlaymessage.below .anchor.top{display:inherit;top:-8px}.monaco-editor .contentWidgets .codicon-light-bulb,.monaco-editor .contentWidgets .codicon-lightbulb-autofix{align-items:center;display:flex;justify-content:center}.monaco-editor .contentWidgets .codicon-light-bulb:hover,.monaco-editor .contentWidgets .codicon-lightbulb-autofix:hover{cursor:pointer}.monaco-editor .codelens-decoration{display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .codelens-decoration>a,.monaco-editor .codelens-decoration>span{-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none;vertical-align:sub;white-space:nowrap}.monaco-editor .codelens-decoration>a{text-decoration:none}.monaco-editor .codelens-decoration>a:hover{cursor:pointer}.monaco-editor .codelens-decoration .codicon{color:currentColor!important;vertical-align:middle}.monaco-editor .codelens-decoration>a:hover .codicon:before{cursor:pointer}@-webkit-keyframes fadein{0%{opacity:0;visibility:visible}to{opacity:1}}@keyframes fadein{0%{opacity:0;visibility:visible}to{opacity:1}}.monaco-editor .codelens-decoration.fadein,.monaco-hover{-webkit-animation:fadein .1s linear;animation:fadein .1s linear}.monaco-hover{box-sizing:initial;cursor:default;line-height:1.5em;overflow:hidden;position:absolute;-moz-user-select:text;user-select:text;-webkit-user-select:text;-ms-user-select:text;z-index:50}.monaco-hover.hidden{display:none}.monaco-hover .hover-contents{padding:4px 8px}.monaco-hover .markdown-hover>.hover-contents:not(.code-hover-contents){word-wrap:break-word;max-width:500px}.monaco-hover .markdown-hover>.hover-contents:not(.code-hover-contents) hr{min-width:100%}.monaco-hover .code,.monaco-hover p,.monaco-hover ul{margin:8px 0}.monaco-hover code{font-family:var(--monaco-monospace-font)}.monaco-hover hr{border-left:0;border-right:0;box-sizing:border-box;height:1px;margin:4px -8px -4px}.monaco-hover .code:first-child,.monaco-hover p:first-child,.monaco-hover ul:first-child{margin-top:0}.monaco-hover .code:last-child,.monaco-hover p:last-child,.monaco-hover ul:last-child{margin-bottom:0}.monaco-hover ol,.monaco-hover ul{padding-left:20px}.monaco-hover li>p{margin-bottom:0}.monaco-hover li>ul{margin-top:0}.monaco-hover code{border-radius:3px;padding:0 .4em}.monaco-hover .monaco-tokenized-source{white-space:pre-wrap}.monaco-hover .hover-row.status-bar{font-size:12px;line-height:22px}.monaco-hover .hover-row.status-bar .actions{display:flex;padding:0 8px}.monaco-hover .hover-row.status-bar .actions .action-container{cursor:pointer;margin-right:16px}.monaco-hover .hover-row.status-bar .actions .action-container .action .icon{padding-right:4px}.monaco-hover .markdown-hover .hover-contents .codicon{color:inherit;font-size:inherit;vertical-align:middle}.monaco-hover .hover-contents a.code-link:before{content:"("}.monaco-hover .hover-contents a.code-link:after{content:")"}.monaco-hover .hover-contents a.code-link{color:inherit}.monaco-hover .hover-contents a.code-link>span{border-bottom:1px solid transparent;text-decoration:underline;text-underline-position:under}.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents) span{display:inline-block;margin-bottom:4px}.monaco-hover-content .action-container a{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.monaco-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.monaco-scrollable-element>.visible{background:transparent;opacity:1;transition:opacity .1s linear}.monaco-scrollable-element>.invisible{opacity:0;pointer-events:none}.monaco-scrollable-element>.invisible.fade{transition:opacity .8s linear}.monaco-scrollable-element>.shadow{display:none;position:absolute}.monaco-scrollable-element>.shadow.top{box-shadow:inset 0 6px 6px -6px #ddd;display:block;height:3px;left:3px;top:0;width:100%}.monaco-scrollable-element>.shadow.left{box-shadow:inset 6px 0 6px -6px #ddd;display:block;height:100%;left:0;top:3px;width:3px}.monaco-scrollable-element>.shadow.top-left-corner{display:block;height:3px;left:0;top:0;width:3px}.monaco-scrollable-element>.shadow.top.left{box-shadow:inset 6px 6px 6px -6px #ddd}.vs .monaco-scrollable-element>.scrollbar>.slider{background:hsla(0,0%,39.2%,.4)}.vs-dark .monaco-scrollable-element>.scrollbar>.slider{background:hsla(0,0%,47.5%,.4)}.hc-black .monaco-scrollable-element>.scrollbar>.slider{background:rgba(111,195,223,.6)}.monaco-scrollable-element>.scrollbar>.slider:hover{background:hsla(0,0%,39.2%,.7)}.hc-black .monaco-scrollable-element>.scrollbar>.slider:hover{background:rgba(111,195,223,.8)}.monaco-scrollable-element>.scrollbar>.slider.active{background:rgba(0,0,0,.6)}.vs-dark .monaco-scrollable-element>.scrollbar>.slider.active{background:hsla(0,0%,74.9%,.4)}.hc-black .monaco-scrollable-element>.scrollbar>.slider.active{background:#6fc3df}.vs-dark .monaco-scrollable-element .shadow.top{box-shadow:none}.vs-dark .monaco-scrollable-element .shadow.left{box-shadow:inset 6px 0 6px -6px #000}.vs-dark .monaco-scrollable-element .shadow.top.left{box-shadow:inset 6px 6px 6px -6px #000}.hc-black .monaco-scrollable-element .shadow.left,.hc-black .monaco-scrollable-element .shadow.top,.hc-black .monaco-scrollable-element .shadow.top.left{box-shadow:none}.monaco-editor .peekview-widget .head .peekview-title .severity-icon{display:inline-block;margin-right:4px;vertical-align:text-top}.monaco-editor .marker-widget{text-overflow:ellipsis;white-space:nowrap}.monaco-editor .marker-widget>.stale{font-style:italic;opacity:.6}.monaco-editor .marker-widget .title{display:inline-block;padding-right:5px}.monaco-editor .marker-widget .descriptioncontainer{padding:8px 12px 0 20px;position:absolute;-moz-user-select:text;user-select:text;-webkit-user-select:text;-ms-user-select:text;white-space:pre}.monaco-editor .marker-widget .descriptioncontainer .message{display:flex;flex-direction:column}.monaco-editor .marker-widget .descriptioncontainer .message .details{padding-left:6px}.monaco-editor .marker-widget .descriptioncontainer .message .source,.monaco-editor .marker-widget .descriptioncontainer .message span.code{opacity:.6}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link{color:inherit;opacity:.6}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:before{content:"("}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:after{content:")"}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link>span{border-bottom:1px solid transparent;text-decoration:underline;text-underline-position:under}.monaco-editor .marker-widget .descriptioncontainer .filename{cursor:pointer}.monaco-editor .peekview-widget .head{box-sizing:border-box;display:flex}.monaco-editor .peekview-widget .head .peekview-title{align-items:center;cursor:pointer;display:flex;font-size:13px;margin-left:20px;min-width:0}.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty){font-size:.9em;margin-left:.5em}.monaco-editor .peekview-widget .head .peekview-title .dirname,.monaco-editor .peekview-widget .head .peekview-title .meta{white-space:nowrap}.monaco-editor .peekview-widget .head .peekview-title .filename{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .peekview-widget .head .peekview-title .meta:not(:empty):before{content:"-";padding:0 .3em}.monaco-editor .peekview-widget .head .peekview-actions{flex:1;padding-right:2px;text-align:right}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar{display:inline-block}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar,.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar>.actions-container{height:100%}.monaco-editor .peekview-widget>.body{border-top:1px solid;position:relative}.monaco-editor .peekview-widget .head .peekview-title .codicon{margin-right:4px}.monaco-action-bar{height:100%;white-space:nowrap}.monaco-action-bar .actions-container{align-items:center;display:flex;height:100%;margin:0 auto;padding:0;width:100%}.monaco-action-bar.vertical .actions-container{display:inline-block}.monaco-action-bar .action-item{align-items:center;cursor:pointer;display:block;justify-content:center;position:relative}.monaco-action-bar .action-item.disabled{cursor:default}.monaco-action-bar .action-item .codicon,.monaco-action-bar .action-item .icon{display:block}.monaco-action-bar .action-item .codicon{align-items:center;display:flex;height:16px;width:16px}.monaco-action-bar .action-label{border-radius:5px;font-size:11px;padding:3px}.monaco-action-bar .action-item.disabled .action-label,.monaco-action-bar .action-item.disabled .action-label:before,.monaco-action-bar .action-item.disabled .action-label:hover{opacity:.4}.monaco-action-bar.vertical{text-align:left}.monaco-action-bar.vertical .action-item{display:block}.monaco-action-bar.vertical .action-label.separator{border-bottom:1px solid #bbb;display:block;margin-left:.8em;margin-right:.8em;padding-top:1px}.monaco-action-bar .action-item .action-label.separator{background-color:#bbb;cursor:default;height:16px;margin:5px 4px!important;min-width:1px;padding:0;width:1px}.secondary-actions .monaco-action-bar .action-label{margin-left:6px}.monaco-action-bar .action-item.select-container{align-items:center;display:flex;flex:1;justify-content:center;margin-right:10px;max-width:170px;min-width:60px;overflow:hidden}.monaco-action-bar .action-item.action-dropdown-item{display:flex}.monaco-action-bar .action-item.action-dropdown-item>.action-label{margin-right:1px}::-ms-clear{display:none}.monaco-editor .editor-widget input{color:inherit}.monaco-editor{overflow:visible;position:relative;-webkit-text-size-adjust:100%}.monaco-editor .overflow-guard{overflow:hidden;position:relative}.monaco-editor .view-overlays{position:absolute;top:0}.monaco-editor .inputarea{background-color:transparent;border:none;color:transparent;margin:0;min-height:0;min-width:0;outline:none!important;overflow:hidden;padding:0;position:absolute;resize:none}.monaco-editor .inputarea.ime-input{z-index:10}.monaco-editor .margin-view-overlays .line-numbers{box-sizing:border-box;cursor:default;display:inline-block;font-variant-numeric:tabular-nums;height:100%;position:absolute;text-align:right;vertical-align:middle}.monaco-editor .relative-current-line-number{display:inline-block;text-align:left;width:100%}.monaco-editor .margin-view-overlays .line-numbers.lh-odd{margin-top:1px}.monaco-mouse-cursor-text{cursor:text}.hc-black.mac .monaco-mouse-cursor-text,.hc-black .mac .monaco-mouse-cursor-text,.vs-dark.mac .monaco-mouse-cursor-text,.vs-dark .mac .monaco-mouse-cursor-text{cursor:-webkit-image-set(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=) 1x,url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC) 2x) 5 8,text}.monaco-editor .margin-view-overlays .current-line,.monaco-editor .view-overlays .current-line{box-sizing:border-box;display:block;left:0;position:absolute;top:0}.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both{border-right:0}.monaco-editor .lines-content .cdr{position:absolute}.monaco-editor .glyph-margin{position:absolute;top:0}.monaco-editor .margin-view-overlays .cgmr{align-items:center;display:flex;justify-content:center;position:absolute}.monaco-editor .lines-content .cigr,.monaco-editor .lines-content .cigra{position:absolute}.monaco-editor.no-user-select .lines-content,.monaco-editor.no-user-select .view-line,.monaco-editor.no-user-select .view-lines{-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-editor .view-lines{white-space:nowrap}.monaco-editor .view-line{position:absolute;width:100%}.monaco-editor .mtkz{display:inline-block}.monaco-editor .lines-decorations{background:#fff;position:absolute;top:0}.monaco-editor .margin-view-overlays .cldr{height:100%;position:absolute}.monaco-editor .margin-view-overlays .cmdr{height:100%;left:0;position:absolute;width:100%}.monaco-editor .minimap.slider-mouseover .minimap-slider{opacity:0;transition:opacity .1s linear}.monaco-editor .minimap.slider-mouseover .minimap-slider.active,.monaco-editor .minimap.slider-mouseover:hover .minimap-slider{opacity:1}.monaco-editor .minimap-shadow-hidden{position:absolute;width:0}.monaco-editor .minimap-shadow-visible{left:-6px;position:absolute;width:6px}.monaco-editor.no-minimap-shadow .minimap-shadow-visible{left:-1px;position:absolute;width:1px}.monaco-editor .overlayWidgets{left:0;position:absolute;top:0}.monaco-editor .view-ruler{position:absolute;top:0}.monaco-editor .scroll-decoration{height:6px;left:0;position:absolute;top:0}.monaco-editor .lines-content .cslr{position:absolute}.monaco-editor .top-left-radius{border-top-left-radius:3px}.monaco-editor .bottom-left-radius{border-bottom-left-radius:3px}.monaco-editor .top-right-radius{border-top-right-radius:3px}.monaco-editor .bottom-right-radius{border-bottom-right-radius:3px}.monaco-editor.hc-black .top-left-radius{border-top-left-radius:0}.monaco-editor.hc-black .bottom-left-radius{border-bottom-left-radius:0}.monaco-editor.hc-black .top-right-radius{border-top-right-radius:0}.monaco-editor.hc-black .bottom-right-radius{border-bottom-right-radius:0}.monaco-editor .cursors-layer{position:absolute;top:0}.monaco-editor .cursors-layer>.cursor{overflow:hidden;position:absolute}.monaco-editor .cursors-layer.cursor-smooth-caret-animation>.cursor{transition:all 80ms}.monaco-editor .cursors-layer.cursor-block-outline-style>.cursor{background:transparent!important;border-style:solid;border-width:1px;box-sizing:border-box}.monaco-editor .cursors-layer.cursor-underline-style>.cursor{background:transparent!important;border-bottom-style:solid;border-bottom-width:2px;box-sizing:border-box}.monaco-editor .cursors-layer.cursor-underline-thin-style>.cursor{background:transparent!important;border-bottom-style:solid;border-bottom-width:1px;box-sizing:border-box}@-webkit-keyframes monaco-cursor-smooth{0%,20%{opacity:1}60%,to{opacity:0}}@keyframes monaco-cursor-smooth{0%,20%{opacity:1}60%,to{opacity:0}}@-webkit-keyframes monaco-cursor-phase{0%,20%{opacity:1}90%,to{opacity:0}}@keyframes monaco-cursor-phase{0%,20%{opacity:1}90%,to{opacity:0}}@-webkit-keyframes monaco-cursor-expand{0%,20%{transform:scaleY(1)}80%,to{transform:scaleY(0)}}@keyframes monaco-cursor-expand{0%,20%{transform:scaleY(1)}80%,to{transform:scaleY(0)}}.cursor-smooth{-webkit-animation:monaco-cursor-smooth .5s ease-in-out 0s 20 alternate;animation:monaco-cursor-smooth .5s ease-in-out 0s 20 alternate}.cursor-phase{-webkit-animation:monaco-cursor-phase .5s ease-in-out 0s 20 alternate;animation:monaco-cursor-phase .5s ease-in-out 0s 20 alternate}.cursor-expand>.cursor{-webkit-animation:monaco-cursor-expand .5s ease-in-out 0s 20 alternate;animation:monaco-cursor-expand .5s ease-in-out 0s 20 alternate}.monaco-editor .zone-widget{position:absolute;z-index:10}.monaco-editor .zone-widget .zone-widget-container{border-bottom-style:solid;border-bottom-width:0;border-top-style:solid;border-top-width:0;position:relative}:root{--sash-size:4px}.monaco-sash{position:absolute;touch-action:none;z-index:35}.monaco-sash.disabled{pointer-events:none}.monaco-sash.mac.vertical{cursor:col-resize}.monaco-sash.vertical.minimum{cursor:e-resize}.monaco-sash.vertical.maximum{cursor:w-resize}.monaco-sash.mac.horizontal{cursor:row-resize}.monaco-sash.horizontal.minimum{cursor:s-resize}.monaco-sash.horizontal.maximum{cursor:n-resize}.monaco-sash.disabled{cursor:default!important;pointer-events:none!important}.monaco-sash.vertical{cursor:ew-resize;height:100%;top:0;width:var(--sash-size)}.monaco-sash.horizontal{cursor:ns-resize;height:var(--sash-size);left:0;width:100%}.monaco-sash:not(.disabled)>.orthogonal-drag-handle{content:" ";cursor:all-scroll;display:block;height:calc(var(--sash-size)*2);position:absolute;width:calc(var(--sash-size)*2);z-index:100}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)>.orthogonal-drag-handle.start,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)>.orthogonal-drag-handle.end{cursor:nwse-resize}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)>.orthogonal-drag-handle.end,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)>.orthogonal-drag-handle.start{cursor:nesw-resize}.monaco-sash.vertical>.orthogonal-drag-handle.start{left:calc(var(--sash-size)*-.5);top:calc(var(--sash-size)*-1)}.monaco-sash.vertical>.orthogonal-drag-handle.end{bottom:calc(var(--sash-size)*-1);left:calc(var(--sash-size)*-.5)}.monaco-sash.horizontal>.orthogonal-drag-handle.start{left:calc(var(--sash-size)*-1);top:calc(var(--sash-size)*-.5)}.monaco-sash.horizontal>.orthogonal-drag-handle.end{right:calc(var(--sash-size)*-1);top:calc(var(--sash-size)*-.5)}.monaco-sash:before{background:transparent;content:"";height:100%;pointer-events:none;position:absolute;transition:background-color .1s ease-out;width:100%}.monaco-sash.vertical:before{left:calc(50% - var(--sash-hover-size)/2);width:var(--sash-hover-size)}.monaco-sash.horizontal:before{height:var(--sash-hover-size);top:calc(50% - var(--sash-hover-size)/2)}.monaco-sash.debug{background:#0ff}.monaco-sash.debug.disabled{background:rgba(0,255,255,.2)}.monaco-sash.debug:not(.disabled)>.orthogonal-drag-handle{background:red}.monaco-action-bar .action-item.menu-entry .action-label.icon{background-position:50%;background-repeat:no-repeat;background-size:16px;height:16px;width:16px}.monaco-action-bar .action-item.menu-entry .action-label{background-image:var(--menu-entry-icon-light)}.hc-black .monaco-action-bar .action-item.menu-entry .action-label,.vs-dark .monaco-action-bar .action-item.menu-entry .action-label{background-image:var(--menu-entry-icon-dark)}.monaco-dropdown{height:100%;padding:0}.monaco-dropdown>.dropdown-label{align-items:center;cursor:pointer;display:flex;height:100%;justify-content:center}.monaco-dropdown>.dropdown-label>.action-label.disabled{cursor:default}.monaco-dropdown-with-primary{border-radius:5px;display:flex!important;flex-direction:row}.monaco-dropdown-with-primary>.action-container>.action-label{margin-right:0}.monaco-dropdown-with-primary>.dropdown-action-container>.monaco-dropdown>.dropdown-label .codicon[class*=codicon-]{font-size:12px;line-height:16px;margin-left:-4px;padding-left:0;padding-right:0}.monaco-dropdown-with-primary>.dropdown-action-container>.monaco-dropdown>.dropdown-label>.action-label{background-position:50%;background-repeat:no-repeat;background-size:16px;display:block}.monaco-editor .suggest-preview-additional-widget{white-space:nowrap}.monaco-editor .suggest-preview-additional-widget .content-spacer{color:transparent;white-space:pre}.monaco-editor .suggest-preview-additional-widget .button{cursor:pointer;display:inline-block;text-decoration:underline;text-underline-position:under}.monaco-editor .snippet-placeholder{min-width:2px}.monaco-editor .finish-snippet-placeholder,.monaco-editor .snippet-placeholder{outline-style:solid;outline-width:1px}.monaco-editor .suggest-widget{display:flex;flex-direction:column;width:430px;z-index:40}.monaco-editor .suggest-widget.message{align-items:center;flex-direction:row}.monaco-editor .suggest-details,.monaco-editor .suggest-widget{border-style:solid;border-width:1px;flex:0 1 auto;width:100%}.monaco-editor.hc-black .suggest-details,.monaco-editor.hc-black .suggest-widget{border-width:2px}.monaco-editor .suggest-widget .suggest-status-bar{border-top:1px solid transparent;box-sizing:border-box;display:none;flex-flow:row nowrap;font-size:80%;justify-content:space-between;overflow:hidden;padding:0 4px;width:100%}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar{display:flex}.monaco-editor .suggest-widget .suggest-status-bar .left{padding-right:8px}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-label{color:inherit;opacity:.5}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label{margin-right:0}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label:after{content:", ";margin-right:.3em}.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore,.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget.with-status-bar:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label{width:100%}.monaco-editor .suggest-widget>.message{padding-left:22px}.monaco-editor .suggest-widget>.tree{height:100%;width:100%}.monaco-editor .suggest-widget .monaco-list{-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row{background-position:2px 2px;background-repeat:no-repeat;-mox-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:flex;padding-right:10px;touch-action:none;white-space:nowrap}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents{flex:1;height:100%;overflow:hidden;padding-left:2px}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main{display:flex;justify-content:space-between;overflow:hidden;text-overflow:ellipsis;white-space:pre}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right{display:flex}.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight{font-weight:700}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:before{color:inherit;cursor:pointer;font-size:14px;opacity:1}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close{position:absolute;right:2px;top:6px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close:hover,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:hover{opacity:1}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.qualifier-label,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.signature-label,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{opacity:.7}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.signature-label{overflow:hidden;text-overflow:ellipsis}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.qualifier-label{align-self:center;font-size:90%;margin-left:4px;opacity:.4;overflow:hidden;text-overflow:ellipsis}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{margin-left:1.1em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label>.monaco-tokenized-source{display:inline}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{display:none}.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused:not(.string-label)>.contents>.main>.right>.details-label,.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.right>.details-label,.monaco-editor .suggest-widget:not(.shows-details) .monaco-list .monaco-list-row.focused>.contents>.main>.right>.details-label{display:inline}.monaco-editor .suggest-widget:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label{width:calc(100% - 26px)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left{flex-grow:1;flex-shrink:1;overflow:hidden}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.monaco-icon-label{flex-shrink:0}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.left>.monaco-icon-label{max-width:100%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.left>.monaco-icon-label{flex-shrink:1}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right{flex-shrink:4;max-width:70%;overflow:hidden}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:inline-block;height:18px;position:absolute;right:10px;visibility:hidden;width:18px}.monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:none!important}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore{display:inline-block}.monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:hover>.contents>.main>.right>.readMore{visibility:visible}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated{opacity:.66;text-decoration:unset}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated>.monaco-icon-label-container>.monaco-icon-name-container{text-decoration:line-through}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label:before{height:100%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon{background-position:50%;background-repeat:no-repeat;background-size:80%;display:block;height:16px;margin-left:2px;width:16px}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.hide{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .suggest-icon{align-items:center;display:flex;margin-right:4px}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .suggest-icon{color:inherit}.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .icon,.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .suggest-icon:before{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan{border:.1em solid #000;display:inline-block;height:.7em;margin:0 0 0 .3em;width:.7em}.monaco-editor .suggest-details-container{z-index:41}.monaco-editor .suggest-details{cursor:default;display:flex;flex-direction:column}.monaco-editor .suggest-details.no-docs{display:none}.monaco-editor .suggest-details>.monaco-scrollable-element{flex:1}.monaco-editor .suggest-details>.monaco-scrollable-element>.body{box-sizing:border-box;height:100%;width:100%}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type{flex:2;margin:0 24px 0 0;opacity:.7;overflow:hidden;padding:4px 0 12px 5px;text-overflow:ellipsis;white-space:pre}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type.auto-wrap{white-space:normal;word-break:break-all}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs{margin:0;padding:4px 5px;white-space:pre-wrap}.monaco-editor .suggest-details.no-type>.monaco-scrollable-element>.body>.docs{margin-right:24px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs{min-height:calc(1rem + 8px);padding:0;white-space:normal}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div,.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>span:not(:empty){padding:4px 5px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:first-child{margin-top:0}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:last-child{margin-bottom:0}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs .code{word-wrap:break-word;white-space:pre-wrap}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .codicon{vertical-align:sub}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>p:empty{display:none}.monaco-editor .suggest-details code{border-radius:3px;padding:0 .4em}.monaco-editor .suggest-details ol,.monaco-editor .suggest-details ul{padding-left:20px}.monaco-editor .suggest-details p code{font-family:var(--monaco-monospace-font)}@font-face{font-family:codicon;src:url(/js/0e0f4555ac984d9d78c1a07738e98d58.ttf) format("truetype")}.codicon[class*=codicon-]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font:normal normal normal 16px/1 codicon;text-align:center;text-decoration:none;text-rendering:auto;-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none}.codicon-wrench-subaction{opacity:.5}@-webkit-keyframes codicon-spin{to{transform:rotate(1turn)}}@keyframes codicon-spin{to{transform:rotate(1turn)}}.codicon-gear.codicon-modifier-spin,.codicon-loading.codicon-modifier-spin,.codicon-notebook-state-executing.codicon-modifier-spin,.codicon-sync.codicon-modifier-spin{-webkit-animation:codicon-spin 1.5s steps(30) infinite;animation:codicon-spin 1.5s steps(30) infinite}.codicon-modifier-disabled{opacity:.4}.codicon-loading,.codicon-tree-item-loading:before{-webkit-animation-duration:1s!important;animation-duration:1s!important;-webkit-animation-timing-function:cubic-bezier(.53,.21,.29,.67)!important;animation-timing-function:cubic-bezier(.53,.21,.29,.67)!important}.monaco-list{height:100%;position:relative;white-space:nowrap;width:100%}.monaco-list.mouse-support{-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-list>.monaco-scrollable-element{height:100%}.monaco-list-rows{height:100%;position:relative;width:100%}.monaco-list.horizontal-scrolling .monaco-list-rows{min-width:100%;width:auto}.monaco-list-row{box-sizing:border-box;overflow:hidden;position:absolute;width:100%}.monaco-list.mouse-support .monaco-list-row{cursor:pointer;touch-action:none}.monaco-list-row.scrolling{display:none!important}.monaco-list.element-focused,.monaco-list.selection-multiple,.monaco-list.selection-single{outline:0!important}.monaco-list:focus .monaco-list-row.selected .codicon{color:inherit}.monaco-drag-image{border-radius:10px;display:inline-block;font-size:12px;padding:1px 7px;position:absolute;z-index:1000}.monaco-list-type-filter{align-items:center;border-radius:2px;box-sizing:border-box;cursor:all-scroll;display:flex;font-size:13px;height:20px;line-height:18px;max-width:calc(100% - 10px);overflow:hidden;padding:0 3px;position:absolute;text-align:right;text-overflow:ellipsis;top:4px;z-index:1}.monaco-list-type-filter.dragging{transition:top .2s,left .2s}.monaco-list-type-filter.ne{right:4px}.monaco-list-type-filter.nw{left:4px}.monaco-list-type-filter>.controls{align-items:center;box-sizing:border-box;display:flex;transition:width .2s;width:0}.monaco-list-type-filter.dragging>.controls,.monaco-list-type-filter:hover>.controls{width:36px}.monaco-list-type-filter>.controls>*{-webkit-appearance:none;-moz-appearance:none;align-items:center;background:none;border:none;box-sizing:border-box;cursor:pointer;display:flex;flex-shrink:0;height:16px;justify-content:center;margin:0;padding:0;width:16px}.monaco-list-type-filter>.controls>.filter{margin-left:4px}.monaco-list-type-filter-message{box-sizing:border-box;height:100%;left:0;opacity:.7;padding:40px 1em 1em;pointer-events:none;position:absolute;text-align:center;top:0;white-space:normal;width:100%}.monaco-list-type-filter-message:empty{display:none}.monaco-list-type-filter{cursor:-webkit-grab;cursor:grab}.monaco-list-type-filter.dragging{cursor:-webkit-grabbing;cursor:grabbing}.monaco-icon-label{display:flex;overflow:hidden;text-overflow:ellipsis}.monaco-icon-label:before{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-position:0;background-repeat:no-repeat;background-size:16px;display:inline-block;flex-shrink:0;height:22px;line-height:inherit!important;padding-right:6px;vertical-align:top;width:16px}.monaco-icon-label>.monaco-icon-label-container{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{color:inherit;white-space:pre}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name>.label-separator{margin:0 2px;opacity:.5}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{font-size:.9em;margin-left:.5em;opacity:.7;white-space:pre}.monaco-icon-label.nowrap>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{white-space:nowrap}.vs .monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{opacity:.95}.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-description-container>.label-description,.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{font-style:italic}.monaco-icon-label.deprecated{opacity:.66;text-decoration:line-through}.monaco-icon-label.italic:after{font-style:italic}.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-description-container>.label-description,.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{text-decoration:line-through}.monaco-icon-label:after{font-size:90%;font-weight:600;opacity:.75;padding:0 16px 0 5px;text-align:center}.monaco-list:focus .selected .monaco-icon-label,.monaco-list:focus .selected .monaco-icon-label:after{color:inherit!important}.monaco-list-row.focused.selected .label-description,.monaco-list-row.selected .label-description{opacity:.8}.colorpicker-widget{height:190px;-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-editor .colorpicker-hover:focus{outline:none}.colorpicker-header{-ms-interpolation-mode:nearest-neighbor;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=");background-size:9px 9px;display:flex;height:24px;image-rendering:-moz-crisp-edges;image-rendering:pixelated;position:relative}.colorpicker-header .picked-color{color:#fff;cursor:pointer;flex:1;line-height:24px;text-align:center;width:216px}.colorpicker-header .picked-color.light{color:#000}.colorpicker-header .original-color{cursor:pointer;width:74px;z-index:inherit}.colorpicker-body{display:flex;padding:8px;position:relative}.colorpicker-body .saturation-wrap{flex:1;height:150px;min-width:220px;overflow:hidden;position:relative}.colorpicker-body .saturation-box{height:150px;position:absolute}.colorpicker-body .saturation-selection{border:1px solid #fff;border-radius:100%;box-shadow:0 0 2px rgba(0,0,0,.8);height:9px;margin:-5px 0 0 -5px;position:absolute;width:9px}.colorpicker-body .strip{height:150px;width:25px}.colorpicker-body .hue-strip{background:linear-gradient(180deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.colorpicker-body .hue-strip,.colorpicker-body .opacity-strip{cursor:-webkit-grab;cursor:grab;margin-left:8px;position:relative}.colorpicker-body .opacity-strip{-ms-interpolation-mode:nearest-neighbor;background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=");background-size:9px 9px;image-rendering:-moz-crisp-edges;image-rendering:pixelated}.colorpicker-body .strip.grabbing{cursor:-webkit-grabbing;cursor:grabbing}.colorpicker-body .slider{border:1px solid hsla(0,0%,100%,.71);box-shadow:0 0 1px rgba(0,0,0,.85);box-sizing:border-box;height:4px;left:-2px;position:absolute;top:0;width:calc(100% + 4px)}.colorpicker-body .strip .overlay{height:150px;pointer-events:none}.monaco-editor .goto-definition-link{cursor:pointer;text-decoration:underline}.monaco-editor .zone-widget .zone-widget-container.reference-zone-widget{border-bottom-width:1px;border-top-width:1px}.monaco-editor .reference-zone-widget .inline{display:inline-block;vertical-align:top}.monaco-editor .reference-zone-widget .messages{height:100%;padding:3em 0;text-align:center;width:100%}.monaco-editor .reference-zone-widget .ref-tree{line-height:23px}.monaco-editor .reference-zone-widget .ref-tree .reference{overflow:hidden;text-overflow:ellipsis}.monaco-editor .reference-zone-widget .ref-tree .reference-file{display:inline-flex;height:100%;width:100%}.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .selected .reference-file{color:inherit!important}.monaco-editor .reference-zone-widget .ref-tree .reference-file .count{margin-left:auto;margin-right:12px}.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file{font-weight:700}.monaco-count-badge{border-radius:11px;box-sizing:border-box;display:inline-block;font-size:11px;font-weight:400;line-height:11px;min-height:18px;min-width:18px;padding:3px 6px;text-align:center}.monaco-count-badge.long{border-radius:2px;line-height:normal;min-height:auto;padding:2px 3px}.monaco-tl-row{align-items:center;display:flex;height:100%;position:relative}.monaco-tl-indent{height:100%;left:16px;pointer-events:none;position:absolute;top:0}.hide-arrows .monaco-tl-indent{left:12px}.monaco-tl-indent>.indent-guide{border-left:1px solid transparent;box-sizing:border-box;display:inline-block;height:100%;transition:border-color .1s linear}.monaco-tl-contents,.monaco-tl-twistie{height:100%}.monaco-tl-twistie{align-items:center;color:inherit!important;display:flex!important;flex-shrink:0;font-size:10px;justify-content:center;padding-right:6px;text-align:right;transform:translateX(3px);width:16px}.monaco-tl-contents{flex:1;overflow:hidden}.monaco-tl-twistie:before{border-radius:20px}.monaco-tl-twistie.collapsed:before{transform:rotate(-90deg)}.monaco-tl-twistie.codicon-tree-item-loading:before{-webkit-animation:codicon-spin 1.25s steps(30) infinite;animation:codicon-spin 1.25s steps(30) infinite}.monaco-table{display:flex;flex-direction:column;height:100%;position:relative;white-space:nowrap;width:100%}.monaco-table>.monaco-split-view2{border-bottom:1px solid transparent}.monaco-table>.monaco-list{flex:1}.monaco-table-tr{display:flex;height:100%}.monaco-table-th{font-weight:700;height:100%;overflow:hidden;text-overflow:ellipsis;width:100%}.monaco-table-td,.monaco-table-th{box-sizing:border-box;flex-shrink:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-table>.monaco-split-view2 .monaco-sash.vertical:before{border-left:1px solid transparent;content:"";left:calc(var(--sash-size)/2);position:absolute;width:0}.monaco-table>.monaco-split-view2,.monaco-table>.monaco-split-view2 .monaco-sash.vertical:before{transition:border-color .2s ease-out}.monaco-split-view2{height:100%;position:relative;width:100%}.monaco-split-view2>.sash-container{height:100%;pointer-events:none;position:absolute;width:100%}.monaco-split-view2>.sash-container>.monaco-sash{pointer-events:auto}.monaco-split-view2>.monaco-scrollable-element{height:100%;width:100%}.monaco-split-view2>.monaco-scrollable-element>.split-view-container{height:100%;position:relative;white-space:nowrap;width:100%}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view{position:absolute;white-space:normal}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view:not(.visible){display:none}.monaco-split-view2.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view{width:100%}.monaco-split-view2.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view{height:100%}.monaco-split-view2.separator-border>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{background-color:var(--separator-border);content:" ";left:0;pointer-events:none;position:absolute;top:0;z-index:5}.monaco-split-view2.separator-border.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:100%;width:1px}.monaco-split-view2.separator-border.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:1px;width:100%}.monaco-editor.vs .dnd-target{border-right:2px dotted #000;color:#fff}.monaco-editor.vs-dark .dnd-target{border-right:2px dotted #aeafad;color:#51504f}.monaco-editor.hc-black .dnd-target{border-right:2px dotted #fff;color:#000}.monaco-editor.hc-black.mac.mouse-default .view-lines,.monaco-editor.mouse-default .view-lines,.monaco-editor.vs-dark.mac.mouse-default .view-lines{cursor:default}.monaco-editor.hc-black.mac.mouse-copy .view-lines,.monaco-editor.mouse-copy .view-lines,.monaco-editor.vs-dark.mac.mouse-copy .view-lines{cursor:copy}.monaco-custom-checkbox{border:1px solid transparent;box-sizing:border-box;cursor:pointer;float:left;height:20px;margin-left:2px;opacity:.7;overflow:hidden;padding:1px;-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none;width:20px}.monaco-custom-checkbox.checked,.monaco-custom-checkbox:hover{opacity:1}.hc-black .monaco-custom-checkbox,.hc-black .monaco-custom-checkbox:hover{background:none}.monaco-custom-checkbox.monaco-simple-checkbox{background-size:16px!important;border:1px solid transparent;border-radius:3px;height:18px;margin-left:0;margin-right:9px;opacity:1;padding:0;width:18px}.monaco-custom-checkbox.monaco-simple-checkbox:not(.checked):before{visibility:hidden}.monaco-editor .find-widget{box-sizing:border-box;height:33px;line-height:19px;overflow:hidden;padding:0 4px;position:absolute;transform:translateY(calc(-100% - 10px));transition:transform .2s linear;z-index:35}.monaco-editor .find-widget textarea{margin:0}.monaco-editor .find-widget.hiddenEditor{display:none}.monaco-editor .find-widget.replaceToggled>.replace-part{display:flex}.monaco-editor .find-widget.visible{transform:translateY(0)}.monaco-editor .find-widget .monaco-inputbox.synthetic-focus{outline:1px solid -webkit-focus-ring-color;outline-offset:-1px}.monaco-editor .find-widget .monaco-inputbox .input{background-color:transparent;min-height:0}.monaco-editor .find-widget .monaco-findInput .input{font-size:13px}.monaco-editor .find-widget>.find-part,.monaco-editor .find-widget>.replace-part{display:flex;font-size:12px;margin:4px 0 0 17px}.monaco-editor .find-widget>.find-part .monaco-inputbox,.monaco-editor .find-widget>.replace-part .monaco-inputbox{min-height:25px}.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.mirror{padding-right:22px}.monaco-editor .find-widget>.find-part .monaco-inputbox>.ibwrapper>.input,.monaco-editor .find-widget>.find-part .monaco-inputbox>.ibwrapper>.mirror,.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.input,.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.mirror{padding-bottom:2px;padding-top:2px}.monaco-editor .find-widget>.find-part .find-actions,.monaco-editor .find-widget>.replace-part .replace-actions{align-items:center;display:flex;height:25px}.monaco-editor .find-widget .monaco-findInput{display:flex;flex:1;vertical-align:middle}.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element{width:100%}.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element .scrollbar.vertical{opacity:0}.monaco-editor .find-widget .matchesCount{box-sizing:border-box;display:flex;flex:initial;height:25px;line-height:23px;margin:0 0 0 3px;padding:2px 0 0 2px;text-align:center;vertical-align:middle}.monaco-editor .find-widget .button{align-items:center;background-position:50%;background-repeat:no-repeat;cursor:pointer;display:flex;flex:initial;height:20px;justify-content:center;margin-left:3px;width:20px}.monaco-editor .find-widget .button.left{margin-left:0;margin-right:3px}.monaco-editor .find-widget .button.wide{padding:1px 6px;top:-1px;width:auto}.monaco-editor .find-widget .button.toggle{box-sizing:border-box;height:100%;left:3px;position:absolute;top:0;width:18px}.monaco-editor .find-widget .button.toggle.disabled{display:none}.monaco-editor .find-widget .disabled{cursor:default;opacity:.3}.monaco-editor .find-widget>.replace-part{display:none}.monaco-editor .find-widget>.replace-part>.monaco-findInput{display:flex;flex:auto;flex-grow:0;flex-shrink:0;position:relative;vertical-align:middle}.monaco-editor .find-widget>.replace-part>.monaco-findInput>.controls{position:absolute;right:2px;top:3px}.monaco-editor .find-widget.reduced-find-widget .matchesCount{display:none}.monaco-editor .find-widget.narrow-find-widget{max-width:257px!important}.monaco-editor .find-widget.collapsed-find-widget{max-width:170px!important}.monaco-editor .find-widget.collapsed-find-widget .button.next,.monaco-editor .find-widget.collapsed-find-widget .button.previous,.monaco-editor .find-widget.collapsed-find-widget .button.replace,.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,.monaco-editor .find-widget.collapsed-find-widget>.find-part .monaco-findInput .controls{display:none}.monaco-editor .findMatch{-webkit-animation-duration:0;animation-duration:0;-webkit-animation-name:inherit!important;animation-name:inherit!important}.monaco-editor .find-widget .monaco-sash{left:0!important}.monaco-editor.hc-black .find-widget .button:before{left:2px;position:relative;top:1px}.monaco-findInput{position:relative}.monaco-findInput .monaco-inputbox{font-size:13px;width:100%}.monaco-findInput>.controls{position:absolute;right:2px;top:3px}.vs .monaco-findInput.disabled{background-color:#e1e1e1}.vs-dark .monaco-findInput.disabled{background-color:#333}.monaco-findInput.highlight-0 .controls{-webkit-animation:monaco-findInput-highlight-0 .1s linear 0s;animation:monaco-findInput-highlight-0 .1s linear 0s}.monaco-findInput.highlight-1 .controls{-webkit-animation:monaco-findInput-highlight-1 .1s linear 0s;animation:monaco-findInput-highlight-1 .1s linear 0s}.hc-black .monaco-findInput.highlight-0 .controls,.vs-dark .monaco-findInput.highlight-0 .controls{-webkit-animation:monaco-findInput-highlight-dark-0 .1s linear 0s;animation:monaco-findInput-highlight-dark-0 .1s linear 0s}.hc-black .monaco-findInput.highlight-1 .controls,.vs-dark .monaco-findInput.highlight-1 .controls{-webkit-animation:monaco-findInput-highlight-dark-1 .1s linear 0s;animation:monaco-findInput-highlight-dark-1 .1s linear 0s}@-webkit-keyframes monaco-findInput-highlight-0{0%{background:rgba(253,255,0,.8)}to{background:transparent}}@keyframes monaco-findInput-highlight-0{0%{background:rgba(253,255,0,.8)}to{background:transparent}}@-webkit-keyframes monaco-findInput-highlight-1{0%{background:rgba(253,255,0,.8)}99%{background:transparent}}@keyframes monaco-findInput-highlight-1{0%{background:rgba(253,255,0,.8)}99%{background:transparent}}@-webkit-keyframes monaco-findInput-highlight-dark-0{0%{background:hsla(0,0%,100%,.44)}to{background:transparent}}@keyframes monaco-findInput-highlight-dark-0{0%{background:hsla(0,0%,100%,.44)}to{background:transparent}}@-webkit-keyframes monaco-findInput-highlight-dark-1{0%{background:hsla(0,0%,100%,.44)}99%{background:transparent}}@keyframes monaco-findInput-highlight-dark-1{0%{background:hsla(0,0%,100%,.44)}99%{background:transparent}}.monaco-inputbox{box-sizing:border-box;display:block;font-size:inherit;padding:0;position:relative}.monaco-inputbox.idle{border:1px solid transparent}.monaco-inputbox>.ibwrapper>.input,.monaco-inputbox>.ibwrapper>.mirror{padding:4px}.monaco-inputbox>.ibwrapper{height:100%;position:relative;width:100%}.monaco-inputbox>.ibwrapper>.input{border:none;box-sizing:border-box;color:inherit;display:inline-block;font-family:inherit;font-size:inherit;height:100%;line-height:inherit;resize:none;width:100%}.monaco-inputbox>.ibwrapper>input{text-overflow:ellipsis}.monaco-inputbox>.ibwrapper>textarea.input{-ms-overflow-style:none;scrollbar-width:none;display:block;outline:none}.monaco-inputbox>.ibwrapper>textarea.input::-webkit-scrollbar{display:none}.monaco-inputbox>.ibwrapper>textarea.input.empty{white-space:nowrap}.monaco-inputbox>.ibwrapper>.mirror{word-wrap:break-word;box-sizing:border-box;display:inline-block;left:0;position:absolute;top:0;visibility:hidden;white-space:pre-wrap;width:100%}.monaco-inputbox-container{text-align:right}.monaco-inputbox-container .monaco-inputbox-message{word-wrap:break-word;box-sizing:border-box;display:inline-block;font-size:12px;line-height:17px;margin-top:-1px;overflow:hidden;padding:.4em;text-align:left;width:100%}.monaco-inputbox .monaco-action-bar{position:absolute;right:2px;top:4px}.monaco-inputbox .monaco-action-bar .action-item{margin-left:2px}.monaco-inputbox .monaco-action-bar .action-item .codicon{background-repeat:no-repeat;height:16px;width:16px}.monaco-editor .margin-view-overlays .codicon-folding-collapsed,.monaco-editor .margin-view-overlays .codicon-folding-expanded{align-items:center;cursor:pointer;display:flex;font-size:140%;justify-content:center;margin-left:2px;opacity:0;transition:opacity .5s}.monaco-editor .margin-view-overlays .codicon.alwaysShowFoldIcons,.monaco-editor .margin-view-overlays .codicon.codicon-folding-collapsed,.monaco-editor .margin-view-overlays:hover .codicon{opacity:1}.monaco-editor .inline-folded:after{color:grey;content:"⋯";cursor:pointer;display:inline;line-height:1em;margin:.1em .2em 0}.monaco-editor .iPadShowKeyboard{background:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgY2xpcC1wYXRoPSJ1cmwoI2EpIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTQ4LjAzNiA0LjAxSDQuMDA4VjMyLjAzaDQ0LjAyOFY0LjAxek00LjAwOC4wMDhBNC4wMDMgNC4wMDMgMCAwIDAgLjAwNSA0LjAxVjMyLjAzYTQuMDAzIDQuMDAzIDAgMCAwIDQuMDAzIDQuMDAyaDQ0LjAyOGE0LjAwMyA0LjAwMyAwIDAgMCA0LjAwMy00LjAwMlY0LjAxQTQuMDAzIDQuMDAzIDAgMCAwIDQ4LjAzNi4wMDhINC4wMDh6TTguMDEgOC4wMTNoNC4wMDN2NC4wMDNIOC4wMVY4LjAxM3ptMTIuMDA4IDBoLTQuMDAydjQuMDAzaDQuMDAyVjguMDEzem00LjAwMyAwaDQuMDAydjQuMDAzaC00LjAwMlY4LjAxM3ptMTIuMDA4IDBoLTQuMDAzdjQuMDAzaDQuMDAzVjguMDEzem00LjAwMiAwaDQuMDAzdjQuMDAzSDQwLjAzVjguMDEzem0tMjQuMDE1IDguMDA1SDguMDF2NC4wMDNoOC4wMDZ2LTQuMDAzem00LjAwMiAwaDQuMDAzdjQuMDAzaC00LjAwM3YtNC4wMDN6bTEyLjAwOCAwaC00LjAwM3Y0LjAwM2g0LjAwM3YtNC4wMDN6bTEyLjAwOCAwdjQuMDAzaC04LjAwNXYtNC4wMDNoOC4wMDV6bS0zMi4wMjEgOC4wMDVIOC4wMXY0LjAwM2g0LjAwM3YtNC4wMDN6bTQuMDAzIDBoMjAuMDEzdjQuMDAzSDE2LjAxNnYtNC4wMDN6bTI4LjAxOCAwSDQwLjAzdjQuMDAzaDQuMDAzdi00LjAwM3oiIGZpbGw9IiM0MjQyNDIiLz48L2c+PGRlZnM+PGNsaXBQYXRoIGlkPSJhIj48cGF0aCBmaWxsPSIjZmZmIiBkPSJNMCAwaDUzdjM2SDB6Ii8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+") 50% no-repeat;border:4px solid #f6f6f6;border-radius:4px;height:36px;margin:0;min-height:0;min-width:0;overflow:hidden;padding:0;position:absolute;resize:none;width:58px}.monaco-editor.vs-dark .iPadShowKeyboard{background:url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgY2xpcC1wYXRoPSJ1cmwoI2EpIj48cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTQ4LjAzNiA0LjAxSDQuMDA4VjMyLjAzaDQ0LjAyOFY0LjAxek00LjAwOC4wMDhBNC4wMDMgNC4wMDMgMCAwIDAgLjAwNSA0LjAxVjMyLjAzYTQuMDAzIDQuMDAzIDAgMCAwIDQuMDAzIDQuMDAyaDQ0LjAyOGE0LjAwMyA0LjAwMyAwIDAgMCA0LjAwMy00LjAwMlY0LjAxQTQuMDAzIDQuMDAzIDAgMCAwIDQ4LjAzNi4wMDhINC4wMDh6TTguMDEgOC4wMTNoNC4wMDN2NC4wMDNIOC4wMVY4LjAxM3ptMTIuMDA4IDBoLTQuMDAydjQuMDAzaDQuMDAyVjguMDEzem00LjAwMyAwaDQuMDAydjQuMDAzaC00LjAwMlY4LjAxM3ptMTIuMDA4IDBoLTQuMDAzdjQuMDAzaDQuMDAzVjguMDEzem00LjAwMiAwaDQuMDAzdjQuMDAzSDQwLjAzVjguMDEzem0tMjQuMDE1IDguMDA1SDguMDF2NC4wMDNoOC4wMDZ2LTQuMDAzem00LjAwMiAwaDQuMDAzdjQuMDAzaC00LjAwM3YtNC4wMDN6bTEyLjAwOCAwaC00LjAwM3Y0LjAwM2g0LjAwM3YtNC4wMDN6bTEyLjAwOCAwdjQuMDAzaC04LjAwNXYtNC4wMDNoOC4wMDV6bS0zMi4wMjEgOC4wMDVIOC4wMXY0LjAwM2g0LjAwM3YtNC4wMDN6bTQuMDAzIDBoMjAuMDEzdjQuMDAzSDE2LjAxNnYtNC4wMDN6bTI4LjAxOCAwSDQwLjAzdjQuMDAzaDQuMDAzdi00LjAwM3oiIGZpbGw9IiNDNUM1QzUiLz48L2c+PGRlZnM+PGNsaXBQYXRoIGlkPSJhIj48cGF0aCBmaWxsPSIjZmZmIiBkPSJNMCAwaDUzdjM2SDB6Ii8+PC9jbGlwUGF0aD48L2RlZnM+PC9zdmc+") 50% no-repeat;border:4px solid #252526}.monaco-editor .tokens-inspect-widget{padding:10px;-moz-user-select:text;user-select:text;-webkit-user-select:text;-ms-user-select:text;z-index:50}.tokens-inspect-separator{border:0;height:1px}.monaco-editor .tokens-inspect-widget .tm-token{font-family:var(--monaco-monospace-font)}.monaco-editor .tokens-inspect-widget .tm-token-length{float:right;font-size:60%;font-weight:400}.monaco-editor .tokens-inspect-widget .tm-metadata-table{width:100%}.monaco-editor .tokens-inspect-widget .tm-metadata-value{font-family:var(--monaco-monospace-font);text-align:right}.monaco-editor .tokens-inspect-widget .tm-token-type{font-family:var(--monaco-monospace-font)}.monaco-editor .detected-link,.monaco-editor .detected-link-active{text-decoration:underline;text-underline-position:under}.monaco-editor .detected-link-active{cursor:pointer}.monaco-editor .parameter-hints-widget{display:flex;flex-direction:column;line-height:1.5em;z-index:10}.monaco-editor .parameter-hints-widget>.phwrapper{display:flex;flex-direction:row;max-width:440px}.monaco-editor .parameter-hints-widget.multiple{min-height:3.3em;padding:0}.monaco-editor .parameter-hints-widget.visible{transition:left .05s ease-in-out}.monaco-editor .parameter-hints-widget p,.monaco-editor .parameter-hints-widget ul{margin:8px 0}.monaco-editor .parameter-hints-widget .body,.monaco-editor .parameter-hints-widget .monaco-scrollable-element{display:flex;flex:1;flex-direction:column;min-height:100%}.monaco-editor .parameter-hints-widget .signature{padding:4px 5px}.monaco-editor .parameter-hints-widget .docs{padding:0 10px 0 5px;white-space:pre-wrap}.monaco-editor .parameter-hints-widget .docs.empty{display:none}.monaco-editor .parameter-hints-widget .docs .markdown-docs{white-space:normal}.monaco-editor .parameter-hints-widget .docs .markdown-docs code{font-family:var(--monaco-monospace-font)}.monaco-editor .parameter-hints-widget .docs .code{white-space:pre-wrap}.monaco-editor .parameter-hints-widget .docs code{border-radius:3px;padding:0 .4em}.monaco-editor .parameter-hints-widget .controls{align-items:center;display:none;flex-direction:column;justify-content:flex-end;min-width:22px}.monaco-editor .parameter-hints-widget.multiple .controls{display:flex;padding:0 2px}.monaco-editor .parameter-hints-widget.multiple .button{background-repeat:no-repeat;cursor:pointer;height:16px;width:16px}.monaco-editor .parameter-hints-widget .button.previous{bottom:24px}.monaco-editor .parameter-hints-widget .overloads{font-family:var(--monaco-monospace-font);height:12px;line-height:12px;opacity:.5;text-align:center}.monaco-editor .parameter-hints-widget .signature .parameter.active{font-weight:700;text-decoration:underline}.monaco-editor .parameter-hints-widget .documentation-parameter>.parameter{font-weight:700;margin-right:.5em}.monaco-editor .rename-box{color:inherit;z-index:100}.monaco-editor .rename-box.preview{padding:3px 3px 0}.monaco-editor .rename-box .rename-input{padding:3px;width:calc(100% - 6px)}.monaco-editor .rename-box .rename-label{display:none;opacity:.8}.monaco-editor .rename-box.preview .rename-label{display:inherit}.monaco-editor{--monaco-monospace-font:"SF Mono",Monaco,Menlo,Consolas,"Ubuntu Mono","Liberation Mono","DejaVu Sans Mono","Courier New",monospace;font-family:-apple-system,BlinkMacSystemFont,Segoe WPC,Segoe UI,HelveticaNeue-Light,system-ui,Ubuntu,Droid Sans,sans-serif}.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label{stroke-width:1.2px}.monaco-hover p{margin:0}.monaco-aria-container{clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute!important;width:1px}.monaco-editor.hc-black{-ms-high-contrast-adjust:none}@media screen and (-ms-high-contrast:active){.monaco-editor.vs-dark .view-overlays .current-line,.monaco-editor.vs .view-overlays .current-line{border-color:windowtext!important;border-left:0;border-right:0}.monaco-editor.vs-dark .cursor,.monaco-editor.vs .cursor{background-color:windowtext!important}.monaco-editor.vs-dark .dnd-target,.monaco-editor.vs .dnd-target{border-color:windowtext!important}.monaco-editor.vs-dark .selected-text,.monaco-editor.vs .selected-text{background-color:highlight!important}.monaco-editor.vs-dark .view-line,.monaco-editor.vs .view-line{-ms-high-contrast-adjust:none}.monaco-editor.vs-dark .view-line span,.monaco-editor.vs .view-line span{color:windowtext!important}.monaco-editor.vs-dark .view-line span.inline-selected-text,.monaco-editor.vs .view-line span.inline-selected-text{color:highlighttext!important}.monaco-editor.vs-dark .view-overlays,.monaco-editor.vs .view-overlays{-ms-high-contrast-adjust:none}.monaco-editor.vs-dark .reference-decoration,.monaco-editor.vs-dark .selectionHighlight,.monaco-editor.vs-dark .wordHighlight,.monaco-editor.vs-dark .wordHighlightStrong,.monaco-editor.vs .reference-decoration,.monaco-editor.vs .selectionHighlight,.monaco-editor.vs .wordHighlight,.monaco-editor.vs .wordHighlightStrong{background:transparent!important;border:2px dotted highlight!important;box-sizing:border-box}.monaco-editor.vs-dark .rangeHighlight,.monaco-editor.vs .rangeHighlight{background:transparent!important;border:1px dotted activeborder!important;box-sizing:border-box}.monaco-editor.vs-dark .bracket-match,.monaco-editor.vs .bracket-match{background:transparent!important;border-color:windowtext!important}.monaco-editor.vs-dark .currentFindMatch,.monaco-editor.vs-dark .findMatch,.monaco-editor.vs .currentFindMatch,.monaco-editor.vs .findMatch{background:transparent!important;border:2px dotted activeborder!important;box-sizing:border-box}.monaco-editor.vs-dark .find-widget,.monaco-editor.vs .find-widget{border:1px solid windowtext}.monaco-editor.vs-dark .monaco-list .monaco-list-row,.monaco-editor.vs .monaco-list .monaco-list-row{-ms-high-contrast-adjust:none;color:windowtext!important}.monaco-editor.vs-dark .monaco-list .monaco-list-row.focused,.monaco-editor.vs .monaco-list .monaco-list-row.focused{background-color:highlight!important;color:highlighttext!important}.monaco-editor.vs-dark .monaco-list .monaco-list-row:hover,.monaco-editor.vs .monaco-list .monaco-list-row:hover{background:transparent!important;border:1px solid highlight;box-sizing:border-box}.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar,.monaco-editor.vs .monaco-scrollable-element>.scrollbar{-ms-high-contrast-adjust:none;background:background!important;border:1px solid windowtext;box-sizing:border-box}.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider,.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider{background:windowtext!important}.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider.active,.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider:hover,.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider.active,.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider:hover{background:highlight!important}.monaco-editor.vs-dark .decorationsOverviewRuler,.monaco-editor.vs .decorationsOverviewRuler{opacity:0}.monaco-editor.vs-dark .minimap,.monaco-editor.vs .minimap{display:none}.monaco-editor.vs-dark .squiggly-d-error,.monaco-editor.vs .squiggly-d-error{background:transparent!important;border-bottom:4px double #e47777}.monaco-editor.vs-dark .squiggly-b-info,.monaco-editor.vs-dark .squiggly-c-warning,.monaco-editor.vs .squiggly-b-info,.monaco-editor.vs .squiggly-c-warning{border-bottom:4px double #71b771}.monaco-editor.vs-dark .squiggly-a-hint,.monaco-editor.vs .squiggly-a-hint{border-bottom:4px double #6c6c6c}.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label{-ms-high-contrast-adjust:none;background-color:highlight!important;color:highlighttext!important}.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label,.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label{-ms-high-contrast-adjust:none;background:transparent!important;border:1px solid highlight;box-sizing:border-box}.monaco-diff-editor.vs-dark .diffOverviewRuler,.monaco-diff-editor.vs .diffOverviewRuler{display:none}.monaco-editor.vs-dark .line-delete,.monaco-editor.vs-dark .line-insert,.monaco-editor.vs .line-delete,.monaco-editor.vs .line-insert{background:transparent!important;border:1px solid highlight!important;box-sizing:border-box}.monaco-editor.vs-dark .char-delete,.monaco-editor.vs-dark .char-insert,.monaco-editor.vs .char-delete,.monaco-editor.vs .char-insert{background:transparent!important}}.monaco-diff-editor .diffOverview{z-index:9}.monaco-diff-editor .diffOverview .diffViewport{z-index:10}.monaco-diff-editor.vs .diffOverview{background:rgba(0,0,0,.03)}.monaco-diff-editor.vs-dark .diffOverview{background:hsla(0,0%,100%,.01)}.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark .scrollbar,.monaco-scrollable-element.modified-in-monaco-diff-editor.vs .scrollbar{background:transparent}.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black .scrollbar{background:none}.monaco-scrollable-element.modified-in-monaco-diff-editor .slider{z-index:10}.modified-in-monaco-diff-editor .slider.active{background:hsla(0,0%,67.1%,.4)}.modified-in-monaco-diff-editor.hc-black .slider.active{background:none}.monaco-diff-editor .delete-sign,.monaco-diff-editor .insert-sign,.monaco-editor .delete-sign,.monaco-editor .insert-sign{align-items:center;display:flex!important;font-size:11px!important;opacity:.7!important}.monaco-diff-editor.hc-black .delete-sign,.monaco-diff-editor.hc-black .insert-sign,.monaco-editor.hc-black .delete-sign,.monaco-editor.hc-black .insert-sign{opacity:1}.monaco-editor .inline-added-margin-view-zone,.monaco-editor .inline-deleted-margin-view-zone{text-align:right}.monaco-editor .view-zones .view-lines .view-line span{display:inline-block}.monaco-editor .margin-view-zones .lightbulb-glyph:hover{cursor:pointer}.monaco-diff-editor .diff-review-line-number{display:inline-block;text-align:right}.monaco-diff-editor .diff-review{position:absolute;-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-diff-editor .diff-review-summary{padding-left:10px}.monaco-diff-editor .diff-review-shadow{position:absolute}.monaco-diff-editor .diff-review-row{white-space:pre}.monaco-diff-editor .diff-review-table{display:table;min-width:100%}.monaco-diff-editor .diff-review-row{display:table-row;width:100%}.monaco-diff-editor .diff-review-spacer{display:inline-block;vertical-align:middle;width:10px}.monaco-diff-editor .diff-review-spacer>.codicon{font-size:9px!important}.monaco-diff-editor .diff-review-actions{display:inline-block;position:absolute;right:10px;top:2px}.monaco-diff-editor .diff-review-actions .action-label{height:16px;margin:2px 0;width:16px}.context-view .monaco-menu{min-width:130px}.context-view{position:absolute;z-index:2500}.context-view.fixed{all:initial;color:inherit;font-family:inherit;font-size:13px;position:fixed;z-index:2500}.quick-input-widget{font-size:13px}.quick-input-widget .monaco-highlighted-label .highlight{color:#0066bf}.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight{color:#9dddff}.vs-dark .quick-input-widget .monaco-highlighted-label .highlight{color:#0097fb}.hc-black .quick-input-widget .monaco-highlighted-label .highlight{color:#f38518}.monaco-keybinding>.monaco-keybinding-key{background-color:hsla(0,0%,86.7%,.4);border:1px solid hsla(0,0%,80%,.4);border-bottom-color:hsla(0,0%,73.3%,.4);box-shadow:inset 0 -1px 0 hsla(0,0%,73.3%,.4);color:#555}.hc-black .monaco-keybinding>.monaco-keybinding-key{background-color:transparent;border:1px solid #6fc3df;box-shadow:none;color:#fff}.vs-dark .monaco-keybinding>.monaco-keybinding-key{background-color:hsla(0,0%,50.2%,.17);border:1px solid rgba(51,51,51,.6);border-bottom-color:rgba(68,68,68,.6);box-shadow:inset 0 -1px 0 rgba(68,68,68,.6);color:#ccc}.quick-input-widget{left:50%;margin-left:-300px;padding:0 1px 6px;position:absolute;width:600px;z-index:2000}.quick-input-titlebar{align-items:center;display:flex}.quick-input-left-action-bar{display:flex;flex:1;margin-left:4px}.quick-input-title{padding:3px 0;text-align:center}.quick-input-right-action-bar{display:flex;flex:1;margin-right:4px}.quick-input-right-action-bar>.actions-container{justify-content:flex-end}.quick-input-titlebar .monaco-action-bar .action-label.codicon{background-position:50%;background-repeat:no-repeat;padding:2px}.quick-input-description{margin:6px}.quick-input-header .quick-input-description{margin:4px 2px}.quick-input-header{display:flex;margin-bottom:-2px;padding:6px 6px 0}.quick-input-widget.hidden-input .quick-input-header{margin-bottom:0;padding:0}.quick-input-and-message{display:flex;flex-direction:column;flex-grow:1;position:relative}.quick-input-check-all{align-self:center;margin:0}.quick-input-filter{display:flex;flex-grow:1;position:relative}.quick-input-box{flex-grow:1}.quick-input-widget.show-checkboxes .quick-input-box,.quick-input-widget.show-checkboxes .quick-input-message{margin-left:5px}.quick-input-visible-count{left:-10000px;position:absolute}.quick-input-count{align-items:center;align-self:center;display:flex;position:absolute;right:4px}.quick-input-count .monaco-count-badge{border-radius:2px;line-height:normal;min-height:auto;padding:2px 4px;vertical-align:middle}.quick-input-action{margin-left:6px}.quick-input-action .monaco-text-button{align-items:center;display:flex;font-size:11px;height:27.5px;padding:0 6px}.quick-input-message{margin-top:-1px;padding:5px 5px 2px}.quick-input-message>.codicon{margin:0 .2em;vertical-align:text-bottom}.quick-input-progress.monaco-progress-container{position:relative}.quick-input-progress.monaco-progress-container,.quick-input-progress.monaco-progress-container .progress-bit{height:2px}.quick-input-list{line-height:22px;margin-top:6px}.quick-input-widget.hidden-input .quick-input-list{margin-top:0}.quick-input-list .monaco-list{max-height:440px;overflow:hidden}.quick-input-list .quick-input-list-entry{box-sizing:border-box;display:flex;height:100%;overflow:hidden;padding:0 6px}.quick-input-list .quick-input-list-entry.quick-input-list-separator-border{border-top-style:solid;border-top-width:1px}.quick-input-list .monaco-list-row[data-index="0"] .quick-input-list-entry.quick-input-list-separator-border{border-top-style:none}.quick-input-list .quick-input-list-label{display:flex;flex:1;height:100%;overflow:hidden}.quick-input-list .quick-input-list-checkbox{align-self:center;margin:0}.quick-input-list .quick-input-list-rows{display:flex;flex:1;flex-direction:column;height:100%;margin-left:5px;overflow:hidden;text-overflow:ellipsis}.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-rows{margin-left:10px}.quick-input-widget .quick-input-list .quick-input-list-checkbox{display:none}.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-checkbox{display:inline}.quick-input-list .quick-input-list-rows>.quick-input-list-row{align-items:center;display:flex}.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label,.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label .monaco-icon-label-container>.monaco-icon-name-container{flex:1}.quick-input-list .quick-input-list-rows>.quick-input-list-row .codicon[class*=codicon-]{vertical-align:sub}.quick-input-list .quick-input-list-rows .monaco-highlighted-label span{opacity:1}.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding{margin-right:8px}.quick-input-list .quick-input-list-label-meta{line-height:normal;opacity:.7;overflow:hidden;text-overflow:ellipsis}.quick-input-list .monaco-highlighted-label .highlight{font-weight:700}.quick-input-list .quick-input-list-entry .quick-input-list-separator{margin-right:8px}.quick-input-list .quick-input-list-entry-action-bar{display:flex;flex:0;overflow:visible}.quick-input-list .quick-input-list-entry-action-bar .action-label{display:none}.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon{margin-right:4px;padding:2px}.quick-input-list .quick-input-list-entry-action-bar{margin-right:4px;margin-top:1px}.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label,.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label{display:flex}.quick-input-list .monaco-list-row.focused .monaco-keybinding-key,.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .codicon,.quick-input-list .monaco-list-row.focused .quick-input-list-entry .quick-input-list-separator,.quick-input-list .monaco-list-row.focused .quick-input-list-rows .quick-input-list-row .codicon{color:inherit}.quick-input-list .monaco-list-row.focused .monaco-keybinding-key{background:none}.monaco-keybinding{align-items:center;display:flex;line-height:10px}.monaco-keybinding>.monaco-keybinding-key{border-radius:3px;border-style:solid;border-width:1px;display:inline-block;font-size:11px;margin:0 2px;padding:3px 5px;vertical-align:middle}.monaco-keybinding>.monaco-keybinding-key:first-child{margin-left:0}.monaco-keybinding>.monaco-keybinding-key:last-child{margin-right:0}.monaco-keybinding>.monaco-keybinding-key-separator{display:inline-block}.monaco-keybinding>.monaco-keybinding-key-chord-separator{width:6px}.monaco-progress-container{height:5px;overflow:hidden;width:100%}.monaco-progress-container .progress-bit{display:none;height:5px;left:0;position:absolute;width:2%}.monaco-progress-container.active .progress-bit{display:inherit}.monaco-progress-container.discrete .progress-bit{left:0;transition:width .1s linear}.monaco-progress-container.discrete.done .progress-bit{width:100%}.monaco-progress-container.infinite .progress-bit{-webkit-animation-duration:4s;animation-duration:4s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:progress;animation-name:progress;-webkit-animation-timing-function:linear;animation-timing-function:linear;transform:translateZ(0)}@-webkit-keyframes progress{0%{transform:translateX(0) scaleX(1)}50%{transform:translateX(2500%) scaleX(3)}to{transform:translateX(4900%) scaleX(1)}}@keyframes progress{0%{transform:translateX(0) scaleX(1)}50%{transform:translateX(2500%) scaleX(3)}to{transform:translateX(4900%) scaleX(1)}}.monaco-text-button{align-items:center;box-sizing:border-box;cursor:pointer;display:flex;justify-content:center;padding:4px;text-align:center;width:100%}.monaco-text-button:focus{outline-offset:2px!important}.monaco-text-button:hover{text-decoration:none!important}.monaco-button.disabled,.monaco-button.disabled:focus{cursor:default;opacity:.4!important}.monaco-text-button>.codicon{color:inherit!important;margin:0 .2em}.monaco-button-dropdown{cursor:pointer;display:flex}.monaco-button-dropdown>.monaco-dropdown-button{margin-left:1px}.monaco-description-button{flex-direction:column}.monaco-description-button .monaco-button-label{font-weight:500}.monaco-description-button .monaco-button-description{font-style:italic} \ No newline at end of file diff --git a/priv/static/js/app.js b/priv/static/js/app.js index 4c482a2c4..f9c0f6799 100644 --- a/priv/static/js/app.js +++ b/priv/static/js/app.js @@ -1,2 +1,2 @@ /*! For license information please see app.js.LICENSE.txt */ -(()=>{var e,t={5488:(e,t,i)=>{"use strict";var n={};i.r(n),i.d(n,{aggregate:()=>Du,bin:()=>Lu,collect:()=>Eu,compare:()=>Au,countpattern:()=>Iu,cross:()=>Tu,density:()=>Fu,dotbin:()=>Vu,expression:()=>Hu,extent:()=>Uu,facet:()=>qu,field:()=>Ku,filter:()=>Yu,flatten:()=>Zu,fold:()=>Xu,formula:()=>Qu,generate:()=>Ju,impute:()=>ih,joinaggregate:()=>nh,kde:()=>oh,key:()=>rh,load:()=>ah,lookup:()=>ch,multiextent:()=>uh,multivalues:()=>dh,params:()=>fh,pivot:()=>ph,prefacet:()=>mh,project:()=>_h,proxy:()=>vh,quantile:()=>bh,relay:()=>yh,sample:()=>wh,sequence:()=>Ch,sieve:()=>Sh,subflow:()=>ju,timeunit:()=>xh,tupleindex:()=>Dh,values:()=>Lh,window:()=>Ih});var o={};i.r(o),i.d(o,{interpolate:()=>af,interpolateArray:()=>Qg,interpolateBasis:()=>Wg,interpolateBasisClosed:()=>Vg,interpolateCubehelix:()=>Up,interpolateCubehelixLong:()=>jp,interpolateDate:()=>ef,interpolateDiscrete:()=>Zf,interpolateHcl:()=>Ap,interpolateHclLong:()=>Mp,interpolateHsl:()=>lp,interpolateHslLong:()=>cp,interpolateHue:()=>Xf,interpolateLab:()=>Np,interpolateNumber:()=>tf,interpolateNumberArray:()=>Zg,interpolateObject:()=>nf,interpolateRgb:()=>qg,interpolateRgbBasis:()=>Gg,interpolateRgbBasisClosed:()=>Yg,interpolateRound:()=>lf,interpolateString:()=>sf,interpolateTransformCss:()=>np,interpolateTransformSvg:()=>op,interpolateZoom:()=>sp,piecewise:()=>Kf,quantize:()=>qp});var r={};i.r(r),i.d(r,{bound:()=>sC,identifier:()=>cC,mark:()=>uC,overlap:()=>hC,render:()=>vC,viewlayout:()=>zC});var s={};i.r(s),i.d(s,{axisticks:()=>VC,datajoin:()=>HC,encode:()=>UC,legendentries:()=>jC,linkpath:()=>ZC,pie:()=>tS,scale:()=>oS,sortitems:()=>lS,stack:()=>gS});var a={};i.r(a),i.d(a,{contour:()=>UD,geojson:()=>KD,geopath:()=>GD,geopoint:()=>YD,geoshape:()=>ZD,graticule:()=>XD,heatmap:()=>QD,isocontour:()=>RD,kde2d:()=>VD,projection:()=>eL});var l={};i.r(l),i.d(l,{force:()=>YL});var c={};i.r(c),i.d(c,{nest:()=>YN,pack:()=>tE,partition:()=>nE,stratify:()=>oE,tree:()=>aE,treelinks:()=>lE,treemap:()=>hE});var u={};i.r(u),i.d(u,{label:()=>AE});var h={};i.r(h),i.d(h,{loess:()=>IE,regression:()=>RE});var d={};i.r(d),i.d(d,{voronoi:()=>nA});var g={};i.r(g),i.d(g,{wordcloud:()=>_A});var f={};i.r(f),i.d(f,{crossfilter:()=>xA,resolvefilter:()=>kA});var p={};i.r(p),i.d(p,{Bounds:()=>ov,CanvasHandler:()=>Ty,CanvasRenderer:()=>By,DATE:()=>Mr,DAY:()=>Ir,DAYOFYEAR:()=>Tr,Dataflow:()=>ic,Debug:()=>si,Error:()=>ni,EventStream:()=>Hl,Gradient:()=>h_,GroupItem:()=>sv,HOURS:()=>Rr,Handler:()=>py,Info:()=>ri,Item:()=>rv,MILLISECONDS:()=>Pr,MINUTES:()=>Or,MONTH:()=>Er,Marks:()=>Jb,MultiPulse:()=>Ql,None:()=>ii,Operator:()=>zl,Parameters:()=>Fl,Pulse:()=>Gl,QUARTER:()=>Nr,RenderType:()=>kw,Renderer:()=>_y,ResourceLoader:()=>av,SECONDS:()=>Fr,SVGHandler:()=>Wy,SVGRenderer:()=>uw,SVGStringRenderer:()=>xw,Scenegraph:()=>ay,TIME_UNITS:()=>Br,Transform:()=>oc,View:()=>ER,WEEK:()=>Ar,Warn:()=>oi,YEAR:()=>Lr,accessor:()=>Wt,accessorFields:()=>Ht,accessorName:()=>Vt,array:()=>Ti,ascending:()=>Pi,bandwidthNRD:()=>bc,bin:()=>yc,bootstrapCI:()=>Sc,boundClip:()=>Tw,boundContext:()=>Nv,boundItem:()=>ey,boundMark:()=>iy,boundStroke:()=>uv,changeset:()=>Rl,clampRange:()=>Ri,codegenExpression:()=>IM,compare:()=>Fi,constant:()=>Vi,cumulativeLogNormal:()=>Bc,cumulativeNormal:()=>Ic,cumulativeUniform:()=>Uc,dayofyear:()=>jr,debounce:()=>Hi,defaultLocale:()=>_l,definition:()=>sc,densityLogNormal:()=>Pc,densityNormal:()=>Mc,densityUniform:()=>$c,domChild:()=>hy,domClear:()=>dy,domCreate:()=>cy,domFind:()=>uy,dotbin:()=>xc,error:()=>qt,expressionFunction:()=>MT,extend:()=>$i,extent:()=>Ui,extentIndex:()=>ji,falsy:()=>ei,fastmap:()=>Yi,field:()=>Gt,flush:()=>Zi,font:()=>Kb,fontFamily:()=>qb,fontSize:()=>Vb,format:()=>io,formatLocale:()=>cl,formats:()=>no,hasOwnProperty:()=>Ki,id:()=>Yt,identity:()=>Zt,inferType:()=>On,inferTypes:()=>Fn,ingest:()=>Nl,inherits:()=>Xi,inrange:()=>Qi,interpolate:()=>Fm,interpolateColors:()=>Tm,interpolateRange:()=>Im,intersect:()=>Nw,intersectBoxLine:()=>zv,intersectPath:()=>Ov,intersectPoint:()=>Fv,intersectRule:()=>Bv,isArray:()=>li,isBoolean:()=>Ji,isDate:()=>en,isFunction:()=>Oi,isIterable:()=>tn,isNumber:()=>nn,isObject:()=>ci,isRegExp:()=>on,isString:()=>rn,isTuple:()=>kl,key:()=>sn,lerp:()=>an,lineHeight:()=>Hb,loader:()=>yl,locale:()=>ml,logger:()=>ai,lruCache:()=>ln,markup:()=>nw,merge:()=>cn,mergeConfig:()=>hi,multiLineOffset:()=>Ub,one:()=>Qt,pad:()=>hn,panLinear:()=>Ci,panLog:()=>Si,panPow:()=>xi,panSymlog:()=>ki,parse:()=>CB,parseExpression:()=>EM,parseSelector:()=>BR,pathCurves:()=>g_,pathEqual:()=>Ow,pathParse:()=>m_,pathRectangle:()=>W_,pathRender:()=>L_,pathSymbols:()=>M_,pathTrail:()=>V_,peek:()=>fi,point:()=>fy,projection:()=>CD,quantileLogNormal:()=>zc,quantileNormal:()=>Tc,quantileUniform:()=>jc,quantiles:()=>_c,quantizeInterpolator:()=>Rm,quarter:()=>Mi,quartiles:()=>vc,random:()=>wc,randomInteger:()=>Dc,randomKDE:()=>Oc,randomLCG:()=>kc,randomLogNormal:()=>Wc,randomMixture:()=>Vc,randomNormal:()=>Rc,randomUniform:()=>qc,read:()=>bl,regressionExp:()=>Jc,regressionLinear:()=>Xc,regressionLoess:()=>ou,regressionLog:()=>Qc,regressionPoly:()=>iu,regressionPow:()=>eu,regressionQuad:()=>tu,renderModule:()=>Lw,repeat:()=>un,resetDefaultLocale:()=>vl,resetSVGClipId:()=>iv,resetSVGDefIds:()=>Fw,responseType:()=>oo,runtimeContext:()=>VT,sampleCurve:()=>lu,sampleLogNormal:()=>Fc,sampleNormal:()=>Ac,sampleUniform:()=>Hc,scale:()=>Cm,sceneEqual:()=>Rw,sceneFromJSON:()=>ry,scenePickVisit:()=>Zv,sceneToJSON:()=>oy,sceneVisit:()=>Yv,sceneZOrder:()=>Gv,scheme:()=>Wm,serializeXML:()=>ow,setRandom:()=>Cc,span:()=>dn,splitAccessPath:()=>Kt,stringValue:()=>gn,textMetrics:()=>Ob,timeBin:()=>As,timeFloor:()=>as,timeFormatLocale:()=>fl,timeInterval:()=>gs,timeOffset:()=>ms,timeSequence:()=>bs,timeUnitSpecifier:()=>Hr,timeUnits:()=>Wr,toBoolean:()=>fn,toDate:()=>mn,toNumber:()=>pi,toSet:()=>vn,toString:()=>_n,transform:()=>ac,transforms:()=>rc,truncate:()=>bn,truthy:()=>Jt,tupleid:()=>Dl,typeParsers:()=>In,utcFloor:()=>us,utcInterval:()=>fs,utcOffset:()=>_s,utcSequence:()=>ys,utcdayofyear:()=>Xr,utcquarter:()=>Ii,utcweek:()=>Qr,version:()=>SB,visitArray:()=>yn,week:()=>qr,writeConfig:()=>di,zero:()=>Xt,zoomLinear:()=>Li,zoomLog:()=>Ni,zoomPow:()=>Ei,zoomSymlog:()=>Ai});var m={};i.r(m),i.d(m,{JsonPatchError:()=>FB,_areEquals:()=>qB,applyOperation:()=>VB,applyPatch:()=>HB,applyReducer:()=>$B,deepClone:()=>PB,getValueByPointer:()=>WB,validate:()=>jB,validator:()=>UB});var _={};i.r(_),i.d(_,{compare:()=>ez,generate:()=>QB,observe:()=>XB,unobserve:()=>ZB});var v={};i.r(v),i.d(v,{accessPathDepth:()=>Gz,accessPathWithDatum:()=>Hz,compile:()=>SJ,contains:()=>Cz,deepEqual:()=>pz,deleteNestedProperty:()=>Wz,duplicate:()=>mz,entries:()=>Fz,every:()=>xz,fieldIntersection:()=>Iz,flatAccessWithDatum:()=>$z,getFirstDefined:()=>Yz,hasIntersection:()=>Az,hash:()=>yz,internalField:()=>Jz,isBoolean:()=>Pz,isEmpty:()=>Tz,isEqual:()=>Nz,isInternalField:()=>eW,isNullOrFalse:()=>wz,isNumeric:()=>iW,keys:()=>Rz,logicalExpr:()=>zz,mergeDeep:()=>kz,normalize:()=>fG,normalizeAngle:()=>tW,omit:()=>vz,pick:()=>_z,prefixGenerator:()=>Mz,removePathFromField:()=>Kz,replaceAll:()=>qz,replacePathInField:()=>jz,resetIdCounter:()=>Qz,setEqual:()=>Ez,some:()=>Sz,stringify:()=>bz,titleCase:()=>Vz,unique:()=>Lz,uniqueId:()=>Xz,vals:()=>Oz,varName:()=>Bz,version:()=>xJ});var b={};i.r(b),i.d(b,{dark:()=>LJ,excel:()=>EJ,fivethirtyeight:()=>RJ,ggplot2:()=>FJ,googlecharts:()=>n0,latimes:()=>HJ,quartz:()=>jJ,urbaninstitute:()=>JJ,version:()=>o0,vox:()=>KJ}),i(6458);var y=i(4902),w=i(4173),C=i.n(w),S=i(6789);function x(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e.hasAttribute(t))throw new Error("Missing attribute '".concat(t,"' on element <").concat(e.tagName,":").concat(e.id,">"));var n=e.getAttribute(t);return i?i(n):n}function k(e){if("true"===e)return!0;if("false"===e)return!1;throw new Error("Invalid boolean attribute ".concat(e,', should be either "true" or "false"'))}function D(e){var t=parseInt(e,10);if(Number.isNaN(t))throw new Error("Invalid integer value ".concat(e));return t}function L(e){return{attribute:x(e.el,"data-update-attribute")}}const N={mounted:function(){var e=this;this.props=L(this),this.__updateAttribute(),this.el.addEventListener("input",(function(t){e.__updateAttribute()})),this.el.addEventListener("paste",(function(e){e.preventDefault();var t=e.clipboardData.getData("text/plain");document.execCommand("insertText",!1,t)})),this.el.addEventListener("keydown",(function(t){"Enter"!==t.key&&"Escape"!==t.key||e.el.blur()})),this.el.addEventListener("focus",(function(t){e.el.setAttribute("phx-update","ignore")})),this.el.addEventListener("blur",(function(t){e.el.removeAttribute("phx-update")}))},updated:function(){this.props=L(this),this.__updateAttribute()},__updateAttribute:function(){var e=this.el.innerText.trim();this.el.setAttribute(this.props.attribute,e)}};var E=i(158);function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=i){var n,o,r=[],s=!0,a=!1;try{for(i=i.call(e);!(s=(n=i.next()).done)&&(r.push(n.value),!t||r.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==i.return||i.return()}finally{if(a)throw o}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return M(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?M(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i|[\w:]+/g)||[]}function R(e){return e[e.length-1]}function O(e){return""===e.trim()}const F={autoFormatTriggerCharacters:["\n"],provideOnTypeFormattingEdits:function(e,t,i,n,o){return"\n"===i?function(e,t){var i=e.getLinesContent(),n=t.lineNumber-1,o=i[n],r=I(i[n-1]);if(function(e,t){var i=e[t-1],n=I(i),o=T(i);if("do"===R(o)||o.includes("fn")&&"->"===R(o)){var r=e.slice(t+1).filter((function(e){return!O(e)})).find((function(e){return I(e)===n}));if(r){var s=A(T(r),1)[0];if(["after","else","catch","rescue","end"].includes(s))return!1}return!0}return!1}(i,n)){var s=t.lineNumber1&&void 0!==arguments[1]?arguments[1]:5e3;B(this,e),this.client=t,this.reportRevisionTimeoutId=null,this.reportRevisionTimeout=i}return W(e,[{key:"onClientDelta",value:function(e){return null!==this.reportRevisionTimeoutId&&(clearTimeout(this.reportRevisionTimeoutId),this.reportRevisionTimeoutId=null),this.client.sendDelta(e),new $(this.client,e)}},{key:"onServerDelta",value:function(e){var t=this;return this.client.applyDelta(e),null===this.reportRevisionTimeoutId&&(this.reportRevisionTimeoutId=setTimeout((function(){t.client.reportCurrentRevision(),t.reportRevisionTimeoutId=null}),this.reportRevisionTimeout)),this}},{key:"onServerAcknowledgement",value:function(){throw new Error("Unexpected server acknowledgement.")}}]),e}(),$=function(){function e(t,i){B(this,e),this.client=t,this.awaitedDelta=i}return W(e,[{key:"onClientDelta",value:function(e){return new U(this.client,this.awaitedDelta,e)}},{key:"onServerDelta",value:function(t){var i=this.awaitedDelta.transform(t,"right");this.client.applyDelta(i);var n=t.transform(this.awaitedDelta,"left");return new e(this.client,n)}},{key:"onServerAcknowledgement",value:function(){return new H(this.client)}}]),e}(),U=function(){function e(t,i,n){B(this,e),this.client=t,this.awaitedDelta=i,this.buffer=n}return W(e,[{key:"onClientDelta",value:function(t){var i=this.buffer.compose(t);return new e(this.client,this.awaitedDelta,i)}},{key:"onServerDelta",value:function(t){var i=this.awaitedDelta.transform(t,"right"),n=this.buffer.transform(i,"right");this.client.applyDelta(n);var o=t.transform(this.awaitedDelta,"left"),r=i.transform(this.buffer,"left");return new e(this.client,o,r)}},{key:"onServerAcknowledgement",value:function(){return this.client.sendDelta(this.buffer),new $(this.client,this.buffer)}}]),e}();function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function q(e,t){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:[];j(this,e),this.ops=t}return K(e,[{key:"retain",value:function(e){return e<=0?this:this.append({retain:e})}},{key:"insert",value:function(e){return""===e?this:this.append({insert:e})}},{key:"delete",value:function(e){return e<=0?this:this.append({delete:e})}},{key:"append",value:function(e){if(0===this.ops.length)return this.ops.push(e),this;var t=this.ops.pop();return X(e)&&J(t)?this.append(e).append(t):X(e)&&X(t)?(this.ops.push({insert:t.insert+e.insert}),this):J(e)&&J(t)?(this.ops.push({delete:t.delete+e.delete}),this):Q(e)&&Q(t)?(this.ops.push({retain:t.retain+e.retain}),this):(this.ops.push(t,e),this)}},{key:"compose",value:function(t){for(var i=new Y(this.ops),n=new Y(t.ops),o=new e;i.hasNext()||n.hasNext();)if(X(n.peek()))o.append(n.next());else if(J(i.peek()))o.append(i.next());else{var r=Math.min(i.peekLength(),n.peekLength()),s=i.next(r),a=n.next(r);Q(a)?o.append(s):J(a)&&Q(s)&&o.append(a)}return o.__trim()}},{key:"transform",value:function(t,i){if("left"!==i&&"right"!==i)throw new Error('Invalid priority "'.concat(i,'", should be either "left" or "right"'));for(var n=new Y(this.ops),o=new Y(t.ops),r=new e;n.hasNext()||o.hasNext();)if(!X(n.peek())||X(o.peek())&&"left"!==i)if(X(o.peek()))r.append(o.next());else{var s=Math.min(n.peekLength(),o.peekLength()),a=n.next(s),l=o.next(s);if(J(a))continue;J(l)?r.append(l):r.retain(s)}else{var c=Z(n.next());r.retain(c)}return r.__trim()}},{key:"__trim",value:function(){return this.ops.length>0&&Q(this.ops[this.ops.length-1])&&this.ops.pop(),this}},{key:"toCompressed",value:function(){return this.ops.map((function(e){if(X(e))return e.insert;if(Q(e))return e.retain;if(J(e))return-e.delete;throw new Error("Invalid operation ".concat(e))}))}},{key:"applyToString",value:function(e){var t="",i=0;return this.ops.forEach((function(n){Q(n)&&(t+=e.slice(i,i+n.retain),i+=n.retain),X(n)&&(t+=n.insert),J(n)&&(i+=n.delete)})),t+=e.slice(i)}}],[{key:"fromCompressed",value:function(e){return e.reduce((function(e,t){if("string"==typeof t)return e.insert(t);if("number"==typeof t&&t>=0)return e.retain(t);if("number"==typeof t&&t<0)return e.delete(-t);throw new Error("Invalid compressed operation ".concat(t))}),new this)}}]),e}(),Y=function(){function e(t){j(this,e),this.ops=t,this.index=0,this.offset=0}return K(e,[{key:"hasNext",value:function(){return this.peekLength()<1/0}},{key:"next",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1/0,t=this.ops[this.index];if(!t)return{retain:e};var i=this.offset,n=Z(t);return e>=n-i?(e=n-i,this.index+=1,this.offset=0):this.offset+=e,J(t)?{delete:e}:Q(t)?{retain:e}:X(t)?{insert:t.insert.substr(i,e)}:void 0}},{key:"peek",value:function(){return this.ops[this.index]||{retain:1/0}}},{key:"peekLength",value:function(){return this.ops[this.index]?Z(this.ops[this.index])-this.offset:1/0}}]),e}();function Z(e){return X(e)?e.insert.length:Q(e)?e.retain:J(e)?e.delete:void 0}function X(e){return"string"==typeof e.insert}function Q(e){return"number"==typeof e.retain}function J(e){return"number"==typeof e.delete}function ee(e,t){for(var i=0;ie.length)&&(t=e.length);for(var i=0,n=new Array(t);i0&&e.editor.layout()}))})).observe(this.container),this.editor.onDidContentSizeChange((function(){var t=e.editor.getContentHeight();e.container.style.height="".concat(t,"px")}))}},{key:"__setupCompletion",value:function(){var e=this,t={};this.editor.getModel().__getCompletionItems=function(i,n){var o=i.getLineContent(n.lineNumber).slice(0,n.column-1);return new Promise((function(i,n){e.hook.pushEvent("completion_request",{hint:o,cell_id:e.cellId},(function(e){var n=e.completion_ref;n?t[n]=function(e){var t=function(e){return e.map(Ce).map((function(t,i){return be(be({},t),{},{sortText:xe(i,e.length)})}))}(e);i({suggestions:t})}:i({suggestions:[]})}))}))},this.hook.handleEvent("completion_response",(function(e){var i=e.completion_ref,n=e.items,o=t[i];o&&(o(n),delete t[i])}))}}])&&we(t.prototype,i),e}();var De,Le=i(8850),Ne=i.n(Le),Ee="undefined"==typeof document?void 0:document,Ae=!!Ee&&"content"in Ee.createElement("template"),Me=!!Ee&&Ee.createRange&&"createContextualFragment"in Ee.createRange();function Ie(e,t){var i,n,o=e.nodeName,r=t.nodeName;return o===r||(i=o.charCodeAt(0),n=r.charCodeAt(0),i<=90&&n>=97?o===r.toUpperCase():n<=90&&i>=97&&r===o.toUpperCase())}function Te(e,t,i){e[i]!==t[i]&&(e[i]=t[i],e[i]?e.setAttribute(i,""):e.removeAttribute(i))}var Re={OPTION:function(e,t){var i=e.parentNode;if(i){var n=i.nodeName.toUpperCase();"OPTGROUP"===n&&(n=(i=i.parentNode)&&i.nodeName.toUpperCase()),"SELECT"!==n||i.hasAttribute("multiple")||(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),i.selectedIndex=-1)}Te(e,t,"selected")},INPUT:function(e,t){Te(e,t,"checked"),Te(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var i=t.value;e.value!==i&&(e.value=i);var n=e.firstChild;if(n){var o=n.nodeValue;if(o==i||!i&&o==e.placeholder)return;n.nodeValue=i}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var i,n,o=-1,r=0,s=e.firstChild;s;)if("OPTGROUP"===(n=s.nodeName&&s.nodeName.toUpperCase()))s=(i=s).firstChild;else{if("OPTION"===n){if(s.hasAttribute("selected")){o=r;break}r++}!(s=s.nextSibling)&&i&&(s=i.nextSibling,i=null)}e.selectedIndex=o}}};function Oe(){}function Fe(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}const Pe=function(e,t,i){if(i||(i={}),"string"==typeof t)if("#document"===e.nodeName||"HTML"===e.nodeName||"BODY"===e.nodeName){var n=t;(t=Ee.createElement("html")).innerHTML=n}else o=(o=t).trim(),t=Ae?function(e){var t=Ee.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}(o):Me?function(e){return De||(De=Ee.createRange()).selectNode(Ee.body),De.createContextualFragment(e).childNodes[0]}(o):function(e){var t=Ee.createElement("body");return t.innerHTML=e,t.childNodes[0]}(o);var o,r=i.getNodeKey||Fe,s=i.onBeforeNodeAdded||Oe,a=i.onNodeAdded||Oe,l=i.onBeforeElUpdated||Oe,c=i.onElUpdated||Oe,u=i.onBeforeNodeDiscarded||Oe,h=i.onNodeDiscarded||Oe,d=i.onBeforeElChildrenUpdated||Oe,g=!0===i.childrenOnly,f=Object.create(null),p=[];function m(e){p.push(e)}function _(e,t){if(1===e.nodeType)for(var i=e.firstChild;i;){var n=void 0;t&&(n=r(i))?m(n):(h(i),i.firstChild&&_(i,t)),i=i.nextSibling}}function v(e,t,i){!1!==u(e)&&(t&&t.removeChild(e),h(e),_(e,i))}function b(e){a(e);for(var t=e.firstChild;t;){var i=t.nextSibling,n=r(t);if(n){var o=f[n];o&&Ie(t,o)?(t.parentNode.replaceChild(o,t),y(o,t)):b(t)}else b(t);t=i}}function y(e,t,i){var n=r(t);if(n&&delete f[n],!i){if(!1===l(e,t))return;if(function(e,t){var i,n,o,r,s=t.attributes;if(11!==t.nodeType&&11!==e.nodeType){for(var a=s.length-1;a>=0;a--)n=(i=s[a]).name,o=i.namespaceURI,r=i.value,o?(n=i.localName||n,e.getAttributeNS(o,n)!==r&&("xmlns"===i.prefix&&(n=i.name),e.setAttributeNS(o,n,r))):e.getAttribute(n)!==r&&e.setAttribute(n,r);for(var l=e.attributes,c=l.length-1;c>=0;c--)n=(i=l[c]).name,(o=i.namespaceURI)?(n=i.localName||n,t.hasAttributeNS(o,n)||e.removeAttributeNS(o,n)):t.hasAttribute(n)||e.removeAttribute(n)}}(e,t),c(e),!1===d(e,t))return}"TEXTAREA"!==e.nodeName?function(e,t){var i,n,o,a,l,c=t.firstChild,u=e.firstChild;e:for(;c;){for(a=c.nextSibling,i=r(c);u;){if(o=u.nextSibling,c.isSameNode&&c.isSameNode(u)){c=a,u=o;continue e}n=r(u);var h=u.nodeType,d=void 0;if(h===c.nodeType&&(1===h?(i?i!==n&&((l=f[i])?o===l?d=!1:(e.insertBefore(l,u),n?m(n):v(u,e,!0),u=l):d=!1):n&&(d=!1),(d=!1!==d&&Ie(u,c))&&y(u,c)):3!==h&&8!=h||(d=!0,u.nodeValue!==c.nodeValue&&(u.nodeValue=c.nodeValue))),d){c=a,u=o;continue e}n?m(n):v(u,e,!0),u=o}if(i&&(l=f[i])&&Ie(l,c))e.appendChild(l),y(l,c);else{var g=s(c);!1!==g&&(g&&(c=g),c.actualize&&(c=c.actualize(e.ownerDocument||Ee)),e.appendChild(c),b(c))}c=a,u=o}!function(e,t,i){for(;t;){var n=t.nextSibling;(i=r(t))?m(i):v(t,e,!0),t=n}}(e,u,n);var p=Re[e.nodeName];p&&p(e,t)}(e,t):Re.TEXTAREA(e,t)}!function e(t){if(1===t.nodeType||11===t.nodeType)for(var i=t.firstChild;i;){var n=r(i);n&&(f[n]=i),e(i),i=i.nextSibling}}(e);var w,C,S=e,x=S.nodeType,k=t.nodeType;if(!g)if(1===x)1===k?Ie(e,t)||(h(e),S=function(e,t){for(var i=e.firstChild;i;){var n=i.nextSibling;t.appendChild(i),i=n}return t}(e,(w=t.nodeName,(C=t.namespaceURI)&&"http://www.w3.org/1999/xhtml"!==C?Ee.createElementNS(C,w):Ee.createElement(w)))):S=t;else if(3===x||8===x){if(k===x)return S.nodeValue!==t.nodeValue&&(S.nodeValue=t.nodeValue),S;S=t}if(S===t)h(e);else{if(t.isSameNode&&t.isSameNode(S))return;if(y(S,t,g),p)for(var D=0,L=p.length;D$/,""),i(null,e)})).catch((function(e){i(e,null)}))}}),ze().addHook("afterSanitizeAttributes",(function(e){"a"===e.tagName.toLowerCase()&&e.host!==window.location.host&&(e.setAttribute("target","_blank"),e.setAttribute("rel","noreferrer noopener"))}));const Ue=function(){function e(t,i){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.baseUrl,r=void 0===o?null:o,s=n.emptyText,a=void 0===s?"":s;He(this,e),this.container=t,this.content=i,this.baseUrl=r,this.emptyText=a,this.__render()}var t,i;return t=e,(i=[{key:"setContent",value:function(e){this.content=e,this.__render()}},{key:"__render",value:function(){var e=this;this.__getHtml().then((function(t){var i="
".concat(t,"
");Pe(e.container,i,{childrenOnly:!0})}))}},{key:"__getHtml",value:function(){var e=this;return new Promise((function(t,i){var n={baseUrl:e.baseUrl+"/"},o=e.__renderMathInString(e.content);Ne()(o,n,(function(i,n){var o=ze().sanitize(n);t(o||'\n
\n '.concat(e.emptyText,"\n
\n "))}))}))}},{key:"__renderMathInString",value:function(e){return e.replace(/(\${1,2})([\s\S]*?)\1/g,(function(e,t,i){var n="$$"===t;return Ve().renderToString(i.trim(),{displayMode:n,throwOnError:!1,errorColor:"inherit"})}))}}])&&$e(t.prototype,i),e}();function je(e,t){for(var i=0;it||r>e&&s=t&&a>=i?r-e-n:s>t&&ai?s-t+o:0}function Xe(e,t){var i=window,n=t.scrollMode,o=t.block,r=t.inline,s=t.boundary,a=t.skipOverflowHiddenElements,l="function"==typeof s?s:function(e){return e!==s};if(!Ke(e))throw new TypeError("Invalid target");for(var c=document.scrollingElement||document.documentElement,u=[],h=e;Ke(h)&&l(h);){if((h=h.parentElement)===c){u.push(h);break}null!=h&&h===document.body&&Ye(h)&&!Ye(document.documentElement)||null!=h&&Ye(h,a)&&u.push(h)}for(var d=i.visualViewport?i.visualViewport.width:innerWidth,g=i.visualViewport?i.visualViewport.height:innerHeight,f=window.scrollX||pageXOffset,p=window.scrollY||pageYOffset,m=e.getBoundingClientRect(),_=m.height,v=m.width,b=m.top,y=m.right,w=m.bottom,C=m.left,S="start"===o||"nearest"===o?b:"end"===o?w:b+_/2,x="center"===r?C+v/2:"end"===r?y:C,k=[],D=0;D=0&&C>=0&&w<=g&&y<=d&&b>=M&&w<=T&&C>=R&&y<=I)return k;var O=getComputedStyle(L),F=parseInt(O.borderLeftWidth,10),P=parseInt(O.borderTopWidth,10),B=parseInt(O.borderRightWidth,10),z=parseInt(O.borderBottomWidth,10),W=0,V=0,H="offsetWidth"in L?L.offsetWidth-L.clientWidth-F-B:0,$="offsetHeight"in L?L.offsetHeight-L.clientHeight-P-z:0;if(c===L)W="start"===o?S:"end"===o?S-g:"nearest"===o?Ze(p,p+g,g,P,z,p+S,p+S+_,_):S-g/2,V="start"===r?x:"center"===r?x-d/2:"end"===r?x-d:Ze(f,f+d,d,F,B,f+x,f+x+v,v),W=Math.max(0,W+p),V=Math.max(0,V+f);else{W="start"===o?S-M-P:"end"===o?S-T+z+$:"nearest"===o?Ze(M,T,E,P,z+$,S,S+_,_):S-(M+E/2)+$/2,V="start"===r?x-R-F:"center"===r?x-(R+A/2)+H/2:"end"===r?x-I+B+H:Ze(R,I,A,F,B+H,x,x+v,v);var U=L.scrollLeft,j=L.scrollTop;S+=j-(W=Math.max(0,Math.min(j+W,L.scrollHeight-E+$))),x+=U-(V=Math.max(0,Math.min(U+V,L.scrollWidth-A+H)))}k.push({el:L,top:W,left:V})}return k}function Qe(e){return e===Object(e)&&0!==Object.keys(e).length}function Je(e){return{cellId:x(e.el,"data-cell-id"),type:x(e.el,"data-type"),sessionPath:x(e.el,"data-session-path")}}function et(e){return"input"===e.props.type?e.el.querySelector('[data-element="input"]'):null}function tt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t=t||e.state.liveEditor.editor.getSelection(),e.state.isFocused&&e.state.insertMode&&qe.broadcast("session",{type:"cursor_selection_changed",cellId:e.props.cellId,selection:t})}const it={mounted:function(){var e=this;if(this.props=Je(this),this.state={isFocused:!1,insertMode:!1,liveEditor:null,evaluationDigest:null},["markdown","elixir"].includes(this.props.type)&&this.pushEvent("cell_init",{cell_id:this.props.cellId},(function(t){var i=t.source,n=t.revision,o=t.evaluation_digest,r=e.el.querySelector('[data-element="editor-container"]');r.firstElementChild.remove();var s=document.createElement("div");if(r.appendChild(s),e.state.liveEditor=new ke(e,s,e.props.cellId,e.props.type,i,n),"elixir"===e.props.type){e.state.evaluationDigest=o;var a=function(){var t=e.el.querySelector('[data-element="change-indicator"]');if(t){var i=function(e){return re()(e).toString(ae())}(e.state.liveEditor.getSource()),n=e.state.evaluationDigest!==i;t.toggleAttribute("data-js-shown",n)}};a(),e.handleEvent("evaluation_started:".concat(e.props.cellId),(function(t){var i=t.evaluation_digest;e.state.evaluationDigest=i,a()})),e.state.liveEditor.onChange((function(e){a()}))}if("markdown"===e.props.type){var l=e.el.querySelector('[data-element="markdown-container"]'),c=e.props.sessionPath,u=new Ue(l,i,{baseUrl:c,emptyText:"Empty markdown cell"});e.state.liveEditor.onChange((function(e){u.setContent(e)}))}e.state.isFocused&&e.state.insertMode&&(e.state.liveEditor.focus(),he(e.el),tt(e)),e.state.liveEditor.onBlur((function(){e.state.isFocused&&e.state.insertMode&&e.state.liveEditor.focus()})),e.state.liveEditor.onCursorSelectionChange((function(t){tt(e,t)}))})),"input"===this.props.type){var t=et(this);t.addEventListener("blur",(function(i){e.state.isFocused&&e.state.insertMode&&setTimeout((function(){t.focus()}),0)}))}this._unsubscribeFromCellsEvents=qe.subscribe("cells",(function(t){!function(e,t){"cell_focused"===t.type?function(e,t,i){e.props.cellId===t?(e.state.isFocused=!0,e.el.setAttribute("data-js-focused","true"),i&&he(e.el)):e.state.isFocused&&(e.state.isFocused=!1,e.el.removeAttribute("data-js-focused"))}(e,t.cellId,t.scroll):"insert_mode_changed"===t.type?function(e,t){if(e.state.isFocused){e.state.insertMode=t,e.state.liveEditor&&(e.state.insertMode?(e.state.liveEditor.focus(),setTimeout((function(){!function(e,t){var i=!e.ownerDocument.documentElement.contains(e);if(Qe(t)&&"function"==typeof t.behavior)return t.behavior(i?[]:Xe(e,t));if(!i){var n=function(e){return!1===e?{block:"end",inline:"nearest"}:Qe(e)?e:{block:"start",inline:"nearest"}}(t);(function(e,t){void 0===t&&(t="auto");var i="scrollBehavior"in document.body.style;e.forEach((function(e){var n=e.el,o=e.top,r=e.left;n.scroll&&i?n.scroll({top:o,left:r,behavior:t}):(n.scrollTop=o,n.scrollLeft=r)}))})(Xe(e,n),n.behavior)}}(document.activeElement,{scrollMode:"if-needed",behavior:"smooth",block:"center"})}),0),tt(e)):e.state.liveEditor.blur());var i=et(e);i&&(e.state.insertMode?(i.focus(),i.selectionStart=i.selectionEnd=i.value.length):i.blur())}}(e,t.enabled):"cell_moved"===t.type?function(e,t){e.state.isFocused&&t===e.props.cellId&&he(e.el)}(e,t.cellId):"cell_upload"===t.type?function(e,t,i){if(e.state.liveEditor&&e.props.cellId===t){var n="![](".concat(i,")");e.state.liveEditor.insert(n)}}(e,t.cellId,t.url):"location_report"===t.type&&function(e,t,i){e.state.liveEditor&&(e.props.cellId===i.cellId&&i.selection?e.state.liveEditor.updateUserSelection(t,i.selection):e.state.liveEditor.removeUserSelection(t))}(e,t.client,t.report)}(e,t)}))},destroyed:function(){this._unsubscribeFromCellsEvents(),this.state.liveEditor&&this.state.liveEditor.dispose()},updated:function(){this.props=Je(this)}};function nt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ot(e,t){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:2e3;nt(this,e),this.resetTimeout=t,this.buffer=[],this.resetTimeoutId=null}var t,i;return t=e,(i=[{key:"push",value:function(e){var t=this;this.buffer.push(e),this.resetTimeoutId&&clearTimeout(this.resetTimeoutId),this.resetTimeoutId=setTimeout((function(){t.reset()}),this.resetTimeout)}},{key:"reset",value:function(){this.resetTimeout&&clearTimeout(this.resetTimeout),this.clearTimeout=null,this.buffer=[]}},{key:"tryMatch",value:function(e){if(e.length>this.buffer.length)return!1;var t=this.buffer.slice(-e.length),i=e.every((function(e,i){return e===t[i]}));return i&&this.reset(),i}}])&&ot(t.prototype,i),e}();function st(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i0){var n=i[i.length-1];e.pushEvent("insert_cell_below",{cell_id:n,type:t})}else _t(e,t)}}function mt(e,t){if(e.state.focusedCellId)e.pushEvent("insert_cell_above",{cell_id:e.state.focusedCellId,type:t});else{var i=St();if(i.length>0){var n=i[0];e.pushEvent("insert_cell_above",{cell_id:n,type:t})}else _t(e,t)}}function _t(e,t){var i=Dt().map((function(e){return e.getAttribute("data-section-id")}));i.length>0&&e.pushEvent("insert_cell",{section_id:i[0],index:0,type:t})}function vt(e,t){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(e.state.focusedCellId=t,e.state.focusedCellId){var n=xt(e.state.focusedCellId);e.state.focusedCellType=n.getAttribute("data-type"),e.state.focusedSectionId=kt(e.state.focusedCellId)}else e.state.focusedCellType=null,e.state.focusedSectionId=null;qe.broadcast("cells",{type:"cell_focused",cellId:t,scroll:i}),bt(e,!1)}function bt(e,t){e.state.insertMode=t,t?e.el.setAttribute("data-js-insert-mode","true"):(e.el.removeAttribute("data-js-insert-mode"),wt(e,{cellId:e.state.focusedCellId,selection:null})),qe.broadcast("cells",{type:"insert_mode_changed",enabled:t})}function yt(e,t){qe.broadcast("cells",{type:"location_report",client:e,report:t})}function wt(e,t){var i;Object.keys(e.state.clientsMap).length>1&&e.pushEvent("location_report",{cell_id:t.cellId,selection:(i=t.selection,null===i?null:[i.selectionStartLineNumber,i.selectionStartColumn,i.positionLineNumber,i.positionColumn])})}function Ct(e){if(null===e)return null;var t,i,n=(i=4,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var i=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=i){var n,o,r=[],s=!0,a=!1;try{for(i=i.call(e);!(s=(n=i.next()).done)&&(r.push(n.value),!t||r.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==i.return||i.return()}finally{if(a)throw o}}return r}}(t,i)||function(e,t){if(e){if("string"==typeof e)return st(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?st(e,t):void 0}}(t,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],r=n[1],s=n[2],a=n[3];return new P.Selection(o,r,s,a)}function St(){return Array.from(document.querySelectorAll('[data-element="cell"]')).map((function(e){return e.getAttribute("data-cell-id")}))}function xt(e){return document.querySelector('[data-element="cell"][data-cell-id="'.concat(e,'"]'))}function kt(e){return document.querySelector('[data-element="cell"][data-cell-id="'.concat(e,'"]')).closest('[data-element="section"]').getAttribute("data-section-id")}function Dt(){return Array.from(document.querySelectorAll('[data-element="section"]'))}function Lt(e){return document.querySelector('[data-element="section"][data-section-id="'.concat(e,'"]'))}function Nt(e){e.preventDefault(),e.stopPropagation()}const Et={mounted:function(){var e,t,i=this;this.state={focusedCellId:null,focusedSectionId:null,focusedCellType:null,insertMode:!1,keyBuffer:new rt,clientsMap:{},lastLocationReportByClientPid:{},followedClientPid:null},this.pushEvent("session_init",{},(function(e){e.clients.forEach((function(e){i.state.clientsMap[e.pid]=e}))})),this.handleDocumentKeyDown=function(e){!function(e,t){if(!t.repeat){var i=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?t.metaKey:t.ctrlKey,n=t.key,o=e.state.keyBuffer;if(e.state.insertMode)if(o.reset(),"Escape"===n){var r=!!t.target.closest(".monaco-inputbox"),s=t.target.getAttribute("aria-activedescendant"),a=s&&s.includes("suggest");r||a||function(e){bt(e,!1)}(e)}else i&&"Enter"===n?(Nt(t),"elixir"===e.state.focusedCellType&&dt(e)):i&&"s"===n&&(Nt(t),ht(e));else{if(ce(t.target))return void o.reset();o.push(t.key),i&&"s"===n?(Nt(t),ht(e)):o.tryMatch(["d","d"])?function(e){e.state.focusedCellId&&e.pushEvent("delete_cell",{cell_id:e.state.focusedCellId})}(e):"elixir"===e.state.focusedCellType&&(o.tryMatch(["e","e"])||i&&"Enter"===n)?dt(e):o.tryMatch(["e","a"])?function(e){e.pushEvent("queue_all_cells_evaluation",{})}(e):o.tryMatch(["e","s"])?function(e){e.state.focusedSectionId&&e.pushEvent("queue_section_cells_evaluation",{section_id:e.state.focusedSectionId})}(e):o.tryMatch(["e","j"])?function(e){e.state.focusedCellId&&e.pushEvent("queue_child_cells_evaluation",{cell_id:e.state.focusedCellId})}(e):o.tryMatch(["s","s"])?ct(e):o.tryMatch(["s","u"])?ut(e):o.tryMatch(["s","r"])?function(e){e.pushEvent("show_runtime_settings",{})}(e):o.tryMatch(["e","x"])?function(e){e.state.focusedCellId&&e.pushEvent("cancel_cell_evaluation",{cell_id:e.state.focusedCellId})}(e):o.tryMatch(["?"])?function(e){e.pushEvent("show_shortcuts",{})}(e):o.tryMatch(["i"])?(Nt(t),function(e){e.state.focusedCellId&&bt(e,!0)}(e)):o.tryMatch(["j"])?gt(e,1):o.tryMatch(["k"])?gt(e,-1):o.tryMatch(["J"])?ft(e,1):o.tryMatch(["K"])?ft(e,-1):o.tryMatch(["n"])?pt(e,"elixir"):o.tryMatch(["N"])?mt(e,"elixir"):o.tryMatch(["m"])?pt(e,"markdown"):o.tryMatch(["M"])?mt(e,"markdown"):o.tryMatch(["S"])&&function(e){e.pushEvent("add_section",{})}(e)}}}(i,e)},document.addEventListener("keydown",this.handleDocumentKeyDown,!0),this.handleDocumentMouseDown=function(e){!function(e,t){if(t.target.closest("a, button"))t.target.closest('[data-element="enable-insert-mode-button"]')&&bt(e,!0);else{var i=t.target.closest('[data-element="cell"]'),n=i?i.dataset.cellId:null,o=function(e,t){if(t){var i=t.querySelector('[data-element="editor-container"]'),n=t.querySelector('[data-element="input"]');return(i||n).contains(e.target)}return!1}(t,i);n!==e.state.focusedCellId&&vt(e,n,!o),e.state.insertMode!==o&&bt(e,o)}}(i,e)},document.addEventListener("mousedown",this.handleDocumentMouseDown),this.handleDocumentDoubleClick=function(e){!function(e,t){t.target.closest('[data-element="cell"][data-type="markdown"]')&&e.state.focusedCellId&&!e.state.insertMode&&bt(e,!0)}(i,e)},document.addEventListener("dblclick",this.handleDocumentDoubleClick),document.querySelector('[data-element="sections-list"]').addEventListener("click",(function(e){!function(e,t){var i=t.target.closest('[data-element="sections-list-item"]');i&&Lt(i.getAttribute("data-section-id")).scrollIntoView({behavior:"smooth",block:"start"})}(0,e)})),document.querySelector('[data-element="clients-list"]').addEventListener("click",(function(e){!function(e,t){var i=t.target.closest('[data-element="clients-list-item"]');if(i){var n=i.getAttribute("data-client-pid");t.target.closest('[data-element="client-link"]')&&function(e,t){at(e,t)}(e,n),t.target.closest('[data-element="client-follow-toggle"]')&&function(e,t,i){var n=document.querySelector('[data-element="clients-list-item"][data-js-followed]');n&&n.removeAttribute("data-js-followed"),t===e.state.followedClientPid?e.state.followedClientPid=null:(i.setAttribute("data-js-followed","true"),e.state.followedClientPid=t,at(e,t))}(e,n,i)}}(i,e)})),document.querySelector('[data-element="sections-list-toggle"]').addEventListener("click",(function(e){ct(i)})),document.querySelector('[data-element="clients-list-toggle"]').addEventListener("click",(function(e){ut(i)})),document.querySelector('[data-element="notebook"]').addEventListener("scroll",(function(e){lt()})),document.querySelector('[data-element="notebook-indicators"]').addEventListener("click",(function(e){!function(e,t){var i=t.target.closest('[data-element="focus-cell-button"]');i&&vt(e,i.getAttribute("data-target"))}(i,e)})),window.addEventListener("phx:page-loading-stop",(function(){!function(e){var t=window.location.hash;if(t.startsWith("#cell-")){var i=t.replace(/^#cell-/,"");xt(i)&&vt(e,i)}else{var n=t.replace(/^#/,""),o=document.getElementById(n);o&&o.scrollIntoView()}}(i)}),{once:!0}),lt(),e=Dt(),t=document.querySelector('[data-element="notebook-name"]'),0===e.length&&"Untitled notebook"===t.innerText&&(t.focus(),ue(t)),this.handleEvent("cell_inserted",(function(e){var t=e.cell_id;!function(e,t){vt(e,t),["markdown","elixir"].includes(e.state.focusedCellType)&&bt(e,!0)}(i,t)})),this.handleEvent("cell_deleted",(function(e){var t=e.cell_id,n=e.sibling_cell_id;!function(e,t,i){e.state.focusedCellId===t&&vt(e,i)}(i,t,n)})),this.handleEvent("cell_moved",(function(e){var t,n;n=e.cell_id,(t=i).state.focusedCellId===n&&(qe.broadcast("cells",{type:"cell_moved",cellId:n}),t.state.focusedSectionId=kt(t.state.focusedCellId))})),this.handleEvent("section_inserted",(function(e){var t=e.section_id;!function(e,t){e.state.focusedSectionId&&vt(e,null);var i=Lt(t).querySelector('[data-element="section-name"]');i.focus({preventScroll:!0}),ue(i),he(i)}(i,t)})),this.handleEvent("section_deleted",(function(e){var t,n;n=e.section_id,(t=i).state.focusedSectionId===n&&vt(t,null)})),this.handleEvent("section_moved",(function(e){he(Lt(e.section_id))})),this.handleEvent("cell_upload",(function(e){var t=e.cell_id,n=e.url;!function(e,t,i){e.state.focusedCellId!==t&&vt(e,t),e.state.insertMode||bt(e,!0),qe.broadcast("cells",{type:"cell_upload",cellId:t,url:i})}(i,t,n)})),this.handleEvent("client_joined",(function(e){var t=e.client;!function(e,t){e.state.clientsMap[t.pid]=t}(i,t)})),this.handleEvent("client_left",(function(e){var t,n,o;n=e.client_pid,(o=(t=i).state.clientsMap[n])&&(delete t.state.clientsMap[n],yt(o,{cellId:null,selection:null}),o.pid===t.state.followedClientPid&&(t.state.followedClientPid=null))})),this.handleEvent("clients_updated",(function(e){var t,n=e.clients;t=i,n.forEach((function(e){t.state.clientsMap[e.pid]=e}))})),this.handleEvent("location_report",(function(e){var t=e.client_pid,n={cellId:e.cell_id,selection:Ct(e.selection)};!function(e,t,i){var n=e.state.clientsMap[t];e.state.lastLocationReportByClientPid[t]=i,n&&(yt(n,i),n.pid===e.state.followedClientPid&&i.cellId!==e.state.focusedCellId&&vt(e,i.cellId))}(i,t,n)})),this._unsubscribeFromSessionEvents=qe.subscribe("session",(function(e){!function(e,t){"cursor_selection_changed"===t.type&&wt(e,{cellId:t.cellId,selection:t.selection})}(i,e)}))},destroyed:function(){this._unsubscribeFromSessionEvents(),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("dblclick",this.handleDocumentDoubleClick)}},At={mounted:function(){this.__focus()},updated:function(){this.el!==document.activeElement&&this.__focus()},__focus:function(){ce(document.activeElement)||(this.el.focus(),this.el.selectionStart=this.el.selectionEnd=this.el.value.length)}};var Mt=i(4612),It=i.n(Mt);function Tt(e,t,i,n){var o=t.childElementCount,r=Math.min(i,n*o);return{height:r,total:o,itemHeight:n,generate:function(e){return t.children.item(e).cloneNode(!0)},afterRender:function(){e.scrollWidth>e.clientWidth?e.style.height="".concat(r+12,"px"):e.style.height="".concat(r,"px")}}}function Rt(e){return{maxHeight:x(e.el,"data-max-height",D),follow:x(e.el,"data-follow",k)}}const Ot={mounted:function(){var e=this;if(this.props=Rt(this),this.state={lineHeight:null,templateElement:null,contentElement:null,virtualizedList:null},this.state.lineHeight=function(e){var t=window.getComputedStyle(e),i=parseInt(t.lineHeight,10);if(Number.isNaN(i)){var n=e.cloneNode();n.innerHTML="
",e.appendChild(n);var o=n.clientHeight;n.innerHTML="

";var r=n.clientHeight;return e.removeChild(n),r-o}return i}(this.el),this.state.templateElement=this.el.querySelector("[data-template]"),!this.state.templateElement)throw new Error("VirtualizedLines must have a child with data-template attribute");if(this.state.contentElement=this.el.querySelector("[data-content]"),!this.state.contentElement)throw new Error("VirtualizedLines must have a child with data-content attribute");var t=Tt(this.state.contentElement,this.state.templateElement,this.props.maxHeight,this.state.lineHeight);this.state.virtualizedList=new(It())(this.state.contentElement,t),this.el.querySelector("[data-clipboard]").addEventListener("click",(function(t){var i=Array.from(e.state.templateElement.children).map((function(e){return e.innerText})).join("");"clipboard"in navigator&&navigator.clipboard.writeText(i)}))},updated:function(){this.props=Rt(this);var e=Tt(this.state.contentElement,this.state.templateElement,this.props.maxHeight,this.state.lineHeight),t=Math.round(this.state.contentElement.scrollTop)===Math.round(this.state.contentElement.scrollHeight-this.state.contentElement.clientHeight);this.state.virtualizedList.refresh(this.state.contentElement,e),this.props.follow&&t&&(this.state.contentElement.scrollTop=this.state.contentElement.scrollHeight)}},Ft={mounted:function(){var e=this,t=this.el.querySelector("[data-toggle]");if(!t)throw new Error("Menu must have a child with data-toggle attribute");if(!this.el.querySelector("[data-content]"))throw new Error("Menu must have a child with data-content attribute");t.addEventListener("click",(function(t){e.el.hasAttribute("data-js-open")?e.el.removeAttribute("data-js-open"):(e.el.setAttribute("data-js-open","true"),setTimeout((function(){document.addEventListener("click",(function(t){e.el.removeAttribute("data-js-open")}),{once:!0})}),0))}))}};var Pt="user_data";function Bt(){var e=function(e){var t=document.cookie.split("; ").find((function(t){return t.startsWith("".concat(e,"="))}));return t?t.replace("".concat(e,"="),""):null}(Pt);if(e){var t=decodeURIComponent(escape(atob(e)));return JSON.parse(t)}return null}const zt={mounted:function(){var e=this;this.el.addEventListener("submit",(function(t){var i;i={name:e.el.data_name.value,hex_color:e.el.data_hex_color.value},function(e,t,i){var n="".concat("user_data","=").concat(t,";max-age=").concat(15768e4,";path=/");document.cookie=n}(0,function(e){return btoa(unescape(encodeURIComponent(e)))}(JSON.stringify(i)))}))}};function Wt(e,t,i){return e.fields=t||[],e.fname=i,e}function Vt(e){return null==e?null:e.fname}function Ht(e){return null==e?null:e.fields}function $t(e){return 1===e.length?Ut(e[0]):jt(e)}const Ut=e=>function(t){return t[e]},jt=e=>{const t=e.length;return function(i){for(let n=0;nn&&c(),a=n=o+1):"]"===r&&(a||qt("Access path missing open bracket: "+e),a>0&&c(),a=0,n=o+1):o>n?c():n=o+1}return a&&qt("Access path missing closing bracket: "+e),s&&qt("Access path missing closing quote: "+e),o>n&&(o++,c()),t}function Gt(e,t,i){const n=Kt(e);return e=1===n.length?n[0]:e,Wt((i&&i.get||$t)(n),[e],t||e)}const Yt=Gt("id"),Zt=Wt((e=>e),[],"identity"),Xt=Wt((()=>0),[],"zero"),Qt=Wt((()=>1),[],"one"),Jt=Wt((()=>!0),[],"true"),ei=Wt((()=>!1),[],"false");function ti(e,t,i){const n=[t].concat([].slice.call(i));console[e].apply(console,n)}const ii=0,ni=1,oi=2,ri=3,si=4;function ai(e,t){let i=e||ii;return{level(e){return arguments.length?(i=+e,this):i},error(){return i>=ni&&ti(t||"error","ERROR",arguments),this},warn(){return i>=oi&&ti(t||"warn","WARN",arguments),this},info(){return i>=ri&&ti(t||"log","INFO",arguments),this},debug(){return i>=si&&ti(t||"log","DEBUG",arguments),this}}}var li=Array.isArray;function ci(e){return e===Object(e)}const ui=e=>"__proto__"!==e;function hi(...e){return e.reduce(((e,t)=>{for(const i in t)if("signals"===i)e.signals=gi(e.signals,t.signals);else{const n="legend"===i?{layout:1}:"style"===i||null;di(e,i,t[i],n)}return e}),{})}function di(e,t,i,n){if(!ui(t))return;let o,r;if(ci(i)&&!li(i))for(o in r=ci(e[t])?e[t]:e[t]={},i)n&&(!0===n||n[o])?di(r,o,i[o]):ui(o)&&(r[o]=i[o]);else e[t]=i}function gi(e,t){if(null==e)return t;const i={},n=[];function o(e){i[e.name]||(i[e.name]=1,n.push(e))}return t.forEach(o),e.forEach(o),n}function fi(e){return e[e.length-1]}function pi(e){return null==e||""===e?null:+e}const mi=e=>t=>e*Math.exp(t),_i=e=>t=>Math.log(e*t),vi=e=>t=>Math.sign(t)*Math.log1p(Math.abs(t/e)),bi=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,yi=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function wi(e,t,i,n){const o=i(e[0]),r=i(fi(e)),s=(r-o)*t;return[n(o-s),n(r-s)]}function Ci(e,t){return wi(e,t,pi,Zt)}function Si(e,t){var i=Math.sign(e[0]);return wi(e,t,_i(i),mi(i))}function xi(e,t,i){return wi(e,t,yi(i),yi(1/i))}function ki(e,t,i){return wi(e,t,vi(i),bi(i))}function Di(e,t,i,n,o){const r=n(e[0]),s=n(fi(e)),a=null!=t?n(t):(r+s)/2;return[o(a+(r-a)*i),o(a+(s-a)*i)]}function Li(e,t,i){return Di(e,t,i,pi,Zt)}function Ni(e,t,i){const n=Math.sign(e[0]);return Di(e,t,i,_i(n),mi(n))}function Ei(e,t,i,n){return Di(e,t,i,yi(n),yi(1/n))}function Ai(e,t,i,n){return Di(e,t,i,vi(n),bi(n))}function Mi(e){return 1+~~(new Date(e).getMonth()/3)}function Ii(e){return 1+~~(new Date(e).getUTCMonth()/3)}function Ti(e){return null!=e?li(e)?e:[e]:[]}function Ri(e,t,i){let n,o=e[0],r=e[1];return r=i-t?[t,i]:[o=Math.min(Math.max(o,t),i-n),o+n]}function Oi(e){return"function"==typeof e}function Fi(e,t,i){i=i||{},t=Ti(t)||[];const n=[],o=[],r={},s=i.comparator||Bi;return Ti(e).forEach(((e,s)=>{null!=e&&(n.push("descending"===t[s]?-1:1),o.push(e=Oi(e)?e:Gt(e,null,i)),(Ht(e)||[]).forEach((e=>r[e]=1)))})),0===o.length?null:Wt(s(o,n),Object.keys(r))}const Pi=(e,t)=>(et||null==t)&&null!=e?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t==t?-1:t!=t&&e==e?1:0),Bi=(e,t)=>1===e.length?zi(e[0],t[0]):Wi(e,t,e.length),zi=(e,t)=>function(i,n){return Pi(e(i),e(n))*t},Wi=(e,t,i)=>(t.push(0),function(n,o){let r,s=0,a=-1;for(;0===s&&++ae}function Hi(e,t){let i;return n=>{i&&clearTimeout(i),i=setTimeout((()=>(t(n),i=null)),e)}}function $i(e){for(let t,i,n=1,o=arguments.length;nr&&(r=n))}else{for(n=t(e[s]);sr&&(r=n))}return[o,r]}function ji(e,t){const i=e.length;let n,o,r,s,a,l=-1;if(null==t){for(;++l=o){n=r=o;break}if(l===i)return[-1,-1];for(s=a=l;++lo&&(n=o,s=l),r=o){n=r=o;break}if(l===i)return[-1,-1];for(s=a=l;++lo&&(n=o,s=l),rn(e)?i[e]:void 0,set(e,t){return n(e)||(++o.size,i[e]===Gi&&--o.empty),i[e]=t,this},delete(e){return n(e)&&(--o.size,++o.empty,i[e]=Gi),this},clear(){o.size=o.empty=0,o.object=i={}},test(e){return arguments.length?(t=e,o):t},clean(){const e={};let n=0;for(const o in i){const r=i[o];r===Gi||t&&t(r)||(e[o]=r,++n)}o.size=n,o.empty=0,o.object=i=e}};return e&&Object.keys(e).forEach((t=>{o.set(t,e[t])})),o}function Zi(e,t,i,n,o,r){if(!i&&0!==i)return r;const s=+i;let a,l=e[0],c=fi(e);cs&&(o=r,r=s,s=o),n=void 0===n||n,((i=void 0===i||i)?r<=e:re.replace(/\\(.)/g,"$1"))):Ti(e));const n=e&&e.length,o=i&&i.get||$t,r=e=>o(t?[e]:Kt(e));let s;if(n)if(1===n){const t=r(e[0]);s=function(e){return""+t(e)}}else{const t=e.map(r);s=function(e){let i=""+t[0](e),o=0;for(;++o{t={},i={},n=0},r=(o,r)=>(++n>e&&(i=t,t={},n=1),t[o]=r);return o(),{clear:o,has:e=>Ki(t,e)||Ki(i,e),get:e=>Ki(t,e)?t[e]:Ki(i,e)?r(e,i[e]):void 0,set:(e,i)=>Ki(t,e)?t[e]=i:r(e,i)}}function cn(e,t,i,n){const o=t.length,r=i.length;if(!r)return t;if(!o)return i;const s=n||new t.constructor(o+r);let a=0,l=0,c=0;for(;a0?i[l++]:t[a++];for(;a=0;)i+=e;return i}function hn(e,t,i,n){const o=i||" ",r=e+"",s=t-r.length;return s<=0?r:"left"===n?un(o,s)+r:"center"===n?un(o,~~(s/2))+r+un(o,Math.ceil(s/2)):r+un(o,s)}function dn(e){return e&&fi(e)-e[0]||0}function gn(e){return li(e)?"["+e.map(gn)+"]":ci(e)||rn(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function fn(e){return null==e||""===e?null:!(!e||"false"===e||"0"===e||!e)}const pn=e=>nn(e)||en(e)?e:Date.parse(e);function mn(e,t){return t=t||pn,null==e||""===e?null:t(e)}function _n(e){return null==e||""===e?null:e+""}function vn(e){const t={},i=e.length;for(let n=0;nnew Promise(((i,n)=>{e.readFile(t,((e,t)=>{e?n(e):i(t)}))})):Nn}async function Nn(){qt("No file system access.")}function En(e){return e?async function(t,i){const n=$i({},this.options.http,i),o=i&&i.response,r=await e(t,n);return r.ok?Oi(r[o])?r[o]():r.text():qt(r.status+""+r.statusText)}:An}async function An(){qt("No HTTP fetch method available.")}const Mn=e=>!(Number.isNaN(+e)||e instanceof Date),In={boolean:fn,integer:pi,number:pi,date:mn,string:_n,unknown:Zt},Tn=[e=>"true"===e||"false"===e||!0===e||!1===e,e=>Mn(e)&&Number.isInteger(+e),Mn,e=>!Number.isNaN(Date.parse(e))],Rn=["boolean","integer","number","date"];function On(e,t){if(!e||!e.length)return"unknown";const i=e.length,n=Tn.length,o=Tn.map(((e,t)=>t+1));for(let s,a,l=0,c=0;l0===e?t:e),0)-1]}function Fn(e,t){return t.reduce(((t,i)=>(t[i]=On(e,i),t)),{})}var Pn={},Bn={};function zn(e){return new Function("d","return {"+e.map((function(e,t){return JSON.stringify(e)+": d["+t+'] || ""'})).join(",")+"}")}function Wn(e){var t=Object.create(null),i=[];return e.forEach((function(e){for(var n in e)n in t||i.push(t[n]=n)})),i}function Vn(e,t){var i=e+"",n=i.length;return n=r?l=!0:10===(n=e.charCodeAt(s++))?c=!0:13===n&&(c=!0,10===e.charCodeAt(s)&&++s),e.slice(o+1,t-1).replace(/""/g,'"')}for(;s9999?"+"+Vn(e,6):Vn(e,4)}(e.getUTCFullYear())+"-"+Vn(e.getUTCMonth()+1,2)+"-"+Vn(e.getUTCDate(),2)+(o?"T"+Vn(t,2)+":"+Vn(i,2)+":"+Vn(n,2)+"."+Vn(o,3)+"Z":n?"T"+Vn(t,2)+":"+Vn(i,2)+":"+Vn(n,2)+"Z":i||t?"T"+Vn(t,2)+":"+Vn(i,2)+"Z":"")}(e):t.test(e+="")?'"'+e.replace(/"/g,'""')+'"':e}return{parse:function(e,t){var i,o,r=n(e,(function(e,n){if(i)return i(e,n-1);o=e,i=t?function(e,t){var i=zn(e);return function(n,o){return t(i(n),o,e)}}(e,t):zn(e)}));return r.columns=o||[],r},parseRows:n,format:function(t,i){return null==i&&(i=Wn(t)),[i.map(s).join(e)].concat(o(t,i)).join("\n")},formatBody:function(e,t){return null==t&&(t=Wn(e)),o(e,t).join("\n")},formatRows:function(e){return e.map(r).join("\n")},formatRow:r,formatValue:s}}function $n(e){const t=function(t,i){const n={delimiter:e};return Un(t,i?$i(i,n):n)};return t.responseType="text",t}function Un(e,t){return t.header&&(e=t.header.map(gn).join(t.delimiter)+"\n"+e),Hn(t.delimiter).parse(e+"")}function jn(e,t){const i=t&&t.property?Gt(t.property):Zt;return!ci(e)||(n=e,"function"==typeof Buffer&&Oi(Buffer.isBuffer)&&Buffer.isBuffer(n))?i(JSON.parse(e)):function(e,t){return!li(e)&&tn(e)&&(e=[...e]),t&&t.copy?JSON.parse(JSON.stringify(e)):e}(i(e),t);var n}function qn(e){return e}function Kn(e,t){return"string"==typeof t&&(t=e.objects[t]),"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map((function(t){return Gn(e,t)}))}:Gn(e,t)}function Gn(e,t){var i=t.id,n=t.bbox,o=null==t.properties?{}:t.properties,r=Yn(e,t);return null==i&&null==n?{type:"Feature",properties:o,geometry:r}:null==n?{type:"Feature",id:i,properties:o,geometry:r}:{type:"Feature",id:i,bbox:n,properties:o,geometry:r}}function Yn(e,t){var i=function(e){if(null==e)return qn;var t,i,n=e.scale[0],o=e.scale[1],r=e.translate[0],s=e.translate[1];return function(e,a){a||(t=i=0);var l=2,c=e.length,u=new Array(c);for(u[0]=(t+=e[0])*n+r,u[1]=(i+=e[1])*o+s;l1)n=Jn(0,t,i);else for(o=0,n=new Array(r=e.arcs.length);oe!==t,exterior:(e,t)=>e===t};function to(e,t){let i,n,o,r;return e=jn(e,t),t&&t.feature?(i=Kn,o=t.feature):t&&t.mesh?(i=Xn,o=t.mesh,r=eo[t.filter]):qt("Missing TopoJSON feature or mesh parameter."),n=(n=e.objects[o])?i(e,n,r):qt("Invalid TopoJSON object: "+o),n&&n.features||[n]}to.responseType="json";const io={dsv:Un,csv:$n(","),tsv:$n("\t"),json:jn,topojson:to};function no(e,t){return arguments.length>1?(io[e]=t,this):Ki(io,e)?io[e]:null}function oo(e){const t=no(e);return t&&t.responseType||"text"}var ro=Math.sqrt(50),so=Math.sqrt(10),ao=Math.sqrt(2);function lo(e,t,i){var n,o,r,s,a=-1;if(i=+i,(e=+e)==(t=+t)&&i>0)return[e];if((n=t0){let i=Math.round(e/s),n=Math.round(t/s);for(i*st&&--n,r=new Array(o=n-i+1);++at&&--n,r=new Array(o=n-i+1);++a=0?(r>=ro?10:r>=so?5:r>=ao?2:1)*Math.pow(10,o):-Math.pow(10,-o)/(r>=ro?10:r>=so?5:r>=ao?2:1)}function uo(e,t,i){var n=Math.abs(t-e)/Math.max(0,i),o=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),r=n/o;return r>=ro?o*=10:r>=so?o*=5:r>=ao&&(o*=2),t=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function fo(e){if(!(t=go.exec(e)))throw new Error("invalid format: "+e);var t;return new po({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function po(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function mo(e,t){if((i=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var i,n=e.slice(0,i);return[n.length>1?n[0]+n.slice(2):n,+e.slice(i+1)]}function _o(e){return(e=mo(Math.abs(e)))?e[1]:NaN}function vo(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(_o(t)/3)))-_o(Math.abs(e)))}function bo(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,_o(t)-_o(e))+1}function yo(e){return Math.max(0,-_o(Math.abs(e)))}function wo(e,t){var i=mo(e,t);if(!i)return e+"";var n=i[0],o=i[1];return o<0?"0."+new Array(-o).join("0")+n:n.length>o+1?n.slice(0,o+1)+"."+n.slice(o+1):n+new Array(o-n.length+2).join("0")}fo.prototype=po.prototype,po.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Co={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>wo(100*e,t),r:wo,s:function(e,t){var i=mo(e,t);if(!i)return e+"";var n=i[0],o=i[1],r=o-(ho=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,s=n.length;return r===s?n:r>s?n+new Array(r-s+1).join("0"):r>0?n.slice(0,r)+"."+n.slice(r):"0."+new Array(1-r).join("0")+mo(e,Math.max(0,t+r-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function So(e){return e}var xo,ko,Do,Lo=Array.prototype.map,No=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Eo(e){var t,i,n=void 0===e.grouping||void 0===e.thousands?So:(t=Lo.call(e.grouping,Number),i=e.thousands+"",function(e,n){for(var o=e.length,r=[],s=0,a=t[0],l=0;o>0&&a>0&&(l+a+1>n&&(a=Math.max(1,n-l)),r.push(e.substring(o-=a,o+a)),!((l+=a+1)>n));)a=t[s=(s+1)%t.length];return r.reverse().join(i)}),o=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",s=void 0===e.decimal?".":e.decimal+"",a=void 0===e.numerals?So:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(Lo.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function h(e){var t=(e=fo(e)).fill,i=e.align,h=e.sign,d=e.symbol,g=e.zero,f=e.width,p=e.comma,m=e.precision,_=e.trim,v=e.type;"n"===v?(p=!0,v="g"):Co[v]||(void 0===m&&(m=12),_=!0,v="g"),(g||"0"===t&&"="===i)&&(g=!0,t="0",i="=");var b="$"===d?o:"#"===d&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",y="$"===d?r:/[%p]/.test(v)?l:"",w=Co[v],C=/[defgprs%]/.test(v);function S(e){var o,r,l,d=b,S=y;if("c"===v)S=w(e)+S,e="";else{var x=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:w(Math.abs(e),m),_&&(e=function(e){e:for(var t,i=e.length,n=1,o=-1;n0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),x&&0==+e&&"+"!==h&&(x=!1),d=(x?"("===h?h:c:"-"===h||"("===h?"":h)+d,S=("s"===v?No[8+ho/3]:"")+S+(x&&"("===h?")":""),C)for(o=-1,r=e.length;++o(l=e.charCodeAt(o))||l>57){S=(46===l?s+e.slice(o+1):e.slice(o))+S,e=e.slice(0,o);break}}p&&!g&&(e=n(e,1/0));var k=d.length+e.length+S.length,D=k>1)+d+e+S+D.slice(k);break;default:e=D+d+e+S}return a(e)}return m=void 0===m?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),S.toString=function(){return e+""},S}return{format:h,formatPrefix:function(e,t){var i=h(((e=fo(e)).type="f",e)),n=3*Math.max(-8,Math.min(8,Math.floor(_o(t)/3))),o=Math.pow(10,-n),r=No[8+n/3];return function(e){return i(o*e)+r}}}}xo=Eo({thousands:",",grouping:[3],currency:["$",""]}),ko=xo.format,Do=xo.formatPrefix;var Ao=new Date,Mo=new Date;function Io(e,t,i,n){function o(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return o.floor=function(t){return e(t=new Date(+t)),t},o.ceil=function(i){return e(i=new Date(i-1)),t(i,1),e(i),i},o.round=function(e){var t=o(e),i=o.ceil(e);return e-t0))return a;do{a.push(s=new Date(+i)),t(i,r),e(i)}while(s=t)for(;e(t),!i(t);)t.setTime(t-1)}),(function(e,n){if(e>=e)if(n<0)for(;++n<=0;)for(;t(e,-1),!i(e););else for(;--n>=0;)for(;t(e,1),!i(e););}))},i&&(o.count=function(t,n){return Ao.setTime(+t),Mo.setTime(+n),e(Ao),e(Mo),Math.floor(i(Ao,Mo))},o.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(n?function(t){return n(t)%e==0}:function(t){return o.count(0,t)%e==0}):o:null}),o}const To=1e3,Ro=6e4,Oo=36e5,Fo=864e5,Po=6048e5,Bo=31536e6;var zo=Io((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ro)/Fo),(e=>e.getDate()-1));const Wo=zo;function Vo(e){return Io((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ro)/Po}))}zo.range;var Ho=Vo(0),$o=Vo(1),Uo=Vo(2),jo=Vo(3),qo=Vo(4),Ko=Vo(5),Go=Vo(6),Yo=(Ho.range,$o.range,Uo.range,jo.range,qo.range,Ko.range,Go.range,Io((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/Fo}),(function(e){return e.getUTCDate()-1})));const Zo=Yo;function Xo(e){return Io((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/Po}))}Yo.range;var Qo=Xo(0),Jo=Xo(1),er=Xo(2),tr=Xo(3),ir=Xo(4),nr=Xo(5),or=Xo(6),rr=(Qo.range,Jo.range,er.range,tr.range,ir.range,nr.range,or.range,Io((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()})));rr.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Io((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,i){t.setFullYear(t.getFullYear()+i*e)})):null};const sr=rr;rr.range;var ar=Io((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()}));const lr=ar;ar.range;var cr=Io((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*To-e.getMinutes()*Ro)}),(function(e,t){e.setTime(+e+t*Oo)}),(function(e,t){return(t-e)/Oo}),(function(e){return e.getHours()}));const ur=cr;cr.range;var hr=Io((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*To)}),(function(e,t){e.setTime(+e+t*Ro)}),(function(e,t){return(t-e)/Ro}),(function(e){return e.getMinutes()}));const dr=hr;hr.range;var gr=Io((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+t*To)}),(function(e,t){return(t-e)/To}),(function(e){return e.getUTCSeconds()}));const fr=gr;gr.range;var pr=Io((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));pr.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?Io((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,i){t.setTime(+t+i*e)}),(function(t,i){return(i-t)/e})):pr:null};const mr=pr;pr.range;var _r=Io((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));_r.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Io((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,i){t.setUTCFullYear(t.getUTCFullYear()+i*e)})):null};const vr=_r;_r.range;var br=Io((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()}));const yr=br;br.range;var wr=Io((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*Oo)}),(function(e,t){return(t-e)/Oo}),(function(e){return e.getUTCHours()}));const Cr=wr;wr.range;var Sr=Io((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*Ro)}),(function(e,t){return(t-e)/Ro}),(function(e){return e.getUTCMinutes()}));const xr=Sr;function kr(e,t){return et?1:e>=t?0:NaN}function Dr(e){let t=e,i=e;function n(e,t,n,o){for(null==n&&(n=0),null==o&&(o=e.length);n>>1;i(e[r],t)<0?n=r+1:o=r}return n}return 1===e.length&&(t=(t,i)=>e(t)-i,i=function(e){return(t,i)=>kr(e(t),i)}(e)),{left:n,center:function(e,i,o,r){null==o&&(o=0),null==r&&(r=e.length);const s=n(e,i,o,r-1);return s>o&&t(e[s-1],i)>-t(e[s],i)?s-1:s},right:function(e,t,n,o){for(null==n&&(n=0),null==o&&(o=e.length);n>>1;i(e[r],t)>0?o=r:n=r+1}return n}}}Sr.range;const Lr="year",Nr="quarter",Er="month",Ar="week",Mr="date",Ir="day",Tr="dayofyear",Rr="hours",Or="minutes",Fr="seconds",Pr="milliseconds",Br=[Lr,Nr,Er,Ar,Mr,Ir,Tr,Rr,Or,Fr,Pr],zr=Br.reduce(((e,t,i)=>(e[t]=1+i,e)),{});function Wr(e){const t=Ti(e).slice(),i={};return t.length||qt("Missing time unit."),t.forEach((e=>{Ki(zr,e)?i[e]=1:qt("Invalid time unit: ".concat(e,"."))})),(i[Ar]||i[Ir]?1:0)+(i[Nr]||i[Er]||i[Mr]?1:0)+(i[Tr]?1:0)>1&&qt("Incompatible time units: ".concat(e)),t.sort(((e,t)=>zr[e]-zr[t])),t}const Vr={[Lr]:"%Y ",[Nr]:"Q%q ",[Er]:"%b ",[Mr]:"%d ",[Ar]:"W%U ",[Ir]:"%a ",[Tr]:"%j ",[Rr]:"%H:00",[Or]:"00:%M",[Fr]:":%S",[Pr]:".%L",["".concat(Lr,"-").concat(Er)]:"%Y-%m ",["".concat(Lr,"-").concat(Er,"-").concat(Mr)]:"%Y-%m-%d ",["".concat(Rr,"-").concat(Or)]:"%H:%M"};function Hr(e,t){const i=$i({},Vr,t),n=Wr(e),o=n.length;let r,s,a="",l=0;for(l=0;ll;--r)if(s=n.slice(l,r).join("-"),null!=i[s]){a+=i[s],l=r;break}return a.trim()}const $r=new Date;function Ur(e){return $r.setFullYear(e),$r.setMonth(0),$r.setDate(1),$r.setHours(0,0,0,0),$r}function jr(e){return Kr(new Date(e))}function qr(e){return Gr(new Date(e))}function Kr(e){return Wo.count(Ur(e.getFullYear())-1,e)}function Gr(e){return Ho.count(Ur(e.getFullYear())-1,e)}function Yr(e){return Ur(e).getDay()}function Zr(e,t,i,n,o,r,s){if(0<=e&&e<100){const a=new Date(-1,t,i,n,o,r,s);return a.setFullYear(e),a}return new Date(e,t,i,n,o,r,s)}function Xr(e){return Jr(new Date(e))}function Qr(e){return es(new Date(e))}function Jr(e){const t=Date.UTC(e.getUTCFullYear(),0,1);return Zo.count(t-1,e)}function es(e){const t=Date.UTC(e.getUTCFullYear(),0,1);return Qo.count(t-1,e)}function ts(e){return $r.setTime(Date.UTC(e,0,1)),$r.getUTCDay()}function is(e,t,i,n,o,r,s){if(0<=e&&e<100){const e=new Date(Date.UTC(-1,t,i,n,o,r,s));return e.setUTCFullYear(i.y),e}return new Date(Date.UTC(e,t,i,n,o,r,s))}function ns(e,t,i,n,o){const r=t||1,s=fi(e),a=(e,t,o)=>function(e,t,i,n){const o=i<=1?e:n?(t,o)=>n+i*Math.floor((e(t,o)-n)/i):(t,n)=>i*Math.floor(e(t,n)/i);return t?(e,i)=>t(o(e,i),i):o}(i[o=o||e],n[o],e===s&&r,t),l=new Date,c=vn(e),u=c[Lr]?a(Lr):Vi(2012),h=c[Er]?a(Er):c[Nr]?a(Nr):Xt,d=c[Ar]&&c[Ir]?a(Ir,1,Ar+Ir):c[Ar]?a(Ar,1):c[Ir]?a(Ir,1):c[Mr]?a(Mr,1):c[Tr]?a(Tr,1):Qt,g=c[Rr]?a(Rr):Xt,f=c[Or]?a(Or):Xt,p=c[Fr]?a(Fr):Xt,m=c[Pr]?a(Pr):Xt;return function(e){l.setTime(+e);const t=u(l);return o(t,h(l),d(l,t),g(l),f(l),p(l),m(l))}}function os(e,t,i){return t+7*e-(i+6)%7}const rs={[Lr]:e=>e.getFullYear(),[Nr]:e=>Math.floor(e.getMonth()/3),[Er]:e=>e.getMonth(),[Mr]:e=>e.getDate(),[Rr]:e=>e.getHours(),[Or]:e=>e.getMinutes(),[Fr]:e=>e.getSeconds(),[Pr]:e=>e.getMilliseconds(),[Tr]:e=>Kr(e),[Ar]:e=>Gr(e),[Ar+Ir]:(e,t)=>os(Gr(e),e.getDay(),Yr(t)),[Ir]:(e,t)=>os(1,e.getDay(),Yr(t))},ss={[Nr]:e=>3*e,[Ar]:(e,t)=>os(e,0,Yr(t))};function as(e,t){return ns(e,t||1,rs,ss,Zr)}const ls={[Lr]:e=>e.getUTCFullYear(),[Nr]:e=>Math.floor(e.getUTCMonth()/3),[Er]:e=>e.getUTCMonth(),[Mr]:e=>e.getUTCDate(),[Rr]:e=>e.getUTCHours(),[Or]:e=>e.getUTCMinutes(),[Fr]:e=>e.getUTCSeconds(),[Pr]:e=>e.getUTCMilliseconds(),[Tr]:e=>Jr(e),[Ar]:e=>es(e),[Ir]:(e,t)=>os(1,e.getUTCDay(),ts(t)),[Ar+Ir]:(e,t)=>os(es(e),e.getUTCDay(),ts(t))},cs={[Nr]:e=>3*e,[Ar]:(e,t)=>os(e,0,ts(t))};function us(e,t){return ns(e,t||1,ls,cs,is)}const hs={[Lr]:sr,[Nr]:lr.every(3),[Er]:lr,[Ar]:Ho,[Mr]:Wo,[Ir]:Wo,[Tr]:Wo,[Rr]:ur,[Or]:dr,[Fr]:fr,[Pr]:mr},ds={[Lr]:vr,[Nr]:yr.every(3),[Er]:yr,[Ar]:Qo,[Mr]:Zo,[Ir]:Zo,[Tr]:Zo,[Rr]:Cr,[Or]:xr,[Fr]:fr,[Pr]:mr};function gs(e){return hs[e]}function fs(e){return ds[e]}function ps(e,t,i){return e?e.offset(t,i):void 0}function ms(e,t,i){return ps(gs(e),t,i)}function _s(e,t,i){return ps(fs(e),t,i)}function vs(e,t,i,n){return e?e.range(t,i,n):void 0}function bs(e,t,i,n){return vs(gs(e),t,i,n)}function ys(e,t,i,n){return vs(fs(e),t,i,n)}const ws=31536e6,Cs=[Lr,Er,Mr,Rr,Or,Fr,Pr],Ss=Cs.slice(0,-1),xs=Ss.slice(0,-1),ks=xs.slice(0,-1),Ds=ks.slice(0,-1),Ls=[Lr,Er],Ns=[Lr],Es=[[Ss,1,1e3],[Ss,5,5e3],[Ss,15,15e3],[Ss,30,3e4],[xs,1,6e4],[xs,5,3e5],[xs,15,9e5],[xs,30,18e5],[ks,1,36e5],[ks,3,108e5],[ks,6,216e5],[ks,12,432e5],[Ds,1,864e5],[[Lr,Ar],1,6048e5],[Ls,1,2592e6],[Ls,3,7776e6],[Ns,1,ws]];function As(e){const t=e.extent,i=e.maxbins||40,n=Math.abs(dn(t))/i;let o,r,s=Dr((e=>e[2])).right(Es,n);return s===Es.length?(o=Ns,r=uo(t[0]/ws,t[1]/ws,i)):s?(s=Es[n/Es[s-1][2]=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:tl,s:il,S:Ca,u:Sa,U:xa,V:Da,w:La,W:Na,x:null,X:null,y:Ea,Y:Ma,Z:Ta,"%":el},y={a:function(e){return s[e.getUTCDay()]},A:function(e){return r[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return a[e.getUTCMonth()]},c:null,d:Ra,e:Ra,f:za,g:Za,G:Qa,H:Oa,I:Fa,j:Pa,L:Ba,m:Wa,M:Va,p:function(e){return o[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:tl,s:il,S:Ha,u:$a,U:Ua,V:qa,w:Ka,W:Ga,x:null,X:null,y:Ya,Y:Xa,Z:Ja,"%":el},w={a:function(e,t,i){var n=g.exec(t.slice(i));return n?(e.w=f.get(n[0].toLowerCase()),i+n[0].length):-1},A:function(e,t,i){var n=h.exec(t.slice(i));return n?(e.w=d.get(n[0].toLowerCase()),i+n[0].length):-1},b:function(e,t,i){var n=_.exec(t.slice(i));return n?(e.m=v.get(n[0].toLowerCase()),i+n[0].length):-1},B:function(e,t,i){var n=p.exec(t.slice(i));return n?(e.m=m.get(n[0].toLowerCase()),i+n[0].length):-1},c:function(e,i,n){return x(e,t,i,n)},d:oa,e:oa,f:ua,g:ea,G:Js,H:sa,I:sa,j:ra,L:ca,m:na,M:aa,p:function(e,t,i){var n=c.exec(t.slice(i));return n?(e.p=u.get(n[0].toLowerCase()),i+n[0].length):-1},q:ia,Q:da,s:ga,S:la,u:Ys,U:Zs,V:Xs,w:Gs,W:Qs,x:function(e,t,n){return x(e,i,t,n)},X:function(e,t,i){return x(e,n,t,i)},y:ea,Y:Js,Z:ta,"%":ha};function C(e,t){return function(i){var n,o,r,s=[],a=-1,l=0,c=e.length;for(i instanceof Date||(i=new Date(+i));++a53)return null;"w"in r||(r.w=1),"Z"in r?(o=(n=Is(Ts(r.y,0,1))).getUTCDay(),n=o>4||0===o?Jo.ceil(n):Jo(n),n=Zo.offset(n,7*(r.V-1)),r.y=n.getUTCFullYear(),r.m=n.getUTCMonth(),r.d=n.getUTCDate()+(r.w+6)%7):(o=(n=Ms(Ts(r.y,0,1))).getDay(),n=o>4||0===o?$o.ceil(n):$o(n),n=Wo.offset(n,7*(r.V-1)),r.y=n.getFullYear(),r.m=n.getMonth(),r.d=n.getDate()+(r.w+6)%7)}else("W"in r||"U"in r)&&("w"in r||(r.w="u"in r?r.u%7:"W"in r?1:0),o="Z"in r?Is(Ts(r.y,0,1)).getUTCDay():Ms(Ts(r.y,0,1)).getDay(),r.m=0,r.d="W"in r?(r.w+6)%7+7*r.W-(o+5)%7:r.w+7*r.U-(o+6)%7);return"Z"in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,Is(r)):Ms(r)}}function x(e,t,i,n){for(var o,r,s=0,a=t.length,l=i.length;s=l)return-1;if(37===(o=t.charCodeAt(s++))){if(o=t.charAt(s++),!(r=w[o in Ws?t.charAt(s++):o])||(n=r(e,i,n))<0)return-1}else if(o!=i.charCodeAt(n++))return-1}return n}return b.x=C(i,b),b.X=C(n,b),b.c=C(t,b),y.x=C(i,y),y.X=C(n,y),y.c=C(t,y),{format:function(e){var t=C(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=S(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=C(e+="",y);return t.toString=function(){return e},t},utcParse:function(e){var t=S(e+="",!0);return t.toString=function(){return e},t}}}var Os,Fs,Ps,Bs,zs,Ws={"-":"",_:" ",0:"0"},Vs=/^\s*\d+/,Hs=/^%/,$s=/[\\^$*+?|[\]().{}]/g;function Us(e,t,i){var n=e<0?"-":"",o=(n?-e:e)+"",r=o.length;return n+(r[e.toLowerCase(),t])))}function Gs(e,t,i){var n=Vs.exec(t.slice(i,i+1));return n?(e.w=+n[0],i+n[0].length):-1}function Ys(e,t,i){var n=Vs.exec(t.slice(i,i+1));return n?(e.u=+n[0],i+n[0].length):-1}function Zs(e,t,i){var n=Vs.exec(t.slice(i,i+2));return n?(e.U=+n[0],i+n[0].length):-1}function Xs(e,t,i){var n=Vs.exec(t.slice(i,i+2));return n?(e.V=+n[0],i+n[0].length):-1}function Qs(e,t,i){var n=Vs.exec(t.slice(i,i+2));return n?(e.W=+n[0],i+n[0].length):-1}function Js(e,t,i){var n=Vs.exec(t.slice(i,i+4));return n?(e.y=+n[0],i+n[0].length):-1}function ea(e,t,i){var n=Vs.exec(t.slice(i,i+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),i+n[0].length):-1}function ta(e,t,i){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(i,i+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),i+n[0].length):-1}function ia(e,t,i){var n=Vs.exec(t.slice(i,i+1));return n?(e.q=3*n[0]-3,i+n[0].length):-1}function na(e,t,i){var n=Vs.exec(t.slice(i,i+2));return n?(e.m=n[0]-1,i+n[0].length):-1}function oa(e,t,i){var n=Vs.exec(t.slice(i,i+2));return n?(e.d=+n[0],i+n[0].length):-1}function ra(e,t,i){var n=Vs.exec(t.slice(i,i+3));return n?(e.m=0,e.d=+n[0],i+n[0].length):-1}function sa(e,t,i){var n=Vs.exec(t.slice(i,i+2));return n?(e.H=+n[0],i+n[0].length):-1}function aa(e,t,i){var n=Vs.exec(t.slice(i,i+2));return n?(e.M=+n[0],i+n[0].length):-1}function la(e,t,i){var n=Vs.exec(t.slice(i,i+2));return n?(e.S=+n[0],i+n[0].length):-1}function ca(e,t,i){var n=Vs.exec(t.slice(i,i+3));return n?(e.L=+n[0],i+n[0].length):-1}function ua(e,t,i){var n=Vs.exec(t.slice(i,i+6));return n?(e.L=Math.floor(n[0]/1e3),i+n[0].length):-1}function ha(e,t,i){var n=Hs.exec(t.slice(i,i+1));return n?i+n[0].length:-1}function da(e,t,i){var n=Vs.exec(t.slice(i));return n?(e.Q=+n[0],i+n[0].length):-1}function ga(e,t,i){var n=Vs.exec(t.slice(i));return n?(e.s=+n[0],i+n[0].length):-1}function fa(e,t){return Us(e.getDate(),t,2)}function pa(e,t){return Us(e.getHours(),t,2)}function ma(e,t){return Us(e.getHours()%12||12,t,2)}function _a(e,t){return Us(1+Wo.count(sr(e),e),t,3)}function va(e,t){return Us(e.getMilliseconds(),t,3)}function ba(e,t){return va(e,t)+"000"}function ya(e,t){return Us(e.getMonth()+1,t,2)}function wa(e,t){return Us(e.getMinutes(),t,2)}function Ca(e,t){return Us(e.getSeconds(),t,2)}function Sa(e){var t=e.getDay();return 0===t?7:t}function xa(e,t){return Us(Ho.count(sr(e)-1,e),t,2)}function ka(e){var t=e.getDay();return t>=4||0===t?qo(e):qo.ceil(e)}function Da(e,t){return e=ka(e),Us(qo.count(sr(e),e)+(4===sr(e).getDay()),t,2)}function La(e){return e.getDay()}function Na(e,t){return Us($o.count(sr(e)-1,e),t,2)}function Ea(e,t){return Us(e.getFullYear()%100,t,2)}function Aa(e,t){return Us((e=ka(e)).getFullYear()%100,t,2)}function Ma(e,t){return Us(e.getFullYear()%1e4,t,4)}function Ia(e,t){var i=e.getDay();return Us((e=i>=4||0===i?qo(e):qo.ceil(e)).getFullYear()%1e4,t,4)}function Ta(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Us(t/60|0,"0",2)+Us(t%60,"0",2)}function Ra(e,t){return Us(e.getUTCDate(),t,2)}function Oa(e,t){return Us(e.getUTCHours(),t,2)}function Fa(e,t){return Us(e.getUTCHours()%12||12,t,2)}function Pa(e,t){return Us(1+Zo.count(vr(e),e),t,3)}function Ba(e,t){return Us(e.getUTCMilliseconds(),t,3)}function za(e,t){return Ba(e,t)+"000"}function Wa(e,t){return Us(e.getUTCMonth()+1,t,2)}function Va(e,t){return Us(e.getUTCMinutes(),t,2)}function Ha(e,t){return Us(e.getUTCSeconds(),t,2)}function $a(e){var t=e.getUTCDay();return 0===t?7:t}function Ua(e,t){return Us(Qo.count(vr(e)-1,e),t,2)}function ja(e){var t=e.getUTCDay();return t>=4||0===t?ir(e):ir.ceil(e)}function qa(e,t){return e=ja(e),Us(ir.count(vr(e),e)+(4===vr(e).getUTCDay()),t,2)}function Ka(e){return e.getUTCDay()}function Ga(e,t){return Us(Jo.count(vr(e)-1,e),t,2)}function Ya(e,t){return Us(e.getUTCFullYear()%100,t,2)}function Za(e,t){return Us((e=ja(e)).getUTCFullYear()%100,t,2)}function Xa(e,t){return Us(e.getUTCFullYear()%1e4,t,4)}function Qa(e,t){var i=e.getUTCDay();return Us((e=i>=4||0===i?ir(e):ir.ceil(e)).getUTCFullYear()%1e4,t,4)}function Ja(){return"+0000"}function el(){return"%"}function tl(e){return+e}function il(e){return Math.floor(+e/1e3)}function nl(e){const t={};return i=>t[i]||(t[i]=e(i))}function ol(e){const t=nl(e.format),i=e.formatPrefix;return{format:t,formatPrefix:i,formatFloat(e){const i=fo(e||",");if(null==i.precision){switch(i.precision=12,i.type){case"%":i.precision-=2;break;case"e":i.precision-=1}return function(e,t){return i=>{const n=e(i),o=n.indexOf(t);if(o<0)return n;let r=function(e,t){let i,n=e.lastIndexOf("e");if(n>0)return n;for(n=e.length;--n>t;)if(i=e.charCodeAt(n),i>=48&&i<=57)return n+1}(n,o);const s=ro;)if("0"!==n[r]){++r;break}return n.slice(0,r)+s}}(t(i),t(".1f")(1)[1])}return t(i)},formatSpan(e,n,o,r){r=fo(null==r?",f":r);const s=uo(e,n,o),a=Math.max(Math.abs(e),Math.abs(n));let l;if(null==r.precision)switch(r.type){case"s":return isNaN(l=vo(s,a))||(r.precision=l),i(r,a);case"":case"e":case"g":case"p":case"r":isNaN(l=bo(s,a))||(r.precision=l-("e"===r.type));break;case"f":case"%":isNaN(l=yo(s))||(r.precision=l-2*("%"===r.type))}return t(r)}}}let rl,sl;function al(){return rl=ol({format:ko,formatPrefix:Do})}function ll(e){return ol(Eo(e))}function cl(e){return arguments.length?rl=ll(e):rl}function ul(e,t,i){ci(i=i||{})||qt("Invalid time multi-format specifier: ".concat(i));const n=t(Fr),o=t(Or),r=t(Rr),s=t(Mr),a=t(Ar),l=t(Er),c=t(Nr),u=t(Lr),h=e(i[Pr]||".%L"),d=e(i[Fr]||":%S"),g=e(i[Or]||"%I:%M"),f=e(i[Rr]||"%I %p"),p=e(i[Mr]||i[Ir]||"%a %d"),m=e(i[Ar]||"%b %d"),_=e(i[Er]||"%B"),v=e(i[Nr]||"%B"),b=e(i[Lr]||"%Y");return e=>(n(e)rn(e)?t(e):ul(t,gs,e),utcFormat:e=>rn(e)?i(e):ul(i,fs,e),timeParse:nl(e.parse),utcParse:nl(e.utcParse)}}function dl(){return sl=hl({format:Fs,parse:Ps,utcFormat:Bs,utcParse:zs})}function gl(e){return hl(Rs(e))}function fl(e){return arguments.length?sl=gl(e):sl}Os=Rs({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),Fs=Os.format,Ps=Os.parse,Bs=Os.utcFormat,zs=Os.utcParse,al(),dl();const pl=(e,t)=>$i({},e,t);function ml(e,t){const i=e?ll(e):cl(),n=t?gl(t):fl();return pl(i,n)}function _l(e,t){const i=arguments.length;return i&&2!==i&&qt("defaultLocale expects either zero or two arguments."),i?pl(cl(e),fl(t)):pl(cl(),fl())}function vl(){return al(),dl(),_l()}function bl(e,t,i,n){const o=no((t=t||{}).type||"json");return o||qt("Unknown data format type: "+t.type),e=o(e,t),t.parse&&function(e,t,i,n){if(!e.length)return;const o=fl();i=i||o.timeParse,n=n||o.utcParse;let r,s,a,l,c,u,h=e.columns||Object.keys(e[0]);"auto"===t&&(t=Fn(e,h)),h=Object.keys(t);const d=h.map((e=>{const o=t[e];let r,s;if(o&&(o.startsWith("date:")||o.startsWith("utc:")))return r=o.split(/:(.+)?/,2),s=r[1],("'"===s[0]&&"'"===s[s.length-1]||'"'===s[0]&&'"'===s[s.length-1])&&(s=s.slice(1,-1)),("utc"===r[0]?n:i)(s);if(!In[o])throw Error("Illegal format pattern: "+e+":"+o);return In[o]}));for(a=0,c=e.length,u=h.length;a({options:t||{},sanitize:Dn,load:kn,fileAccess:!1,file:Ln(null),http:En(e)})}("undefined"!=typeof fetch&&fetch);function wl(e){const t=e||Zt,i=[],n={};return i.add=e=>{const o=t(e);return n[o]||(n[o]=1,i.push(e)),i},i.remove=e=>{const o=t(e);if(n[o]){n[o]=0;const t=i.indexOf(e);t>=0&&i.splice(t,1)}return i},i}async function Cl(e,t){try{await t(e)}catch(t){e.error(t)}}const Sl=Symbol("vega_id");let xl=1;function kl(e){return!(!e||!Dl(e))}function Dl(e){return e[Sl]}function Ll(e,t){return e[Sl]=t,e}function Nl(e){const t=e===Object(e)?e:{data:e};return Dl(t)?t:Ll(t,xl++)}function El(e){return Al(e,Nl({}))}function Al(e,t){for(const i in e)t[i]=e[i];return t}function Ml(e,t){return Ll(t,Dl(e))}function Il(e,t){return e?t?(i,n)=>e(i,n)||Dl(t(i))-Dl(t(n)):(t,i)=>e(t,i)||Dl(t)-Dl(i):null}function Tl(e){return e&&e.constructor===Rl}function Rl(){const e=[],t=[],i=[],n=[],o=[];let r=null,s=!1;return{constructor:Rl,insert(t){const i=Ti(t),n=i.length;for(let t=0;t{f(e)&&(c[Dl(e)]=-1)}));for(h=0,d=e.length;h0&&(_(p,f,g.value),a.modifies(f));for(h=0,d=o.length;h{f(e)&&c[Dl(e)]>0&&_(e,g.field,g.value)})),a.modifies(g.field);if(s)a.mod=t.length||n.length?l.filter((e=>c[Dl(e)]>0)):l.slice();else for(m in u)a.mod.push(u[m]);return(r||null==r&&(t.length||n.length))&&a.clean(!0),a}}}const Ol="_:mod:_";function Fl(){Object.defineProperty(this,Ol,{writable:!0,value:{}})}Fl.prototype={set(e,t,i,n){const o=this,r=o[e],s=o[Ol];return null!=t&&t>=0?(r[t]!==i||n)&&(r[t]=i,s[t+":"+e]=-1,s[e]=-1):(r!==i||n)&&(o[e]=i,s[e]=li(i)?1+i.length:-1),o},modified(e,t){const i=this[Ol];if(!arguments.length){for(const e in i)if(i[e])return!0;return!1}if(li(e)){for(let t=0;t=0?t+1{s instanceof zl?(s!==this&&(t&&s.targets().add(this),r.push(s)),o.push({op:s,name:e,index:i})):n.set(e,i,s)};for(s in e)if(a=e[s],"pulse"===s)Ti(a).forEach((e=>{e instanceof zl?e!==this&&(e.targets().add(this),r.push(e)):qt("Pulse parameters must be operator instances.")})),this.source=a;else if(li(a))for(n.set(s,-1,Array(l=a.length)),c=0;c{const i=Date.now();return i-t>e?(t=i,1):0}))},debounce(e){const t=$l();return this.targets().add($l(null,null,Hi(e,(e=>{const i=e.dataflow;t.receive(e),i&&i.run&&i.run()})))),t},between(e,t){let i=!1;return e.targets().add($l(null,null,(()=>i=!0))),t.targets().add($l(null,null,(()=>i=!1))),this.filter((()=>i))},detach(){this._filter=Jt,this._targets=null}};const Ul={skip:!0};function jl(e,t,i,n,o,r){const s=$i({},r,Ul);let a,l;Oi(i)||(i=Vi(i)),void 0===n?a=t=>e.touch(i(t)):Oi(n)?(l=new zl(null,n,o,!1),a=t=>{l.evaluate(t);const n=i(t),o=l.value;Tl(o)?e.pulse(n,o,r):e.update(n,o,s)}):a=t=>e.update(i(t),n,s),t.apply(a)}function ql(e,t,i,n,o,r){if(void 0===n)t.targets().add(i);else{const s=r||{},a=new zl(null,function(e,t){return t=Oi(t)?t:Vi(t),e?function(i,n){const o=t(i,n);return e.skip()||(e.skip(o!==this.value).value=o),o}:t}(i,n),o,!1);a.modified(s.force),a.rank=t.rank,t.targets().add(a),i&&(a.skip(!0),a.value=i.value,a.targets().add(i),e.connect(i,[a]))}}const Kl={};function Gl(e,t,i){this.dataflow=e,this.stamp=null==t?-1:t,this.add=[],this.rem=[],this.mod=[],this.fields=null,this.encode=i||null}function Yl(e,t){const i=[];return yn(e,t,(e=>i.push(e))),i}function Zl(e,t){const i={};return e.visit(t,(e=>{i[Dl(e)]=1})),e=>i[Dl(e)]?null:e}function Xl(e,t){return e?(i,n)=>e(i,n)&&t(i,n):t}function Ql(e,t,i,n){const o=this,r=i.length;let s=0;this.dataflow=e,this.stamp=t,this.fields=null,this.encode=n||null,this.pulses=i;for(let e=0;et[e]=!0)):t[e]=!0,this},modified(e,t){const i=this.fields;return!(!t&&!this.mod.length||!i)&&(arguments.length?li(e)?e.some((e=>i[e])):i[e]:!!i)},filter(e,t){const i=this;return 1&e&&(i.addF=Xl(i.addF,t)),2&e&&(i.remF=Xl(i.remF,t)),4&e&&(i.modF=Xl(i.modF,t)),16&e&&(i.srcF=Xl(i.srcF,t)),i},materialize(e){const t=this;return 1&(e=e||7)&&t.addF&&(t.add=Yl(t.add,t.addF),t.addF=null),2&e&&t.remF&&(t.rem=Yl(t.rem,t.remF),t.remF=null),4&e&&t.modF&&(t.mod=Yl(t.mod,t.modF),t.modF=null),16&e&&t.srcF&&(t.source=t.source.filter(t.srcF),t.srcF=null),t},visit(e,t){const i=this,n=t;if(16&e)return yn(i.source,i.srcF,n),i;1&e&&yn(i.add,i.addF,n),2&e&&yn(i.rem,i.remF,n),4&e&&yn(i.mod,i.modF,n);const o=i.source;if(8&e&&o){const e=i.add.length+i.mod.length;e===o.length||yn(o,e?Zl(i,5):i.srcF,n)}return i}},Xi(Ql,Gl,{fork(e){const t=new Gl(this.dataflow).init(this,e&this.NO_FIELDS);return void 0!==e&&(e&t.ADD&&this.visit(t.ADD,(e=>t.add.push(e))),e&t.REM&&this.visit(t.REM,(e=>t.rem.push(e))),e&t.MOD&&this.visit(t.MOD,(e=>t.mod.push(e)))),t},changed(e){return this.changes&e},modified(e){const t=this,i=t.fields;return i&&t.changes&t.MOD?li(e)?e.some((e=>i[e])):i[e]:0},filter(){qt("MultiPulse does not support filtering.")},materialize(){qt("MultiPulse does not support materialization.")},visit(e,t){const i=this,n=i.pulses,o=n.length;let r=0;if(e&i.SOURCE)for(;rt&&(r=i-1>>1,o=e[r],n(s,o)<0);)e[i]=o,i=r;return e[i]=s}function ic(){this.logger(ai()),this.logLevel(ni),this._clock=0,this._rank=0,this._locale=_l();try{this._loader=yl()}catch(e){}this._touched=wl(Yt),this._input={},this._pulse=null,this._heap=function(e){let t=[];return{clear:()=>t=[],size:()=>t.length,peek:()=>t[0],push:i=>(t.push(i),tc(t,0,t.length-1,e)),pop:()=>{const i=t.pop();let n;return t.length?(n=t[0],t[0]=i,function(e,t,i){const n=t,o=e.length,r=e[t];let s,a=1+(t<<1);for(;a=0&&(a=s),e[t]=e[a],a=1+((t=a)<<1);e[t]=r,tc(e,n,t,i)}(t,0,e)):n=i,n}}}(((e,t)=>e.qrank-t.qrank)),this._postrun=[]}function nc(e){return function(){return this._log[e].apply(this,arguments)}}function oc(e,t){zl.call(this,e,null,t)}ic.prototype={stamp(){return this._clock},loader(e){return arguments.length?(this._loader=e,this):this._loader},locale(e){return arguments.length?(this._locale=e,this):this._locale},logger(e){return arguments.length?(this._log=e,this):this._log},error:nc("error"),warn:nc("warn"),info:nc("info"),debug:nc("debug"),logLevel:nc("level"),cleanThreshold:1e4,add:function(e,t,i,n){let o,r=1;return e instanceof zl?o=e:e&&e.prototype instanceof zl?o=new e:Oi(e)?o=new zl(null,e):(r=0,o=new zl(e,t)),this.rank(o),r&&(n=i,i=t),i&&this.connect(o,o.parameters(i,n)),this.touch(o),o},connect:function(e,t){const i=e.rank,n=t.length;for(let o=0;o=0;)t.push(i=n[o]),i===e&&qt("Cycle detected in dataflow graph.")},pulse:function(e,t,i){this.touch(e,i||ec);const n=new Gl(this,this._clock+(this._pulse?0:1)),o=e.pulse&&e.pulse.source||[];return n.target=e,this._input[e.id]=t.pulse(n,o),this},touch:function(e,t){const i=t||ec;return this._pulse?this._enqueue(e):this._touched.add(e),i.skip&&e.skip(!0),this},update:function(e,t,i){const n=i||ec;return(e.set(t)||n.force)&&this.touch(e,n),this},changeset:Rl,ingest:function(e,t,i){return t=this.parse(t,i),this.pulse(e,this.changeset().insert(t))},parse:function(e,t){const i=this.locale();return bl(e,t,i.timeParse,i.utcParse)},preload:async function(e,t,i){const n=this,o=n._pending||function(e){let t;const i=new Promise((e=>t=e));return i.requests=0,i.done=()=>{0==--i.requests&&(e._pending=null,t(e))},e._pending=i}(n);o.requests+=1;const r=await n.request(t,i);return n.pulse(e,n.changeset().remove(Jt).insert(r.data||[])),o.done(),r},request:async function(e,t){const i=this;let n,o=0;try{n=await i.loader().load(e,{context:"dataflow",response:oo(t&&t.type)});try{n=i.parse(n,t)}catch(t){o=-2,i.warn("Data ingestion failed",e,t)}}catch(t){o=-1,i.warn("Loading failed",e,t)}return{data:n,status:o}},events:function(e,t,i,n){const o=this,r=$l(i,n),s=function(e){e.dataflow=o;try{r.receive(e)}catch(e){o.error(e)}finally{o.run()}};let a;a="string"==typeof e&&"undefined"!=typeof document?document.querySelectorAll(e):Ti(e);const l=a.length;for(let e=0;en._enqueue(e,!0))),n._touched=wl(Yt);let s,a,l,c=0;try{for(;n._heap.size()>0;)s=n._heap.pop(),s.rank===s.qrank?(a=s.run(n._getPulse(s,e)),a.then?a=await a:a.async&&(o.push(a.async),a=Kl),a!==Kl&&s._targets&&s._targets.forEach((e=>n._enqueue(e))),++c):n._enqueue(s,!0)}catch(e){n._heap.clear(),l=e}if(n._input={},n._pulse=null,n.debug(`Pulse ${r}: ${c} operators`),l&&(n._postrun=[],n.error(l)),n._postrun.length){const e=n._postrun.sort(((e,t)=>t.priority-e.priority));n._postrun=[];for(let t=0;tn.runAsync(null,(()=>{e.forEach((e=>{try{e(n)}catch(e){n.error(e)}}))})))),n},run:function(e,t,i){return this._pulse?Jl(this):(this.evaluate(e,t,i),this)},runAsync:async function(e,t,i){for(;this._running;)await this._running;const n=()=>this._running=null;return(this._running=this.evaluate(e,t,i)).then(n,n),this._running},runAfter:function(e,t,i){if(this._pulse||t)this._postrun.push({priority:i||0,callback:e});else try{e(this)}catch(e){this.error(e)}},_enqueue:function(e,t){const i=e.stampe.pulse)),t):this._input[e.id]||function(e,t){return t&&t.stamp===e.stamp?t:(e=e.fork(),t&&t!==Kl&&(e.source=t.source),e)}(this._pulse,i&&i.pulse)}},Xi(oc,zl,{run(e){if(e.stampthis.pulse=e)):t!==e.StopPropagation&&(this.pulse=t),t},evaluate(e){const t=this.marshall(e.stamp),i=this.transform(t,e);return t.clear(),i},transform(){}});const rc={};function sc(e){const t=ac(e);return t&&t.Definition||null}function ac(e){return e=e&&e.toLowerCase(),Ki(rc,e)?rc[e]:null}function lc(e,t){let i;if(void 0===t)for(const t of e)null!=t&&(i=t)&&(i=t);else{let n=-1;for(let o of e)null!=(o=t(o,++n,e))&&(i=o)&&(i=o)}return i}function cc(e,t){let i;if(void 0===t)for(const t of e)null!=t&&(i>t||void 0===i&&t>=t)&&(i=t);else{let n=-1;for(let o of e)null!=(o=t(o,++n,e))&&(i>o||void 0===i&&o>=o)&&(i=o)}return i}function uc(e,t,i=0,n=e.length-1,o=kr){for(;n>i;){if(n-i>600){const r=n-i+1,s=t-i+1,a=Math.log(r),l=.5*Math.exp(2*a/3),c=.5*Math.sqrt(a*l*(r-l)/r)*(s-r/2<0?-1:1);uc(e,t,Math.max(i,Math.floor(t-s*l/r+c)),Math.min(n,Math.floor(t+(r-s)*l/r+c)),o)}const r=e[t];let s=i,a=n;for(hc(e,i,t),o(e[n],r)>0&&hc(e,i,n);s0;)--a}0===o(e[i],r)?hc(e,i,a):(++a,hc(e,a,n)),a<=t&&(i=a+1),t<=a&&(n=a-1)}return e}function hc(e,t,i){const n=e[t];e[t]=e[i],e[i]=n}function dc(e){return null===e?NaN:+e}function gc(e,t,i){if(n=(e=Float64Array.from(function*(e,t){if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(yield t);else{let i=-1;for(let n of e)null!=(n=t(n,++i,e))&&(n=+n)>=n&&(yield n)}}(e,i))).length){if((t=+t)<=0||n<2)return cc(e);if(t>=1)return lc(e);var n,o=(n-1)*t,r=Math.floor(o),s=lc(uc(e,r).subarray(0,r+1));return s+(cc(e.subarray(r+1))-s)*(o-r)}}function fc(e,t,i=dc){if(n=e.length){if((t=+t)<=0||n<2)return+i(e[0],0,e);if(t>=1)return+i(e[n-1],n-1,e);var n,o=(n-1)*t,r=Math.floor(o),s=+i(e[r],r,e);return s+(+i(e[r+1],r+1,e)-s)*(o-r)}}function pc(e,t){return gc(e,.5,t)}function*mc(e,t){if(null==t)for(let t of e)null!=t&&""!==t&&(t=+t)>=t&&(yield t);else{let i=-1;for(let n of e)n=t(n,++i,e),null!=n&&""!==n&&(n=+n)>=n&&(yield n)}}function _c(e,t,i){const n=Float64Array.from(mc(e,i));return n.sort(kr),t.map((e=>fc(n,e)))}function vc(e,t){return _c(e,[.25,.5,.75],t)}function bc(e,t){const i=e.length,n=function(e,t){const i=function(e,t){let i,n=0,o=0,r=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(i=t-o,o+=i/++n,r+=i*(t-o));else{let s=-1;for(let a of e)null!=(a=t(a,++s,e))&&(a=+a)>=a&&(i=a-o,o+=i/++n,r+=i*(a-o))}if(n>1)return r/(n-1)}(e,t);return i?Math.sqrt(i):i}(e,t),o=vc(e,t),r=(o[2]-o[0])/1.34;return 1.06*(Math.min(n,r)||n||Math.abs(o[0])||1)*Math.pow(i,-.2)}function yc(e){const t=e.maxbins||20,i=e.base||10,n=Math.log(i),o=e.divide||[5,2];let r,s,a,l,c,u,h=e.extent[0],d=e.extent[1];const g=e.span||d-h||Math.abs(h)||1;if(e.step)r=e.step;else if(e.steps){for(l=g/t,c=0,u=e.steps.length;ct;)r*=i;for(c=0,u=o.length;c=a&&g/l<=t&&(r=l)}l=Math.log(r);const f=l>=0?0:1+~~(-l/n),p=Math.pow(i,-f-1);return(e.nice||void 0===e.nice)&&(l=Math.floor(h/r+p)*r,h=he);const o=e.length,r=new Float64Array(o);let s,a=0,l=1,c=n(e[0]),u=c,h=c+t;for(;l=h){for(u=(c+u)/2;a>1);os;)e[o--]=e[r]}r=s,s=n}return e}(r,t+t/4):r}function kc(e){return function(){return(e=(1103515245*e+12345)%2147483647)/2147483647}}function Dc(e,t){let i,n,o;null==t&&(t=e,e=0);const r={min(e){return arguments.length?(i=e||0,o=n-i,r):i},max(e){return arguments.length?(n=e||0,o=n-i,r):n},sample:()=>i+Math.floor(o*wc()),pdf:e=>e===Math.floor(e)&&e>=i&&e=n?1:(t-i+1)/o},icdf:e=>e>=0&&e<=1?i-1+Math.floor(e*o):NaN};return r.min(e).max(t)}const Lc=Math.sqrt(2*Math.PI),Nc=Math.SQRT2;let Ec=NaN;function Ac(e,t){e=e||0,t=null==t?1:t;let i,n,o=0,r=0;if(Ec==Ec)o=Ec,Ec=NaN;else{do{o=2*wc()-1,r=2*wc()-1,i=o*o+r*r}while(0===i||i>1);n=Math.sqrt(-2*Math.log(i)/i),o*=n,Ec=r*n}return e+o*t}function Mc(e,t,i){const n=(e-(t||0))/(i=null==i?1:i);return Math.exp(-.5*n*n)/(i*Lc)}function Ic(e,t,i){const n=(e-(t=t||0))/(i=null==i?1:i),o=Math.abs(n);let r;if(o>37)r=0;else{const e=Math.exp(-o*o/2);let t;o<7.07106781186547?(t=.0352624965998911*o+.700383064443688,t=t*o+6.37396220353165,t=t*o+33.912866078383,t=t*o+112.079291497871,t=t*o+221.213596169931,t=t*o+220.206867912376,r=e*t,t=.0883883476483184*o+1.75566716318264,t=t*o+16.064177579207,t=t*o+86.7807322029461,t=t*o+296.564248779674,t=t*o+637.333633378831,t=t*o+793.826512519948,t=t*o+440.413735824752,r/=t):(t=o+.65,t=o+4/t,t=o+3/t,t=o+2/t,t=o+1/t,r=e/t/2.506628274631)}return n>0?1-r:r}function Tc(e,t,i){return e<0||e>1?NaN:(t||0)+(null==i?1:i)*Nc*function(e){let t,i=-Math.log((1-e)*(1+e));return i<6.25?(i-=3.125,t=-364441206401782e-35,t=t*i-16850591381820166e-35,t=128584807152564e-32+t*i,t=11157877678025181e-33+t*i,t=t*i-1333171662854621e-31,t=20972767875968562e-33+t*i,t=6637638134358324e-30+t*i,t=t*i-4054566272975207e-29,t=t*i-8151934197605472e-29,t=26335093153082323e-28+t*i,t=t*i-12975133253453532e-27,t=t*i-5415412054294628e-26,t=1.0512122733215323e-9+t*i,t=t*i-4.112633980346984e-9,t=t*i-2.9070369957882005e-8,t=4.2347877827932404e-7+t*i,t=t*i-13654692000834679e-22,t=t*i-13882523362786469e-21,t=.00018673420803405714+t*i,t=t*i-.000740702534166267,t=t*i-.006033670871430149,t=.24015818242558962+t*i,t=1.6536545626831027+t*i):i<16?(i=Math.sqrt(i)-3.25,t=2.2137376921775787e-9,t=9.075656193888539e-8+t*i,t=t*i-2.7517406297064545e-7,t=1.8239629214389228e-8+t*i,t=15027403968909828e-22+t*i,t=t*i-4013867526981546e-21,t=29234449089955446e-22+t*i,t=12475304481671779e-21+t*i,t=t*i-47318229009055734e-21,t=6828485145957318e-20+t*i,t=24031110387097894e-21+t*i,t=t*i-.0003550375203628475,t=.0009532893797373805+t*i,t=t*i-.0016882755560235047,t=.002491442096107851+t*i,t=t*i-.003751208507569241,t=.005370914553590064+t*i,t=1.0052589676941592+t*i,t=3.0838856104922208+t*i):Number.isFinite(i)?(i=Math.sqrt(i)-5,t=-27109920616438573e-27,t=t*i-2.555641816996525e-10,t=1.5076572693500548e-9+t*i,t=t*i-3.789465440126737e-9,t=7.61570120807834e-9+t*i,t=t*i-1.496002662714924e-8,t=2.914795345090108e-8+t*i,t=t*i-6.771199775845234e-8,t=2.2900482228026655e-7+t*i,t=t*i-9.9298272942317e-7,t=4526062597223154e-21+t*i,t=t*i-1968177810553167e-20,t=7599527703001776e-20+t*i,t=t*i-.00021503011930044477,t=t*i-.00013871931833623122,t=1.0103004648645344+t*i,t=4.849906401408584+t*i):t=1/0,t*e}(2*e-1)}function Rc(e,t){let i,n;const o={mean(e){return arguments.length?(i=e||0,o):i},stdev(e){return arguments.length?(n=null==e?1:e,o):n},sample:()=>Ac(i,n),pdf:e=>Mc(e,i,n),cdf:e=>Ic(e,i,n),icdf:e=>Tc(e,i,n)};return o.mean(e).stdev(t)}function Oc(e,t){const i=Rc();let n=0;const o={data(i){return arguments.length?(e=i,n=i?i.length:0,o.bandwidth(t)):e},bandwidth(i){return arguments.length?(!(t=i)&&e&&(t=bc(e)),o):t},sample:()=>e[~~(wc()*n)]+t*i.sample(),pdf(o){let r=0,s=0;for(;sFc(i,n),pdf:e=>Pc(e,i,n),cdf:e=>Bc(e,i,n),icdf:e=>zc(e,i,n)};return o.mean(e).stdev(t)}function Vc(e,t){let i,n=0;const o={weights(e){return arguments.length?(i=function(e){const t=[];let i,o=0;for(i=0;i=t&&e<=i?1/(i-t):0}function Uc(e,t,i){return null==i&&(i=null==t?1:t,t=0),ei?1:(e-t)/(i-t)}function jc(e,t,i){return null==i&&(i=null==t?1:t,t=0),e>=0&&e<=1?t+e*(i-t):NaN}function qc(e,t){let i,n;const o={min(e){return arguments.length?(i=e||0,o):i},max(e){return arguments.length?(n=null==e?1:e,o):n},sample:()=>Hc(i,n),pdf:e=>$c(e,i,n),cdf:e=>Uc(e,i,n),icdf:e=>jc(e,i,n)};return null==t&&(t=null==e?1:e,e=0),o.min(e).max(t)}function Kc(e,t,i,n){const o=n-e*e,r=Math.abs(o)<1e-24?0:(i-e*t)/o;return[t-r*e,r]}function Gc(e,t,i,n){e=e.filter((e=>{let n=t(e),o=i(e);return null!=n&&(n=+n)>=n&&null!=o&&(o=+o)>=o})),n&&e.sort(((e,i)=>t(e)-t(i)));const o=e.length,r=new Float64Array(o),s=new Float64Array(o);let a,l,c,u=0,h=0,d=0;for(c of e)r[u]=a=+t(c),s[u]=l=+i(c),++u,h+=(a-h)/u,d+=(l-d)/u;for(u=0;u=o&&null!=r&&(r=+r)>=r&&n(o,r,++s)}function Zc(e,t,i,n,o){let r=0,s=0;return Yc(e,t,i,((e,t)=>{const i=t-o(e),a=t-n;r+=i*i,s+=a*a})),1-r/s}function Xc(e,t,i){let n=0,o=0,r=0,s=0,a=0;Yc(e,t,i,((e,t)=>{++a,n+=(e-n)/a,o+=(t-o)/a,r+=(e*t-r)/a,s+=(e*e-s)/a}));const l=Kc(n,o,r,s),c=e=>l[0]+l[1]*e;return{coef:l,predict:c,rSquared:Zc(e,t,i,o,c)}}function Qc(e,t,i){let n=0,o=0,r=0,s=0,a=0;Yc(e,t,i,((e,t)=>{++a,e=Math.log(e),n+=(e-n)/a,o+=(t-o)/a,r+=(e*t-r)/a,s+=(e*e-s)/a}));const l=Kc(n,o,r,s),c=e=>l[0]+l[1]*Math.log(e);return{coef:l,predict:c,rSquared:Zc(e,t,i,o,c)}}function Jc(e,t,i){const[n,o,r,s]=Gc(e,t,i);let a,l,c,u=0,h=0,d=0,g=0,f=0;Yc(e,t,i,((e,t)=>{a=n[f++],l=Math.log(t),c=a*t,u+=(t*l-u)/f,h+=(c-h)/f,d+=(c*l-d)/f,g+=(a*c-g)/f}));const[p,m]=Kc(h/s,u/s,d/s,g/s),_=e=>Math.exp(p+m*(e-r));return{coef:[Math.exp(p-m*r),m],predict:_,rSquared:Zc(e,t,i,s,_)}}function eu(e,t,i){let n=0,o=0,r=0,s=0,a=0,l=0;Yc(e,t,i,((e,t)=>{const i=Math.log(e),c=Math.log(t);++l,n+=(i-n)/l,o+=(c-o)/l,r+=(i*c-r)/l,s+=(i*i-s)/l,a+=(t-a)/l}));const c=Kc(n,o,r,s),u=e=>c[0]*Math.pow(e,c[1]);return c[0]=Math.exp(c[0]),{coef:c,predict:u,rSquared:Zc(e,t,i,a,u)}}function tu(e,t,i){const[n,o,r,s]=Gc(e,t,i),a=n.length;let l,c,u,h,d=0,g=0,f=0,p=0,m=0;for(l=0;lb*(e-=r)*e+y*e+w+s;return{coef:[w-y*r+b*r*r+s,y-2*b*r,b],predict:C,rSquared:Zc(e,t,i,s,C)}}function iu(e,t,i,n){if(1===n)return Xc(e,t,i);if(2===n)return tu(e,t,i);const[o,r,s,a]=Gc(e,t,i),l=o.length,c=[],u=[],h=n+1;let d,g,f,p,m;for(d=0;dMath.abs(e[n][s])&&(s=o);for(r=n;r=n;r--)e[r][o]-=e[r][n]*e[n][o]/e[n][n]}for(o=t-1;o>=0;--o){for(a=0,r=o+1;r{e-=s;let t=a+_[0]+_[1]*e+_[2]*e*e;for(d=3;d=0;--r)for(a=t[r],l=1,o[r]+=a,s=1;s<=r;++s)l*=(r+1-s)/s,o[r-s]+=a*Math.pow(i,s)*l;return o[0]+=n,o}function ou(e,t,i,n){const[o,r,s,a]=Gc(e,t,i,!0),l=o.length,c=Math.max(2,~~(n*l)),u=new Float64Array(l),h=new Float64Array(l),d=new Float64Array(l).fill(1);for(let e=-1;++e<=2;){const t=[0,c-1];for(let e=0;eo[s]-i?n:s;let l=0,c=0,g=0,f=0,p=0;const m=1/Math.abs(o[a]-i||1);for(let e=n;e<=s;++e){const t=o[e],n=r[e],s=ru(Math.abs(i-t)*m)*d[e],a=t*s;l+=s,c+=a,g+=n*s,f+=n*a,p+=t*a}const[_,v]=Kc(c/l,g/l,f/l,p/l);u[e]=_+v*i,h[e]=Math.abs(r[e]-u[e]),su(o,e+1,t)}if(2===e)break;const i=pc(h);if(Math.abs(i)<1e-12)break;for(let e,t,n=0;n=1?1e-12:(t=1-e*e)*t}return function(e,t,i,n){const o=e.length,r=[];let s,a=0,l=0,c=[];for(;a=e.length))for(;t>o&&e[r]-n<=n-e[o];)i[0]=++o,i[1]=r,++r}const au=.1*Math.PI/180;function lu(e,t,i,n){i=i||25,n=Math.max(i,n||200);const o=t=>[t,e(t)],r=t[0],s=t[1],a=s-r,l=a/n,c=[o(r)],u=[];if(i===n){for(let e=1;e0;)u.push(o(r+e/i*a));let h=c[0],d=u[u.length-1];for(;d;){const e=o((h[0]+d[0])/2);e[0]-h[0]>=l&&cu(h,e,d)>au?u.push(e):(h=d,c.push(d),u.pop()),d=u[u.length-1]}return c}function cu(e,t,i){const n=Math.atan2(i[1]-e[1],i[0]-e[0]),o=Math.atan2(t[1]-e[1],t[0]-e[0]);return Math.abs(n-o)}function uu(e,t,i){e=+e,t=+t,i=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+i;for(var n=-1,o=0|Math.max(0,Math.ceil((t-e)/i)),r=new Array(o);++n{const i=t.length;let n=1,o=String(t[0](e));for(;n{},fu={init:gu,add:gu,rem:gu,idx:0},pu={values:{init:e=>e.cell.store=!0,value:e=>e.cell.data.values(),idx:-1},count:{value:e=>e.cell.num},__count__:{value:e=>e.missing+e.valid},missing:{value:e=>e.missing},valid:{value:e=>e.valid},sum:{init:e=>e.sum=0,value:e=>e.sum,add:(e,t)=>e.sum+=+t,rem:(e,t)=>e.sum-=t},product:{init:e=>e.product=1,value:e=>e.valid?e.product:void 0,add:(e,t)=>e.product*=t,rem:(e,t)=>e.product/=t},mean:{init:e=>e.mean=0,value:e=>e.valid?e.mean:void 0,add:(e,t)=>(e.mean_d=t-e.mean,e.mean+=e.mean_d/e.valid),rem:(e,t)=>(e.mean_d=t-e.mean,e.mean-=e.valid?e.mean_d/e.valid:e.mean)},average:{value:e=>e.valid?e.mean:void 0,req:["mean"],idx:1},variance:{init:e=>e.dev=0,value:e=>e.valid>1?e.dev/(e.valid-1):void 0,add:(e,t)=>e.dev+=e.mean_d*(t-e.mean),rem:(e,t)=>e.dev-=e.mean_d*(t-e.mean),req:["mean"],idx:1},variancep:{value:e=>e.valid>1?e.dev/e.valid:void 0,req:["variance"],idx:2},stdev:{value:e=>e.valid>1?Math.sqrt(e.dev/(e.valid-1)):void 0,req:["variance"],idx:2},stdevp:{value:e=>e.valid>1?Math.sqrt(e.dev/e.valid):void 0,req:["variance"],idx:2},stderr:{value:e=>e.valid>1?Math.sqrt(e.dev/(e.valid*(e.valid-1))):void 0,req:["variance"],idx:2},distinct:{value:e=>e.cell.data.distinct(e.get),req:["values"],idx:3},ci0:{value:e=>e.cell.data.ci0(e.get),req:["values"],idx:3},ci1:{value:e=>e.cell.data.ci1(e.get),req:["values"],idx:3},median:{value:e=>e.cell.data.q2(e.get),req:["values"],idx:3},q1:{value:e=>e.cell.data.q1(e.get),req:["values"],idx:3},q3:{value:e=>e.cell.data.q3(e.get),req:["values"],idx:3},min:{init:e=>e.min=void 0,value:e=>e.min=Number.isNaN(e.min)?e.cell.data.min(e.get):e.min,add:(e,t)=>{(t{t<=e.min&&(e.min=NaN)},req:["values"],idx:4},max:{init:e=>e.max=void 0,value:e=>e.max=Number.isNaN(e.max)?e.cell.data.max(e.get):e.max,add:(e,t)=>{(t>e.max||void 0===e.max)&&(e.max=t)},rem:(e,t)=>{t>=e.max&&(e.max=NaN)},req:["values"],idx:4},argmin:{init:e=>e.argmin=void 0,value:e=>e.argmin||e.cell.data.argmin(e.get),add:(e,t,i)=>{t{t<=e.min&&(e.argmin=void 0)},req:["min","values"],idx:3},argmax:{init:e=>e.argmax=void 0,value:e=>e.argmax||e.cell.data.argmax(e.get),add:(e,t,i)=>{t>e.max&&(e.argmax=i)},rem:(e,t)=>{t>=e.max&&(e.argmax=void 0)},req:["max","values"],idx:3}},mu=Object.keys(pu);function _u(e,t){return pu[e](t)}function vu(e,t){return e.idx-t.idx}function bu(){this.valid=0,this.missing=0,this._ops.forEach((e=>e.init(this)))}function yu(e,t){null!=e&&""!==e?e==e&&(++this.valid,this._ops.forEach((i=>i.add(this,e,t)))):++this.missing}function wu(e,t){null!=e&&""!==e?e==e&&(--this.valid,this._ops.forEach((i=>i.rem(this,e,t)))):--this.missing}function Cu(e){return this._out.forEach((t=>e[t.out]=t.value(this))),e}function Su(e,t){const i=t||Zt,n=function(e){const t={};e.forEach((e=>t[e.name]=e));const i=e=>{e.req&&e.req.forEach((e=>{t[e]||i(t[e]=pu[e]())}))};return e.forEach(i),Object.values(t).sort(vu)}(e),o=e.slice().sort(vu);function r(e){this._ops=n,this._out=o,this.cell=e,this.init()}return r.prototype.init=bu,r.prototype.add=yu,r.prototype.rem=wu,r.prototype.set=Cu,r.prototype.get=i,r.fields=e.map((e=>e.out)),r}function xu(e){this._key=e?Gt(e):Dl,this.reset()}mu.forEach((e=>{pu[e]=function(e,t){return i=>$i({name:e,out:i||e},fu,t)}(e,pu[e])}));const ku=xu.prototype;function Du(e){oc.call(this,null,e),this._adds=[],this._mods=[],this._alen=0,this._mlen=0,this._drop=!0,this._cross=!1,this._dims=[],this._dnames=[],this._measures=[],this._countOnly=!1,this._counts=null,this._prev=null,this._inputs=null,this._outputs=null}function Lu(e){oc.call(this,null,e)}function Nu(e,t,i){const n=e;let o=t||[],r=i||[],s={},a=0;return{add:e=>r.push(e),remove:e=>s[n(e)]=++a,size:()=>o.length,data:(e,t)=>(a&&(o=o.filter((e=>!s[n(e)])),s={},a=0),t&&e&&o.sort(e),r.length&&(o=e?cn(e,o,r.sort(e)):o.concat(r),r=[]),o)}}function Eu(e){oc.call(this,[],e)}function Au(e){zl.call(this,null,Mu,e)}function Mu(e){return this.value&&!e.modified()?this.value:Fi(e.fields,e.orders)}function Iu(e){oc.call(this,null,e)}function Tu(e){oc.call(this,null,e)}ku.reset=function(){this._add=[],this._rem=[],this._ext=null,this._get=null,this._q=null},ku.add=function(e){this._add.push(e)},ku.rem=function(e){this._rem.push(e)},ku.values=function(){if(this._get=null,0===this._rem.length)return this._add;const e=this._add,t=this._rem,i=this._key,n=e.length,o=t.length,r=Array(n-o),s={};let a,l,c;for(a=0;a=0;)n=e(t[o])+"",Ki(i,n)||(i[n]=1,++r);return r},ku.extent=function(e){if(this._get!==e||!this._ext){const t=this.values(),i=ji(t,e);this._ext=[t[i[0]],t[i[1]]],this._get=e}return this._ext},ku.argmin=function(e){return this.extent(e)[0]||{}},ku.argmax=function(e){return this.extent(e)[1]||{}},ku.min=function(e){const t=this.extent(e)[0];return null!=t?e(t):void 0},ku.max=function(e){const t=this.extent(e)[1];return null!=t?e(t):void 0},ku.quartile=function(e){return this._get===e&&this._q||(this._q=vc(this.values(),e),this._get=e),this._q},ku.q1=function(e){return this.quartile(e)[0]},ku.q2=function(e){return this.quartile(e)[1]},ku.q3=function(e){return this.quartile(e)[2]},ku.ci=function(e){return this._get===e&&this._ci||(this._ci=Sc(this.values(),1e3,.05,e),this._get=e),this._ci},ku.ci0=function(e){return this.ci(e)[0]},ku.ci1=function(e){return this.ci(e)[1]},Du.Definition={type:"Aggregate",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"ops",type:"enum",array:!0,values:mu},{name:"fields",type:"field",null:!0,array:!0},{name:"as",type:"string",null:!0,array:!0},{name:"drop",type:"boolean",default:!0},{name:"cross",type:"boolean",default:!1},{name:"key",type:"field"}]},Xi(Du,oc,{transform(e,t){const i=this,n=t.fork(t.NO_SOURCE|t.NO_FIELDS),o=e.modified();return i.stamp=n.stamp,i.value&&(o||t.modified(i._inputs,!0))?(i._prev=i.value,i.value=o?i.init(e):{},t.visit(t.SOURCE,(e=>i.add(e)))):(i.value=i.value||i.init(e),t.visit(t.REM,(e=>i.rem(e))),t.visit(t.ADD,(e=>i.add(e)))),n.modifies(i._outputs),i._drop=!1!==e.drop,e.cross&&i._dims.length>1&&(i._drop=!1,i.cross()),t.clean()&&i._drop&&n.clean(!0).runAfter((()=>this.clean())),i.changes(n)},cross(){const e=this,t=e.value,i=e._dnames,n=i.map((()=>({}))),o=i.length;function r(e){let t,r,s,a;for(t in e)for(s=e[t].tuple,r=0;r{const t=Vt(e);return o(e),i.push(t),t})),this.cellkey=e.key?e.key:hu(this._dims),this._countOnly=!0,this._counts=[],this._measures=[];const r=e.fields||[null],s=e.ops||["count"],a=e.as||[],l=r.length,c={};let u,h,d,g,f,p;for(l!==s.length&&qt("Unmatched number of fields and aggregate ops."),p=0;pSu(e,e.field))),{}},cellkey:hu(),cell(e,t){let i=this.value[e];return i?0===i.num&&this._drop&&i.stamp{const t=n(e);e[a]=t,e[l]=null==t?null:o+r*(1+(t-o)/r)}:e=>e[a]=n(e)),t.modifies(i?s:a)},_bins(e){if(this.value&&!e.modified())return this.value;const t=e.field,i=yc(e),n=i.step;let o,r,s=i.start,a=s+Math.ceil((i.stop-s)/n)*n;null!=(o=e.anchor)&&(r=o-(s+n*Math.floor((o-s)/n)),s+=r,a+=r);const l=function(e){let i=pi(t(e));return null==i?null:ia?1/0:(i=Math.max(s,Math.min(i,a-n)),s+n*Math.floor(1e-14+(i-s)/n))};return l.start=s,l.stop=i.stop,l.step=n,this.value=Wt(l,Ht(t),e.name||"bin_"+Vt(t))}}),Eu.Definition={type:"Collect",metadata:{source:!0},params:[{name:"sort",type:"compare"}]},Xi(Eu,oc,{transform(e,t){const i=t.fork(t.ALL),n=Nu(Dl,this.value,i.materialize(i.ADD).add),o=e.sort,r=t.changed()||o&&(e.modified("sort")||t.modified(o.fields));return i.visit(i.REM,n.remove),this.modified(r),this.value=i.source=n.data(Il(o),r),t.source&&t.source.root&&(this.value.root=t.source.root),i}}),Xi(Au,zl),Iu.Definition={type:"CountPattern",metadata:{generates:!0,changes:!0},params:[{name:"field",type:"field",required:!0},{name:"case",type:"enum",values:["upper","lower","mixed"],default:"mixed"},{name:"pattern",type:"string",default:'[\\w"]+'},{name:"stopwords",type:"string",default:""},{name:"as",type:"string",array:!0,length:2,default:["text","count"]}]},Xi(Iu,oc,{transform(e,t){const i=t=>i=>{for(var n,o=function(e,t,i){switch(t){case"upper":e=e.toUpperCase();break;case"lower":e=e.toLowerCase()}return e.match(i)}(a(i),e.case,r)||[],l=0,c=o.length;lo[e]=1+(o[e]||0))),u=i((e=>o[e]-=1));return n?t.visit(t.SOURCE,c):(t.visit(t.ADD,c),t.visit(t.REM,u)),this._finish(t,l)},_parameterCheck(e,t){let i=!1;return!e.modified("stopwords")&&this._stop||(this._stop=new RegExp("^"+(e.stopwords||"")+"$","i"),i=!0),!e.modified("pattern")&&this._match||(this._match=new RegExp(e.pattern||"[\\w']+","g"),i=!0),(e.modified("field")||t.modified(e.field.fields))&&(i=!0),i&&(this._counts={}),i},_finish(e,t){const i=this._counts,n=this._tuples||(this._tuples={}),o=t[0],r=t[1],s=e.fork(e.NO_SOURCE|e.NO_FIELDS);let a,l,c;for(a in i)l=n[a],c=i[a]||0,!l&&c?(n[a]=l=Nl({}),l[o]=a,l[r]=c,s.add.push(l)):0===c?(l&&s.rem.push(l),i[a]=null,n[a]=null):l[r]!==c&&(l[r]=c,s.mod.push(l));return s.modifies(t)}}),Tu.Definition={type:"Cross",metadata:{generates:!0},params:[{name:"filter",type:"expr"},{name:"as",type:"string",array:!0,length:2,default:["a","b"]}]},Xi(Tu,oc,{transform(e,t){const i=t.fork(t.NO_SOURCE),n=e.as||["a","b"],o=n[0],r=n[1],s=!this.value||t.changed(t.ADD_REM)||e.modified("as")||e.modified("filter");let a=this.value;return s?(a&&(i.rem=a),a=t.materialize(t.SOURCE).source,i.add=this.value=function(e,t,i,n){for(var o,r,s=[],a={},l=e.length,c=0;cOu(e,t)))):"function"==typeof n[i]&&n[i](e[i]);return n}function Fu(e){oc.call(this,null,e)}const Pu=[{key:{function:"normal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"lognormal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"uniform"},params:[{name:"min",type:"number",default:0},{name:"max",type:"number",default:1}]},{key:{function:"kde"},params:[{name:"field",type:"field",required:!0},{name:"from",type:"data"},{name:"bandwidth",type:"number",default:0}]}],Bu={key:{function:"mixture"},params:[{name:"distributions",type:"param",array:!0,params:Pu},{name:"weights",type:"number",array:!0}]};function zu(e,t){return e?e.map(((e,i)=>t[i]||Vt(e))):null}function Wu(e,t,i){const n=[],o=e=>e(l);let r,s,a,l,c,u;if(null==t)n.push(e.map(i));else for(r={},s=0,a=e.length;st(i,e)),Ht(t),Vt(t))}function Uu(e){oc.call(this,[void 0,void 0],e)}function ju(e,t){zl.call(this,e),this.parent=t,this.count=0}function qu(e){oc.call(this,{},e),this._keys=Yi();const t=this._targets=[];t.active=0,t.forEach=e=>{for(let i=0,n=t.active;iGt(e))):Gt(e.name,e.as)}function Yu(e){oc.call(this,Yi(),e)}function Zu(e){oc.call(this,[],e)}function Xu(e){oc.call(this,[],e)}function Qu(e){oc.call(this,null,e)}function Ju(e){oc.call(this,[],e)}Fu.Definition={type:"Density",metadata:{generates:!0},params:[{name:"extent",type:"number",array:!0,length:2},{name:"steps",type:"number"},{name:"minsteps",type:"number",default:25},{name:"maxsteps",type:"number",default:200},{name:"method",type:"string",default:"pdf",values:["pdf","cdf"]},{name:"distribution",type:"param",params:Pu.concat(Bu)},{name:"as",type:"string",array:!0,default:["value","density"]}]},Xi(Fu,oc,{transform(e,t){const i=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){const n=Ou(e.distribution,function(e){return()=>e.materialize(e.SOURCE).source}(t)),o=e.steps||e.minsteps||25,r=e.steps||e.maxsteps||200;let s=e.method||"pdf";"pdf"!==s&&"cdf"!==s&&qt("Invalid density method: "+s),e.extent||n.data||qt("Missing density extent parameter."),s=n[s];const a=e.as||["value","density"],l=lu(s,e.extent||Ui(n.data()),o,r).map((e=>{const t={};return t[a[0]]=e[0],t[a[1]]=e[1],Nl(t)}));this.value&&(i.rem=this.value),this.value=i.add=i.source=l}return i}}),Vu.Definition={type:"DotBin",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"step",type:"number"},{name:"smooth",type:"boolean",default:!1},{name:"as",type:"string",default:"bin"}]},Xi(Vu,oc,{transform(e,t){if(this.value&&!e.modified()&&!t.changed())return t;const i=t.materialize(t.SOURCE).source,n=Wu(t.source,e.groupby,Zt),o=e.smooth||!1,r=e.field,s=e.step||((e,t)=>dn(Ui(e,t))/30)(i,r),a=Il(((e,t)=>r(e)-r(t))),l=e.as||"bin",c=n.length;let u,h=1/0,d=-1/0,g=0;for(;gd&&(d=t),e[++u][l]=t}return this.value={start:h,stop:d,step:s},t.reflow(!0).modifies(l)}}),Xi(Hu,zl),Uu.Definition={type:"Extent",metadata:{},params:[{name:"field",type:"field",required:!0}]},Xi(Uu,oc,{transform(e,t){const i=this.value,n=e.field,o=t.changed()||t.modified(n.fields)||e.modified("field");let r=i[0],s=i[1];if((o||null==r)&&(r=1/0,s=-1/0),t.visit(o?t.SOURCE:t.ADD,(e=>{const t=pi(n(e));null!=t&&(ts&&(s=t))})),!Number.isFinite(r)||!Number.isFinite(s)){let e=Vt(n);e&&(e=` for field "${e}"`),t.dataflow.warn(`Infinite extent${e}: [${r}, ${s}]`),r=s=void 0}this.value=[r,s]}}),Xi(ju,zl,{connect(e){return this.detachSubflow=e.detachSubflow,this.targets().add(e),e.source=this},add(e){this.count+=1,this.value.add.push(e)},rem(e){this.count-=1,this.value.rem.push(e)},mod(e){this.value.mod.push(e)},init(e){this.value.init(e,e.NO_SOURCE)},evaluate(){return this.value}}),Xi(qu,oc,{activate(e){this._targets[this._targets.active++]=e},subflow(e,t,i,n){const o=this.value;let r,s,a=Ki(o,e)&&o[e];return a?a.value.stampe&&e.count>0));this.initTargets(e)}},initTargets(e){const t=this._targets,i=t.length,n=e?e.length:0;let o=0;for(;othis.subflow(e,o,t);return this._group=e.group||{},this.initTargets(),t.visit(t.REM,(e=>{const t=Dl(e),i=r.get(t);void 0!==i&&(r.delete(t),a(i).rem(e))})),t.visit(t.ADD,(e=>{const t=n(e);r.set(Dl(e),t),a(t).add(e)})),s||t.modified(n.fields)?t.visit(t.MOD,(e=>{const t=Dl(e),i=r.get(t),o=n(e);i===o?a(o).mod(e):(r.set(t,o),a(i).rem(e),a(o).add(e))})):t.changed(t.MOD)&&t.visit(t.MOD,(e=>{a(r.get(Dl(e))).mod(e)})),s&&t.visit(t.REFLOW,(e=>{const t=Dl(e),i=r.get(t),o=n(e);i!==o&&(r.set(t,o),a(i).rem(e),a(o).add(e))})),t.clean()?i.runAfter((()=>{this.clean(),r.clean()})):r.empty>i.cleanThreshold&&i.runAfter(r.clean),t}}),Xi(Ku,zl),Yu.Definition={type:"Filter",metadata:{changes:!0},params:[{name:"expr",type:"expr",required:!0}]},Xi(Yu,oc,{transform(e,t){const i=t.dataflow,n=this.value,o=t.fork(),r=o.add,s=o.rem,a=o.mod,l=e.expr;let c=!0;function u(t){const i=Dl(t),o=l(t,e),u=n.get(i);o&&u?(n.delete(i),r.push(t)):o||u?c&&o&&!u&&a.push(t):(n.set(i,1),s.push(t))}return t.visit(t.REM,(e=>{const t=Dl(e);n.has(t)?n.delete(t):s.push(e)})),t.visit(t.ADD,(t=>{l(t,e)?r.push(t):n.set(Dl(t),1)})),t.visit(t.MOD,u),e.modified()&&(c=!1,t.visit(t.REFLOW,u)),n.empty>i.cleanThreshold&&i.runAfter(n.clean),o}}),Zu.Definition={type:"Flatten",metadata:{generates:!0},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"index",type:"string"},{name:"as",type:"string",array:!0}]},Xi(Zu,oc,{transform(e,t){const i=t.fork(t.NO_SOURCE),n=e.fields,o=zu(n,e.as||[]),r=e.index||null,s=o.length;return i.rem=this.value,t.visit(t.SOURCE,(e=>{const t=n.map((t=>t(e))),a=t.reduce(((e,t)=>Math.max(e,t.length)),0);let l,c,u,h=0;for(;h{for(let t,r=0;rt[n]=i(t,e)))}}),Xi(Ju,oc,{transform(e,t){const i=t.fork(t.ALL),n=e.generator;let o,r,s,a=this.value,l=e.size-a.length;if(l>0){for(o=[];--l>=0;)o.push(s=Nl(n(e))),a.push(s);i.add=i.add.length?i.materialize(i.ADD).add.concat(o):o}else r=a.slice(0,-l),i.rem=i.rem.length?i.materialize(i.REM).rem.concat(r):r,a=a.slice(-l);return i.source=this.value=a,i}});const eh={value:"value",median:pc,mean:function(e,t){let i=0,n=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(++i,n+=t);else{let o=-1;for(let r of e)null!=(r=t(r,++o,e))&&(r=+r)>=r&&(++i,n+=r)}if(i)return n/i},min:cc,max:lc},th=[];function ih(e){oc.call(this,[],e)}function nh(e){Du.call(this,e)}function oh(e){oc.call(this,null,e)}function rh(e){zl.call(this,null,sh,e)}function sh(e){return this.value&&!e.modified()?this.value:sn(e.fields,e.flat)}function ah(e){oc.call(this,[],e),this._pending=null}function lh(e,t,i){i.forEach(Nl);const n=t.fork(t.NO_FIELDS&t.NO_SOURCE);return n.rem=e.value,e.value=n.source=n.add=i,e._pending=null,n.rem.length&&n.clean(!0),n}function ch(e){oc.call(this,{},e)}function uh(e){zl.call(this,null,hh,e)}function hh(e){if(this.value&&!e.modified())return this.value;const t=e.extents,i=t.length;let n,o,r=1/0,s=-1/0;for(n=0;ns&&(s=o[1]);return[r,s]}function dh(e){zl.call(this,null,gh,e)}function gh(e){return this.value&&!e.modified()?this.value:e.values.reduce(((e,t)=>e.concat(t)),[])}function fh(e){oc.call(this,null,e)}function ph(e){Du.call(this,e)}function mh(e){qu.call(this,e)}function _h(e){oc.call(this,null,e)}function vh(e){oc.call(this,null,e)}function bh(e){oc.call(this,null,e)}function yh(e){oc.call(this,null,e)}function wh(e){oc.call(this,[],e),this.count=0}function Ch(e){oc.call(this,null,e)}function Sh(e){oc.call(this,null,e),this.modified(!0)}function xh(e){oc.call(this,null,e)}ih.Definition={type:"Impute",metadata:{changes:!0},params:[{name:"field",type:"field",required:!0},{name:"key",type:"field",required:!0},{name:"keyvals",array:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"enum",default:"value",values:["value","mean","median","max","min"]},{name:"value",default:0}]},Xi(ih,oc,{transform(e,t){var i,n,o,r,s,a,l,c,u,h,d=t.fork(t.ALL),g=function(e){var t,i=e.method||eh.value;if(null!=eh[i])return i===eh.value?(t=void 0!==e.value?e.value:0,()=>t):eh[i];qt("Unrecognized imputation method: "+i)}(e),f=function(e){const t=e.field;return e=>e?t(e):NaN}(e),p=Vt(e.field),m=Vt(e.key),_=(e.groupby||[]).map(Vt),v=function(e,t,i,n){var o,r,s,a,l,c,u,h,d=e=>e(h),g=[],f=n?n.slice():[],p={},m={};for(f.forEach(((e,t)=>p[e]=t+1)),a=0,u=e.length;ai.add(e)))):(o=i.value=i.value||this.init(e),t.visit(t.REM,(e=>i.rem(e))),t.visit(t.ADD,(e=>i.add(e)))),i.changes(),t.visit(t.SOURCE,(e=>{$i(e,o[i.cellkey(e)].tuple)})),t.reflow(n).modifies(this._outputs)},changes(){const e=this._adds,t=this._mods;let i,n;for(i=0,n=this._alen;i{const i=Oc(t,s)[a],n=e.counts?t.length:1;lu(i,u||Ui(t),h,d).forEach((e=>{const i={};for(let e=0;e(this._pending=Ti(e.data),e=>e.touch(this))))}:i.request(e.url,e.format).then((e=>lh(this,t,Ti(e.data))))}}),ch.Definition={type:"Lookup",metadata:{modifies:!0},params:[{name:"index",type:"index",params:[{name:"from",type:"data",required:!0},{name:"key",type:"field",required:!0}]},{name:"values",type:"field",array:!0},{name:"fields",type:"field",array:!0,required:!0},{name:"as",type:"string",array:!0},{name:"default",default:null}]},Xi(ch,oc,{transform(e,t){const i=e.fields,n=e.index,o=e.values,r=null==e.default?null:e.default,s=e.modified(),a=i.length;let l,c,u,h=s?t.SOURCE:t.ADD,d=t,g=e.as;return o?(c=o.length,a>1&&!g&&qt('Multi-field lookup requires explicit "as" parameter.'),g&&g.length!==a*c&&qt('The "as" parameter has too few output field names.'),g=g||o.map(Vt),l=function(e){for(var t,s,l=0,u=0;lt.modified(e.fields))),h|=u?t.MOD:0),t.visit(h,l),d.modifies(g)}}),Xi(uh,zl),Xi(dh,zl),Xi(fh,oc,{transform(e,t){return this.modified(e.modified()),this.value=e,t.fork(t.NO_SOURCE|t.NO_FIELDS)}}),ph.Definition={type:"Pivot",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"value",type:"field",required:!0},{name:"op",type:"enum",values:mu,default:"sum"},{name:"limit",type:"number",default:0},{name:"key",type:"field"}]},Xi(ph,Du,{_transform:Du.prototype.transform,transform(e,t){return this._transform(function(e,t){const i=e.field,n=e.value,o=("count"===e.op?"__count__":e.op)||"sum",r=Ht(i).concat(Ht(n)),s=function(e,t,i){const n={},o=[];return i.visit(i.SOURCE,(t=>{const i=e(t);n[i]||(n[i]=1,o.push(i))})),o.sort(Pi),t?o.slice(0,t):o}(i,e.limit||0,t);return t.changed()&&e.set("__pivot__",null,null,!0),{key:e.key,groupby:e.groupby,ops:s.map((()=>o)),fields:s.map((e=>function(e,t,i,n){return Wt((n=>t(n)===e?i(n):NaN),n,e+"")}(e,i,n,r))),as:s.map((e=>e+"")),modified:e.modified.bind(e)}}(e,t),t)}}),Xi(mh,qu,{transform(e,t){const i=e.subflow,n=e.field,o=e=>this.subflow(Dl(e),i,t,e);return(e.modified("field")||n&&t.modified(Ht(n)))&&qt("PreFacet does not support field modification."),this.initTargets(),n?(t.visit(t.MOD,(e=>{const t=o(e);n(e).forEach((e=>t.mod(e)))})),t.visit(t.ADD,(e=>{const t=o(e);n(e).forEach((e=>t.add(Nl(e))))})),t.visit(t.REM,(e=>{const t=o(e);n(e).forEach((e=>t.rem(e)))}))):(t.visit(t.MOD,(e=>o(e).mod(e))),t.visit(t.ADD,(e=>o(e).add(e))),t.visit(t.REM,(e=>o(e).rem(e)))),t.clean()&&t.runAfter((()=>this.clean())),t}}),_h.Definition={type:"Project",metadata:{generates:!0,changes:!0},params:[{name:"fields",type:"field",array:!0},{name:"as",type:"string",null:!0,array:!0}]},Xi(_h,oc,{transform(e,t){const i=t.fork(t.NO_SOURCE),n=e.fields,o=zu(e.fields,e.as||[]),r=n?(e,t)=>function(e,t,i,n){for(let o=0,r=i.length;o{const t=Dl(e);i.rem.push(s[t]),s[t]=null})),t.visit(t.ADD,(e=>{const t=r(e,Nl({}));s[Dl(e)]=t,i.add.push(t)})),t.visit(t.MOD,(e=>{i.mod.push(r(e,s[Dl(e)]))})),i}}),Xi(vh,oc,{transform(e,t){return this.value=e.value,e.modified("value")?t.fork(t.NO_SOURCE|t.NO_FIELDS):t.StopPropagation}}),bh.Definition={type:"Quantile",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"probs",type:"number",array:!0},{name:"step",type:"number",default:.01},{name:"as",type:"string",array:!0,default:["prob","value"]}]},Xi(bh,oc,{transform(e,t){const i=t.fork(t.NO_SOURCE|t.NO_FIELDS),n=e.as||["prob","value"];if(this.value&&!e.modified()&&!t.changed())return i.source=this.value,i;const o=Wu(t.materialize(t.SOURCE).source,e.groupby,e.field),r=(e.groupby||[]).map(Vt),s=[],a=e.step||.01,l=e.probs||uu(a/2,1-1e-14,a),c=l.length;return o.forEach((e=>{const t=_c(e,l);for(let i=0;i{const t=Dl(e);i.rem.push(n[t]),n[t]=null})),t.visit(t.ADD,(e=>{const t=El(e);n[Dl(e)]=t,i.add.push(t)})),t.visit(t.MOD,(e=>{const t=n[Dl(e)];for(const n in e)t[n]=e[n],i.modifies(n);i.mod.push(t)}))),i}}),wh.Definition={type:"Sample",metadata:{},params:[{name:"size",type:"number",default:1e3}]},Xi(wh,oc,{transform(e,t){const i=t.fork(t.NO_SOURCE),n=e.modified("size"),o=e.size,r=this.value.reduce(((e,t)=>(e[Dl(t)]=1,e)),{});let s=this.value,a=this.count,l=0;function c(e){let t,n;s.length=l&&(t=s[n],r[Dl(t)]&&i.rem.push(t),s[n]=e)),++a}if(t.rem.length&&(t.visit(t.REM,(e=>{const t=Dl(e);r[t]&&(r[t]=-1,i.rem.push(e)),--a})),s=s.filter((e=>-1!==r[Dl(e)]))),(t.rem.length||n)&&s.length{r[Dl(e)]||c(e)})),l=-1),n&&s.length>o){const e=s.length-o;for(let t=0;t{r[Dl(e)]&&i.mod.push(e)})),t.add.length&&t.visit(t.ADD,c),(t.add.length||l<0)&&(i.add=s.filter((e=>!r[Dl(e)]))),this.count=a,this.value=i.source=s,i}}),Ch.Definition={type:"Sequence",metadata:{generates:!0,changes:!0},params:[{name:"start",type:"number",required:!0},{name:"stop",type:"number",required:!0},{name:"step",type:"number",default:1},{name:"as",type:"string",default:"data"}]},Xi(Ch,oc,{transform(e,t){if(this.value&&!e.modified())return;const i=t.materialize().fork(t.MOD),n=e.as||"data";return i.rem=this.value?t.rem.concat(this.value):t.rem,this.value=uu(e.start,e.stop,e.step||1).map((e=>{const t={};return t[n]=e,Nl(t)})),i.add=t.add.concat(this.value),i}}),Xi(Sh,oc,{transform(e,t){return this.value=t.source,t.changed()?t.fork(t.NO_SOURCE|t.NO_FIELDS):t.StopPropagation}});const kh=["unit0","unit1"];function Dh(e){oc.call(this,Yi(),e)}function Lh(e){oc.call(this,null,e)}xh.Definition={type:"TimeUnit",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"interval",type:"boolean",default:!0},{name:"units",type:"enum",values:Br,array:!0},{name:"step",type:"number",default:1},{name:"maxbins",type:"number",default:40},{name:"extent",type:"date",array:!0},{name:"timezone",type:"enum",default:"local",values:["local","utc"]},{name:"as",type:"string",array:!0,length:2,default:kh}]},Xi(xh,oc,{transform(e,t){const i=e.field,n=!1!==e.interval,o="utc"===e.timezone,r=this._floor(e,t),s=(o?fs:gs)(r.unit).offset,a=e.as||kh,l=a[0],c=a[1],u=r.step;let h=r.start||1/0,d=r.stop||-1/0,g=t.ADD;return(e.modified()||t.modified(Ht(i)))&&(g=(t=t.reflow(!0)).SOURCE,h=1/0,d=-1/0),t.visit(g,(e=>{const t=i(e);let o,a;null==t?(e[l]=null,n&&(e[c]=null)):(e[l]=o=a=r(t),n&&(e[c]=a=s(o,u)),od&&(d=a))})),r.start=h,r.stop=d,t.modifies(n?a:l)},_floor(e,t){const i="utc"===e.timezone,{units:n,step:o}=e.units?{units:e.units,step:e.step||1}:As({extent:e.extent||Ui(t.materialize(t.SOURCE).source,e.field),maxbins:e.maxbins}),r=Wr(n),s=this.value||{},a=(i?us:as)(r,o);return a.unit=fi(r),a.units=r,a.step=o,a.start=s.start,a.stop=s.stop,this.value=a}}),Xi(Dh,oc,{transform(e,t){const i=t.dataflow,n=e.field,o=this.value,r=e=>o.set(n(e),e);let s=!0;return e.modified("field")||t.modified(n.fields)?(o.clear(),t.visit(t.SOURCE,r)):t.changed()?(t.visit(t.REM,(e=>o.delete(n(e)))),t.visit(t.ADD,r)):s=!1,this.modified(s),o.empty>i.cleanThreshold&&i.runAfter(o.clean),t.fork()}}),Xi(Lh,oc,{transform(e,t){(!this.value||e.modified("field")||e.modified("sort")||t.changed()||e.sort&&t.modified(e.sort.fields))&&(this.value=(e.sort?t.source.slice().sort(Il(e.sort)):t.source).map(e.field))}});const Nh={row_number:function(){return{next:e=>e.index+1}},rank:function(){let e;return{init:()=>e=1,next:t=>{const i=t.index,n=t.data;return i&&t.compare(n[i-1],n[i])?e=i+1:e}}},dense_rank:function(){let e;return{init:()=>e=1,next:t=>{const i=t.index,n=t.data;return i&&t.compare(n[i-1],n[i])?++e:e}}},percent_rank:function(){const e=Nh.rank(),t=e.next;return{init:e.init,next:e=>(t(e)-1)/(e.data.length-1)}},cume_dist:function(){let e;return{init:()=>e=0,next:t=>{const i=t.data,n=t.compare;let o=t.index;if(e0||qt("ntile num must be greater than zero.");const i=Nh.cume_dist(),n=i.next;return{init:i.init,next:e=>Math.ceil(t*n(e))}},lag:function(e,t){return t=+t||1,{next:i=>{const n=i.index-t;return n>=0?e(i.data[n]):null}}},lead:function(e,t){return t=+t||1,{next:i=>{const n=i.index+t,o=i.data;return ne(t.data[t.i0])}},last_value:function(e){return{next:t=>e(t.data[t.i1-1])}},nth_value:function(e,t){return(t=+t)>0||qt("nth_value nth must be greater than zero."),{next:i=>{const n=i.i0+(t-1);return nt=null,next:i=>{const n=e(i.data[i.index]);return null!=n?t=n:t}}},next_value:function(e){let t,i;return{init:()=>(t=null,i=-1),next:n=>{const o=n.data;return n.index<=i?t:(i=function(e,t,i){for(let n=t.length;ia[e]=1))}d(e.sort),t.forEach(((e,t)=>{const a=i[t],g=Vt(a),f=du(e,g,o[t]);if(d(a),r.push(f),Ki(Nh,e))s.push(function(e,t,i,n){const o=Nh[e](t,i);return{init:o.init||Xt,update:function(e,t){t[n]=o.next(e)}}}(e,i[t],n[t],f));else{if(null==a&&"count"!==e&&qt("Null aggregate field specified."),"count"===e)return void c.push(f);h=!1;let t=l[g];t||(t=l[g]=[],t.field=a,u.push(t)),t.push(_u(e,f))}})),(c.length||u.length)&&(this.cell=function(e,t,i){e=e.map((e=>Su(e,e.field)));const n={num:0,agg:null,store:!1,count:t};if(!i)for(var o=e.length,r=n.agg=Array(o),s=0;s0&&!o(r[i],r[i-1])&&(e.i0=t.left(r,r[i])),ne.init())),this.cell&&this.cell.init()},Mh.update=function(e,t){const i=this.cell,n=this.windows,o=e.data,r=n&&n.length;let s;if(i){for(s=e.p0;sthis.group(o(e));let s=this.state;s&&!i||(s=this.state=new Ah(e)),i||t.modified(s.inputs)?(this.value={},t.visit(t.SOURCE,(e=>r(e).add(e)))):(t.visit(t.REM,(e=>r(e).remove(e))),t.visit(t.ADD,(e=>r(e).add(e))));for(let t=0,i=this._mlen;t0)for(var n,o=e[0],r=t[0],s=e[i]-o,a=t[i]-r,l=-1;++l<=i;)n=l/i,this._basis.point(this._beta*e[l]+(1-this._beta)*(o+n*s),this._beta*t[l]+(1-this._beta)*(r+n*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Hh=function e(t){function i(e){return 1===t?new Ph(e):new Vh(e,t)}return i.beta=function(t){return e(+t)},i}(.85);function $h(e,t,i){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-i),e._x2,e._y2)}function Uh(e,t){this._context=e,this._k=(1-t)/6}Uh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:$h(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:$h(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const jh=function e(t){function i(e){return new Uh(e,t)}return i.tension=function(t){return e(+t)},i}(0);function qh(e,t){this._context=e,this._k=(1-t)/6}qh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:$h(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Kh=function e(t){function i(e){return new qh(e,t)}return i.tension=function(t){return e(+t)},i}(0);function Gh(e,t){this._context=e,this._k=(1-t)/6}Gh.prototype={areaStart:Bh,areaEnd:Bh,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:$h(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Yh=function e(t){function i(e){return new Gh(e,t)}return i.tension=function(t){return e(+t)},i}(0);var Zh=Math.abs,Xh=Math.atan2,Qh=Math.cos,Jh=Math.max,ed=Math.min,td=Math.sin,id=Math.sqrt,nd=1e-12,od=Math.PI,rd=od/2,sd=2*od;function ad(e){return e>1?0:e<-1?od:Math.acos(e)}function ld(e){return e>=1?rd:e<=-1?-rd:Math.asin(e)}function cd(e,t,i){var n=e._x1,o=e._y1,r=e._x2,s=e._y2;if(e._l01_a>nd){var a=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);n=(n*a-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,o=(o*a-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>nd){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);r=(r*c+e._x1*e._l23_2a-t*e._l12_2a)/u,s=(s*c+e._y1*e._l23_2a-i*e._l12_2a)/u}e._context.bezierCurveTo(n,o,r,s,e._x2,e._y2)}function ud(e,t){this._context=e,this._alpha=t}ud.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var i=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:cd(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const hd=function e(t){function i(e){return t?new ud(e,t):new Uh(e,0)}return i.alpha=function(t){return e(+t)},i}(.5);function dd(e,t){this._context=e,this._alpha=t}dd.prototype={areaStart:Bh,areaEnd:Bh,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var i=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:cd(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const gd=function e(t){function i(e){return t?new dd(e,t):new Gh(e,0)}return i.alpha=function(t){return e(+t)},i}(.5);function fd(e,t){this._context=e,this._alpha=t}fd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var i=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:cd(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const pd=function e(t){function i(e){return t?new fd(e,t):new qh(e,0)}return i.alpha=function(t){return e(+t)},i}(.5);function md(e){this._context=e}function _d(e){return new md(e)}function vd(e){this._context=e}function bd(e){return e<0?-1:1}function yd(e,t,i){var n=e._x1-e._x0,o=t-e._x1,r=(e._y1-e._y0)/(n||o<0&&-0),s=(i-e._y1)/(o||n<0&&-0),a=(r*o+s*n)/(n+o);return(bd(r)+bd(s))*Math.min(Math.abs(r),Math.abs(s),.5*Math.abs(a))||0}function wd(e,t){var i=e._x1-e._x0;return i?(3*(e._y1-e._y0)/i-t)/2:t}function Cd(e,t,i){var n=e._x0,o=e._y0,r=e._x1,s=e._y1,a=(r-n)/3;e._context.bezierCurveTo(n+a,o+a*t,r-a,s-a*i,r,s)}function Sd(e){this._context=e}function xd(e){this._context=new kd(e)}function kd(e){this._context=e}function Dd(e){this._context=e}function Ld(e){var t,i,n=e.length-1,o=new Array(n),r=new Array(n),s=new Array(n);for(o[0]=0,r[0]=2,s[0]=e[0]+2*e[1],t=1;t=0;--t)o[t]=(s[t]-o[t+1])/r[t];for(r[n-1]=(e[n]+o[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var i=this._x*(1-this._t)+e*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,t)}}this._x=e,this._y=t}};const Ed=Math.PI,Ad=2*Ed,Md=1e-6,Id=Ad-Md;function Td(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Rd(){return new Td}Td.prototype=Rd.prototype={constructor:Td,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,i,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+i)+","+(this._y1=+n)},bezierCurveTo:function(e,t,i,n,o,r){this._+="C"+ +e+","+ +t+","+ +i+","+ +n+","+(this._x1=+o)+","+(this._y1=+r)},arcTo:function(e,t,i,n,o){e=+e,t=+t,i=+i,n=+n,o=+o;var r=this._x1,s=this._y1,a=i-e,l=n-t,c=r-e,u=s-t,h=c*c+u*u;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(h>Md)if(Math.abs(u*a-l*c)>Md&&o){var d=i-r,g=n-s,f=a*a+l*l,p=d*d+g*g,m=Math.sqrt(f),_=Math.sqrt(h),v=o*Math.tan((Ed-Math.acos((f+h-p)/(2*m*_)))/2),b=v/_,y=v/m;Math.abs(b-1)>Md&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+o+","+o+",0,0,"+ +(u*d>c*g)+","+(this._x1=e+y*a)+","+(this._y1=t+y*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t)},arc:function(e,t,i,n,o,r){e=+e,t=+t,r=!!r;var s=(i=+i)*Math.cos(n),a=i*Math.sin(n),l=e+s,c=t+a,u=1^r,h=r?n-o:o-n;if(i<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>Md||Math.abs(this._y1-c)>Md)&&(this._+="L"+l+","+c),i&&(h<0&&(h=h%Ad+Ad),h>Id?this._+="A"+i+","+i+",0,1,"+u+","+(e-s)+","+(t-a)+"A"+i+","+i+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>Md&&(this._+="A"+i+","+i+",0,"+ +(h>=Ed)+","+u+","+(this._x1=e+i*Math.cos(o))+","+(this._y1=t+i*Math.sin(o))))},rect:function(e,t,i,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +i+"v"+ +n+"h"+-i+"Z"},toString:function(){return this._}};const Od=Rd;function Fd(e){return function(){return e}}function Pd(e){return e.innerRadius}function Bd(e){return e.outerRadius}function zd(e){return e.startAngle}function Wd(e){return e.endAngle}function Vd(e){return e&&e.padAngle}function Hd(e,t,i,n,o,r,s,a){var l=i-e,c=n-t,u=s-o,h=a-r,d=h*l-u*c;if(!(d*dA*A+M*M&&(x=D,k=L),{cx:x,cy:k,x01:-u,y01:-h,x11:x*(o/w-1),y11:k*(o/w-1)}}function Ud(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function jd(e){return e[0]}function qd(e){return e[1]}function Kd(e,t){var i=Fd(!0),n=null,o=_d,r=null;function s(s){var a,l,c,u=(s=Ud(s)).length,h=!1;for(null==n&&(r=o(c=Od())),a=0;a<=u;++a)!(a=u;--h)a.point(m[h],_[h]);a.lineEnd(),a.areaEnd()}p&&(m[c]=+e(d,c,l),_[c]=+t(d,c,l),a.point(n?+n(d,c,l):m[c],i?+i(d,c,l):_[c]))}if(g)return a=null,g+""||null}function c(){return Kd().defined(o).curve(s).context(r)}return e="function"==typeof e?e:void 0===e?jd:Fd(+e),t="function"==typeof t?t:Fd(void 0===t?0:+t),i="function"==typeof i?i:void 0===i?qd:Fd(+i),l.x=function(t){return arguments.length?(e="function"==typeof t?t:Fd(+t),n=null,l):e},l.x0=function(t){return arguments.length?(e="function"==typeof t?t:Fd(+t),l):e},l.x1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:Fd(+e),l):n},l.y=function(e){return arguments.length?(t="function"==typeof e?e:Fd(+e),i=null,l):t},l.y0=function(e){return arguments.length?(t="function"==typeof e?e:Fd(+e),l):t},l.y1=function(e){return arguments.length?(i=null==e?null:"function"==typeof e?e:Fd(+e),l):i},l.lineX0=l.lineY0=function(){return c().x(e).y(t)},l.lineY1=function(){return c().x(e).y(i)},l.lineX1=function(){return c().x(n).y(t)},l.defined=function(e){return arguments.length?(o="function"==typeof e?e:Fd(!!e),l):o},l.curve=function(e){return arguments.length?(s=e,null!=r&&(a=s(r)),l):s},l.context=function(e){return arguments.length?(null==e?r=a=null:a=s(r=e),l):r},l}Array.prototype.slice;const Yd={draw:function(e,t){var i=Math.sqrt(t/od);e.moveTo(i,0),e.arc(0,0,i,0,sd)}};Math.sqrt(1/3);Math.sin(od/10),Math.sin(7*od/10);function Zd(e,t){if("undefined"!=typeof document&&document.createElement){const i=document.createElement("canvas");if(i&&i.getContext)return i.width=e,i.height=t,i}return null}Math.sin(sd/10),Math.cos(sd/10),Math.sqrt(3),Math.sqrt(3),Math.sqrt(12);const Xd=()=>"undefined"!=typeof Image?Image:null,Qd=Dr(kr),Jd=Qd.right,eg=Qd.left,tg=(Dr(dc).center,Jd);function ig(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function ng(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}const og=Symbol("implicit");function rg(){var e=new Map,t=[],i=[],n=og;function o(o){var r=o+"",s=e.get(r);if(!s){if(n!==og)return n;e.set(r,s=t.push(o))}return i[(s-1)%i.length]}return o.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new Map;for(const n of i){const i=n+"";e.has(i)||e.set(i,t.push(n))}return o},o.range=function(e){return arguments.length?(i=Array.from(e),o):i.slice()},o.unknown=function(e){return arguments.length?(n=e,o):n},o.copy=function(){return rg(t,i).unknown(n)},ig.apply(o,arguments),o}function sg(e,t,i,n){var o,r=uo(e,t,i);switch((n=fo(null==n?",f":n)).type){case"s":var s=Math.max(Math.abs(e),Math.abs(t));return null!=n.precision||isNaN(o=vo(r,s))||(n.precision=o),Do(n,s);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(o=bo(r,Math.max(Math.abs(e),Math.abs(t))))||(n.precision=o-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(o=yo(r))||(n.precision=o-2*("%"===n.type))}return ko(n)}function ag(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function lg(e,t){var i=Object.create(e.prototype);for(var n in t)i[n]=t[n];return i}function cg(){}var ug=.7,hg=1/ug,dg="\\s*([+-]?\\d+)\\s*",gg="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",fg="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",pg=/^#([0-9a-f]{3,8})$/,mg=new RegExp("^rgb\\("+[dg,dg,dg]+"\\)$"),_g=new RegExp("^rgb\\("+[fg,fg,fg]+"\\)$"),vg=new RegExp("^rgba\\("+[dg,dg,dg,gg]+"\\)$"),bg=new RegExp("^rgba\\("+[fg,fg,fg,gg]+"\\)$"),yg=new RegExp("^hsl\\("+[gg,fg,fg]+"\\)$"),wg=new RegExp("^hsla\\("+[gg,fg,fg,gg]+"\\)$"),Cg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Sg(){return this.rgb().formatHex()}function xg(){return this.rgb().formatRgb()}function kg(e){var t,i;return e=(e+"").trim().toLowerCase(),(t=pg.exec(e))?(i=t[1].length,t=parseInt(t[1],16),6===i?Dg(t):3===i?new Ag(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===i?Lg(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===i?Lg(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=mg.exec(e))?new Ag(t[1],t[2],t[3],1):(t=_g.exec(e))?new Ag(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=vg.exec(e))?Lg(t[1],t[2],t[3],t[4]):(t=bg.exec(e))?Lg(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=yg.exec(e))?Rg(t[1],t[2]/100,t[3]/100,1):(t=wg.exec(e))?Rg(t[1],t[2]/100,t[3]/100,t[4]):Cg.hasOwnProperty(e)?Dg(Cg[e]):"transparent"===e?new Ag(NaN,NaN,NaN,0):null}function Dg(e){return new Ag(e>>16&255,e>>8&255,255&e,1)}function Lg(e,t,i,n){return n<=0&&(e=t=i=NaN),new Ag(e,t,i,n)}function Ng(e){return e instanceof cg||(e=kg(e)),e?new Ag((e=e.rgb()).r,e.g,e.b,e.opacity):new Ag}function Eg(e,t,i,n){return 1===arguments.length?Ng(e):new Ag(e,t,i,null==n?1:n)}function Ag(e,t,i,n){this.r=+e,this.g=+t,this.b=+i,this.opacity=+n}function Mg(){return"#"+Tg(this.r)+Tg(this.g)+Tg(this.b)}function Ig(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function Tg(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Rg(e,t,i,n){return n<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new Pg(e,t,i,n)}function Og(e){if(e instanceof Pg)return new Pg(e.h,e.s,e.l,e.opacity);if(e instanceof cg||(e=kg(e)),!e)return new Pg;if(e instanceof Pg)return e;var t=(e=e.rgb()).r/255,i=e.g/255,n=e.b/255,o=Math.min(t,i,n),r=Math.max(t,i,n),s=NaN,a=r-o,l=(r+o)/2;return a?(s=t===r?(i-n)/a+6*(i0&&l<1?0:s,new Pg(s,a,l,e.opacity)}function Fg(e,t,i,n){return 1===arguments.length?Og(e):new Pg(e,t,i,null==n?1:n)}function Pg(e,t,i,n){this.h=+e,this.s=+t,this.l=+i,this.opacity=+n}function Bg(e,t,i){return 255*(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)}function zg(e,t,i,n,o){var r=e*e,s=r*e;return((1-3*e+3*r-s)*t+(4-6*r+3*s)*i+(1+3*e+3*r-3*s)*n+s*o)/6}function Wg(e){var t=e.length-1;return function(i){var n=i<=0?i=0:i>=1?(i=1,t-1):Math.floor(i*t),o=e[n],r=e[n+1],s=n>0?e[n-1]:2*o-r,a=n=240?e-240:e+120,o,n),Bg(e,o,n),Bg(e<120?e+240:e-120,o,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));const Hg=e=>()=>e;function $g(e,t){return function(i){return e+i*t}}function Ug(e,t){var i=t-e;return i?$g(e,i>180||i<-180?i-360*Math.round(i/360):i):Hg(isNaN(e)?t:e)}function jg(e,t){var i=t-e;return i?$g(e,i):Hg(isNaN(e)?t:e)}const qg=function e(t){var i=function(e){return 1==(e=+e)?jg:function(t,i){return i-t?function(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(n){return Math.pow(e+n*t,i)}}(t,i,e):Hg(isNaN(t)?i:t)}}(t);function n(e,t){var n=i((e=Eg(e)).r,(t=Eg(t)).r),o=i(e.g,t.g),r=i(e.b,t.b),s=jg(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=o(t),e.b=r(t),e.opacity=s(t),e+""}}return n.gamma=e,n}(1);function Kg(e){return function(t){var i,n,o=t.length,r=new Array(o),s=new Array(o),a=new Array(o);for(i=0;ir&&(o=t.slice(r,o),a[s]?a[s]+=o:a[++s]=o),(i=i[0])===(n=n[0])?a[s]?a[s]+=n:a[++s]=n:(a[++s]=null,l.push({i:s,x:tf(i,n)})),r=rf.lastIndex;return rt&&(i=e,e=t,t=i),function(i){return Math.max(e,Math.min(t,i))}}(s[0],s[e-1])),n=e>2?ff:gf,o=r=null,h}function h(t){return null==t||isNaN(t=+t)?i:(o||(o=n(s.map(e),a,l)))(e(c(t)))}return h.invert=function(i){return c(t((r||(r=n(a,s.map(e),tf)))(i)))},h.domain=function(e){return arguments.length?(s=Array.from(e,cf),u()):s.slice()},h.range=function(e){return arguments.length?(a=Array.from(e),u()):a.slice()},h.rangeRound=function(e){return a=Array.from(e),l=lf,u()},h.clamp=function(e){return arguments.length?(c=!!e||hf,u()):c!==hf},h.interpolate=function(e){return arguments.length?(l=e,u()):l},h.unknown=function(e){return arguments.length?(i=e,h):i},function(i,n){return e=i,t=n,u()}}function _f(){return mf()(hf,hf)}function vf(e){var t=e.domain;return e.ticks=function(e){var i=t();return lo(i[0],i[i.length-1],null==e?10:e)},e.tickFormat=function(e,i){var n=t();return sg(n[0],n[n.length-1],null==e?10:e,i)},e.nice=function(i){null==i&&(i=10);var n,o,r=t(),s=0,a=r.length-1,l=r[s],c=r[a],u=10;for(c0;){if((o=co(l,c,i))===n)return r[s]=l,r[a]=c,t(r);if(o>0)l=Math.floor(l/o)*o,c=Math.ceil(c/o)*o;else{if(!(o<0))break;l=Math.ceil(l*o)/o,c=Math.floor(c*o)/o}n=o}return e},e}function bf(e,t){var i,n=0,o=(e=e.slice()).length-1,r=e[n],s=e[o];return s0){for(;d<=g;++d)for(u=1,c=i(d);ul)break;p.push(h)}}else for(;d<=g;++d)for(u=r-1,c=i(d);u>=1;--u)if(!((h=c*u)l)break;p.push(h)}2*p.lengthe)).right(s,o);if(r===s.length)return e.every(uo(t/Bo,i/Bo,n));if(0===r)return mr.every(Math.max(uo(t,i,n),1));const[a,l]=s[o/s[r-1][2]180?t+=360:t-e>180&&(e+=360),r.push({i:i.push(o(i)+"rotate(",null,n)-2,x:tf(e,t)})):t&&i.push(o(i)+"rotate("+t+n)}(r.rotate,s.rotate,a,l),function(e,t,i,r){e!==t?r.push({i:i.push(o(i)+"skewX(",null,n)-2,x:tf(e,t)}):t&&i.push(o(i)+"skewX("+t+n)}(r.skewX,s.skewX,a,l),function(e,t,i,n,r,s){if(e!==i||t!==n){var a=r.push(o(r)+"scale(",null,",",null,")");s.push({i:a-4,x:tf(e,i)},{i:a-2,x:tf(t,n)})}else 1===i&&1===n||r.push(o(r)+"scale("+i+","+n+")")}(r.scaleX,r.scaleY,s.scaleX,s.scaleY,a,l),r=s=null,function(e){for(var t,i=-1,n=l.length;++i.008856451679035631?Math.pow(e,1/3):e/mp+fp}function wp(e){return e>pp?e*e*e:mp*(e-fp)}function Cp(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Sp(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function xp(e){if(e instanceof Dp)return new Dp(e.h,e.c,e.l,e.opacity);if(e instanceof bp||(e=_p(e)),0===e.a&&0===e.b)return new Dp(NaN,00?n:1:0}const Gp="linear",Yp="log",Zp="pow",Xp="sqrt",Qp="symlog",Jp="time",em="utc",tm="sequential",im="diverging",nm="quantile",om="quantize",rm="threshold",sm="ordinal",am="point",lm="band",cm="bin-ordinal",um="continuous",hm="discrete",dm="discretizing",gm="interpolating",fm="temporal";function pm(){const e=rg().unknown(void 0),t=e.domain,i=e.range;let n,o,r=[0,1],s=!1,a=0,l=0,c=.5;function u(){const e=t().length,u=r[1]g+n*e));return i(u?f.reverse():f)}return delete e.unknown,e.domain=function(e){return arguments.length?(t(e),u()):t()},e.range=function(e){return arguments.length?(r=[+e[0],+e[1]],u()):r.slice()},e.rangeRound=function(e){return r=[+e[0],+e[1]],s=!0,u()},e.bandwidth=function(){return o},e.step=function(){return n},e.round=function(e){return arguments.length?(s=!!e,u()):s},e.padding=function(e){return arguments.length?(l=Math.max(0,Math.min(1,e)),a=l,u()):a},e.paddingInner=function(e){return arguments.length?(a=Math.max(0,Math.min(1,e)),u()):a},e.paddingOuter=function(e){return arguments.length?(l=Math.max(0,Math.min(1,e)),u()):l},e.align=function(e){return arguments.length?(c=Math.max(0,Math.min(1,e)),u()):c},e.invertRange=function(e){if(null==e[0]||null==e[1])return;const n=r[1]r[1-n])?void 0:(l=Math.max(0,Jd(s,h)-1),c=h===d?l:Jd(s,d)-1,h-s[l]>o+1e-10&&++l,n&&(u=l,l=a-c,c=a-u),l>c?void 0:t().slice(l,c+1))},e.invert=function(t){const i=e.invertRange([t,t]);return i?i[0]:i},e.copy=function(){return pm().domain(t()).range(r).round(s).paddingInner(a).paddingOuter(l).align(c)},u()}function mm(e){const t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,e.copy=function(){return mm(t())},e}var _m=Array.prototype.map;function vm(e){return _m.call(e,pi)}const bm=Array.prototype.slice,ym={};function wm(e,t,i){const n=function(){const i=t();return i.invertRange||(i.invertRange=i.invert?(n=i,function(e){let t,i=e[0],o=e[1];return o=a&&i[r]<=l&&(c<0&&(c=r),n=r);if(!(c<0))return a=e.invertExtent(i[c]),l=e.invertExtent(i[n]),[void 0===a[0]?a[1]:a[0],void 0===l[1]?l[0]:l[1]]}}(i):void 0),i.type=e,i;var n};return n.metadata=vn(Ti(i)),n}function Cm(e,t,i){return arguments.length>1?(ym[e]=wm(e,t,i),this):Sm(e)?ym[e]:void 0}function Sm(e){return Ki(ym,e)}function xm(e,t){const i=ym[e];return i&&i.metadata[t]}function km(e){return xm(e,um)}function Dm(e){return xm(e,hm)}function Lm(e){return xm(e,dm)}function Nm(e){return xm(e,Yp)}function Em(e){return xm(e,gm)}function Am(e){return xm(e,nm)}Cm("identity",(function e(t){var i;function n(e){return null==e||isNaN(e=+e)?i:e}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=Array.from(e,cf),n):t.slice()},n.unknown=function(e){return arguments.length?(i=e,n):i},n.copy=function(){return e(t).unknown(i)},t=arguments.length?Array.from(t,cf):[0,1],vf(n)})),Cm(Gp,(function e(){var t=_f();return t.copy=function(){return pf(t,e())},ig.apply(t,arguments),vf(t)}),um),Cm(Yp,(function e(){var t=Df(mf()).domain([1,10]);return t.copy=function(){return pf(t,e()).base(t.base())},ig.apply(t,arguments),t}),[um,Yp]),Cm(Zp,Mf,um),Cm(Xp,(function(){return Mf.apply(null,arguments).exponent(.5)}),um),Cm(Qp,(function e(){var t=Rf(mf());return t.copy=function(){return pf(t,e()).constant(t.constant())},ig.apply(t,arguments)}),um),Cm(Jp,(function(){return ig.apply(Hf(Bf,zf,sr,lr,Ho,Wo,ur,dr,fr,Fs).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}),[um,fm]),Cm(em,(function(){return ig.apply(Hf(Ff,Pf,vr,yr,Qo,Zo,Cr,xr,fr,Bs).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}),[um,fm]),Cm(tm,jf,[um,gm]),Cm("".concat(tm,"-").concat(Gp),jf,[um,gm]),Cm("".concat(tm,"-").concat(Yp),(function e(){var t=Df($f()).domain([1,10]);return t.copy=function(){return Uf(t,e()).base(t.base())},ng.apply(t,arguments)}),[um,gm,Yp]),Cm("".concat(tm,"-").concat(Zp),qf,[um,gm]),Cm("".concat(tm,"-").concat(Xp),(function(){return qf.apply(null,arguments).exponent(.5)}),[um,gm]),Cm("".concat(tm,"-").concat(Qp),(function e(){var t=Rf($f());return t.copy=function(){return Uf(t,e()).constant(t.constant())},ng.apply(t,arguments)}),[um,gm]),Cm("".concat(im,"-").concat(Gp),(function e(){var t=vf(Gf()(hf));return t.copy=function(){return Uf(t,e())},ng.apply(t,arguments)}),[um,gm]),Cm("".concat(im,"-").concat(Yp),(function e(){var t=Df(Gf()).domain([.1,1,10]);return t.copy=function(){return Uf(t,e()).base(t.base())},ng.apply(t,arguments)}),[um,gm,Yp]),Cm("".concat(im,"-").concat(Zp),Yf,[um,gm]),Cm("".concat(im,"-").concat(Xp),(function(){return Yf.apply(null,arguments).exponent(.5)}),[um,gm]),Cm("".concat(im,"-").concat(Qp),(function e(){var t=Rf(Gf());return t.copy=function(){return Uf(t,e()).constant(t.constant())},ng.apply(t,arguments)}),[um,gm]),Cm(nm,(function e(){var t,i=[],n=[],o=[];function r(){var e=0,t=Math.max(1,n.length);for(o=new Array(t-1);++e0?o[t-1]:i[0],t=o?[r[o-1],n]:[r[t-1],r[t]]},a.unknown=function(e){return arguments.length?(t=e,a):a},a.thresholds=function(){return r.slice()},a.copy=function(){return e().domain([i,n]).range(s).unknown(t)},ig.apply(vf(a),arguments)}),dm),Cm(rm,(function e(){var t,i=[.5],n=[0,1],o=1;function r(e){return null!=e&&e<=e?n[tg(i,e,0,o)]:t}return r.domain=function(e){return arguments.length?(i=Array.from(e),o=Math.min(i.length,n.length-1),r):i.slice()},r.range=function(e){return arguments.length?(n=Array.from(e),o=Math.min(i.length,n.length-1),r):n.slice()},r.invertExtent=function(e){var t=n.indexOf(e);return[i[t-1],i[t]]},r.unknown=function(e){return arguments.length?(t=e,r):t},r.copy=function(){return e().domain(i).range(n).unknown(t)},ig.apply(r,arguments)}),dm),Cm(cm,(function e(){let t=[],i=[];function n(e){return null==e||e!=e?void 0:i[(tg(t,e)-1)%i.length]}return n.domain=function(e){return arguments.length?(t=vm(e),n):t.slice()},n.range=function(e){return arguments.length?(i=bm.call(e),n):i.slice()},n.tickFormat=function(e,i){return sg(t[0],fi(t),null==e?10:e,i)},n.copy=function(){return e().domain(n.domain()).range(n.range())},n}),[hm,dm]),Cm(sm,rg,hm),Cm(lm,pm,hm),Cm(am,(function(){return mm(pm().paddingInner(1))}),hm);const Mm=["clamp","base","constant","exponent"];function Im(e,t){const i=t[0],n=fi(t)-i;return function(t){return e(i+t*n)}}function Tm(e,t,i){return Kf(Fm(t||"rgb",i),e)}function Rm(e,t){const i=new Array(t),n=t+1;for(let o=0;oe[t]?s[t](e[t]()):0)),s):Vi(.5)}function Fm(e,t){const i=o[function(e){return"interpolate"+e.toLowerCase().split("-").map((e=>e[0].toUpperCase()+e.slice(1))).join("")}(e)];return null!=t&&i&&i.gamma?i.gamma(t):i}function Pm(e){const t=e.length/6|0,i=new Array(t);for(let n=0;n1?(zm[e]=t,this):zm[e]}Bm({category10:"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf",category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5",accent:"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666",dark2:"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666",paired:"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928",pastel1:"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2",pastel2:"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc",set1:"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999",set2:"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3",set3:"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"},Pm),Bm({blues:"cfe1f2bed8eca8cee58fc1de74b2d75ba3cf4592c63181bd206fb2125ca40a4a90",greens:"d3eecdc0e6baabdda594d3917bc77d60ba6c46ab5e329a512089430e7735036429",greys:"e2e2e2d4d4d4c4c4c4b1b1b19d9d9d8888887575756262624d4d4d3535351e1e1e",oranges:"fdd8b3fdc998fdb87bfda55efc9244f87f2cf06b18e4580bd14904b93d029f3303",purples:"e2e1efd4d4e8c4c5e0b4b3d6a3a0cc928ec3827cb97566ae684ea25c3696501f8c",reds:"fdc9b4fcb49afc9e80fc8767fa7051f6573fec3f2fdc2a25c81b1db21218970b13",blueGreen:"d5efedc1e8e0a7ddd18bd2be70c6a958ba9144ad77319c5d2089460e7736036429",bluePurple:"ccddecbad0e4a8c2dd9ab0d4919cc98d85be8b6db28a55a6873c99822287730f71",greenBlue:"d3eecec5e8c3b1e1bb9bd8bb82cec269c2ca51b2cd3c9fc7288abd1675b10b60a1",orangeRed:"fddcaffdcf9bfdc18afdad77fb9562f67d53ee6545e24932d32d1ebf130da70403",purpleBlue:"dbdaebc8cee4b1c3de97b7d87bacd15b9fc93a90c01e7fb70b70ab056199045281",purpleBlueGreen:"dbd8eac8cee4b0c3de93b7d872acd1549fc83892bb1c88a3097f8702736b016353",purpleRed:"dcc9e2d3b3d7ce9eccd186c0da6bb2e14da0e23189d91e6fc61159ab07498f023a",redPurple:"fccfccfcbec0faa9b8f98faff571a5ec539ddb3695c41b8aa908808d0179700174",yellowGreen:"e4f4acd1eca0b9e2949ed68880c97c62bb6e47aa5e3297502083440e723b036034",yellowOrangeBrown:"feeaa1fedd84fecc63feb746fca031f68921eb7215db5e0bc54c05ab3d038f3204",yellowOrangeRed:"fee087fed16ffebd59fea849fd903efc7335f9522bee3423de1b20ca0b22af0225",blueOrange:"134b852f78b35da2cb9dcae1d2e5eff2f0ebfce0bafbbf74e8932fc5690d994a07",brownBlueGreen:"704108a0651ac79548e3c78af3e6c6eef1eac9e9e48ed1c74da79e187a72025147",purpleGreen:"5b1667834792a67fb6c9aed3e6d6e8eff0efd9efd5aedda971bb75368e490e5e29",purpleOrange:"4114696647968f83b7b9b4d6dadbebf3eeeafce0bafbbf74e8932fc5690d994a07",redBlue:"8c0d25bf363adf745ef4ae91fbdbc9f2efeed2e5ef9dcae15da2cb2f78b3134b85",redGrey:"8c0d25bf363adf745ef4ae91fcdccbfaf4f1e2e2e2c0c0c0969696646464343434",yellowGreenBlue:"eff9bddbf1b4bde5b594d5b969c5be45b4c22c9ec02182b82163aa23479c1c3185",redYellowBlue:"a50026d4322cf16e43fcac64fedd90faf8c1dcf1ecabd6e875abd04a74b4313695",redYellowGreen:"a50026d4322cf16e43fcac63fedd8df9f7aed7ee8ea4d86e64bc6122964f006837",pinkYellowGreen:"8e0152c0267edd72adf0b3d6faddedf5f3efe1f2cab6de8780bb474f9125276419",spectral:"9e0142d13c4bf0704afcac63fedd8dfbf8b0e0f3a1a9dda269bda94288b55e4fa2",viridis:"440154470e61481a6c482575472f7d443a834144873d4e8a39568c35608d31688e2d708e2a788e27818e23888e21918d1f988b1fa08822a8842ab07f35b77943bf7154c56866cc5d7ad1518fd744a5db36bcdf27d2e21be9e51afde725",magma:"0000040404130b0924150e3720114b2c11603b0f704a107957157e651a80721f817f24828c29819a2e80a8327db6377ac43c75d1426fde4968e95462f1605df76f5cfa7f5efc8f65fe9f6dfeaf78febf84fece91fddea0fcedaffcfdbf",inferno:"0000040403130c0826170c3b240c4f330a5f420a68500d6c5d126e6b176e781c6d86216b932667a12b62ae305cbb3755c73e4cd24644dd513ae65c30ed6925f3771af8850ffb9506fca50afcb519fac62df6d645f2e661f3f484fcffa4",plasma:"0d088723069033059742039d5002a25d01a66a00a87801a88405a7900da49c179ea72198b12a90ba3488c33d80cb4779d35171da5a69e16462e76e5bed7953f2834cf68f44fa9a3dfca636fdb32ffec029fcce25f9dc24f5ea27f0f921",cividis:"00205100235800265d002961012b65042e670831690d346b11366c16396d1c3c6e213f6e26426e2c456e31476e374a6e3c4d6e42506e47536d4c566d51586e555b6e5a5e6e5e616e62646f66676f6a6a706e6d717270717573727976737c79747f7c75827f758682768985778c8877908b78938e789691789a94789e9778a19b78a59e77a9a177aea575b2a874b6ab73bbaf71c0b26fc5b66dc9b96acebd68d3c065d8c462ddc85fe2cb5ce7cf58ebd355f0d652f3da4ff7de4cfae249fce647",rainbow:"6e40aa883eb1a43db3bf3cafd83fa4ee4395fe4b83ff576eff6659ff7847ff8c38f3a130e2b72fcfcc36bee044aff05b8ff4576ff65b52f6673af27828ea8d1ddfa319d0b81cbecb23abd82f96e03d82e14c6edb5a5dd0664dbf6e40aa",sinebow:"ff4040fc582af47218e78d0bd5a703bfbf00a7d5038de70b72f41858fc2a40ff402afc5818f4720be78d03d5a700bfbf03a7d50b8de71872f42a58fc4040ff582afc7218f48d0be7a703d5bf00bfd503a7e70b8df41872fc2a58ff4040",turbo:"23171b32204a3e2a71453493493eae4b49c54a53d7485ee44569ee4074f53c7ff8378af93295f72e9ff42ba9ef28b3e926bce125c5d925cdcf27d5c629dcbc2de3b232e9a738ee9d3ff39347f68950f9805afc7765fd6e70fe667cfd5e88fc5795fb51a1f84badf545b9f140c5ec3cd0e637dae034e4d931ecd12ef4c92bfac029ffb626ffad24ffa223ff9821ff8d1fff821dff771cfd6c1af76118f05616e84b14df4111d5380fcb2f0dc0260ab61f07ac1805a313029b0f00950c00910b00",browns:"eedbbdecca96e9b97ae4a865dc9856d18954c7784cc0673fb85536ad44339f3632",tealBlues:"bce4d89dd3d181c3cb65b3c245a2b9368fae347da0306a932c5985",teals:"bbdfdfa2d4d58ac9c975bcbb61b0af4da5a43799982b8b8c1e7f7f127273006667",warmGreys:"dcd4d0cec5c1c0b8b4b3aaa7a59c9998908c8b827f7e7673726866665c5a59504e",goldGreen:"f4d166d5ca60b6c35c98bb597cb25760a6564b9c533f8f4f33834a257740146c36",goldOrange:"f4d166f8be5cf8aa4cf5983bf3852aef701be2621fd65322c54923b142239e3a26",goldRed:"f4d166f6be59f9aa51fc964ef6834bee734ae56249db5247cf4244c43141b71d3e",lightGreyRed:"efe9e6e1dad7d5cbc8c8bdb9bbaea9cd967ddc7b43e15f19df4011dc000b",lightGreyTeal:"e4eaead6dcddc8ced2b7c2c7a6b4bc64b0bf22a6c32295c11f85be1876bc",lightMulti:"e0f1f2c4e9d0b0de9fd0e181f6e072f6c053f3993ef77440ef4a3c",lightOrange:"f2e7daf7d5baf9c499fab184fa9c73f68967ef7860e8645bde515bd43d5b",lightTealBlue:"e3e9e0c0dccf9aceca7abfc859afc0389fb9328dad2f7ca0276b95255988",darkBlue:"3232322d46681a5c930074af008cbf05a7ce25c0dd38daed50f3faffffff",darkGold:"3c3c3c584b37725e348c7631ae8b2bcfa424ecc31ef9de30fff184ffffff",darkGreen:"3a3a3a215748006f4d048942489e4276b340a6c63dd2d836ffeb2cffffaa",darkMulti:"3737371f5287197d8c29a86995ce3fffe800ffffff",darkRed:"3434347036339e3c38cc4037e75d1eec8620eeab29f0ce32ffeb2c"},(e=>Tm(Pm(e))));const Vm="symbol",Hm=e=>li(e)?e.map((e=>String(e))):String(e),$m=(e,t)=>e[1]-t[1],Um=(e,t)=>t[1]-e[1];function jm(e,t,i){let n;return nn(t)&&(e.bins&&(t=Math.max(t,e.bins.length)),null!=i&&(t=Math.min(t,Math.floor(dn(e.domain())/i||1)))),ci(t)&&(n=t.step,t=t.interval),rn(t)&&(t=e.type===Jp?gs(t):e.type==em?fs(t):qt("Only time and utc scales accept interval strings."),n&&(t=t.every(n))),t}function qm(e,t,i){let n=e.range(),o=n[0],r=fi(n),s=$m;if(o>r&&(n=r,r=o,o=n,s=Um),o=Math.floor(o),r=Math.ceil(r),t=t.map((t=>[t,e(t)])).filter((e=>o<=e[1]&&e[1]<=r)).sort(s).map((e=>e[0])),i>0&&t.length>1){const e=[t[0],fi(t)];for(;t.length>i&&t.length>=3;)t=t.filter(((e,t)=>!(t%2)));t.length<3&&(t=e)}return t}function Km(e,t){return e.bins?qm(e,e.bins):e.ticks?e.ticks(t):e.domain()}function Gm(e,t,i,n,o,r){const s=t.type;let a=Hm;if(s===Jp||o===Jp)a=e.timeFormat(n);else if(s===em||o===em)a=e.utcFormat(n);else if(Nm(s)){const o=e.formatFloat(n);if(r||t.bins)a=o;else{const e=Ym(t,i,!1);a=t=>e(t)?o(t):""}}else if(t.tickFormat){const o=t.domain();a=e.formatSpan(o[0],o[o.length-1],i,n)}else n&&(a=e.format(n));return a}function Ym(e,t,i){const n=Km(e,t),o=e.base(),r=Math.log(o),s=Math.max(1,o*t/n.length),a=e=>{let t=e/Math.pow(o,Math.round(Math.log(e)/r));return t*o1?n[1]-n[0]:n[0];for(r=1;rZm[e.type]||e.bins)(t)?e_(a):"discrete"===n?i_(a):n_(a)}const e_=e=>(t,i,n)=>{const o=t_(n[i+1],t_(n.max,1/0)),r=o_(t,e),s=o_(o,e);return r&&s?r+" – "+s:s?"< "+s:"≥ "+r},t_=(e,t)=>null!=e?e:t,i_=e=>(t,i)=>i?e(t):null,n_=e=>t=>e(t),o_=(e,t)=>Number.isFinite(e)?t(e):null;function r_(e,t,i){i=i||{};const n=Math.max(3,i.maxlen||7),o=function(e,t,i,n){const o=n||t.type;return rn(i)&&function(e){return xm(e,fm)}(o)&&(i=i.replace(/%a/g,"%A").replace(/%b/g,"%B")),i||o!==Jp?i||o!==em?Jm(e,t,5,null,i,n,!0):e.utcFormat("%A, %d %B %Y, %X UTC"):e.timeFormat("%A, %d %B %Y, %X")}(e,t,i.format,i.formatType);if(Lm(t.type)){const e=Qm(t).slice(1).map(o),i=e.length;return"".concat(i," boundar").concat(1===i?"y":"ies",": ").concat(e.join(", "))}if(Dm(t.type)){const e=t.domain(),i=e.length,r=i>n?e.slice(0,n-2).map(o).join(", ")+", ending with "+e.slice(-1).map(o):e.map(o).join(", ");return"".concat(i," value").concat(1===i?"":"s",": ").concat(r)}{const e=t.domain();return"values from ".concat(o(e[0])," to ").concat(o(fi(e)))}}let s_=0;const a_="p_";function l_(e){return e&&e.gradient}function c_(e,t,i){const n=e.gradient;let o=e.id,r="radial"===n?a_:"";return o||(o=e.id="gradient_"+s_++,"radial"===n?(e.x1=u_(e.x1,.5),e.y1=u_(e.y1,.5),e.r1=u_(e.r1,0),e.x2=u_(e.x2,.5),e.y2=u_(e.y2,.5),e.r2=u_(e.r2,.5),r=a_):(e.x1=u_(e.x1,0),e.y1=u_(e.y1,0),e.x2=u_(e.x2,1),e.y2=u_(e.y2,0))),t[o]=e,"url("+(i||"")+"#"+r+o+")"}function u_(e,t){return null!=e?e:t}function h_(e,t){var i,n=[];return i={gradient:"linear",x1:e?e[0]:0,y1:e?e[1]:0,x2:t?t[0]:1,y2:t?t[1]:0,stops:n,stop:function(e,t){return n.push({offset:e,color:t}),i}}}const d_={basis:{curve:function(e){return new Ph(e)}},"basis-closed":{curve:function(e){return new zh(e)}},"basis-open":{curve:function(e){return new Wh(e)}},bundle:{curve:Hh,tension:"beta",value:.85},cardinal:{curve:jh,tension:"tension",value:0},"cardinal-open":{curve:Kh,tension:"tension",value:0},"cardinal-closed":{curve:Yh,tension:"tension",value:0},"catmull-rom":{curve:hd,tension:"alpha",value:.5},"catmull-rom-closed":{curve:gd,tension:"alpha",value:.5},"catmull-rom-open":{curve:pd,tension:"alpha",value:.5},linear:{curve:_d},"linear-closed":{curve:function(e){return new vd(e)}},monotone:{horizontal:function(e){return new xd(e)},vertical:function(e){return new Sd(e)}},natural:{curve:function(e){return new Dd(e)}},step:{curve:function(e){return new Nd(e,.5)}},"step-after":{curve:function(e){return new Nd(e,1)}},"step-before":{curve:function(e){return new Nd(e,0)}}};function g_(e,t,i){var n=Ki(d_,e)&&d_[e],o=null;return n&&(o=n.curve||n[t||"vertical"],n.tension&&null!=i&&(o=o[n.tension](i))),o}const f_={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},p_=[/([MLHVCSQTAZmlhvcsqtaz])/g,/###/,/(\.\d+)(\.\d)/g,/(\d)([-+])/g,/\s|,|###/];function m_(e){const t=[];let i,n,o,r,s,a,l,c,u,h;const d=e.slice().replace(p_[0],"###$1").split(p_[1]).slice(1);for(l=0,u=d.length;la){const e=o.length;for(c=1,t.push([s].concat(o.slice(c,c+=a))),s="M"===s?"L":"m"===s?"l":s;c1&&(p=Math.sqrt(p),i*=p,n*=p);const m=d/i,_=h/i,v=-h/n,b=d/n,y=m*a+_*l,w=v*a+b*l,C=m*e+_*t,S=v*e+b*t;let x=1/((C-y)*(C-y)+(S-w)*(S-w))-.25;x<0&&(x=0);let k=Math.sqrt(x);r==o&&(k=-k);const D=.5*(y+C)-k*(S-w),L=.5*(w+S)+k*(C-y),N=Math.atan2(w-L,y-D);let E=Math.atan2(S-L,C-D)-N;E<0&&1===r?E+=b_:E>0&&0===r&&(E-=b_);const A=Math.ceil(Math.abs(E/(v_+.001))),M=[];for(let e=0;e+e}function z_(e,t,i){return Math.max(t,Math.min(e,i))}function W_(){var e=R_,t=O_,i=F_,n=P_,o=B_(0),r=o,s=o,a=o,l=null;function c(c,u,h){var d,g=null!=u?u:+e.call(this,c),f=null!=h?h:+t.call(this,c),p=+i.call(this,c),m=+n.call(this,c),_=Math.min(p,m)/2,v=z_(+o.call(this,c),0,_),b=z_(+r.call(this,c),0,_),y=z_(+s.call(this,c),0,_),w=z_(+a.call(this,c),0,_);if(l||(l=d=Od()),v<=0&&b<=0&&y<=0&&w<=0)l.rect(g,f,p,m);else{var C=g+p,S=f+m;l.moveTo(g+v,f),l.lineTo(C-b,f),l.bezierCurveTo(C-T_*b,f,C,f+T_*b,C,f+b),l.lineTo(C,S-w),l.bezierCurveTo(C,S-T_*w,C-T_*w,S,C-w,S),l.lineTo(g+y,S),l.bezierCurveTo(g+T_*y,S,g,S-T_*y,g,S-y),l.lineTo(g,f+v),l.bezierCurveTo(g,f+T_*v,g+T_*v,f,g+v,f),l.closePath()}if(d)return l=null,d+""||null}return c.x=function(t){return arguments.length?(e=B_(t),c):e},c.y=function(e){return arguments.length?(t=B_(e),c):t},c.width=function(e){return arguments.length?(i=B_(e),c):i},c.height=function(e){return arguments.length?(n=B_(e),c):n},c.cornerRadius=function(e,t,i,n){return arguments.length?(o=B_(e),r=null!=t?B_(t):o,a=null!=i?B_(i):o,s=null!=n?B_(n):r,c):o},c.context=function(e){return arguments.length?(l=null==e?null:e,c):l},c}function V_(){var e,t,i,n,o,r,s,a,l=null;function c(e,t,i){const n=i/2;if(o){var c=s-t,u=e-r;if(c||u){var h=Math.sqrt(c*c+u*u),d=(c/=h)*a,g=(u/=h)*a,f=Math.atan2(u,c);l.moveTo(r-d,s-g),l.lineTo(e-c*n,t-u*n),l.arc(e,t,n,f-Math.PI,f),l.lineTo(r+d,s+g),l.arc(r,s,a,f,f+Math.PI)}else l.arc(e,t,n,0,b_);l.closePath()}else o=1;r=e,s=t,a=n}function u(r){var s,a,u,h=r.length,d=!1;for(null==l&&(l=u=Od()),s=0;s<=h;++s)!(se.x||0,U_=e=>e.y||0,j_=e=>!(!1===e.defined),q_=function(){var e=Pd,t=Bd,i=Fd(0),n=null,o=zd,r=Wd,s=Vd,a=null;function l(){var l,c,u=+e.apply(this,arguments),h=+t.apply(this,arguments),d=o.apply(this,arguments)-rd,g=r.apply(this,arguments)-rd,f=Zh(g-d),p=g>d;if(a||(a=l=Od()),hnd)if(f>sd-nd)a.moveTo(h*Qh(d),h*td(d)),a.arc(0,0,h,d,g,!p),u>nd&&(a.moveTo(u*Qh(g),u*td(g)),a.arc(0,0,u,g,d,p));else{var m,_,v=d,b=g,y=d,w=g,C=f,S=f,x=s.apply(this,arguments)/2,k=x>nd&&(n?+n.apply(this,arguments):id(u*u+h*h)),D=ed(Zh(h-u)/2,+i.apply(this,arguments)),L=D,N=D;if(k>nd){var E=ld(k/u*td(x)),A=ld(k/h*td(x));(C-=2*E)>nd?(y+=E*=p?1:-1,w-=E):(C=0,y=w=(d+g)/2),(S-=2*A)>nd?(v+=A*=p?1:-1,b-=A):(S=0,v=b=(d+g)/2)}var M=h*Qh(v),I=h*td(v),T=u*Qh(w),R=u*td(w);if(D>nd){var O,F=h*Qh(b),P=h*td(b),B=u*Qh(y),z=u*td(y);if(fnd?N>nd?(m=$d(B,z,M,I,h,N,p),_=$d(F,P,T,R,h,N,p),a.moveTo(m.cx+m.x01,m.cy+m.y01),Nnd&&C>nd?L>nd?(m=$d(T,R,F,P,u,-L,p),_=$d(M,I,B,z,u,-L,p),a.lineTo(m.cx+m.x01,m.cy+m.y01),Le.startAngle||0)).endAngle((e=>e.endAngle||0)).padAngle((e=>e.padAngle||0)).innerRadius((e=>e.innerRadius||0)).outerRadius((e=>e.outerRadius||0)).cornerRadius((e=>e.cornerRadius||0)),K_=Gd().x($_).y1(U_).y0((e=>(e.y||0)+(e.height||0))).defined(j_),G_=Gd().y(U_).x1($_).x0((e=>(e.x||0)+(e.width||0))).defined(j_),Y_=Kd().x($_).y(U_).defined(j_),Z_=W_().x($_).y(U_).width((e=>e.width||0)).height((e=>e.height||0)).cornerRadius((e=>H_(e.cornerRadiusTopLeft,e.cornerRadius)||0),(e=>H_(e.cornerRadiusTopRight,e.cornerRadius)||0),(e=>H_(e.cornerRadiusBottomRight,e.cornerRadius)||0),(e=>H_(e.cornerRadiusBottomLeft,e.cornerRadius)||0)),X_=function(e,t){var i=null;function n(){var n;if(i||(i=n=Od()),e.apply(this,arguments).draw(i,+t.apply(this,arguments)),n)return i=null,n+""||null}return e="function"==typeof e?e:Fd(e||Yd),t="function"==typeof t?t:Fd(void 0===t?64:+t),n.type=function(t){return arguments.length?(e="function"==typeof t?t:Fd(t),n):e},n.size=function(e){return arguments.length?(t="function"==typeof e?e:Fd(+e),n):t},n.context=function(e){return arguments.length?(i=null==e?null:e,n):i},n}().type((e=>M_(e.shape||"circle"))).size((e=>H_(e.size,64))),Q_=V_().x($_).y(U_).defined(j_).size((e=>e.size||1));function J_(e){return e.cornerRadius||e.cornerRadiusTopLeft||e.cornerRadiusTopRight||e.cornerRadiusBottomRight||e.cornerRadiusBottomLeft}function ev(e,t,i,n){return Z_.context(e)(t,i,n)}var tv=1;function iv(){tv=1}function nv(e,t,i){var n=t.clip,o=e._defs,r=t.clip_id||(t.clip_id="clip"+tv++),s=o.clipping[r]||(o.clipping[r]={id:r});return Oi(n)?s.path=n(null):J_(i)?s.path=ev(null,i,0,0):(s.width=i.width||0,s.height=i.height||0),"url(#"+r+")"}function ov(e){this.clear(),e&&this.union(e)}function rv(e){this.mark=e,this.bounds=this.bounds||new ov}function sv(e){rv.call(this,e),this.items=this.items||[]}function av(e){this._pending=0,this._loader=e||yl()}function lv(e){e._pending+=1}function cv(e){e._pending-=1}function uv(e,t,i){if(t.stroke&&0!==t.opacity&&0!==t.strokeOpacity){const n=null!=t.strokeWidth?+t.strokeWidth:1;e.expand(n+(i?function(e,t){return e.strokeJoin&&"miter"!==e.strokeJoin?0:t}(t,n):0))}return e}ov.prototype={clone(){return new ov(this)},clear(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},empty(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},equals(e){return this.x1===e.x1&&this.y1===e.y1&&this.x2===e.x2&&this.y2===e.y2},set(e,t,i,n){return ithis.x2&&(this.x2=e),t>this.y2&&(this.y2=t),this},expand(e){return this.x1-=e,this.y1-=e,this.x2+=e,this.y2+=e,this},round(){return this.x1=Math.floor(this.x1),this.y1=Math.floor(this.y1),this.x2=Math.ceil(this.x2),this.y2=Math.ceil(this.y2),this},scale(e){return this.x1*=e,this.y1*=e,this.x2*=e,this.y2*=e,this},translate(e,t){return this.x1+=e,this.x2+=e,this.y1+=t,this.y2+=t,this},rotate(e,t,i){const n=this.rotatedPoints(e,t,i);return this.clear().add(n[0],n[1]).add(n[2],n[3]).add(n[4],n[5]).add(n[6],n[7])},rotatedPoints(e,t,i){var{x1:n,y1:o,x2:r,y2:s}=this,a=Math.cos(e),l=Math.sin(e),c=t-t*a+i*l,u=i-t*l-i*a;return[a*n-l*o+c,l*n+a*o+u,a*n-l*s+c,l*n+a*s+u,a*r-l*o+c,l*r+a*o+u,a*r-l*s+c,l*r+a*s+u]},union(e){return e.x1this.x2&&(this.x2=e.x2),e.y2>this.y2&&(this.y2=e.y2),this},intersect(e){return e.x1>this.x1&&(this.x1=e.x1),e.y1>this.y1&&(this.y1=e.y1),e.x2=e.x2&&this.y1<=e.y1&&this.y2>=e.y2},alignsWith(e){return e&&(this.x1==e.x1||this.x2==e.x2||this.y1==e.y1||this.y2==e.y2)},intersects(e){return e&&!(this.x2e.x2||this.y2e.y2)},contains(e,t){return!(ethis.x2||tthis.y2)},width(){return this.x2-this.x1},height(){return this.y2-this.y1}},Xi(sv,rv),av.prototype={pending(){return this._pending},sanitizeURL(e){const t=this;return lv(t),t._loader.sanitize(e,{context:"href"}).then((e=>(cv(t),e))).catch((()=>(cv(t),null)))},loadImage(e){const t=this,i=Xd();return lv(t),t._loader.sanitize(e,{context:"image"}).then((e=>{const n=e.href;if(!n||!i)throw{url:n};const o=new i,r=Ki(e,"crossOrigin")?e.crossOrigin:"anonymous";return null!=r&&(o.crossOrigin=r),o.onload=()=>cv(t),o.onerror=()=>cv(t),o.src=n,o})).catch((e=>(cv(t),{complete:!1,width:0,height:0,src:e&&e.url||""})))},ready(){const e=this;return new Promise((t=>{!function i(n){e.pending()?setTimeout((()=>{i(!0)}),10):t(n)}(!1)}))}};const hv=b_-1e-8;let dv,gv,fv,pv,mv,_v,vv,bv;const yv=(e,t)=>dv.add(e,t),wv=(e,t)=>yv(gv=e,fv=t),Cv=e=>yv(e,dv.y1),Sv=e=>yv(dv.x1,e),xv=(e,t)=>mv*e+vv*t,kv=(e,t)=>_v*e+bv*t,Dv=(e,t)=>yv(xv(e,t),kv(e,t)),Lv=(e,t)=>wv(xv(e,t),kv(e,t));function Nv(e,t){return dv=e,t?(pv=t*__,mv=bv=Math.cos(pv),_v=Math.sin(pv),vv=-_v):(mv=bv=1,pv=_v=vv=0),Ev}const Ev={beginPath(){},closePath(){},moveTo:Lv,lineTo:Lv,rect(e,t,i,n){pv?(Dv(e+i,t),Dv(e+i,t+n),Dv(e,t+n),Lv(e,t)):(yv(e+i,t+n),wv(e,t))},quadraticCurveTo(e,t,i,n){const o=xv(e,t),r=kv(e,t),s=xv(i,n),a=kv(i,n);Av(gv,o,s,Cv),Av(fv,r,a,Sv),wv(s,a)},bezierCurveTo(e,t,i,n,o,r){const s=xv(e,t),a=kv(e,t),l=xv(i,n),c=kv(i,n),u=xv(o,r),h=kv(o,r);Mv(gv,s,l,u,Cv),Mv(fv,a,c,h,Sv),wv(u,h)},arc(e,t,i,n,o,r){if(n+=pv,o+=pv,gv=i*Math.cos(o)+e,fv=i*Math.sin(o)+t,Math.abs(o-n)>hv)yv(e-i,t-i),yv(e+i,t+i);else{const s=n=>yv(i*Math.cos(n)+e,i*Math.sin(n)+t);let a,l;if(s(n),s(o),o!==n)if((n%=b_)<0&&(n+=b_),(o%=b_)<0&&(o+=b_),oo;++l,a-=v_)s(a);else for(a=n-n%v_+v_,l=0;l<4&&a1e-14?(l=s*s+a*r,l>=0&&(l=Math.sqrt(l),c=(-s+l)/r,u=(-s-l)/r)):c=.5*a/s,0m)return!1;g>p&&(p=g)}else if(h>0){if(g0&&(e.globalAlpha=i,e.fillStyle=$v(e,t,t.fill),!0)}var jv=[];function qv(e,t,i){var n=null!=(n=t.strokeWidth)?n:1;return!(n<=0)&&(i*=null==t.strokeOpacity?1:t.strokeOpacity)>0&&(e.globalAlpha=i,e.strokeStyle=$v(e,t,t.stroke),e.lineWidth=n,e.lineCap=t.strokeCap||"butt",e.lineJoin=t.strokeJoin||"miter",e.miterLimit=t.strokeMiterLimit||10,e.setLineDash&&(e.setLineDash(t.strokeDash||jv),e.lineDashOffset=t.strokeDashOffset||0),!0)}function Kv(e,t){return e.zindex-t.zindex||e.index-t.index}function Gv(e){if(!e.zdirty)return e.zitems;var t,i,n,o=e.items,r=[];for(i=0,n=o.length;i=0;)if(i=t(o[n]))return i;if(o===r)for(n=(o=e.items).length;--n>=0;)if(!o[n].zindex&&(i=t(o[n])))return i;return null}function Xv(e){return function(t,i,n){Yv(i,(i=>{n&&!n.intersects(i.bounds)||Jv(e,t,i,i)}))}}function Qv(e){return function(t,i,n){!i.items.length||n&&!n.intersects(i.bounds)||Jv(e,t,i.items[0],i.items)}}function Jv(e,t,i,n){var o=null==i.opacity?1:i.opacity;0!==o&&(e(t,n)||(Wv(t,i),i.fill&&Uv(t,i,o)&&t.fill(),i.stroke&&qv(t,i,o)&&t.stroke()))}function eb(e){return e=e||Jt,function(t,i,n,o,r,s){return n*=t.pixelRatio,o*=t.pixelRatio,Zv(i,(i=>{const a=i.bounds;if((!a||a.contains(r,s))&&a)return e(t,i,n,o,r,s)?i:void 0}))}}function tb(e,t){return function(i,n,o,r){var s,a,l=Array.isArray(n)?n[0]:n,c=null==t?l.fill:t,u=l.stroke&&i.isPointInStroke;return u&&(s=l.strokeWidth,a=l.strokeCap,i.lineWidth=null!=s?s:1,i.lineCap=null!=a?a:"butt"),!e(i,n)&&(c&&i.isPointInPath(o,r)||u&&i.isPointInStroke(o,r))}}function ib(e){return eb(tb(e))}function nb(e,t){return"translate("+e+","+t+")"}function ob(e){return"rotate("+e+")"}function rb(e){return nb(e.x||0,e.y||0)}function sb(e,t,i){function n(e,i){var n=i.x||0,o=i.y||0,r=i.angle||0;e.translate(n,o),r&&e.rotate(r*=__),e.beginPath(),t(e,i),r&&e.rotate(-r),e.translate(-n,-o)}return{type:e,tag:"path",nested:!1,attr:function(e,i){e("transform",function(e){return nb(e.x||0,e.y||0)+(e.angle?" "+ob(e.angle):"")}(i)),e("d",t(null,i))},bound:function(e,i){return t(Nv(e,i.angle),i),uv(e,i).translate(i.x||0,i.y||0)},draw:Xv(n),pick:ib(n),isect:i||Ov(n)}}var ab=sb("arc",(function(e,t){return q_.context(e)(t)}));function lb(e,t,i){function n(e,i){e.beginPath(),t(e,i)}const o=tb(n);return{type:e,tag:"path",nested:!0,attr:function(e,i){var n=i.mark.items;n.length&&e("d",t(null,n))},bound:function(e,i){var n=i.items;return 0===n.length?e:(t(Nv(e),n),uv(e,n[0]))},draw:Qv(n),pick:function(e,t,i,n,r,s){var a=t.items,l=t.bounds;return!a||!a.length||l&&!l.contains(r,s)?null:(i*=e.pixelRatio,n*=e.pixelRatio,o(e,a,i,n)?a[0]:null)},isect:Fv,tip:i}}var cb=lb("area",(function(e,t){const i=t[0],n=i.interpolate||"linear";return("horizontal"===i.orient?G_:K_).curve(g_(n,i.orient,i.tension)).context(e)(t)}),(function(e,t){for(var i,n,o="horizontal"===e[0].orient?t[1]:t[0],r="horizontal"===e[0].orient?"y":"x",s=e.length,a=1/0;--s>=0;)!1!==e[s].defined&&(n=Math.abs(e[s][r]-o)).5&&t<1.5?.5-Math.abs(t-1):0}function db(e,t){const i=hb(t);e("d",ev(null,t,i,i))}function gb(e,t,i,n){const o=hb(t);e.beginPath(),ev(e,t,(i||0)+o,(n||0)+o)}const fb=tb(gb),pb=tb(gb,!1),mb=tb(gb,!0);var _b={type:"group",tag:"g",nested:!1,attr:function(e,t){e("transform",rb(t))},bound:function(e,t){if(!t.clip&&t.items){const i=t.items,n=i.length;for(let t=0;t{const n=t.x||0,o=t.y||0,r=t.strokeForeground,s=null==t.opacity?1:t.opacity;(t.stroke||t.fill)&&s&&(gb(e,t,n,o),Wv(e,t),t.fill&&Uv(e,t,s)&&e.fill(),t.stroke&&!r&&qv(e,t,s)&&e.stroke()),e.save(),e.translate(n,o),t.clip&&ub(e,t),i&&i.translate(-n,-o),Yv(t,(t=>{this.draw(e,t,i)})),i&&i.translate(n,o),e.restore(),r&&t.stroke&&s&&(gb(e,t,n,o),Wv(e,t),qv(e,t,s)&&e.stroke())}))},pick:function(e,t,i,n,o,r){if(t.bounds&&!t.bounds.contains(o,r)||!t.items)return null;const s=i*e.pixelRatio,a=n*e.pixelRatio;return Zv(t,(l=>{let c,u,h;const d=l.bounds;if(d&&!d.contains(o,r))return;u=l.x||0,h=l.y||0;const g=u+(l.width||0),f=h+(l.height||0),p=l.clip;if(p&&(og||rf))return;if(e.save(),e.translate(u,h),u=o-u,h=r-h,p&&J_(l)&&!mb(e,l,s,a))return e.restore(),null;const m=l.strokeForeground,_=!1!==t.interactive;return _&&m&&l.stroke&&pb(e,l,s,a)?(e.restore(),l):(c=Zv(l,(e=>function(e,t,i){return(!1!==e.interactive||"group"===e.marktype)&&e.bounds&&e.bounds.contains(t,i)}(e,u,h)?this.pick(e,i,n,u,h):null)),!c&&_&&(l.fill||!m&&l.stroke)&&fb(e,l,s,a)&&(c=l),e.restore(),c||null)}))},isect:Pv,content:function(e,t,i){e("clip-path",t.clip?nv(i,t,t):null)},background:function(e,t){e("class","background"),e("aria-hidden",!0),db(e,t)},foreground:function(e,t){e("class","foreground"),e("aria-hidden",!0),t.strokeForeground?db(e,t):e("d","")}},vb={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"};function bb(e,t){var i=e.image;return(!i||e.url&&e.url!==i.url)&&(i={complete:!1,width:0,height:0},t.loadImage(e.url).then((t=>{e.image=t,e.image.url=e.url}))),i}function yb(e,t){return null!=e.width?e.width:t&&t.width?!1!==e.aspect&&e.height?e.height*t.width/t.height:t.width:0}function wb(e,t){return null!=e.height?e.height:t&&t.height?!1!==e.aspect&&e.width?e.width*t.height/t.width:t.height:0}function Cb(e,t){return"center"===e?t/2:"right"===e?t:0}function Sb(e,t){return"middle"===e?t/2:"bottom"===e?t:0}var xb={type:"image",tag:"image",nested:!1,attr:function(e,t,i){const n=bb(t,i),o=yb(t,n),r=wb(t,n),s=(t.x||0)-Cb(t.align,o),a=(t.y||0)-Sb(t.baseline,r);e("href",!n.src&&n.toDataURL?n.toDataURL():n.src||"",vb["xmlns:xlink"],"xlink:href"),e("transform",nb(s,a)),e("width",o),e("height",r),e("preserveAspectRatio",!1===t.aspect?"none":"xMidYMid")},bound:function(e,t){const i=t.image,n=yb(t,i),o=wb(t,i),r=(t.x||0)-Cb(t.align,n),s=(t.y||0)-Sb(t.baseline,o);return e.set(r,s,r+n,s+o)},draw:function(e,t,i){Yv(t,(t=>{if(i&&!i.intersects(t.bounds))return;const n=bb(t,this);let o=yb(t,n),r=wb(t,n);if(0===o||0===r)return;let s,a,l,c,u=(t.x||0)-Cb(t.align,o),h=(t.y||0)-Sb(t.baseline,r);!1!==t.aspect&&(a=n.width/n.height,l=t.width/t.height,a==a&&l==l&&a!==l&&(l=0;)if(!1!==e[r].defined&&(i=e[r].x-t[0])*i+(n=e[r].y-t[1])*n{if(!i||i.intersects(t.bounds)){var n=null==t.opacity?1:t.opacity;n&&Ab(e,t,n)&&(Wv(e,t),e.stroke())}}))},pick:eb((function(e,t,i,n){return!!e.isPointInStroke&&Ab(e,t,1)&&e.isPointInStroke(i,n)})),isect:Bv},Ib=sb("shape",(function(e,t){return(t.mark.shape||t.shape).context(e)(t)})),Tb=sb("symbol",(function(e,t){return X_.context(e)(t)}),Fv);const Rb=ln();var Ob={height:Vb,measureWidth:zb,estimateWidth:Pb,width:Pb,canvas:Fb};function Fb(e){Ob.width=e&&Tv?zb:Pb}function Pb(e,t){return Bb(jb(e,t),Vb(e))}function Bb(e,t){return~~(.8*e.length*t)}function zb(e,t){return Vb(e)<=0||!(t=jb(e,t))?0:Wb(t,Kb(e))}function Wb(e,t){const i=`(${t}) ${e}`;let n=Rb.get(i);return void 0===n&&(Tv.font=t,n=Tv.measureText(e).width,Rb.set(i,n)),n}function Vb(e){return null!=e.fontSize?+e.fontSize||0:11}function Hb(e){return null!=e.lineHeight?e.lineHeight:Vb(e)+2}function $b(e){return t=e.lineBreak&&e.text&&!li(e.text)?e.text.split(e.lineBreak):e.text,li(t)?t.length>1?t:t[0]:t;var t}function Ub(e){const t=$b(e);return(li(t)?t.length-1:0)*Hb(e)}function jb(e,t){const i=null==t?"":(t+"").trim();return e.limit>0&&i.length?function(e,t){var i=+e.limit,n=function(e){if(Ob.width===zb){const t=Kb(e);return e=>Wb(e,t)}{const t=Vb(e);return e=>Bb(e,t)}}(e);if(n(t)>>1,n(t.slice(o))>i?a=o+1:l=o;return r+t.slice(a)}for(;a>>1),n(t.slice(0,o))Math.max(e,Ob.width(t,i))),0)):n=Ob.width(t,h),"center"===r?c-=n/2:"right"===r&&(c-=n),e.set(c+=a,u+=l,c+n,u+o),t.angle&&!i)e.rotate(t.angle*__,a,l);else if(2===i)return e.rotatedPoints(t.angle*__,a,l);return e}var Jb={arc:ab,area:cb,group:_b,image:xb,line:kb,path:Lb,rect:Eb,rule:Mb,shape:Ib,symbol:Tb,text:{type:"text",tag:"text",nested:!1,attr:function(e,t){var i,n=t.dx||0,o=(t.dy||0)+Gb(t),r=Xb(t),s=r.x1,a=r.y1,l=t.angle||0;e("text-anchor",Yb[t.align]||"start"),l?(i=nb(s,a)+" "+ob(l),(n||o)&&(i+=" "+nb(n,o))):i=nb(s+n,a+o),e("transform",i)},bound:Qb,draw:function(e,t,i){Yv(t,(t=>{var n,o,r,s,a,l,c,u=null==t.opacity?1:t.opacity;if(!(i&&!i.intersects(t.bounds)||0===u||t.fontSize<=0||null==t.text||0===t.text.length)){if(e.font=Kb(t),e.textAlign=t.align||"left",o=(n=Xb(t)).x1,r=n.y1,t.angle&&(e.save(),e.translate(o,r),e.rotate(t.angle*__),o=r=0),o+=t.dx||0,r+=(t.dy||0)+Gb(t),l=$b(t),Wv(e,t),li(l))for(a=Hb(t),s=0;s=0;)if(!1!==e[o].defined&&(i=e[o].x-t[0])*i+(n=e[o].y-t[1])*n<(i=e[o].size||1)*i)return e[o];return null}))};function ey(e,t,i){var n=Jb[e.mark.marktype],o=t||n.bound;return n.nested&&(e=e.mark),o(e.bounds||(e.bounds=new ov),e,i)}var ty={mark:null};function iy(e,t,i){var n,o,r,s,a=Jb[e.marktype],l=a.bound,c=e.items,u=c&&c.length;if(a.nested)return u?r=c[0]:(ty.mark=e,r=ty),s=ey(r,l,i),t&&t.union(s)||s;if(t=t||e.bounds&&e.bounds.clear()||new ov,u)for(n=0,o=c.length;nt;)e.removeChild(i[--n]);return e}function gy(e){return"mark-"+e.marktype+(e.role?" role-"+e.role:"")+(e.name?" "+e.name:"")}function fy(e,t){const i=t.getBoundingClientRect();return[e.clientX-i.left-(t.clientLeft||0),e.clientY-i.top-(t.clientTop||0)]}function py(e,t){this._active=null,this._handlers={},this._loader=e||yl(),this._tooltip=t||my}function my(e,t,i,n){e.element().setAttribute("title",n||"")}function _y(e){this._el=null,this._bgcolor=null,this._loader=new av(e)}ay.prototype={toJSON(e){return oy(this.root,e||0)},mark(e,t,i){const n=ly(e,t=t||this.root.items[0]);return t.items[i]=n,n.zindex&&(n.group.zdirty=!0),n}},py.prototype={initialize(e,t,i){return this._el=e,this._obj=i||null,this.origin(t)},element(){return this._el},canvas(){return this._el&&this._el.firstChild},origin(e){return arguments.length?(this._origin=e||[0,0],this):this._origin.slice()},scene(e){return arguments.length?(this._scene=e,this):this._scene},on(){},off(){},_handlerIndex(e,t,i){for(let n=e?e.length:0;--n>=0;)if(e[n].type===t&&(!i||e[n].handler===i))return n;return-1},handlers(e){const t=this._handlers,i=[];if(e)i.push(...t[this.eventName(e)]);else for(const e in t)i.push(...t[e]);return i},eventName(e){const t=e.indexOf(".");return t<0?e:e.slice(0,t)},handleHref(e,t,i){this._loader.sanitize(i,{context:"href"}).then((t=>{const i=new MouseEvent(e.type,e),n=cy(null,"a");for(const e in t)n.setAttribute(e,t[e]);n.dispatchEvent(i)})).catch((()=>{}))},handleTooltip(e,t,i){if(t&&null!=t.tooltip){t=function(e,t,i,n){var o,r,s=e&&e.mark;if(s&&(o=Jb[s.marktype]).tip){for((r=fy(t,i))[0]-=n[0],r[1]-=n[1];e=e.mark.group;)r[0]-=e.x||0,r[1]-=e.y||0;e=o.tip(s.items,r)}return e}(t,e,this.canvas(),this._origin);const n=i&&t&&t.tooltip||null;this._tooltip.call(this._obj,this,e,t,n)}},getItemBoundingClientRect(e){const t=this.canvas();if(!t)return;const i=t.getBoundingClientRect(),n=this._origin,o=e.bounds,r=o.width(),s=o.height();let a=o.x1+n[0]+i.left,l=o.y1+n[1]+i.top;for(;e.mark&&(e=e.mark.group);)a+=e.x||0,l+=e.y||0;return{x:a,y:l,width:r,height:s,left:a,top:l,right:a+r,bottom:l+s}}},_y.prototype={initialize(e,t,i,n,o){return this._el=e,this.resize(t,i,n,o)},element(){return this._el},canvas(){return this._el&&this._el.firstChild},background(e){return 0===arguments.length?this._bgcolor:(this._bgcolor=e,this)},resize(e,t,i,n){return this._width=e,this._height=t,this._origin=i||[0,0],this._scale=n||1,this},dirty(){},render(e){const t=this;return t._call=function(){t._render(e)},t._call(),t._call=null,t},_render(){},renderAsync(e){const t=this.render(e);return this._ready?this._ready.then((()=>t)):Promise.resolve(t)},_load(e,t){var i=this,n=i._loader[e](t);if(!i._ready){const e=i._call;i._ready=i._loader.ready().then((t=>{t&&e(),i._ready=null}))}return n},sanitizeURL(e){return this._load("sanitizeURL",e)},loadImage(e){return this._load("loadImage",e)}};const vy="dragenter",by="dragleave",yy="dragover",wy="mousedown",Cy="mousemove",Sy="mouseout",xy="mouseover",ky="click",Dy="mousewheel",Ly="touchstart",Ny="touchmove",Ey="touchend",Ay=Cy,My=Sy,Iy=ky;function Ty(e,t){py.call(this,e,t),this._down=null,this._touch=null,this._first=!0,this._events={}}function Ry(e,t){(e=>e===Ly||e===Ny||e===Ey?[Ly,Ny,Ey]:[e])(t).forEach((t=>function(e,t){const i=e.canvas();i&&!e._events[t]&&(e._events[t]=1,i.addEventListener(t,e[t]?i=>e[t](i):i=>e.fire(t,i)))}(e,t)))}function Oy(e,t,i){return function(n){const o=this._active,r=this.pickEvent(n);r===o||(o&&o.exit||this.fire(i,n),this._active=r,this.fire(t,n)),this.fire(e,n)}}function Fy(e){return function(t){this.fire(e,t),this._active=null}}Xi(Ty,py,{initialize(e,t,i){return this._canvas=e&&uy(e,"canvas"),[ky,wy,Cy,Sy,by].forEach((e=>Ry(this,e))),py.prototype.initialize.call(this,e,t,i)},canvas(){return this._canvas},context(){return this._canvas.getContext("2d")},events:["keydown","keypress","keyup",vy,by,yy,wy,"mouseup",Cy,Sy,xy,ky,"dblclick","wheel",Dy,Ly,Ny,Ey],DOMMouseScroll(e){this.fire(Dy,e)},mousemove:Oy(Cy,xy,Sy),dragover:Oy(yy,vy,by),mouseout:Fy(Sy),dragleave:Fy(by),mousedown(e){this._down=this._active,this.fire(wy,e)},click(e){this._down===this._active&&(this.fire(ky,e),this._down=null)},touchstart(e){this._touch=this.pickEvent(e.changedTouches[0]),this._first&&(this._active=this._touch,this._first=!1),this.fire(Ly,e,!0)},touchmove(e){this.fire(Ny,e,!0)},touchend(e){this.fire(Ey,e,!0),this._touch=null},fire(e,t,i){const n=i?this._touch:this._active,o=this._handlers[e];if(t.vegaType=e,e===Iy&&n&&n.href?this.handleHref(t,n,n.href):e!==Ay&&e!==My||this.handleTooltip(t,n,e!==My),o)for(let e=0,i=o.length;e=0&&n.splice(o,1),this},pickEvent(e){const t=fy(e,this._canvas),i=this._origin;return this.pick(this._scene,t[0],t[1],t[0]-i[0],t[1]-i[1])},pick(e,t,i,n,o){const r=this.context();return Jb[e.marktype].pick.call(this,r,e,t,i,n,o)}});var Py="undefined"!=typeof window&&window.devicePixelRatio||1;function By(e){_y.call(this,e),this._options={},this._redraw=!1,this._dirty=new ov,this._tempb=new ov}const zy=_y.prototype;function Wy(e,t){py.call(this,e,t);const i=this;i._hrefHandler=Vy(i,((e,t)=>{t&&t.href&&i.handleHref(e,t,t.href)})),i._tooltipHandler=Vy(i,((e,t)=>{i.handleTooltip(e,t,e.type!==My)}))}Xi(By,_y,{initialize(e,t,i,n,o,r){return this._options=r||{},this._canvas=this._options.externalContext?null:Zd(1,1,this._options.type),e&&this._canvas&&(dy(e,0).appendChild(this._canvas),this._canvas.setAttribute("class","marks")),zy.initialize.call(this,e,t,i,n,o)},resize(e,t,i,n){if(zy.resize.call(this,e,t,i,n),this._canvas)!function(e,t,i,n,o,r){const s="undefined"!=typeof HTMLElement&&e instanceof HTMLElement&&null!=e.parentNode,a=e.getContext("2d"),l=s?Py:o;e.width=t*l,e.height=i*l;for(const e in r)a[e]=r[e];s&&1!==l&&(e.style.width=t+"px",e.style.height=i+"px"),a.pixelRatio=l,a.setTransform(l,0,0,l,l*n[0],l*n[1])}(this._canvas,this._width,this._height,this._origin,this._scale,this._options.context);else{const e=this._options.externalContext;e||qt("CanvasRenderer is missing a valid canvas or context"),e.scale(this._scale,this._scale),e.translate(this._origin[0],this._origin[1])}return this._redraw=!0,this},canvas(){return this._canvas},context(){return this._options.externalContext||(this._canvas?this._canvas.getContext("2d"):null)},dirty(e){const t=this._tempb.clear().union(e.bounds);let i=e.mark.group;for(;i;)t.translate(i.x||0,i.y||0),i=i.mark.group;this._dirty.union(t)},_render(e){const t=this.context(),i=this._origin,n=this._width,o=this._height,r=this._dirty,s=((e,t,i)=>(new ov).set(0,0,t,i).translate(-e[0],-e[1]))(i,n,o);t.save();const a=this._redraw||r.empty()?(this._redraw=!1,s.expand(1)):function(e,t,i){return t.expand(1).round(),e.pixelRatio%1&&t.scale(e.pixelRatio).round().scale(1/e.pixelRatio),t.translate(-i[0]%1,-i[1]%1),e.beginPath(),e.rect(t.x1,t.y1,t.width(),t.height()),e.clip(),t}(t,s.intersect(r),i);return this.clear(-i[0],-i[1],n,o),this.draw(t,e,a),t.restore(),r.clear(),this},draw(e,t,i){const n=Jb[t.marktype];t.clip&&function(e,t){var i=t.clip;e.save(),Oi(i)?(e.beginPath(),i(e),e.clip()):ub(e,t.group)}(e,t),n.draw.call(this,e,t,i),t.clip&&e.restore()},clear(e,t,i,n){const o=this._options,r=this.context();"pdf"===o.type||o.externalContext||r.clearRect(e,t,i,n),null!=this._bgcolor&&(r.fillStyle=this._bgcolor,r.fillRect(e,t,i,n))}});const Vy=(e,t)=>i=>{let n=i.target.__data__;n=Array.isArray(n)?n[0]:n,i.vegaType=i.type,t.call(e._obj,i,n)};Xi(Wy,py,{initialize(e,t,i){let n=this._svg;return n&&(n.removeEventListener(Iy,this._hrefHandler),n.removeEventListener(Ay,this._tooltipHandler),n.removeEventListener(My,this._tooltipHandler)),this._svg=n=e&&uy(e,"svg"),n&&(n.addEventListener(Iy,this._hrefHandler),n.addEventListener(Ay,this._tooltipHandler),n.addEventListener(My,this._tooltipHandler)),py.prototype.initialize.call(this,e,t,i)},canvas(){return this._svg},on(e,t){const i=this.eventName(e),n=this._handlers;if(this._handlerIndex(n[i],e,t)<0){const o={type:e,handler:t,listener:Vy(this,t)};(n[i]||(n[i]=[])).push(o),this._svg&&this._svg.addEventListener(i,o.listener)}return this},off(e,t){const i=this.eventName(e),n=this._handlers[i],o=this._handlerIndex(n,e,t);return o>=0&&(this._svg&&this._svg.removeEventListener(i,n[o].listener),n.splice(o,1)),this}});const Hy="aria-hidden",$y="aria-label",Uy="role",jy="aria-roledescription",qy="graphics-object",Ky="graphics-symbol",Gy=(e,t,i)=>({[Uy]:e,[jy]:t,[$y]:i||void 0}),Yy=vn(["axis-domain","axis-grid","axis-label","axis-tick","axis-title","legend-band","legend-entry","legend-gradient","legend-label","legend-title","legend-symbol","title"]),Zy={axis:{desc:"axis",caption:function(e){const t=e.datum,i=e.orient,n=t.title?tw(e):null,o=e.context,r=o.scales[t.scale].value,s=o.dataflow.locale(),a=r.type;return("left"===i||"right"===i?"Y":"X")+"-axis"+(n?` titled '${n}'`:"")+` for a ${Dm(a)?"discrete":a} scale`+` with ${r_(s,r,e)}`}},legend:{desc:"legend",caption:function(e){const t=e.datum,i=t.title?tw(e):null,n=`${t.type||""} legend`.trim(),o=t.scales,r=Object.keys(o),s=e.context,a=s.scales[o[r[0]]].value,l=s.dataflow.locale();return((c=n).length?c[0].toUpperCase()+c.slice(1):c)+(i?` titled '${i}'`:"")+` for ${function(e){return(e=e.map((e=>e+("fill"===e||"stroke"===e?" color":"")))).length<2?e[0]:e.slice(0,-1).join(", ")+" and "+fi(e)}(r)}`+` with ${r_(l,a,e)}`;var c}},"title-text":{desc:"title",caption:e=>`Title text '${ew(e)}'`},"title-subtitle":{desc:"subtitle",caption:e=>`Subtitle text '${ew(e)}'`}},Xy={ariaRole:Uy,ariaRoleDescription:jy,description:$y};function Qy(e,t){const i=!1===t.aria;if(e(Hy,i||void 0),i||null==t.description)for(const t in Xy)e(Xy[t],void 0);else{const i=t.mark.marktype;e($y,t.description),e(Uy,t.ariaRole||("group"===i?qy:Ky)),e(jy,t.ariaRoleDescription||`${i} mark`)}}function Jy(e){return!1===e.aria?{[Hy]:!0}:Yy[e.role]?null:Zy[e.role]?function(e,t){try{const i=e.items[0],n=t.caption||(()=>"");return Gy(t.role||Ky,t.desc,i.description||n(i))}catch(e){return null}}(e,Zy[e.role]):function(e){const t=e.marktype,i="group"===t||"text"===t||e.items.some((e=>null!=e.description&&!1!==e.aria));return Gy(i?qy:Ky,`${t} mark container`,e.description)}(e)}function ew(e){return Ti(e.text).join(" ")}function tw(e){try{return Ti(fi(e.items).items[0].text).join(" ")}catch(e){return null}}const iw=e=>(e+"").replace(/&/g,"&").replace(//g,">");function nw(){let e="",t="",i="";const n=[],o=()=>t=i="",r=(e,i)=>{var n;return null!=i&&(t+=` ${e}="${n=i,iw(n).replace(/"/g,""").replace(/\t/g," ").replace(/\n/g," ").replace(/\r/g," ")}"`),s},s={open(a,...l){(r=>{t&&(e+=`${t}>${i}`,o()),n.push(r)})(a),t="<"+a;for(const e of l)for(const t in e)r(t,e[t]);return s},close(){const r=n.pop();return e+=t?t+(i?`>${i}`:"/>"):``,o(),s},attr:r,text:e=>(i+=iw(e),s),toString:()=>e};return s}const ow=e=>rw(nw(),e)+"";function rw(e,t){if(e.open(t.tagName),t.hasAttributes()){const i=t.attributes,n=i.length;for(let t=0;t1&&e.previousSibling!=t}(s,i))&&t.insertBefore(s,i?i.nextSibling:t.firstChild),s}Xi(uw,_y,{initialize(e,t,i,n,o){return this._defs={},this._clearDefs(),e&&(this._svg=hy(e,0,"svg",cw),this._svg.setAttributeNS(lw,"xmlns",cw),this._svg.setAttributeNS(lw,"xmlns:xlink",vb["xmlns:xlink"]),this._svg.setAttribute("version",vb.version),this._svg.setAttribute("class","marks"),dy(e,1),this._root=hy(this._svg,0,"g",cw),ww(this._root,aw),dy(this._svg,1)),this.background(this._bgcolor),hw.initialize.call(this,e,t,i,n,o)},background(e){return arguments.length&&this._svg&&this._svg.style.setProperty("background-color",e),hw.background.apply(this,arguments)},resize(e,t,i,n){return hw.resize.call(this,e,t,i,n),this._svg&&(ww(this._svg,{width:this._width*this._scale,height:this._height*this._scale,viewBox:`0 0 ${this._width} ${this._height}`}),this._root.setAttribute("transform",`translate(${this._origin})`)),this._dirty=[],this},canvas(){return this._svg},svg(){const e=this._svg,t=this._bgcolor;if(!e)return null;let i;t&&(e.removeAttribute("style"),i=hy(e,0,"rect",cw),ww(i,{width:this._width,height:this._height,fill:t}));const n=ow(e);return t&&(e.removeChild(i),this._svg.style.setProperty("background-color",t)),n},_render(e){return this._dirtyCheck()&&(this._dirtyAll&&this._clearDefs(),this.mark(this._root,e),dy(this._root,1)),this.defs(),this._dirty=[],++this._dirtyID,this},dirty(e){e.dirty!==this._dirtyID&&(e.dirty=this._dirtyID,this._dirty.push(e))},isDirty(e){return this._dirtyAll||!e._svg||e.dirty===this._dirtyID},_dirtyCheck(){this._dirtyAll=!0;const e=this._dirty;if(!e.length||!this._dirtyID)return!0;const t=++this._dirtyID;let i,n,o,r,s,a,l;for(s=0,a=e.length;s{e.dirty=t}))),n.zdirty||(i.exit?(r.nested&&n.items.length?(l=n.items[0],l._svg&&this._update(r,l._svg,l)):i._svg&&(l=i._svg.parentNode,l&&l.removeChild(i._svg)),i._svg=null):(i=r.nested?n.items[0]:i,i._update!==t&&(i._svg&&i._svg.ownerSVGElement?this._update(r,i._svg,i):(this._dirtyAll=!1,dw(i,t)),i._update=t)));return!this._dirtyAll},mark(e,t,i){if(!this.isDirty(t))return t._svg;const n=this._svg,o=Jb[t.marktype],r=!1===t.interactive?"none":null,s="g"===o.tag;let a=null,l=0;const c=pw(t,e,i,"g",n);c.setAttribute("class",gy(t));const u=Jy(t);for(const e in u)Cw(c,e,u[e]);s||Cw(c,"pointer-events",r),Cw(c,"clip-path",t.clip?nv(this,t,t.group):null);const h=e=>{const t=this.isDirty(e),i=pw(e,c,a,o.tag,n);t&&(this._update(o,i,e),s&&function(e,t,i){t=t.lastChild.previousSibling;let n,o=0;Yv(i,(i=>{n=e.mark(t,i,n),++o})),dy(t,1+o)}(this,i,e)),a=i,++l};return o.nested?t.items.length&&h(t.items[0]):Yv(t,h),dy(c,l),c},_update(e,t,i){mw=t,_w=t.__values__,Qy(bw,i),e.attr(bw,i,this);const n=vw[e.type];n&&n.call(this,e,t,i),mw&&this.style(mw,i)},style(e,t){if(null!=t)for(const i in sw){let n="font"===i?qb(t):t[i];if(n===_w[i])continue;const o=sw[i];null==n?e.removeAttribute(o):(l_(n)&&(n=c_(n,this._defs.gradient,Sw())),e.setAttribute(o,n+"")),_w[i]=n}},defs(){const e=this._svg,t=this._defs;let i=t.el,n=0;for(const o in t.gradient)i||(t.el=i=hy(e,1,"defs",cw)),n=gw(i,t.gradient[o],n);for(const o in t.clipping)i||(t.el=i=hy(e,1,"defs",cw)),n=fw(i,t.clipping[o],n);i&&(0===n?(e.removeChild(i),t.el=null):dy(i,n))},_clearDefs(){const e=this._defs;e.gradient={},e.clipping={}}});let mw=null,_w=null;const vw={group(e,t,i){const n=mw=t.childNodes[2];_w=n.__values__,e.foreground(bw,i,this),_w=t.__values__,mw=t.childNodes[1],e.content(bw,i,this);const o=mw=t.childNodes[0];e.background(bw,i,this);const r=!1===i.mark.interactive?"none":null;if(r!==_w.events&&(Cw(n,"pointer-events",r),Cw(o,"pointer-events",r),_w.events=r),i.strokeForeground&&i.stroke){const e=i.fill;Cw(n,"display",null),this.style(o,i),Cw(o,"stroke",null),e&&(i.fill=null),_w=n.__values__,this.style(n,i),e&&(i.fill=e),mw=null}else Cw(n,"display","none")},image(e,t,i){!1===i.smooth?(yw(t,"image-rendering","optimizeSpeed"),yw(t,"image-rendering","pixelated")):yw(t,"image-rendering",null)},text(e,t,i){const n=$b(i);let o,r,s,a;li(n)?(r=n.map((e=>jb(i,e))),o=r.join("\n"),o!==_w.text&&(dy(t,0),s=t.ownerDocument,a=Hb(i),r.forEach(((e,n)=>{const o=cy(s,"tspan",cw);o.__data__=i,o.textContent=e,n&&(o.setAttribute("x",0),o.setAttribute("dy",a)),t.appendChild(o)})),_w.text=o)):(r=jb(i,n),r!==_w.text&&(t.textContent=r,_w.text=r)),Cw(t,"font-family",qb(i)),Cw(t,"font-size",Vb(i)+"px"),Cw(t,"font-style",i.fontStyle),Cw(t,"font-variant",i.fontVariant),Cw(t,"font-weight",i.fontWeight)}};function bw(e,t,i){t!==_w[e]&&(i?function(e,t,i,n){null!=i?e.setAttributeNS(n,t,i):e.removeAttributeNS(n,t)}(mw,e,t,i):Cw(mw,e,t),_w[e]=t)}function yw(e,t,i){i!==_w[t]&&(null==i?e.style.removeProperty(t):e.style.setProperty(t,i+""),_w[t]=i)}function ww(e,t){for(const i in t)Cw(e,i,t[i])}function Cw(e,t,i){null!=i?e.setAttribute(t,i):e.removeAttribute(t)}function Sw(){let e;return"undefined"==typeof window?"":(e=window.location).hash?e.href.slice(0,-e.hash.length):e.href}function xw(e){_y.call(this,e),this._text=null,this._defs={gradient:{},clipping:{}}}Xi(xw,_y,{svg(){return this._text},_render(e){const t=nw();t.open("svg",$i({},vb,{class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:`0 0 ${this._width} ${this._height}`}));const i=this._bgcolor;return i&&"transparent"!==i&&"none"!==i&&t.open("rect",{width:this._width,height:this._height,fill:i}).close(),t.open("g",aw,{transform:"translate("+this._origin+")"}),this.mark(t,e),t.close(),this.defs(t),this._text=t.close()+"",this},mark(e,t){const i=Jb[t.marktype],n=i.tag,o=[Qy,i.attr];e.open("g",{class:gy(t),"clip-path":t.clip?nv(this,t,t.group):null},Jy(t),{"pointer-events":"g"!==n&&!1===t.interactive?"none":null});const r=r=>{const s=this.href(r);if(s&&e.open("a",s),e.open(n,this.attr(t,r,o,"g"!==n?n:null)),"text"===n){const t=$b(r);if(li(t)){const i={x:0,dy:Hb(r)};for(let n=0;nthis.mark(e,t))),e.close(),n&&s?(o&&(r.fill=null),r.stroke=s,e.open("path",this.attr(t,r,i.foreground,"bgrect")).close(),o&&(r.fill=o)):e.open("path",this.attr(t,r,i.foreground,"bgfore")).close()}e.close(),s&&e.close()};return i.nested?t.items&&t.items.length&&r(t.items[0]):Yv(t,r),e.close()},href(e){const t=e.href;let i;if(t){if(i=this._hrefs&&this._hrefs[t])return i;this.sanitizeURL(t).then((e=>{e["xlink:href"]=e.href,e.href=null,(this._hrefs||(this._hrefs={}))[t]=e}))}return null},attr(e,t,i,n){const o={},r=(e,t,i,n)=>{o[n||e]=t};return Array.isArray(i)?i.forEach((e=>e(r,t,this))):i(r,t,this),n&&function(e,t,i,n,o){if(null==t)return e;if("bgrect"===n&&!1===i.interactive&&(e["pointer-events"]="none"),"bgfore"===n&&(!1===i.interactive&&(e["pointer-events"]="none"),e.display="none",null!==t.fill))return e;"image"===n&&!1===t.smooth&&(e.style="image-rendering: optimizeSpeed; image-rendering: pixelated;"),"text"===n&&(e["font-family"]=qb(t),e["font-size"]=Vb(t)+"px",e["font-style"]=t.fontStyle,e["font-variant"]=t.fontVariant,e["font-weight"]=t.fontWeight);for(const i in sw){let n=t[i];const r=sw[i];("transparent"!==n||"fill"!==r&&"stroke"!==r)&&null!=n&&(l_(n)&&(n=c_(n,o.gradient,"")),e[r]=n)}}(o,t,e,n,this._defs),o},defs(e){const t=this._defs.gradient,i=this._defs.clipping;if(0!==Object.keys(t).length+Object.keys(i).length){e.open("defs");for(const i in t){const n=t[i],o=n.stops;"radial"===n.gradient?(e.open("pattern",{id:a_+i,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),e.open("rect",{width:"1",height:"1",fill:"url(#"+i+")"}).close(),e.close(),e.open("radialGradient",{id:i,fx:n.x1,fy:n.y1,fr:n.r1,cx:n.x2,cy:n.y2,r:n.r2})):e.open("linearGradient",{id:i,x1:n.x1,x2:n.x2,y1:n.y1,y2:n.y2});for(let t=0;t1?(Dw[e]=t,this):Dw[e]}function Nw(e,t,i){const n=[],o=(new ov).union(t),r=e.marktype;return r?Ew(e,o,i,n):"group"===r?Aw(e,o,i,n):qt("Intersect scene must be mark node or group item.")}function Ew(e,t,i,n){if(function(e,t,i){return e.bounds&&t.intersects(e.bounds)&&("group"===e.marktype||!1!==e.interactive&&(!i||i(e)))}(e,t,i)){const o=e.items,r=e.marktype,s=o.length;let a=0;if("group"===r)for(;a=0;n--)if(o[n]!=r[n])return!1;for(n=o.length-1;n>=0;n--)if(!Rw(e[i=o[n]],t[i],i))return!1;return typeof e==typeof t}(e,t):e==t)}function Ow(e,t){return Rw(m_(e),m_(t))}function Fw(){iv(),s_=0}const Pw="top",Bw="left",zw="right",Ww="bottom",Vw="start",Hw="middle",$w="end",Uw="group",jw="axis",qw="title",Kw="legend",Gw="row-header",Yw="row-footer",Zw="row-title",Xw="column-header",Qw="column-footer",Jw="column-title",eC="none",tC="all",iC="each",nC="flush",oC="column",rC="row";function sC(e){oc.call(this,null,e)}function aC(e,t,i){return t(e.bounds.clear(),e,i)}Xi(sC,oc,{transform(e,t){const i=t.dataflow,n=e.mark,o=n.marktype,r=Jb[o],s=r.bound;let a,l=n.bounds;if(r.nested)n.items.length&&i.dirty(n.items[0]),l=aC(n,s),n.items.forEach((e=>{e.bounds.clear().union(l)}));else if(o===Uw||e.modified())switch(t.visit(t.MOD,(e=>i.dirty(e))),l.clear(),n.items.forEach((e=>l.union(aC(e,s)))),n.role){case jw:case Kw:case qw:t.reflow()}else a=t.changed(t.REM),t.visit(t.ADD,(e=>{l.union(aC(e,s))})),t.visit(t.MOD,(e=>{a=a||l.alignsWith(e.bounds),i.dirty(e),l.union(aC(e,s))})),a&&(l.clear(),n.items.forEach((e=>l.union(e.bounds))));return Tw(n),t.modifies("bounds")}});const lC=":vega_identifier:";function cC(e){oc.call(this,0,e)}function uC(e){oc.call(this,null,e)}function hC(e){oc.call(this,null,e)}cC.Definition={type:"Identifier",metadata:{modifies:!0},params:[{name:"as",type:"string",required:!0}]},Xi(cC,oc,{transform(e,t){const i=(o=t.dataflow)._signals[lC]||(o._signals[lC]=o.add(0)),n=e.as;var o;let r=i.value;return t.visit(t.ADD,(e=>e[n]=e[n]||++r)),i.set(this.value=r),t}}),Xi(uC,oc,{transform(e,t){let i=this.value;i||(i=t.dataflow.scenegraph().mark(e.markdef,function(e){const t=e.groups,i=e.parent;return t&&1===t.size?t.get(Object.keys(t.object)[0]):t&&i?t.lookup(i):null}(e),e.index),i.group.context=e.context,e.context.group||(e.context.group=i.group),i.source=this.source,i.clip=e.clip,i.interactive=e.interactive,this.value=i);const n=i.marktype===Uw?sv:rv;return t.visit(t.ADD,(e=>n.call(e,i))),(e.modified("clip")||e.modified("interactive"))&&(i.clip=e.clip,i.interactive=!!e.interactive,i.zdirty=!0,t.reflow()),i.items=t.source,t}});const dC={parity:e=>e.filter(((e,t)=>t%2?e.opacity=0:1)),greedy:(e,t)=>{let i;return e.filter(((e,n)=>n&&gC(i.bounds,e.bounds,t)?e.opacity=0:(i=e,1)))}},gC=(e,t,i)=>i>Math.max(t.x1-e.x2,e.x1-t.x2,t.y1-e.y2,e.y1-t.y2),fC=(e,t)=>{for(var i,n=1,o=e.length,r=e[0].bounds;n{const t=e.bounds;return t.width()>1&&t.height()>1},mC=e=>(e.forEach((e=>e.opacity=1)),e),_C=(e,t)=>e.reflow(t.modified()).modifies("opacity");function vC(e){oc.call(this,null,e)}Xi(hC,oc,{transform(e,t){const i=dC[e.method]||dC.parity,n=e.separation||0;let o,r,s=t.materialize(t.SOURCE).source;if(!s||!s.length)return;if(!e.method)return e.modified("method")&&(mC(s),t=_C(t,e)),t;if(s=s.filter(pC),!s.length)return;if(e.sort&&(s=s.slice().sort(e.sort)),o=mC(s),t=_C(t,e),o.length>=3&&fC(o,n)){do{o=i(o,n)}while(o.length>=3&&fC(o,n));o.length<3&&!fi(s).opacity&&(o.length>1&&(fi(o).opacity=0),fi(s).opacity=1)}e.boundScale&&e.boundTolerance>=0&&(r=((e,t,i)=>{var n=e.range(),o=new ov;return t===Pw||t===Ww?o.set(n[0],-1/0,n[1],1/0):o.set(-1/0,n[0],1/0,n[1]),o.expand(i||1),e=>o.encloses(e.bounds)})(e.boundScale,e.boundOrient,+e.boundTolerance),s.forEach((e=>{r(e)||(e.opacity=0)})));const a=o[0].mark.bounds.clear();return s.forEach((e=>{e.opacity&&a.union(e.bounds)})),t}}),Xi(vC,oc,{transform(e,t){const i=t.dataflow;if(t.visit(t.ALL,(e=>i.dirty(e))),t.fields&&t.fields.zindex){const e=t.source&&t.source[0];e&&(e.mark.zdirty=!0)}}});const bC=new ov;function yC(e,t,i){return e[t]===i?0:(e[t]=i,1)}function wC(e){var t=e.items[0].orient;return t===Bw||t===zw}function CC(e,t,i,n){var o,r,s=t.items[0],a=s.datum,l=null!=s.translate?s.translate:.5,c=s.orient,u=function(e){let t=+e.grid;return[e.ticks?t++:-1,e.labels?t++:-1,t+ +e.domain]}(a),h=s.range,d=s.offset,g=s.position,f=s.minExtent,p=s.maxExtent,m=a.title&&s.items[u[2]].items[0],_=s.titlePadding,v=s.bounds,b=m&&Ub(m),y=0,w=0;switch(bC.clear().union(v),v.clear(),(o=u[0])>-1&&v.union(s.items[o].bounds),(o=u[1])>-1&&v.union(s.items[o].bounds),c){case Pw:y=g||0,w=-d,r=Math.max(f,Math.min(p,-v.y1)),v.add(0,-r).add(h,0),m&&SC(e,m,r,_,b,0,-1,v);break;case Bw:y=-d,w=g||0,r=Math.max(f,Math.min(p,-v.x1)),v.add(-r,0).add(0,h),m&&SC(e,m,r,_,b,1,-1,v);break;case zw:y=i+d,w=g||0,r=Math.max(f,Math.min(p,v.x2)),v.add(0,0).add(r,h),m&&SC(e,m,r,_,b,1,1,v);break;case Ww:y=g||0,w=n+d,r=Math.max(f,Math.min(p,v.y2)),v.add(0,0).add(h,r),m&&SC(e,m,r,_,0,0,1,v);break;default:y=s.x,w=s.y}return uv(v.translate(y,w),s),yC(s,"x",y+l)|yC(s,"y",w+l)&&(s.bounds=bC,e.dirty(s),s.bounds=v,e.dirty(s)),s.mark.bounds.clear().union(v)}function SC(e,t,i,n,o,r,s,a){const l=t.bounds;if(t.auto){const a=s*(i+o+n);let c=0,u=0;e.dirty(t),r?c=(t.x||0)-(t.x=a):u=(t.y||0)-(t.y=a),t.mark.bounds.clear().union(l.translate(-c,-u)),e.dirty(t)}a.union(l)}const xC=(e,t)=>Math.floor(Math.min(e,t)),kC=(e,t)=>Math.ceil(Math.max(e,t));function DC(e){return(new ov).set(0,0,e.width||0,e.height||0)}function LC(e){const t=e.bounds.clone();return t.empty()?t.set(0,0,0,0):t.translate(-(e.x||0),-(e.y||0))}function NC(e,t,i){const n=ci(e)?e[t]:e;return null!=n?n:void 0!==i?i:0}function EC(e){return e<0?Math.ceil(-e):0}function AC(e,t,i){var n,o,r,s,a,l,c,u,h,d,g,f=!i.nodirty,p=i.bounds===nC?DC:LC,m=bC.set(0,0,0,0),_=NC(i.align,oC),v=NC(i.align,rC),b=NC(i.padding,oC),y=NC(i.padding,rC),w=i.columns||t.length,C=w<=0?1:Math.ceil(t.length/w),S=t.length,x=Array(S),k=Array(w),D=0,L=Array(S),N=Array(C),E=0,A=Array(S),M=Array(S),I=Array(S);for(o=0;o1)for(o=0;o0&&(A[o]+=h/2);if(v&&NC(i.center,rC)&&1!==w)for(o=0;o0&&(M[o]+=d/2);for(o=0;oo&&(e.warn("Grid headers exceed limit: "+o),t=t.slice(0,o)),x+=r,p=0,_=t.length;p<_;++p)e.dirty(t[p]),t[p].mark.bounds.clear();for(f=u,p=0,_=t.length;p<_;++p,f+=h){for(v=(b=t[p]).mark.bounds,m=f;m>=0&&null==(y=i[m]);m-=d);a?(w=null==g?y.x:Math.round(y.bounds.x1+g*y.bounds.width()),C=x):(w=x,C=null==g?y.y:Math.round(y.bounds.y1+g*y.bounds.height())),v.union(b.bounds.translate(w-(b.x||0),C-(b.y||0))),b.x=w,b.y=C,e.dirty(b),k=s(k,v[c])}return k}function RC(e,t,i,n,o,r){if(t){e.dirty(t);var s=i,a=i;n?s=Math.round(o.x1+r*o.width()):a=Math.round(o.y1+r*o.height()),t.bounds.translate(s-(t.x||0),a-(t.y||0)),t.mark.bounds.clear().union(t.bounds),t.x=s,t.y=a,e.dirty(t)}}function OC(e,t,i,n,o,r,s){const a=function(e,t){const i=e[t]||{};return(t,n)=>null!=i[t]?i[t]:null!=e[t]?e[t]:n}(i,t),l=function(e,t){let i=-1/0;return e.forEach((e=>{null!=e.offset&&(i=Math.max(i,e.offset))})),i>-1/0?i:t}(e,a("offset",0)),c=a("anchor",Vw),u=c===$w?1:c===Hw?.5:0,h={align:iC,bounds:a("bounds",nC),columns:"vertical"===a("direction")?1:e.length,padding:a("margin",8),center:a("center"),nodirty:!0};switch(t){case Bw:h.anchor={x:Math.floor(n.x1)-l,column:$w,y:u*(s||n.height()+2*n.y1),row:c};break;case zw:h.anchor={x:Math.ceil(n.x2)+l,y:u*(s||n.height()+2*n.y1),row:c};break;case Pw:h.anchor={y:Math.floor(o.y1)-l,row:$w,x:u*(r||o.width()+2*o.x1),column:c};break;case Ww:h.anchor={y:Math.ceil(o.y2)+l,x:u*(r||o.width()+2*o.x1),column:c};break;case"top-left":h.anchor={x:l,y:l};break;case"top-right":h.anchor={x:r-l,y:l,column:$w};break;case"bottom-left":h.anchor={x:l,y:s-l,row:$w};break;case"bottom-right":h.anchor={x:r-l,y:s-l,column:$w,row:$w}}return h}function FC(e,t){var i,n,o=t.items[0],r=o.datum,s=o.orient,a=o.bounds,l=o.x,c=o.y;return o._bounds?o._bounds.clear().union(a):o._bounds=a.clone(),a.clear(),function(e,t,i){var n=t.padding,o=n-i.x,r=n-i.y;if(t.datum.title){var s=t.items[1].items[0],a=s.anchor,l=t.titlePadding||0,c=n-s.x,u=n-s.y;switch(s.orient){case Bw:o+=Math.ceil(s.bounds.width())+l;break;case zw:case Ww:break;default:r+=s.bounds.height()+l}switch((o||r)&&BC(e,i,o,r),s.orient){case Bw:u+=PC(t,i,s,a,1,1);break;case zw:c+=PC(t,i,s,$w,0,0)+l,u+=PC(t,i,s,a,1,1);break;case Ww:c+=PC(t,i,s,a,0,0),u+=PC(t,i,s,$w,-1,0,1)+l;break;default:c+=PC(t,i,s,a,0,0)}(c||u)&&BC(e,s,c,u),(c=Math.round(s.bounds.x1-n))<0&&(BC(e,i,-c,0),BC(e,s,-c,0))}else(o||r)&&BC(e,i,o,r)}(e,o,o.items[0].items[0]),a=function(e,t){return e.items.forEach((e=>t.union(e.bounds))),t.x1=e.padding,t.y1=e.padding,t}(o,a),i=2*o.padding,n=2*o.padding,a.empty()||(i=Math.ceil(a.width()+i),n=Math.ceil(a.height()+n)),"symbol"===r.type&&function(e){const t=e.reduce(((e,t)=>(e[t.column]=Math.max(t.bounds.x2-t.x,e[t.column]||0),e)),{});e.forEach((e=>{e.width=t[e.column],e.height=e.bounds.y2-e.y}))}(o.items[0].items[0].items[0].items),s!==eC&&(o.x=l=0,o.y=c=0),o.width=i,o.height=n,uv(a.set(l,c,l+i,c+n),o),o.mark.bounds.clear().union(a),o}function PC(e,t,i,n,o,r,s){const a="symbol"!==e.datum.type,l=i.datum.vgrad,c=(!a||!r&&l||s?t:t.items[0]).bounds[o?"y2":"x2"]-e.padding,u=l&&r?c:0,h=l&&r?0:c,d=o<=0?0:Ub(i);return Math.round(n===Vw?u:n===$w?h-d:.5*(c-d))}function BC(e,t,i,n){t.x+=i,t.y+=n,t.bounds.translate(i,n),t.mark.bounds.translate(i,n),e.dirty(t)}function zC(e){oc.call(this,null,e)}function WC(e,t){let i=0;if(void 0===t)for(let t of e)(t=+t)&&(i+=t);else{let n=-1;for(let o of e)(o=+t(o,++n,e))&&(i+=o)}return i}function VC(e){oc.call(this,null,e)}function HC(e){oc.call(this,null,e)}function $C(){return Nl({})}function UC(e){oc.call(this,null,e)}function jC(e){oc.call(this,[],e)}Xi(zC,oc,{transform(e,t){const i=t.dataflow;return e.mark.items.forEach((t=>{e.layout&&function(e,t,i){var n,o,r,s,a,l,c,u=function(e){var t,i,n=e.items,o=n.length,r=0;const s={marks:[],rowheaders:[],rowfooters:[],colheaders:[],colfooters:[],rowtitle:null,coltitle:null};for(;r{(r=e.orient||zw)!==eC&&(t[r]||(t[r]=[])).push(e)}));for(const n in t){const o=t[n];AC(e,o,OC(o,n,i.legends,d,g,c,u))}f.forEach((t=>{const n=t.bounds;if(n.equals(t._bounds)||(t.bounds=t._bounds,e.dirty(t),t.bounds=n,e.dirty(t)),i.autosize&&"fit"===i.autosize.type)switch(t.orient){case Bw:case zw:h.add(n.x1,0).add(n.x2,0);break;case Pw:case Ww:h.add(0,n.y1).add(0,n.y2)}else h.union(n)}))}h.union(d).union(g),n&&h.union(function(e,t,i,n,o){var r,s=t.items[0],a=s.frame,l=s.orient,c=s.anchor,u=s.offset,h=s.padding,d=s.items[0].items[0],g=s.items[1]&&s.items[1].items[0],f=l===Bw||l===zw?n:i,p=0,m=0,_=0,v=0,b=0;if(a!==Uw?l===Bw?(p=o.y2,f=o.y1):l===zw?(p=o.y1,f=o.y2):(p=o.x1,f=o.x2):l===Bw&&(p=n,f=0),r=c===Vw?p:c===$w?f:(p+f)/2,g&&g.text){switch(l){case Pw:case Ww:b=d.bounds.height()+h;break;case Bw:v=d.bounds.width()+h;break;case zw:v=-d.bounds.width()-h}bC.clear().union(g.bounds),bC.translate(v-(g.x||0),b-(g.y||0)),yC(g,"x",v)|yC(g,"y",b)&&(e.dirty(g),g.bounds.clear().union(bC),g.mark.bounds.clear().union(bC),e.dirty(g)),bC.clear().union(g.bounds)}else bC.clear();switch(bC.union(d.bounds),l){case Pw:m=r,_=o.y1-bC.height()-u;break;case Bw:m=o.x1-bC.width()-u,_=r;break;case zw:m=o.x2+bC.width()+u,_=r;break;case Ww:m=r,_=o.y2+u;break;default:m=s.x,_=s.y}return yC(s,"x",m)|yC(s,"y",_)&&(bC.translate(m,_),e.dirty(s),s.bounds.clear().union(bC),t.bounds.clear().union(bC),e.dirty(s)),s.bounds}(e,n,c,u,h)),t.clip&&h.set(0,0,t.width||0,t.height||0),function(e,t,i,n){const o=n.autosize||{},r=o.type;if(e._autosize<1||!r)return;let s=e._width,a=e._height,l=Math.max(0,t.width||0),c=Math.max(0,Math.ceil(-i.x1)),u=Math.max(0,t.height||0),h=Math.max(0,Math.ceil(-i.y1));const d=Math.max(0,Math.ceil(i.x2-l)),g=Math.max(0,Math.ceil(i.y2-u));if("padding"===o.contains){const t=e.padding();s-=t.left+t.right,a-=t.top+t.bottom}r===eC?(c=0,h=0,l=s,u=a):"fit"===r?(l=Math.max(0,s-c-d),u=Math.max(0,a-h-g)):"fit-x"===r?(l=Math.max(0,s-c-d),a=u+h+g):"fit-y"===r?(s=l+c+d,u=Math.max(0,a-h-g)):"pad"===r&&(s=l+c+d,a=u+h+g),e._resizeView(s,a,l,u,[c,h],o.resize)}(e,t,h,i)}(i,t,e)})),function(e){return e&&"legend-entry"!==e.mark.role}(e.mark.group)?t.reflow():t}}),Xi(VC,oc,{transform(e,t){if(this.value&&!e.modified())return t.StopPropagation;var i=t.dataflow.locale(),n=t.fork(t.NO_SOURCE|t.NO_FIELDS),o=this.value,r=e.scale,s=jm(r,null==e.count?e.values?e.values.length:10:e.count,e.minstep),a=e.format||Gm(i,r,s,e.formatSpecifier,e.formatType,!!e.values),l=e.values?qm(r,e.values,s):Km(r,s);return o&&(n.rem=o),o=l.map(((e,t)=>Nl({index:t/(l.length-1||1),value:e,label:a(e)}))),e.extra&&o.length&&o.push(Nl({index:-1,extra:{value:o[0].value},label:""})),n.source=o,n.add=o,this.value=o,n}}),Xi(HC,oc,{transform(e,t){var i=t.dataflow,n=t.fork(t.NO_SOURCE|t.NO_FIELDS),o=e.item||$C,r=e.key||Dl,s=this.value;return li(n.encode)&&(n.encode=null),s&&(e.modified("key")||t.modified(r))&&qt("DataJoin does not support modified key function or fields."),s||(t=t.addAll(),this.value=s=function(e){const t=Yi().test((e=>e.exit));return t.lookup=i=>t.get(e(i)),t}(r)),t.visit(t.ADD,(e=>{const t=r(e);let i=s.get(t);i?i.exit?(s.empty--,n.add.push(i)):n.mod.push(i):(i=o(e),s.set(t,i),n.add.push(i)),i.datum=e,i.exit=!1})),t.visit(t.MOD,(e=>{const t=r(e),i=s.get(t);i&&(i.datum=e,n.mod.push(i))})),t.visit(t.REM,(e=>{const t=r(e),i=s.get(t);e!==i.datum||i.exit||(n.rem.push(i),i.exit=!0,++s.empty)})),t.changed(t.ADD_MOD)&&n.modifies("datum"),(t.clean()||e.clean&&s.empty>i.cleanThreshold)&&i.runAfter(s.clean),n}}),Xi(UC,oc,{transform(e,t){var i=t.fork(t.ADD_REM),n=e.mod||!1,o=e.encoders,r=t.encode;if(li(r)){if(!i.changed()&&!r.every((e=>o[e])))return t.StopPropagation;r=r[0],i.encode=null}var s="enter"===r,a=o.update||ei,l=o.enter||ei,c=o.exit||ei,u=(r&&!s?o[r]:a)||ei;if(t.changed(t.ADD)&&(t.visit(t.ADD,(t=>{l(t,e),a(t,e)})),i.modifies(l.output),i.modifies(a.output),u!==ei&&u!==a&&(t.visit(t.ADD,(t=>{u(t,e)})),i.modifies(u.output))),t.changed(t.REM)&&c!==ei&&(t.visit(t.REM,(t=>{c(t,e)})),i.modifies(c.output)),s||u!==ei){const o=t.MOD|(e.modified()?t.REFLOW:0);s?(t.visit(o,(t=>{const o=l(t,e)||n;(u(t,e)||o)&&i.mod.push(t)})),i.mod.length&&i.modifies(l.output)):t.visit(o,(t=>{(u(t,e)||n)&&i.mod.push(t)})),i.mod.length&&i.modifies(u.output)}return i.changed()?i:t.StopPropagation}}),Xi(jC,oc,{transform(e,t){if(null!=this.value&&!e.modified())return t.StopPropagation;var i,n,o,r,s,a=t.dataflow.locale(),l=t.fork(t.NO_SOURCE|t.NO_FIELDS),c=this.value,u=e.type||Vm,h=e.scale,d=+e.limit,g=jm(h,null==e.count?5:e.count,e.minstep),f=!!e.values||u===Vm,p=e.format||Jm(a,h,g,u,e.formatSpecifier,e.formatType,f),m=e.values||Qm(h,g);return c&&(l.rem=c),u===Vm?(d&&m.length>d?(t.dataflow.warn("Symbol legend count exceeds limit, filtering items."),c=m.slice(0,d-1),s=!0):c=m,Oi(o=e.size)?(e.values||0!==h(c[0])||(c=c.slice(1)),r=c.reduce(((t,i)=>Math.max(t,o(i,e))),0)):o=Vi(r=o||8),c=c.map(((t,i)=>Nl({index:i,label:p(t,i,c),value:t,offset:r,size:o(t,e)}))),s&&(s=m[c.length],c.push(Nl({index:c.length,label:"…".concat(m.length-c.length," entries"),value:s,offset:r,size:o(s,e)})))):"gradient"===u?(i=h.domain(),n=Om(h,i[0],fi(i)),m.length<3&&!e.values&&i[0]!==fi(i)&&(m=[i[0],fi(i)]),c=m.map(((e,t)=>Nl({index:t,label:p(e,t,m),value:e,perc:n(e)})))):(o=m.length-1,n=function(e){const t=e.domain(),i=t.length-1;let n=+t[0],o=+fi(t),r=o-n;if(e.type===rm){const e=i?r/i:.1;n-=e,o+=e,r=o-n}return e=>(e-n)/r}(h),c=m.map(((e,t)=>Nl({index:t,label:p(e,t,m),value:e,perc:t?n(e):0,perc2:t===o?1:n(m[t+1])})))),l.source=c,l.add=c,this.value=c,l}});const qC=e=>e.source.x,KC=e=>e.source.y,GC=e=>e.target.x,YC=e=>e.target.y;function ZC(e){oc.call(this,{},e)}ZC.Definition={type:"LinkPath",metadata:{modifies:!0},params:[{name:"sourceX",type:"field",default:"source.x"},{name:"sourceY",type:"field",default:"source.y"},{name:"targetX",type:"field",default:"target.x"},{name:"targetY",type:"field",default:"target.y"},{name:"orient",type:"enum",default:"vertical",values:["horizontal","vertical","radial"]},{name:"shape",type:"enum",default:"line",values:["line","arc","curve","diagonal","orthogonal"]},{name:"require",type:"signal"},{name:"as",type:"string",default:"path"}]},Xi(ZC,oc,{transform(e,t){var i=e.sourceX||qC,n=e.sourceY||KC,o=e.targetX||GC,r=e.targetY||YC,s=e.as||"path",a=e.orient||"vertical",l=e.shape||"line",c=eS.get(l+"-"+a)||eS.get(l);return c||qt("LinkPath unsupported type: "+e.shape+(e.orient?"-"+e.orient:"")),t.visit(t.SOURCE,(e=>{e[s]=c(i(e),n(e),o(e),r(e))})),t.reflow(e.modified()).modifies(s)}});const XC=(e,t,i,n)=>"M"+e+","+t+"L"+i+","+n,QC=(e,t,i,n)=>{var o=i-e,r=n-t,s=Math.sqrt(o*o+r*r)/2;return"M"+e+","+t+"A"+s+","+s+" "+180*Math.atan2(r,o)/Math.PI+" 0 1 "+i+","+n},JC=(e,t,i,n)=>{const o=i-e,r=n-t,s=.2*(o+r),a=.2*(r-o);return"M"+e+","+t+"C"+(e+s)+","+(t+a)+" "+(i+a)+","+(n-s)+" "+i+","+n},eS=Yi({line:XC,"line-radial":(e,t,i,n)=>XC(t*Math.cos(e),t*Math.sin(e),n*Math.cos(i),n*Math.sin(i)),arc:QC,"arc-radial":(e,t,i,n)=>QC(t*Math.cos(e),t*Math.sin(e),n*Math.cos(i),n*Math.sin(i)),curve:JC,"curve-radial":(e,t,i,n)=>JC(t*Math.cos(e),t*Math.sin(e),n*Math.cos(i),n*Math.sin(i)),"orthogonal-horizontal":(e,t,i,n)=>"M"+e+","+t+"V"+n+"H"+i,"orthogonal-vertical":(e,t,i,n)=>"M"+e+","+t+"H"+i+"V"+n,"orthogonal-radial":(e,t,i,n)=>{const o=Math.cos(e),r=Math.sin(e),s=Math.cos(i),a=Math.sin(i);return"M"+t*o+","+t*r+"A"+t+","+t+" 0 0,"+((Math.abs(i-e)>Math.PI?i<=e:i>e)?1:0)+" "+t*s+","+t*a+"L"+n*s+","+n*a},"diagonal-horizontal":(e,t,i,n)=>{const o=(e+i)/2;return"M"+e+","+t+"C"+o+","+t+" "+o+","+n+" "+i+","+n},"diagonal-vertical":(e,t,i,n)=>{const o=(t+n)/2;return"M"+e+","+t+"C"+e+","+o+" "+i+","+o+" "+i+","+n},"diagonal-radial":(e,t,i,n)=>{const o=Math.cos(e),r=Math.sin(e),s=Math.cos(i),a=Math.sin(i),l=(t+n)/2;return"M"+t*o+","+t*r+"C"+l*o+","+l*r+" "+l*s+","+l*a+" "+n*s+","+n*a}});function tS(e){oc.call(this,null,e)}function iS(e){return km(e)&&e!==tm}tS.Definition={type:"Pie",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"startAngle",type:"number",default:0},{name:"endAngle",type:"number",default:6.283185307179586},{name:"sort",type:"boolean",default:!1},{name:"as",type:"string",array:!0,length:2,default:["startAngle","endAngle"]}]},Xi(tS,oc,{transform(e,t){var i,n,o,r=e.as||["startAngle","endAngle"],s=r[0],a=r[1],l=e.field||Qt,c=e.startAngle||0,u=null!=e.endAngle?e.endAngle:2*Math.PI,h=t.source,d=h.map(l),g=d.length,f=c,p=(u-c)/WC(d),m=uu(g);for(e.sort&&m.sort(((e,t)=>d[e]-d[t])),i=0;ie+(t<0?-1:t>0?1:0)),0))!==t.length&&i.warn("Log scale domain includes zero: "+gn(t)),t}function sS(e,t,i){return Oi(e)&&(t||i)?Im(e,aS(t||[0,1],i)):e}function aS(e,t){return t?e.slice().reverse():e}function lS(e){oc.call(this,null,e)}Xi(oS,oc,{transform(e,t){var i=t.dataflow,n=this.value,o=function(e){var t,i=e.type,n="";return i===tm?"sequential-linear":(function(e){const t=e.type;return km(t)&&t!==Jp&&t!==em&&(e.scheme||e.range&&e.range.length&&e.range.every(rn))}(e)&&(n=2===(t=e.rawDomain?e.rawDomain.length:e.domain?e.domain.length+ +(null!=e.domainMid):0)?"sequential-":3===t?"diverging-":""),(n+i||Gp).toLowerCase())}(e);for(o in n&&o===n.type||(this.value=n=Cm(o)()),e)if(!nS[o]){if("padding"===o&&iS(n.type))continue;Oi(n[o])?n[o](e[o]):i.warn("Unsupported scale property: "+o)}return function(e,t,i){var n=e.type,o=t.round||!1,r=t.range;if(null!=t.rangeStep)r=function(e,t,i){e!==lm&&e!==am&&qt("Only band and point scales support rangeStep.");var n=(null!=t.paddingOuter?t.paddingOuter:t.padding)||0,o=e===am?1:(null!=t.paddingInner?t.paddingInner:t.padding)||0;return[0,t.rangeStep*Kp(i,o,n)]}(n,t,i);else if(t.scheme&&(r=function(e,t,i){var n,o=t.schemeExtent;return li(t.scheme)?n=Tm(t.scheme,t.interpolate,t.interpolateGamma):(n=Wm(t.scheme.toLowerCase()))||qt("Unrecognized scheme name: ".concat(t.scheme)),i=e===rm?i+1:e===cm?i-1:e===nm||e===om?+t.schemeCount||5:i,Em(e)?sS(n,o,t.reverse):Oi(n)?Rm(sS(n,o),i):e===sm?n:n.slice(0,i)}(n,t,i),Oi(r))){if(e.interpolator)return e.interpolator(r);qt("Scale type ".concat(n," does not support interpolating color schemes."))}if(r&&Em(n))return e.interpolator(Tm(aS(r,t.reverse),t.interpolate,t.interpolateGamma));r&&t.interpolate&&e.interpolate?e.interpolate(Fm(t.interpolate,t.interpolateGamma)):Oi(e.round)?e.round(o):Oi(e.rangeRound)&&e.interpolate(o?lf:af),r&&e.range(aS(r,t.reverse))}(n,e,function(e,t,i){let n=t.bins;if(n&&!li(n)){const t=e.domain(),i=t[0],o=fi(t),r=n.step;let s=null==n.start?i:n.start,a=null==n.stop?o:n.stop;r||qt("Scale bins parameter missing step property."),so&&(a=r*Math.floor(o/r)),n=uu(s,a+r/2,r)}return n?e.bins=n:e.bins&&delete e.bins,e.type===cm&&(n?t.domain||t.domainRaw||(e.domain(n),i=n.length):e.bins=e.domain()),i}(n,e,function(e,t,i){const n=function(e,t,i){return t?(e.domain(rS(e.type,t,i)),t.length):-1}(e,t.domainRaw,i);if(n>-1)return n;var o,r,s=t.domain,a=e.type,l=t.zero||void 0===t.zero&&function(e){const t=e.type;return!e.bins&&(t===Gp||t===Zp||t===Xp)}(e);if(!s)return 0;if(iS(a)&&t.padding&&s[0]!==fi(s)&&(s=function(e,t,i,n,o,r){var s=Math.abs(fi(i)-i[0]),a=s/(s-2*n),l=e===Yp?Ni(t,null,a):e===Xp?Ei(t,null,a,.5):e===Zp?Ei(t,null,a,o||1):e===Qp?Ai(t,null,a,r||1):Li(t,null,a);return(t=t.slice())[0]=l[0],t[t.length-1]=l[1],t}(a,s,t.range,t.padding,t.exponent,t.constant)),(l||null!=t.domainMin||null!=t.domainMax||null!=t.domainMid)&&(o=(s=s.slice()).length-1||1,l&&(s[0]>0&&(s[0]=0),s[o]<0&&(s[o]=0)),null!=t.domainMin&&(s[0]=t.domainMin),null!=t.domainMax&&(s[o]=t.domainMax),null!=t.domainMid)){const e=(r=t.domainMid)>s[o]?o+1:re(l);if(null==t)g.push(e.slice());else for(o={},r=0,s=e.length;rd&&(d=h),i&&u.sort(i)}return g.max=d,g}(t.source,e.groupby,c,u),n=0,o=i.length,r=i.max;ne;function vS(e,t){e&&yS.hasOwnProperty(e.type)&&yS[e.type](e,t)}var bS={Feature:function(e,t){vS(e.geometry,t)},FeatureCollection:function(e,t){for(var i=e.features,n=-1,o=i.length;++n0){for(r=e[--o];o>0&&(t=r,i=e[--o],r=t+i,n=i-(r-t),!n););o>0&&(n<0&&e[o-1]<0||n>0&&e[o-1]>0)&&(i=2*n,t=r+i,i==t-r&&(r=t))}return r}}var kS=1e-6,DS=1e-12,LS=Math.PI,NS=LS/2,ES=LS/4,AS=2*LS,MS=180/LS,IS=LS/180,TS=Math.abs,RS=Math.atan,OS=Math.atan2,FS=Math.cos,PS=Math.ceil,BS=Math.exp,zS=(Math.floor,Math.hypot),WS=Math.log,VS=Math.pow,HS=Math.sin,$S=Math.sign||function(e){return e>0?1:e<0?-1:0},US=Math.sqrt,jS=Math.tan;function qS(e){return e>1?0:e<-1?LS:Math.acos(e)}function KS(e){return e>1?NS:e<-1?-NS:Math.asin(e)}function GS(){}var YS,ZS,XS,QS,JS=new xS,ex=new xS,tx={point:GS,lineStart:GS,lineEnd:GS,polygonStart:function(){tx.lineStart=ix,tx.lineEnd=rx},polygonEnd:function(){tx.lineStart=tx.lineEnd=tx.point=GS,JS.add(TS(ex)),ex=new xS},result:function(){var e=JS/2;return JS=new xS,e}};function ix(){tx.point=nx}function nx(e,t){tx.point=ox,YS=XS=e,ZS=QS=t}function ox(e,t){ex.add(QS*e-XS*t),XS=e,QS=t}function rx(){ox(YS,ZS)}const sx=tx;var ax=1/0,lx=ax,cx=-ax,ux=cx;const hx={point:function(e,t){ecx&&(cx=e),tux&&(ux=t)},lineStart:GS,lineEnd:GS,polygonStart:GS,polygonEnd:GS,result:function(){var e=[[ax,lx],[cx,ux]];return cx=ux=-(lx=ax=1/0),e}};var dx,gx,fx,px,mx=0,_x=0,vx=0,bx=0,yx=0,wx=0,Cx=0,Sx=0,xx=0,kx={point:Dx,lineStart:Lx,lineEnd:Ax,polygonStart:function(){kx.lineStart=Mx,kx.lineEnd=Ix},polygonEnd:function(){kx.point=Dx,kx.lineStart=Lx,kx.lineEnd=Ax},result:function(){var e=xx?[Cx/xx,Sx/xx]:wx?[bx/wx,yx/wx]:vx?[mx/vx,_x/vx]:[NaN,NaN];return mx=_x=vx=bx=yx=wx=Cx=Sx=xx=0,e}};function Dx(e,t){mx+=e,_x+=t,++vx}function Lx(){kx.point=Nx}function Nx(e,t){kx.point=Ex,Dx(fx=e,px=t)}function Ex(e,t){var i=e-fx,n=t-px,o=US(i*i+n*n);bx+=o*(fx+e)/2,yx+=o*(px+t)/2,wx+=o,Dx(fx=e,px=t)}function Ax(){kx.point=Dx}function Mx(){kx.point=Tx}function Ix(){Rx(dx,gx)}function Tx(e,t){kx.point=Rx,Dx(dx=fx=e,gx=px=t)}function Rx(e,t){var i=e-fx,n=t-px,o=US(i*i+n*n);bx+=o*(fx+e)/2,yx+=o*(px+t)/2,wx+=o,Cx+=(o=px*e-fx*t)*(fx+e),Sx+=o*(px+t),xx+=3*o,Dx(fx=e,px=t)}const Ox=kx;function Fx(e){this._context=e}Fx.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,AS)}},result:GS};var Px,Bx,zx,Wx,Vx,Hx=new xS,$x={point:GS,lineStart:function(){$x.point=Ux},lineEnd:function(){Px&&jx(Bx,zx),$x.point=GS},polygonStart:function(){Px=!0},polygonEnd:function(){Px=null},result:function(){var e=+Hx;return Hx=new xS,e}};function Ux(e,t){$x.point=jx,Bx=Wx=e,zx=Vx=t}function jx(e,t){Wx-=e,Vx-=t,Hx.add(US(Wx*Wx+Vx*Vx)),Wx=e,Vx=t}const qx=$x;function Kx(){this._string=[]}function Gx(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function Yx(e,t){var i,n,o=4.5;function r(e){return e&&("function"==typeof o&&n.pointRadius(+o.apply(this,arguments)),SS(e,i(n))),n.result()}return r.area=function(e){return SS(e,i(sx)),sx.result()},r.measure=function(e){return SS(e,i(qx)),qx.result()},r.bounds=function(e){return SS(e,i(hx)),hx.result()},r.centroid=function(e){return SS(e,i(Ox)),Ox.result()},r.projection=function(t){return arguments.length?(i=null==t?(e=null,_S):(e=t).stream,r):e},r.context=function(e){return arguments.length?(n=null==e?(t=null,new Kx):new Fx(t=e),"function"!=typeof o&&n.pointRadius(o),r):t},r.pointRadius=function(e){return arguments.length?(o="function"==typeof e?e:(n.pointRadius(+e),+e),r):o},r.projection(e).context(t)}function Zx(){var e,t=[];return{point:function(t,i,n){e.push([t,i,n])},lineStart:function(){t.push(e=[])},lineEnd:GS,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var i=t;return t=[],e=null,i}}}function Xx(e,t){return TS(e[0]-t[0])=0;--r)o.point((u=c[r])[0],u[1]);else n(d.x,d.p.x,-1,o);d=d.p}c=(d=d.o).z,g=!g}while(!d.v);o.lineEnd()}}}function ek(e){if(t=e.length){for(var t,i,n=0,o=e[0];++n=0?1:-1,D=k*x,L=D>LS,N=m*C;if(l.add(OS(N*k*HS(D),_*S+N*FS(D))),s+=L?x+k*AS:x,L^f>=i^y>=i){var E=ok(ik(g),ik(b));ak(E);var A=ok(r,E);ak(A);var M=(L^x>=0?-1:1)*KS(A[2]);(n>M||n===M&&(E[0]||E[1]))&&(a+=L^x>=0?1:-1)}}return(s<-1e-6||s0){for(h||(o.polygonStart(),h=!0),o.lineStart(),e=0;e1&&2&l&&d.push(d.pop().concat(d.shift())),s.push(d.filter(hk))}return d}}function hk(e){return e.length>1}function dk(e,t){return((e=e.x)[0]<0?e[1]-NS-kS:NS-e[1])-((t=t.x)[0]<0?t[1]-NS-kS:NS-t[1])}Kx.prototype={_radius:4.5,_circle:Gx(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._string.push("M",e,",",t),this._point=1;break;case 1:this._string.push("L",e,",",t);break;default:null==this._circle&&(this._circle=Gx(this._radius)),this._string.push("M",e,",",t,this._circle)}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}return null}};const gk=uk((function(){return!0}),(function(e){var t,i=NaN,n=NaN,o=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(r,s){var a=r>0?LS:-LS,l=TS(r-i);TS(l-LS)0?NS:-NS),e.point(o,n),e.lineEnd(),e.lineStart(),e.point(a,n),e.point(r,n),t=0):o!==a&&l>=LS&&(TS(i-o)kS?RS((HS(t)*(r=FS(n))*HS(i)-HS(n)*(o=FS(t))*HS(e))/(o*r*s)):(t+n)/2}(i,n,r,s),e.point(o,n),e.lineEnd(),e.lineStart(),e.point(a,n),t=0),e.point(i=r,n=s),o=a},lineEnd:function(){e.lineEnd(),i=n=NaN},clean:function(){return 2-t}}}),(function(e,t,i,n){var o;if(null==e)o=i*NS,n.point(-LS,o),n.point(0,o),n.point(LS,o),n.point(LS,0),n.point(LS,-o),n.point(0,-o),n.point(-LS,-o),n.point(-LS,0),n.point(-LS,o);else if(TS(e[0]-t[0])>kS){var r=e[0]0,o=TS(t)>kS;function r(e,i){return FS(e)*FS(i)>t}function s(e,i,n){var o=[1,0,0],r=ok(ik(e),ik(i)),s=nk(r,r),a=r[0],l=s-a*a;if(!l)return!n&&e;var c=t*s/l,u=-t*a/l,h=ok(o,r),d=sk(o,c);rk(d,sk(r,u));var g=h,f=nk(d,g),p=nk(g,g),m=f*f-p*(nk(d,d)-1);if(!(m<0)){var _=US(m),v=sk(g,(-f-_)/p);if(rk(v,d),v=tk(v),!n)return v;var b,y=e[0],w=i[0],C=e[1],S=i[1];w0^v[1]<(TS(v[0]-y)LS^(y<=v[0]&&v[0]<=w)){var D=sk(g,(-f+_)/p);return rk(D,d),[v,tk(D)]}}}function a(t,i){var o=n?e:LS-e,r=0;return t<-o?r|=1:t>o&&(r|=2),i<-o?r|=4:i>o&&(r|=8),r}return uk(r,(function(e){var t,i,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(h,d){var g,f=[h,d],p=r(h,d),m=n?p?0:a(h,d):p?a(h+(h<0?LS:-LS),d):0;if(!t&&(c=l=p)&&e.lineStart(),p!==l&&(!(g=s(t,f))||Xx(t,g)||Xx(f,g))&&(f[2]=1),p!==l)u=0,p?(e.lineStart(),g=s(f,t),e.point(g[0],g[1])):(g=s(t,f),e.point(g[0],g[1],2),e.lineEnd()),t=g;else if(o&&t&&n^p){var _;m&i||!(_=s(f,t,!0))||(u=0,n?(e.lineStart(),e.point(_[0][0],_[0][1]),e.point(_[1][0],_[1][1]),e.lineEnd()):(e.point(_[1][0],_[1][1]),e.lineEnd(),e.lineStart(),e.point(_[0][0],_[0][1],3)))}!p||t&&Xx(t,f)||e.point(f[0],f[1]),t=f,l=p,i=m},lineEnd:function(){l&&e.lineEnd(),t=null},clean:function(){return u|(c&&l)<<1}}}),(function(t,n,o,r){!function(e,t,i,n,o,r){if(i){var s=FS(t),a=HS(t),l=n*i;null==o?(o=t+n*AS,r=t-l/2):(o=fk(s,o),r=fk(s,r),(n>0?or)&&(o+=n*AS));for(var c,u=o;n>0?u>r:u0)do{c.point(0===u||3===u?e:i,u>1?n:t)}while((u=(u+a+4)%4)!==h);else c.point(r[0],r[1])}function s(n,o){return TS(n[0]-e)0?0:3:TS(n[0]-i)0?2:1:TS(n[1]-t)0?1:0:o>0?3:2}function a(e,t){return l(e.x,t.x)}function l(e,t){var i=s(e,1),n=s(t,1);return i!==n?i-n:0===i?t[1]-e[1]:1===i?e[0]-t[0]:2===i?e[1]-t[1]:t[0]-e[0]}return function(s){var l,c,u,h,d,g,f,p,m,_,v,b=s,y=Zx(),w={point:C,lineStart:function(){w.point=S,c&&c.push(u=[]),_=!0,m=!1,f=p=NaN},lineEnd:function(){l&&(S(h,d),g&&m&&y.rejoin(),l.push(y.result())),w.point=C,m&&b.lineEnd()},polygonStart:function(){b=y,l=[],c=[],v=!0},polygonEnd:function(){var t=function(){for(var t=0,i=0,o=c.length;in&&(d-r)*(n-s)>(g-s)*(e-r)&&++t:g<=n&&(d-r)*(n-s)<(g-s)*(e-r)&&--t;return t}(),i=v&&t,o=(l=ck(l)).length;(i||o)&&(s.polygonStart(),i&&(s.lineStart(),r(null,null,1,s),s.lineEnd()),o&&Jx(l,a,t,r,s),s.polygonEnd()),b=s,l=c=u=null}};function C(e,t){o(e,t)&&b.point(e,t)}function S(r,s){var a=o(r,s);if(c&&u.push([r,s]),_)h=r,d=s,g=a,_=!1,a&&(b.lineStart(),b.point(r,s));else if(a&&m)b.point(r,s);else{var l=[f=Math.max(_k,Math.min(mk,f)),p=Math.max(_k,Math.min(mk,p))],y=[r=Math.max(_k,Math.min(mk,r)),s=Math.max(_k,Math.min(mk,s))];!function(e,t,i,n,o,r){var s,a=e[0],l=e[1],c=0,u=1,h=t[0]-a,d=t[1]-l;if(s=i-a,h||!(s>0)){if(s/=h,h<0){if(s0){if(s>u)return;s>c&&(c=s)}if(s=o-a,h||!(s<0)){if(s/=h,h<0){if(s>u)return;s>c&&(c=s)}else if(h>0){if(s0)){if(s/=d,d<0){if(s0){if(s>u)return;s>c&&(c=s)}if(s=r-l,d||!(s<0)){if(s/=d,d<0){if(s>u)return;s>c&&(c=s)}else if(d>0){if(s0&&(e[0]=a+c*h,e[1]=l+c*d),u<1&&(t[0]=a+u*h,t[1]=l+u*d),!0}}}}}(l,y,e,t,i,n)?a&&(b.lineStart(),b.point(r,s),v=!1):(m||(b.lineStart(),b.point(l[0],l[1])),b.point(y[0],y[1]),a||b.lineEnd(),v=!1)}f=r,p=s,m=a}return w}}function bk(e,t){function i(i,n){return i=e(i,n),t(i[0],i[1])}return e.invert&&t.invert&&(i.invert=function(i,n){return(i=t.invert(i,n))&&e.invert(i[0],i[1])}),i}function yk(e,t){return[TS(e)>LS?e+Math.round(-e/AS)*AS:e,t]}function wk(e,t,i){return(e%=AS)?t||i?bk(Sk(e),xk(t,i)):Sk(e):t||i?xk(t,i):yk}function Ck(e){return function(t,i){return[(t+=e)>LS?t-AS:t<-LS?t+AS:t,i]}}function Sk(e){var t=Ck(e);return t.invert=Ck(-e),t}function xk(e,t){var i=FS(e),n=HS(e),o=FS(t),r=HS(t);function s(e,t){var s=FS(t),a=FS(e)*s,l=HS(e)*s,c=HS(t),u=c*i+a*n;return[OS(l*o-u*r,a*i-c*n),KS(u*o+l*r)]}return s.invert=function(e,t){var s=FS(t),a=FS(e)*s,l=HS(e)*s,c=HS(t),u=c*o-l*r;return[OS(l*o+c*r,a*i+u*n),KS(u*i-a*n)]},s}function kk(e){return function(t){var i=new Dk;for(var n in e)i[n]=e[n];return i.stream=t,i}}function Dk(){}function Lk(e,t,i){var n=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=n&&e.clipExtent(null),SS(i,e.stream(hx)),t(hx.result()),null!=n&&e.clipExtent(n),e}function Nk(e,t,i){return Lk(e,(function(i){var n=t[1][0]-t[0][0],o=t[1][1]-t[0][1],r=Math.min(n/(i[1][0]-i[0][0]),o/(i[1][1]-i[0][1])),s=+t[0][0]+(n-r*(i[1][0]+i[0][0]))/2,a=+t[0][1]+(o-r*(i[1][1]+i[0][1]))/2;e.scale(150*r).translate([s,a])}),i)}function Ek(e,t,i){return Nk(e,[[0,0],t],i)}function Ak(e,t,i){return Lk(e,(function(i){var n=+t,o=n/(i[1][0]-i[0][0]),r=(n-o*(i[1][0]+i[0][0]))/2,s=-o*i[0][1];e.scale(150*o).translate([r,s])}),i)}function Mk(e,t,i){return Lk(e,(function(i){var n=+t,o=n/(i[1][1]-i[0][1]),r=-o*i[0][0],s=(n-o*(i[1][1]+i[0][1]))/2;e.scale(150*o).translate([r,s])}),i)}yk.invert=yk,Dk.prototype={constructor:Dk,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Ik=FS(30*IS);function Tk(e,t){return+t?function(e,t){function i(n,o,r,s,a,l,c,u,h,d,g,f,p,m){var _=c-n,v=u-o,b=_*_+v*v;if(b>4*t&&p--){var y=s+d,w=a+g,C=l+f,S=US(y*y+w*w+C*C),x=KS(C/=S),k=TS(TS(C)-1)t||TS((_*E+v*A)/b-.5)>.3||s*d+a*g+l*f2?e[2]%360*IS:0,E()):[m*MS,_*MS,v*MS]},L.angle=function(e){return arguments.length?(b=e%360*IS,E()):b*MS},L.reflectX=function(e){return arguments.length?(y=e?-1:1,E()):y<0},L.reflectY=function(e){return arguments.length?(w=e?-1:1,E()):w<0},L.precision=function(e){return arguments.length?(s=Tk(a,D=e*e),A()):US(D)},L.fitExtent=function(e,t){return Nk(L,e,t)},L.fitSize=function(e,t){return Ek(L,e,t)},L.fitWidth=function(e,t){return Ak(L,e,t)},L.fitHeight=function(e,t){return Mk(L,e,t)},function(){return t=e.apply(this,arguments),L.invert=t.invert&&N,E()}}function Bk(e){var t=0,i=LS/3,n=Pk(e),o=n(t,i);return o.parallels=function(e){return arguments.length?n(t=e[0]*IS,i=e[1]*IS):[t*MS,i*MS]},o}function zk(e,t){var i=HS(e),n=(i+HS(t))/2;if(TS(n)2?e[2]*IS:0),t.invert=function(t){return(t=e.invert(t[0]*IS,t[1]*IS))[0]*=MS,t[1]*=MS,t},t}(o.rotate()).invert([0,0]));return l(null==c?[[a[0]-r,a[1]-r],[a[0]+r,a[1]+r]]:e===qk?[[Math.max(a[0]-r,c),t],[Math.min(a[0]+r,i),n]]:[[c,Math.max(a[1]-r,t)],[i,Math.min(a[1]+r,n)]])}return o.scale=function(e){return arguments.length?(s(e),u()):s()},o.translate=function(e){return arguments.length?(a(e),u()):a()},o.center=function(e){return arguments.length?(r(e),u()):r()},o.clipExtent=function(e){return arguments.length?(null==e?c=t=i=n=null:(c=+e[0][0],t=+e[0][1],i=+e[1][0],n=+e[1][1]),u()):null==c?null:[[c,t],[i,n]]},u()}function Gk(e){return jS((NS+e)/2)}function Yk(e,t){var i=FS(e),n=e===t?HS(e):WS(i/FS(t))/WS(Gk(t)/Gk(e)),o=i*VS(Gk(e),n)/n;if(!n)return qk;function r(e,t){o>0?t<-NS+kS&&(t=-NS+kS):t>NS-kS&&(t=NS-kS);var i=o/VS(Gk(t),n);return[i*HS(n*e),o-i*FS(n*e)]}return r.invert=function(e,t){var i=o-t,r=$S(n)*US(e*e+i*i),s=OS(e,TS(i))*$S(i);return i*n<0&&(s-=LS*$S(e)*$S(i)),[s/n,2*RS(VS(o/r,1/n))-NS]},r}function Zk(e,t){return[e,t]}function Xk(e,t){var i=FS(e),n=e===t?HS(e):(i-FS(t))/(t-e),o=i/n+e;if(TS(n)kS&&--o>0);return[e/(.8707+(r=n*n)*(r*(r*r*r*(.003971-.001529*r)-.013791)-.131979)),n]},sD.invert=$k(KS),aD.invert=$k((function(e){return 2*RS(e)})),lD.invert=function(e,t){return[-t,2*RS(BS(e))-NS]};var cD=Math.abs,uD=(Math.atan,Math.atan2,Math.ceil,Math.cos),hD=(Math.exp,Math.floor,Math.log,Math.max,Math.min,Math.pow,Math.round,Math.sign,Math.sin),dD=(Math.tan,Math.PI),gD=dD/2,fD=(Math.SQRT1_2,mD(2));function pD(e){return e>1?gD:e<-1?-gD:Math.asin(e)}function mD(e){return e>0?Math.sqrt(e):0}function _D(e,t){var i,n=e*hD(t),o=30;do{t-=i=(t+hD(t)-n)/(1+uD(t))}while(cD(i)>1e-6&&--o>0);return t/2}mD(dD);var vD=function(e,t,i){function n(n,o){return[e*n*uD(o=_D(i,o)),t*hD(o)]}return n.invert=function(n,o){return o=pD(o/t),[n/(e*uD(o)),pD((2*o+hD(2*o))/i)]},n}(fD/gD,fD,dD);const bD=Yx(),yD=["clipAngle","clipExtent","scale","translate","center","rotate","parallels","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];function wD(e,t){return function i(){const n=t();return n.type=e,n.path=Yx().projection(n),n.copy=n.copy||function(){const e=i();return yD.forEach((t=>{n[t]&&e[t](n[t]())})),e.path.pointRadius(n.path.pointRadius()),e},n}}function CD(e,t){if(!e||"string"!=typeof e)throw new Error("Projection type must be a name string.");return e=e.toLowerCase(),arguments.length>1?(xD[e]=wD(e,t),this):xD[e]||null}function SD(e){return e&&e.path||bD}const xD={albers:Vk,albersusa:function(){var e,t,i,n,o,r,s=Vk(),a=Wk().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=Wk().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(e,t){r=[e,t]}};function u(e){var t=e[0],s=e[1];return r=null,i.point(t,s),r||(n.point(t,s),r)||(o.point(t,s),r)}function h(){return e=t=null,u}return u.invert=function(e){var t=s.scale(),i=s.translate(),n=(e[0]-i[0])/t,o=(e[1]-i[1])/t;return(o>=.12&&o<.234&&n>=-.425&&n<-.214?a:o>=.166&&o<.234&&n>=-.214&&n<-.115?l:s).invert(e)},u.stream=function(i){return e&&t===i?e:e=function(e){var t=e.length;return{point:function(i,n){for(var o=-1;++o2?e[2]+90:90]):[(e=i())[0],e[1],e[2]-90]},i([0,0,90]).scale(159.155)}};for(const e in xD)CD(e,xD[e]);function kD(e,t,i){var n=uu(e,t-kS,i).concat(t);return function(e){return n.map((function(t){return[e,t]}))}}function DD(e,t,i){var n=uu(e,t-kS,i).concat(t);return function(e){return n.map((function(t){return[t,e]}))}}function LD(){}const ND=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function ED(){var e=1,t=1,i=s;function n(e,t){return t.map((t=>o(e,t)))}function o(n,o){var s=[],a=[];return function(i,n,o){var s,a,l,c,u,h,d=new Array,g=new Array;for(s=a=-1,c=i[0]>=n,ND[c<<1].forEach(f);++s=n,ND[l|c<<1].forEach(f);for(ND[c<<0].forEach(f);++a=n,u=i[a*e]>=n,ND[c<<1|u<<2].forEach(f);++s=n,h=u,u=i[a*e+s+1]>=n,ND[l|c<<1|u<<2|h<<3].forEach(f);ND[c|u<<3].forEach(f)}for(s=-1,u=i[a*e]>=n,ND[u<<2].forEach(f);++s=n,ND[u<<2|h<<3].forEach(f);function f(e){var t,i,n=[e[0][0]+s,e[0][1]+a],l=[e[1][0]+s,e[1][1]+a],c=r(n),u=r(l);(t=g[c])?(i=d[u])?(delete g[t.end],delete d[i.start],t===i?(t.ring.push(l),o(t.ring)):d[t.start]=g[i.end]={start:t.start,end:i.end,ring:t.ring.concat(i.ring)}):(delete g[t.end],t.ring.push(l),g[t.end=u]=t):(t=d[u])?(i=g[c])?(delete d[t.start],delete g[i.end],t===i?(t.ring.push(l),o(t.ring)):d[i.start]=g[t.end]={start:i.start,end:t.end,ring:i.ring.concat(t.ring)}):(delete d[t.start],t.ring.unshift(n),d[t.start=c]=t):d[c]=g[u]={start:c,end:u,ring:[n,l]}}ND[u<<3].forEach(f)}(n,o,(e=>{i(e,n,o),function(e){for(var t=0,i=e.length,n=e[i-1][1]*e[0][0]-e[i-1][0]*e[0][1];++t0?s.push([e]):a.push(e)})),a.forEach((e=>{for(var t,i=0,n=s.length;i{var r,s=i[0],a=i[1],l=0|s,c=0|a,u=n[c*e+l];s>0&&s0&&a=0&&r>=0||qt("invalid size"),e=o,t=r,n},n.smooth=function(e){return arguments.length?(i=e?s:LD,n):i===s},n}function AD(e,t){for(var i,n=-1,o=t.length;++nn!=g>n&&i<(d-c)*(n-u)/(g-u)+c&&(o=-o)}return o}function ID(e,t,i){var n;return function(e,t,i){return(t[0]-e[0])*(i[1]-e[1])==(i[0]-e[0])*(t[1]-e[1])}(e,t,i)&&function(e,t,i){return e<=t&&t<=i||i<=t&&t<=e}(e[n=+(e[0]===t[0])],i[n],t[n])}function TD(e,t,i){return function(n){var o=Ui(n),r=i?Math.min(o[0],0):o[0],s=o[1],a=s-r,l=t?uo(r,s,e):a/(e+1);return uu(r+l,s,l)}}function RD(e){oc.call(this,null,e)}function OD(e,t,i,n,o){const r=e.x1||0,s=e.y1||0,a=t*i<0;function l(e){e.forEach(c)}function c(e){a&&e.reverse(),e.forEach(u)}function u(e){e[0]=(e[0]-r)*t+n,e[1]=(e[1]-s)*i+o}return function(e){return e.coordinates.forEach(l),e}}function FD(e,t,i){const n=e>=0?e:bc(t,i);return Math.round((Math.sqrt(4*n*n+1)-1)/2)}function PD(e){return Oi(e)?e:Vi(+e)}function BD(){var e=e=>e[0],t=e=>e[1],i=Qt,n=[-1,-1],o=960,r=500,s=2;function a(a,l){const c=FD(n[0],a,e)>>s,u=FD(n[1],a,t)>>s,h=c?c+2:0,d=u?u+2:0,g=2*h+(o>>s),f=2*d+(r>>s),p=new Float32Array(g*f),m=new Float32Array(g*f);let _=p;a.forEach((n=>{const o=h+(+e(n)>>s),r=d+(+t(n)>>s);o>=0&&o=0&&r0&&u>0?(zD(g,f,p,m,c),WD(g,f,m,p,u),zD(g,f,p,m,c),WD(g,f,m,p,u),zD(g,f,p,m,c),WD(g,f,m,p,u)):c>0?(zD(g,f,p,m,c),zD(g,f,m,p,c),zD(g,f,p,m,c),_=m):u>0&&(WD(g,f,p,m,u),WD(g,f,m,p,u),WD(g,f,p,m,u),_=m);const v=l?Math.pow(2,-2*s):1/WC(_);for(let e=0,t=g*f;e>s),y2:d+(r>>s)}}return a.x=function(t){return arguments.length?(e=PD(t),a):e},a.y=function(e){return arguments.length?(t=PD(e),a):t},a.weight=function(e){return arguments.length?(i=PD(e),a):i},a.size=function(e){if(!arguments.length)return[o,r];var t=+e[0],i=+e[1];return t>=0&&i>=0||qt("invalid size"),o=t,r=i,a},a.cellSize=function(e){return arguments.length?((e=+e)>=1||qt("invalid cell size"),s=Math.floor(Math.log(e)/Math.LN2),a):1<=o&&(t>=r&&(a-=i[t-r+s*e]),n[t-o+s*e]=a/Math.min(t+1,e-1+r-t,r))}function WD(e,t,i,n,o){const r=1+(o<<1);for(let s=0;s=o&&(a>=r&&(l-=i[s+(a-r)*e]),n[s+(a-o)*e]=l/Math.min(a+1,t-1+r-a,r))}function VD(e){oc.call(this,null,e)}RD.Definition={type:"Isocontour",metadata:{generates:!0},params:[{name:"field",type:"field"},{name:"thresholds",type:"number",array:!0},{name:"levels",type:"number"},{name:"nice",type:"boolean",default:!1},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"zero",type:"boolean",default:!0},{name:"smooth",type:"boolean",default:!0},{name:"scale",type:"number",expr:!0},{name:"translate",type:"number",array:!0,expr:!0},{name:"as",type:"string",null:!0,default:"contour"}]},Xi(RD,oc,{transform(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var i=t.fork(t.NO_SOURCE|t.NO_FIELDS),n=t.materialize(t.SOURCE).source,o=e.field||Zt,r=ED().smooth(!1!==e.smooth),s=e.thresholds||function(e,t,i){const n=TD(i.levels||10,i.nice,!1!==i.zero);return"shared"!==i.resolve?n:n(e.map((e=>lc(t(e).values))))}(n,o,e),a=null===e.as?null:e.as||"contour",l=[];return n.forEach((t=>{const i=o(t),n=r.size([i.width,i.height])(i.values,li(s)?s:s(i.values));!function(e,t,i,n){let o=n.scale||t.scale,r=n.translate||t.translate;if(Oi(o)&&(o=o(i,n)),Oi(r)&&(r=r(i,n)),(1===o||null==o)&&!r)return;const s=(nn(o)?o:o[0])||1,a=(nn(o)?o:o[1])||1,l=r&&r[0]||0,c=r&&r[1]||0;e.forEach(OD(t,s,a,l,c))}(n,i,t,e),n.forEach((e=>{l.push(Al(t,Nl(null!=a?{[a]:e}:e)))}))})),this.value&&(i.rem=this.value),this.value=i.source=i.add=l,i}}),VD.Definition={type:"KDE2D",metadata:{generates:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"weight",type:"field"},{name:"groupby",type:"field",array:!0},{name:"cellSize",type:"number"},{name:"bandwidth",type:"number",array:!0,length:2},{name:"counts",type:"boolean",default:!1},{name:"as",type:"string",default:"grid"}]};const HD=["x","y","weight","size","cellSize","bandwidth"];function $D(e,t){return HD.forEach((i=>null!=t[i]?e[i](t[i]):0)),e}function UD(e){oc.call(this,null,e)}Xi(VD,oc,{transform(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var i,n=t.fork(t.NO_SOURCE|t.NO_FIELDS),o=function(e,t){var i,n,o,r,s,a,l=[],c=e=>e(r);if(null==t)l.push(e);else for(i={},n=0,o=e.length;nNl(function(e,t){for(let i=0;ikS})).map(l)).concat(uu(PS(r/g)*g,o,g).filter((function(e){return TS(e%p)>kS})).map(c))}return _.lines=function(){return v().map((function(e){return{type:"LineString",coordinates:e}}))},_.outline=function(){return{type:"Polygon",coordinates:[u(n).concat(h(s).slice(1),u(i).reverse().slice(1),h(a).reverse().slice(1))]}},_.extent=function(e){return arguments.length?_.extentMajor(e).extentMinor(e):_.extentMinor()},_.extentMajor=function(e){return arguments.length?(n=+e[0][0],i=+e[1][0],a=+e[0][1],s=+e[1][1],n>i&&(e=n,n=i,i=e),a>s&&(e=a,a=s,s=e),_.precision(m)):[[n,a],[i,s]]},_.extentMinor=function(i){return arguments.length?(t=+i[0][0],e=+i[1][0],r=+i[0][1],o=+i[1][1],t>e&&(i=t,t=e,e=i),r>o&&(i=r,r=o,o=i),_.precision(m)):[[t,r],[e,o]]},_.step=function(e){return arguments.length?_.stepMajor(e).stepMinor(e):_.stepMinor()},_.stepMajor=function(e){return arguments.length?(f=+e[0],p=+e[1],_):[f,p]},_.stepMinor=function(e){return arguments.length?(d=+e[0],g=+e[1],_):[d,g]},_.precision=function(d){return arguments.length?(m=+d,l=kD(r,o,90),c=DD(t,e,m),u=kD(a,s,90),h=DD(n,i,m),_):m},_.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}()}function QD(e){oc.call(this,null,e)}function JD(e){if(!Oi(e))return!1;const t=vn(Ht(e));return t.$x||t.$y||t.$value||t.$max}function eL(e){oc.call(this,null,e),this.modified(!0)}function tL(e,t,i){Oi(e[t])&&e[t](i)}function iL(e,t,i,n){if(isNaN(t)||isNaN(i))return e;var o,r,s,a,l,c,u,h,d,g=e._root,f={data:n},p=e._x0,m=e._y0,_=e._x1,v=e._y1;if(!g)return e._root=f,e;for(;g.length;)if((c=t>=(r=(p+_)/2))?p=r:_=r,(u=i>=(s=(m+v)/2))?m=s:v=s,o=g,!(g=g[h=u<<1|c]))return o[h]=f,e;if(a=+e._x.call(null,g.data),l=+e._y.call(null,g.data),t===a&&i===l)return f.next=g,o?o[h]=f:e._root=f,e;do{o=o?o[h]=new Array(4):e._root=new Array(4),(c=t>=(r=(p+_)/2))?p=r:_=r,(u=i>=(s=(m+v)/2))?m=s:v=s}while((h=u<<1|c)==(d=(l>=s)<<1|a>=r));return o[d]=g,o[h]=f,e}function nL(e,t,i,n,o){this.node=e,this.x0=t,this.y0=i,this.x1=n,this.y1=o}function oL(e){return e[0]}function rL(e){return e[1]}function sL(e,t,i){var n=new aL(null==t?oL:t,null==i?rL:i,NaN,NaN,NaN,NaN);return null==e?n:n.addAll(e)}function aL(e,t,i,n,o,r){this._x=e,this._y=t,this._x0=i,this._y0=n,this._x1=o,this._y1=r,this._root=void 0}function lL(e){for(var t={data:e.data},i=t;e=e.next;)i=i.next={data:e.data};return t}KD.Definition={type:"GeoJSON",metadata:{},params:[{name:"fields",type:"field",array:!0,length:2},{name:"geojson",type:"field"}]},Xi(KD,oc,{transform(e,t){var i,n=this._features,o=this._points,r=e.fields,s=r&&r[0],a=r&&r[1],l=e.geojson||!r&&Zt,c=t.ADD;i=e.modified()||t.changed(t.REM)||t.modified(Ht(l))||s&&t.modified(Ht(s))||a&&t.modified(Ht(a)),this.value&&!i||(c=t.SOURCE,this._features=n=[],this._points=o=[]),l&&t.visit(c,(e=>n.push(l(e)))),s&&a&&(t.visit(c,(e=>{var t=s(e),i=a(e);null!=t&&null!=i&&(t=+t)===t&&(i=+i)===i&&o.push([t,i])})),n=n.concat({type:jD,geometry:{type:"MultiPoint",coordinates:o}})),this.value={type:qD,features:n}}}),GD.Definition={type:"GeoPath",metadata:{modifies:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"path"}]},Xi(GD,oc,{transform(e,t){var i=t.fork(t.ALL),n=this.value,o=e.field||Zt,r=e.as||"path",s=i.SOURCE;!n||e.modified()?(this.value=n=SD(e.projection),i.materialize().reflow()):s=o===Zt||t.modified(o.fields)?i.ADD_MOD:i.ADD;const a=function(e,t){const i=e.pointRadius();return e.context(null),null!=t&&e.pointRadius(t),i}(n,e.pointRadius);return i.visit(s,(e=>e[r]=n(o(e)))),n.pointRadius(a),i.modifies(r)}}),YD.Definition={type:"GeoPoint",metadata:{modifies:!0},params:[{name:"projection",type:"projection",required:!0},{name:"fields",type:"field",array:!0,required:!0,length:2},{name:"as",type:"string",array:!0,length:2,default:["x","y"]}]},Xi(YD,oc,{transform(e,t){var i,n=e.projection,o=e.fields[0],r=e.fields[1],s=e.as||["x","y"],a=s[0],l=s[1];function c(e){const t=n([o(e),r(e)]);t?(e[a]=t[0],e[l]=t[1]):(e[a]=void 0,e[l]=void 0)}return e.modified()?t=t.materialize().reflow(!0).visit(t.SOURCE,c):(i=t.modified(o.fields)||t.modified(r.fields),t.visit(i?t.ADD_MOD:t.ADD,c)),t.modifies(s)}}),ZD.Definition={type:"GeoShape",metadata:{modifies:!0,nomod:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field",default:"datum"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"shape"}]},Xi(ZD,oc,{transform(e,t){var i=t.fork(t.ALL),n=this.value,o=e.as||"shape",r=i.ADD;return n&&!e.modified()||(this.value=n=function(e,t,i){const n=null==i?i=>e(t(i)):n=>{var o=e.pointRadius(),r=e.pointRadius(i)(t(n));return e.pointRadius(o),r};return n.context=t=>(e.context(t),n),n}(SD(e.projection),e.field||Gt("datum"),e.pointRadius),i.materialize().reflow(),r=i.SOURCE),i.visit(r,(e=>e[o]=n)),i.modifies(o)}}),XD.Definition={type:"Graticule",metadata:{changes:!0,generates:!0},params:[{name:"extent",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMajor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMinor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"step",type:"number",array:!0,length:2},{name:"stepMajor",type:"number",array:!0,length:2,default:[90,360]},{name:"stepMinor",type:"number",array:!0,length:2,default:[10,10]},{name:"precision",type:"number",default:2.5}]},Xi(XD,oc,{transform(e,t){var i,n=this.value,o=this.generator;if(!n.length||e.modified())for(const t in e)Oi(o[t])&&o[t](e[t]);return i=o(),n.length?t.mod.push(Ml(n[0],i)):t.add.push(Nl(i)),n[0]=i,t}}),QD.Definition={type:"heatmap",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"color",type:"string",expr:!0},{name:"opacity",type:"number",expr:!0},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"as",type:"string",default:"image"}]},Xi(QD,oc,{transform(e,t){if(!t.changed()&&!e.modified())return t.StopPropagation;var i=t.materialize(t.SOURCE).source,n="shared"===e.resolve,o=e.field||Zt,r=function(e,t){let i;return Oi(e)?(i=i=>e(i,t),i.dep=JD(e)):e?i=Vi(e):(i=e=>e.$value/e.$max||0,i.dep=!0),i}(e.opacity,e),s=function(e,t){let i;return Oi(e)?(i=i=>Eg(e(i,t)),i.dep=JD(e)):i=Vi(Eg(e||"#888")),i}(e.color,e),a=e.as||"image",l={$x:0,$y:0,$value:0,$max:n?lc(i.map((e=>lc(o(e).values)))):0};return i.forEach((e=>{const t=o(e),i=$i({},e,l);n||(i.$max=lc(t.values||[])),e[a]=function(e,t,i,n){const o=e.width,r=e.height,s=e.x1||0,a=e.y1||0,l=e.x2||o,c=e.y2||r,u=e.values,h=u?e=>u[e]:Xt,d=Zd(l-s,c-a),g=d.getContext("2d"),f=g.getImageData(0,0,l-s,c-a),p=f.data;for(let e=a,r=0;e{null!=e[t]&&tL(i,t,e[t])}))):yD.forEach((t=>{e.modified(t)&&tL(i,t,e[t])})),null!=e.pointRadius&&i.path.pointRadius(e.pointRadius),e.fit&&function(e,t){const i=function(e){return 1===(e=Ti(e)).length?e[0]:{type:qD,features:e.reduce(((e,t)=>e.concat(function(e){return e.type===qD?e.features:Ti(e).filter((e=>null!=e)).map((e=>e.type===jD?e:{type:jD,geometry:e}))}(t))),[])}}(t.fit);t.extent?e.fitExtent(t.extent,i):t.size&&e.fitSize(t.size,i)}(i,e),t.fork(t.NO_SOURCE|t.NO_FIELDS)}});var cL=sL.prototype=aL.prototype;function uL(e){return function(){return e}}function hL(e){return 1e-6*(e()-.5)}function dL(e){return e.x+e.vx}function gL(e){return e.y+e.vy}cL.copy=function(){var e,t,i=new aL(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return i;if(!n.length)return i._root=lL(n),i;for(e=[{source:n,target:i._root=new Array(4)}];n=e.pop();)for(var o=0;o<4;++o)(t=n.source[o])&&(t.length?e.push({source:t,target:n.target[o]=new Array(4)}):n.target[o]=lL(t));return i},cL.add=function(e){const t=+this._x.call(null,e),i=+this._y.call(null,e);return iL(this.cover(t,i),t,i,e)},cL.addAll=function(e){var t,i,n,o,r=e.length,s=new Array(r),a=new Array(r),l=1/0,c=1/0,u=-1/0,h=-1/0;for(i=0;iu&&(u=n),oh&&(h=o));if(l>u||c>h)return this;for(this.cover(l,c).cover(u,h),i=0;ie||e>=o||n>t||t>=r;)switch(a=(td||(r=l.y0)>g||(s=l.x1)=_)<<1|e>=m)&&(l=f[f.length-1],f[f.length-1]=f[f.length-1-c],f[f.length-1-c]=l)}else{var v=e-+this._x.call(null,p.data),b=t-+this._y.call(null,p.data),y=v*v+b*b;if(y=(a=(f+m)/2))?f=a:m=a,(u=s>=(l=(p+_)/2))?p=l:_=l,t=g,!(g=g[h=u<<1|c]))return this;if(!g.length)break;(t[h+1&3]||t[h+2&3]||t[h+3&3])&&(i=t,d=h)}for(;g.data!==e;)if(n=g,!(g=g.next))return this;return(o=g.next)&&delete g.next,n?(o?n.next=o:delete n.next,this):t?(o?t[h]=o:delete t[h],(g=t[0]||t[1]||t[2]||t[3])&&g===(t[3]||t[2]||t[1]||t[0])&&!g.length&&(i?i[d]=g:this._root=g),this):(this._root=o,this)},cL.removeAll=function(e){for(var t=0,i=e.length;t{}};function pL(){for(var e,t=0,i=arguments.length,n={};t=0&&(i=e.slice(n+1),e=e.slice(0,n)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:i}}))}function vL(e,t){for(var i,n=0,o=e.length;n0)for(var i,n,o=new Array(i),r=0;r=0&&t._call.call(null,e),t=t._next;--SL}()}finally{SL=0,function(){for(var e,t,i=wL,n=1/0;i;)i._call?(n>i._time&&(n=i._time),e=i,i=i._next):(t=i._next,i._next=null,i=e?e._next=t:wL=t);CL=e,PL(n)}(),LL=0}}function FL(){var e=EL.now(),t=e-DL;t>1e3&&(NL-=t,DL=e)}function PL(e){SL||(xL&&(xL=clearTimeout(xL)),e-LL>24?(e<1/0&&(xL=setTimeout(OL,e-EL.now()-NL)),kL&&(kL=clearInterval(kL))):(kL||(DL=EL.now(),kL=setInterval(FL,1e3)),SL=1,AL(OL)))}TL.prototype=RL.prototype={constructor:TL,restart:function(e,t,i){if("function"!=typeof e)throw new TypeError("callback is not a function");i=(null==i?ML():+i)+(null==t?0:+t),this._next||CL===this||(CL?CL._next=this:wL=this,CL=this),this._call=e,this._time=i,PL()},stop:function(){this._call&&(this._call=null,this._time=1/0,PL())}};const BL=4294967296;function zL(e){return e.x}function WL(e){return e.y}var VL=Math.PI*(3-Math.sqrt(5));function HL(e){return e.index}function $L(e,t){var i=e.get(t);if(!i)throw new Error("node not found: "+t);return i}const UL={center:function(e,t){var i,n=1;function o(){var o,r,s=i.length,a=0,l=0;for(o=0;oc+f||ru+f||sl.index){var p=c-a.x-a.vx,m=u-a.y-a.vy,_=p*p+m*m;_e.r&&(e.r=e[t].r)}function l(){if(t){var n,o,r=t.length;for(i=new Array(r),n=0;n=a)){(e.data!==t||e.next)&&(0===h&&(f+=(h=hL(i))*h),0===d&&(f+=(d=hL(i))*d),f[a(e,t,n),e])));for(s=0,o=new Array(c);st(e,i):t)}function eN(e){var t=0,i=e.children,n=i&&i.length;if(n)for(;--n>=0;)t+=i[n].value;else t=1;e.value=t}function tN(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=nN)):void 0===t&&(t=iN);for(var i,n,o,r,s,a=new sN(e),l=[a];i=l.pop();)if((o=t(i.data))&&(s=(o=Array.from(o)).length))for(i.children=o,r=s-1;r>=0;--r)l.push(n=o[r]=new sN(o[r])),n.parent=i,n.depth=i.depth+1;return a.eachBefore(rN)}function iN(e){return e.children}function nN(e){return Array.isArray(e)?e[1]:null}function oN(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function rN(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function sN(e){this.data=e,this.depth=this.height=0,this.parent=null}function aN(e,t){var i,n;if(uN(t,e))return[t];for(i=0;i0&&i*i>n*n+o*o}function uN(e,t){for(var i=0;i(s*=s)?(n=(c+s-o)/(2*c),r=Math.sqrt(Math.max(0,s/c-n*n)),i.x=e.x-n*a-r*l,i.y=e.y-n*l+r*a):(n=(c+o-s)/(2*c),r=Math.sqrt(Math.max(0,o/c-n*n)),i.x=t.x+n*a-r*l,i.y=t.y+n*l+r*a)):(i.x=t.x+i.r,i.y=t.y)}function pN(e,t){var i=e.r+t.r-1e-6,n=t.x-e.x,o=t.y-e.y;return i>0&&i*i>n*n+o*o}function mN(e){var t=e._,i=e.next._,n=t.r+i.r,o=(t.x*i.r+i.x*t.r)/n,r=(t.y*i.r+i.y*t.r)/n;return o*o+r*r}function _N(e){this._=e,this.next=null,this.previous=null}function vN(e){if(!(o=(e=function(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}(e)).length))return 0;var t,i,n,o,r,s,a,l,c,u,h;if((t=e[0]).x=0,t.y=0,!(o>1))return t.r;if(i=e[1],t.x=-i.r,i.x=t.r,i.y=0,!(o>2))return t.r+i.r;fN(i,t,n=e[2]),t=new _N(t),i=new _N(i),n=new _N(n),t.next=n.previous=i,i.next=t.previous=n,n.next=i.previous=t;e:for(a=3;a(e=(1664525*e+1013904223)%BL)/BL}();function h(){d(),c.call("tick",t),i1?(null==i?a.delete(e):a.set(e,f(i)),t):a.get(e)},find:function(t,i,n){var o,r,s,a,l,c=0,u=e.length;for(null==n?n=1/0:n*=n,c=0;c1?(c.on(e,i),t):c.on(e)}}}(e),n=i.stop,o=i.restart;let r=!1;return i.stopped=()=>r,i.restart=()=>(r=!1,o()),i.stop=()=>(r=!0,n()),ZL(i,t,!0).on("end",(()=>r=!0))}(t.source,e),o.on("tick",(i=t.dataflow,n=this,()=>i.touch(n).run())),e.static||(r=!0,o.tick()),t.modifies("index")),s||r||e.modified(KL)||t.changed()&&e.restart)if(o.alpha(Math.max(o.alpha(),e.alpha||1)).alphaDecay(1-Math.pow(o.alphaMin(),1/a)),e.static)for(o.stop();--a>=0;)o.tick();else if(o.stopped()&&o.restart(),!r)return t.StopPropagation;return this.finish(e,t)},finish(e,t){const i=t.dataflow;for(let e,t=this._argops,a=0,l=t.length;a=0;--n)r.push(i[n]);return this},find:function(e,t){let i=-1;for(const n of this)if(e.call(t,n,++i,this))return n},sum:function(e){return this.eachAfter((function(t){for(var i=+e(t.data)||0,n=t.children,o=n&&n.length;--o>=0;)i+=n[o].value;t.value=i}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,i=function(e,t){if(e===t)return e;var i=e.ancestors(),n=t.ancestors(),o=null;for(e=i.pop(),t=n.pop();e===t;)o=e,e=i.pop(),t=n.pop();return o}(t,e),n=[t];t!==i;)t=t.parent,n.push(t);for(var o=n.length;e!==i;)n.splice(o,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(i){i!==e&&t.push({source:i.parent,target:i})})),t},copy:function(){return tN(this).eachBefore(oN)},[Symbol.iterator]:function*(){var e,t,i,n,o=this,r=[o];do{for(e=r.reverse(),r=[];o=e.pop();)if(yield o,t=o.children)for(i=0,n=t.length;i0)throw new Error("cycle");return r}return i.id=function(t){return arguments.length?(e=yN(t),i):e},i.parentId=function(e){return arguments.length?(t=yN(e),i):t},i}function RN(e,t){return e.parent===t.parent?1:2}function ON(e){var t=e.children;return t?t[0]:e.t}function FN(e){var t=e.children;return t?t[t.length-1]:e.t}function PN(e,t,i){var n=i/(t.i-e.i);t.c-=n,t.s+=i,e.c+=n,t.z+=i,t.m+=i}function BN(e,t,i){return e.a.parent===t.parent?e.a:i}function zN(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function WN(e,t){return e.parent===t.parent?1:2}function VN(e,t){return e+t.x}function HN(e,t){return Math.max(e,t.y)}function $N(e,t,i,n,o){for(var r,s=e.children,a=-1,l=s.length,c=e.value&&(o-i)/e.value;++ad&&(d=a),m=u*u*p,(g=Math.max(d/m,m/h))>f){u-=a;break}f=g}_.push(s={value:u,dice:l1?t:1)},i}(UN),KN=function e(t){function i(e,i,n,o,r){if((s=e._squarify)&&s.ratio===t)for(var s,a,l,c,u,h=-1,d=s.length,g=e.value;++h1?t:1)},i}(UN);function GN(e,t,i){const n={};return e.each((e=>{const o=e.data;i(o)&&(n[t(o)]=e)})),e.lookup=n,e}function YN(e){oc.call(this,null,e)}YN.Definition={type:"Nest",metadata:{treesource:!0,changes:!0},params:[{name:"keys",type:"field",array:!0},{name:"generate",type:"boolean"}]};const ZN=e=>e.values;function XN(){const e=[],t={entries:e=>n(i(e,0),0),key:i=>(e.push(i),t)};function i(t,n){if(n>=e.length)return t;const o=t.length,r=e[n++],s={},a={};let l,c,u,h=-1;for(;++he.length)return t;const o=[];for(const e in t)o.push({key:e,values:n(t[e],i)});return o}return t}function QN(e){oc.call(this,null,e)}Xi(YN,oc,{transform(e,t){t.source||qt("Nest transform requires an upstream data source.");var i=e.generate,n=e.modified(),o=t.clone(),r=this.value;return(!r||n||t.changed())&&(r&&r.each((e=>{e.children&&kl(e.data)&&o.rem.push(e.data)})),this.value=r=tN({values:Ti(e.keys).reduce(((e,t)=>(e.key(t),e)),XN()).entries(o.source)},ZN),i&&r.each((e=>{e.children&&(e=Nl(e.data),o.add.push(e),o.source.push(e))})),GN(r,Dl,Dl)),o.source.root=r,o}});const JN=(e,t)=>e.parent===t.parent?1:2;Xi(QN,oc,{transform(e,t){t.source&&t.source.root||qt(this.constructor.name+" transform requires a backing tree data source.");const i=this.layout(e.method),n=this.fields,o=t.source.root,r=e.as||n;e.field?o.sum(e.field):o.count(),e.sort&&o.sort(Il(e.sort,(e=>e.data))),function(e,t,i){for(let n,o=0,r=t.length;ofunction(e,t,i){const n=e.data,o=t.length-1;for(let r=0;r=0;--o)a.push(i=t.children[o]=new zN(n[o],o)),i.parent=t;return(s.parent=new zN(null,0)).children=[s],s}(o);if(l.eachAfter(r),l.parent.m=-l.z,l.eachBefore(s),n)o.eachBefore(a);else{var c=o,u=o,h=o;o.eachBefore((function(e){e.xu.x&&(u=e),e.depth>h.depth&&(h=e)}));var d=c===u?1:e(c,u)/2,g=d-c.x,f=t/(u.x+d+g),p=i/(h.depth||1);o.eachBefore((function(e){e.x=(e.x+g)*f,e.y=e.depth*p}))}return o}function r(t){var i=t.children,n=t.parent.children,o=t.i?n[t.i-1]:null;if(i){!function(e){for(var t,i=0,n=0,o=e.children,r=o.length;--r>=0;)(t=o[r]).z+=i,t.m+=i,i+=t.s+(n+=t.c)}(t);var r=(i[0].z+i[i.length-1].z)/2;o?(t.z=o.z+e(t._,o._),t.m=t.z-r):t.z=r}else o&&(t.z=o.z+e(t._,o._));t.parent.A=function(t,i,n){if(i){for(var o,r=t,s=t,a=i,l=r.parent.children[0],c=r.m,u=s.m,h=a.m,d=l.m;a=FN(a),r=ON(r),a&&r;)l=ON(l),(s=FN(s)).a=t,(o=a.z+h-r.z-c+e(a._,r._))>0&&(PN(BN(a,t,n),t,o),c+=o,u+=o),h+=a.m,c+=r.m,d+=l.m,u+=s.m;a&&!FN(s)&&(s.t=a,s.m+=h-u),r&&!ON(l)&&(l.t=r,l.m+=c-d,n=t)}return n}(t,o,t.parent.A||n[0])}function s(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function a(e){e.x*=t,e.y=e.depth*i}return o.separation=function(t){return arguments.length?(e=t,o):e},o.size=function(e){return arguments.length?(n=!1,t=+e[0],i=+e[1],o):n?null:[t,i]},o.nodeSize=function(e){return arguments.length?(n=!0,t=+e[0],i=+e[1],o):n?[t,i]:null},o},cluster:function(){var e=WN,t=1,i=1,n=!1;function o(o){var r,s=0;o.eachAfter((function(t){var i=t.children;i?(t.x=function(e){return e.reduce(VN,0)/e.length}(i),t.y=function(e){return 1+e.reduce(HN,0)}(i)):(t.x=r?s+=e(t,r):0,t.y=0,r=t)}));var a=function(e){for(var t;t=e.children;)e=t[0];return e}(o),l=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(o),c=a.x-e(a,l)/2,u=l.x+e(l,a)/2;return o.eachAfter(n?function(e){e.x=(e.x-o.x)*t,e.y=(o.y-e.y)*i}:function(e){e.x=(e.x-c)/(u-c)*t,e.y=(1-(o.y?e.y/o.y:1))*i})}return o.separation=function(t){return arguments.length?(e=t,o):e},o.size=function(e){return arguments.length?(n=!1,t=+e[0],i=+e[1],o):n?null:[t,i]},o.nodeSize=function(e){return arguments.length?(n=!0,t=+e[0],i=+e[1],o):n?[t,i]:null},o}},sE=["x","y","depth","children"];function aE(e){QN.call(this,e)}function lE(e){oc.call(this,[],e)}aE.Definition={type:"Tree",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"tidy",values:["tidy","cluster"]},{name:"size",type:"number",array:!0,length:2},{name:"nodeSize",type:"number",array:!0,length:2},{name:"separation",type:"boolean",default:!0},{name:"as",type:"string",array:!0,length:sE.length,default:sE}]},Xi(aE,QN,{layout(e){const t=e||"tidy";if(Ki(rE,t))return rE[t]();qt("Unrecognized Tree layout method: "+t)},params:["size","nodeSize"],fields:sE}),lE.Definition={type:"TreeLinks",metadata:{tree:!0,generates:!0,changes:!0},params:[]},Xi(lE,oc,{transform(e,t){const i=this.value,n=t.source&&t.source.root,o=t.fork(t.NO_SOURCE),r={};return n||qt("TreeLinks transform requires a tree data source."),t.changed(t.ADD_REM)?(o.rem=i,t.visit(t.SOURCE,(e=>r[Dl(e)]=1)),n.each((e=>{const t=e.data,i=e.parent&&e.parent.data;i&&r[Dl(t)]&&r[Dl(i)]&&o.add.push(Nl({source:i,target:t}))})),this.value=o.add):t.changed(t.MOD)&&(t.visit(t.MOD,(e=>r[Dl(e)]=1)),i.forEach((e=>{(r[Dl(e.source)]||r[Dl(e.target)])&&o.mod.push(e)}))),o}});const cE={binary:function(e,t,i,n,o){var r,s,a=e.children,l=a.length,c=new Array(l+1);for(c[0]=s=r=0;r=i-1){var u=a[t];return u.x0=o,u.y0=r,u.x1=s,void(u.y1=l)}for(var h=c[t],d=n/2+h,g=t+1,f=i-1;g>>1;c[p]l-r){var v=n?(o*_+s*m)/n:s;e(t,g,m,o,r,v,l),e(g,i,_,v,r,s,l)}else{var b=n?(r*_+l*m)/n:l;e(t,g,m,o,r,s,b),e(g,i,_,o,b,s,l)}}(0,l,e.value,t,i,n,o)},dice:NN,slice:$N,slicedice:function(e,t,i,n,o){(1&e.depth?$N:NN)(e,t,i,n,o)},squarify:qN,resquarify:KN},uE=["x0","y0","x1","y1","depth","children"];function hE(e){QN.call(this,e)}function dE(e,t,i,n){const o=e.width,r=e.height,s=i||n,a=Zd(o,r).getContext("2d");t.forEach((e=>gE(a,e,s)));const l=new Uint32Array(a.getImageData(0,0,o,r).data.buffer),c=e.bitmap(),u=s&&e.bitmap();let h,d,g,f,p;for(d=0;d{t.items.forEach((t=>gE(e,t.items,i)))})):Jb[n].draw(e,{items:i?t.map(fE):t})}function fE(e){const t=Al(e,{});return t.stroke&&(t.strokeOpacity=1),t.fill&&(t.fillOpacity=.0625,t.stroke="#000",t.strokeOpacity=1,t.strokeWidth=2),t}hE.Definition={type:"Treemap",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"squarify",values:["squarify","resquarify","binary","dice","slice","slicedice"]},{name:"padding",type:"number",default:0},{name:"paddingInner",type:"number",default:0},{name:"paddingOuter",type:"number",default:0},{name:"paddingTop",type:"number",default:0},{name:"paddingRight",type:"number",default:0},{name:"paddingBottom",type:"number",default:0},{name:"paddingLeft",type:"number",default:0},{name:"ratio",type:"number",default:1.618033988749895},{name:"round",type:"boolean",default:!1},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:uE.length,default:uE}]},Xi(hE,QN,{layout(){const e=function(){var e=qN,t=!1,i=1,n=1,o=[0],r=wN,s=wN,a=wN,l=wN,c=wN;function u(e){return e.x0=e.y0=0,e.x1=i,e.y1=n,e.eachBefore(h),o=[0],t&&e.eachBefore(LN),e}function h(t){var i=o[t.depth],n=t.x0+i,u=t.y0+i,h=t.x1-i,d=t.y1-i;h{const i=e.tile();i.ratio&&e.tile(i.ratio(t))},e.method=t=>{Ki(cE,t)?e.tile(cE[t]):qt("Unrecognized Treemap layout method: "+t)},e},params:["method","ratio","size","round","padding","paddingInner","paddingOuter","paddingTop","paddingRight","paddingBottom","paddingLeft"],fields:uE});const pE=31,mE=new Uint32Array(33),_E=new Uint32Array(33);_E[0]=0,mE[0]=~_E[0];for(let e=1;e<=32;++e)_E[e]=_E[e-1]<<1|1,mE[e]=~_E[e];function vE(e,t,i,n,o,r){let s=i/2;return e-s<0||e+s>o||t-(s=n/2)<0||t+s>r}function bE(e,t,i,n,o,r,s,a){const l=o*r/(2*n),c=e(t-l),u=e(t+l),h=e(i-(r/=2)),d=e(i+r);return s.outOfBounds(c,h,u,d)||s.getRange(c,h,u,d)||a&&a.getRange(c,h,u,d)}const yE=[-1,-1,1,1],wE=[-1,1,-1,1],CE=["right","center","left"],SE=["bottom","middle","top"];function xE(e,t,i,n,o,r,s,a,l,c,u,h){return!(o.outOfBounds(e,i,t,n)||(h&&r?r.getRange(e,i,t,n)||!function(e,t,i,n,o){return o[0]<=e&&i<=o[2]&&o[3]<=t&&n<=o[5]}(s,l,a,c,u):o.getRange(e,i,t,n)))}const kE={"top-left":0,top:1,"top-right":2,left:4,middle:5,right:6,"bottom-left":8,bottom:9,"bottom-right":10},DE={naive:function(e,t,i,n){const o=e.width,r=e.height;return function(e){const t=e.datum.datum.items[n].items,i=t.length,s=e.datum.fontSize,a=Ob.width(e.datum,e.datum.text);let l,c,u,h,d,g,f,p=0;for(let n=0;n=p&&(p=f,e.x=d,e.y=g);return d=a/2,g=s/2,l=e.x-d,c=e.x+d,u=e.y-g,h=e.y+g,e.align="center",l<0&&c<=o?e.align="left":0<=l&&o=1;)d=(g+f)/2,bE(e,u,h,c,l,d,s,a)?f=d:g=d;if(g>n)return[u,h,g,!0]}}return function(t){const a=t.datum.datum.items[n].items,c=a.length,u=t.datum.fontSize,h=Ob.width(t.datum,t.datum.text);let d,g,f,p,m,_,v,b,y,w,C,S,x,k,D,L,N,E=i?u:0,A=!1,M=!1,I=0;for(let n=0;ng&&(N=d,d=g,g=N),f>p&&(N=f,f=p,p=N),y=e(d),C=e(g),w=~~((y+C)/2),S=e(f),k=e(p),x=~~((S+k)/2),v=w;v>=y;--v)for(b=x;b>=S;--b)L=l(v,b,E,h,u),L&&([t.x,t.y,E,A]=L);for(v=w;v<=C;++v)for(b=x;b<=k;++b)L=l(v,b,E,h,u),L&&([t.x,t.y,E,A]=L);A||i||(D=Math.abs(g-d+p-f),m=(d+g)/2,_=(f+p)/2,D>=I&&!vE(m,_,h,u,o,r)&&!bE(e,m,_,u,h,u,s,null)&&(I=D,t.x=m,t.y=_,M=!0))}return!(!A&&!M||(m=h/2,_=u/2,s.setRange(e(t.x-m),e(t.y-_),e(t.x+m),e(t.y+_)),t.align="center",t.baseline="middle",0))}},floodfill:function(e,t,i,n){const o=e.width,r=e.height,s=t[0],a=t[1],l=e.bitmap();return function(t){const c=t.datum.datum.items[n].items,u=c.length,h=t.datum.fontSize,d=Ob.width(t.datum,t.datum.text),g=[];let f,p,m,_,v,b,y,w,C,S,x,k,D=i?h:0,L=!1,N=!1,E=0;for(let n=0;n=1;)x=(C+S)/2,bE(e,v,b,h,d,x,s,a)?S=x:C=x;C>D&&(t.x=v,t.y=b,D=C,L=!0)}}L||i||(k=Math.abs(p-f+_-m),v=(f+p)/2,b=(m+_)/2,k>=E&&!vE(v,b,d,h,o,r)&&!bE(e,v,b,h,d,h,s,null)&&(E=k,t.x=v,t.y=b,N=!0))}return!(!L&&!N||(v=d/2,b=h/2,s.setRange(e(t.x-v),e(t.y-b),e(t.x+v),e(t.y+b)),t.align="center",t.baseline="middle",0))}}};function LE(e,t,i,n,o,r,s,a,l,c,u){if(!e.length)return e;const h=Math.max(n.length,o.length),d=function(e,t){const i=new Float64Array(t),n=e.length;for(let t=0;t[e.x,e.x,e.x,e.y,e.y,e.y];return e?"line"===e||"area"===e?e=>o(e.datum):"line"===t?e=>{const t=e.datum.items[n].items;return o(t.length?t["start"===i?0:t.length-1]:{x:NaN,y:NaN})}:e=>{const t=e.datum.bounds;return[t.x1,(t.x1+t.x2)/2,t.x2,t.y1,(t.y1+t.y2)/2,t.y2]}:o}(f,p,a,l),v=function(e,t,i){const n=Math.max(1,Math.sqrt(e*t/1e6)),o=~~((e+2*i+n)/n),r=~~((t+2*i+n)/n),s=e=>~~((e+i)/n);return s.invert=e=>e*n-i,s.bitmap=()=>function(e,t){const i=new Uint32Array(~~((e*t+32)/32));function n(e,t){i[e]|=t}function o(e,t){i[e]&=t}return{array:i,get:(t,n)=>{const o=n*e+t;return i[o>>>5]&1<<(o&pE)},set:(t,i)=>{const o=i*e+t;n(o>>>5,1<<(o&pE))},clear:(t,i)=>{const n=i*e+t;o(n>>>5,~(1<<(n&pE)))},getRange:(t,n,o,r)=>{let s,a,l,c,u=r;for(;u>=n;--u)if(s=u*e+t,a=u*e+o,l=s>>>5,c=a>>>5,l===c){if(i[l]&mE[s&pE]&_E[1+(a&pE)])return!0}else{if(i[l]&mE[s&pE])return!0;if(i[c]&_E[1+(a&pE)])return!0;for(let e=l+1;e{let s,a,l,c,u;for(;i<=r;++i)if(s=i*e+t,a=i*e+o,l=s>>>5,c=a>>>5,l===c)n(l,mE[s&pE]&_E[1+(a&pE)]);else for(n(l,mE[s&pE]),n(c,_E[1+(a&pE)]),u=l+1;u{let s,a,l,c,u;for(;i<=r;++i)if(s=i*e+t,a=i*e+n,l=s>>>5,c=a>>>5,l===c)o(l,_E[s&pE]|mE[1+(a&pE)]);else for(o(l,_E[s&pE]),o(c,mE[1+(a&pE)]),u=l+1;ui<0||n<0||r>=t||o>=e}}(o,r),s.ratio=n,s.padding=i,s.width=e,s.height=t,s}(t[0],t[1],c),b=m&&"naive"===u;var y;const w=e.map((e=>({datum:e,opacity:0,x:void 0,y:void 0,align:void 0,baseline:void 0,boundary:_(e)})));let C;if(!b){i&&w.sort(((e,t)=>i(e.datum,t.datum)));let t=!1;for(let e=0;ee.datum))].concat(r)),C=r.length?dE(v,r,t,m):function(e,t){const i=e.bitmap();return(t||[]).forEach((t=>i.set(e(t.boundary[0]),e(t.boundary[3])))),[i,void 0]}(v,s&&w)}const S=m?DE[u](v,C,s,l):function(e,t,i,n){const o=e.width,r=e.height,s=t[0],a=t[1],l=n.length;return function(t){const c=t.boundary,u=t.datum.fontSize;if(c[2]<0||c[5]<0||c[0]>o||c[3]>r)return!1;let h,d,g,f,p,m,_,v,b,y,w,C,S,x,k,D=0;for(let o=0;o>>2&3)-1,g=0===h&&0===d||n[o]<0,f=h&&d?Math.SQRT1_2:1,p=n[o]<0?-1:1,m=c[1+h]+n[o]*h*f,w=c[4+d]+p*u*d/2+n[o]*d*f,v=w-u/2,b=w+u/2,C=e(m),x=e(v),k=e(b),!D){if(!xE(C,C,x,k,s,a,m,m,v,b,c,g))continue;D=Ob.width(t.datum,t.datum.text)}if(y=m+p*D*h/2,m=y-D/2,_=y+D/2,C=e(m),S=e(_),xE(C,S,x,k,s,a,m,_,v,b,c,g))return t.x=h?h*p<0?_:m:y,t.y=d?d*p<0?b:v:w,t.align=CE[h*p+1],t.baseline=SE[d*p+1],s.setRange(C,x,S,k),!0}return!1}}(v,C,g,d);return w.forEach((e=>e.opacity=+S(e))),w}const NE=["x","y","opacity","align","baseline"],EE=["top-left","left","bottom-left","top","bottom","top-right","right","bottom-right"];function AE(e){oc.call(this,null,e)}function ME(e,t){var i,n,o,r,s,a,l=[],c=function(e){return e(r)};if(null==t)l.push(e);else for(i={},n=0,o=e.length;n{const t=e.datum;t[n[0]]=e.x,t[n[1]]=e.y,t[n[2]]=e.opacity,t[n[3]]=e.align,t[n[4]]=e.baseline})),t.reflow(i).modifies(n)}}),IE.Definition={type:"Loess",metadata:{generates:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"bandwidth",type:"number",default:.3},{name:"as",type:"string",array:!0}]},Xi(IE,oc,{transform(e,t){const i=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){const n=ME(t.materialize(t.SOURCE).source,e.groupby),o=(e.groupby||[]).map(Vt),r=o.length,s=e.as||[Vt(e.x),Vt(e.y)],a=[];n.forEach((t=>{ou(t,e.x,e.y,e.bandwidth||.3).forEach((e=>{const i={};for(let e=0;e"poly"===e?t:"quad"===e?2:1)(r,s),l=e.as||[Vt(e.x),Vt(e.y)],c=TE[r],u=[];let h=e.extent;Ki(TE,r)||qt("Invalid regression method: "+r),null!=h&&"log"===r&&h[0]<=0&&(t.dataflow.warn("Ignoring extent with values <= 0 for log regression."),h=null),n.forEach((i=>{if(i.length<=a)return void t.dataflow.warn("Skipping regression with more parameters than data points.");const n=c(i,e.x,e.y,s);if(e.params)return void u.push(Nl({keys:i.dims,coef:n.coef,rSquared:n.rSquared}));const d=h||Ui(i,e.x),g=e=>{const t={};for(let e=0;eg([e,n.predict(e)]))):lu(n.predict,d,25,200).forEach(g)})),this.value&&(i.rem=this.value),this.value=i.add=i.source=u}return i}});const OE=Math.pow(2,-52),FE=new Uint32Array(512);class PE{static from(e,t=jE,i=qE){const n=e.length,o=new Float64Array(2*n);for(let r=0;r>1;if(t>0&&"number"!=typeof e[0])throw new Error("Expected coords to contain numbers.");this.coords=e;const i=Math.max(2*t-5,0);this._triangles=new Uint32Array(3*i),this._halfedges=new Int32Array(3*i),this._hashSize=Math.ceil(Math.sqrt(t)),this._hullPrev=new Uint32Array(t),this._hullNext=new Uint32Array(t),this._hullTri=new Uint32Array(t),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(t),this._dists=new Float64Array(t),this.update()}update(){const{coords:e,_hullPrev:t,_hullNext:i,_hullTri:n,_hullHash:o}=this,r=e.length>>1;let s=1/0,a=1/0,l=-1/0,c=-1/0;for(let t=0;tl&&(l=i),n>c&&(c=n),this._ids[t]=t}const u=(s+l)/2,h=(a+c)/2;let d,g,f,p=1/0;for(let t=0;t0&&(g=t,p=i)}let v=e[2*g],b=e[2*g+1],y=1/0;for(let t=0;tn&&(t[i++]=o,n=this._dists[o])}return this.hull=t.subarray(0,i),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(WE(m,_,v,b,w,C)){const e=g,t=v,i=b;g=f,v=w,b=C,f=e,w=t,C=i}const S=function(e,t,i,n,o,r){const s=i-e,a=n-t,l=o-e,c=r-t,u=s*s+a*a,h=l*l+c*c,d=.5/(s*c-a*l);return{x:e+(c*u-a*h)*d,y:t+(s*h-l*u)*d}}(m,_,v,b,w,C);this._cx=S.x,this._cy=S.y;for(let t=0;t0&&Math.abs(c-r)<=OE&&Math.abs(u-s)<=OE)continue;if(r=c,s=u,l===d||l===g||l===f)continue;let h=0;for(let e=0,t=this._hashKey(c,u);e0?3-i:1+i)/4}(e-this._cx,t-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:t,_halfedges:i,coords:n}=this;let o=0,r=0;for(;;){const s=i[e],a=e-e%3;if(r=a+(e+2)%3,-1===s){if(0===o)break;e=FE[--o];continue}const l=s-s%3,c=a+(e+1)%3,u=l+(s+2)%3,h=t[r],d=t[e],g=t[c],f=t[u];if(VE(n[2*h],n[2*h+1],n[2*d],n[2*d+1],n[2*g],n[2*g+1],n[2*f],n[2*f+1])){t[e]=f,t[s]=h;const n=i[u];if(-1===n){let t=this._hullStart;do{if(this._hullTri[t]===u){this._hullTri[t]=e;break}t=this._hullPrev[t]}while(t!==this._hullStart)}this._link(e,n),this._link(s,i[r]),this._link(r,u);const a=l+(s+1)%3;o=33306690738754716e-32*Math.abs(s+a)?s-a:0}function WE(e,t,i,n,o,r){return(zE(o,r,e,t,i,n)||zE(e,t,i,n,o,r)||zE(i,n,o,r,e,t))<0}function VE(e,t,i,n,o,r,s,a){const l=e-s,c=t-a,u=i-s,h=n-a,d=o-s,g=r-a,f=u*u+h*h,p=d*d+g*g;return l*(h*p-f*g)-c*(u*p-f*d)+(l*l+c*c)*(u*g-h*d)<0}function HE(e,t,i,n,o,r){const s=i-e,a=n-t,l=o-e,c=r-t,u=s*s+a*a,h=l*l+c*c,d=.5/(s*c-a*l),g=(c*u-a*h)*d,f=(s*h-l*u)*d;return g*g+f*f}function $E(e,t,i,n){if(n-i<=20)for(let o=i+1;o<=n;o++){const n=e[o],r=t[n];let s=o-1;for(;s>=i&&t[e[s]]>r;)e[s+1]=e[s--];e[s+1]=n}else{let o=i+1,r=n;UE(e,i+n>>1,o),t[e[i]]>t[e[n]]&&UE(e,i,n),t[e[o]]>t[e[n]]&&UE(e,o,n),t[e[i]]>t[e[o]]&&UE(e,i,o);const s=e[o],a=t[s];for(;;){do{o++}while(t[e[o]]a);if(r=r-i?($E(e,t,o,n),$E(e,t,i,r-1)):($E(e,t,i,r-1),$E(e,t,o,n))}}function UE(e,t,i){const n=e[t];e[t]=e[i],e[i]=n}function jE(e){return e[0]}function qE(e){return e[1]}const KE=1e-6;class GE{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,t){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,t){this._+=`L${this._x1=+e},${this._y1=+t}`}arc(e,t,i){const n=(e=+e)+(i=+i),o=t=+t;if(i<0)throw new Error("negative radius");null===this._x1?this._+=`M${n},${o}`:(Math.abs(this._x1-n)>KE||Math.abs(this._y1-o)>KE)&&(this._+="L"+n+","+o),i&&(this._+=`A${i},${i},0,1,1,${e-i},${t}A${i},${i},0,1,1,${this._x1=n},${this._y1=o}`)}rect(e,t,i,n){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${+i}v${+n}h${-i}Z`}value(){return this._||null}}class YE{constructor(){this._=[]}moveTo(e,t){this._.push([e,t])}closePath(){this._.push(this._[0].slice())}lineTo(e,t){this._.push([e,t])}value(){return this._.length?this._:null}}class ZE{constructor(e,[t,i,n,o]=[0,0,960,500]){if(!((n=+n)>=(t=+t)&&(o=+o)>=(i=+i)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(2*e.points.length),this.vectors=new Float64Array(2*e.points.length),this.xmax=n,this.xmin=t,this.ymax=o,this.ymin=i,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:t,triangles:i},vectors:n}=this,o=this.circumcenters=this._circumcenters.subarray(0,i.length/3*2);for(let t,n,r=0,s=0,a=i.length;r1;)o-=2;for(let e=2;e4)for(let e=0;e0){if(t>=this.ymax)return null;(o=(this.ymax-t)/n)0){if(e>=this.xmax)return null;(o=(this.xmax-e)/i)this.xmax?2:0)|(tthis.ymax?8:0)}}const XE=2*Math.PI,QE=Math.pow;function JE(e){return e[0]}function eA(e){return e[1]}function tA(e,t,i){return[e+Math.sin(e+t)*i,t+Math.cos(e-t)*i]}class iA{static from(e,t=JE,i=eA,n){return new iA("length"in e?function(e,t,i,n){const o=e.length,r=new Float64Array(2*o);for(let s=0;s2&&function(e){const{triangles:t,coords:i}=e;for(let e=0;e1e-10)return!1}return!0}(e)){this.collinear=Int32Array.from({length:t.length/2},((e,t)=>t)).sort(((e,i)=>t[2*e]-t[2*i]||t[2*e+1]-t[2*i+1]));const e=this.collinear[0],i=this.collinear[this.collinear.length-1],n=[t[2*e],t[2*e+1],t[2*i],t[2*i+1]],o=1e-8*Math.hypot(n[3]-n[1],n[2]-n[0]);for(let e=0,i=t.length/2;e0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=n[0],this.triangles[1]=n[1],this.triangles[2]=n[1],r[n[0]]=1,2===n.length&&(r[n[1]]=0))}voronoi(e){return new ZE(this,e)}*neighbors(e){const{inedges:t,hull:i,_hullIndex:n,halfedges:o,triangles:r,collinear:s}=this;if(s){const t=s.indexOf(e);return t>0&&(yield s[t-1]),void(t=0&&o!==i&&o!==n;)i=o;return o}_step(e,t,i){const{inedges:n,hull:o,_hullIndex:r,halfedges:s,triangles:a,points:l}=this;if(-1===n[e]||!l.length)return(e+1)%(l.length>>1);let c=e,u=QE(t-l[2*e],2)+QE(i-l[2*e+1],2);const h=n[e];let d=h;do{let n=a[d];const h=QE(t-l[2*n],2)+QE(i-l[2*n+1],2);if(h>5<<5,l=~~Math.max(Math.abs(v+b),Math.abs(v-b))}else s=s+31>>5<<5;if(l>g&&(g=l),h+s>=2048&&(h=0,d+=g,g=0),d+l>=aA)break;o.translate((h+(s>>1))/r,(d+(l>>1))/r),t.rotate&&o.rotate(t.rotate*sA),o.fillText(t.text,0,0),t.padding&&(o.lineWidth=2*t.padding,o.strokeText(t.text,0,0)),o.restore(),t.width=s,t.height=l,t.xoff=h,t.yoff=d,t.x1=s>>1,t.y1=l>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,h+=s}for(var w=o.getImageData(0,0,2048/r,aA/r).data,C=[];--n>=0;)if((t=i[n]).hasText){for(a=(s=t.width)>>5,l=t.y1-t.y0,c=0;c>5),D=w[2048*(d+u)+(h+c)<<2]?1<<31-c%32:0;C[k]|=D,S|=D}S?x=u:(t.y0++,l--,u--,d++)}t.y1=t.y0+x,t.sprite=C.slice(0,(t.y1-t.y0)*a)}}}function cA(e,t,i){i>>=5;for(var n,o=e.sprite,r=e.width>>5,s=e.x-(r<<4),a=127&s,l=32-a,c=e.y1-e.y0,u=(e.y+e.y0)*i+(s>>5),h=0;h>>a:0))&t[u+d])return!0;u+=i}return!1}function uA(e,t){var i=e[0],n=e[1];t.x+t.x0n.x&&(n.x=t.x+t.x1),t.y+t.y1>n.y&&(n.y=t.y+t.y1)}function hA(e,t){return e.x+e.x1>t[0].x&&e.x+e.x0t[0].y&&e.y+e.y0=h));)if(t.x=s+o,t.y=c+r,!(t.x+t.x0<0||t.y+t.y0<0||t.x+t.x1>a[0]||t.y+t.y1>a[1])&&(!i||!cA(t,e,a[0]))&&(!i||hA(t,i))){for(var p,m=t.sprite,_=t.width>>5,v=a[0]>>5,b=t.x-(_<<4),y=127&b,w=32-y,C=t.y1-t.y0,S=(t.y+t.y0)*v+(b>>5),x=0;x>>y:0);S+=v}return t.sprite=null,!0}return!1}return h.layout=function(){for(var l=function(e){e.width=e.height=1;var t=Math.sqrt(e.getContext("2d").getImageData(0,0,1,1).data.length>>2);e.width=2048/t,e.height=aA/t;var i=e.getContext("2d");return i.fillStyle=i.strokeStyle="red",i.textAlign="center",{context:i,ratio:t}}(Zd()),h=function(e){for(var t=[],i=-1;++i>5)*a[1]),g=null,f=c.length,p=-1,m=[],_=c.map((a=>({text:e(a),font:t(a),style:n(a),weight:o(a),rotate:r(a),size:~~(i(a)+1e-14),padding:s(a),xoff:0,yoff:0,x1:0,y1:0,x0:0,y0:0,hasText:!1,sprite:null,datum:a}))).sort(((e,t)=>t.size-e.size));++p>1,v.y=a[1]*(u()+.5)>>1,lA(l,v,_,p),v.hasText&&d(h,v,g)&&(m.push(v),g?uA(g,v):g=[{x:v.x+v.x0,y:v.y+v.y0},{x:v.x+v.x1,y:v.y+v.y1}],v.x-=a[0]>>1,v.y-=a[1]>>1)}return m},h.words=function(e){return arguments.length?(c=e,h):c},h.size=function(e){return arguments.length?(a=[+e[0],+e[1]],h):a},h.font=function(e){return arguments.length?(t=gA(e),h):t},h.fontStyle=function(e){return arguments.length?(n=gA(e),h):n},h.fontWeight=function(e){return arguments.length?(o=gA(e),h):o},h.rotate=function(e){return arguments.length?(r=gA(e),h):r},h.text=function(t){return arguments.length?(e=gA(t),h):e},h.spiral=function(e){return arguments.length?(l=fA[e]||e,h):l},h.fontSize=function(e){return arguments.length?(i=gA(e),h):i},h.padding=function(e){return arguments.length?(s=gA(e),h):s},h.random=function(e){return arguments.length?(u=e,h):u},h}(),e)}_A.Definition={type:"Wordcloud",metadata:{modifies:!0},params:[{name:"size",type:"number",array:!0,length:2},{name:"font",type:"string",expr:!0,default:"sans-serif"},{name:"fontStyle",type:"string",expr:!0,default:"normal"},{name:"fontWeight",type:"string",expr:!0,default:"normal"},{name:"fontSize",type:"number",expr:!0,default:14},{name:"fontSizeRange",type:"number",array:"nullable",default:[10,50]},{name:"rotate",type:"number",expr:!0,default:0},{name:"text",type:"field"},{name:"spiral",type:"string",values:["archimedean","rectangular"]},{name:"padding",type:"number",expr:!0},{name:"as",type:"string",array:!0,length:7,default:pA}]},Xi(_A,oc,{transform(e,t){!e.size||e.size[0]&&e.size[1]||qt("Wordcloud size dimensions must be non-zero.");const i=e.modified();if(!(i||t.changed(t.ADD_REM)||mA.some((function(i){const n=e[i];return Oi(n)&&t.modified(n.fields)}))))return;const n=t.materialize(t.SOURCE).source,o=this.value,r=e.as||pA;let s,a=e.fontSize||14;if(Oi(a)?s=e.fontSizeRange:a=Vi(a),s){const e=a,t=Cm("sqrt")().domain(Ui(n,e)).range(s);a=i=>t(e(i))}n.forEach((e=>{e[r[0]]=NaN,e[r[1]]=NaN,e[r[3]]=0}));const l=o.words(n).text(e.text).size(e.size||[500,500]).padding(e.padding||1).spiral(e.spiral||"archimedean").rotate(e.rotate||0).font(e.font||"sans-serif").fontStyle(e.fontStyle||"normal").fontWeight(e.fontWeight||"normal").fontSize(a).random(wc).layout(),c=o.size(),u=c[0]>>1,h=c[1]>>1,d=l.length;for(let e,t,i=0;inew Uint8Array(e),bA=e=>new Uint16Array(e),yA=e=>new Uint32Array(e);function wA(e,t,i){const n=(t<257?vA:t<65537?bA:yA)(e);return i&&n.set(i),n}function CA(e,t,i){const n=1<{const n=e[t],o=e[i];return no?1:0})),function(e,t){return Array.from(t,(t=>e[t]))}(e,t)}(d,l),s)c=t,u=e,t=Array(s+a),e=yA(s+a),function(e,t,i,n,o,r,s,a,l){let c,u=0,h=0;for(c=0;u0)for(h=0;he,size:()=>i}}function xA(e){oc.call(this,function(){let e=8,t=[],i=yA(0),n=wA(0,e),o=wA(0,e);return{data:()=>t,seen:()=>i=function(e,t,i){return e.length>=t?e:((i=i||new e.constructor(t)).set(e),i)}(i,t.length),add(e){for(let i,n=0,o=t.length,r=e.length;nt.length,curr:()=>n,prev:()=>o,reset:e=>o[e]=n[e],all:()=>e<257?255:e<65537?65535:4294967295,set(e,t){n[e]|=t},clear(e,t){n[e]&=~t},resize(t,i){(t>n.length||i>e)&&(e=Math.max(i,e),n=wA(t,e,n),o=wA(t,e))}}}(),e),this._indices=null,this._dims=null}function kA(e){oc.call(this,null,e)}xA.Definition={type:"CrossFilter",metadata:{},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"query",type:"array",array:!0,required:!0,content:{type:"number",array:!0,length:2}}]},Xi(xA,oc,{transform(e,t){return this._dims?e.modified("fields")||e.fields.some((e=>t.modified(e.fields)))?this.reinit(e,t):this.eval(e,t):this.init(e,t)},init(e,t){const i=e.fields,n=e.query,o=this._indices={},r=this._dims=[],s=n.length;let a,l,c=0;for(;c{const e=o.remove(t,i);for(const t in n)n[t].reindex(e)}))},update(e,t,i){const n=this._dims,o=e.query,r=t.stamp,s=n.length;let a,l,c=0;for(i.filters=0,l=0;lg)for(m=g,_=Math.min(h,f);m<_;++m)v=l[m],r[v]!==i&&(a[v]=s[v],r[v]=i,n.push(v)),s[v]^=p;if(d>f)for(m=Math.max(h,f),_=d;m<_;++m)v=l[m],r[v]!==i&&(a[v]=s[v],r[v]=i,n.push(v)),s[v]^=p;else if(du)for(g=u,f=Math.min(l,h);gh)for(g=Math.max(l,h),f=c;ga[e]&i?null:s[e];return r.filter(r.MOD,c),o&o-1?(r.filter(r.ADD,(e=>{const t=a[e]&i;return!t&&t^l[e]&i?s[e]:null})),r.filter(r.REM,(e=>{const t=a[e]&i;return!t||t^t^l[e]&i?null:s[e]}))):(r.filter(r.ADD,c),r.filter(r.REM,(e=>(a[e]&i)===o?s[e]:null))),r.filter(r.SOURCE,(e=>c(e._index)))}});const DA="Literal",LA="CallExpression";function NA(e){this.type=e}var EA,AA,MA,IA,TA;NA.prototype.visit=function(e){let t,i,n;if(e(this))return 1;for(t=function(e){switch(e.type){case"ArrayExpression":return e.elements;case"BinaryExpression":case"LogicalExpression":return[e.left,e.right];case LA:return[e.callee].concat(e.arguments);case"ConditionalExpression":return[e.test,e.consequent,e.alternate];case"MemberExpression":return[e.object,e.property];case"ObjectExpression":return e.properties;case"Property":return[e.key,e.value];case"UnaryExpression":return[e.argument];case"Identifier":case DA:case"RawCode":default:return[]}}(this),i=0,n=t.length;i",EA[3]="Identifier",EA[4]="Keyword",EA[5]="Null",EA[6]="Numeric",EA[7]="Punctuator",EA[8]="String",EA[9]="RegularExpression";var RA="Identifier",OA="Unexpected token %0",FA="Invalid regular expression",PA="Invalid regular expression: missing /",BA="Octal literals are not allowed in strict mode.",zA="ILLEGAL",WA="Disabled.",VA=new RegExp("[\\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-\\u08B2\\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\\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\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\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-\\u13F4\\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\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\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-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\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-\\uAB5F\\uAB64\\uAB65\\uABC0-\\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]"),HA=new RegExp("[\\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-\\u08B2\\u08E4-\\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\\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\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\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\\u0D57\\u0D60-\\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-\\u13F4\\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\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\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-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\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-\\uAB5F\\uAB64\\uAB65\\uABC0-\\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-\\uFE2D\\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]");function $A(e,t){if(!e)throw new Error("ASSERT: "+t)}function UA(e){return e>=48&&e<=57}function jA(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function qA(e){return"01234567".indexOf(e)>=0}function KA(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function GA(e){return 10===e||13===e||8232===e||8233===e}function YA(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&VA.test(String.fromCharCode(e))}function ZA(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&HA.test(String.fromCharCode(e))}const XA={if:1,in:1,do:1,var:1,for:1,new:1,try:1,let:1,this:1,else:1,case:1,void:1,with:1,enum:1,while:1,break:1,catch:1,throw:1,const:1,yield:1,class:1,super:1,return:1,typeof:1,delete:1,switch:1,export:1,import:1,public:1,static:1,default:1,finally:1,extends:1,package:1,private:1,function:1,continue:1,debugger:1,interface:1,protected:1,instanceof:1,implements:1};function QA(){for(;MA1114111||"}"!==e)&&gM({},OA,zA),t<=65535?String.fromCharCode(t):(i=55296+(t-65536>>10),n=56320+(t-65536&1023),String.fromCharCode(i,n))}function tM(){var e,t;for(e=AA.charCodeAt(MA++),t=String.fromCharCode(e),92===e&&(117!==AA.charCodeAt(MA)&&gM({},OA,zA),++MA,(e=JA("u"))&&"\\"!==e&&YA(e.charCodeAt(0))||gM({},OA,zA),t=e);MA>>="===(n=AA.substr(MA,4))?{type:7,value:n,start:o,end:MA+=4}:">>>"===(i=n.substr(0,3))||"<<="===i||">>="===i?{type:7,value:i,start:o,end:MA+=3}:s===(t=i.substr(0,2))[1]&&"+-<>&|".indexOf(s)>=0||"=>"===t?{type:7,value:t,start:o,end:MA+=2}:("//"===t&&gM({},OA,zA),"<>=!+-*%&|^/".indexOf(s)>=0?{type:7,value:s,start:o,end:++MA}:void gM({},OA,zA))}function nM(){var e,t,i;if($A(UA((i=AA[MA]).charCodeAt(0))||"."===i,"Numeric literal must start with a decimal digit or a decimal point"),t=MA,e="","."!==i){if(e=AA[MA++],i=AA[MA],"0"===e){if("x"===i||"X"===i)return++MA,function(e){let t="";for(;MA=IA)return{type:2,start:MA,end:MA};const e=AA.charCodeAt(MA);return YA(e)?function(){var e,t;return e=MA,{type:1===(t=92===AA.charCodeAt(MA)?tM():function(){var e,t;for(e=MA++;MA=0&&MA($A(t=0&&gM({},FA,i),{value:i,literal:t}}(),n=function(e,t){let i=e;t.indexOf("u")>=0&&(i=i.replace(/\\u\{([0-9a-fA-F]+)\}/g,((e,t)=>{if(parseInt(t,16)<=1114111)return"x";gM({},FA)})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(i)}catch(e){gM({},FA)}try{return new RegExp(e,t)}catch(e){return null}}(t.value,i.value),{literal:t.literal+i.literal,value:n,regex:{pattern:t.value,flags:i.value},start:e,end:MA}}()),sM()):fM(rM())}return i}function CM(){const e=[];if(pM("("),!mM(")"))for(;MA":case"<=":case">=":case"instanceof":case"in":t=7;break;case"<<":case">>":case">>>":t=8;break;case"+":case"-":t=9;break;case"*":case"/":case"%":t=11}return t}function LM(){var e,t;return e=function(){var e,t,i,n,o,r,s,a,l,c;if(e=TA,l=kM(),0===(o=DM(n=TA)))return l;for(n.prec=o,rM(),t=[e,TA],r=[l,n,s=kM()];(o=DM(TA))>0;){for(;r.length>2&&o<=r[r.length-2].prec;)s=r.pop(),a=r.pop().value,l=r.pop(),t.pop(),i=aM(a,l,s),r.push(i);(n=rM()).prec=o,r.push(n),t.push(TA),i=kM(),r.push(i)}for(i=r[c=r.length-1],t.pop();c>1;)t.pop(),i=aM(r[c-1].value,r[c-2],i),c-=2;return i}(),mM("?")&&(rM(),t=LM(),pM(":"),e=function(e,t,i){const n=new NA("ConditionalExpression");return n.test=e,n.consequent=t,n.alternate=i,n}(e,t,LM())),e}function NM(){const e=LM();if(mM(","))throw new Error(WA);return e}function EM(e){MA=0,IA=(AA=e).length,TA=null,sM();const t=NM();if(2!==TA.type)throw new Error("Unexpect token after expression.");return t}var AM={NaN:"NaN",E:"Math.E",LN2:"Math.LN2",LN10:"Math.LN10",LOG2E:"Math.LOG2E",LOG10E:"Math.LOG10E",PI:"Math.PI",SQRT1_2:"Math.SQRT1_2",SQRT2:"Math.SQRT2",MIN_VALUE:"Number.MIN_VALUE",MAX_VALUE:"Number.MAX_VALUE"};function MM(e){function t(t,i,n){return o=>function(t,i,n,o){let r=e(i[0]);return n&&(r=n+"("+r+")",0===n.lastIndexOf("new ",0)&&(r="("+r+")")),r+"."+t+(o<0?"":0===o?"()":"("+i.slice(1).map(e).join(",")+")")}(t,o,i,n)}const i="new Date",n="String",o="RegExp";return{isNaN:"Number.isNaN",isFinite:"Number.isFinite",abs:"Math.abs",acos:"Math.acos",asin:"Math.asin",atan:"Math.atan",atan2:"Math.atan2",ceil:"Math.ceil",cos:"Math.cos",exp:"Math.exp",floor:"Math.floor",log:"Math.log",max:"Math.max",min:"Math.min",pow:"Math.pow",random:"Math.random",round:"Math.round",sin:"Math.sin",sqrt:"Math.sqrt",tan:"Math.tan",clamp:function(t){t.length<3&&qt("Missing arguments to clamp function."),t.length>3&&qt("Too many arguments to clamp function.");const i=t.map(e);return"Math.max("+i[1]+", Math.min("+i[2]+","+i[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:i,date:t("getDate",i,0),day:t("getDay",i,0),year:t("getFullYear",i,0),month:t("getMonth",i,0),hours:t("getHours",i,0),minutes:t("getMinutes",i,0),seconds:t("getSeconds",i,0),milliseconds:t("getMilliseconds",i,0),time:t("getTime",i,0),timezoneoffset:t("getTimezoneOffset",i,0),utcdate:t("getUTCDate",i,0),utcday:t("getUTCDay",i,0),utcyear:t("getUTCFullYear",i,0),utcmonth:t("getUTCMonth",i,0),utchours:t("getUTCHours",i,0),utcminutes:t("getUTCMinutes",i,0),utcseconds:t("getUTCSeconds",i,0),utcmilliseconds:t("getUTCMilliseconds",i,0),length:t("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:t("toUpperCase",n,0),lower:t("toLowerCase",n,0),substring:t("substring",n),split:t("split",n),trim:t("trim",n,0),regexp:o,test:t("test",o),if:function(t){t.length<3&&qt("Missing arguments to if function."),t.length>3&&qt("Too many arguments to if function.");const i=t.map(e);return"("+i[0]+"?"+i[1]+":"+i[2]+")"}}}function IM(e){const t=(e=e||{}).allowed?vn(e.allowed):{},i=e.forbidden?vn(e.forbidden):{},n=e.constants||AM,o=(e.functions||MM)(h),r=e.globalvar,s=e.fieldvar,a=Oi(r)?r:e=>"".concat(r,'["').concat(e,'"]');let l={},c={},u=0;function h(e){if(rn(e))return e;const t=d[e.type];return null==t&&qt("Unsupported type: "+e.type),t(e)}const d={Literal:e=>e.raw,Identifier:e=>{const o=e.name;return u>0?o:Ki(i,o)?qt("Illegal identifier: "+o):Ki(n,o)?n[o]:Ki(t,o)?o:(l[o]=1,a(o))},MemberExpression:e=>{const t=!e.computed,i=h(e.object);t&&(u+=1);const n=h(e.property);return i===s&&(c[function(e){const t=e&&e.length-1;return t&&('"'===e[0]&&'"'===e[t]||"'"===e[0]&&"'"===e[t])?e.slice(1,-1):e}(n)]=1),t&&(u-=1),i+(t?"."+n:"["+n+"]")},CallExpression:e=>{"Identifier"!==e.callee.type&&qt("Illegal callee type: "+e.callee.type);const t=e.callee.name,i=e.arguments,n=Ki(o,t)&&o[t];return n||qt("Unrecognized function: "+t),Oi(n)?n(i):n+"("+i.map(h).join(",")+")"},ArrayExpression:e=>"["+e.elements.map(h).join(",")+"]",BinaryExpression:e=>"("+h(e.left)+" "+e.operator+" "+h(e.right)+")",UnaryExpression:e=>"("+e.operator+h(e.argument)+")",ConditionalExpression:e=>"("+h(e.test)+"?"+h(e.consequent)+":"+h(e.alternate)+")",LogicalExpression:e=>"("+h(e.left)+e.operator+h(e.right)+")",ObjectExpression:e=>"{"+e.properties.map(h).join(",")+"}",Property:e=>{u+=1;const t=h(e.key);return u-=1,t+":"+h(e.value)}};function g(e){const t={code:h(e),globals:Object.keys(l),fields:Object.keys(c)};return l={},c={},t}return g.functions=o,g.constants=n,g}var TM,RM,OM,FM,PM,BM,zM,WM,VM,HM,$M,UM,jM,qM,KM,GM,YM=new xS,ZM=new xS,XM={point:GS,lineStart:GS,lineEnd:GS,polygonStart:function(){YM=new xS,XM.lineStart=QM,XM.lineEnd=JM},polygonEnd:function(){var e=+YM;ZM.add(e<0?AS+e:e),this.lineStart=this.lineEnd=this.point=GS},sphere:function(){ZM.add(AS)}};function QM(){XM.point=eI}function JM(){tI(TM,RM)}function eI(e,t){XM.point=tI,TM=e,RM=t,OM=e*=IS,FM=FS(t=(t*=IS)/2+ES),PM=HS(t)}function tI(e,t){var i=(e*=IS)-OM,n=i>=0?1:-1,o=n*i,r=FS(t=(t*=IS)/2+ES),s=HS(t),a=PM*s,l=FM*r+a*FS(o),c=a*n*HS(o);YM.add(OS(c,l)),OM=e,FM=r,PM=s}var iI,nI,oI,rI,sI,aI,lI,cI,uI,hI,dI,gI,fI,pI,mI,_I,vI={point:bI,lineStart:wI,lineEnd:CI,polygonStart:function(){vI.point=SI,vI.lineStart=xI,vI.lineEnd=kI,qM=new xS,XM.polygonStart()},polygonEnd:function(){XM.polygonEnd(),vI.point=bI,vI.lineStart=wI,vI.lineEnd=CI,YM<0?(BM=-(WM=180),zM=-(VM=90)):qM>kS?VM=90:qM<-1e-6&&(zM=-90),GM[0]=BM,GM[1]=WM},sphere:function(){BM=-(WM=180),zM=-(VM=90)}};function bI(e,t){KM.push(GM=[BM=e,WM=e]),tVM&&(VM=t)}function yI(e,t){var i=ik([e*IS,t*IS]);if(jM){var n=ok(jM,i),o=ok([n[1],-n[0],0],n);ak(o),o=tk(o);var r,s=e-HM,a=s>0?1:-1,l=o[0]*MS*a,c=TS(s)>180;c^(a*HMVM&&(VM=r):c^(a*HM<(l=(l+360)%360-180)&&lVM&&(VM=t)),c?eDI(BM,WM)&&(WM=e):DI(e,WM)>DI(BM,WM)&&(BM=e):WM>=BM?(eWM&&(WM=e)):e>HM?DI(BM,e)>DI(BM,WM)&&(WM=e):DI(e,WM)>DI(BM,WM)&&(BM=e)}else KM.push(GM=[BM=e,WM=e]);tVM&&(VM=t),jM=i,HM=e}function wI(){vI.point=yI}function CI(){GM[0]=BM,GM[1]=WM,vI.point=bI,jM=null}function SI(e,t){if(jM){var i=e-HM;qM.add(TS(i)>180?i+(i>0?360:-360):i)}else $M=e,UM=t;XM.point(e,t),yI(e,t)}function xI(){XM.lineStart()}function kI(){SI($M,UM),XM.lineEnd(),TS(qM)>kS&&(BM=-(WM=180)),GM[0]=BM,GM[1]=WM,jM=null}function DI(e,t){return(t-=e)<0?t+360:t}function LI(e,t){return e[0]-t[0]}function NI(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t>>1;i(e[r],t)<0?n=r+1:o=r}return n}return 1===e.length&&(t=(t,i)=>e(t)-i,i=function(e){return(t,i)=>function(e,t){return et?1:e>=t?0:NaN}(e(t),i)}(e)),{left:n,center:function(e,i,o,r){null==o&&(o=0),null==r&&(r=e.length);const s=n(e,i,o,r-1);return s>o&&t(e[s-1],i)>-t(e[s],i)?s-1:s},right:function(e,t,n,o){for(null==n&&(n=0),null==o&&(o=e.length);n>>1;i(e[r],t)>0?o=r:n=r+1}return n}}}(UI),qI=jI.left,KI=jI.right;var GI={E_union:function(e,t){if(!e.length)return t;for(var i=0,n=t.length;it.indexOf(e)>=0)):t},R_union:function(e,t){var i=pi(t[0]),n=pi(t[1]);return i>n&&(i=t[1],n=t[0]),e.length?(e[0]>i&&(e[0]=i),e[1]n&&(i=t[1],n=t[0]),e.length?nn&&(e[1]=n),e):[i,n]}};function YI(e,t,i,n){t[0].type!==DA&&qt("First argument to selection functions must be a string literal.");const o=t[0].value,r=":"+o;(t.length>=2&&fi(t).value)!==WI||Ki(n,"@unit")||(n["@unit"]=i.getData(o).indataRef(i,"unit")),Ki(n,r)||(n[r]=i.getData(o).tuplesRef())}function ZI(e){const t=this.context.data[e];return t?t.values.value:[]}const XI=e=>function(t,i){return this.context.dataflow.locale()[e](i)(t)},QI=XI("format"),JI=XI("timeFormat"),eT=XI("utcFormat"),tT=XI("timeParse"),iT=XI("utcParse"),nT=new Date(2e3,0,1);function oT(e,t,i){return Number.isInteger(e)&&Number.isInteger(t)?(nT.setYear(2e3),nT.setMonth(e),nT.setDate(t),JI.call(this,nT,i)):""}function rT(e,t,i,n){t[0].type!==DA&&qt("First argument to data functions must be a string literal.");const o=t[0].value,r=":"+o;if(!Ki(r,n))try{n[r]=i.getData(o).tuplesRef()}catch(e){}}function sT(e,t,i,n){if(t[0].type===DA)aT(i,n,t[0].value);else for(e in i.scales)aT(i,n,e)}function aT(e,t,i){const n="%"+i;if(!Ki(t,n))try{t[n]=e.scaleRef(i)}catch(e){}}function lT(e,t){let i;return Oi(e)?e:rn(e)?(i=t.scales[e])&&i.value:void 0}function cT(e,t){return function(i,n,o){if(i){const t=lT(i,(o||this).context);return t&&t.path[e](n)}return t(n)}}const uT=cT("area",(function(e){return ZM=new xS,SS(e,XM),2*ZM})),hT=cT("bounds",(function(e){var t,i,n,o,r,s,a;if(VM=WM=-(BM=zM=1/0),KM=[],SS(e,vI),i=KM.length){for(KM.sort(LI),t=1,r=[n=KM[0]];tDI(n[0],n[1])&&(n[1]=o[1]),DI(o[0],n[1])>DI(n[0],n[1])&&(n[0]=o[0])):r.push(n=o);for(s=-1/0,t=0,n=r[i=r.length-1];t<=i;n=o,++t)o=r[t],(a=DI(n[1],o[0]))>s&&(s=a,BM=o[0],WM=n[1])}return KM=GM=null,BM===1/0||zM===1/0?[[NaN,NaN],[NaN,NaN]]:[[BM,zM],[WM,VM]]})),dT=cT("centroid",(function(e){iI=nI=oI=rI=sI=aI=lI=cI=0,uI=new xS,hI=new xS,dI=new xS,SS(e,EI);var t=+uI,i=+hI,n=+dI,o=zS(t,i,n);return o_T(e,t)}const bT={};function yT(e){return li(e)||ArrayBuffer.isView(e)?e:null}function wT(e){return yT(e)||(rn(e)?e:null)}const CT=e=>e.data;function ST(e,t){const i=ZI.call(t,e);return i.root&&i.root.lookup||{}}const xT=()=>"undefined"!=typeof window&&window||null,kT={random:()=>wc(),cumulativeNormal:Ic,cumulativeLogNormal:Bc,cumulativeUniform:Uc,densityNormal:Mc,densityLogNormal:Pc,densityUniform:$c,quantileNormal:Tc,quantileLogNormal:zc,quantileUniform:jc,sampleNormal:Ac,sampleLogNormal:Fc,sampleUniform:Hc,isArray:li,isBoolean:Ji,isDate:en,isDefined:e=>void 0!==e,isNumber:nn,isObject:ci,isRegExp:on,isString:rn,isTuple:kl,isValid:e=>null!=e&&e==e,toBoolean:fn,toDate:mn,toNumber:pi,toString:_n,indexof:function(e,...t){return wT(e).indexOf(...t)},join:function(e,...t){return yT(e).join(...t)},lastindexof:function(e,...t){return wT(e).lastIndexOf(...t)},replace:function(e,t,i){return Oi(i)&&qt("Function argument passed to replace."),String(e).replace(t,i)},reverse:function(e){return yT(e).slice().reverse()},slice:function(e,...t){return wT(e).slice(...t)},flush:Zi,lerp:an,merge:function(){const e=[].slice.call(arguments);return e.unshift({}),$i(...e)},pad:hn,peek:fi,pluck:function(e,t){const i=bT[t]||(bT[t]=Gt(t));return li(e)?e.map(i):i(e)},span:dn,inrange:Qi,truncate:bn,rgb:Eg,lab:vp,hcl:kp,hsl:Fg,luminance:pT,contrast:function(e,t){const i=pT(e),n=pT(t);return(Math.max(i,n)+.05)/(Math.min(i,n)+.05)},sequence:uu,format:QI,utcFormat:eT,utcParse:iT,utcOffset:_s,utcSequence:ys,timeFormat:JI,timeParse:tT,timeOffset:ms,timeSequence:bs,timeUnitSpecifier:Hr,monthFormat:function(e){return oT.call(this,e,1,"%B")},monthAbbrevFormat:function(e){return oT.call(this,e,1,"%b")},dayFormat:function(e){return oT.call(this,0,2+e,"%A")},dayAbbrevFormat:function(e){return oT.call(this,0,2+e,"%a")},quarter:Mi,utcquarter:Ii,week:qr,utcweek:Qr,dayofyear:jr,utcdayofyear:Xr,warn:function(){return gT(this.context.dataflow,"warn",arguments)},info:function(){return gT(this.context.dataflow,"info",arguments)},debug:function(){return gT(this.context.dataflow,"debug",arguments)},extent:Ui,inScope:function(e){const t=this.context.group;let i=!1;if(t)for(;e;){if(e===t){i=!0;break}e=e.mark.group}return i},intersect:function(e,t,i){if(!e)return[];const[n,o]=e,r=(new ov).set(n[0],n[1],o[0],o[1]);return Nw(i||this.context.dataflow.scenegraph().root,r,function(e){let t=null;if(e){const i=Ti(e.marktype),n=Ti(e.markname);t=e=>(!i.length||i.some((t=>e.marktype===t)))&&(!n.length||n.some((t=>e.name===t)))}return t}(t))},clampRange:Ri,pinchDistance:function(e){const t=e.touches,i=t[0].clientX-t[1].clientX,n=t[0].clientY-t[1].clientY;return Math.sqrt(i*i+n*n)},pinchAngle:function(e){const t=e.touches;return Math.atan2(t[0].clientY-t[1].clientY,t[0].clientX-t[1].clientX)},screen:function(){const e=xT();return e?e.screen:{}},containerSize:function(){const e=this.context.dataflow,t=e.container&&e.container();return t?[t.clientWidth,t.clientHeight]:[void 0,void 0]},windowSize:function(){const e=xT();return e?[e.innerWidth,e.innerHeight]:[void 0,void 0]},bandspace:function(e,t,i){return Kp(e||0,t||0,i||0)},setdata:function(e,t){const i=this.context.dataflow,n=this.context.data[e].input;return i.pulse(n,i.changeset().remove(Jt).insert(t)),1},pathShape:function(e){let t=null;return function(i){return i?L_(i,t=t||m_(e)):e}},panLinear:Ci,panLog:Si,panPow:xi,panSymlog:ki,zoomLinear:Li,zoomLog:Ni,zoomPow:Ei,zoomSymlog:Ai,encode:function(e,t,i){if(e){const i=this.context.dataflow,n=e.mark.source;i.pulse(n,i.changeset().encode(e,t))}return void 0!==i?i:e},modify:function(e,t,i,n,o,r){const s=this.context.dataflow,a=this.context.data[e],l=a.input,c=s.stamp();let u,h,d=a.changes;if(!1===s._trigger||!(l.value.length||t||n))return 0;if((!d||d.stamp{a.modified=!0,s.pulse(l,d).run()}),!0,1)),i&&(u=!0===i?Jt:li(i)||kl(i)?i:vT(i),d.remove(u)),t&&d.insert(t),n&&(u=vT(n),l.value.some(u)?d.remove(u):d.insert(n)),o)for(h in r)d.modify(o,h,r[h]);return 1}},DT=["view","item","group","xy","x","y"],LT="this.",NT={},ET={forbidden:["_"],allowed:["datum","event","item"],fieldvar:"datum",globalvar:e=>"_[".concat(gn("$"+e),"]"),functions:function(e){const t=MM(e);DT.forEach((e=>t[e]="event.vega."+e));for(const e in kT)t[e]=LT+e;return $i(t,function(e,t,i){t.__bandwidth=e=>e&&e.bandwidth?e.bandwidth():0,i._bandwidth=sT,i._range=sT,i._scale=sT;const n=t=>"_["+(t.type===DA?gn("%"+t.value):gn("%")+"+"+e(t))+"]";return{_bandwidth:e=>"this.__bandwidth(".concat(n(e[0]),")"),_range:e=>"".concat(n(e[0]),".range()"),_scale:t=>"".concat(n(t[0]),"(").concat(e(t[1]),")")}}(e,kT,NT)),t},constants:AM,visitors:NT},AT=IM(ET);function MT(e,t,i){return 1===arguments.length?kT[e]:(kT[e]=t,i&&(NT[e]=i),AT&&(AT.functions[e]=LT+e),this)}function IT(e,t){const i={};let n;try{n=EM(e=rn(e)?e:gn(e)+"")}catch(t){qt("Expression parse error: "+e)}n.visit((e=>{if(e.type!==LA)return;const n=e.callee.name,o=ET.visitors[n];o&&o(n,e.arguments,t,i)}));const o=AT(n);return o.globals.forEach((e=>{const n="$"+e;!Ki(i,n)&&t.getSignal(e)&&(i[n]=t.signalRef(e))})),{$expr:$i({code:o.code},t.options.ast?{ast:n}:null),$fields:o.fields,$params:i}}MT("bandwidth",(function(e,t){const i=lT(e,(t||this).context);return i&&i.bandwidth?i.bandwidth():0}),sT),MT("copy",(function(e,t){const i=lT(e,(t||this).context);return i?i.copy():void 0}),sT),MT("domain",(function(e,t){const i=lT(e,(t||this).context);return i?i.domain():[]}),sT),MT("range",(function(e,t){const i=lT(e,(t||this).context);return i&&i.range?i.range():[]}),sT),MT("invert",(function(e,t,i){const n=lT(e,(i||this).context);return n?li(t)?(n.invertRange||n.invert)(t):(n.invert||n.invertExtent)(t):void 0}),sT),MT("scale",(function(e,t,i){const n=lT(e,(i||this).context);return n?n(t):void 0}),sT),MT("gradient",(function(e,t,i,n,o){e=lT(e,(o||this).context);const r=h_(t,i);let s=e.domain(),a=s[0],l=fi(s),c=Zt;return l-a?c=Om(e,a,l):e=(e.interpolator?Cm("sequential")().interpolator(e.interpolator()):Cm("linear")().interpolate(e.interpolate()).range(e.range())).domain([a=0,l=1]),e.ticks&&(s=e.ticks(+n||15),a!==s[0]&&s.unshift(a),l!==fi(s)&&s.push(l)),s.forEach((t=>r.stop(c(t),e(t)))),r}),sT),MT("geoArea",uT,sT),MT("geoBounds",hT,sT),MT("geoCentroid",dT,sT),MT("geoShape",(function(e,t,i){const n=lT(e,(i||this).context);return function(e){return n?n.path.context(e)(t):""}}),sT),MT("indata",(function(e,t,i){const n=this.context.data[e]["index:"+t],o=n?n.value.get(i):void 0;return o?o.count:o}),(function(e,t,i,n){t[0].type!==DA&&qt("First argument to indata must be a string literal."),t[1].type!==DA&&qt("Second argument to indata must be a string literal.");const o=t[0].value,r=t[1].value,s="@"+r;Ki(s,n)||(n[s]=i.getData(o).indataRef(i,r))})),MT("data",ZI,rT),MT("treePath",(function(e,t,i){const n=ST(e,this),o=n[t],r=n[i];return o&&r?o.path(r).map(CT):void 0}),rT),MT("treeAncestors",(function(e,t){const i=ST(e,this)[t];return i?i.ancestors().map(CT):void 0}),rT),MT("vlSelectionTest",(function(e,t,i){for(var n,o,r,s,a,l=this.context.data[e],c=l?l.values.value:[],u=l?l[HI]&&l[HI].value:void 0,h=i===WI,d=c.length,g=0;g(e[r[i].field]=t,e)),{}))}return t=t||VI,Object.keys(_).forEach((e=>{_[e]=Object.keys(_[e]).map((t=>_[e][t])).reduce(((i,n)=>void 0===i?n:GI[b[e]+"_"+t](i,n)))})),m=Object.keys(v),i&&m.length&&(_[n?"vlPoint":"vlMulti"]=t===VI?{or:m.reduce(((e,t)=>(e.push(...v[t]),e)),[])}:{and:m.map((e=>({or:v[e]})))}),_}),YI),MT("vlSelectionTuples",(function(e,t){return e.map((e=>$i({values:t.fields.map((t=>(t.getter||(t.getter=Gt(t.field)))(e.datum)))},t)))}));const TT=vn(["rule"]),RT=vn(["group","image","rect"]);function OT(e){return(e+"").toLowerCase()}function FT(e,t,i){";"!==i[i.length-1]&&(i="return("+i+");");const n=Function(...t.concat(i));return e&&e.functions?n.bind(e.functions):n}var PT={operator:(e,t)=>FT(e,["_"],t.code),parameter:(e,t)=>FT(e,["datum","_"],t.code),event:(e,t)=>FT(e,["event"],t.code),handler:(e,t)=>FT(e,["_","event"],"var datum=event.item&&event.item.datum;return ".concat(t.code,";")),encode:(e,t)=>{const{marktype:i,channels:n}=t;let o="var o=item,datum=o.datum,m=0,$;";for(const e in n){const t="o["+gn(e)+"]";o+="$=".concat(n[e].code,";if(").concat(t,"!==$)").concat(t,"=$,m=1;")}return o+=function(e,t){let i="";return TT[t]||(e.x2&&(e.x?(RT[t]&&(i+="if(o.x>o.x2)$=o.x,o.x=o.x2,o.x2=$;"),i+="o.width=o.x2-o.x;"):i+="o.x=o.x2-(o.width||0);"),e.xc&&(i+="o.x=o.xc-(o.width||0)/2;"),e.y2&&(e.y?(RT[t]&&(i+="if(o.y>o.y2)$=o.y,o.y=o.y2,o.y2=$;"),i+="o.height=o.y2-o.y;"):i+="o.y=o.y2-(o.height||0);"),e.yc&&(i+="o.y=o.yc-(o.height||0)/2;")),i}(n,i),o+="return m;",FT(e,["item","_"],o)},codegen:{get(e){const t="[".concat(e.map(gn).join("]["),"]"),i=Function("_","return _".concat(t,";"));return i.path=t,i},comparator(e,t){let i;const n=Function("a","b","var u, v; return "+e.map(((e,n)=>{const o=t[n];let r,s;return e.path?(r="a".concat(e.path),s="b".concat(e.path)):((i=i||{})["f"+n]=e,r="this.f".concat(n,"(a)"),s="this.f".concat(n,"(b)")),function(e,t,i,n){return"((u = ".concat(e,") < (v = ").concat(t,") || u == null) && v != null ? ").concat(i,"\n : (u > v || v == null) && u != null ? ").concat(n,"\n : ((v = v instanceof Date ? +v : v), (u = u instanceof Date ? +u : u)) !== u && v === v ? ").concat(i,"\n : v !== v && u === u ? ").concat(n," : ")}(r,s,-o,o)})).join("")+"0;");return i?n.bind(i):n}}};function BT(e,t,i){if(!e||!ci(e))return e;for(let n,o=0,r=zT.length;oe&&e.$tupleid?Dl:e));return t.fn[i]||(t.fn[i]=Fi(n,e.$order,t.expr.codegen))}},{key:"$context",parse:function(e,t){return t}},{key:"$subflow",parse:function(e,t){const i=e.$subflow;return function(e,n,o){const r=t.fork().parse(i),s=r.get(i.operators[0].id),a=r.signals.parent;return a&&a.set(o),s.detachSubflow=()=>t.detach(r),s}}},{key:"$tupleid",parse:function(){return Dl}}];const WT={skip:!0};function VT(e,t,i,n){return new HT(e,t,i,n)}function HT(e,t,i,n){this.dataflow=e,this.transforms=t,this.events=e.events.bind(e),this.expr=n||PT,this.signals={},this.scales={},this.nodes={},this.data={},this.fn={},i&&(this.functions=Object.create(i),this.functions.context=this)}function $T(e){this.dataflow=e.dataflow,this.transforms=e.transforms,this.events=e.events,this.expr=e.expr,this.signals=Object.create(e.signals),this.scales=Object.create(e.scales),this.nodes=Object.create(e.nodes),this.data=Object.create(e.data),this.fn=Object.create(e.fn),e.functions&&(this.functions=Object.create(e.functions),this.functions.context=this)}function UT(e,t){e&&(null==t?e.removeAttribute("aria-label"):e.setAttribute("aria-label",t))}HT.prototype=$T.prototype={fork(){const e=new $T(this);return(this.subcontext||(this.subcontext=[])).push(e),e},detach(e){this.subcontext=this.subcontext.filter((t=>t!==e));const t=Object.keys(e.nodes);for(const i of t)e.nodes[i]._targets=null;for(const i of t)e.nodes[i].detach();e.nodes=null},get(e){return this.nodes[e]},set(e,t){return this.nodes[e]=t},add(e,t){const i=this,n=i.dataflow,o=e.value;if(i.set(e.id,t),"collect"===OT(e.type)&&o&&(o.$ingest?n.ingest(t,o.$ingest,o.$format):o.$request?n.preload(t,o.$request,o.$format):n.pulse(t,n.changeset().insert(o))),e.root&&(i.root=t),e.parent){let o=i.get(e.parent.$ref);o?(n.connect(o,[t]),t.targets().add(o)):(i.unresolved=i.unresolved||[]).push((()=>{o=i.get(e.parent.$ref),n.connect(o,[t]),t.targets().add(o)}))}if(e.signal&&(i.signals[e.signal]=t),e.scale&&(i.scales[e.scale]=t),e.data)for(const n in e.data){const o=i.data[n]||(i.data[n]={});e.data[n].forEach((e=>o[e]=t))}},resolve(){return(this.unresolved||[]).forEach((e=>e())),delete this.unresolved,this},operator(e,t){this.add(e,this.dataflow.add(e.value,t))},transform(e,t){this.add(e,this.dataflow.add(this.transforms[OT(t)]))},stream(e,t){this.set(e.id,t)},update(e,t,i,n,o){this.dataflow.on(t,i,n,o,e.options)},operatorExpression(e){return this.expr.operator(this,e)},parameterExpression(e){return this.expr.parameter(this,e)},eventExpression(e){return this.expr.event(this,e)},handlerExpression(e){return this.expr.handler(this,e)},encodeExpression(e){return this.expr.encode(this,e)},parse:function(e){const t=this,i=e.operators||[];return e.background&&(t.background=e.background),e.eventConfig&&(t.eventConfig=e.eventConfig),e.locale&&(t.locale=e.locale),i.forEach((e=>t.parseOperator(e))),i.forEach((e=>t.parseOperatorParameters(e))),(e.streams||[]).forEach((e=>t.parseStream(e))),(e.updates||[]).forEach((e=>t.parseUpdate(e))),t.resolve()},parseOperator:function(e){const t=this;"operator"!==OT(e.type)&&e.type?t.transform(e,e.type):t.operator(e,e.update?t.operatorExpression(e.update):null)},parseOperatorParameters:function(e){const t=this;if(e.params){const i=t.get(e.id);i||qt("Invalid operator id: "+e.id),t.dataflow.connect(i,i.parameters(t.parseParameters(e.params),e.react,e.initonly))}},parseParameters:function(e,t){t=t||{};const i=this;for(const n in e){const o=e[n];t[n]=li(o)?o.map((e=>BT(e,i,t))):BT(o,i,t)}return t},parseStream:function(e){var t,i=this,n=null!=e.filter?i.eventExpression(e.filter):void 0,o=null!=e.stream?i.get(e.stream):void 0;e.source?o=i.events(e.source,e.type,n):e.merge&&(o=(t=e.merge.map((e=>i.get(e))))[0].merge.apply(t[0],t.slice(1))),e.between&&(t=e.between.map((e=>i.get(e))),o=o.between(t[0],t[1])),e.filter&&(o=o.filter(n)),null!=e.throttle&&(o=o.throttle(+e.throttle)),null!=e.debounce&&(o=o.debounce(+e.debounce)),null==o&&qt("Invalid stream definition: "+JSON.stringify(e)),e.consume&&o.consume(!0),i.stream(e,o)},parseUpdate:function(e){var t,i=this,n=ci(n=e.source)?n.$ref:n,o=i.get(n),r=e.update,s=void 0;o||qt("Source not defined: "+e.source),t=e.target&&e.target.$expr?i.eventExpression(e.target.$expr):i.get(e.target),r&&r.$expr&&(r.$params&&(s=i.parseParameters(r.$params)),r=i.handlerExpression(r.$expr)),i.update(e,o,t,r,s)},getState:function(e){var t=this,i={};if(e.signals){var n=i.signals={};Object.keys(t.signals).forEach((i=>{const o=t.signals[i];e.signals(i,o)&&(n[i]=o.value)}))}if(e.data){var o=i.data={};Object.keys(t.data).forEach((i=>{const n=t.data[i];e.data(i,n)&&(o[i]=n.input.value)}))}return t.subcontext&&!1!==e.recurse&&(i.subcontext=t.subcontext.map((t=>t.getState(e)))),i},setState:function(e){var t=this,i=t.dataflow,n=e.data,o=e.signals;Object.keys(o||{}).forEach((e=>{i.update(t.signals[e],o[e],WT)})),Object.keys(n||{}).forEach((e=>{i.pulse(t.data[e].input,i.changeset().remove(Jt).insert(n[e]))})),(e.subcontext||[]).forEach(((e,i)=>{const n=t.subcontext[i];n&&n.setState(e)}))}};const jT="default";function qT(e,t){const i=e.globalCursor()?"undefined"!=typeof document&&document.body:e.container();if(i)return null==t?i.style.removeProperty("cursor"):i.style.cursor=t}function KT(e,t){var i=e._runtime.data;return Ki(i,t)||qt("Unrecognized data set: "+t),i[t]}function GT(e,t){Tl(t)||qt("Second argument to changes must be a changeset.");const i=KT(this,e);return i.modified=!0,this.pulse(i.input,t)}function YT(e){var t=e.padding();return Math.max(0,e._viewWidth+t.left+t.right)}function ZT(e){var t=e.padding();return Math.max(0,e._viewHeight+t.top+t.bottom)}function XT(e){var t=e.padding(),i=e._origin;return[t.left+i[0],t.top+i[1]]}const QT="view",JT={trap:!1};function eR(e,t,i,n){e._eventListeners.push({type:i,sources:Ti(t),handler:n})}function tR(e,t,i){const n=e._eventConfig&&e._eventConfig[t];return!(!1===n||ci(n)&&!n[i])||(e.warn(`Blocked ${t} ${i} event listener.`),!1)}function iR(e){return e.item}function nR(e){return e.item.mark.source}function oR(e){return function(t,i){return i.vega.view().changeset().encode(i.item,e)}}function rR(e,t,i){const n=document.createElement(e);for(const e in t)n.setAttribute(e,t[e]);return null!=i&&(n.textContent=i),n}function sR(e,t,i,n){const o=i.event||"input",r=()=>e.update(t.value);n.signal(i.signal,t.value),t.addEventListener(o,r),eR(n,t,o,r),e.set=e=>{t.value=e,t.dispatchEvent(function(e){return"undefined"!=typeof Event?new Event(e):{type:e}}(o))}}function aR(e,t,i,n){const o=n.signal(i.signal),r=rR("div",{class:"vega-bind"}),s="radio"===i.input?r:r.appendChild(rR("label"));s.appendChild(rR("span",{class:"vega-bind-name"},i.name||i.signal)),t.appendChild(r);let a=lR;switch(i.input){case"checkbox":a=cR;break;case"select":a=uR;break;case"radio":a=hR;break;case"range":a=dR}a(e,s,i,o)}function lR(e,t,i,n){const o=rR("input");for(const e in i)"signal"!==e&&"element"!==e&&o.setAttribute("input"===e?"type":e,i[e]);o.setAttribute("name",i.signal),o.value=n,t.appendChild(o),o.addEventListener("input",(()=>e.update(o.value))),e.elements=[o],e.set=e=>o.value=e}function cR(e,t,i,n){const o={type:"checkbox",name:i.signal};n&&(o.checked=!0);const r=rR("input",o);t.appendChild(r),r.addEventListener("change",(()=>e.update(r.checked))),e.elements=[r],e.set=e=>r.checked=!!e||null}function uR(e,t,i,n){const o=rR("select",{name:i.signal}),r=i.labels||[];i.options.forEach(((e,t)=>{const i={value:e};gR(e,n)&&(i.selected=!0),o.appendChild(rR("option",i,(r[t]||e)+""))})),t.appendChild(o),o.addEventListener("change",(()=>{e.update(i.options[o.selectedIndex])})),e.elements=[o],e.set=e=>{for(let t=0,n=i.options.length;t{const a={type:"radio",name:i.signal,value:t};gR(t,n)&&(a.checked=!0);const l=rR("input",a);l.addEventListener("change",(()=>e.update(t)));const c=rR("label",{},(r[s]||t)+"");return c.prepend(l),o.appendChild(c),l})),e.set=t=>{const i=e.elements,n=i.length;for(let e=0;e{l.textContent=a.value,e.update(+a.value)};a.addEventListener("input",c),a.addEventListener("change",c),e.elements=[a],e.set=e=>{a.value=e,l.textContent=e}}function gR(e,t){return e===t||e+""==t+""}function fR(e,t,i,n,o,r){return(t=t||new n(e.loader())).initialize(i,YT(e),ZT(e),XT(e),o,r).background(e.background())}function pR(e,t){return t?function(){try{t.apply(this,arguments)}catch(t){e.error(t)}}:null}function mR(e,t,i){if("string"==typeof t){if("undefined"==typeof document)return e.error("DOM document instance not found."),null;if(!(t=document.querySelector(t)))return e.error("Signal bind element not found: "+t),null}if(t&&i)try{t.innerHTML=""}catch(i){t=null,e.error(i)}return t}const _R=e=>+e||0;function vR(e){return ci(e)?{top:_R(e.top),bottom:_R(e.bottom),left:_R(e.left),right:_R(e.right)}:(e=>({top:e,bottom:e,left:e,right:e}))(_R(e))}async function bR(e,t,i,n){const o=Lw(t),r=o&&o.headless;return r||qt("Unrecognized renderer type: "+t),await e.runAsync(),fR(e,null,null,r,i,n).renderAsync(e._scenegraph.root)}var yR="padding",wR={skip:!0};function CR(e,t){var i=e.autosize(),n=e.padding();return t-(i&&i.contains===yR?n.left+n.right:0)}function SR(e,t){var i=e.autosize(),n=e.padding();return t-(i&&i.contains===yR?n.top+n.bottom:0)}function xR(e,t){return t.modified&&li(t.input.value)&&e.indexOf("_:vega:_")}function kR(e,t){return!("parent"===e||t instanceof rc.proxy)}function DR(e,t,i,n){const o=e.element();o&&o.setAttribute("title",function(e){return null==e?"":li(e)?LR(e):ci(e)&&!en(e)?(t=e,Object.keys(t).map((e=>{const i=t[e];return e+": "+(li(i)?LR(i):NR(i))})).join("\n")):e+"";var t}(n))}function LR(e){return"["+e.map(NR).join(", ")+"]"}function NR(e){return li(e)?"[…]":ci(e)&&!en(e)?"{…}":e}function ER(e,t){const i=this;if(t=t||{},ic.call(i),t.loader&&i.loader(t.loader),t.logger&&i.logger(t.logger),null!=t.logLevel&&i.logLevel(t.logLevel),t.locale||e.locale){const n=$i({},e.locale,t.locale);i.locale(ml(n.number,n.time))}i._el=null,i._elBind=null,i._renderType=t.renderer||kw.Canvas,i._scenegraph=new ay;const n=i._scenegraph.root;i._renderer=null,i._tooltip=t.tooltip||DR,i._redraw=!0,i._handler=(new Ty).scene(n),i._globalCursor=!1,i._preventDefault=!1,i._timers=[],i._eventListeners=[],i._resizeListeners=[],i._eventConfig=function(e){const t=$i({defaults:{}},e),i=(e,t)=>{t.forEach((t=>{li(e[t])&&(e[t]=vn(e[t]))}))};return i(t.defaults,["prevent","allow"]),i(t,["view","window","selector"]),t}(e.eventConfig),i.globalCursor(i._eventConfig.globalCursor);const o=function(e,t,i){return VT(e,rc,kT,i).parse(t)}(i,e,t.expr);i._runtime=o,i._signals=o.signals,i._bind=(e.bindings||[]).map((e=>({state:null,param:$i({},e)}))),o.root&&o.root.set(n),n.source=o.data.root.input,i.pulse(o.data.root.input,i.changeset().insert(n.items)),i._width=i.width(),i._height=i.height(),i._viewWidth=CR(i,i._width),i._viewHeight=SR(i,i._height),i._origin=[0,0],i._resize=0,i._autosize=1,function(e){var t=e._signals,i=t.width,n=t.height,o=t.padding;function r(){e._autosize=e._resize=1}e._resizeWidth=e.add(null,(t=>{e._width=t.size,e._viewWidth=CR(e,t.size),r()}),{size:i}),e._resizeHeight=e.add(null,(t=>{e._height=t.size,e._viewHeight=SR(e,t.size),r()}),{size:n});const s=e.add(null,r,{pad:o});e._resizeWidth.rank=i.rank+1,e._resizeHeight.rank=n.rank+1,s.rank=o.rank+1}(i),function(e){e.add(null,(t=>(e._background=t.bg,e._resize=1,t.bg)),{bg:e._signals.background})}(i),function(e){const t=e._signals.cursor||(e._signals.cursor=e.add({user:jT,item:null}));e.on(e.events("view","mousemove"),t,((e,i)=>{const n=t.value,o=n?rn(n)?n:n.user:jT,r=i.item&&i.item.cursor||null;return n&&o===n.user&&r==n.item?n:{user:o,item:r}})),e.add(null,(function(t){let i=t.cursor,n=this.value;return rn(i)||(n=i.item,i=i.user),qT(e,i&&i!==jT?i:n||i),n}),{cursor:t})}(i),i.description(e.description),t.hover&&i.hover(),t.container&&i.initialize(t.container,t.bind)}function AR(e,t){return Ki(e._signals,t)?e._signals[t]:qt("Unrecognized signal name: "+gn(t))}function MR(e,t){const i=(e._targets||[]).filter((e=>e._update&&e._update.handler===t));return i.length?i[0]:null}function IR(e,t,i,n){let o=MR(i,n);return o||(o=pR(e,(()=>n(t,i.value))),o.handler=n,e.on(i,null,o)),e}function TR(e,t,i){const n=MR(t,i);return n&&t._targets.remove(n),e}Xi(ER,ic,{async evaluate(e,t,i){if(await ic.prototype.evaluate.call(this,e,t),this._redraw||this._resize)try{this._renderer&&(this._resize&&(this._resize=0,o=XT(n=this),r=YT(n),s=ZT(n),n._renderer.background(n.background()),n._renderer.resize(r,s,o),n._handler.origin(o),n._resizeListeners.forEach((e=>{try{e(r,s)}catch(e){n.error(e)}}))),await this._renderer.renderAsync(this._scenegraph.root)),this._redraw=!1}catch(e){this.error(e)}var n,o,r,s;return i&&Cl(this,i),this},dirty(e){this._redraw=!0,this._renderer&&this._renderer.dirty(e)},description(e){if(arguments.length){const t=null!=e?e+"":null;return t!==this._desc&&UT(this._el,this._desc=t),this}return this._desc},container(){return this._el},scenegraph(){return this._scenegraph},origin(){return this._origin.slice()},signal(e,t,i){const n=AR(this,e);return 1===arguments.length?n.value:this.update(n,t,i)},width(e){return arguments.length?this.signal("width",e):this.signal("width")},height(e){return arguments.length?this.signal("height",e):this.signal("height")},padding(e){return arguments.length?this.signal("padding",vR(e)):vR(this.signal("padding"))},autosize(e){return arguments.length?this.signal("autosize",e):this.signal("autosize")},background(e){return arguments.length?this.signal("background",e):this.signal("background")},renderer(e){return arguments.length?(Lw(e)||qt("Unrecognized renderer type: "+e),e!==this._renderType&&(this._renderType=e,this._resetRenderer()),this):this._renderType},tooltip(e){return arguments.length?(e!==this._tooltip&&(this._tooltip=e,this._resetRenderer()),this):this._tooltip},loader(e){return arguments.length?(e!==this._loader&&(ic.prototype.loader.call(this,e),this._resetRenderer()),this):this._loader},resize(){return this._autosize=1,this.touch(AR(this,"autosize"))},_resetRenderer(){this._renderer&&(this._renderer=null,this.initialize(this._el,this._elBind))},_resizeView:function(e,t,i,n,o,r){this.runAfter((s=>{let a=0;s._autosize=0,s.width()!==i&&(a=1,s.signal("width",i,wR),s._resizeWidth.skip(!0)),s.height()!==n&&(a=1,s.signal("height",n,wR),s._resizeHeight.skip(!0)),s._viewWidth!==e&&(s._resize=1,s._viewWidth=e),s._viewHeight!==t&&(s._resize=1,s._viewHeight=t),s._origin[0]===o[0]&&s._origin[1]===o[1]||(s._resize=1,s._origin=o),a&&s.run("enter"),r&&s.runAfter((e=>e.resize()))}),!1,1)},addEventListener(e,t,i){let n=t;return i&&!1===i.trap||(n=pR(this,t),n.raw=t),this._handler.on(e,n),this},removeEventListener(e,t){for(var i,n,o=this._handler.handlers(e),r=o.length;--r>=0;)if(n=o[r].type,i=o[r].handler,e===n&&(t===i||t===i.raw)){this._handler.off(n,i);break}return this},addResizeListener(e){const t=this._resizeListeners;return t.indexOf(e)<0&&t.push(e),this},removeResizeListener(e){var t=this._resizeListeners,i=t.indexOf(e);return i>=0&&t.splice(i,1),this},addSignalListener(e,t){return IR(this,e,AR(this,e),t)},removeSignalListener(e,t){return TR(this,AR(this,e),t)},addDataListener(e,t){return IR(this,e,KT(this,e).values,t)},removeDataListener(e,t){return TR(this,KT(this,e).values,t)},globalCursor(e){if(arguments.length){if(this._globalCursor!==!!e){const t=qT(this,null);this._globalCursor=!!e,t&&qT(this,t)}return this}return this._globalCursor},preventDefault(e){return arguments.length?(this._preventDefault=e,this):this._preventDefault},timer:function(e,t){this._timers.push(function(e,t,i){var n=new TL,o=t;return null==t?(n.restart(e,t,i),n):(n._restart=n.restart,n.restart=function(e,t,i){t=+t,i=null==i?ML():+i,n._restart((function r(s){s+=o,n._restart(r,o+=t,i),e(s)}),t,i)},n.restart(e,t,i),n)}((function(t){e({timestamp:Date.now(),elapsed:t})}),t))},events:function(e,t,i){var n,o=this,r=new Hl(i),s=function(i,n){o.runAsync(null,(()=>{e===QT&&function(e,t){var i=e._eventConfig.defaults,n=i.prevent,o=i.allow;return!1!==n&&!0!==o&&(!0===n||!1===o||(n?n[t]:o?!o[t]:e.preventDefault()))}(o,t)&&i.preventDefault(),r.receive(function(e,t,i){var n,o,r=e._renderer,s=r&&r.canvas();return s&&(o=XT(e),(n=fy(t.changedTouches?t.changedTouches[0]:t,s))[0]-=o[0],n[1]-=o[1]),t.dataflow=e,t.item=i,t.vega=function(e,t,i){const n=t?"group"===t.mark.marktype?t:t.mark.group:null;function o(e){var i,o=n;if(e)for(i=t;i;i=i.mark.group)if(i.mark.name===e){o=i;break}return o&&o.mark&&o.mark.interactive?o:{}}function r(e){if(!e)return i;rn(e)&&(e=o(e));const t=i.slice();for(;e;)t[0]-=e.x||0,t[1]-=e.y||0,e=e.mark&&e.mark.group;return t}return{view:Vi(e),item:Vi(t||{}),group:o,xy:r,x:e=>r(e)[0],y:e=>r(e)[1]}}(e,i,n),t}(o,i,n))}))};if("timer"===e)tR(o,"timer",t)&&o.timer(s,t);else if(e===QT)tR(o,"view",t)&&o.addEventListener(t,s,JT);else if("window"===e?tR(o,"window",t)&&"undefined"!=typeof window&&(n=[window]):"undefined"!=typeof document&&tR(o,"selector",t)&&(n=document.querySelectorAll(e)),n){for(var a=0,l=n.length;a=0;)o[e].stop();for(e=r.length;--e>=0;)for(t=(i=r[e]).sources.length;--t>=0;)i.sources[t].removeEventListener(i.type,i.handler);return n&&n.call(this,this._handler,null,null,null),this},hover:function(e,t){return t=[t||"update",(e=[e||"hover"])[0]],this.on(this.events("view","mouseover",iR),nR,oR(e)),this.on(this.events("view","mouseout",iR),nR,oR(t)),this},data:function(e,t){return arguments.length<2?KT(this,e).values.value:GT.call(this,e,Rl().remove(Jt).insert(t))},change:GT,insert:function(e,t){return GT.call(this,e,Rl().insert(t))},remove:function(e,t){return GT.call(this,e,Rl().remove(t))},scale:function(e){var t=this._runtime.scales;return Ki(t,e)||qt("Unrecognized scale or projection: "+e),t[e].value},initialize:function(e,t){const i=this,n=i._renderType,o=i._eventConfig.bind,r=Lw(n);e=i._el=e?mR(i,e,!0):null,function(e){const t=e.container();t&&(t.setAttribute("role","graphics-document"),t.setAttribute("aria-roleDescription","visualization"),UT(t,e.description()))}(i),r||i.error("Unrecognized renderer type: "+n);const s=r.handler||Ty,a=e?r.renderer:r.headless;return i._renderer=a?fR(i,i._renderer,e,a):null,i._handler=function(e,t,i,n){const o=new n(e.loader(),pR(e,e.tooltip())).scene(e.scenegraph().root).initialize(i,XT(e),e);return t&&t.handlers().forEach((e=>{o.on(e.type,e.handler)})),o}(i,i._handler,e,s),i._redraw=!0,e&&"none"!==o&&(t=t?i._elBind=mR(i,t,!0):e.appendChild(rR("form",{class:"vega-bindings"})),i._bind.forEach((e=>{e.param.element&&"container"!==o&&(e.element=mR(i,e.param.element,!!e.param.input))})),i._bind.forEach((e=>{!function(e,t,i){if(!t)return;const n=i.param;let o=i.state;o||(o=i.state={elements:null,active:!1,set:null,update:t=>{t!=e.signal(n.signal)&&e.runAsync(null,(()=>{o.source=!0,e.signal(n.signal,t)}))}},n.debounce&&(o.update=Hi(n.debounce,o.update))),(null==n.input&&n.element?sR:aR)(o,t,n,e),o.active||(e.on(e._signals[n.signal],null,(()=>{o.source?o.source=!1:o.set(e.signal(n.signal))})),o.active=!0)}(i,e.element||t,e)}))),i},toImageURL:async function(e,t){e!==kw.Canvas&&e!==kw.SVG&&e!==kw.PNG&&qt("Unrecognized image type: "+e);const i=await bR(this,e,t);return e===kw.SVG?function(e,t){const i=new Blob([e],{type:"image/svg+xml"});return window.URL.createObjectURL(i)}(i.svg()):i.canvas().toDataURL("image/png")},toCanvas:async function(e,t){return(await bR(this,kw.Canvas,e,t)).canvas()},toSVG:async function(e){return(await bR(this,kw.SVG,e)).svg()},getState:function(e){return this._runtime.getState(e||{data:xR,signals:kR,recurse:!0})},setState:function(e){return this.runAsync(null,(t=>{t._trigger=!1,t._runtime.setState(e)}),(e=>{e._trigger=!0})),this}});const RR=/[[\]{}]/,OR={"*":1,arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1};let FR,PR;function BR(e,t,i){return FR=t||"view",PR=i||OR,WR(e.trim()).map(VR)}function zR(e,t,i,n,o){const r=e.length;let s,a=0;for(;t=0?--a:n&&n.indexOf(s)>=0&&++a}return t}function WR(e){const t=[],i=e.length;let n=0,o=0;for(;o"!==(e=e.slice(n+1).trim())[0])throw"Expected '>' after between selector: "+e;i=i.map(VR);const o=VR(e.slice(1).trim());return o.between?{between:i,stream:o}:(o.between=i,o)}(e):function(e){const t={source:FR},i=[];let n,o,r=[0,0],s=0,a=0,l=e.length,c=0;if("}"===e[l-1]){if(c=e.lastIndexOf("{"),!(c>=0))throw"Unmatched right brace: "+e;try{r=function(e){const t=e.split(",");if(!e.length||t.length>2)throw e;return t.map((t=>{const i=+t;if(i!=i)throw e;return i}))}(e.substring(c+1,l-1))}catch(t){throw"Invalid throttle specification: "+e}l=(e=e.slice(0,c).trim()).length,c=0}if(!l)throw e;if("@"===e[0]&&(s=++c),n=zR(e,c,":"),n1?(t.type=i[1],s?t.markname=i[0].slice(1):(u=i[0],PR[u]?t.marktype=i[0]:t.source=i[0])):t.type=i[0],"!"===t.type.slice(-1)&&(t.consume=!0,t.type=t.type.slice(0,-1)),null!=o&&(t.filter=o),r[0]&&(t.throttle=r[0]),r[1]&&(t.debounce=r[1]),t}(e)}function HR(e){return ci(e)?e:{type:e||"pad"}}const $R=e=>+e||0;function UR(e){return ci(e)?e.signal?e:{top:$R(e.top),bottom:$R(e.bottom),left:$R(e.left),right:$R(e.right)}:{top:t=$R(e),bottom:t,left:t,right:t};var t}const jR=e=>ci(e)&&!li(e)?$i({},e):{value:e};function qR(e,t,i,n){return null!=i?(ci(i)&&!li(i)||li(i)&&i.length&&ci(i[0])?e.update[t]=i:e[n||"enter"][t]={value:i},1):0}function KR(e,t,i){for(const i in t)qR(e,i,t[i]);for(const t in i)qR(e,t,i[t],"update")}function GR(e,t,i){for(const n in t)i&&Ki(i,n)||(e[n]=$i(e[n]||{},t[n]));return e}function YR(e,t){return t&&(t.enter&&t.enter[e]||t.update&&t.update[e])}const ZR="mark",XR="frame",QR="scope",JR="legend-label";function eO(e,t,i){e[t]=i&&i.signal?{signal:i.signal}:{value:i}}const tO=e=>rn(e)?gn(e):e.signal?"(".concat(e.signal,")"):rO(e);function iO(e){if(null!=e.gradient)return function(e){const t=[e.start,e.stop,e.count].map((e=>null==e?null:gn(e)));for(;t.length&&null==fi(t);)t.pop();return t.unshift(tO(e.gradient)),"gradient(".concat(t.join(","),")")}(e);let t=e.signal?"(".concat(e.signal,")"):e.color?function(e){return e.c?nO("hcl",e.h,e.c,e.l):e.h||e.s?nO("hsl",e.h,e.s,e.l):e.l||e.a?nO("lab",e.l,e.a,e.b):e.r||e.g||e.b?nO("rgb",e.r,e.g,e.b):null}(e.color):null!=e.field?rO(e.field):void 0!==e.value?gn(e.value):void 0;return null!=e.scale&&(t=function(e,t){const i=tO(e.scale);return null!=e.range?t="lerp(_range(".concat(i,"), ").concat(+e.range,")"):(void 0!==t&&(t="_scale(".concat(i,", ").concat(t,")")),e.band&&(t=(t?t+"+":"")+"_bandwidth(".concat(i,")")+(1==+e.band?"":"*"+oO(e.band)),e.extra&&(t="(datum.extra ? _scale(".concat(i,", datum.extra.value) : ").concat(t,")"))),null==t&&(t="0")),t}(e,t)),void 0===t&&(t=null),null!=e.exponent&&(t="pow(".concat(t,",").concat(oO(e.exponent),")")),null!=e.mult&&(t+="*".concat(oO(e.mult))),null!=e.offset&&(t+="+".concat(oO(e.offset))),e.round&&(t="round(".concat(t,")")),t}const nO=(e,t,i,n)=>"(".concat(e,"(").concat([t,i,n].map(iO).join(","),")+'')");function oO(e){return ci(e)?"("+iO(e)+")":e}function rO(e){return sO(ci(e)?e:{datum:e})}function sO(e){let t,i,n;if(e.signal)t="datum",n=e.signal;else if(e.group||e.parent){for(i=Math.max(1,e.level||1),t="item";i-- >0;)t+=".mark.group";e.parent?(n=e.parent,t+=".datum"):n=e.group}else e.datum?(t="datum",n=e.datum):qt("Invalid field reference: "+gn(e));return e.signal||(n=rn(n)?Kt(n).map(gn).join("]["):sO(n)),t+"["+n+"]"}function aO(e,t,i,n,o,r){const s={};(r=r||{}).encoders={$encode:s},e=function(e,t,i,n,o){const r={},s={};let a,l,c,u;for(l in l="lineBreak","text"!==t||null==o[l]||YR(l,e)||eO(r,l,o[l]),("legend"==i||String(i).startsWith("axis"))&&(i=null),u=i===XR?o.group:i===ZR?$i({},o.mark,o[t]):null,u)c=YR(l,e)||("fill"===l||"stroke"===l)&&(YR("fill",e)||YR("stroke",e)),c||eO(r,l,u[l]);for(l in Ti(n).forEach((t=>{const i=o.style&&o.style[t];for(const t in i)YR(t,e)||eO(r,t,i[t])})),e=$i({},e),r)u=r[l],u.signal?(a=a||{})[l]=u:s[l]=u;return e.enter=$i(s,e.enter),a&&(e.update=$i(a,e.update)),e}(e,t,i,n,o.config);for(const i in e)s[i]=lO(e[i],t,r,o);return r}function lO(e,t,i,n){const o={},r={};for(const t in e)null!=e[t]&&(o[t]=cO((s=e[t],li(s)?function(e){let t="";return e.forEach((e=>{const i=iO(e);t+=e.test?"(".concat(e.test,")?").concat(i,":"):i})),":"===fi(t)&&(t+="null"),t}(s):iO(s)),n,i,r));var s;return{$expr:{marktype:t,channels:o},$fields:Object.keys(r),$output:Object.keys(e)}}function cO(e,t,i,n){const o=IT(e,t);return o.$fields.forEach((e=>n[e]=1)),$i(i,o.$params),o.$expr}const uO=["value","update","init","react","bind"];function hO(e,t){qt(e+' for "outer" push: '+gn(t))}function dO(e,t){const i=e.name;if("outer"===e.push)t.signals[i]||hO("No prior signal definition",i),uO.forEach((t=>{void 0!==e[t]&&hO("Invalid property ",t)}));else{const n=t.addSignal(i,e.value);!1===e.react&&(n.react=!1),e.bind&&t.addBinding(i,e.bind)}}function gO(e,t,i,n){this.id=-1,this.type=e,this.value=t,this.params=i,n&&(this.parent=n)}function fO(e,t,i,n){return new gO(e,t,i,n)}function pO(e,t){return fO("operator",e,t)}function mO(e){const t={$ref:e.id};return e.id<0&&(e.refs=e.refs||[]).push(t),t}function _O(e,t){return t?{$field:e,$name:t}:{$field:e}}const vO=_O("key");function bO(e,t){return{$compare:e,$order:t}}function yO(e,t){return(e&&e.signal?"$"+e.signal:e||"")+(e&&t?"_":"")+(t&&t.signal?"$"+t.signal:t||"")}const wO="scope",CO="view";function SO(e){return e&&e.signal}function xO(e){if(SO(e))return!0;if(ci(e))for(const t in e)if(xO(e[t]))return!0;return!1}function kO(e,t){return null!=e?e:t}function DO(e){return e&&e.signal||e}const LO="timer";function NO(e,t){return(e.merge?EO:e.stream?AO:e.type?MO:qt("Invalid stream specification: "+gn(e)))(e,t)}function EO(e,t){const i=IO({merge:e.merge.map((e=>NO(e,t)))},e,t);return t.addStream(i).id}function AO(e,t){const i=IO({stream:NO(e.stream,t)},e,t);return t.addStream(i).id}function MO(e,t){let i;var n;e.type===LO?(i=t.event(LO,e.throttle),e={between:e.between,filter:e.filter}):i=t.event((n=e.source)===wO?CO:n||CO,e.type);const o=IO({stream:i},e,t);return 1===Object.keys(o).length?i:t.addStream(o).id}function IO(e,t,i){let n=t.between;return n&&(2!==n.length&&qt('Stream "between" parameter must have 2 entries: '+gn(t)),e.between=[NO(n[0],i),NO(n[1],i)]),n=t.filter?[].concat(t.filter):[],(t.marktype||t.markname||t.markrole)&&n.push(function(e,t,i){const n="event.item";return n+(e&&"*"!==e?"&&"+n+".mark.marktype==='"+e+"'":"")+(i?"&&"+n+".mark.role==='"+i+"'":"")+(t?"&&"+n+".mark.name==='"+t+"'":"")}(t.marktype,t.markname,t.markrole)),t.source===wO&&n.push("inScope(event.item)"),n.length&&(e.filter=IT("("+n.join(")&&(")+")",i).$expr),null!=(n=t.throttle)&&(e.throttle=+n),null!=(n=t.debounce)&&(e.debounce=+n),t.consume&&(e.consume=!0),e}const TO={code:"_.$value",ast:{type:"Identifier",value:"value"}};function RO(e){return{signal:"["+e.map((e=>e.scale?'scale("'+e.scale+'")':e.signal))+"]"}}const OO=e=>(t,i,n)=>fO(e,i,t||void 0,n),FO=OO("aggregate"),PO=OO("axisticks"),BO=OO("bound"),zO=OO("collect"),WO=OO("compare"),VO=OO("datajoin"),HO=OO("encode"),$O=OO("expression"),UO=OO("facet"),jO=OO("field"),qO=OO("key"),KO=OO("legendentries"),GO=OO("load"),YO=OO("mark"),ZO=OO("multiextent"),XO=OO("multivalues"),QO=OO("overlap"),JO=OO("params"),eF=OO("prefacet"),tF=OO("projection"),iF=OO("proxy"),nF=OO("relay"),oF=OO("render"),rF=OO("scale"),sF=OO("sieve"),aF=OO("sortitems"),lF=OO("viewlayout"),cF=OO("values");let uF=0;const hF={min:"min",max:"max",count:"sum"};function dF(e,t){const i=t.getScale(e.name).params;let n;for(n in i.domain=mF(e.domain,e,t),null!=e.range&&(i.range=xF(e,t,i)),null!=e.interpolate&&function(e,t){t.interpolate=gF(e.type||e),null!=e.gamma&&(t.interpolateGamma=gF(e.gamma))}(e.interpolate,i),null!=e.nice&&(i.nice=function(e){return ci(e)?{interval:gF(e.interval),step:gF(e.step)}:gF(e)}(e.nice)),null!=e.bins&&(i.bins=function(e,t){return e.signal||li(e)?fF(e,t):t.objectProperty(e)}(e.bins,t)),e)Ki(i,n)||"name"===n||(i[n]=gF(e[n],t))}function gF(e,t){return ci(e)?e.signal?t.signalRef(e.signal):qt("Unsupported object: "+gn(e)):e}function fF(e,t){return e.signal?t.signalRef(e.signal):e.map((e=>gF(e,t)))}function pF(e){qt("Can not find data set: "+gn(e))}function mF(e,t,i){if(e)return e.signal?i.signalRef(e.signal):(li(e)?_F:e.fields?bF:vF)(e,t,i);null==t.domainMin&&null==t.domainMax||qt("No scale domain defined for domainMin/domainMax to override.")}function _F(e,t,i){return e.map((e=>gF(e,i)))}function vF(e,t,i){const n=i.getData(e.data);return n||pF(e.data),Dm(t.type)?n.valuesRef(i,e.field,wF(e.sort,!1)):Am(t.type)?n.domainRef(i,e.field):n.extentRef(i,e.field)}function bF(e,t,i){const n=e.data,o=e.fields.reduce(((e,t)=>(t=rn(t)?{data:n,field:t}:li(t)||t.signal?function(e,t){const i="_:vega:_"+uF++,n=zO({});if(li(e))n.value={$ingest:e};else if(e.signal){const o="setdata("+gn(i)+","+e.signal+")";n.params.input=t.signalRef(o)}return t.addDataPipeline(i,[n,sF({})]),{data:i,field:"data"}}(t,i):t,e.push(t),e)),[]);return(Dm(t.type)?yF:Am(t.type)?CF:SF)(e,i,o)}function yF(e,t,i){const n=wF(e.sort,!0);let o,r;const s=i.map((e=>{const i=t.getData(e.data);return i||pF(e.data),i.countsRef(t,e.field,n)})),a={groupby:vO,pulse:s};n&&(o=n.op||"count",r=n.field?yO(o,n.field):"count",a.ops=[hF[o]],a.fields=[t.fieldRef(r)],a.as=[r]),o=t.add(FO(a));const l=t.add(zO({pulse:mO(o)}));return r=t.add(cF({field:vO,sort:t.sortRef(n),pulse:mO(l)})),mO(r)}function wF(e,t){return e&&(e.field||e.op?e.field||"count"===e.op?t&&e.field&&e.op&&!hF[e.op]&&qt("Multiple domain scales can not be sorted using "+e.op):qt("No field provided for sort aggregate op: "+e.op):ci(e)?e.field="key":e={field:"key"}),e}function CF(e,t,i){const n=i.map((e=>{const i=t.getData(e.data);return i||pF(e.data),i.domainRef(t,e.field)}));return mO(t.add(XO({values:n})))}function SF(e,t,i){const n=i.map((e=>{const i=t.getData(e.data);return i||pF(e.data),i.extentRef(t,e.field)}));return mO(t.add(ZO({extents:n})))}function xF(e,t,i){const n=t.config.range;let o=e.range;if(o.signal)return t.signalRef(o.signal);if(rn(o)){if(n&&Ki(n,o))return xF(e=$i({},e,{range:n[o]}),t,i);"width"===o?o=[0,{signal:"width"}]:"height"===o?o=Dm(e.type)?[0,{signal:"height"}]:[{signal:"height"},0]:qt("Unrecognized scale range value: "+gn(o))}else{if(o.scheme)return i.scheme=li(o.scheme)?fF(o.scheme,t):gF(o.scheme,t),o.extent&&(i.schemeExtent=fF(o.extent,t)),void(o.count&&(i.schemeCount=gF(o.count,t)));if(o.step)return void(i.rangeStep=gF(o.step,t));if(Dm(e.type)&&!li(o))return mF(o,e,t);li(o)||qt("Unsupported range type: "+gn(o))}return o.map((e=>(li(e)?fF:gF)(e,t)))}function kF(e,t,i){return li(e)?e.map((e=>kF(e,t,i))):ci(e)?e.signal?i.signalRef(e.signal):"fit"===t?e:qt("Unsupported parameter object: "+gn(e)):e}const DF="top",LF="left",NF="right",EF="bottom",AF="center",MF="index",IF="label",TF="perc",RF="value",OF="guide-label",FF="guide-title",PF="symbol",BF="gradient",zF="discrete",WF="size",VF=[WF,"shape","fill","stroke","strokeWidth","strokeDash","opacity"],HF={name:1,style:1,interactive:1},$F={value:0},UF={value:1},jF="group",qF="rect",KF="rule",GF="text";function YF(e){return e.type=jF,e.interactive=e.interactive||!1,e}function ZF(e,t){const i=(i,n)=>kO(e[i],kO(t[i],n));return i.isVertical=i=>"vertical"===kO(e.direction,t.direction||(i?t.symbolDirection:t.gradientDirection)),i.gradientLength=()=>kO(e.gradientLength,t.gradientLength||t.gradientWidth),i.gradientThickness=()=>kO(e.gradientThickness,t.gradientThickness||t.gradientHeight),i.entryColumns=()=>kO(e.columns,kO(t.columns,+i.isVertical(!0))),i}function XF(e,t){const i=t&&(t.update&&t.update[e]||t.enter&&t.enter[e]);return i&&i.signal?i:i?i.value:null}function QF(e,t,i){return"item.anchor === '".concat("start","' ? ").concat(e," : item.anchor === '").concat("end","' ? ").concat(t," : ").concat(i)}const JF=QF(gn(LF),gn(NF),gn(AF));function eP(e,t){return t?e?ci(e)?Object.assign({},e,{offset:eP(e.offset,t)}):{value:e,offset:t}:t:e}function tP(e,t){return t?(e.name=t.name,e.style=t.style||e.style,e.interactive=!!t.interactive,e.encode=GR(e.encode,t,HF)):e.interactive=!1,e}function iP(e,t,i,n){const o=ZF(e,i),r=o.isVertical(),s=o.gradientThickness(),a=o.gradientLength();let l,c,u,h,d;r?(c=[0,1],u=[0,0],h=s,d=a):(c=[0,0],u=[1,0],h=a,d=s);const g={enter:l={opacity:$F,x:$F,y:$F,width:jR(h),height:jR(d)},update:$i({},l,{opacity:UF,fill:{gradient:t,start:c,stop:u}}),exit:{opacity:$F}};return KR(g,{stroke:o("gradientStrokeColor"),strokeWidth:o("gradientStrokeWidth")},{opacity:o("gradientOpacity")}),tP({type:qF,role:"legend-gradient",encode:g},n)}function nP(e,t,i,n,o){const r=ZF(e,i),s=r.isVertical(),a=r.gradientThickness(),l=r.gradientLength();let c,u,h,d,g="";s?(c="y",h="y2",u="x",d="width",g="1-"):(c="x",h="x2",u="y",d="height");const f={opacity:$F,fill:{scale:t,field:RF}};f[c]={signal:g+"datum."+TF,mult:l},f[u]=$F,f[h]={signal:g+"datum.perc2",mult:l},f[d]=jR(a);const p={enter:f,update:$i({},f,{opacity:UF}),exit:{opacity:$F}};return KR(p,{stroke:r("gradientStrokeColor"),strokeWidth:r("gradientStrokeWidth")},{opacity:r("gradientOpacity")}),tP({type:qF,role:"legend-band",key:RF,from:o,encode:p},n)}const oP="datum.".concat(TF,'<=0?"').concat(LF,'":datum.').concat(TF,'>=1?"').concat(NF,'":"').concat(AF,'"'),rP="datum.".concat(TF,'<=0?"').concat(EF,'":datum.').concat(TF,'>=1?"').concat(DF,'":"').concat("middle",'"');function sP(e,t,i,n){const o=ZF(e,t),r=o.isVertical(),s=jR(o.gradientThickness()),a=o.gradientLength();let l,c,u,h,d=o("labelOverlap"),g="";const f={enter:l={opacity:$F},update:c={opacity:UF,text:{field:IF}},exit:{opacity:$F}};return KR(f,{fill:o("labelColor"),fillOpacity:o("labelOpacity"),font:o("labelFont"),fontSize:o("labelFontSize"),fontStyle:o("labelFontStyle"),fontWeight:o("labelFontWeight"),limit:kO(e.labelLimit,t.gradientLabelLimit)}),r?(l.align={value:"left"},l.baseline=c.baseline={signal:rP},u="y",h="x",g="1-"):(l.align=c.align={signal:oP},l.baseline={value:"top"},u="x",h="y"),l[u]=c[u]={signal:g+"datum."+TF,mult:a},l[h]=c[h]=s,s.offset=kO(e.labelOffset,t.gradientLabelOffset)||0,d=d?{separation:o("labelSeparation"),method:d,order:"datum.index"}:void 0,tP({type:GF,role:JR,style:OF,key:RF,from:n,encode:f,overlap:d},i)}function aP(e,t,i,n,o){const r=ZF(e,t),s=i.entries,a=!(!s||!s.interactive),l=s?s.name:void 0,c=r("clipHeight"),u=r("symbolOffset"),h={data:"value"},d="(".concat(o,") ? datum.").concat("offset"," : datum.").concat(WF),g=c?jR(c):{field:WF},f="datum.".concat(MF),p="max(1, ".concat(o,")");let m,_,v,b,y;g.mult=.5,m={enter:_={opacity:$F,x:{signal:d,mult:.5,offset:u},y:g},update:v={opacity:UF,x:_.x,y:_.y},exit:{opacity:$F}};let w=null,C=null;e.fill||(w=t.symbolBaseFillColor,C=t.symbolBaseStrokeColor),KR(m,{fill:r("symbolFillColor",w),shape:r("symbolType"),size:r("symbolSize"),stroke:r("symbolStrokeColor",C),strokeDash:r("symbolDash"),strokeDashOffset:r("symbolDashOffset"),strokeWidth:r("symbolStrokeWidth")},{opacity:r("symbolOpacity")}),VF.forEach((t=>{e[t]&&(v[t]=_[t]={scale:e[t],field:RF})}));const S=tP({type:"symbol",role:"legend-symbol",key:RF,from:h,clip:!!c||void 0,encode:m},i.symbols),x=jR(u);x.offset=r("labelOffset"),m={enter:_={opacity:$F,x:{signal:d,offset:x},y:g},update:v={opacity:UF,text:{field:IF},x:_.x,y:_.y},exit:{opacity:$F}},KR(m,{align:r("labelAlign"),baseline:r("labelBaseline"),fill:r("labelColor"),fillOpacity:r("labelOpacity"),font:r("labelFont"),fontSize:r("labelFontSize"),fontStyle:r("labelFontStyle"),fontWeight:r("labelFontWeight"),limit:r("labelLimit")});const k=tP({type:GF,role:JR,style:OF,key:RF,from:h,encode:m},i.labels);return m={enter:{noBound:{value:!c},width:$F,height:c?jR(c):$F,opacity:$F},exit:{opacity:$F},update:v={opacity:UF,row:{signal:null},column:{signal:null}}},r.isVertical(!0)?(b="ceil(item.mark.items.length / ".concat(p,")"),v.row.signal="".concat(f,"%").concat(b),v.column.signal="floor(".concat(f," / ").concat(b,")"),y={field:["row",f]}):(v.row.signal="floor(".concat(f," / ").concat(p,")"),v.column.signal="".concat(f," % ").concat(p),y={field:f}),v.column.signal="(".concat(o,")?").concat(v.column.signal,":").concat(f),YF({role:QR,from:n={facet:{data:n,name:"value",groupby:MF}},encode:GR(m,s,HF),marks:[S,k],name:l,interactive:a,sort:y})}const lP='item.orient === "left"',cP='item.orient === "right"',uP="(".concat(lP," || ").concat(cP,")"),hP="datum.vgrad && ".concat(uP),dP=QF('"top"','"bottom"','"middle"'),gP=QF('"right"','"left"','"center"'),fP="datum.vgrad && ".concat(cP," ? (").concat(gP,") : (").concat(uP," && !(datum.vgrad && ").concat(lP,')) ? "left" : ').concat(JF),pP="item._anchor || (".concat(uP,' ? "middle" : "start")'),mP="".concat(hP," ? (").concat(lP," ? -90 : 90) : 0"),_P="".concat(uP," ? (datum.vgrad ? (").concat(cP,' ? "bottom" : "top") : ').concat(dP,') : "top"');function vP(e,t){let i;return ci(e)&&(e.signal?i=e.signal:e.path?i="pathShape("+bP(e.path)+")":e.sphere&&(i="geoShape("+bP(e.sphere)+', {type: "Sphere"})')),i?t.signalRef(i):!!e}function bP(e){return ci(e)&&e.signal?e.signal:gn(e)}function yP(e){const t=e.role||"";return t.indexOf("axis")&&t.indexOf("legend")&&t.indexOf("title")?e.type===jF?QR:t||ZR:t}function wP(e){return{marktype:e.type,name:e.name||void 0,role:e.role||yP(e),zindex:+e.zindex||void 0,aria:e.aria,description:e.description}}function CP(e,t){return e&&e.signal?t.signalRef(e.signal):!1!==e}function SP(e,t){const i=sc(e.type);i||qt("Unrecognized transform type: "+gn(e.type));const n=fO(i.type.toLowerCase(),null,xP(i,e,t));return e.signal&&t.addSignal(e.signal,t.proxy(n)),n.metadata=i.metadata||{},n}function xP(e,t,i){const n={},o=e.params.length;for(let r=0;rLP(e,t,i)))):LP(e,n,i)}(e,t,i):"projection"===n?i.projectionRef(t[e.name]):e.array&&!SO(o)?o.map((t=>DP(e,t,i))):DP(e,o,i):void(e.required&&qt("Missing required "+gn(t.type)+" parameter: "+gn(e.name)))}function DP(e,t,i){const n=e.type;if(SO(t))return MP(n)?qt("Expression references can not be signals."):IP(n)?i.fieldRef(t):TP(n)?i.compareRef(t):i.signalRef(t.signal);{const o=e.expr||IP(n);return o&&NP(t)?i.exprRef(t.expr,t.as):o&&EP(t)?_O(t.field,t.as):MP(n)?IT(t,i):AP(n)?mO(i.getData(t).values):IP(n)?_O(t):TP(n)?i.compareRef(t):t}}function LP(e,t,i){const n=e.params.length;let o;for(let i=0;ie&&e.expr,EP=e=>e&&e.field,AP=e=>"data"===e,MP=e=>"expr"===e,IP=e=>"field"===e,TP=e=>"compare"===e;function RP(e,t){return e.$ref?e:e.data&&e.data.$ref?e.data:mO(t.getData(e.data).output)}function OP(e,t,i,n,o){this.scope=e,this.input=t,this.output=i,this.values=n,this.aggregate=o,this.index={}}function FP(e){return rn(e)?e:null}function PP(e,t,i){const n=yO(i.op,i.field);let o;if(t.ops){for(let e=0,i=t.as.length;enull==e?"null":e)).join(",")+"),0)",t);l.update=c.$expr,l.params=c.$params}function WP(e,t){const i=yP(e),n=e.type===jF,o=e.from&&e.from.facet,r=e.overlap;let s,a,l,c,u,h,d,g=e.layout||i===QR||i===XR;const f=i===ZR||g||o,p=function(e,t,i){let n,o,r,s,a;return e?(n=e.facet)&&(t||qt("Only group marks can be faceted."),null!=n.field?s=a=RP(n,i):(e.data?a=mO(i.getData(e.data).aggregate):(r=SP($i({type:"aggregate",groupby:Ti(n.groupby)},n.aggregate),i),r.params.key=i.keyRef(n.groupby),r.params.pulse=RP(n,i),s=a=mO(i.add(r))),o=i.keyRef(n.groupby,!0))):s=mO(i.add(zO(null,[{}]))),s||(s=RP(e,i)),{key:o,pulse:s,parent:a}}(e.from,n,t);a=t.add(VO({key:p.key||(e.key?_O(e.key):void 0),pulse:p.pulse,clean:!n}));const m=mO(a);a=l=t.add(zO({pulse:m})),a=t.add(YO({markdef:wP(e),interactive:CP(e.interactive,t),clip:vP(e.clip,t),context:{$context:!0},groups:t.lookup(),parent:t.signals.parent?t.signalRef("parent"):null,index:t.markpath(),pulse:mO(a)}));const _=mO(a);a=c=t.add(HO(aO(e.encode,e.type,i,e.style,t,{mod:!1,pulse:_}))),a.params.parent=t.encode(),e.transform&&e.transform.forEach((e=>{const i=SP(e,t),n=i.metadata;(n.generates||n.changes)&&qt("Mark transforms should not generate new data."),n.nomod||(c.params.mod=!0),i.params.pulse=mO(a),t.add(a=i)})),e.sort&&(a=t.add(aF({sort:t.compareRef(e.sort),pulse:mO(a)})));const v=mO(a);(o||g)&&(g=t.add(lF({layout:t.objectProperty(e.layout),legends:t.legends,mark:_,pulse:v})),h=mO(g));const b=t.add(BO({mark:_,pulse:h||v}));d=mO(b),n&&(f&&(s=t.operators,s.pop(),g&&s.pop()),t.pushState(v,h||d,m),o?function(e,t,i){const n=e.from.facet,o=n.name,r=RP(n,t);let s;n.name||qt("Facet must have a name: "+gn(n)),n.data||qt("Facet must reference a data set: "+gn(n)),n.field?s=t.add(eF({field:t.fieldRef(n.field),pulse:r})):n.groupby?s=t.add(UO({key:t.keyRef(n.groupby),group:mO(t.proxy(i.parent)),pulse:r})):qt("Facet must specify groupby or field: "+gn(n));const a=t.fork(),l=a.add(zO()),c=a.add(sF({pulse:mO(l)}));a.addData(o,new OP(a,l,l,c)),a.addSignal("parent",null),s.params.subflow={$subflow:a.parse(e).toRuntime()}}(e,t,p):f?function(e,t,i){const n=t.add(eF({pulse:i.pulse})),o=t.fork();o.add(sF()),o.addSignal("parent",null),n.params.subflow={$subflow:o.parse(e).toRuntime()}}(e,t,p):t.parse(e),t.popState(),f&&(g&&s.push(g),s.push(b))),r&&(d=function(e,t,i){const n=e.method,o=e.bound,r=e.separation,s={separation:SO(r)?i.signalRef(r.signal):r,method:SO(n)?i.signalRef(n.signal):n,pulse:t};if(e.order&&(s.sort=i.compareRef({field:e.order})),o){const e=o.tolerance;s.boundTolerance=SO(e)?i.signalRef(e.signal):+e,s.boundScale=i.scaleRef(o.scale),s.boundOrient=o.orient}return mO(i.add(QO(s)))}(r,d,t));const y=t.add(oF({pulse:d})),w=t.add(sF({pulse:mO(y)},void 0,t.parent()));null!=e.name&&(u=e.name,t.addData(u,new OP(t,l,y,w)),e.on&&e.on.forEach((e=>{(e.insert||e.remove||e.toggle)&&qt("Marks only support modify triggers."),zP(e,t,u)})))}function VP(e,t,i){const n={enter:{},update:{}};return KR(n,{orient:e("orient"),offset:e("offset"),padding:e("padding"),titlePadding:e("titlePadding"),cornerRadius:e("cornerRadius"),fill:e("fillColor"),stroke:e("strokeColor"),strokeWidth:i.strokeWidth,strokeDash:i.strokeDash,x:e("legendX"),y:e("legendY"),format:t.format,formatType:t.formatType}),n}function HP(e,t,i){return t[e]?'scale("'.concat(t[e],'",datum)'):XF(e,i[0].encode)}OP.fromEntries=function(e,t){const i=t.length,n=t[i-1],o=t[i-2];let r=t[0],s=null,a=1;for(r&&"load"===r.type&&(r=t[1]),e.add(t[0]);ae===EF||e===DF,GP=(e,t,i)=>SO(e)?eB(e.signal,t,i):e===LF||e===DF?t:i,YP=(e,t,i)=>SO(e)?QP(e.signal,t,i):KP(e)?t:i,ZP=(e,t,i)=>SO(e)?JP(e.signal,t,i):KP(e)?i:t,XP=(e,t,i)=>SO(e)?tB(e.signal,t,i):e===DF?{value:t}:{value:i},QP=(e,t,i)=>iB("".concat(e," === '").concat(DF,"' || ").concat(e," === '").concat(EF,"'"),t,i),JP=(e,t,i)=>iB("".concat(e," !== '").concat(DF,"' && ").concat(e," !== '").concat(EF,"'"),t,i),eB=(e,t,i)=>oB("".concat(e," === '").concat(LF,"' || ").concat(e," === '").concat(DF,"'"),t,i),tB=(e,t,i)=>oB("".concat(e," === '").concat(DF,"'"),t,i),iB=(e,t,i)=>(t=null!=t?jR(t):t,i=null!=i?jR(i):i,nB(t)&&nB(i)?(t=t?t.signal||gn(t.value):null,i=i?i.signal||gn(i.value):null,{signal:"".concat(e," ? (").concat(t,") : (").concat(i,")")}):[$i({test:e},t)].concat(i||[])),nB=e=>null==e||1===Object.keys(e).length,oB=(e,t,i)=>({signal:"".concat(e," ? (").concat(sB(t),") : (").concat(sB(i),")")}),rB=(e,t,i,n,o)=>({signal:(null!=n?"".concat(e," === '").concat(LF,"' ? (").concat(sB(n),") : "):"")+(null!=i?"".concat(e," === '").concat(EF,"' ? (").concat(sB(i),") : "):"")+(null!=o?"".concat(e," === '").concat(NF,"' ? (").concat(sB(o),") : "):"")+(null!=t?"".concat(e," === '").concat(DF,"' ? (").concat(sB(t),") : "):"")+"(null)"}),sB=e=>SO(e)?e.signal:null==e?null:gn(e),aB=(e,t)=>{const i=e.signal;return i&&i.endsWith("(null)")?{signal:i.slice(0,-6)+t.signal}:e};function lB(e,t,i,n){let o;if(t&&Ki(t,e))return t[e];if(Ki(i,e))return i[e];if(e.startsWith("title")){switch(e){case"titleColor":o="fill";break;case"titleFont":case"titleFontSize":case"titleFontWeight":o=e[5].toLowerCase()+e.slice(6)}return n["guide-title"][o]}if(e.startsWith("label")){switch(e){case"labelColor":o="fill";break;case"labelFont":case"labelFontSize":o=e[5].toLowerCase()+e.slice(6)}return n["guide-label"][o]}return null}function cB(e){const t={};for(const i of e)if(i)for(const e in i)t[e]=1;return Object.keys(t)}function uB(e,t){return{scale:e.scale,range:t}}function hB(e,t,i,n,o){return{signal:'flush(range("'+e+'"), scale("'+e+'", datum.value), '+t+","+i+","+n+","+o+")"}}function dB(e,t,i,n,o,r){const s=ZF(e,t),a=e.orient,l=e.scale,c=GP(a,-1,1),u=DO(s("labelFlush")),h=DO(s("labelFlushOffset")),d=s("labelAlign"),g=s("labelBaseline");let f,p=0===u||!!u;const m=jR(o);m.mult=c,m.offset=jR(s("labelPadding")||0),m.offset.mult=c;const _={scale:l,field:RF,band:.5,offset:eP(r.offset,s("labelOffset"))},v=YP(a,p?hB(l,u,'"left"','"right"','"center"'):{value:"center"},((e,t,i)=>SO(e)?((e,t,i)=>oB("".concat(e," === '").concat(NF,"'"),t,i))(e.signal,t,i):e===NF?{value:t}:{value:i})(a,"left","right")),b=YP(a,XP(a,"bottom","top"),p?hB(l,u,'"top"','"bottom"','"middle"'):{value:"middle"}),y=hB(l,u,"-(".concat(h,")"),h,0);p=p&&h;const w={opacity:$F,x:YP(a,_,m),y:ZP(a,_,m)},C={enter:w,update:f={opacity:UF,text:{field:IF},x:w.x,y:w.y,align:v,baseline:b},exit:{opacity:$F,x:w.x,y:w.y}};KR(C,{dx:!d&&p?YP(a,y):null,dy:!g&&p?ZP(a,y):null}),KR(C,{angle:s("labelAngle"),fill:s("labelColor"),fillOpacity:s("labelOpacity"),font:s("labelFont"),fontSize:s("labelFontSize"),fontWeight:s("labelFontWeight"),fontStyle:s("labelFontStyle"),limit:s("labelLimit"),lineHeight:s("labelLineHeight")},{align:d,baseline:g});const S=s("labelBound");let x=s("labelOverlap");return x=x||S?{separation:s("labelSeparation"),method:x,order:"datum.index",bound:S?{scale:l,orient:a,tolerance:S}:null}:void 0,f.align!==v&&(f.align=aB(f.align,v)),f.baseline!==b&&(f.baseline=aB(f.baseline,b)),tP({type:GF,role:"axis-label",style:OF,key:RF,from:n,encode:C,overlap:x},i)}function gB(e,t){const i=function(e,t){var i,n,o,r=t.config,s=r.style,a=r.axis,l="band"===t.scaleType(e.scale)&&r.axisBand,c=e.orient;if(SO(c)){const e=cB([r.axisX,r.axisY]),t=cB([r.axisTop,r.axisBottom,r.axisLeft,r.axisRight]);for(o of(i={},e))i[o]=YP(c,lB(o,r.axisX,a,s),lB(o,r.axisY,a,s));for(o of(n={},t))n[o]=rB(c.signal,lB(o,r.axisTop,a,s),lB(o,r.axisBottom,a,s),lB(o,r.axisLeft,a,s),lB(o,r.axisRight,a,s))}else i=c===DF||c===EF?r.axisX:r.axisY,n=r["axis"+c[0].toUpperCase()+c.slice(1)];return i||n||l?$i({},a,i,n,l):a}(e,t),n=e.encode||{},o=n.axis||{},r=o.name||void 0,s=o.interactive,a=o.style,l=ZF(e,i),c=function(e){const t=e("tickBand");let i,n,o=e("tickOffset");return t?t.signal?(i={signal:"(".concat(t.signal,") === 'extent' ? 1 : 0.5")},n={signal:"(".concat(t.signal,") === 'extent'")},ci(o)||(o={signal:"(".concat(t.signal,") === 'extent' ? 0 : ").concat(o)})):"extent"===t?(i=1,n=!0,o=0):(i=.5,n=!1):(i=e("bandPosition"),n=e("tickExtra")),{extra:n,band:i,offset:o}}(l),u={scale:e.scale,ticks:!!l("ticks"),labels:!!l("labels"),grid:!!l("grid"),domain:!!l("domain"),title:null!=e.title},h=mO(t.add(zO({},[u]))),d=mO(t.add(PO({scale:t.scaleRef(e.scale),extra:t.property(c.extra),count:t.objectProperty(e.tickCount),values:t.objectProperty(e.values),minstep:t.property(e.tickMinStep),formatType:t.property(e.formatType),formatSpecifier:t.property(e.format)}))),g=[];let f;return u.grid&&g.push(function(e,t,i,n,o){const r=ZF(e,t),s=e.orient,a=e.gridScale,l=GP(s,1,-1),c=function(e,t){if(1===t);else if(ci(e)){let i=e=$i({},e);for(;null!=i.mult;){if(!ci(i.mult))return i.mult=SO(t)?{signal:"(".concat(i.mult,") * (").concat(t.signal,")")}:i.mult*t,e;i=i.mult=$i({},i.mult)}i.mult=t}else e=SO(t)?{signal:"(".concat(t.signal,") * (").concat(e||0,")")}:t*(e||0);return e}(e.offset,l);let u,h,d;const g={enter:u={opacity:$F},update:d={opacity:UF},exit:h={opacity:$F}};KR(g,{stroke:r("gridColor"),strokeCap:r("gridCap"),strokeDash:r("gridDash"),strokeDashOffset:r("gridDashOffset"),strokeOpacity:r("gridOpacity"),strokeWidth:r("gridWidth")});const f={scale:e.scale,field:RF,band:o.band,extra:o.extra,offset:o.offset,round:r("tickRound")},p=YP(s,{signal:"height"},{signal:"width"}),m=a?{scale:a,range:0,mult:l,offset:c}:{value:0,offset:c},_=a?{scale:a,range:1,mult:l,offset:c}:$i(p,{mult:l,offset:c});return u.x=d.x=YP(s,f,m),u.y=d.y=ZP(s,f,m),u.x2=d.x2=ZP(s,_),u.y2=d.y2=YP(s,_),h.x=YP(s,f),h.y=ZP(s,f),tP({type:KF,role:"axis-grid",key:RF,from:n,encode:g},i)}(e,i,n.grid,d,c)),u.ticks&&(f=l("tickSize"),g.push(function(e,t,i,n,o,r){const s=ZF(e,t),a=e.orient,l=GP(a,-1,1);let c,u,h;const d={enter:c={opacity:$F},update:h={opacity:UF},exit:u={opacity:$F}};KR(d,{stroke:s("tickColor"),strokeCap:s("tickCap"),strokeDash:s("tickDash"),strokeDashOffset:s("tickDashOffset"),strokeOpacity:s("tickOpacity"),strokeWidth:s("tickWidth")});const g=jR(o);g.mult=l;const f={scale:e.scale,field:RF,band:r.band,extra:r.extra,offset:r.offset,round:s("tickRound")};return h.y=c.y=YP(a,$F,f),h.y2=c.y2=YP(a,g),u.x=YP(a,f),h.x=c.x=ZP(a,$F,f),h.x2=c.x2=ZP(a,g),u.y=ZP(a,f),tP({type:KF,role:"axis-tick",key:RF,from:n,encode:d},i)}(e,i,n.ticks,d,f,c))),u.labels&&(f=u.ticks?f:0,g.push(dB(e,i,n.labels,d,f,c))),u.domain&&g.push(function(e,t,i,n){const o=ZF(e,t),r=e.orient;let s,a;const l={enter:s={opacity:$F},update:a={opacity:UF},exit:{opacity:$F}};KR(l,{stroke:o("domainColor"),strokeCap:o("domainCap"),strokeDash:o("domainDash"),strokeDashOffset:o("domainDashOffset"),strokeWidth:o("domainWidth"),strokeOpacity:o("domainOpacity")});const c=uB(e,0),u=uB(e,1);return s.x=a.x=YP(r,c,$F),s.x2=a.x2=YP(r,u),s.y=a.y=ZP(r,c,$F),s.y2=a.y2=ZP(r,u),tP({type:KF,role:"axis-domain",from:n,encode:l},i)}(e,i,n.domain,h)),u.title&&g.push(function(e,t,i,n){const o=ZF(e,t),r=e.orient,s=GP(r,-1,1);let a,l;const c={enter:a={opacity:$F,anchor:jR(o("titleAnchor",null)),align:{signal:JF}},update:l=$i({},a,{opacity:UF,text:jR(e.title)}),exit:{opacity:$F}},u={signal:'lerp(range("'.concat(e.scale,'"), ').concat(QF(0,1,.5),")")};return l.x=YP(r,u),l.y=ZP(r,u),a.angle=YP(r,$F,((e,t)=>SO(e)?{signal:"(".concat(e.signal,") * ").concat(90)}:{value:90*e})(s)),a.baseline=YP(r,XP(r,EF,DF),{value:EF}),l.angle=a.angle,l.baseline=a.baseline,KR(c,{fill:o("titleColor"),fillOpacity:o("titleOpacity"),font:o("titleFont"),fontSize:o("titleFontSize"),fontStyle:o("titleFontStyle"),fontWeight:o("titleFontWeight"),limit:o("titleLimit"),lineHeight:o("titleLineHeight")},{align:o("titleAlign"),angle:o("titleAngle"),baseline:o("titleBaseline")}),function(e,t,i,n){const o=(e,t)=>null!=e?(i.update[t]=aB(jR(e),i.update[t]),!1):!YR(t,n),r=o(e("titleX"),"x"),s=o(e("titleY"),"y");i.enter.auto=s===r?jR(s):YP(t,jR(s),jR(r))}(o,r,c,i),c.update.align=aB(c.update.align,a.align),c.update.angle=aB(c.update.angle,a.angle),c.update.baseline=aB(c.update.baseline,a.baseline),tP({type:GF,role:"axis-title",style:FF,from:n,encode:c},i)}(e,i,n.title,h)),WP(YF({role:"axis",from:h,encode:GR(fB(l,e),o,HF),marks:g,aria:l("aria"),description:l("description"),zindex:l("zindex"),name:r,interactive:s,style:a}),t)}function fB(e,t){const i={enter:{},update:{}};return KR(i,{orient:e("orient"),offset:e("offset")||0,position:kO(t.position,0),titlePadding:e("titlePadding"),minExtent:e("minExtent"),maxExtent:e("maxExtent"),range:{signal:'abs(span(range("'.concat(t.scale,'")))')},translate:e("translate"),format:t.format,formatType:t.formatType}),i}function pB(e,t,i){const n=Ti(e.signals),o=Ti(e.scales);return i||n.forEach((e=>dO(e,t))),Ti(e.projections).forEach((e=>function(e,t){const i=t.config.projection||{},n={};for(const i in e)"name"!==i&&(n[i]=kF(e[i],i,t));for(const e in i)null==n[e]&&(n[e]=kF(i[e],e,t));t.addProjection(e.name,n)}(e,t))),o.forEach((e=>function(e,t){const i=e.type||"linear";Sm(i)||qt("Unrecognized scale type: "+gn(i)),t.addScale(e.name,{type:i,domain:void 0})}(e,t))),Ti(e.data).forEach((e=>function(e,t){const i=[];e.transform&&e.transform.forEach((e=>{i.push(SP(e,t))})),e.on&&e.on.forEach((i=>{zP(i,t,e.name)})),t.addDataPipeline(e.name,function(e,t,i){const n=[];let o,r,s,a,l,c=null,u=!1,h=!1;for(e.values?SO(e.values)||xO(e.format)?(n.push(qP(t,e)),n.push(c=jP())):n.push(c=jP({$ingest:e.values,$format:e.format})):e.url?xO(e.url)||xO(e.format)?(n.push(qP(t,e)),n.push(c=jP())):n.push(c=jP({$request:e.url,$format:e.format})):e.source&&(c=o=Ti(e.source).map((e=>mO(t.getData(e).output))),n.push(null)),r=0,s=i.length;rdF(e,t))),(i||n).forEach((e=>function(e,t){const i=t.getSignal(e.name);let n=e.update;e.init&&(n?qt("Signals can not include both init and update expressions."):(n=e.init,i.initonly=!0)),n&&(n=IT(n,t),i.update=n.$expr,i.params=n.$params),e.on&&e.on.forEach((e=>function(e,t,i){const n=e.encode,o={target:i};let r=e.events,s=e.update,a=[];r||qt("Signal update missing events specification."),rn(r)&&(r=BR(r,t.isSubscope()?wO:CO)),r=Ti(r).filter((e=>e.signal||e.scale?(a.push(e),0):1)),a.length>1&&(a=[RO(a)]),r.length&&a.push(r.length>1?{merge:r}:r[0]),null!=n&&(s&&qt("Signal encode and update are mutually exclusive."),s="encode(item(),"+gn(n)+")"),o.update=rn(s)?IT(s,t):null!=s.expr?IT(s.expr,t):null!=s.value?s.value:null!=s.signal?{$expr:TO,$params:{$value:t.signalRef(s.signal)}}:qt("Invalid signal update specification."),e.force&&(o.options={force:!0}),a.forEach((e=>t.addUpdate($i(function(e,t){return{source:e.signal?t.signalRef(e.signal):e.scale?t.scaleRef(e.scale):NO(e,t)}}(e,t),o))))}(e,t,i.id)))}(e,t))),Ti(e.axes).forEach((e=>gB(e,t))),Ti(e.marks).forEach((e=>WP(e,t))),Ti(e.legends).forEach((e=>function(e,t){const i=t.config.legend,n=e.encode||{},o=ZF(e,i),r=n.legend||{},s=r.name||void 0,a=r.interactive,l=r.style,c={};let u,h,d,g=0;VF.forEach((t=>e[t]?(c[t]=e[t],g=g||e[t]):0)),g||qt("Missing valid scale for legend.");const f=function(e,t){let i=e.type||PF;return e.type||1!==function(e){return VF.reduce(((t,i)=>t+(e[i]?1:0)),0)}(e)||!e.fill&&!e.stroke||(i=km(t)?BF:Lm(t)?zF:PF),i!==BF?i:Lm(t)?zF:BF}(e,t.scaleType(g)),p={title:null!=e.title,scales:c,type:f,vgrad:"symbol"!==f&&o.isVertical()},m=mO(t.add(zO(null,[p]))),_=mO(t.add(KO(h={type:f,scale:t.scaleRef(g),count:t.objectProperty(o("tickCount")),limit:t.property(o("symbolLimit")),values:t.objectProperty(e.values),minstep:t.property(e.tickMinStep),formatType:t.property(e.formatType),formatSpecifier:t.property(e.format)})));return f===BF?(d=[iP(e,g,i,n.gradient),sP(e,i,n.labels,_)],h.count=h.count||t.signalRef("max(2,2*floor((".concat(DO(o.gradientLength()),")/100))"))):f===zF?d=[nP(e,g,i,n.gradient,_),sP(e,i,n.labels,_)]:(u=function(e,t){const i=ZF(e,t);return{align:i("gridAlign"),columns:i.entryColumns(),center:{row:!0,column:!1},padding:{row:i("rowPadding"),column:i("columnPadding")}}}(e,i),d=[aP(e,i,n,_,DO(u.columns))],h.size=function(e,t,i){const n=DO(HP("size",e,i)),o=DO(HP("strokeWidth",e,i)),r=DO(function(e,t,i){return XF("fontSize",e)||function(e,t,i){const n=t.config.style["guide-label"];return n&&n.fontSize}(0,t)}(i[1].encode,t));return IT("max(ceil(sqrt(".concat(n,")+").concat(o,"),").concat(r,")"),t)}(e,t,d[0].marks)),d=[YF({role:"legend-entry",from:m,encode:{enter:{x:{value:0},y:{value:0}}},marks:d,layout:u,interactive:a})],p.title&&d.push(function(e,t,i,n){const o=ZF(e,t),r={enter:{opacity:$F},update:{opacity:UF,x:{field:{group:"padding"}},y:{field:{group:"padding"}}},exit:{opacity:$F}};return KR(r,{orient:o("titleOrient"),_anchor:o("titleAnchor"),anchor:{signal:pP},angle:{signal:mP},align:{signal:fP},baseline:{signal:_P},text:e.title,fill:o("titleColor"),fillOpacity:o("titleOpacity"),font:o("titleFont"),fontSize:o("titleFontSize"),fontStyle:o("titleFontStyle"),fontWeight:o("titleFontWeight"),limit:o("titleLimit"),lineHeight:o("titleLineHeight")},{align:o("titleAlign"),baseline:o("titleBaseline")}),tP({type:GF,role:"legend-title",style:FF,from:n,encode:r},i)}(e,i,n.title,m)),WP(YF({role:"legend",from:m,encode:GR(VP(o,e,i),r,HF),marks:d,aria:o("aria"),description:o("description"),zindex:o("zindex"),name:s,interactive:a,style:l}),t)}(e,t))),e.title&&function(e,t){const i=ZF(e=rn(e)?{text:e}:e,t.config.title),n=e.encode||{},o=n.group||{},r=o.name||void 0,s=o.interactive,a=o.style,l=[],c=mO(t.add(zO(null,[{}])));l.push(function(e,t,i,n){const o={value:0},r={enter:{opacity:o},update:{opacity:{value:1}},exit:{opacity:o}};return KR(r,{text:e.text,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:t("dx"),dy:t("dy"),fill:t("color"),font:t("font"),fontSize:t("fontSize"),fontStyle:t("fontStyle"),fontWeight:t("fontWeight"),lineHeight:t("lineHeight")},{align:t("align"),angle:t("angle"),baseline:t("baseline")}),tP({type:GF,role:"title-text",style:"group-title",from:n,encode:r},i)}(e,i,function(e){const t=e.encode;return t&&t.title||$i({name:e.name,interactive:e.interactive,style:e.style},t)}(e),c)),e.subtitle&&l.push(function(e,t,i,n){const o={value:0},r={enter:{opacity:o},update:{opacity:{value:1}},exit:{opacity:o}};return KR(r,{text:e.subtitle,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:t("dx"),dy:t("dy"),fill:t("subtitleColor"),font:t("subtitleFont"),fontSize:t("subtitleFontSize"),fontStyle:t("subtitleFontStyle"),fontWeight:t("subtitleFontWeight"),lineHeight:t("subtitleLineHeight")},{align:t("align"),angle:t("angle"),baseline:t("baseline")}),tP({type:GF,role:"title-subtitle",style:"group-subtitle",from:n,encode:r},i)}(e,i,n.subtitle,c)),WP(YF({role:"title",from:c,encode:UP(i,o),marks:l,aria:i("aria"),description:i("description"),zindex:i("zindex"),name:r,interactive:s,style:a}),t)}(e.title,t),t.parseLambdas(),t}function mB(e,t){return t&&t.signal?{name:e,update:t.signal}:{name:e,value:t}}function _B(e,t){this.config=e||{},this.options=t||{},this.bindings=[],this.field={},this.signals={},this.lambdas={},this.scales={},this.events={},this.data={},this.streams=[],this.updates=[],this.operators=[],this.eventConfig=null,this.locale=null,this._id=0,this._subid=0,this._nextsub=[0],this._parent=[],this._encode=[],this._lookup=[],this._markpath=[]}function vB(e){this.config=e.config,this.options=e.options,this.legends=e.legends,this.field=Object.create(e.field),this.signals=Object.create(e.signals),this.lambdas=Object.create(e.lambdas),this.scales=Object.create(e.scales),this.events=Object.create(e.events),this.data=Object.create(e.data),this.streams=[],this.updates=[],this.operators=[],this._id=0,this._subid=++e._nextsub[0],this._nextsub=e._nextsub,this._parent=e._parent.slice(),this._encode=e._encode.slice(),this._lookup=e._lookup.slice(),this._markpath=e._markpath}function bB(e){return(li(e)?yB:wB)(e)}function yB(e){const t=e.length;let i="[";for(let n=0;n0?",":"")+(ci(t)?t.signal||bB(t):gn(t))}return i+"]"}function wB(e){let t,i,n="{",o=0;for(t in e)i=e[t],n+=(++o>1?",":"")+gn(t)+":"+(ci(i)?i.signal||bB(i):gn(i));return n+"}"}function CB(e,t,i){return ci(e)||qt("Input Vega specification must be an object."),function(e,t){const i=t.config,n=mO(t.root=t.add(pO())),o=function(e,t){const i=i=>kO(e[i],t[i]),n=[mB("background",i("background")),mB("autosize",HR(i("autosize"))),mB("padding",UR(i("padding"))),mB("width",i("width")||0),mB("height",i("height")||0)],o=n.reduce(((e,t)=>(e[t.name]=t,e)),{}),r={};return Ti(e.signals).forEach((e=>{Ki(o,e.name)?e=$i(o[e.name],e):n.push(e),r[e.name]=e})),Ti(t.signals).forEach((e=>{Ki(r,e.name)||Ki(o,e.name)||n.push(e)})),n}(e,i);o.forEach((e=>dO(e,t))),t.description=e.description||i.description,t.eventConfig=i.events,t.legends=t.objectProperty(i.legend&&i.legend.layout),t.locale=i.locale;const r=t.add(zO()),s=t.add(HO(aO((e=>GR({enter:{x:{value:0},y:{value:0}},update:{width:{signal:"width"},height:{signal:"height"}}},e))(e.encode),jF,XR,e.style,t,{pulse:mO(r)}))),a=t.add(lF({layout:t.objectProperty(e.layout),legends:t.legends,autosize:t.signalRef("autosize"),mark:n,pulse:mO(s)}));t.operators.pop(),t.pushState(mO(s),mO(a),null),pB(e,t,o),t.operators.push(a);let l=t.add(BO({mark:n,pulse:mO(a)}));return l=t.add(oF({pulse:mO(l)})),l=t.add(sF({pulse:mO(l)})),t.addData("root",new OP(t,r,r,l)),t}(e,new _B(t=hi(function(){const e="sans-serif",t="#4c78a8",i="#000",n="#888",o="#ddd";return{description:"Vega visualization",padding:0,autosize:"pad",background:null,events:{defaults:{allow:["wheel"]}},group:null,mark:null,arc:{fill:t},area:{fill:t},image:null,line:{stroke:t,strokeWidth:2},path:{stroke:t},rect:{fill:t},rule:{stroke:i},shape:{stroke:t},symbol:{fill:t,size:64},text:{fill:i,font:e,fontSize:11},trail:{fill:t,size:2},style:{"guide-label":{fill:i,font:e,fontSize:10},"guide-title":{fill:i,font:e,fontSize:11,fontWeight:"bold"},"group-title":{fill:i,font:e,fontSize:13,fontWeight:"bold"},"group-subtitle":{fill:i,font:e,fontSize:12},point:{size:30,strokeWidth:2,shape:"circle"},circle:{size:30,strokeWidth:2},square:{size:30,strokeWidth:2,shape:"square"},cell:{fill:"transparent",stroke:o}},title:{orient:"top",anchor:"middle",offset:4,subtitlePadding:3},axis:{minExtent:0,maxExtent:200,bandPosition:.5,domain:!0,domainWidth:1,domainColor:n,grid:!1,gridWidth:1,gridColor:o,labels:!0,labelAngle:0,labelLimit:180,labelOffset:0,labelPadding:2,ticks:!0,tickColor:n,tickOffset:0,tickRound:!0,tickSize:5,tickWidth:1,titlePadding:4},axisBand:{tickOffset:-.5},projection:{type:"mercator"},legend:{orient:"right",padding:0,gridAlign:"each",columnPadding:10,rowPadding:2,symbolDirection:"vertical",gradientDirection:"vertical",gradientLength:200,gradientThickness:16,gradientStrokeColor:o,gradientStrokeWidth:0,gradientLabelOffset:2,labelAlign:"left",labelBaseline:"middle",labelLimit:160,labelOffset:4,labelOverlap:!0,symbolLimit:30,symbolType:"circle",symbolSize:100,symbolOffset:0,symbolStrokeWidth:1.5,symbolBaseFillColor:"transparent",symbolBaseStrokeColor:n,titleLimit:180,titleOrient:"top",titlePadding:5,layout:{offset:18,direction:"horizontal",left:{direction:"vertical"},right:{direction:"vertical"}}},range:{category:{scheme:"tableau10"},ordinal:{scheme:"blues"},heatmap:{scheme:"yellowgreenblue"},ramp:{scheme:"blues"},diverging:{scheme:"blueorange",extent:[1,0]},symbol:["circle","square","triangle-up","cross","diamond","triangle-right","triangle-down","triangle-left"]}}}(),t,e.config),i)).toRuntime()}_B.prototype=vB.prototype={parse(e){return pB(e,this)},fork(){return new vB(this)},isSubscope(){return this._subid>0},toRuntime(){return this.finish(),{description:this.description,operators:this.operators,streams:this.streams,updates:this.updates,bindings:this.bindings,eventConfig:this.eventConfig,locale:this.locale}},id(){return(this._subid?this._subid+":":0)+this._id++},add(e){return this.operators.push(e),e.id=this.id(),e.refs&&(e.refs.forEach((t=>{t.$ref=e.id})),e.refs=null),e},proxy(e){const t=e instanceof gO?mO(e):e;return this.add(iF({value:t}))},addStream(e){return this.streams.push(e),e.id=this.id(),e},addUpdate(e){return this.updates.push(e),e},finish(){let e,t;for(e in this.root&&(this.root.root=!0),this.signals)this.signals[e].signal=e;for(e in this.scales)this.scales[e].scale=e;function i(e,t,i){let n,o;e&&(n=e.data||(e.data={}),o=n[t]||(n[t]=[]),o.push(i))}for(e in this.data){t=this.data[e],i(t.input,e,"input"),i(t.output,e,"output"),i(t.values,e,"values");for(const n in t.index)i(t.index[n],e,"index:"+n)}return this},pushState(e,t,i){this._encode.push(mO(this.add(sF({pulse:e})))),this._parent.push(t),this._lookup.push(i?mO(this.proxy(i)):null),this._markpath.push(-1)},popState(){this._encode.pop(),this._parent.pop(),this._lookup.pop(),this._markpath.pop()},parent(){return fi(this._parent)},encode(){return fi(this._encode)},lookup(){return fi(this._lookup)},markpath(){const e=this._markpath;return++e[e.length-1]},fieldRef(e,t){if(rn(e))return _O(e,t);e.signal||qt("Unsupported field reference: "+gn(e));const i=e.signal;let n=this.field[i];if(!n){const e={name:this.signalRef(i)};t&&(e.as=t),this.field[i]=n=mO(this.add(jO(e)))}return n},compareRef(e){let t=!1;const i=e=>SO(e)?(t=!0,this.signalRef(e.signal)):function(e){return e&&e.expr}(e)?(t=!0,this.exprRef(e.expr)):e,n=Ti(e.field).map(i),o=Ti(e.order).map(i);return t?mO(this.add(WO({fields:n,orders:o}))):bO(n,o)},keyRef(e,t){let i=!1;const n=this.signals;return e=Ti(e).map((e=>SO(e)?(i=!0,mO(n[e.signal])):e)),i?mO(this.add(qO({fields:e,flat:t}))):function(e,t){const i={$key:e};return t&&(i.$flat=!0),i}(e,t)},sortRef(e){if(!e)return e;const t=yO(e.op,e.field),i=e.order||"ascending";return i.signal?mO(this.add(WO({fields:t,orders:this.signalRef(i.signal)}))):bO(t,i)},event(e,t){const i=e+":"+t;if(!this.events[i]){const n=this.id();this.streams.push({id:n,source:e,type:t}),this.events[i]=n}return this.events[i]},hasOwnSignal(e){return Ki(this.signals,e)},addSignal(e,t){this.hasOwnSignal(e)&&qt("Duplicate signal name: "+gn(e));const i=t instanceof gO?t:this.add(pO(t));return this.signals[e]=i},getSignal(e){return this.signals[e]||qt("Unrecognized signal name: "+gn(e)),this.signals[e]},signalRef(e){return this.signals[e]?mO(this.signals[e]):(Ki(this.lambdas,e)||(this.lambdas[e]=this.add(pO(null))),mO(this.lambdas[e]))},parseLambdas(){const e=Object.keys(this.lambdas);for(let t=0,i=e.length;t=48&&t<=57))return!1;i++}return!0}function MB(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function IB(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function TB(e){if(void 0===e)return!0;if(e)if(Array.isArray(e)){for(var t=0,i=e.length;t=u){if(i&&"add"===t.op&&d>l.length)throw new FB("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",r,t,e);if(!1===(s=zB[t.op].call(t,l,d,e)).test)throw new FB("Test operation failed","TEST_OPERATION_FAILED",r,t,e);return s}}else if(d&&-1!=d.indexOf("~")&&(d=IB(d)),c>=u){if(!1===(s=BB[t.op].call(t,l,d,e)).test)throw new FB("Test operation failed","TEST_OPERATION_FAILED",r,t,e);return s}l=l[d]}}function HB(e,t,i,n,o){if(void 0===n&&(n=!0),void 0===o&&(o=!0),i&&!Array.isArray(t))throw new FB("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");n||(e=EB(e));for(var r=new Array(t.length),s=0,a=t.length;s0)throw new FB('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,i);if(("move"===e.op||"copy"===e.op)&&"string"!=typeof e.from)throw new FB("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,i);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&void 0===e.value)throw new FB("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,i);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&TB(e.value))throw new FB("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,i);if(i)if("add"==e.op){var o=e.path.split("/").length,r=n.split("/").length;if(o!==r+1&&o!==r)throw new FB("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,i)}else if("replace"===e.op||"remove"===e.op||"_get"===e.op){if(e.path!==n)throw new FB("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,i)}else if("move"===e.op||"copy"===e.op){var s=jB([{op:"_get",path:e.from,value:void 0}],i);if(s&&"OPERATION_PATH_UNRESOLVABLE"===s.name)throw new FB("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,i)}}function jB(e,t,i){try{if(!Array.isArray(e))throw new FB("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)HB(EB(t),EB(e),i||!0);else{i=i||UB;for(var n=0;n0&&(e.patches=[],e.callback&&e.callback(n)),n}function JB(e,t,i,n,o){if(t!==e){"function"==typeof t.toJSON&&(t=t.toJSON());for(var r=NB(t),s=NB(e),a=!1,l=s.length-1;l>=0;l--){var c=e[h=s[l]];if(!LB(t,h)||void 0===t[h]&&void 0!==c&&!1===Array.isArray(t))Array.isArray(e)===Array.isArray(t)?(o&&i.push({op:"test",path:n+"/"+MB(h),value:EB(c)}),i.push({op:"remove",path:n+"/"+MB(h)}),a=!0):(o&&i.push({op:"test",path:n,value:e}),i.push({op:"replace",path:n,value:t}));else{var u=t[h];"object"==typeof c&&null!=c&&"object"==typeof u&&null!=u?JB(c,u,i,n+"/"+MB(h),o):c!==u&&(o&&i.push({op:"test",path:n+"/"+MB(h),value:EB(c)}),i.push({op:"replace",path:n+"/"+MB(h),value:EB(u)}))}}if(a||r.length!=s.length)for(l=0;lfz(e,t)))}:uz(e)?{or:e.or.map((e=>fz(e,t)))}:t(e)}const pz=az(),mz=rz();function _z(e,t){const i={};for(const n of t)Ki(e,n)&&(i[n]=e[n]);return i}function vz(e,t){const i={...e};for(const e of t)delete i[e];return i}Set.prototype.toJSON=function(){return`Set(${[...this].map((e=>cz()(e))).join(",")})`};const bz=cz();function yz(e){if(nn(e))return e;const t=rn(e)?e:cz()(e);if(t.length<250)return t;let i=0;for(let e=0;e0===t?e:`[${e}]`)),n=e.map(((t,i)=>e.slice(0,i+1).join("")));for(const e of n)t.add(e)}return t}function Iz(e,t){return void 0===e||void 0===t||Az(Mz(e),Mz(t))}function Tz(e){return 0===Rz(e).length}const Rz=Object.keys,Oz=Object.values,Fz=Object.entries;function Pz(e){return!0===e||!1===e}function Bz(e){const t=e.replace(/\W/g,"_");return(e.match(/^\d+/)?"_":"")+t}function zz(e,t){return dz(e)?`!(${zz(e.not,t)})`:hz(e)?`(${e.and.map((e=>zz(e,t))).join(") && (")})`:uz(e)?`(${e.or.map((e=>zz(e,t))).join(") || (")})`:t(e)}function Wz(e,t){if(0===t.length)return!0;const i=t.shift();return i in e&&Wz(e[i],t)&&delete e[i],Tz(e)}function Vz(e){return e.charAt(0).toUpperCase()+e.substr(1)}function Hz(e,t="datum"){const i=Kt(e),n=[];for(let e=1;e<=i.length;e++){const o=`[${i.slice(0,e).map(gn).join("][")}]`;n.push(`${t}${o}`)}return n.join(" && ")}function $z(e,t="datum"){return`${t}[${gn(Kt(e).join("."))}]`}function Uz(e){return e.replace(/(\[|\]|\.|'|")/g,"\\$1")}function jz(e){return`${Kt(e).map(Uz).join("\\.")}`}function qz(e,t,i){return e.replace(new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"g"),i)}function Kz(e){return`${Kt(e).join(".")}`}function Gz(e){return e?Kt(e).length:0}function Yz(...e){for(const t of e)if(void 0!==t)return t}let Zz=42;function Xz(e){const t=++Zz;return e?String(e)+t:t}function Qz(){Zz=42}function Jz(e){return eW(e)?e:`__${e}`}function eW(e){return e.startsWith("__")}function tW(e){if(void 0!==e)return(e%360+360)%360}function iW(e){return!!nn(e)||!isNaN(e)&&!isNaN(parseFloat(e))}const nW="row",oW="column",rW="facet",sW="x",aW="y",lW="x2",cW="y2",uW="radius",hW="radius2",dW="theta",gW="theta2",fW="latitude",pW="longitude",mW="latitude2",_W="longitude2",vW="color",bW="fill",yW="stroke",wW="shape",CW="size",SW="angle",xW="opacity",kW="fillOpacity",DW="strokeOpacity",LW="strokeWidth",NW="strokeDash",EW="text",AW="order",MW="detail",IW="key",TW="tooltip",RW="href",OW="url",FW="description",PW={theta:1,theta2:1,radius:1,radius2:1};function BW(e){return e in PW}const zW={longitude:1,longitude2:1,latitude:1,latitude2:1},WW=Rz(zW),VW={x:1,y:1,x2:1,y2:1,...PW,...zW,color:1,fill:1,stroke:1,opacity:1,fillOpacity:1,strokeOpacity:1,strokeWidth:1,strokeDash:1,size:1,angle:1,shape:1,order:1,text:1,detail:1,key:1,tooltip:1,href:1,url:1,description:1};function HW(e){return e===vW||e===bW||e===yW}const $W={row:1,column:1,facet:1},UW=Rz($W),jW={...VW,...$W},qW=Rz(jW),{order:KW,detail:GW,tooltip:YW,...ZW}=jW,{row:XW,column:QW,facet:JW,...eV}=ZW;function tV(e){return!!jW[e]}Rz(ZW),Rz(eV);const iV=[lW,cW,mW,_W,gW,hW];function nV(e){return oV(e)!==e}function oV(e){switch(e){case lW:return sW;case cW:return aW;case mW:return fW;case _W:return pW;case gW:return dW;case hW:return uW}return e}function rV(e){if(BW(e))switch(e){case dW:return"startAngle";case gW:return"endAngle";case uW:return"outerRadius";case hW:return"innerRadius"}return e}function sV(e){switch(e){case sW:return lW;case aW:return cW;case fW:return mW;case pW:return _W;case dW:return gW;case uW:return hW}}function aV(e){switch(e){case sW:case lW:return"width";case aW:case cW:return"height"}}Rz(VW);const{x:lV,y:cV,x2:uV,y2:hV,latitude:dV,longitude:gV,latitude2:fV,longitude2:pV,theta:mV,theta2:_V,radius:vV,radius2:bV,...yV}=VW,wV=Rz(yV),CV={x:1,y:1},SV=Rz(CV);function xV(e){return e in CV}const kV={theta:1,radius:1},DV=Rz(kV);function LV(e){return"width"===e?sW:aW}const{text:NV,tooltip:EV,href:AV,url:MV,description:IV,detail:TV,key:RV,order:OV,...FV}=yV,PV=Rz(FV),BV={...CV,...kV,...FV},zV=Rz(BV);function WV(e){return!!BV[e]}const VV={arc:"always",area:"always",bar:"always",circle:"always",geoshape:"always",image:"always",line:"always",rule:"always",point:"always",rect:"always",square:"always",trail:"always",text:"always",tick:"always"},{geoshape:HV,...$V}=VV;function UV(e){switch(e){case sW:case aW:case dW:case uW:case CW:case SW:case LW:case xW:case kW:case DW:case lW:case cW:case gW:case hW:return;case rW:case nW:case oW:case wW:case NW:case EW:case TW:case RW:case OW:case FW:return"discrete";case vW:case bW:case yW:return"flexible";case fW:case pW:case mW:case _W:case MW:case IW:case AW:return}}const jV={argmax:1,argmin:1,average:1,count:1,distinct:1,product:1,max:1,mean:1,median:1,min:1,missing:1,q1:1,q3:1,ci0:1,ci1:1,stderr:1,stdev:1,stdevp:1,sum:1,valid:1,values:1,variance:1,variancep:1},qV={count:1,min:1,max:1};function KV(e){return!!e&&!!e.argmin}function GV(e){return!!e&&!!e.argmax}function YV(e){return rn(e)&&!!jV[e]}Rz(jV);const ZV=["count","valid","missing","distinct"];function XV(e){return rn(e)&&Cz(ZV,e)}const QV=["count","sum","distinct","valid","missing"],JV=vn(["mean","average","median","q1","q3","min","max"]);function eH(e){return Ji(e)&&(e=Yj(e,void 0)),"bin"+Rz(e).map((t=>oH(e[t])?Bz(`_${t}_${Fz(e[t])}`):Bz(`_${t}_${e[t]}`))).join("")}function tH(e){return!0===e||nH(e)&&!e.binned}function iH(e){return"binned"===e||nH(e)&&!0===e.binned}function nH(e){return ci(e)}function oH(e){return e?.param}function rH(e){switch(e){case nW:case oW:case CW:case vW:case bW:case yW:case LW:case xW:case kW:case DW:case wW:return 6;case NW:return 4;default:return 10}}function sH(e){return e&&!!e.expr}function aH(e){const t=Rz(e||{}),i={};for(const n of t)i[n]=_H(e[n]);return i}function lH(e){const{anchor:t,frame:i,offset:n,orient:o,color:r,subtitleColor:s,subtitleFont:a,subtitleFontSize:l,subtitleFontStyle:c,subtitleFontWeight:u,subtitleLineHeight:h,subtitlePadding:d,...g}=e,f={...g,...r?{fill:r}:{}},p={...t?{anchor:t}:{},...i?{frame:i}:{},...n?{offset:n}:{},...o?{orient:o}:{}},m={...s?{subtitleColor:s}:{},...a?{subtitleFont:a}:{},...l?{subtitleFontSize:l}:{},...c?{subtitleFontStyle:c}:{},...u?{subtitleFontWeight:u}:{},...h?{subtitleLineHeight:h}:{},...d?{subtitlePadding:d}:{}};return{titleMarkConfig:f,subtitleMarkConfig:_z(f,["align","baseline","dx","dy","limit"]),nonMark:p,subtitle:m}}function cH(e){return rn(e)||li(e)&&rn(e[0])}function uH(e){return e&&!!e.signal}function hH(e){return!!e.step}function dH(e){return!li(e)&&"field"in e&&"data"in e}const gH=Rz({aria:1,description:1,ariaRole:1,ariaRoleDescription:1,blend:1,opacity:1,fill:1,fillOpacity:1,stroke:1,strokeCap:1,strokeWidth:1,strokeOpacity:1,strokeDash:1,strokeDashOffset:1,strokeJoin:1,strokeOffset:1,strokeMiterLimit:1,startAngle:1,endAngle:1,padAngle:1,innerRadius:1,outerRadius:1,size:1,shape:1,interpolate:1,tension:1,orient:1,align:1,baseline:1,text:1,dir:1,dx:1,dy:1,ellipsis:1,limit:1,radius:1,theta:1,angle:1,font:1,fontSize:1,fontWeight:1,fontStyle:1,lineBreak:1,lineHeight:1,cursor:1,href:1,tooltip:1,cornerRadius:1,cornerRadiusTopLeft:1,cornerRadiusTopRight:1,cornerRadiusBottomLeft:1,cornerRadiusBottomRight:1,aspect:1,width:1,height:1,url:1,smooth:1}),fH={arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1},pH=["cornerRadius","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomLeft","cornerRadiusBottomRight"];function mH(e){const t=li(e.condition)?e.condition.map(vH):vH(e.condition);return{..._H(e),condition:t}}function _H(e){if(sH(e)){const{expr:t,...i}=e;return{signal:t,...i}}return e}function vH(e){if(sH(e)){const{expr:t,...i}=e;return{signal:t,...i}}return e}function bH(e){if(sH(e)){const{expr:t,...i}=e;return{signal:t,...i}}return uH(e)?e:void 0!==e?{value:e}:void 0}function yH(e){return uH(e)?e.signal:gn(e.value)}function wH(e){return uH(e)?e.signal:null==e?null:gn(e)}function CH(e,t,i){for(const n of i){const i=kH(n,t.markDef,t.config);void 0!==i&&(e[n]=bH(i))}return e}function SH(e){return[].concat(e.type,e.style??[])}function xH(e,t,i,n={}){const{vgChannel:o,ignoreVgConfig:r}=n;return o&&void 0!==t[o]?t[o]:void 0!==t[e]?t[e]:!r||o&&o!==e?kH(e,t,i,n):void 0}function kH(e,t,i,{vgChannel:n}={}){return Yz(n?DH(e,t,i.style):void 0,DH(e,t,i.style),n?i[t.type][n]:void 0,i[t.type][e],n?i.mark[n]:i.mark[e])}function DH(e,t,i){return LH(e,SH(t),i)}function LH(e,t,i){let n;t=Ti(t);for(const o of t){const t=i[o];t&&void 0!==t[e]&&(n=t[e])}return n}function NH(e,t){return Ti(e).reduce(((e,i)=>(e.field.push(Oj(i,t)),e.order.push(i.sort??"ascending"),e)),{field:[],order:[]})}function EH(e,t){const i=[...e];return t.forEach((e=>{for(const t of i)if(pz(t,e))return;i.push(e)})),i}function AH(e,t){return pz(e,t)||!t?e:e?[...Ti(e),...Ti(t)].join(", "):t}function MH(e,t){const i=e.value,n=t.value;if(null==i||null===n)return{explicit:e.explicit,value:null};if((cH(i)||uH(i))&&(cH(n)||uH(n)))return{explicit:e.explicit,value:AH(i,n)};if(cH(i)||uH(i))return{explicit:e.explicit,value:i};if(cH(n)||uH(n))return{explicit:e.explicit,value:n};if(!(cH(i)||uH(i)||cH(n)||uH(n)))return{explicit:e.explicit,value:EH(i,n)};throw new Error("It should never reach here")}function IH(e){return`Invalid specification ${bz(e)}. Make sure the specification includes at least one of the following properties: "mark", "layer", "facet", "hconcat", "vconcat", "concat", or "repeat".`}function TH(e){return("width"==e?"Width":"Height")+' "container" only works for single views and layered views.'}function RH(e){return`${"width"==e?"Width":"Height"} "container" only works well with autosize "fit" or "fit-${"width"==e?"x":"y"}".`}function OH(e){return e?`Dropping "fit-${e}" because spec has discrete ${aV(e)}.`:'Dropping "fit" because spec has discrete size.'}function FH(e){return`Unknown field for ${e}. Cannot calculate view size.`}function PH(e){return`Cannot project a selection on encoding channel "${e}", which has no field.`}function BH(e,t){return`Cannot project a selection on encoding channel "${e}" as it uses an aggregate function ("${t}").`}function zH(e){return`Selection not supported for ${e} yet.`}function WH(e){return`The "columns" property cannot be used when "${e}" has nested row/column.`}function VH(e,t,i){return`An ancestor parsed field "${e}" as ${i} but a child wants to parse the field as ${t}.`}function HH(e){return`Config.customFormatTypes is not true, thus custom format type and format for channel ${e} are dropped.`}function $H(e){return`Invalid field type "${e}".`}function UH(e,t){const{fill:i,stroke:n}=t;return`Dropping color ${e} as the plot also has ${i&&n?"fill and stroke":i?"fill":"stroke"}.`}function jH(e,t){return`Dropping ${bz(e)} from channel "${t}" since it does not contain any data field, datum, value, or signal.`}function qH(e,t,i){return`${e} dropped as it is incompatible with "${t}"${i?` when ${i}`:""}.`}function KH(e){return`${e} encoding should be discrete (ordinal / nominal / binned).`}function GH(e){return`${e} encoding should be discrete (ordinal / nominal / binned) or use a discretizing scale (e.g. threshold).`}function YH(e,t){return`Using discrete channel "${e}" to encode "${t}" field can be misleading as it does not encode ${"ordinal"===t?"order":"magnitude"}.`}function ZH(e){return`Using unaggregated domain with raw field has no effect (${bz(e)}).`}function XH(e){return`Unaggregated domain not applicable for "${e}" since it produces values outside the origin domain of the source data.`}function QH(e){return`Unaggregated domain is currently unsupported for log scale (${bz(e)}).`}function JH(e,t,i){return`${i}-scale's "${t}" is dropped as it does not work with ${e} scale.`}function e$(e){return`The step for "${e}" is dropped because the ${"width"===e?"x":"y"} is continuous.`}const t$="Domains that should be unioned has conflicting sort properties. Sort will be set to true.";function i$(e,t){return`Invalid ${e}: ${bz(t)}.`}function n$(e){return`1D error band does not support ${e}.`}function o$(e){return`Channel ${e} is required for "binned" bin.`}const r$=ai(oi);let s$=r$;function a$(...e){s$.warn(...e)}function l$(e){if(e&&ci(e))for(const t of m$)if(t in e)return!0;return!1}new WeakMap;const c$=["january","february","march","april","may","june","july","august","september","october","november","december"],u$=c$.map((e=>e.substr(0,3))),h$=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],d$=h$.map((e=>e.substr(0,3)));function g$(e,t){const i=[];if(t&&void 0!==e.day&&Rz(e).length>1&&(a$(function(e){return`Dropping day from datetime ${bz(e)} as day cannot be combined with other units.`}(e)),delete(e=mz(e)).day),void 0!==e.year?i.push(e.year):i.push(2012),void 0!==e.month){const n=t?function(e){if(iW(e)&&(e=+e),nn(e))return e-1;{const t=e.toLowerCase(),i=c$.indexOf(t);if(-1!==i)return i;const n=t.substr(0,3),o=u$.indexOf(n);if(-1!==o)return o;throw new Error(i$("month",e))}}(e.month):e.month;i.push(n)}else if(void 0!==e.quarter){const n=t?function(e){if(iW(e)&&(e=+e),nn(e))return e>4&&a$(i$("quarter",e)),e-1;throw new Error(i$("quarter",e))}(e.quarter):e.quarter;i.push(nn(n)?3*n:`${n}*3`)}else i.push(0);if(void 0!==e.date)i.push(e.date);else if(void 0!==e.day){const n=t?function(e){if(iW(e)&&(e=+e),nn(e))return e%7;{const t=e.toLowerCase(),i=h$.indexOf(t);if(-1!==i)return i;const n=t.substr(0,3),o=d$.indexOf(n);if(-1!==o)return o;throw new Error(i$("day",e))}}(e.day):e.day;i.push(nn(n)?n+1:`${n}+1`)}else i.push(1);for(const t of["hours","minutes","seconds","milliseconds"]){const n=e[t];i.push(void 0===n?0:n)}return i}function f$(e){const t=g$(e,!0).join(", ");return e.utc?`utc(${t})`:`datetime(${t})`}const p$={year:1,quarter:1,month:1,week:1,day:1,dayofyear:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1},m$=Rz(p$);function _$(e){return e.startsWith("utc")}const v$={"year-month":"%b %Y ","year-month-date":"%b %d, %Y "};function b$(e){return m$.filter((t=>y$(e,t)))}function y$(e,t){const i=e.indexOf(t);return!(i<0||i>0&&"seconds"===t&&"i"===e.charAt(i-1)||e.length>i+3&&"day"===t&&"o"===e.charAt(i+3)||i>0&&"year"===t&&"f"===e.charAt(i-1))}function w$(e){if(!e)return;const t=b$(e);return`timeUnitSpecifier(${bz(t)}, ${bz(v$)})`}function C$(e){if(!e)return;let t;return rn(e)?t={unit:e}:ci(e)&&(t={...e,...e.unit?{unit:e.unit}:{}}),_$(t.unit)&&(t.utc=!0,t.unit=function(e){return e.substr(3)}(t.unit)),t}function S$(e){return e&&!!e.field&&void 0!==e.equal}function x$(e){return e&&!!e.field&&void 0!==e.lt}function k$(e){return e&&!!e.field&&void 0!==e.lte}function D$(e){return e&&!!e.field&&void 0!==e.gt}function L$(e){return e&&!!e.field&&void 0!==e.gte}function N$(e){if(e&&e.field){if(li(e.range)&&2===e.range.length)return!0;if(uH(e.range))return!0}return!1}function E$(e){return e&&!!e.field&&(li(e.oneOf)||li(e.in))}function A$(e){return E$(e)||S$(e)||N$(e)||x$(e)||D$(e)||k$(e)||L$(e)}function M$(e,t){return Qj(e,{timeUnit:t,wrapTime:!0})}function I$(e,t=!0){const{field:i}=e,n=C$(e.timeUnit)?.unit,o=n?`time(${function(e,t,{end:i}={end:!1}){const n=Hz(t),o=_$(e)?"utc":"";let r;const s={};for(const t of m$)y$(e,t)&&(s[t]="quarter"===(a=t)?`(${o}quarter(${n})-1)`:`${o}${a}(${n})`,r=t);var a;return i&&(s[r]+="+1"),function(e){const t=g$(e,!1).join(", ");return e.utc?`utc(${t})`:`datetime(${t})`}(s)}(n,i)})`:Oj(e,{expr:"datum"});if(S$(e))return`${o}===${M$(e.equal,n)}`;if(x$(e))return`${o}<${M$(e.lt,n)}`;if(D$(e))return`${o}>${M$(e.gt,n)}`;if(k$(e))return`${o}<=${M$(e.lte,n)}`;if(L$(e))return`${o}>=${M$(e.gte,n)}`;if(E$(e))return`indexof([${function(e,t){return e.map((e=>M$(e,t)))}(e.oneOf,n).join(",")}], ${o}) !== -1`;if(function(e){return e&&!!e.field&&void 0!==e.valid}(e))return T$(o,e.valid);if(N$(e)){const{range:i}=e,r=uH(i)?{signal:`${i.signal}[0]`}:i[0],s=uH(i)?{signal:`${i.signal}[1]`}:i[1];if(null!==r&&null!==s&&t)return"inrange("+o+", ["+M$(r,n)+", "+M$(s,n)+"])";const a=[];return null!==r&&a.push(`${o} >= ${M$(r,n)}`),null!==s&&a.push(`${o} <= ${M$(s,n)}`),a.length>0?a.join(" && "):"true"}throw new Error(`Invalid field predicate: ${bz(e)}`)}function T$(e,t=!0){return t?`isValid(${e}) && isFinite(+${e})`:`!isValid(${e}) || !isFinite(+${e})`}function R$(e){return A$(e)&&e.timeUnit?{...e,timeUnit:C$(e.timeUnit)?.unit}:e}const O$={quantitative:"quantitative",ordinal:"ordinal",temporal:"temporal",nominal:"nominal",geojson:"geojson"},F$=O$.quantitative,P$=O$.ordinal,B$=O$.temporal,z$=O$.nominal,W$=O$.geojson;Rz(O$);const V$="linear",H$="time",$$="utc",U$={linear:"numeric",log:"numeric",pow:"numeric",sqrt:"numeric",symlog:"numeric",identity:"numeric",sequential:"numeric",time:"time",utc:"time",ordinal:"ordinal","bin-ordinal":"bin-ordinal",point:"ordinal-position",band:"ordinal-position",quantile:"discretizing",quantize:"discretizing",threshold:"discretizing"};function j$(e,t){const i=U$[e],n=U$[t];return i===n||"ordinal-position"===i&&"time"===n||"ordinal-position"===n&&"time"===i}Rz(U$);const q$={linear:0,log:1,pow:1,sqrt:1,symlog:1,identity:1,sequential:1,time:0,utc:0,point:10,band:11,ordinal:0,"bin-ordinal":0,quantile:0,quantize:0,threshold:0};function K$(e){return q$[e]}const G$=["linear","log","pow","sqrt","symlog","time","utc"],Y$=vn(G$),Z$=vn(["linear","log","pow","sqrt","symlog"]),X$=vn(["quantile","quantize","threshold"]),Q$=vn(G$.concat(["quantile","quantize","threshold","sequential","identity"])),J$=vn(["ordinal","bin-ordinal","point","band"]);function eU(e){return e in J$}function tU(e){return e in Q$}function iU(e){return e in Y$}function nU(e){return e in X$}function oU(e){return e?.param}const rU={type:1,domain:1,domainMax:1,domainMin:1,domainMid:1,align:1,range:1,rangeMax:1,rangeMin:1,scheme:1,bins:1,reverse:1,round:1,clamp:1,nice:1,base:1,exponent:1,constant:1,interpolate:1,zero:1,padding:1,paddingInner:1,paddingOuter:1},{type:sU,domain:aU,range:lU,rangeMax:cU,rangeMin:uU,scheme:hU,...dU}=(Rz(rU),rU),gU=Rz(dU);function fU(e,t){switch(t){case"type":case"domain":case"reverse":case"range":return!0;case"scheme":case"interpolate":return!["point","band","identity"].includes(e);case"bins":return!["point","band","identity","ordinal"].includes(e);case"round":return iU(e)||"band"===e||"point"===e;case"padding":case"rangeMin":case"rangeMax":return iU(e)||["point","band"].includes(e);case"paddingOuter":case"align":return["point","band"].includes(e);case"paddingInner":return"band"===e;case"domainMax":case"domainMid":case"domainMin":case"clamp":return iU(e);case"nice":return iU(e)||"quantize"===e||"threshold"===e;case"exponent":return"pow"===e;case"base":return"log"===e;case"constant":return"symlog"===e;case"zero":return tU(e)&&!Cz(["log","time","utc","threshold","quantile"],e)}}function pU(e,t){switch(t){case"interpolate":case"scheme":case"domainMid":return HW(e)?void 0:`Cannot use the scale property "${e}" with non-color channel.`;case"align":case"type":case"bins":case"domain":case"domainMax":case"domainMin":case"range":case"base":case"exponent":case"constant":case"nice":case"padding":case"paddingInner":case"paddingOuter":case"rangeMax":case"rangeMin":case"reverse":case"round":case"clamp":case"zero":return}}const mU={arc:"arc",area:"area",bar:"bar",image:"image",line:"line",point:"point",rect:"rect",rule:"rule",text:"text",tick:"tick",trail:"trail",circle:"circle",square:"square",geoshape:"geoshape"},_U=mU.arc,vU=mU.area,bU=mU.bar,yU=mU.image,wU=mU.line,CU=mU.point,SU=mU.rect,xU=mU.rule,kU=mU.text,DU=mU.tick,LU=mU.trail,NU=mU.circle,EU=mU.square,AU=mU.geoshape;function MU(e){return["line","area","trail"].includes(e)}function IU(e){return["rect","bar","image","arc"].includes(e)}const TU=Rz(mU);function RU(e){return e.type}vn(TU);const OU=["stroke","strokeWidth","strokeDash","strokeDashOffset","strokeOpacity","strokeJoin","strokeMiterLimit","fill","fillOpacity"],FU=Rz({color:1,filled:1,invalid:1,order:1,radius2:1,theta2:1,timeUnitBandSize:1,timeUnitBandPosition:1}),PU=Rz({mark:1,arc:1,area:1,bar:1,circle:1,image:1,line:1,point:1,rect:1,rule:1,square:1,text:1,tick:1,trail:1,geoshape:1});function BU(e){return e&&null!=e.band}const zU={horizontal:["cornerRadiusTopRight","cornerRadiusBottomRight"],vertical:["cornerRadiusTopLeft","cornerRadiusTopRight"]};function WU(e){const{channel:t,channelDef:i,markDef:n,scale:o,config:r}=e,s=qU(e);return Cj(i)&&!XV(i.aggregate)&&o&&iU(o.get("type"))&&!1===o.get("zero")?VU({fieldDef:i,channel:t,markDef:n,ref:s,config:r}):s}function VU({fieldDef:e,channel:t,markDef:i,ref:n,config:o}){return MU(i.type)||null===xH("invalid",i,o)?n:[HU(e,t),n]}function HU(e,t){return{test:$U(e,!0),..."y"===oV(t)?{field:{group:"height"}}:{value:0}}}function $U(e,t=!0){return T$(rn(e)?e:Oj(e,{expr:"datum"}),!t)}function UU(e,t,i,n){const o={};if(t&&(o.scale=t),xj(e)){const{datum:t}=e;l$(t)?o.signal=f$(t):uH(t)?o.signal=t.signal:sH(t)?o.signal=t.expr:o.value=t}else o.field=Oj(e,i);if(n){const{offset:e,band:t}=n;e&&(o.offset=e),t&&(o.band=t)}return o}function jU({scaleName:e,fieldOrDatumDef:t,fieldOrDatumDef2:i,offset:n,startSuffix:o,bandPosition:r=.5}){const s=0Bz(`${"unit"===e?"":`_${e}_`}${i[e]}`))).join(""):(t?"utc":"")+"timeunit"+Rz(i).map((e=>Bz(`_${e}_${i[e]}`))).join("")}(l),o=(!["range","mid"].includes(t.binSuffix)&&t.binSuffix||"")+(t.suffix??""))}n&&(i=i?`${n}_${i}`:n)}return o&&(i=`${i}_${o}`),n&&(i=`${n}_${i}`),t.forAs?Kz(i):t.expr?$z(i,t.expr)+r:jz(i)+r}function Fj(e){switch(e.type){case"nominal":case"ordinal":case"geojson":return!0;case"quantitative":return Cj(e)&&!!e.bin;case"temporal":return!1}throw new Error($H(e.type))}const Pj=(e,t)=>{switch(t.fieldTitle){case"plain":return e.field;case"functional":return function(e){const{aggregate:t,bin:i,timeUnit:n,field:o}=e;if(GV(t))return`${o} for argmax(${t.argmax})`;if(KV(t))return`${o} for argmin(${t.argmin})`;const r=C$(n),s=t||r?.unit||r?.maxbins&&"timeunit"||tH(i)&&"bin";return s?`${s.toUpperCase()}(${o})`:o}(e);default:return function(e,t){const{field:i,bin:n,timeUnit:o,aggregate:r}=e;if("count"===r)return t.countTitle;if(tH(n))return`${i} (binned)`;if(o){const e=C$(o)?.unit;if(e)return`${i} (${b$(e).join("-")})`}else if(r)return GV(r)?`${i} for max ${r.argmax}`:KV(r)?`${i} for min ${r.argmin}`:`${Vz(r)} of ${i}`;return i}(e,t)}};let Bj=Pj;function zj(e){Bj=e}function Wj(e,t,{allowDisabling:i,includeDefault:n=!0}){const o=Vj(e)?.title;if(!Cj(e))return o;const r=e,s=n?Hj(r,t):void 0;return i?Yz(o,r.title,s):o??r.title??s}function Vj(e){return Mj(e)&&e.axis?e.axis:Ij(e)&&e.legend?e.legend:dj(e)&&e.header?e.header:void 0}function Hj(e,t){return Bj(e,t)}function $j(e){if(Tj(e)){const{format:t,formatType:i}=e;return{format:t,formatType:i}}{const t=Vj(e)??{},{format:i,formatType:n}=t;return{format:i,formatType:n}}}function Uj(e){return Cj(e)?e:yj(e)?e.condition:void 0}function jj(e){return Lj(e)?e:wj(e)?e.condition:void 0}function qj(e,t,i,n={}){return rn(e)||nn(e)||Ji(e)?(a$(function(e,t,i){return`Channel ${e} is a ${t}. Converted to {value: ${bz(i)}}.`}(t,rn(e)?"string":nn(e)?"number":"boolean",e)),{value:e}):Lj(e)?Kj(e,t,i,n):wj(e)?{...e,condition:Kj(e.condition,t,i,n)}:e}function Kj(e,t,i,n){if(Tj(e)){const{format:o,formatType:r,...s}=e;if(GU(r)&&!i.customFormatTypes)return a$(HH(t)),Kj(s,t,i,n)}else{const o=Mj(e)?"axis":Ij(e)?"legend":dj(e)?"header":null;if(o&&e[o]){const{format:r,formatType:s,...a}=e[o];if(GU(s)&&!i.customFormatTypes)return a$(HH(t)),Kj({...e,[o]:a},t,i,n)}}return Cj(e)?Gj(e,t,n):function(e){let t=e.type;if(t)return e;const{datum:i}=e;return t=nn(i)?"quantitative":rn(i)?"nominal":l$(i)?"temporal":void 0,{...e,type:t}}(e)}function Gj(e,t,{compositeMark:i=!1}={}){const{aggregate:n,timeUnit:o,bin:r,field:s}=e,a={...e};if(i||!n||YV(n)||GV(n)||KV(n)||(a$(function(e){return`Invalid aggregation operator "${e}".`}(n)),delete a.aggregate),o&&(a.timeUnit=C$(o)),s&&(a.field=`${s}`),tH(r)&&(a.bin=Yj(r,t)),iH(r)&&!xV(t)&&a$(function(e){return`Channel ${e} should not be used with "binned" bin.`}(t)),Nj(a)){const{type:e}=a,t=function(e){if(e)switch(e=e.toLowerCase()){case"q":case F$:return"quantitative";case"t":case B$:return"temporal";case"o":case P$:return"ordinal";case"n":case z$:return"nominal";case W$:return"geojson"}}(e);e!==t&&(a.type=t),"quantitative"!==e&&XV(n)&&(a$(function(e,t){return`Invalid field type "${e}" for aggregate: "${t}", using "quantitative" instead.`}(e,n)),a.type="quantitative")}else if(!nV(t)){const e=function(e,t){switch(t){case"latitude":case"longitude":return"quantitative";case"row":case"column":case"facet":case"shape":case"strokeDash":return"nominal";case"order":return"ordinal"}if(pj(e)&&li(e.sort))return"ordinal";const{aggregate:i,bin:n,timeUnit:o}=e;if(o)return"temporal";if(n||i&&!GV(i)&&!KV(i))return"quantitative";if(Aj(e)&&e.scale?.type)switch(U$[e.scale.type]){case"numeric":case"discretizing":return"quantitative";case"time":return"temporal"}return"nominal"}(a,t);a.type=e}if(Nj(a)){const{compatible:e,warning:i}=function(e,t){const i=e.type;if("geojson"===i&&"shape"!==t)return{compatible:!1,warning:`Channel ${t} should not be used with a geojson data.`};switch(t){case nW:case oW:case rW:return Fj(e)?Zj:{compatible:!1,warning:KH(t)};case sW:case aW:case vW:case bW:case yW:case EW:case MW:case IW:case TW:case RW:case OW:case SW:case dW:case uW:case FW:return Zj;case pW:case _W:case fW:case mW:return i!==F$?{compatible:!1,warning:`Channel ${t} should be used with a quantitative field only, not ${e.type} field.`}:Zj;case xW:case kW:case DW:case LW:case CW:case gW:case hW:case lW:case cW:return"nominal"!==i||e.sort?Zj:{compatible:!1,warning:`Channel ${t} should not be used with an unsorted discrete field.`};case wW:case NW:return Fj(e)||function(e){return Aj(e)&&nU(e.scale?.type)}(e)?Zj:{compatible:!1,warning:GH(t)};case AW:return"nominal"!==e.type||"sort"in e?Zj:{compatible:!1,warning:"Channel order is inappropriate for nominal field, which has no inherent order."}}}(a,t)||{};!1===e&&a$(i)}if(pj(a)&&rn(a.sort)){const{sort:e}=a;if(aj(e))return{...a,sort:{encoding:e}};const t=e.substr(1);if("-"===e.charAt(0)&&aj(t))return{...a,sort:{encoding:t,order:"descending"}}}if(dj(a)){const{header:e}=a;if(e){const{orient:t,...i}=e;if(t)return{...a,header:{...i,labelOrient:e.labelOrient||t,titleOrient:e.titleOrient||t}}}}return a}function Yj(e,t){return Ji(e)?{maxbins:rH(t)}:"binned"===e?{binned:!0}:e.maxbins||e.step?e:{...e,maxbins:rH(t)}}const Zj={compatible:!0};function Xj(e){const{formatType:t}=$j(e);return"time"===t||!t&&function(e){return e&&("temporal"===e.type||Cj(e)&&!!e.timeUnit)}(e)}function Qj(e,{timeUnit:t,type:i,wrapTime:n,undefinedIfExprNotRequired:o}){const r=t&&C$(t)?.unit;let s,a=r||"temporal"===i;return sH(e)?s=e.expr:uH(e)?s=e.signal:l$(e)?(a=!0,s=f$(e)):(rn(e)||nn(e))&&a&&(s=`datetime(${bz(e)})`,function(e){return!!p$[e]}(r)&&(nn(e)&&e<1e4||rn(e)&&isNaN(Date.parse(e)))&&(s=f$({[r]:e}))),s?n&&a?`time(${s})`:s:o?void 0:bz(e)}function Jj(e,t){const{type:i}=e;return t.map((t=>{const n=Qj(t,{timeUnit:Cj(e)?e.timeUnit:void 0,type:i,undefinedIfExprNotRequired:!0});return void 0!==n?{signal:n}:t}))}function eq(e,t){return tH(e.bin)?WV(t)&&["ordinal","nominal"].includes(e.type):(console.warn("Only call this method for binned field defs."),!1)}const tq={labelAlign:{part:"labels",vgProp:"align"},labelBaseline:{part:"labels",vgProp:"baseline"},labelColor:{part:"labels",vgProp:"fill"},labelFont:{part:"labels",vgProp:"font"},labelFontSize:{part:"labels",vgProp:"fontSize"},labelFontStyle:{part:"labels",vgProp:"fontStyle"},labelFontWeight:{part:"labels",vgProp:"fontWeight"},labelOpacity:{part:"labels",vgProp:"opacity"},labelOffset:null,labelPadding:null,gridColor:{part:"grid",vgProp:"stroke"},gridDash:{part:"grid",vgProp:"strokeDash"},gridDashOffset:{part:"grid",vgProp:"strokeDashOffset"},gridOpacity:{part:"grid",vgProp:"opacity"},gridWidth:{part:"grid",vgProp:"strokeWidth"},tickColor:{part:"ticks",vgProp:"stroke"},tickDash:{part:"ticks",vgProp:"strokeDash"},tickDashOffset:{part:"ticks",vgProp:"strokeDashOffset"},tickOpacity:{part:"ticks",vgProp:"opacity"},tickSize:null,tickWidth:{part:"ticks",vgProp:"strokeWidth"}};function iq(e){return e&&e.condition}const nq=["domain","grid","labels","ticks","title"],oq={grid:"grid",gridCap:"grid",gridColor:"grid",gridDash:"grid",gridDashOffset:"grid",gridOpacity:"grid",gridScale:"grid",gridWidth:"grid",orient:"main",bandPosition:"both",aria:"main",description:"main",domain:"main",domainCap:"main",domainColor:"main",domainDash:"main",domainDashOffset:"main",domainOpacity:"main",domainWidth:"main",format:"main",formatType:"main",labelAlign:"main",labelAngle:"main",labelBaseline:"main",labelBound:"main",labelColor:"main",labelFlush:"main",labelFlushOffset:"main",labelFont:"main",labelFontSize:"main",labelFontStyle:"main",labelFontWeight:"main",labelLimit:"main",labelLineHeight:"main",labelOffset:"main",labelOpacity:"main",labelOverlap:"main",labelPadding:"main",labels:"main",labelSeparation:"main",maxExtent:"main",minExtent:"main",offset:"both",position:"main",tickCap:"main",tickColor:"main",tickDash:"main",tickDashOffset:"main",tickMinStep:"both",tickOffset:"both",tickOpacity:"main",tickRound:"both",ticks:"main",tickSize:"main",tickWidth:"both",title:"main",titleAlign:"main",titleAnchor:"main",titleAngle:"main",titleBaseline:"main",titleColor:"main",titleFont:"main",titleFontSize:"main",titleFontStyle:"main",titleFontWeight:"main",titleLimit:"main",titleLineHeight:"main",titleOpacity:"main",titlePadding:"main",titleX:"main",titleY:"main",encode:"both",scale:"both",tickBand:"both",tickCount:"both",tickExtra:"both",translate:"both",values:"both",zindex:"both"},rq={orient:1,aria:1,bandPosition:1,description:1,domain:1,domainCap:1,domainColor:1,domainDash:1,domainDashOffset:1,domainOpacity:1,domainWidth:1,format:1,formatType:1,grid:1,gridCap:1,gridColor:1,gridDash:1,gridDashOffset:1,gridOpacity:1,gridWidth:1,labelAlign:1,labelAngle:1,labelBaseline:1,labelBound:1,labelColor:1,labelFlush:1,labelFlushOffset:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelLineHeight:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labels:1,labelSeparation:1,maxExtent:1,minExtent:1,offset:1,position:1,tickBand:1,tickCap:1,tickColor:1,tickCount:1,tickDash:1,tickDashOffset:1,tickExtra:1,tickMinStep:1,tickOffset:1,tickOpacity:1,tickRound:1,ticks:1,tickSize:1,tickWidth:1,title:1,titleAlign:1,titleAnchor:1,titleAngle:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titlePadding:1,titleX:1,titleY:1,translate:1,values:1,zindex:1},sq={...rq,style:1,labelExpr:1,encoding:1};function aq(e){return!!sq[e]}Rz(sq);const lq=Rz({axis:1,axisBand:1,axisBottom:1,axisDiscrete:1,axisLeft:1,axisPoint:1,axisQuantitative:1,axisRight:1,axisTemporal:1,axisTop:1,axisX:1,axisXBand:1,axisXDiscrete:1,axisXPoint:1,axisXQuantitative:1,axisXTemporal:1,axisY:1,axisYBand:1,axisYDiscrete:1,axisYPoint:1,axisYQuantitative:1,axisYTemporal:1});function cq(e){return"mark"in e}class uq{constructor(e,t){this.name=e,this.run=t}hasMatchingType(e){return!!cq(e)&&function(e){return RU(e)?e.type:e}(e.mark)===this.name}}function hq(e,t){const i=e&&e[t];return!!i&&(li(i)?Sz(i,(e=>!!e.field)):Cj(i)||yj(i))}function dq(e){return Sz(qW,(t=>{if(hq(e,t)){const i=e[t];if(li(i))return Sz(i,(e=>!!e.aggregate));{const e=Uj(i);return e&&!!e.aggregate}}return!1}))}function gq(e,t){const i=[],n=[],o=[],r=[],s={};return mq(e,((a,l)=>{if(Cj(a)){const{field:c,aggregate:u,bin:h,timeUnit:d,...g}=a;if(u||d||h){const e=Vj(a),f=e&&e.title;let p=Oj(a,{forAs:!0});const m={...f?[]:{title:Wj(a,t,{allowDisabling:!0})},...g,field:p};if(u){let e;if(GV(u)?(e="argmax",p=Oj({op:"argmax",field:u.argmax},{forAs:!0}),m.field=`${p}.${c}`):KV(u)?(e="argmin",p=Oj({op:"argmin",field:u.argmin},{forAs:!0}),m.field=`${p}.${c}`):"boxplot"!==u&&"errorbar"!==u&&"errorband"!==u&&(e=u),e){const t={op:e,as:p};c&&(t.field=c),r.push(t)}}else if(i.push(p),Nj(a)&&tH(h)){if(n.push({bin:h,field:c,as:p}),i.push(Oj(a,{binSuffix:"end"})),eq(a,l)&&i.push(Oj(a,{binSuffix:"range"})),xV(l)){const e={field:`${p}_end`};s[`${l}2`]=e}m.bin="binned",nV(l)||(m.type=F$)}else if(d){o.push({timeUnit:d,field:c,as:p});const e=Nj(a)&&a.type!==B$&&"time";e&&(l===EW||l===TW?m.formatType=e:function(e){return!!yV[e]}(l)?m.legend={formatType:e,...m.legend}:xV(l)&&(m.axis={formatType:e,...m.axis}))}s[l]=m}else i.push(c),s[l]=e[l]}else s[l]=e[l]})),{bins:n,timeUnits:o,aggregate:r,groupby:i,encoding:s}}function fq(e,t,i,n){return Rz(e).reduce(((o,r)=>{if(!tV(r))return a$(function(e){return`${e}-encoding is dropped as ${e} is not a valid encoding channel.`}(r)),o;const s=e[r];if("angle"!==r||"arc"!==t||e.theta||(a$("Arc marks uses theta channel rather than angle, replacing angle with theta."),r=dW),!function(e,t,i){const n=function(e,t){return function(e){switch(e){case vW:case bW:case yW:case FW:case MW:case IW:case TW:case RW:case AW:case xW:case kW:case DW:case LW:case rW:case nW:case oW:return VV;case sW:case aW:case fW:case pW:return $V;case lW:case cW:case mW:case _W:return{area:"always",bar:"always",image:"always",rect:"always",rule:"always",circle:"binned",point:"binned",square:"binned",tick:"binned",line:"binned",trail:"binned"};case CW:return{point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",text:"always",line:"always",trail:"always"};case NW:return{line:"always",point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",geoshape:"always"};case wW:return{point:"always",geoshape:"always"};case EW:return{text:"always"};case SW:return{point:"always",square:"always",text:"always"};case OW:return{image:"always"};case dW:case uW:return{text:"always",arc:"always"};case gW:case hW:return{arc:"always"}}}(e)[t]}(t,i);if(!n)return!1;if("binned"===n){const i=e[t===lW?sW:aW];return!!(Cj(i)&&Cj(e[t])&&iH(i.bin))}return!0}(e,r,t))return a$(qH(r,t)),o;if(r===CW&&"line"===t&&Uj(e[r])?.aggregate)return a$("Line marks cannot encode size with a non-groupby field. You may want to use trail marks instead."),o;if(r===vW&&(i?"fill"in e:"stroke"in e))return a$(UH("encoding",{fill:"fill"in e,stroke:"stroke"in e})),o;if(r===MW||r===AW&&!li(s)&&!Ej(s)||r===TW&&li(s))s&&(o[r]=Ti(s).reduce(((e,t)=>(Cj(t)?e.push(Gj(t,r)):a$(jH(t,r)),e)),[]));else{if(r===TW&&null===s)o[r]=null;else if(!(Cj(s)||xj(s)||Ej(s)||bj(s)||uH(s)))return a$(jH(s,r)),o;o[r]=qj(s,r,n)}return o}),{})}function pq(e,t){const i={};for(const n of Rz(e)){const o=qj(e[n],n,t,{compositeMark:!0});i[n]=o}return i}function mq(e,t,i){if(e)for(const n of Rz(e)){const o=e[n];if(li(o))for(const e of o)t.call(i,e,n);else t.call(i,o,n)}}function _q(e,t){return Rz(t).reduce(((i,n)=>{switch(n){case sW:case aW:case RW:case FW:case OW:case lW:case cW:case dW:case gW:case uW:case hW:case fW:case pW:case mW:case _W:case EW:case wW:case SW:case TW:return i;case AW:if("line"===e||"trail"===e)return i;case MW:case IW:{const e=t[n];if(li(e)||Cj(e))for(const t of Ti(e))t.aggregate||i.push(Oj(t,{}));return i}case CW:if("trail"===e)return i;case vW:case bW:case yW:case xW:case kW:case DW:case NW:case LW:{const e=Uj(t[n]);return e&&!e.aggregate&&i.push(Oj(e,{})),i}}}),[])}function vq(e,t,i,n=!0){return"tooltip"in i?{tooltip:i.tooltip}:{tooltip:[...e.map((({fieldPrefix:e,titlePrefix:i})=>{const o=n?` of ${bq(t)}`:"";return{field:e+t.field,type:t.type,title:uH(i)?{signal:`${i}"${escape(o)}"`}:i+o}})),...Lz(function(e){const t=[];for(const i of Rz(e))if(hq(e,i)){const n=Ti(e[i]);for(const e of n)Cj(e)?t.push(e):yj(e)&&t.push(e.condition)}return t}(i).map(Rj),yz)]}}function bq(e){const{title:t,field:i}=e;return Yz(t,i)}function yq(e,t,i,n,o){const{scale:r,axis:s}=i;return({partName:a,mark:l,positionPrefix:c,endPositionPrefix:u,extraEncoding:h={}})=>{const d=bq(i);return wq(e,a,o,{mark:l,encoding:{[t]:{field:`${c}_${i.field}`,type:i.type,...void 0!==d?{title:d}:{},...void 0!==r?{scale:r}:{},...void 0!==s?{axis:s}:{}},...rn(u)?{[`${t}2`]:{field:`${u}_${i.field}`}}:{},...n,...h}})}}function wq(e,t,i,n){const{clip:o,color:r,opacity:s}=e,a=e.type;return e[t]||void 0===e[t]&&i[t]?[{...n,mark:{...i[t],...o?{clip:o}:{},...r?{color:r}:{},...s?{opacity:s}:{},...RU(n.mark)?n.mark:{type:n.mark},style:`${a}-${t}`,...Ji(e[t])?{}:e[t]}}]:[]}function Cq(e,t,i){const{encoding:n}=e,o="vertical"===t?"y":"x",r=n[o],s=n[`${o}2`],a=n[`${o}Error`],l=n[`${o}Error2`];return{continuousAxisChannelDef:Sq(r,i),continuousAxisChannelDef2:Sq(s,i),continuousAxisChannelDefError:Sq(a,i),continuousAxisChannelDefError2:Sq(l,i),continuousAxis:o}}function Sq(e,t){if(e&&e.aggregate){const{aggregate:i,...n}=e;return i!==t&&a$(function(e,t){return`Continuous axis should not have customized aggregation function ${e}; ${t} already agregates the axis.`}(i,t)),n}return e}function xq(e,t){const{mark:i,encoding:n}=e,{x:o,y:r}=n;if(RU(i)&&i.orient)return i.orient;if(kj(o)){if(kj(r)){const e=Cj(o)&&o.aggregate,i=Cj(r)&&r.aggregate;if(e||i!==t){if(i||e!==t){if(e===t&&i===t)throw new Error("Both x and y cannot have aggregate");return Xj(r)&&!Xj(o)?"horizontal":"vertical"}return"horizontal"}return"vertical"}return"horizontal"}if(kj(r))return"vertical";throw new Error(`Need a valid continuous axis for ${t}s`)}const kq="boxplot",Dq=new uq(kq,Nq);function Lq(e){return nn(e)?"tukey":e}function Nq(e,{config:t}){e={...e,encoding:pq(e.encoding,t)};const{mark:i,encoding:n,params:o,projection:r,...s}=e,a=RU(i)?i:{type:i};o&&a$(zH("boxplot"));const l=a.extent??t.boxplot.extent,c=xH("size",a,t),u=Lq(l),{bins:h,timeUnits:d,transform:g,continuousAxisChannelDef:f,continuousAxis:p,groupby:m,aggregate:_,encodingWithoutContinuousAxis:v,ticksOrient:b,boxOrient:y,customTooltipWithoutAggregatedField:w}=function(e,t,i){const n=xq(e,kq),{continuousAxisChannelDef:o,continuousAxis:r}=Cq(e,n,kq),s=o.field,a=Lq(t),l=[...Eq(s),{op:"median",field:s,as:`mid_box_${s}`},{op:"min",field:s,as:("min-max"===a?"lower_whisker_":"min_")+s},{op:"max",field:s,as:("min-max"===a?"upper_whisker_":"max_")+s}],c="min-max"===a||"tukey"===a?[]:[{calculate:`datum["upper_box_${s}"] - datum["lower_box_${s}"]`,as:`iqr_${s}`},{calculate:`min(datum["upper_box_${s}"] + datum["iqr_${s}"] * ${t}, datum["max_${s}"])`,as:`upper_whisker_${s}`},{calculate:`max(datum["lower_box_${s}"] - datum["iqr_${s}"] * ${t}, datum["min_${s}"])`,as:`lower_whisker_${s}`}],{[r]:u,...h}=e.encoding,{customTooltipWithoutAggregatedField:d,filteredEncoding:g}=function(e){const{tooltip:t,...i}=e;if(!t)return{filteredEncoding:i};let n,o;if(li(t)){for(const e of t)e.aggregate?(n||(n=[]),n.push(e)):(o||(o=[]),o.push(e));n&&(i.tooltip=n)}else t.aggregate?i.tooltip=t:o=t;return li(o)&&1===o.length&&(o=o[0]),{customTooltipWithoutAggregatedField:o,filteredEncoding:i}}(h),{bins:f,timeUnits:p,aggregate:m,groupby:_,encoding:v}=gq(g,i),b="vertical"===n?"horizontal":"vertical",y=n;return{bins:f,timeUnits:p,transform:[...f,...p,{aggregate:[...m,...l],groupby:_},...c],groupby:_,aggregate:m,continuousAxisChannelDef:o,continuousAxis:r,encodingWithoutContinuousAxis:v,ticksOrient:b,boxOrient:y,customTooltipWithoutAggregatedField:d}}(e,l,t),{color:C,size:S,...x}=v,k=e=>yq(a,p,f,e,t.boxplot),D=k(x),L=k(v),N=k({...x,...S?{size:S}:{}}),E=vq([{fieldPrefix:"min-max"===u?"upper_whisker_":"max_",titlePrefix:"Max"},{fieldPrefix:"upper_box_",titlePrefix:"Q3"},{fieldPrefix:"mid_box_",titlePrefix:"Median"},{fieldPrefix:"lower_box_",titlePrefix:"Q1"},{fieldPrefix:"min-max"===u?"lower_whisker_":"min_",titlePrefix:"Min"}],f,v),A={type:"tick",color:"black",opacity:1,orient:b,invalid:null,aria:!1},M="min-max"===u?E:vq([{fieldPrefix:"upper_whisker_",titlePrefix:"Upper Whisker"},{fieldPrefix:"lower_whisker_",titlePrefix:"Lower Whisker"}],f,v),I=[...D({partName:"rule",mark:{type:"rule",invalid:null,aria:!1},positionPrefix:"lower_whisker",endPositionPrefix:"lower_box",extraEncoding:M}),...D({partName:"rule",mark:{type:"rule",invalid:null,aria:!1},positionPrefix:"upper_box",endPositionPrefix:"upper_whisker",extraEncoding:M}),...D({partName:"ticks",mark:A,positionPrefix:"lower_whisker",extraEncoding:M}),...D({partName:"ticks",mark:A,positionPrefix:"upper_whisker",extraEncoding:M})],T=[..."tukey"!==u?I:[],...L({partName:"box",mark:{type:"bar",...c?{size:c}:{},orient:y,invalid:null,ariaRoleDescription:"box"},positionPrefix:"lower_box",endPositionPrefix:"upper_box",extraEncoding:E}),...N({partName:"median",mark:{type:"tick",invalid:null,...ci(t.boxplot.median)&&t.boxplot.median.color?{color:t.boxplot.median.color}:{},...c?{size:c}:{},orient:b,aria:!1},positionPrefix:"mid_box",extraEncoding:E})];if("min-max"===u)return{...s,transform:(s.transform??[]).concat(g),layer:T};const R=`datum["lower_box_${f.field}"]`,O=`datum["upper_box_${f.field}"]`,F=`(${O} - ${R})`,P=`${R} - ${l} * ${F}`,B=`${O} + ${l} * ${F}`,z=`datum["${f.field}"]`,W={joinaggregate:Eq(f.field),groupby:m},V={transform:[{filter:`(${P} <= ${z}) && (${z} <= ${B})`},{aggregate:[{op:"min",field:f.field,as:`lower_whisker_${f.field}`},{op:"max",field:f.field,as:`upper_whisker_${f.field}`},{op:"min",field:`lower_box_${f.field}`,as:`lower_box_${f.field}`},{op:"max",field:`upper_box_${f.field}`,as:`upper_box_${f.field}`},..._],groupby:m}],layer:I},{tooltip:H,...$}=x,{scale:U,axis:j}=f,q=bq(f),K=vz(j,["title"]),G=wq(a,"outliers",t.boxplot,{transform:[{filter:`(${z} < ${P}) || (${z} > ${B})`}],mark:"point",encoding:{[p]:{field:f.field,type:f.type,...void 0!==q?{title:q}:{},...void 0!==U?{scale:U}:{},...Tz(K)?{}:{axis:K}},...$,...C?{color:C}:{},...w?{tooltip:w}:{}}})[0];let Y;const Z=[...h,...d,W];return G?Y={transform:Z,layer:[G,V]}:(Y=V,Y.transform.unshift(...Z)),{...s,layer:[Y,{transform:g,layer:T}]}}function Eq(e){return[{op:"q1",field:e,as:`lower_box_${e}`},{op:"q3",field:e,as:`upper_box_${e}`}]}const Aq="errorbar",Mq=new uq(Aq,Iq);function Iq(e,{config:t}){e={...e,encoding:pq(e.encoding,t)};const{transform:i,continuousAxisChannelDef:n,continuousAxis:o,encodingWithoutContinuousAxis:r,ticksOrient:s,markDef:a,outerSpec:l,tooltipEncoding:c}=Tq(e,Aq,t);delete r.size;const u=yq(a,o,n,r,t.errorbar),h=a.thickness,d=a.size,g={type:"tick",orient:s,aria:!1,...void 0!==h?{thickness:h}:{},...void 0!==d?{size:d}:{}},f=[...u({partName:"ticks",mark:g,positionPrefix:"lower",extraEncoding:c}),...u({partName:"ticks",mark:g,positionPrefix:"upper",extraEncoding:c}),...u({partName:"rule",mark:{type:"rule",ariaRoleDescription:"errorbar",...void 0!==h?{size:h}:{}},positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:c})];return{...l,transform:i,...f.length>1?{layer:f}:{...f[0]}}}function Tq(e,t,i){const{mark:n,encoding:o,params:r,projection:s,...a}=e,l=RU(n)?n:{type:n};r&&a$(zH(t));const{orient:c,inputType:u}=function(e,t){const{encoding:i}=e;if(function(e){return(Lj(e.x)||Lj(e.y))&&!Lj(e.x2)&&!Lj(e.y2)&&!Lj(e.xError)&&!Lj(e.xError2)&&!Lj(e.yError)&&!Lj(e.yError2)}(i))return{orient:xq(e,t),inputType:"raw"};const n=function(e){return Lj(e.x2)||Lj(e.y2)}(i),o=function(e){return Lj(e.xError)||Lj(e.xError2)||Lj(e.yError)||Lj(e.yError2)}(i),r=i.x,s=i.y;if(n){if(o)throw new Error(`${t} cannot be both type aggregated-upper-lower and aggregated-error`);const e=i.x2,n=i.y2;if(Lj(e)&&Lj(n))throw new Error(`${t} cannot have both x2 and y2`);if(Lj(e)){if(kj(r))return{orient:"horizontal",inputType:"aggregated-upper-lower"};throw new Error(`Both x and x2 have to be quantitative in ${t}`)}if(Lj(n)){if(kj(s))return{orient:"vertical",inputType:"aggregated-upper-lower"};throw new Error(`Both y and y2 have to be quantitative in ${t}`)}throw new Error("No ranged axis")}{const e=i.xError,n=i.xError2,o=i.yError,a=i.yError2;if(Lj(n)&&!Lj(e))throw new Error(`${t} cannot have xError2 without xError`);if(Lj(a)&&!Lj(o))throw new Error(`${t} cannot have yError2 without yError`);if(Lj(e)&&Lj(o))throw new Error(`${t} cannot have both xError and yError with both are quantiative`);if(Lj(e)){if(kj(r))return{orient:"horizontal",inputType:"aggregated-error"};throw new Error("All x, xError, and xError2 (if exist) have to be quantitative")}if(Lj(o)){if(kj(s))return{orient:"vertical",inputType:"aggregated-error"};throw new Error("All y, yError, and yError2 (if exist) have to be quantitative")}throw new Error("No ranged axis")}}(e,t),{continuousAxisChannelDef:h,continuousAxisChannelDef2:d,continuousAxisChannelDefError:g,continuousAxisChannelDefError2:f,continuousAxis:p}=Cq(e,c,t),{errorBarSpecificAggregate:m,postAggregateCalculates:_,tooltipSummary:v,tooltipTitleWithFieldName:b}=function(e,t,i,n,o,r,s,a){let l=[],c=[];const u=t.field;let h,d=!1;if("raw"===r){const t=e.center?e.center:e.extent?"iqr"===e.extent?"median":"mean":a.errorbar.center,i=e.extent?e.extent:"mean"===t?"stderr":"iqr";if("median"===t!=("iqr"===i)&&a$(function(e,t,i){return`${e} is not usually used with ${t} for ${i}.`}(t,i,s)),"stderr"===i||"stdev"===i)l=[{op:i,field:u,as:`extent_${u}`},{op:t,field:u,as:`center_${u}`}],c=[{calculate:`datum["center_${u}"] + datum["extent_${u}"]`,as:`upper_${u}`},{calculate:`datum["center_${u}"] - datum["extent_${u}"]`,as:`lower_${u}`}],h=[{fieldPrefix:"center_",titlePrefix:Vz(t)},{fieldPrefix:"upper_",titlePrefix:Rq(t,i,"+")},{fieldPrefix:"lower_",titlePrefix:Rq(t,i,"-")}],d=!0;else{let e,t,n;"ci"===i?(e="mean",t="ci0",n="ci1"):(e="median",t="q1",n="q3"),l=[{op:t,field:u,as:`lower_${u}`},{op:n,field:u,as:`upper_${u}`},{op:e,field:u,as:`center_${u}`}],h=[{fieldPrefix:"upper_",titlePrefix:Wj({field:u,aggregate:n,type:"quantitative"},a,{allowDisabling:!1})},{fieldPrefix:"lower_",titlePrefix:Wj({field:u,aggregate:t,type:"quantitative"},a,{allowDisabling:!1})},{fieldPrefix:"center_",titlePrefix:Wj({field:u,aggregate:e,type:"quantitative"},a,{allowDisabling:!1})}]}}else{(e.center||e.extent)&&a$(function(e,t){return`${t?"extent ":""}${t&&e?"and ":""}${e?"center ":""}${t&&e?"are ":"is "}not needed when data are aggregated.`}(e.center,e.extent)),"aggregated-upper-lower"===r?(h=[],c=[{calculate:`datum["${i.field}"]`,as:`upper_${u}`},{calculate:`datum["${u}"]`,as:`lower_${u}`}]):"aggregated-error"===r&&(h=[{fieldPrefix:"",titlePrefix:u}],c=[{calculate:`datum["${u}"] + datum["${n.field}"]`,as:`upper_${u}`}],o?c.push({calculate:`datum["${u}"] + datum["${o.field}"]`,as:`lower_${u}`}):c.push({calculate:`datum["${u}"] - datum["${n.field}"]`,as:`lower_${u}`}));for(const e of c)h.push({fieldPrefix:e.as.substring(0,6),titlePrefix:qz(qz(e.calculate,'datum["',""),'"]',"")})}return{postAggregateCalculates:c,errorBarSpecificAggregate:l,tooltipSummary:h,tooltipTitleWithFieldName:d}}(l,h,d,g,f,u,t,i),{[p]:y,["x"===p?"x2":"y2"]:w,["x"===p?"xError":"yError"]:C,["x"===p?"xError2":"yError2"]:S,...x}=o,{bins:k,timeUnits:D,aggregate:L,groupby:N,encoding:E}=gq(x,i),A=[...L,...m],M="raw"!==u?[]:N,I=vq(v,h,E,b);return{transform:[...a.transform??[],...k,...D,...0===A.length?[]:[{aggregate:A,groupby:M}],..._],groupby:M,continuousAxisChannelDef:h,continuousAxis:p,encodingWithoutContinuousAxis:E,ticksOrient:"vertical"===c?"horizontal":"vertical",markDef:l,outerSpec:a,tooltipEncoding:I}}function Rq(e,t,i){return`${Vz(e)} ${i} ${t}`}const Oq="errorband",Fq=new uq(Oq,Pq);function Pq(e,{config:t}){e={...e,encoding:pq(e.encoding,t)};const{transform:i,continuousAxisChannelDef:n,continuousAxis:o,encodingWithoutContinuousAxis:r,markDef:s,outerSpec:a,tooltipEncoding:l}=Tq(e,Oq,t),c=s,u=yq(c,o,n,r,t.errorband),h=void 0!==e.encoding.x&&void 0!==e.encoding.y;let d={type:h?"area":"rect"},g={type:h?"line":"rule"};const f={...c.interpolate?{interpolate:c.interpolate}:{},...c.tension&&c.interpolate?{tension:c.tension}:{}};return h?(d={...d,...f,ariaRoleDescription:"errorband"},g={...g,...f,aria:!1}):c.interpolate?a$(n$("interpolate")):c.tension&&a$(n$("tension")),{...a,transform:i,layer:[...u({partName:"band",mark:d,positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:l}),...u({partName:"borders",mark:g,positionPrefix:"lower",extraEncoding:l}),...u({partName:"borders",mark:g,positionPrefix:"upper",extraEncoding:l})]}}const Bq={};function zq(e,t,i){const n=new uq(e,t);Bq[e]={normalizer:n,parts:i}}zq(kq,Nq,["box","median","outliers","rule","ticks"]),zq(Aq,Iq,["ticks","rule"]),zq(Oq,Pq,["band","borders"]);const Wq=["gradientHorizontalMaxLength","gradientHorizontalMinLength","gradientVerticalMaxLength","gradientVerticalMinLength","unselectedOpacity"],Vq={titleAlign:"align",titleAnchor:"anchor",titleAngle:"angle",titleBaseline:"baseline",titleColor:"color",titleFont:"font",titleFontSize:"fontSize",titleFontStyle:"fontStyle",titleFontWeight:"fontWeight",titleLimit:"limit",titleLineHeight:"lineHeight",titleOrient:"orient",titlePadding:"offset"},Hq={labelAlign:"align",labelAnchor:"anchor",labelAngle:"angle",labelBaseline:"baseline",labelColor:"color",labelFont:"font",labelFontSize:"fontSize",labelFontStyle:"fontStyle",labelFontWeight:"fontWeight",labelLimit:"limit",labelLineHeight:"lineHeight",labelOrient:"orient",labelPadding:"offset"},$q=Rz(Vq),Uq=Rz(Hq),jq=Rz({header:1,headerRow:1,headerColumn:1,headerFacet:1}),qq=["size","shape","fill","stroke","strokeDash","strokeWidth","opacity"],Kq={aria:1,clipHeight:1,columnPadding:1,columns:1,cornerRadius:1,description:1,direction:1,fillColor:1,format:1,formatType:1,gradientLength:1,gradientOpacity:1,gradientStrokeColor:1,gradientStrokeWidth:1,gradientThickness:1,gridAlign:1,labelAlign:1,labelBaseline:1,labelColor:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labelSeparation:1,legendX:1,legendY:1,offset:1,orient:1,padding:1,rowPadding:1,strokeColor:1,symbolDash:1,symbolDashOffset:1,symbolFillColor:1,symbolLimit:1,symbolOffset:1,symbolOpacity:1,symbolSize:1,symbolStrokeColor:1,symbolStrokeWidth:1,symbolType:1,tickCount:1,tickMinStep:1,title:1,titleAlign:1,titleAnchor:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titleOrient:1,titlePadding:1,type:1,values:1,zindex:1},Gq=(Rz(Kq),"_vgsid_"),Yq={point:{on:"click",fields:[Gq],toggle:"event.shiftKey",resolve:"global",clear:"dblclick"},interval:{on:"[mousedown, window:mouseup] > window:mousemove!",encodings:["x","y"],translate:"[mousedown, window:mouseup] > window:mousemove!",zoom:"wheel!",mark:{fill:"#333",fillOpacity:.125,stroke:"white"},resolve:"global",clear:"dblclick"}};function Zq(e){return!(!e||"legend"!==e&&!e.legend)}function Xq(e){return Zq(e)&&ci(e)}function Qq(e){return!!e.select}function Jq(e){const t=[];for(const i of e||[]){if(Qq(i))continue;const{expr:e,bind:n,...o}=i;if(n&&e){const i={...o,bind:n,init:e};t.push(i)}else{const i={...o,...e?{update:e}:{},...n?{bind:n}:{}};t.push(i)}}return t}function eK(e){return"concat"in e}function tK(e){return"vconcat"in e}function iK(e){return"hconcat"in e}function nK(e){return ci(e)&&void 0!==e.step}function oK(e){return e.view||e.width||e.height}const rK=Rz({align:1,bounds:1,center:1,columns:1,spacing:1});function sK(e,t){return e[t]??e["width"===t?"continuousWidth":"continuousHeight"]}function aK(e,t){const i=lK(e,t);return nK(i)?i.step:cK}function lK(e,t){return Yz(e[t]??e["width"===t?"discreteWidth":"discreteHeight"],{step:e.step})}const cK=20,uK={background:"white",padding:5,timeFormat:"%b %d, %Y",countTitle:"Count of Records",view:{continuousWidth:200,continuousHeight:200,step:cK},mark:{color:"#4c78a8",invalid:"filter",timeUnitBandSize:1},arc:{},area:{},bar:{binSpacing:1,continuousBandSize:5,timeUnitBandPosition:.5},circle:{},geoshape:{},image:{},line:{},point:{},rect:{binSpacing:0,continuousBandSize:5,timeUnitBandPosition:.5},rule:{color:"black"},square:{},text:{color:"black"},tick:{thickness:1},trail:{},boxplot:{size:14,extent:1.5,box:{},median:{color:"white"},outliers:{},rule:{},ticks:null},errorbar:{center:"mean",rule:!0,ticks:!1},errorband:{band:{opacity:.3},borders:!1},scale:{pointPadding:.5,barBandPaddingInner:.1,rectBandPaddingInner:0,minBandSize:2,minFontSize:8,maxFontSize:40,minOpacity:.3,maxOpacity:.8,minSize:9,minStrokeWidth:1,maxStrokeWidth:4,quantileCount:4,quantizeCount:4},projection:{},legend:{gradientHorizontalMaxLength:200,gradientHorizontalMinLength:100,gradientVerticalMaxLength:200,gradientVerticalMinLength:64,unselectedOpacity:.35},header:{titlePadding:10,labelPadding:10},headerColumn:{},headerRow:{},headerFacet:{},selection:Yq,style:{},title:{},facet:{spacing:20},concat:{spacing:20}},hK=["#4c78a8","#f58518","#e45756","#72b7b2","#54a24b","#eeca3b","#b279a2","#ff9da6","#9d755d","#bab0ac"],dK={text:11,guideLabel:10,guideTitle:11,groupTitle:13,groupSubtitle:12},gK={blue:hK[0],orange:hK[1],red:hK[2],teal:hK[3],green:hK[4],yellow:hK[5],purple:hK[6],pink:hK[7],brown:hK[8],gray0:"#000",gray1:"#111",gray2:"#222",gray3:"#333",gray4:"#444",gray5:"#555",gray6:"#666",gray7:"#777",gray8:"#888",gray9:"#999",gray10:"#aaa",gray11:"#bbb",gray12:"#ccc",gray13:"#ddd",gray14:"#eee",gray15:"#fff"};function fK(e){const t=Rz(e||{}),i={};for(const n of t){const t=e[n];i[n]=iq(t)?mH(t):_H(t)}return i}const pK=[...PU,...lq,...jq,"background","padding","legend","lineBreak","scale","style","title","view"];function mK(e={}){const{color:t,font:i,fontSize:n,...o}=e,r=hi({},uK,i?function(e){return{text:{font:e},style:{"guide-label":{font:e},"guide-title":{font:e},"group-title":{font:e},"group-subtitle":{font:e}}}}(i):{},t?function(e={}){return{signals:[{name:"color",value:ci(e)?{...gK,...e}:gK}],mark:{color:{signal:"color.blue"}},rule:{color:{signal:"color.gray0"}},text:{color:{signal:"color.gray0"}},style:{"guide-label":{fill:{signal:"color.gray0"}},"guide-title":{fill:{signal:"color.gray0"}},"group-title":{fill:{signal:"color.gray0"}},"group-subtitle":{fill:{signal:"color.gray0"}},cell:{stroke:{signal:"color.gray8"}}},axis:{domainColor:{signal:"color.gray13"},gridColor:{signal:"color.gray8"},tickColor:{signal:"color.gray13"}},range:{category:[{signal:"color.blue"},{signal:"color.orange"},{signal:"color.red"},{signal:"color.teal"},{signal:"color.green"},{signal:"color.yellow"},{signal:"color.purple"},{signal:"color.pink"},{signal:"color.brown"},{signal:"color.grey8"}]}}}(t):{},n?function(e){return{signals:[{name:"fontSize",value:ci(e)?{...dK,...e}:dK}],text:{fontSize:{signal:"fontSize.text"}},style:{"guide-label":{fontSize:{signal:"fontSize.guideLabel"}},"guide-title":{fontSize:{signal:"fontSize.guideTitle"}},"group-title":{fontSize:{signal:"fontSize.groupTitle"}},"group-subtitle":{fontSize:{signal:"fontSize.groupSubtitle"}}}}}(n):{},o||{}),s=vz(r,pK);for(const e of["background","lineBreak","padding"])r[e]&&(s[e]=_H(r[e]));for(const e of PU)r[e]&&(s[e]=aH(r[e]));for(const e of lq)r[e]&&(s[e]=fK(r[e]));for(const e of jq)r[e]&&(s[e]=aH(r[e]));return r.legend&&(s.legend=aH(r.legend)),r.scale&&(s.scale=aH(r.scale)),r.style&&(s.style=function(e){const t=Rz(e),i={};for(const n of t)i[n]=fK(e[n]);return i}(r.style)),r.title&&(s.title=aH(r.title)),r.view&&(s.view=aH(r.view)),s}const _K=["view",...TU],vK=["color","fontSize","background","padding","facet","concat","numberFormat","timeFormat","countTitle","header","axisQuantitative","axisTemporal","axisDiscrete","axisPoint","axisXBand","axisXPoint","axisXDiscrete","axisXQuantitative","axisXTemporal","axisYBand","axisYPoint","axisYDiscrete","axisYQuantitative","axisYTemporal","scale","selection","overlay"],bK={view:["continuousWidth","continuousHeight","discreteWidth","discreteHeight","step"],area:["line","point"],bar:["binSpacing","continuousBandSize","discreteBandSize"],rect:["binSpacing","continuousBandSize","discreteBandSize"],line:["point"],tick:["bandSize","thickness"]};function yK(e,t,i,n){"view"===t&&(i="cell");const o={...n?e[t][n]:e[t],...e.style[i??t]};Tz(o)||(e.style[i??t]=o),n||delete e[t]}function wK(e){return"layer"in e}class CK{map(e,t){return gj(e)?this.mapFacet(e,t):function(e){return"repeat"in e}(e)?this.mapRepeat(e,t):iK(e)?this.mapHConcat(e,t):tK(e)?this.mapVConcat(e,t):eK(e)?this.mapConcat(e,t):this.mapLayerOrUnit(e,t)}mapLayerOrUnit(e,t){if(wK(e))return this.mapLayer(e,t);if(cq(e))return this.mapUnit(e,t);throw new Error(IH(e))}mapLayer(e,t){return{...e,layer:e.layer.map((e=>this.mapLayerOrUnit(e,t)))}}mapHConcat(e,t){return{...e,hconcat:e.hconcat.map((e=>this.map(e,t)))}}mapVConcat(e,t){return{...e,vconcat:e.vconcat.map((e=>this.map(e,t)))}}mapConcat(e,t){const{concat:i,...n}=e;return{...n,concat:i.map((e=>this.map(e,t)))}}mapFacet(e,t){return{...e,spec:this.map(e.spec,t)}}mapRepeat(e,t){return{...e,spec:this.map(e.spec,t)}}}const SK={zero:1,center:1,normalize:1},xK=new Set([_U,bU,vU,xU,CU,NU,EU,wU,kU,DU]),kK=new Set([bU,vU,_U]);function DK(e,t){const i="x"===t?"y":"radius",n=e[t],o=e[i];if(Cj(n)&&Cj(o))if("quantitative"===Sj(n)&&"quantitative"===Sj(o)){if(n.stack)return t;if(o.stack)return i;const e=Cj(n)&&!!n.aggregate;if(e!==(Cj(o)&&!!o.aggregate))return e?t:i;{const e=n.scale?.type,r=o.scale?.type;if(e&&"linear"!==e)return i;if(r&&"linear"!==r)return t}}else{if("quantitative"===Sj(n))return t;if("quantitative"===Sj(o))return i}else{if("quantitative"===Sj(n))return t;if("quantitative"===Sj(o))return i}}function LK(e,t,i={}){const n=RU(e)?e.type:e;if(!xK.has(n))return null;const o=DK(t,"x")||DK(t,"theta");if(!o)return null;const r=t[o],s=Cj(r)?Oj(r,{}):void 0;let a=function(e){switch(e){case"x":return"y";case"y":return"x";case"theta":return"radius";case"radius":return"theta"}}(o),l=t[a],c=Cj(l)?Oj(l,{}):void 0;c===s&&(c=void 0,l=void 0,a=void 0);const u=wV.reduce(((e,i)=>{if("tooltip"!==i&&hq(t,i)){const n=t[i];for(const t of Ti(n)){const n=Uj(t);if(n.aggregate)continue;const o=Oj(n,{});o&&o===c||e.push({channel:i,fieldDef:n})}}return e}),[]);let h;if(void 0!==r.stack?h=Ji(r.stack)?r.stack?"zero":null:r.stack:kK.has(n)&&(h="zero"),!h||!(h in SK))return null;var d;if(dq(t)&&0===u.length)return null;if(r?.scale?.type&&r?.scale?.type!==V$){if(i.disallowNonLinearStack)return null;a$(function(e){return`Cannot stack non-linear scale (${e}).`}(r.scale.type))}return Lj(t[sV(o)])?(void 0!==r.stack&&a$(`Cannot stack "${d=o}" if there is already "${d}2".`),null):(Cj(r)&&r.aggregate&&!Cz(QV,r.aggregate)&&a$(`Stacking is applied even though the aggregate function is non-summative ("${r.aggregate}").`),{groupbyChannel:l?a:void 0,groupbyField:c,fieldChannel:o,impute:null!==r.impute&&MU(n),stackBy:u,offset:h})}function NK(e){const{point:t,line:i,...n}=e;return Rz(n).length>1?n:n.type}function EK(e){for(const t of["line","area","rule","trail"])e[t]&&(e={...e,[t]:vz(e[t],["point","line"])});return e}function AK(e,t={},i){return"transparent"===e.point?{opacity:0}:e.point?ci(e.point)?e.point:{}:void 0!==e.point?null:t.point||i.shape?ci(t.point)?t.point:{}:void 0}function MK(e,t={}){return e.line?!0===e.line?{}:e.line:void 0!==e.line?null:t.line?!0===t.line?{}:t.line:void 0}class IK{constructor(){this.name="path-overlay"}hasMatchingType(e,t){if(cq(e)){const{mark:i,encoding:n}=e,o=RU(i)?i:{type:i};switch(o.type){case"line":case"rule":case"trail":return!!AK(o,t[o.type],n);case"area":return!!AK(o,t[o.type],n)||!!MK(o,t[o.type])}}return!1}run(e,t,i){const{config:n}=t,{params:o,projection:r,mark:s,encoding:a,...l}=e,c=pq(a,n),u=RU(s)?s:{type:s},h=AK(u,n[u.type],c),d="area"===u.type&&MK(u,n[u.type]),g=[{...o?{params:o}:{},mark:NK({..."area"===u.type&&void 0===u.opacity&&void 0===u.fillOpacity?{opacity:.7}:{},...u}),encoding:vz(c,["shape"])}],f=LK(u,c);let p=c;if(f){const{fieldChannel:e,offset:t}=f;p={...c,[e]:{...c[e],...t?{stack:t}:{}}}}return d&&g.push({...r?{projection:r}:{},mark:{type:"line",..._z(u,["clip","interpolate","tension","tooltip"]),...d},encoding:p}),h&&g.push({...r?{projection:r}:{},mark:{type:"point",opacity:1,filled:!0,..._z(u,["clip","tooltip"]),...h},encoding:p}),i({...l,layer:g},{...t,config:EK(n)})}}function TK(e,t){return t?hj(e)?zK(e,t):FK(e,t):e}function RK(e,t){return t?zK(e,t):e}function OK(e,t,i){const n=t[e];return function(e){return e&&!rn(e)&&"repeat"in e}(n)?n.repeat in i?{...t,[e]:i[n.repeat]}:void a$(function(e){return`Unknown repeated value "${e}".`}(n.repeat)):t}function FK(e,t){if(void 0!==(e=OK("field",e,t))){if(null===e)return null;if(pj(e)&&cj(e.sort)){const i=OK("field",e.sort,t);e={...e,...i?{sort:i}:{}}}return e}}function PK(e,t){if(Cj(e))return FK(e,t);{const i=OK("datum",e,t);return i===e||i.type||(i.type="nominal"),i}}function BK(e,t){if(!Lj(e)){if(wj(e)){const i=PK(e.condition,t);if(i)return{...e,condition:i};{const{condition:t,...i}=e;return i}}return e}{const i=PK(e,t);if(i)return i;if(bj(e))return{condition:e.condition}}}function zK(e,t){const i={};for(const n in e)if(Ki(e,n)){const o=e[n];if(li(o))i[n]=o.map((e=>BK(e,t))).filter((e=>e));else{const e=BK(o,t);void 0!==e&&(i[n]=e)}}return i}class WK{constructor(){this.name="RuleForRangedLine"}hasMatchingType(e){if(cq(e)){const{encoding:t,mark:i}=e;if("line"===i||RU(i)&&"line"===i.type)for(const e of iV){const i=t[oV(e)];if(t[e]&&(Cj(i)&&!iH(i.bin)||xj(i)))return!0}}return!1}run(e,t,i){const{encoding:n,mark:o}=e;var r,s;return a$((r=!!n.x2,s=!!n.y2,`Line mark is for continuous lines and thus cannot be used with ${r&&s?"x2 and y2":r?"x2":"y2"}. We will use the rule mark (line segments) instead.`)),console.log(o),i({...e,mark:ci(o)?{...o,type:"rule"}:"rule"},t)}}function VK({parentEncoding:e,encoding:t={},layer:i}){let n={};if(e){const o=new Set([...Rz(e),...Rz(t)]);for(const r of o){const o=t[r],s=e[r];if(Lj(o)){const e={...s,...o};n[r]=e}else wj(o)?n[r]={...o,condition:{...s,...o.condition}}:o||null===o?n[r]=o:(i||Ej(s)||uH(s)||Lj(s)||li(s))&&(n[r]=s)}}else n=t;return!n||Tz(n)?void 0:n}function HK(e){const{parentProjection:t,projection:i}=e;return t&&i&&a$(function(e){const{parentProjection:t,projection:i}=e;return`Layer's shared projection ${bz(t)} is overridden by a child projection ${bz(i)}.`}({parentProjection:t,projection:i})),i??t}function $K(e){return"filter"in e}function UK(e){return void 0!==e?.stop}function jK(e){return"lookup"in e}function qK(e){return"pivot"in e}function KK(e){return"density"in e}function GK(e){return"quantile"in e}function YK(e){return"regression"in e}function ZK(e){return"loess"in e}function XK(e){return"sample"in e}function QK(e){return"window"in e}function JK(e){return"joinaggregate"in e}function eG(e){return"flatten"in e}function tG(e){return"calculate"in e}function iG(e){return"bin"in e}function nG(e){return"impute"in e}function oG(e){return"timeUnit"in e}function rG(e){return"aggregate"in e}function sG(e){return"stack"in e}function aG(e){return"fold"in e}function lG(e,t){const{transform:i,...n}=e;return i?{...n,transform:i.map((e=>{if($K(e))return{filter:hG(e,t)};if(iG(e)&&nH(e.bin))return{...e,bin:uG(e.bin)};if(jK(e)){const{selection:t,...i}=e.from;return t?{...e,from:{param:t,...i}}:e}return e}))}:e}function cG(e,t){const i=mz(e);if(Cj(i)&&nH(i.bin)&&(i.bin=uG(i.bin)),Aj(i)&&i.scale?.domain?.selection){const{selection:e,...t}=i.scale.domain;i.scale.domain={...t,...e?{param:e}:{}}}if(bj(i))if(li(i.condition))i.condition=i.condition.map((e=>{const{selection:i,param:n,test:o,...r}=e;return n?e:{...r,test:hG(e,t)}}));else{const{selection:e,param:n,test:o,...r}=cG(i.condition,t);i.condition=n?i.condition:{...r,test:hG(i.condition,t)}}return i}function uG(e){const t=e.extent;if(t?.selection){const{selection:i,...n}=t;return{...e,extent:{...n,param:i}}}return e}function hG(e,t){const i=e=>fz(e,(e=>{var i;const n={param:e,empty:t.emptySelections[e]??!0};return(i=t.selectionPredicates)[e]??(i[e]=[]),t.selectionPredicates[e].push(n),n}));return e.selection?i(e.selection):fz(e.test||e.filter,(e=>e.selection?i(e.selection):e))}class dG extends CK{map(e,t){const i=t.selections??[];if(e.params&&!cq(e)){const t=[];for(const n of e.params)Qq(n)?i.push(n):t.push(n);e.params=t}return t.selections=i,super.map(e,gG(e,t))}mapUnit(e,t){const i=t.selections;if(!i||!i.length)return e;const n=(t.path??[]).concat(e.name),o=[];for(const t of i)if(t.views&&t.views.length)for(const i of t.views)(rn(i)&&(i===e.name||n.indexOf(i)>=0)||li(i)&&i.map((e=>n.indexOf(e))).every(((e,t,i)=>-1!==e&&(0===t||e>i[t-1]))))&&o.push(t);else o.push(t);return o.length&&(e.params=o),e}}for(const e of["mapFacet","mapRepeat","mapHConcat","mapVConcat","mapLayer"]){const t=dG.prototype[e];dG.prototype[e]=function(e,i){return t.call(this,e,gG(e,i))}}function gG(e,t){return e.name?{...t,path:(t.path??[]).concat(e.name)}:t}function fG(e,t){void 0===t&&(t=mK(e.config));const i=function(e,t={}){const i={config:t};return _G.map(pG.map(mG.map(e,i),i),i)}(e,t),{width:n,height:o}=e,r=function(e,t,i){let{width:n,height:o}=t;const r=cq(e)||wK(e),s={};r?"container"==n&&"container"==o?(s.type="fit",s.contains="padding"):"container"==n?(s.type="fit-x",s.contains="padding"):"container"==o&&(s.type="fit-y",s.contains="padding"):("container"==n&&(a$(TH("width")),n=void 0),"container"==o&&(a$(TH("height")),o=void 0));const a={type:"pad",...s,...i?vG(i.autosize):{},...vG(e.autosize)};if("fit"!==a.type||r||(a$('Autosize "fit" only works for single views and layered views.'),a.type="pad"),"container"==n&&"fit"!=a.type&&"fit-x"!=a.type&&a$(RH("width")),"container"==o&&"fit"!=a.type&&"fit-y"!=a.type&&a$(RH("height")),!pz(a,{type:"pad"}))return a}(i,{width:n,height:o,autosize:e.autosize},t);return{...i,...r?{autosize:r}:{}}}const pG=new class extends CK{constructor(){super(...arguments),this.nonFacetUnitNormalizers=[Dq,Mq,Fq,new IK,new WK]}map(e,t){if(cq(e)){const i=hq(e.encoding,nW),n=hq(e.encoding,oW),o=hq(e.encoding,rW);if(i||n||o)return this.mapFacetedUnit(e,t)}return super.map(e,t)}mapUnit(e,t){const{parentEncoding:i,parentProjection:n}=t,o=RK(e.encoding,t.repeater),r={...e,...o?{encoding:o}:{}};if(i||n)return this.mapUnitWithParentEncodingOrProjection(r,t);const s=this.mapLayerOrUnit.bind(this);for(const e of this.nonFacetUnitNormalizers)if(e.hasMatchingType(r,t.config))return e.run(r,t,s);return r}mapRepeat(e,t){return function(e){return!li(e.repeat)&&e.repeat.layer}(e)?this.mapLayerRepeat(e,t):this.mapNonLayerRepeat(e,t)}mapLayerRepeat(e,t){const{repeat:i,spec:n,...o}=e,{row:r,column:s,layer:a}=i,{repeater:l={},repeaterPrefix:c=""}=t;return r||s?this.mapRepeat({...e,repeat:{...r?{row:r}:{},...s?{column:s}:{}},spec:{repeat:{layer:a},spec:n}},t):{...o,layer:a.map((e=>{const i={...l,layer:e},o=`${(n.name||"")+c}child__layer_${Bz(e)}`,r=this.mapLayerOrUnit(n,{...t,repeater:i,repeaterPrefix:o});return r.name=o,r}))}}mapNonLayerRepeat(e,t){const{repeat:i,spec:n,data:o,...r}=e;!li(i)&&e.columns&&(e=vz(e,["columns"]),a$(WH("repeat")));const s=[],{repeater:a={},repeaterPrefix:l=""}=t,c=!li(i)&&i.row||[a?a.row:null],u=!li(i)&&i.column||[a?a.column:null],h=li(i)&&i||[a?a.repeat:null];for(const e of h)for(const o of c)for(const r of u){const c={repeat:e,row:o,column:r,layer:a.layer},u=(n.name||"")+l+"child__"+(li(i)?`${Bz(e)}`:(i.row?`row_${Bz(o)}`:"")+(i.column?`column_${Bz(r)}`:"")),h=this.map(n,{...t,repeater:c,repeaterPrefix:u});h.name=u,s.push(vz(h,["data"]))}const d=li(i)?e.columns:i.column?i.column.length:1;return{data:n.data??o,align:"all",...r,columns:d,concat:s}}mapFacet(e,t){const{facet:i}=e;return hj(i)&&e.columns&&(e=vz(e,["columns"]),a$(WH("facet"))),super.mapFacet(e,t)}mapUnitWithParentEncodingOrProjection(e,t){const{encoding:i,projection:n}=e,{parentEncoding:o,parentProjection:r,config:s}=t,a=HK({parentProjection:r,projection:n}),l=VK({parentEncoding:o,encoding:RK(i,t.repeater)});return this.mapUnit({...e,...a?{projection:a}:{},...l?{encoding:l}:{}},{config:s})}mapFacetedUnit(e,t){const{row:i,column:n,facet:o,...r}=e.encoding,{mark:s,width:a,projection:l,height:c,view:u,params:h,encoding:d,...g}=e,{facetMapping:f,layout:p}=this.getFacetMappingAndLayout({row:i,column:n,facet:o},t),m=RK(r,t.repeater);return this.mapFacet({...g,...p,facet:f,spec:{...a?{width:a}:{},...c?{height:c}:{},...u?{view:u}:{},...l?{projection:l}:{},mark:s,encoding:m,...h?{params:h}:{}}},t)}getFacetMappingAndLayout(e,t){const{row:i,column:n,facet:o}=e;if(i||n){o&&a$(`Facet encoding dropped as ${(r=[...i?[nW]:[],...n?[oW]:[]]).join(" and ")} ${r.length>1?"are":"is"} also specified.`);const t={},s={};for(const i of[nW,oW]){const n=e[i];if(n){const{align:e,center:o,spacing:r,columns:a,...l}=n;t[i]=l;for(const e of["align","center","spacing"])void 0!==n[e]&&(s[e]??(s[e]={}),s[e][i]=n[e])}}return{facetMapping:t,layout:s}}{const{align:e,center:i,spacing:n,columns:r,...s}=o;return{facetMapping:TK(s,t.repeater),layout:{...e?{align:e}:{},...i?{center:i}:{},...n?{spacing:n}:{},...r?{columns:r}:{}}}}var r}mapLayer(e,{parentEncoding:t,parentProjection:i,...n}){const{encoding:o,projection:r,...s}=e,a={...n,parentEncoding:VK({parentEncoding:t,encoding:o,layer:!0}),parentProjection:HK({parentProjection:i,projection:r})};return super.mapLayer(s,a)}},mG=new class extends CK{map(e,t){return t.emptySelections??(t.emptySelections={}),t.selectionPredicates??(t.selectionPredicates={}),e=lG(e,t),super.map(e,t)}mapLayerOrUnit(e,t){if((e=lG(e,t)).encoding){const i={};for(const[n,o]of Fz(e.encoding))i[n]=cG(o,t);e={...e,encoding:i}}return super.mapLayerOrUnit(e,t)}mapUnit(e,t){const{selection:i,...n}=e;return i?{...n,params:Fz(i).map((([e,i])=>{const{init:n,bind:o,empty:r,...s}=i;"single"===s.type?(s.type="point",s.toggle=!1):"multi"===s.type&&(s.type="point"),t.emptySelections[e]="none"!==r;for(const i of Oz(t.selectionPredicates[e]??{}))i.empty="none"!==r;return{name:e,value:n,select:s,bind:o}}))}:e}},_G=new dG;function vG(e){return rn(e)?{type:e}:e??{}}const bG=["background","padding"];function yG(e,t){const i={};for(const t of bG)e&&void 0!==e[t]&&(i[t]=_H(e[t]));return t&&(i.params=e.params),i}class wG{constructor(e={},t={}){this.explicit=e,this.implicit=t}clone(){return new wG(mz(this.explicit),mz(this.implicit))}combine(){return{...this.explicit,...this.implicit}}get(e){return Yz(this.explicit[e],this.implicit[e])}getWithExplicit(e){return void 0!==this.explicit[e]?{explicit:!0,value:this.explicit[e]}:void 0!==this.implicit[e]?{explicit:!1,value:this.implicit[e]}:{explicit:!1,value:void 0}}setWithExplicit(e,{value:t,explicit:i}){void 0!==t&&this.set(e,t,i)}set(e,t,i){return delete this[i?"implicit":"explicit"][e],this[i?"explicit":"implicit"][e]=t,this}copyKeyFromSplit(e,{explicit:t,implicit:i}){void 0!==t[e]?this.set(e,t[e],!0):void 0!==i[e]&&this.set(e,i[e],!1)}copyKeyFromObject(e,t){void 0!==t[e]&&this.set(e,t[e],!0)}copyAll(e){for(const t of Rz(e.combine())){const i=e.getWithExplicit(t);this.setWithExplicit(t,i)}}}function CG(e){return{explicit:!0,value:e}}function SG(e){return{explicit:!1,value:e}}function xG(e){return(t,i,n,o)=>{const r=e(t.value,i.value);return r>0?t:r<0?i:kG(t,i,n,o)}}function kG(e,t,i,n){return e.explicit&&t.explicit&&a$(function(e,t,i,n){return`Conflicting ${t.toString()} property "${e.toString()}" (${bz(i)} and ${bz(n)}). Using ${bz(i)}.`}(i,n,e.value,t.value)),e}function DG(e,t,i,n,o=kG){return void 0===e||void 0===e.value?t:e.explicit&&!t.explicit?e:t.explicit&&!e.explicit?t:pz(e.value,t.value)?e:o(e,t,i,n)}class LG extends wG{constructor(e={},t={},i=!1){super(e,t),this.explicit=e,this.implicit=t,this.parseNothing=i}clone(){const e=super.clone();return e.parseNothing=this.parseNothing,e}}function NG(e){return"url"in e}function EG(e){return"values"in e}function AG(e){return"name"in e&&!NG(e)&&!EG(e)&&!MG(e)}function MG(e){return e&&(IG(e)||TG(e)||RG(e))}function IG(e){return"sequence"in e}function TG(e){return"sphere"in e}function RG(e){return"graticule"in e}var OG;function FG(e,t=!0,i=Zt){if(li(e)){const n=e.map((e=>FG(e,t,i)));return t?`[${n.join(", ")}]`:n}return l$(e)?i(t?f$(e):function(e){const t=g$(e,!0);return e.utc?+new Date(Date.UTC(...t)):+new Date(...t)}(e)):t?i(bz(e)):e}function PG(e,t){for(const i of Oz(e.component.selection??{})){const n=i.name;let o=`${n}${KY}, ${"global"===i.resolve?"true":`{unit: ${XY(e)}}`}`;for(const n of ZY)n.defined(i)&&(n.signals&&(t=n.signals(e,i,t)),n.modifyExpr&&(o=n.modifyExpr(e,i,o)));t.push({name:n+GY,on:[{events:{signal:i.name+KY},update:`modify(${gn(i.name+qY)}, ${o})`}]})}return WG(t)}function BG(e,t){if(e.component.selection&&Rz(e.component.selection).length){const i=gn(e.getName("cell"));t.unshift({name:"facet",value:{},on:[{events:BR("mousemove","scope"),update:`isTuple(facet) ? facet : group(${i}).datum`}]})}return WG(t)}function zG(e,t){for(const i of Oz(e.component.selection??{}))for(const n of ZY)n.defined(i)&&n.marks&&(t=n.marks(e,i,t));return t}function WG(e){return e.map((e=>(e.on&&!e.on.length&&delete e.on,e)))}!function(e){e[e.Raw=0]="Raw",e[e.Main=1]="Main",e[e.Row=2]="Row",e[e.Column=3]="Column",e[e.Lookup=4]="Lookup"}(OG||(OG={}));class VG{constructor(e,t){this.debugName=t,this._children=[],this._parent=null,e&&(this.parent=e)}clone(){throw new Error("Cannot clone node")}get parent(){return this._parent}set parent(e){this._parent=e,e&&e.addChild(this)}get children(){return this._children}numChildren(){return this._children.length}addChild(e,t){this._children.includes(e)?a$("Attempt to add the same child twice."):void 0!==t?this._children.splice(t,0,e):this._children.push(e)}removeChild(e){const t=this._children.indexOf(e);return this._children.splice(t,1),t}remove(){let e=this._parent.removeChild(this);for(const t of this._children)t._parent=this._parent,this._parent.addChild(t,e++)}insertAsParentOf(e){const t=e.parent;t.removeChild(this),this.parent=t,e.parent=this}swapWithParent(){const e=this._parent,t=e.parent;for(const t of this._children)t.parent=e;this._children=[],e.removeChild(this),e.parent.removeChild(e),this.parent=t,e.parent=this}}class HG extends VG{constructor(e,t,i,n){super(e,t),this.type=i,this.refCounts=n,this._source=this._name=t,this.refCounts&&!(this._name in this.refCounts)&&(this.refCounts[this._name]=0)}clone(){const e=new this.constructor;return e.debugName=`clone_${this.debugName}`,e._source=this._source,e._name=`clone_${this._name}`,e.type=this.type,e.refCounts=this.refCounts,e.refCounts[e._name]=0,e}dependentFields(){return new Set}producedFields(){return new Set}hash(){return void 0===this._hash&&(this._hash=`Output ${Xz()}`),this._hash}getSource(){return this.refCounts[this._name]++,this._source}isRequired(){return!!this.refCounts[this._name]}setSource(e){this._source=e}}class $G extends VG{constructor(e,t){super(e),this.formula=t}clone(){return new $G(null,mz(this.formula))}static makeFromEncoding(e,t){const i=t.reduceFieldDef(((e,t)=>{const{field:i,timeUnit:n}=t;if(n){const o=Oj(t,{forAs:!0});e[yz({as:o,field:i,timeUnit:n})]={as:o,field:i,timeUnit:n}}return e}),{});return Tz(i)?null:new $G(e,i)}static makeFromTransform(e,t){const{timeUnit:i,...n}={...t},o={...n,timeUnit:C$(i)};return new $G(e,{[yz(o)]:o})}merge(e){this.formula={...this.formula};for(const t in e.formula)this.formula[t]||(this.formula[t]=e.formula[t]);for(const t of e.children)e.removeChild(t),t.parent=this;e.remove()}removeFormulas(e){const t={};for(const[i,n]of Fz(this.formula))e.has(n.as)||(t[i]=n);this.formula=t}producedFields(){return new Set(Oz(this.formula).map((e=>e.as)))}dependentFields(){return new Set(Oz(this.formula).map((e=>e.field)))}hash(){return`TimeUnit ${yz(this.formula)}`}assemble(){const e=[];for(const t of Oz(this.formula)){const{field:i,as:n,timeUnit:o}=t,{unit:r,utc:s,...a}=C$(o);e.push({field:jz(i),type:"timeunit",...r?{units:b$(r)}:{},...s?{timezone:"utc"}:{},...a,as:[n,`${n}_end`]})}return e}}const UG="_tuple_fields";class jG{constructor(...e){this.items=e,this.hasChannel={},this.hasField={}}}const qG={defined:()=>!0,parse:(e,t,i)=>{const n=t.name,o=t.project??(t.project=new jG),r={},s={},a=new Set,l=(e,t)=>{const i="visual"===t?e.channel:e.field;let o=Bz(`${n}_${i}`);for(let e=1;a.has(o);e++)o=Bz(`${n}_${i}_${e}`);return a.add(o),{[t]:o}},c=t.type,u=e.config.selection[c],h=void 0!==i.value?Ti(i.value):null;let{fields:d,encodings:g}=ci(i.select)?i.select:{};if(!d&&!g&&h)for(const e of h)if(ci(e))for(const t of Rz(e))eV[t]?(g||(g=[])).push(t):"interval"===c?(a$('Interval selections should be initialized using "x" and/or "y" keys.'),g=u.encodings):(d||(d=[])).push(t);d||g||(g=u.encodings,d=u.fields);for(const t of g??[]){const i=e.fieldDef(t);if(i){let n=i.field;if(i.aggregate){a$(BH(t,i.aggregate));continue}if(!n){a$(PH(t));continue}if(i.timeUnit){n=e.vgField(t);const o={timeUnit:i.timeUnit,as:n,field:i.field};s[yz(o)]=o}if(!r[n]){let s="E";"interval"===c?tU(e.getScaleComponent(t).get("type"))&&(s="R"):i.bin&&(s="R-RE");const a={field:n,channel:t,type:s};a.signals={...l(a,"data"),...l(a,"visual")},o.items.push(r[n]=a),o.hasField[n]=o.hasChannel[t]=r[n]}}else a$(PH(t))}for(const e of d??[]){if(o.hasField[e])continue;const t={type:"E",field:e};t.signals={...l(t,"data")},o.items.push(t),o.hasField[e]=t}h&&(t.init=h.map((e=>o.items.map((t=>ci(e)?void 0!==e[t.channel]?e[t.channel]:e[t.field]:e))))),Tz(s)||(o.timeUnit=new $G(null,s))},signals:(e,t,i)=>{const n=t.name+UG;return i.filter((e=>e.name===n)).length>0?i:i.concat({name:n,value:t.project.items.map((e=>{const{signals:t,hasLegend:i,...n}=e;return n.field=jz(n.field),n}))})}},KG={defined:e=>"interval"===e.type&&"global"===e.resolve&&e.bind&&"scales"===e.bind,parse:(e,t)=>{const i=t.scales=[];for(const n of t.project.items){const o=n.channel;if(!WV(o))continue;const r=e.getScaleComponent(o),s=r?r.get("type"):void 0;r&&tU(s)?(r.set("selectionExtent",{param:t.name,field:n.field},!0),i.push(n)):a$("Scale bindings are currently only supported for scales with unbinned, continuous domains.")}},topLevelSignals:(e,t,i)=>{const n=t.scales.filter((e=>0===i.filter((t=>t.name===e.signals.data)).length));if(!e.parent||YG(e)||0===n.length)return i;const o=i.filter((e=>e.name===t.name))[0];let r=o.update;if(r.indexOf(YY)>=0)o.update=`{${n.map((e=>`${gn(jz(e.field))}: ${e.signals.data}`)).join(", ")}}`;else{for(const e of n){const t=`${gn(jz(e.field))}: ${e.signals.data}`;r.includes(t)||(r=`${r.substring(0,r.length-1)}, ${t}}`)}o.update=r}return i.concat(n.map((e=>({name:e.signals.data}))))},signals:(e,t,i)=>{if(e.parent&&!YG(e))for(const e of t.scales){const t=i.filter((t=>t.name===e.signals.data))[0];t.push="outer",delete t.value,delete t.update}return i}};function GG(e,t){return`domain(${gn(e.scaleName(t))})`}function YG(e){return e.parent&&LQ(e.parent)&&(!e.parent.parent??YG(e.parent.parent))}const ZG="_brush",XG="_scale_trigger",QG={defined:e=>"interval"===e.type,signals:(e,t,i)=>{const n=t.name,o=n+UG,r=KG.defined(t),s=t.init?t.init[0]:null,a=[],l=[];if(t.translate&&!r){const e=`!event.item || event.item.mark.name !== ${gn(n+ZG)}`;JG(t,((t,i)=>{var n;const o=Ti((n=i.between[0]).filter??(n.filter=[]));return o.includes(e)||o.push(e),t}))}t.project.items.forEach(((n,o)=>{const r=n.channel;if(r!==sW&&r!==aW)return void a$("Interval selections only support x and y encoding channels.");const c=s?s[o]:null,u=function(e,t,i,n){const o=i.channel,r=i.signals.visual,s=i.signals.data,a=KG.defined(t),l=gn(e.scaleName(o)),c=e.getScaleComponent(o),u=c?c.get("type"):void 0,h=e=>`scale(${l}, ${e})`,d=e.getSizeSignalRef(o===sW?"width":"height").signal,g=`${o}(unit)`,f=JG(t,((e,t)=>[...e,{events:t.between[0],update:`[${g}, ${g}]`},{events:t,update:`[${r}[0], clamp(${g}, 0, ${d})]`}]));return f.push({events:{signal:t.name+XG},update:tU(u)?`[${h(`${s}[0]`)}, ${h(`${s}[1]`)}]`:"[0, 0]"}),a?[{name:s,on:[]}]:[{name:r,...n?{init:FG(n,!0,h)}:{value:[]},on:f},{name:s,...n?{init:FG(n)}:{},on:[{events:{signal:r},update:`${r}[0] === ${r}[1] ? null : invert(${l}, ${r})`}]}]}(e,t,n,c),h=n.signals.data,d=n.signals.visual,g=gn(e.scaleName(r)),f=tU(e.getScaleComponent(r).get("type"))?"+":"";i.push(...u),a.push(h),l.push({scaleName:e.scaleName(r),expr:`(!isArray(${h}) || (${f}invert(${g}, ${d})[0] === ${f}${h}[0] && ${f}invert(${g}, ${d})[1] === ${f}${h}[1]))`})})),r||i.push({name:n+XG,value:{},on:[{events:l.map((e=>({scale:e.scaleName}))),update:`${l.map((e=>e.expr)).join(" && ")} ? ${n+XG} : {}`}]});const c=`unit: ${XY(e)}, fields: ${o}, values`;return i.concat({name:n+KY,...s?{init:`{${c}: ${FG(s)}}`}:{},on:[{events:[{signal:a.join(" || ")}],update:`${a.join(" && ")} ? {${c}: [${a}]} : null`}]})},marks:(e,t,i)=>{const n=t.name,{x:o,y:r}=t.project.hasChannel,s=o&&o.signals.visual,a=r&&r.signals.visual,l=`data(${gn(t.name+qY)})`;if(KG.defined(t))return i;const c={x:void 0!==o?{signal:`${s}[0]`}:{value:0},y:void 0!==r?{signal:`${a}[0]`}:{value:0},x2:void 0!==o?{signal:`${s}[1]`}:{field:{group:"width"}},y2:void 0!==r?{signal:`${a}[1]`}:{field:{group:"height"}}};if("global"===t.resolve)for(const t of Rz(c))c[t]=[{test:`${l}.length && ${l}[0].unit === ${XY(e)}`,...c[t]},{value:0}];const{fill:u,fillOpacity:h,cursor:d,...g}=t.mark,f=Rz(g).reduce(((e,t)=>(e[t]=[{test:[void 0!==o&&`${s}[0] !== ${s}[1]`,void 0!==r&&`${a}[0] !== ${a}[1]`].filter((e=>e)).join(" && "),value:g[t]},{value:null}],e)),{});return[{name:`${n+ZG}_bg`,type:"rect",clip:!0,encode:{enter:{fill:{value:u},fillOpacity:{value:h}},update:c}},...i,{name:n+ZG,type:"rect",clip:!0,encode:{enter:{...d?{cursor:{value:d}}:{},fill:{value:"transparent"}},update:{...c,...f}}}]}};function JG(e,t){return e.events.reduce(((e,i)=>i.between?t(e,i):(a$(`${i} is not an ordered event stream for interval selections.`),e)),[])}const eY={defined:e=>"point"===e.type,signals:(e,t,i)=>{const n=t.name,o=n+UG,r=t.project,s="(item().isVoronoi ? datum.datum : datum)",a=r.items.map((t=>{const i=e.fieldDef(t.channel);return i&&i.bin?`[${s}[${gn(e.vgField(t.channel,{}))}], ${s}[${gn(e.vgField(t.channel,{binSuffix:"end"}))}]]`:`${s}[${gn(t.field)}]`})).join(", "),l=`unit: ${XY(e)}, fields: ${o}, values`,c=t.events;return i.concat([{name:n+KY,on:c?[{events:c,update:`datum && item().mark.marktype !== 'group' ? {${l}: [${a}]} : null`,force:!0}]:[]}])}};function tY(e,t,i,n){const o=bj(t)&&t.condition,r=n(t);return o?{[i]:[...Ti(o).map((t=>{const i=n(t);if(function(e){return e.param}(t)){const{param:n,empty:o}=t;return{test:oZ(e,{param:n,empty:o}),...i}}return{test:sZ(e,t.test),...i}})),...void 0!==r?[r]:[]]}:void 0!==r?{[i]:r}:{}}function iY(e,t="text"){const i=e.encoding[t];return tY(e,i,t,(t=>nY(t,e.config)))}function nY(e,t,i="datum"){if(e){if(Ej(e))return bH(e.value);if(Lj(e)){const{format:n,formatType:o}=$j(e);return ZU({fieldOrDatumDef:e,format:n,formatType:o,expr:i,config:t})}}}function oY(e,t={}){const{encoding:i,markDef:n,config:o,stack:r}=e,s=i.tooltip;if(li(s))return{tooltip:sY({tooltip:s},r,o,t)};{const a=t.reactiveGeom?"datum.datum":"datum";return tY(e,s,"tooltip",(e=>{const s=nY(e,o,a);if(s)return s;if(null===e)return;let l=xH("tooltip",n,o);return!0===l&&(l={content:"encoding"}),rn(l)?{value:l}:ci(l)?uH(l)?l:"encoding"===l.content?sY(i,r,o,t):{signal:a}:void 0}))}}function rY(e,t,i,{reactiveGeom:n}={}){const o={},r=n?"datum.datum":"datum",s=[];function a(n,a){const l=oV(a),c=Nj(n)?n:{...n,type:e[l].type},u=Ti(c.title||Hj(c,i)).join(", ");let h;if(xV(a)){const n="x"===a?"x2":"y2",s=Uj(e[n]);if(iH(c.bin)&&s){const e=Oj(c,{expr:r}),t=Oj(s,{expr:r}),{format:a,formatType:l}=$j(c);h=oj(e,t,a,l,i),o[n]=!0}else if(t&&t.fieldChannel===a&&"normalize"===t.offset){const{format:e,formatType:t}=$j(c);h=ZU({fieldOrDatumDef:c,format:e,formatType:t,expr:r,config:i,normalizeStack:!0}).signal}}h??(h=nY(c,i,r).signal),s.push({channel:a,key:u,value:h})}mq(e,((e,t)=>{Cj(e)?a(e,t):yj(e)&&a(e.condition,t)}));const l={};for(const{channel:e,key:t,value:i}of s)o[e]||l[t]||(l[t]=i);return l}function sY(e,t,i,{reactiveGeom:n}={}){const o=rY(e,t,i,{reactiveGeom:n}),r=Fz(o).map((([e,t])=>`"${e}": ${t}`));return r.length>0?{signal:`{${r.join(", ")}}`}:void 0}function aY(e){const{markDef:t,config:i}=e,n=xH("aria",t,i);return!1===n?{}:{...n?{aria:n}:{},...lY(e),...cY(e)}}function lY(e){const{mark:t,markDef:i,config:n}=e;if(!1===n.aria)return{};const o=xH("ariaRoleDescription",i,n);return null!=o?{ariaRoleDescription:{value:o}}:t in fH?{}:{ariaRoleDescription:{value:t}}}function cY(e){const{encoding:t,markDef:i,config:n,stack:o}=e,r=t.description;if(r)return tY(e,r,"description",(t=>nY(t,e.config)));const s=xH("description",i,n);if(null!=s)return{description:bH(s)};if(!1===n.aria)return{};const a=rY(t,o,n);return Tz(a)?void 0:{description:{signal:Fz(a).map((([e,t],i)=>`"${i>0?"; ":""}${e}: " + (${t})`)).join(" + ")}}}function uY(e,t,i={}){const{markDef:n,encoding:o,config:r}=t,{vgChannel:s}=i;let{defaultRef:a,defaultValue:l}=i;void 0===a&&(l??(l=xH(e,n,r,{vgChannel:s,ignoreVgConfig:!0})),void 0!==l&&(a=bH(l)));const c=o[e];return tY(t,c,s??e,(i=>qU({channel:e,channelDef:i,markDef:n,config:r,scaleName:t.scaleName(e),scale:t.getScaleComponent(e),stack:null,defaultRef:a})))}function hY(e,t={filled:void 0}){const{markDef:i,encoding:n,config:o}=e,{type:r}=i,s=t.filled??xH("filled",i,o),a=Cz(["bar","point","circle","square","geoshape"],r)?"transparent":void 0,l=xH(!0===s?"color":void 0,i,o,{vgChannel:"fill"})??o.mark[!0===s&&"color"]??a,c=xH(!1===s?"color":void 0,i,o,{vgChannel:"stroke"})??o.mark[!1===s&&"color"],u=s?"fill":"stroke",h={...l?{fill:bH(l)}:{},...c?{stroke:bH(c)}:{}};return i.color&&(s?i.fill:i.stroke)&&a$(UH("property",{fill:"fill"in i,stroke:"stroke"in i})),{...h,...uY("color",e,{vgChannel:u,defaultValue:s?l:c}),...uY("fill",e,{defaultValue:n.fill?l:void 0}),...uY("stroke",e,{defaultValue:n.stroke?c:void 0})}}function dY(e){const{encoding:t,mark:i}=e,n=t.order;return!MU(i)&&Ej(n)?tY(e,n,"zindex",(e=>bH(e.value))):{}}function gY(e,t){const i=t[function(e){switch(e){case sW:return"xOffset";case aW:return"yOffset";case lW:return"x2Offset";case cW:return"y2Offset";case dW:return"thetaOffset";case uW:return"radiusOffset";case gW:return"theta2Offset";case hW:return"radius2Offset"}}(e)];if(i)return i}function fY(e,t,{defaultPos:i,vgChannel:n}){const{encoding:o,markDef:r,config:s,stack:a}=t,l=o[e],c=o[sV(e)],u=t.scaleName(e),h=t.getScaleComponent(e),d=gY(e,r),g=pY({model:t,defaultPos:i,channel:e,scaleName:u,scale:h}),f=!l&&xV(e)&&(o.latitude||o.longitude)?{field:t.getName(e)}:function(e){const{channel:t,channelDef:i,scaleName:n,stack:o,offset:r,markDef:s}=e;if(Lj(i)&&o&&t===o.fieldChannel){if(Cj(i)){let e=i.bandPosition;if(void 0!==e||"text"!==s.type||"radius"!==t&&"theta"!==t||(e=.5),void 0!==e)return jU({scaleName:n,fieldOrDatumDef:i,startSuffix:"start",bandPosition:e,offset:r})}return UU(i,n,{suffix:"end"},{offset:r})}return WU(e)}({channel:e,channelDef:l,channel2Def:c,markDef:r,config:s,scaleName:u,scale:h,stack:a,offset:d,defaultRef:g});return f?{[n||e]:f}:void 0}function pY({model:e,defaultPos:t,channel:i,scaleName:n,scale:o}){const{markDef:r,config:s}=e;return()=>{const a=oV(i),l=rV(i),c=xH(i,r,s,{vgChannel:l});if(void 0!==c)return KU(i,c);switch(t){case"zeroOrMin":case"zeroOrMax":if(n){const e=o.get("type");if(Cz(["log",H$,$$],e));else if(o.domainDefinitelyIncludesZero())return{scale:n,value:0}}if("zeroOrMin"===t)return"y"===a?{field:{group:"height"}}:{value:0};switch(a){case"radius":return{signal:`min(${e.width.signal},${e.height.signal})/2`};case"theta":return{signal:"2*PI"};case"x":return{field:{group:"width"}};case"y":return{value:0}}break;case"mid":return{...e[aV(i)],mult:.5}}}}const mY={left:"x",center:"xc",right:"x2"},_Y={top:"y",middle:"yc",bottom:"y2"};function vY(e,t,i,n="middle"){if("radius"===e||"theta"===e)return rV(e);const o="x"===e?"align":"baseline",r=xH(o,t,i);let s;return uH(r)?(a$(function(e){return`The ${e} for range marks cannot be an expression`}(o)),s=void 0):s=r,"x"===e?mY[s||("top"===n?"left":"center")]:_Y[s||n]}function bY(e,t,{defaultPos:i,defaultPos2:n,range:o}){return o?yY(e,t,{defaultPos:i,defaultPos2:n}):fY(e,t,{defaultPos:i})}function yY(e,t,{defaultPos:i,defaultPos2:n}){const{markDef:o,config:r}=t,s=sV(e),a=aV(e),l=function(e,t,i){const{encoding:n,mark:o,markDef:r,stack:s,config:a}=e,l=oV(i),c=aV(i),u=rV(i),h=n[l],d=e.scaleName(l),g=e.getScaleComponent(l),f=gY(i in n||i in r?i:l,e.markDef);if(!h&&("x2"===i||"y2"===i)&&(n.latitude||n.longitude)){const t=aV(i),n=e.markDef[t];return null!=n?{[t]:{value:n}}:{[u]:{field:e.getName(i)}}}const p=function({channel:e,channelDef:t,channel2Def:i,markDef:n,config:o,scaleName:r,scale:s,stack:a,offset:l,defaultRef:c}){return Lj(t)&&a&&e.charAt(0)===a.fieldChannel.charAt(0)?UU(t,r,{suffix:"start"},{offset:l}):WU({channel:e,channelDef:i,scaleName:r,scale:s,stack:a,markDef:n,config:o,offset:l,defaultRef:c})}({channel:i,channelDef:h,channel2Def:n[i],markDef:r,config:a,scaleName:d,scale:g,stack:s,offset:f,defaultRef:void 0});return void 0!==p?{[u]:p}:wY(i,r)||wY(i,{[i]:DH(i,r,a.style),[c]:DH(c,r,a.style)})||wY(i,a[o])||wY(i,a.mark)||{[u]:pY({model:e,defaultPos:t,channel:i,scaleName:d,scale:g})()}}(t,n,s);return{...fY(e,t,{defaultPos:i,vgChannel:l[a]?vY(e,o,r):rV(e)}),...l}}function wY(e,t){const i=aV(e),n=rV(e);if(void 0!==t[n])return{[n]:KU(e,t[n])};if(void 0!==t[e])return{[n]:KU(e,t[e])};if(t[i]){const n=t[i];if(!BU(n))return{[i]:KU(e,n)};a$(function(e){return`Position range does not support relative band size for ${e}.`}(i))}}function CY(e,t,i){const{config:n,encoding:o,markDef:r}=e,s=sV(t),a=aV(t),l=o[t],c=o[s],u=e.getScaleComponent(t),h=u?u.get("type"):void 0,d=e.scaleName(t),g=r.orient,f=o[a]??o.size??xH("size",r,n,{vgChannel:a}),p="bar"===i&&("x"===t?"vertical"===g:"horizontal"===g);return!Cj(l)||!(tH(l.bin)||iH(l.bin)||l.timeUnit&&!c)||f&&!BU(f)||eU(h)?(Lj(l)&&eU(h)||p)&&!c?function(e,t,i){const{markDef:n,encoding:o,config:r,stack:s}=i,a=n.orient,l=i.scaleName(t),c=i.getScaleComponent(t),u=aV(t),h=sV(t),d="horizontal"===a&&"y"===t||"vertical"===a&&"x"===t;let g;(o.size||n.size)&&(d?g=uY("size",i,{vgChannel:u,defaultRef:bH(n.size)}):a$(function(e){return`Cannot apply size to non-oriented mark "${e}".`}(n.type)));const f=_j({channel:t,fieldDef:e,markDef:n,config:r,scaleType:c?.get("type"),useVlSizeChannel:d});g=g||{[u]:SY(u,l,c,r,f)};const p=vY(t,n,r,"band"===c?.get("type")&&"band"in g[u]?"top":"middle"),m="xc"===p||"yc"===p,_=gY(t,n),v=WU({channel:t,channelDef:e,markDef:n,config:r,scaleName:l,scale:c,stack:s,offset:_,defaultRef:pY({model:i,defaultPos:"mid",channel:t,scaleName:l,scale:c}),bandPosition:m?.5:uH(f)?{signal:`(1-${f})/2`}:BU(f)?(1-f.band)/2:0});if(u)return{[p]:v,...g};{const e=rV(h),t=g[u],i=_?{...t,offset:_}:t;return{[p]:v,[e]:li(v)?[v[0],{...v[1],offset:i}]:{...v,offset:i}}}}(l,t,e):yY(t,e,{defaultPos:"zeroOrMax",defaultPos2:"zeroOrMin"}):function({fieldDef:e,fieldDef2:t,channel:i,bandSize:n,scaleName:o,markDef:r,spacing:s=0,axisTranslate:a,reverse:l,config:c}){const u=sV(i),h=rV(i),d=rV(u),g=gY(i,r),f=uH(n)?{signal:`(1-${n.signal})/2`}:BU(n)?(1-n.band)/2:.5;if(tH(e.bin)||e.timeUnit)return{[d]:kY({channel:i,fieldDef:e,scaleName:o,markDef:r,bandPosition:f,offset:xY(u,s,l,a,g),config:c}),[h]:kY({channel:i,fieldDef:e,scaleName:o,markDef:r,bandPosition:uH(f)?{signal:`1-${f.signal}`}:1-f,offset:xY(i,s,l,a,g),config:c})};if(iH(e.bin)){const n=UU(e,o,{},{offset:xY(u,s,l,a,g)});if(Cj(t))return{[d]:n,[h]:UU(t,o,{},{offset:xY(i,s,l,a,g)})};if(nH(e.bin)&&e.bin.step)return{[d]:n,[h]:{signal:`scale("${o}", ${Oj(e,{expr:"datum"})} + ${e.bin.step})`,offset:xY(i,s,l,a,g)}}}a$(o$(u))}({fieldDef:l,fieldDef2:c,channel:t,markDef:r,scaleName:d,bandSize:_j({channel:t,fieldDef:l,markDef:r,config:n,scaleType:h}),axisTranslate:e.component.axes[t]?.[0]?.get("translate")??.5,spacing:xV(t)?xH("binSpacing",r,n):void 0,reverse:u.get("reverse"),config:n})}function SY(e,t,i,n,o){if(BU(o)){if(!i)return{mult:o.band,field:{group:e}};{const e=i.get("type");if("band"===e)return{scale:t,band:o.band};1!==o.band&&(a$(function(e){return`Cannot use the relative band size with ${e} scale.`}(e)),o=void 0)}}else{if(uH(o))return o;if(o)return{value:o}}if(i){const e=i.get("range");if(hH(e)&&nn(e.step))return{value:e.step-2}}return{value:aK(n.view,e)-2}}function xY(e,t,i,n,o){if(BW(e))return 0;const r="x"===e||"y2"===e?-t/2:t/2;if(uH(i)||uH(o)||uH(n)){const e=wH(i),t=wH(o),s=wH(n);return{signal:(s?`${s} + `:"")+(e?`(${e} ? -1 : 1) * `:"")+(t?`(${t} + ${r})`:r)}}return o=o||0,n+(i?-o-r:+o+r)}function kY({channel:e,fieldDef:t,scaleName:i,markDef:n,bandPosition:o,offset:r,config:s}){return VU({fieldDef:t,channel:e,markDef:n,ref:jU({scaleName:i,fieldOrDatumDef:t,bandPosition:o,offset:r}),config:s})}const DY=new Set(["aria","width","height"]);function LY(e,t){const{fill:i,stroke:n}="include"===t.color?hY(e):{};return{...EY(e.markDef,t),...NY(e,"fill",i),...NY(e,"stroke",n),...uY("opacity",e),...uY("fillOpacity",e),...uY("strokeOpacity",e),...uY("strokeWidth",e),...uY("strokeDash",e),...dY(e),...oY(e),...iY(e,"href"),...aY(e)}}function NY(e,t,i){const{config:n,mark:o,markDef:r}=e;if("hide"===xH("invalid",r,n)&&i&&!MU(o)){const n=function(e,{invalid:t=!1,channels:i}){const n=i.reduce(((t,i)=>{const n=e.getScaleComponent(i);if(n){const o=n.get("type"),r=e.vgField(i,{expr:"datum"});r&&tU(o)&&(t[r]=!0)}return t}),{}),o=Rz(n);if(o.length>0){const e=t?"||":"&&";return o.map((e=>$U(e,t))).join(` ${e} `)}}(e,{invalid:!0,channels:zV});if(n)return{[t]:[{test:n,value:null},...Ti(i)]}}return i?{[t]:i}:{}}function EY(e,t){return gH.reduce(((i,n)=>(DY.has(n)||void 0===e[n]||"ignore"===t[n]||(i[n]=bH(e[n])),i)),{})}function AY(e){const{config:t,markDef:i}=e;if(xH("invalid",i,t)){const t=function(e,{invalid:t=!1,channels:i}){const n=i.reduce(((t,i)=>{const n=e.getScaleComponent(i);if(n){const o=n.get("type"),r=e.vgField(i,{expr:"datum"});r&&tU(o)&&(t[r]=!0)}return t}),{}),o=Rz(n);if(o.length>0){const e=t?"||":"&&";return o.map((e=>$U(e,t))).join(` ${e} `)}}(e,{channels:SV});if(t)return{defined:{signal:t}}}return{}}function MY(e,t){if(void 0!==t)return{[e]:bH(t)}}const IY="voronoi",TY={defined:e=>"point"===e.type&&e.nearest,parse:(e,t)=>{if(t.events)for(const i of t.events)i.markname=e.getName(IY)},marks:(e,t,i)=>{const{x:n,y:o}=t.project.hasChannel,r=e.mark;if(MU(r))return a$(`The "nearest" transform is not supported for ${r} marks.`),i;const s={name:e.getName(IY),type:"path",interactive:!0,from:{data:e.getName("marks")},encode:{update:{fill:{value:"transparent"},strokeWidth:{value:.35},stroke:{value:"transparent"},isVoronoi:{value:!0},...oY(e,{reactiveGeom:!0})}},transform:[{type:"voronoi",x:{expr:n||!o?"datum.datum.x || 0":"0"},y:{expr:o||!n?"datum.datum.y || 0":"0"},size:[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]}]};let a=0,l=!1;return i.forEach(((t,i)=>{const n=t.name??"";n===e.component.mark[0].name?a=i:n.indexOf(IY)>=0&&(l=!0)})),l||i.splice(a+1,0,s),i}},RY={defined:e=>"point"===e.type&&"global"===e.resolve&&e.bind&&"scales"!==e.bind&&!Zq(e.bind),parse:(e,t,i)=>JY(t,i),topLevelSignals:(e,t,i)=>{const n=t.name,o=t.project,r=t.bind,s=t.init&&t.init[0],a=TY.defined(t)?"(item().isVoronoi ? datum.datum : datum)":"datum";return o.items.forEach(((e,o)=>{const l=Bz(`${n}_${e.field}`);i.filter((e=>e.name===l)).length||i.unshift({name:l,...s?{init:FG(s[o])}:{value:null},on:t.events?[{events:t.events,update:`datum && item().mark.marktype !== 'group' ? ${a}[${gn(e.field)}] : null`}]:[],bind:r[e.field]??r[e.channel]??r})})),i},signals:(e,t,i)=>{const n=t.name,o=t.project,r=i.filter((e=>e.name===n+KY))[0],s=n+UG,a=o.items.map((e=>Bz(`${n}_${e.field}`))),l=a.map((e=>`${e} !== null`)).join(" && ");return a.length&&(r.update=`${l} ? {fields: ${s}, values: [${a.join(", ")}]} : null`),delete r.value,delete r.on,i}},OY="_toggle",FY={defined:e=>"point"===e.type&&!!e.toggle,signals:(e,t,i)=>i.concat({name:t.name+OY,value:!1,on:[{events:t.events,update:t.toggle}]}),modifyExpr:(e,t)=>{const i=t.name+KY,n=t.name+OY;return`${n} ? null : ${i}, `+("global"===t.resolve?`${n} ? null : true, `:`${n} ? null : {unit: ${XY(e)}}, `)+`${n} ? ${i} : null`}},PY={defined:e=>void 0!==e.clear&&!1!==e.clear,parse:(e,t)=>{t.clear&&(t.clear=rn(t.clear)?BR(t.clear,"view"):t.clear)},topLevelSignals:(e,t,i)=>{if(RY.defined(t))for(const e of t.project.items){const n=i.findIndex((i=>i.name===Bz(`${t.name}_${e.field}`)));-1!==n&&i[n].on.push({events:t.clear,update:"null"})}return i},signals:(e,t,i)=>{function n(e,n){-1!==e&&i[e].on&&i[e].on.push({events:t.clear,update:n})}if("interval"===t.type)for(const e of t.project.items){const t=i.findIndex((t=>t.name===e.signals.visual));n(t,"[0, 0]"),-1===t&&n(i.findIndex((t=>t.name===e.signals.data)),"null")}else{let e=i.findIndex((e=>e.name===t.name+KY));n(e,"null"),FY.defined(t)&&(e=i.findIndex((e=>e.name===t.name+OY)),n(e,"false"))}return i}},BY={defined:e=>{const t="global"===e.resolve&&e.bind&&Zq(e.bind),i=1===e.project.items.length&&e.project.items[0].field!==Gq;return t&&!i&&a$("Legend bindings are only supported for selections over an individual field or encoding channel."),t&&i},parse:(e,t,i)=>{const n=mz(i);if(n.select=rn(n.select)?{type:n.select,toggle:t.toggle}:{...n.select,toggle:t.toggle},JY(t,n),ci(i.select)&&(i.select.on||i.select.clear)){const e='event.item && indexof(event.item.mark.role, "legend") < 0';for(const i of t.events)i.filter=Ti(i.filter??[]),i.filter.includes(e)||i.filter.push(e)}const o=Xq(t.bind)?t.bind.legend:"click",r=rn(o)?BR(o,"view"):Ti(o);t.bind={legend:{merge:r}}},topLevelSignals:(e,t,i)=>{const n=t.name,o=Xq(t.bind)&&t.bind.legend,r=e=>t=>{const i=mz(t);return i.markname=e,i};for(const e of t.project.items){if(!e.hasLegend)continue;const s=`${Bz(e.field)}_legend`,a=`${n}_${s}`;if(0===i.filter((e=>e.name===a)).length){const e=o.merge.map(r(`${s}_symbols`)).concat(o.merge.map(r(`${s}_labels`))).concat(o.merge.map(r(`${s}_entries`)));i.unshift({name:a,...t.init?{}:{value:null},on:[{events:e,update:"datum.value || item().items[0].items[0].datum.value",force:!0},{events:o.merge,update:`!event.item || !datum ? null : ${a}`,force:!0}]})}}return i},signals:(e,t,i)=>{const n=t.name,o=t.project,r=i.find((e=>e.name===n+KY)),s=n+UG,a=o.items.filter((e=>e.hasLegend)).map((e=>Bz(`${n}_${Bz(e.field)}_legend`))),l=`${a.map((e=>`${e} !== null`)).join(" && ")} ? {fields: ${s}, values: [${a.join(", ")}]} : null`;t.events&&a.length>0?r.on.push({events:a.map((e=>({signal:e}))),update:l}):a.length>0&&(r.update=l,delete r.value,delete r.on);const c=i.find((e=>e.name===n+OY)),u=Xq(t.bind)&&t.bind.legend;return c&&(t.events?c.on.push({...c.on[0],events:u}):c.on[0].events=u),i}},zY="_translate_anchor",WY="_translate_delta",VY={defined:e=>"interval"===e.type&&e.translate,signals:(e,t,i)=>{const n=t.name,o=KG.defined(t),r=n+zY,{x:s,y:a}=t.project.hasChannel;let l=BR(t.translate,"scope");return o||(l=l.map((e=>(e.between[0].markname=n+ZG,e)))),i.push({name:r,value:{},on:[{events:l.map((e=>e.between[0])),update:"{x: x(unit), y: y(unit)"+(void 0!==s?`, extent_x: ${o?GG(e,sW):`slice(${s.signals.visual})`}`:"")+(void 0!==a?`, extent_y: ${o?GG(e,aW):`slice(${a.signals.visual})`}`:"")+"}"}]},{name:n+WY,value:{},on:[{events:l,update:`{x: ${r}.x - x(unit), y: ${r}.y - y(unit)}`}]}),void 0!==s&&HY(e,t,s,"width",i),void 0!==a&&HY(e,t,a,"height",i),i}};function HY(e,t,i,n,o){const r=t.name,s=r+zY,a=r+WY,l=i.channel,c=KG.defined(t),u=o.filter((e=>e.name===i.signals[c?"data":"visual"]))[0],h=e.getSizeSignalRef(n).signal,d=e.getScaleComponent(l),g=d.get("type"),f=d.get("reverse"),p=`${s}.extent_${l}`,m=`${c?"log"===g?"panLog":"symlog"===g?"panSymlog":"pow"===g?"panPow":"panLinear":"panLinear"}(${p}, ${c?l===sW?f?"":"-":f?"-":"":""}${a}.${l} / ${c?`${h}`:`span(${p})`}${c?"pow"===g?`, ${d.get("exponent")??1}`:"symlog"===g?`, ${d.get("constant")??1}`:"":""})`;u.on.push({events:{signal:a},update:c?m:`clampRange(${m}, 0, ${h})`})}const $Y="_zoom_delta",UY={defined:e=>"interval"===e.type&&e.zoom,signals:(e,t,i)=>{const n=t.name,o=KG.defined(t),r=n+$Y,{x:s,y:a}=t.project.hasChannel,l=gn(e.scaleName(sW)),c=gn(e.scaleName(aW));let u=BR(t.zoom,"scope");return o||(u=u.map((e=>(e.markname=n+ZG,e)))),i.push({name:n+"_zoom_anchor",on:[{events:u,update:o?"{"+[l?`x: invert(${l}, x(unit))`:"",c?`y: invert(${c}, y(unit))`:""].filter((e=>!!e)).join(", ")+"}":"{x: x(unit), y: y(unit)}"}]},{name:r,on:[{events:u,force:!0,update:"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}]}),void 0!==s&&jY(e,t,s,"width",i),void 0!==a&&jY(e,t,a,"height",i),i}};function jY(e,t,i,n,o){const r=t.name,s=i.channel,a=KG.defined(t),l=o.filter((e=>e.name===i.signals[a?"data":"visual"]))[0],c=e.getSizeSignalRef(n).signal,u=e.getScaleComponent(s),h=u.get("type"),d=a?GG(e,s):l.name,g=r+$Y,f=`${a?"log"===h?"zoomLog":"symlog"===h?"zoomSymlog":"pow"===h?"zoomPow":"zoomLinear":"zoomLinear"}(${d}, ${r}_zoom_anchor.${s}, ${g}${a?"pow"===h?`, ${u.get("exponent")??1}`:"symlog"===h?`, ${u.get("constant")??1}`:"":""})`;l.on.push({events:{signal:g},update:a?f:`clampRange(${f}, 0, ${c})`})}const qY="_store",KY="_tuple",GY="_modify",YY="vlSelectionResolve",ZY=[eY,QG,qG,FY,RY,KG,BY,PY,VY,UY,TY];function XY(e,{escape:t}={escape:!0}){let i=t?gn(e.name):e.name;const n=function(e){let t=e.parent;for(;t&&!kQ(t);)t=t.parent;return t}(e);if(n){const{facet:e}=n;for(const t of UW)e[t]&&(i+=` + '__facet_${t}_' + (facet[${gn(n.vgField(t))}])`)}return i}function QY(e){return Oz(e.component.selection??{}).reduce(((e,t)=>e||t.project.items.some((e=>e.field===Gq))),!1)}function JY(e,t){!rn(t.select)&&t.select.on||delete e.events,!rn(t.select)&&t.select.clear||delete e.clear,!rn(t.select)&&t.select.toggle||delete e.toggle}function eZ(e){const t=[];return"Identifier"===e.type?[e.name]:"Literal"===e.type?[e.value]:("MemberExpression"===e.type&&(t.push(...eZ(e.object)),t.push(...eZ(e.property))),t)}function tZ(e){return"MemberExpression"===e.object.type?tZ(e.object):"datum"===e.object.name}function iZ(e){const t=EM(e),i=new Set;return t.visit((e=>{"MemberExpression"===e.type&&tZ(e)&&i.add(eZ(e).slice(1).join("."))})),i}class nZ extends VG{constructor(e,t,i){super(e),this.model=t,this.filter=i,this.expr=sZ(this.model,this.filter,this),this._dependentFields=iZ(this.expr)}clone(){return new nZ(null,this.model,mz(this.filter))}dependentFields(){return this._dependentFields}producedFields(){return new Set}assemble(){return{type:"filter",expr:this.expr}}hash(){return`Filter ${this.expr}`}}function oZ(e,t,i,n="datum"){const o=rn(t)?t:t.param,r=Bz(o),s=gn(r+qY);let a;try{a=e.getSelectionComponent(r,o)}catch(e){return`!!${r}`}if(a.project.timeUnit){const t=i??e.component.data.raw,n=a.project.timeUnit.clone();t.parent?n.insertAsParentOf(t):t.parent=n}const l=`vlSelectionTest(${s}, ${n}${"global"===a.resolve?")":`, ${gn(a.resolve)})`}`,c=`length(data(${s}))`;return!1===t.empty?`${c} && ${l}`:`!${c} || ${l}`}function rZ(e,t,i){const n=Bz(t),o=i.encoding;let r,s=i.field;try{r=e.getSelectionComponent(n,t)}catch(e){return n}if(o||s){if(o&&!s){const e=r.project.items.filter((e=>e.channel===o));!e.length||e.length>1?(s=r.project.items[0].field,a$((e.length?"Multiple ":"No ")+`matching ${gn(o)} encoding found for selection ${gn(i.param)}. `+`Using "field": ${gn(s)}.`)):s=e[0].field}}else s=r.project.items[0].field,r.project.items.length>1&&a$(`A "field" or "encoding" must be specified when using a selection as a scale domain. Using "field": ${gn(s)}.`);return`${r.name}[${gn(jz(s))}]`}function sZ(e,t,i){return zz(t,(t=>rn(t)?t:function(e){return e?.param}(t)?oZ(e,t,i):I$(t)))}function aZ(e,t,i,n){var o,r;e.encode??(e.encode={}),(o=e.encode)[t]??(o[t]={}),(r=e.encode[t]).update??(r.update={}),e.encode[t].update[i]=n}function lZ(e,t,i,n={header:!1}){const{disable:o,orient:r,scale:s,labelExpr:a,title:l,zindex:c,...u}=e.combine();if(!o){for(const e in u){const i=oq[e],n=u[e];if(i&&i!==t&&"both"!==i)delete u[e];else if(iq(n)){const{condition:t,...i}=n,o=Ti(t),r=tq[e];if(r){const{vgProp:t,part:n}=r;aZ(u,n,t,[...o.map((e=>{const{test:t,...i}=e;return{test:sZ(null,t),...i}})),i]),delete u[e]}else if(null===r){const t={signal:o.map((e=>{const{test:t,...i}=e;return`${sZ(null,t)} ? ${yH(i)} : `})).join("")+yH(i)};u[e]=t}}else if(uH(n)){const t=tq[e];if(t){const{vgProp:i,part:o}=t;aZ(u,o,i,n),delete u[e]}}Cz(["labelAlign","labelBaseline"],e)&&null===u[e]&&delete u[e]}if("grid"===t){if(!u.grid)return;if(u.encode){const{grid:e}=u.encode;u.encode={...e?{grid:e}:{}},Tz(u.encode)&&delete u.encode}return{scale:s,orient:r,...u,domain:!1,labels:!1,aria:!1,maxExtent:0,minExtent:0,ticks:!1,zindex:Yz(c,0)}}{if(!n.header&&e.mainExtracted)return;if(void 0!==a){let e=a;u.encode?.labels?.update&&uH(u.encode.labels.update.text)&&(e=qz(a,"datum.label",u.encode.labels.update.text.signal)),aZ(u,"labels","text",{signal:e})}if(null===u.labelAlign&&delete u.labelAlign,u.encode){for(const t of nq)e.hasAxisPart(t)||delete u.encode[t];Tz(u.encode)&&delete u.encode}const t=function(e,t){if(e)return li(e)&&!cH(e)?e.map((e=>Hj(e,t))).join(", "):e}(l,i);return{scale:s,orient:r,grid:!1,...t?{title:t}:{},...u,...!1===i.aria?{aria:!1}:{},zindex:Yz(c,0)}}}}function cZ(e){const{axes:t}=e.component,i=[];for(const n of SV)if(t[n])for(const o of t[n])if(!o.get("disable")&&!o.get("gridScale")){const t="x"===n?"height":"width",o=e.getSizeSignalRef(t).signal;t!==o&&i.push({name:t,update:o})}return i}function uZ(e,t,i,n){return Object.assign.apply(null,[{},...e.map((e=>{if("axisOrient"===e){const e="x"===i?"bottom":"left",o=t["x"===i?"axisBottom":"axisLeft"]||{},r=t["x"===i?"axisTop":"axisRight"]||{},s=new Set([...Rz(o),...Rz(r)]),a={};for(const t of s.values())a[t]={signal:`${n.signal} === "${e}" ? ${wH(o[t])} : ${wH(r[t])}`};return a}return t[e]}))])}function hZ(e,t){const i=[{}];for(const n of e){let e=t[n]?.style;if(e){e=Ti(e);for(const n of e)i.push(t.style[n])}}return Object.assign.apply(null,i)}function dZ(e,t,i,n={}){const o=LH(e,i,t);if(void 0!==o)return{configFrom:"style",configValue:o};for(const t of["vlOnlyAxisConfig","vgAxisConfig","axisConfigStyle"])if(void 0!==n[t]?.[e])return{configFrom:t,configValue:n[t][e]};return{}}const gZ={scale:({model:e,channel:t})=>e.scaleName(t),format:({fieldOrDatumDef:e,config:t,axis:i})=>{const{format:n,formatType:o}=i;return JU(e,e.type,n,o,t,!0)},formatType:({axis:e,fieldOrDatumDef:t,scaleType:i})=>{const{formatType:n}=e;return ej(n,t,i)},grid:({fieldOrDatumDef:e,axis:t,scaleType:i})=>t.grid??function(e,t){return!eU(e)&&Cj(t)&&!tH(t?.bin)&&!iH(t?.bin)}(i,e),gridScale:({model:e,channel:t})=>function(e,t){const i="x"===t?"y":"x";if(e.getScaleComponent(i))return e.scaleName(i)}(e,t),labelAlign:({axis:e,labelAngle:t,orient:i,channel:n})=>e.labelAlign||mZ(t,i,n),labelAngle:({labelAngle:e})=>e,labelBaseline:({axis:e,labelAngle:t,orient:i,channel:n})=>e.labelBaseline||pZ(t,i,n),labelFlush:({axis:e,fieldOrDatumDef:t,channel:i})=>e.labelFlush??function(e,t){if("x"===t&&Cz(["quantitative","temporal"],e))return!0}(t.type,i),labelOverlap:({axis:e,fieldOrDatumDef:t,scaleType:i})=>e.labelOverlap??function(e,t,i,n){if(i&&!ci(n)||"nominal"!==e&&"ordinal"!==e)return"log"!==t&&"symlog"!==t||"greedy"}(t.type,i,Cj(t)&&!!t.timeUnit,Cj(t)?t.sort:void 0),orient:({orient:e})=>e,tickCount:({channel:e,model:t,axis:i,fieldOrDatumDef:n,scaleType:o})=>{const r="x"===e?"width":"y"===e?"height":void 0,s=r?t.getSizeSignalRef(r):void 0;return i.tickCount??function({fieldOrDatumDef:e,scaleType:t,size:i,values:n}){if(!n&&!eU(t)&&"log"!==t){if(Cj(e)){if(tH(e.bin))return{signal:`ceil(${i.signal}/10)`};if(e.timeUnit&&Cz(["month","hours","day","quarter"],C$(e.timeUnit)?.unit))return}return{signal:`ceil(${i.signal}/40)`}}}({fieldOrDatumDef:n,scaleType:o,size:s,values:i.values})},title:({axis:e,model:t,channel:i})=>{if(void 0!==e.title)return e.title;const n=_Z(t,i);if(void 0!==n)return n;const o=t.typedFieldDef(i),r="x"===i?"x2":"y2",s=t.fieldDef(r);return EH(o?[fj(o)]:[],Cj(s)?[fj(s)]:[])},values:({axis:e,fieldOrDatumDef:t})=>function(e,t){const i=e.values;return li(i)?Jj(t,i):uH(i)?i:void 0}(e,t),zindex:({axis:e,fieldOrDatumDef:t,mark:i})=>e.zindex??function(e,t){return"rect"===e&&Fj(t)?1:0}(i,t)};function fZ(e){return`(((${e.signal} % 360) + 360) % 360)`}function pZ(e,t,i,n){if(void 0!==e){if("x"===i){if(uH(e)){const i=fZ(e);return{signal:`(45 < ${i} && ${i} < 135) || (225 < ${i} && ${i} < 315) ? "middle" :(${i} <= 45 || 315 <= ${i}) === ${uH(t)?`(${t.signal} === "top")`:"top"===t} ? "bottom" : "top"`}}if(45{if(Aj(t)&&uj(t.sort)){const{field:n,timeUnit:o}=t,r=t.sort,s=r.map(((e,t)=>`${I$({field:n,timeUnit:o,equal:e})} ? ${t} : `)).join("")+r.length;e=new vZ(e,{calculate:s,as:bZ(t,i,{forAs:!0})})}})),e}producedFields(){return new Set([this.transform.as])}dependentFields(){return this._dependentFields}assemble(){return{type:"formula",expr:this.transform.calculate,as:this.transform.as}}hash(){return`Calculate ${yz(this.transform)}`}}function bZ(e,t,i){return Oj(e,{prefix:t,suffix:"sort_index",...i??{}})}function yZ(e,t){return Cz(["top","bottom"],t)?"column":Cz(["left","right"],t)||"row"===e?"row":"column"}function wZ(e,t,i,n){const o="row"===n?i.headerRow:"column"===n?i.headerColumn:i.headerFacet;return Yz((t||{})[e],o[e],i.header[e])}function CZ(e,t,i,n){const o={};for(const r of e){const e=wZ(r,t||{},i,n);void 0!==e&&(o[r]=e)}return o}const SZ=["row","column"],xZ=["header","footer"];function kZ(e,t){const i=e.component.layoutHeaders[t].title,n=e.config?e.config:void 0,o=e.component.layoutHeaders[t].facetFieldDef?e.component.layoutHeaders[t].facetFieldDef:void 0,{titleAnchor:r,titleAngle:s,titleOrient:a}=CZ(["titleAnchor","titleAngle","titleOrient"],o.header,n,t),l=yZ(t,a),c=tW(s);return{name:`${t}-title`,type:"group",role:`${l}-title`,title:{text:i,..."row"===t?{orient:"left"}:{},style:"guide-title",...LZ(c,l),...DZ(l,c,r),...RZ(n,o,t,$q,Vq)}}}function DZ(e,t,i="middle"){switch(i){case"start":return{align:"left"};case"end":return{align:"right"}}const n=mZ(t,"row"===e?"left":"top","row"===e?"y":"x");return n?{align:n}:{}}function LZ(e,t){const i=pZ(e,"row"===t?"left":"top","row"===t?"y":"x",!0);return i?{baseline:i}:{}}function NZ(e,t){const i=e.component.layoutHeaders[t],n=[];for(const o of xZ)if(i[o])for(const r of i[o]){const s=MZ(e,t,o,i,r);null!=s&&n.push(s)}return n}function EZ(e,t){const{sort:i}=e;return cj(i)?{field:Oj(i,{expr:"datum"}),order:i.order??"ascending"}:li(i)?{field:bZ(e,t,{expr:"datum"}),order:"ascending"}:{field:Oj(e,{expr:"datum"}),order:i??"ascending"}}function AZ(e,t,i){const{format:n,formatType:o,labelAngle:r,labelAnchor:s,labelOrient:a,labelExpr:l}=CZ(["format","formatType","labelAngle","labelAnchor","labelOrient","labelExpr"],e.header,i,t),c=ZU({fieldOrDatumDef:e,format:n,formatType:o,expr:"parent",config:i}).signal,u=yZ(t,a);return{text:{signal:l?qz(qz(l,"datum.label",c),"datum.value",Oj(e,{expr:"parent"})):c},..."row"===t?{orient:"left"}:{},style:"guide-label",frame:"group",...LZ(r,u),...DZ(u,r,s),...RZ(i,e,t,Uq,Hq)}}function MZ(e,t,i,n,o){if(o){let r=null;const{facetFieldDef:s}=n,a=e.config?e.config:void 0;if(s&&o.labels){const{labelOrient:e}=CZ(["labelOrient"],s.header,a,t);("row"===t&&!Cz(["top","bottom"],e)||"column"===t&&!Cz(["left","right"],e))&&(r=AZ(s,t,a))}const l=kQ(e)&&!hj(e.facet),c=o.axes,u=c?.length>0;if(r||u){const a="row"===t?"height":"width";return{name:e.getName(`${t}_${i}`),type:"group",role:`${t}-${i}`,...n.facetFieldDef?{from:{data:e.getName(`${t}_domain`)},sort:EZ(s,t)}:{},...u&&l?{from:{data:e.getName(`facet_domain_${t}`)}}:{},...r?{title:r}:{},...o.sizeSignal?{encode:{update:{[a]:o.sizeSignal}}}:{},...u?{axes:c}:{}}}}return null}const IZ={column:{start:0,end:1},row:{start:1,end:0}};function TZ(e,t){return IZ[t][e]}function RZ(e,t,i,n,o){const r={};for(const s of n){if(!o[s])continue;const n=wZ(s,t?.header,e,i);void 0!==n&&(r[o[s]]=n)}return r}function OZ(e){return[...FZ(e,"width"),...FZ(e,"height"),...FZ(e,"childWidth"),...FZ(e,"childHeight")]}function FZ(e,t){const i="width"===t?"x":"y",n=e.component.layoutSize.get(t);if(!n||"merged"===n)return[];const o=e.getSizeSignalRef(t).signal;if("step"===n){const t=e.getScaleComponent(i);if(t){const n=t.get("type"),r=t.get("range");if(eU(n)&&hH(r)){const n=e.scaleName(i);return kQ(e.parent)&&"independent"===e.parent.component.resolve.scale[i]?[PZ(n,r)]:[PZ(n,r),{name:o,update:BZ(n,t,`domain('${n}').length`)}]}}throw new Error("layout size is step although width/height is not step.")}if("container"==n){const t=o.endsWith("width"),i=t?"containerSize()[0]":"containerSize()[1]",n=`isFinite(${i}) ? ${i} : ${sK(e.config.view,t?"width":"height")}`;return[{name:o,init:n,on:[{update:n,events:"window:resize"}]}]}return[{name:o,value:n}]}function PZ(e,t){return{name:`${e}_step`,value:t.step}}function BZ(e,t,i){const n=t.get("type"),o=t.get("padding"),r=Yz(t.get("paddingOuter"),o);let s=t.get("paddingInner");return s="band"===n?void 0!==s?s:o:1,`bandspace(${i}, ${wH(s)}, ${wH(r)}) * ${e}_step`}function zZ(e){return"childWidth"===e?"width":"childHeight"===e?"height":e}function WZ(e,t){return Rz(e).reduce(((i,n)=>{const o=e[n];return{...i,...tY(t,o,n,(e=>bH(e.value)))}}),{})}function VZ(e,t){if(LQ(t)||kQ(t))return"shared";if(DQ(t))return xV(e)?"independent":"shared";throw new Error("invalid model type for resolve")}function HZ(e,t){const i=e.scale[t],n=xV(t)?"axis":"legend";return"independent"===i?("shared"===e[n][t]&&a$(function(e){return`Setting the scale to be independent for "${e}" means we also have to set the guide (axis or legend) to be independent.`}(t)),"independent"):e[n][t]||"shared"}const $Z={...Kq,disable:1,labelExpr:1,selections:1,opacity:1,shape:1,stroke:1,fill:1,size:1,strokeWidth:1,strokeDash:1,encode:1},UZ=Rz($Z);class jZ extends wG{}const qZ={symbols:function(e,{fieldOrDatumDef:t,model:i,channel:n,legendCmpt:o,legendType:r}){if("symbol"!==r)return;const{markDef:s,encoding:a,config:l,mark:c}=i,u=s.filled&&"trail"!==c;let h={...CH({},i,OU),...hY(i,{filled:u})};const d=o.get("symbolOpacity")??l.legend.symbolOpacity,g=o.get("symbolFillColor")??l.legend.symbolFillColor,f=o.get("symbolStrokeColor")??l.legend.symbolStrokeColor,p=void 0===d?KZ(a.opacity)??s.opacity:void 0;if(h.fill)if("fill"===n||u&&n===vW)delete h.fill;else if(h.fill.field)g?delete h.fill:(h.fill=bH(l.legend.symbolBaseFillColor??"black"),h.fillOpacity=bH(p??1));else if(li(h.fill)){const e=GZ(a.fill??a.color)??s.fill??(u&&s.color);e&&(h.fill=bH(e))}if(h.stroke)if("stroke"===n||!u&&n===vW)delete h.stroke;else if(h.stroke.field||f)delete h.stroke;else if(li(h.stroke)){const e=Yz(GZ(a.stroke||a.color),s.stroke,u?s.color:void 0);e&&(h.stroke={value:e})}if(n!==xW){const e=Cj(t)&&ZZ(0,o,t);e?h.opacity=[{test:e,...bH(p??1)},bH(l.legend.unselectedOpacity)]:p&&(h.opacity=bH(p))}return h={...h,...e},Tz(h)?void 0:h},gradient:function(e,{model:t,legendType:i,legendCmpt:n}){if("gradient"!==i)return;const{config:o,markDef:r,encoding:s}=t;let a={};const l=void 0===(n.get("gradientOpacity")??o.legend.gradientOpacity)?KZ(s.opacity)||r.opacity:void 0;return l&&(a.opacity=bH(l)),a={...a,...e},Tz(a)?void 0:a},labels:function(e,{fieldOrDatumDef:t,model:i,channel:n,legendCmpt:o}){const r=i.legend(n)||{},s=i.config,a=Cj(t)?ZZ(0,o,t):void 0,l=a?[{test:a,value:1},{value:s.legend.unselectedOpacity}]:void 0,{format:c,formatType:u}=r,h=GU(u)?QU({fieldOrDatumDef:t,field:"datum.value",format:c,formatType:u,config:s}):void 0,d={...l?{opacity:l}:{},...h?{text:h}:{},...e};return Tz(d)?void 0:d},entries:function(e,{legendCmpt:t}){return t.get("selections")?.length?{...e,fill:{value:"transparent"}}:e}};function KZ(e){return YZ(e,((e,t)=>Math.max(e,t.value)))}function GZ(e){return YZ(e,((e,t)=>Yz(e,t.value)))}function YZ(e,t){return function(e){const t=e&&e.condition;return!!t&&(li(t)||Ej(t))}(e)?Ti(e.condition).reduce(t,e.value):Ej(e)?e.value:void 0}function ZZ(e,t,i){const n=t.get("selections");if(!n?.length)return;const o=gn(i.field);return n.map((e=>`(!length(data(${gn(Bz(e)+qY)})) || (${e}[${o}] && indexof(${e}[${o}], datum.value) >= 0))`)).join(" || ")}const XZ={direction:({direction:e})=>e,format:({fieldOrDatumDef:e,legend:t,config:i})=>{const{format:n,formatType:o}=t;return JU(e,e.type,n,o,i,!1)},formatType:({legend:e,fieldOrDatumDef:t,scaleType:i})=>{const{formatType:n}=e;return ej(n,t,i)},gradientLength:e=>{const{legend:t,legendConfig:i}=e;return t.gradientLength??i.gradientLength??function({legendConfig:e,model:t,direction:i,orient:n,scaleType:o}){const{gradientHorizontalMaxLength:r,gradientHorizontalMinLength:s,gradientVerticalMaxLength:a,gradientVerticalMinLength:l}=e;if(iU(o))return"horizontal"===i?"top"===n||"bottom"===n?JZ(t,"width",s,r):s:JZ(t,"height",l,a)}(e)},labelOverlap:({legend:e,legendConfig:t,scaleType:i})=>e.labelOverlap??t.labelOverlap??function(e){if(Cz(["quantile","threshold","log","symlog"],e))return"greedy"}(i),symbolType:({legend:e,markDef:t,channel:i,encoding:n})=>e.symbolType??function(e,t,i,n){if("shape"!==t){const e=GZ(i)??n;if(e)return e}switch(e){case"bar":case"rect":case"image":case"square":return"square";case"line":case"trail":case"rule":return"stroke";case"arc":case"point":case"circle":case"tick":case"geoshape":case"area":case"text":return"circle"}}(t.type,i,n.shape,t.shape),title:({fieldOrDatumDef:e,config:t})=>Wj(e,t,{allowDisabling:!0}),type:({legendType:e,scaleType:t,channel:i})=>{if(HW(i)&&iU(t)){if("gradient"===e)return}else if("symbol"===e)return;return e},values:({fieldOrDatumDef:e,legend:t})=>function(e,t){const i=e.values;return li(i)?Jj(t,i):uH(i)?i:void 0}(t,e)};function QZ({legendConfig:e,legendType:t,orient:i,legend:n}){return n.direction??e[t?"gradientDirection":"symbolDirection"]??function(e,t){switch(e){case"top":case"bottom":return"horizontal";case"left":case"right":case"none":case void 0:return;default:return"gradient"===t?"horizontal":void 0}}(i,t)}function JZ(e,t,i,n){return{signal:`clamp(${e.getSizeSignalRef(t).signal}, ${i}, ${n})`}}function eX(e){const t=xQ(e)?function(e){const{encoding:t}=e,i={};for(const n of[vW,...qq]){const o=jj(t[n]);o&&e.getScaleComponent(n)&&(n===wW&&Cj(o)&&o.type===W$||(i[n]=iX(e,n)))}return i}(e):function(e){const{legends:t,resolve:i}=e.component;for(const n of e.children){eX(n);for(const o of Rz(n.component.legends))i.legend[o]=HZ(e.component.resolve,o),"shared"===i.legend[o]&&(t[o]=nX(t[o],n.component.legends[o]),t[o]||(i.legend[o]="independent",delete t[o]))}for(const n of Rz(t))for(const t of e.children)t.component.legends[n]&&"shared"===i.legend[n]&&delete t.component.legends[n];return t}(e);return e.component.legends=t,t}function tX(e,t,i,n){switch(t){case"disable":return void 0!==i;case"values":return!!i?.values;case"title":if("title"===t&&e===n?.title)return!0}return e===(i||{})[t]}function iX(e,t){let i=e.legend(t);const{markDef:n,encoding:o,config:r}=e,s=r.legend,a=new jZ({},function(e,t){const i=e.scaleName(t);if("trail"===e.mark){if("color"===t)return{stroke:i};if("size"===t)return{strokeWidth:i}}return"color"===t?e.markDef.filled?{fill:i}:{stroke:i}:{[t]:i}}(e,t));!function(e,t,i){const n=e.fieldDef(t)?.field;for(const o of Oz(e.component.selection??{})){const e=o.project.hasField[n]??o.project.hasChannel[t];if(e&&BY.defined(o)){const t=i.get("selections")??[];t.push(o.name),i.set("selections",t,!1),e.hasLegend=!0}}}(e,t,a);const l=void 0!==i?!i:s.disable;if(a.set("disable",l,void 0!==i),l)return a;i=i||{};const c=e.getScaleComponent(t).get("type"),u=jj(o[t]),h=Cj(u)?C$(u.timeUnit)?.unit:void 0,d=i.orient||r.legend.orient||"right",g=function(e){const{legend:t}=e;return Yz(t.type,function({channel:e,timeUnit:t,scaleType:i}){if(HW(e)){if(Cz(["quarter","month","day"],t))return"symbol";if(iU(i))return"gradient"}return"symbol"}(e))}({legend:i,channel:t,timeUnit:h,scaleType:c}),f={legend:i,channel:t,model:e,markDef:n,encoding:o,fieldOrDatumDef:u,legendConfig:s,config:r,scaleType:c,orient:d,legendType:g,direction:QZ({legend:i,legendType:g,orient:d,legendConfig:s})};for(const n of UZ){if("gradient"===g&&n.startsWith("symbol")||"symbol"===g&&n.startsWith("gradient"))continue;const o=n in XZ?XZ[n](f):i[n];if(void 0!==o){const s=tX(o,n,i,e.fieldDef(t));(s||void 0===r.legend[n])&&a.set(n,o,s)}}const p=i?.encoding??{},m=a.get("selections"),_={},v={fieldOrDatumDef:u,model:e,channel:t,legendCmpt:a,legendType:g};for(const t of["labels","legend","title","symbols","gradient","entries"]){const i=WZ(p[t]??{},e),n=t in qZ?qZ[t](i,v):i;void 0===n||Tz(n)||(_[t]={...m?.length&&Cj(u)?{name:`${Bz(u.field)}_legend_${t}`}:{},...m?.length?{interactive:!!m}:{},update:n})}return Tz(_)||a.set("encode",_,!!i?.encoding),a}function nX(e,t){if(!e)return t.clone();const i=e.getWithExplicit("orient"),n=t.getWithExplicit("orient");if(i.explicit&&n.explicit&&i.value!==n.value)return;let o=!1;for(const i of UZ){const n=DG(e.getWithExplicit(i),t.getWithExplicit(i),i,"legend",((e,t)=>{switch(i){case"symbolType":return n=e,"circle"===(r=t).value?r:n;case"title":return MH(e,t);case"type":return o=!0,SG("symbol")}var n,r;return kG(e,t,i,"legend")}));e.setWithExplicit(i,n)}return o&&(e.implicit?.encode?.gradient&&Wz(e.implicit,["encode","gradient"]),e.explicit?.encode?.gradient&&Wz(e.explicit,["encode","gradient"])),e}function oX(e){const t=e.component.legends,i={};for(const n of Rz(t)){const o=e.getScaleComponent(n),r=bz(o.get("domains"));if(i[r])for(const e of i[r])nX(e,t[n])||i[r].push(t[n]);else i[r]=[t[n].clone()]}return Oz(i).flat().map((t=>function(e,t){const{disable:i,labelExpr:n,selections:o,...r}=e.combine();if(!i){if(!1===t.aria&&null==r.aria&&(r.aria=!1),r.encode?.symbols){const e=r.encode.symbols.update;!e.fill||"transparent"===e.fill.value||e.stroke||r.stroke||(e.stroke={value:"transparent"});for(const t of qq)r[t]&&delete e[t]}if(r.title||delete r.title,void 0!==n){let e=n;r.encode?.labels?.update&&uH(r.encode.labels.update.text)&&(e=qz(n,"datum.label",r.encode.labels.update.text.signal)),function(e,t,i,n){var o,r;e.encode??(e.encode={}),(o=e.encode)[t]??(o[t]={}),(r=e.encode[t]).update??(r.update={}),e.encode[t].update.text=n}(r,"labels",0,{signal:e})}return r}}(t,e.config))).filter((e=>void 0!==e))}function rX(e){const t=e.component.projection;if(!t||t.merged)return[];const i=t.combine(),{name:n}=i;if(t.data){const o={signal:`[${t.size.map((e=>e.signal)).join(", ")}]`},r=t.data.reduce(((t,i)=>{const n=uH(i)?i.signal:`data('${e.lookupDataSource(i)}')`;return Cz(t,n)||t.push(n),t}),[]);if(r.length<=0)throw new Error("Projection's fit didn't find any data sources");return[{name:n,size:o,fit:{signal:r.length>1?`[${r.join(", ")}]`:r[0]},...i}]}return[{name:n,translate:{signal:"[width / 2, height / 2]"},...i}]}const sX=["type","clipAngle","clipExtent","center","rotate","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];class aX extends wG{constructor(e,t,i,n){super({...t},{name:e}),this.specifiedProjection=t,this.size=i,this.data=n,this.merged=!1}get isFit(){return!!this.data}}function lX(e){e.component.projection=xQ(e)?function(e){if(e.hasProjection){const t=aH(e.specifiedProjection),i=!(t&&(null!=t.scale||null!=t.translate)),n=i?[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]:void 0,o=i?function(e){const t=[],{encoding:i}=e;for(const n of[[pW,fW],[_W,mW]])(jj(i[n[0]])||jj(i[n[1]]))&&t.push({signal:e.getName(`geojson_${t.length}`)});return e.channelHasField(wW)&&e.typedFieldDef(wW).type===W$&&t.push({signal:e.getName(`geojson_${t.length}`)}),0===t.length&&t.push(e.requestDataName(OG.Main)),t}(e):void 0,r=new aX(e.projectionName(!0),{...aH(e.config.projection)??{},...t??{}},n,o);return r.get("type")||r.set("type","equalEarth",!1),r}}(e):function(e){if(0===e.children.length)return;let t;for(const t of e.children)lX(t);const i=xz(e.children,(e=>{const i=e.component.projection;if(i){if(t){const e=function(e,t){const i=xz(sX,(i=>!Ki(e.explicit,i)&&!Ki(t.explicit,i)||!!(Ki(e.explicit,i)&&Ki(t.explicit,i)&&pz(e.get(i),t.get(i)))));if(pz(e.size,t.size)){if(i)return e;if(pz(e.explicit,{}))return t;if(pz(t.explicit,{}))return e}return null}(t,i);return e&&(t=e),!!e}return t=i,!0}return!0}));if(t&&i){const i=e.projectionName(!0),n=new aX(i,t.specifiedProjection,t.size,mz(t.data));for(const t of e.children){const e=t.component.projection;e&&(e.isFit&&n.data.push(...t.component.projection.data),t.renameProjection(e.get("name"),i),e.merged=!0)}return n}}(e)}function cX(e,t,i,n){if(eq(t,i)){const o=xQ(e)?e.axis(i)??e.legend(i)??{}:{},r=Oj(t,{expr:"datum"}),s=Oj(t,{expr:"datum",binSuffix:"end"});return{formulaAs:Oj(t,{binSuffix:"range",forAs:!0}),formula:oj(r,s,o.format,o.formatType,n)}}return{}}function uX(e,t){return`${eH(e)}_${t}`}function hX(e,t,i){const n=uX(Yj(i,void 0)??{},t);return e.getName(`${n}_bins`)}function dX(e,t,i){let n,o;n=function(e){return"as"in e}(e)?rn(e.as)?[e.as,`${e.as}_end`]:[e.as[0],e.as[1]]:[Oj(e,{forAs:!0}),Oj(e,{binSuffix:"end",forAs:!0})];const r={...Yj(t,void 0)},s=uX(r,e.field),{signal:a,extentSignal:l}=function(e,t){return{signal:e.getName(`${t}_bins`),extentSignal:e.getName(`${t}_extent`)}}(i,s);if(oH(r.extent)){const e=r.extent;o=rZ(i,e.param,e),delete r.extent}return{key:s,binComponent:{bin:r,field:e.field,as:[n],...a?{signal:a}:{},...l?{extentSignal:l}:{},...o?{span:o}:{}}}}class gX extends VG{constructor(e,t){super(e),this.bins=t}clone(){return new gX(null,mz(this.bins))}static makeFromEncoding(e,t){const i=t.reduceFieldDef(((e,i,n)=>{if(Nj(i)&&tH(i.bin)){const{key:o,binComponent:r}=dX(i,i.bin,t);e[o]={...r,...e[o],...cX(t,i,n,t.config)}}return e}),{});return Tz(i)?null:new gX(e,i)}static makeFromTransform(e,t,i){const{key:n,binComponent:o}=dX(t,t.bin,i);return new gX(e,{[n]:o})}merge(e,t){for(const i of Rz(e.bins))i in this.bins?(t(e.bins[i].signal,this.bins[i].signal),this.bins[i].as=Lz([...this.bins[i].as,...e.bins[i].as],yz)):this.bins[i]=e.bins[i];for(const t of e.children)e.removeChild(t),t.parent=this;e.remove()}producedFields(){return new Set(Oz(this.bins).map((e=>e.as)).flat(2))}dependentFields(){return new Set(Oz(this.bins).map((e=>e.field)))}hash(){return`Bin ${yz(this.bins)}`}assemble(){return Oz(this.bins).flatMap((e=>{const t=[],[i,...n]=e.as,{extent:o,...r}=e.bin,s={type:"bin",field:jz(e.field),as:i,signal:e.signal,...oH(o)?{extent:null}:{extent:o},...e.span?{span:{signal:`span(${e.span})`}}:{},...r};!o&&e.extentSignal&&(t.push({type:"extent",field:jz(e.field),signal:e.extentSignal}),s.extent={signal:e.extentSignal}),t.push(s);for(const e of n)for(let n=0;n<2;n++)t.push({type:"formula",expr:Oj({field:i[n]},{expr:"datum"}),as:e[n]});return e.formula&&t.push({type:"formula",expr:e.formula,as:e.formulaAs}),t}))}}class fX extends VG{constructor(e,t,i){super(e),this.dimensions=t,this.measures=i}clone(){return new fX(null,new Set(this.dimensions),mz(this.measures))}get groupBy(){return this.dimensions}static makeFromEncoding(e,t){let i=!1;t.forEachFieldDef((e=>{e.aggregate&&(i=!0)}));const n={},o=new Set;return i?(t.forEachFieldDef(((e,i)=>{const{aggregate:r,field:s}=e;if(r)if("count"===r)n["*"]??(n["*"]={}),n["*"].count=new Set([Oj(e,{forAs:!0})]);else{if(KV(r)||GV(r)){const e=KV(r)?"argmin":"argmax",t=r[e];n[t]??(n[t]={}),n[t][e]=new Set([Oj({op:e,field:t},{forAs:!0})])}else n[s]??(n[s]={}),n[s][r]=new Set([Oj(e,{forAs:!0})]);WV(i)&&"unaggregated"===t.scaleDomain(i)&&(n[s]??(n[s]={}),n[s].min=new Set([Oj({field:s,aggregate:"min"},{forAs:!0})]),n[s].max=new Set([Oj({field:s,aggregate:"max"},{forAs:!0})]))}else!function(e,t,i,n){const o=xQ(n)?n.encoding[sV(t)]:void 0;if(Nj(i)&&xQ(n)&&vj(i,o,n.markDef,n.config))e.add(Oj(i,{})),e.add(Oj(i,{suffix:"end"})),i.bin&&eq(i,t)&&e.add(Oj(i,{binSuffix:"range"}));else if(t in zW){const i=function(e){switch(e){case fW:return"y";case mW:return"y2";case pW:return"x";case _W:return"x2"}}(t);e.add(n.getName(i))}else e.add(Oj(i))}(o,i,e,t)})),o.size+Rz(n).length===0?null:new fX(e,o,n)):null}static makeFromTransform(e,t){const i=new Set,n={};for(const e of t.aggregate){const{op:t,field:i,as:o}=e;t&&("count"===t?(n["*"]??(n["*"]={}),n["*"].count=new Set([o||Oj(e,{forAs:!0})])):(n[i]??(n[i]={}),n[i][t]=new Set([o||Oj(e,{forAs:!0})])))}for(const e of t.groupby??[])i.add(e);return i.size+Rz(n).length===0?null:new fX(e,i,n)}merge(e){return Ez(this.dimensions,e.dimensions)?(function(e,t){for(const i of Rz(t)){const n=t[i];for(const t of Rz(n))i in e?e[i][t]=new Set([...e[i][t]??[],...n[t]]):e[i]={[t]:n[t]}}}(this.measures,e.measures),!0):(function(...e){s$.debug(...e)}("different dimensions, cannot merge"),!1)}addDimensions(e){e.forEach(this.dimensions.add,this.dimensions)}dependentFields(){return new Set([...this.dimensions,...Rz(this.measures)])}producedFields(){const e=new Set;for(const t of Rz(this.measures))for(const i of Rz(this.measures[t])){const n=this.measures[t][i];0===n.size?e.add(`${i}_${t}`):n.forEach(e.add,e)}return e}hash(){return`Aggregate ${yz({dimensions:this.dimensions,measures:this.measures})}`}assemble(){const e=[],t=[],i=[];for(const n of Rz(this.measures))for(const o of Rz(this.measures[n]))for(const r of this.measures[n][o])i.push(r),e.push(o),t.push("*"===n?null:jz(n));return{type:"aggregate",groupby:[...this.dimensions].map(jz),ops:e,fields:t,as:i}}}class pX extends VG{constructor(e,t,i,n){super(e),this.model=t,this.name=i,this.data=n;for(const e of UW){const i=t.facet[e];if(i){const{bin:n,sort:o}=i;this[e]={name:t.getName(`${e}_domain`),fields:[Oj(i),...tH(n)?[Oj(i,{binSuffix:"end"})]:[]],...cj(o)?{sortField:o}:li(o)?{sortIndexField:bZ(i,e)}:{}}}}this.childModel=t.child}hash(){let e="Facet";for(const t of UW)this[t]&&(e+=` ${t.charAt(0)}:${yz(this[t])}`);return e}get fields(){const e=[];for(const t of UW)this[t]?.fields&&e.push(...this[t].fields);return e}dependentFields(){const e=new Set(this.fields);for(const t of UW)this[t]&&(this[t].sortField&&e.add(this[t].sortField.field),this[t].sortIndexField&&e.add(this[t].sortIndexField));return e}producedFields(){return new Set}getSource(){return this.name}getChildIndependentFieldsWithStep(){const e={};for(const t of SV){const i=this.childModel.component.scales[t];if(i&&!i.merged){const n=i.get("type"),o=i.get("range");if(eU(n)&&hH(o)){const i=oQ(rQ(this.childModel,t));i?e[t]=i:a$(FH(t))}}}return e}assembleRowColumnHeaderData(e,t,i){const n={row:"y",column:"x",facet:void 0}[e],o=[],r=[],s=[];n&&i&&i[n]&&(t?(o.push(`distinct_${i[n]}`),r.push("max")):(o.push(i[n]),r.push("distinct")),s.push(`distinct_${i[n]}`));const{sortField:a,sortIndexField:l}=this[e];if(a){const{op:e=rj,field:t}=a;o.push(t),r.push(e),s.push(Oj(a,{forAs:!0}))}else l&&(o.push(l),r.push("max"),s.push(l));return{name:this[e].name,source:t??this.data,transform:[{type:"aggregate",groupby:this[e].fields,...o.length?{fields:o,ops:r,as:s}:{}}]}}assembleFacetHeaderData(e){const{columns:t}=this.model.layout,{layoutHeaders:i}=this.model.component,n=[],o={};for(const e of SZ){for(const t of xZ){const n=(i[e]&&i[e][t])??[];for(const t of n)if(t.axes?.length>0){o[e]=!0;break}}if(o[e]){const i=`length(data("${this.facet.name}"))`,o="row"===e?t?{signal:`ceil(${i} / ${t})`}:1:t?{signal:`min(${i}, ${t})`}:{signal:i};n.push({name:`${this.facet.name}_${e}`,transform:[{type:"sequence",start:0,stop:o}]})}}const{row:r,column:s}=o;return(r||s)&&n.unshift(this.assembleRowColumnHeaderData("facet",null,e)),n}assemble(){const e=[];let t=null;const i=this.getChildIndependentFieldsWithStep(),{column:n,row:o,facet:r}=this;if(n&&o&&(i.x||i.y)){t=`cross_${this.column.name}_${this.row.name}`;const n=[].concat(i.x??[],i.y??[]),o=n.map((()=>"distinct"));e.push({name:t,source:this.data,transform:[{type:"aggregate",groupby:this.fields,fields:n,ops:o}]})}for(const n of[oW,nW])this[n]&&e.push(this.assembleRowColumnHeaderData(n,t,i));if(r){const t=this.assembleFacetHeaderData(i);t&&e.push(...t)}return e}}function mX(e){return"'"===e[0]&&"'"===e[e.length-1]||'"'===e[0]&&'"'===e[e.length-1]?e.slice(1,-1):e}function _X(e){const t={};return gz(e.filter,(e=>{if(A$(e)){let i=null;S$(e)?i=_H(e.equal):k$(e)?i=_H(e.lte):x$(e)?i=_H(e.lt):D$(e)?i=_H(e.gt):L$(e)?i=_H(e.gte):N$(e)?i=e.range[0]:E$(e)&&(i=(e.oneOf??e.in)[0]),i&&(l$(i)?t[e.field]="date":nn(i)?t[e.field]="number":rn(i)&&(t[e.field]="string")),e.timeUnit&&(t[e.field]="date")}})),t}class vX extends VG{constructor(e,t){super(e),this._parse=t}clone(){return new vX(null,mz(this._parse))}hash(){return`Parse ${yz(this._parse)}`}static makeExplicit(e,t,i){let n={};const o=t.data;return!MG(o)&&o&&o.format&&o.format.parse&&(n=o.format.parse),this.makeWithAncestors(e,n,{},i)}static makeWithAncestors(e,t,i,n){for(const e of Rz(i)){const t=n.getWithExplicit(e);void 0!==t.value&&(t.explicit||t.value===i[e]||"derived"===t.value||"flatten"===i[e]?delete i[e]:a$(VH(e,i[e],t.value)))}for(const e of Rz(t)){const i=n.get(e);void 0!==i&&(i===t[e]?delete t[e]:a$(VH(e,t[e],i)))}const o=new wG(t,i);n.copyAll(o);const r={};for(const e of Rz(o.combine())){const t=o.get(e);null!==t&&(r[e]=t)}return 0===Rz(r).length||n.parseNothing?null:new vX(e,r)}get parse(){return this._parse}merge(e){this._parse={...this._parse,...e.parse},e.remove()}assembleFormatParse(){const e={};for(const t of Rz(this._parse)){const i=this._parse[t];1===Gz(t)&&(e[t]=i)}return e}producedFields(){return new Set(Rz(this._parse))}dependentFields(){return new Set(Rz(this._parse))}assembleTransforms(e=!1){return Rz(this._parse).filter((t=>!e||Gz(t)>1)).map((e=>{const t=function(e,t){const i=Hz(e);return"number"===t?`toNumber(${i})`:"boolean"===t?`toBoolean(${i})`:"string"===t?`toString(${i})`:"date"===t?`toDate(${i})`:"flatten"===t?i:t.startsWith("date:")?`timeParse(${i},'${mX(t.slice(5,t.length))}')`:t.startsWith("utc:")?`utcParse(${i},'${mX(t.slice(4,t.length))}')`:(a$(`Unrecognized parse "${t}".`),null)}(e,this._parse[e]);return t?{type:"formula",expr:t,as:Kz(e)}:null})).filter((e=>null!==e))}}class bX extends VG{clone(){return new bX(null)}constructor(e){super(e)}dependentFields(){return new Set}producedFields(){return new Set([Gq])}hash(){return"Identifier"}assemble(){return{type:"identifier",as:Gq}}}class yX extends VG{constructor(e,t){super(e),this.params=t}clone(){return new yX(null,this.params)}dependentFields(){return new Set}producedFields(){}hash(){return`Graticule ${yz(this.params)}`}assemble(){return{type:"graticule",...!0===this.params?{}:this.params}}}class wX extends VG{constructor(e,t){super(e),this.params=t}clone(){return new wX(null,this.params)}dependentFields(){return new Set}producedFields(){return new Set([this.params.as??"data"])}hash(){return`Hash ${yz(this.params)}`}assemble(){return{type:"sequence",...this.params}}}class CX extends VG{constructor(e){let t;if(super(null),e??(e={name:"source"}),MG(e)||(t=e.format?{...vz(e.format,["parse"])}:{}),EG(e))this._data={values:e.values};else if(NG(e)){if(this._data={url:e.url},!t.type){let i=/(?:\.([^.]+))?$/.exec(e.url)[1];Cz(["json","csv","tsv","dsv","topojson"],i)||(i="json"),t.type=i}}else TG(e)?this._data={values:[{type:"Sphere"}]}:(AG(e)||MG(e))&&(this._data={});this._generator=MG(e),e.name&&(this._name=e.name),t&&!Tz(t)&&(this._data.format=t)}dependentFields(){return new Set}producedFields(){}get data(){return this._data}hasName(){return!!this._name}get isGenerator(){return this._generator}get dataName(){return this._name}set dataName(e){this._name=e}set parent(e){throw new Error("Source nodes have to be roots.")}remove(){throw new Error("Source nodes are roots and cannot be removed.")}hash(){throw new Error("Cannot hash sources")}assemble(){return{name:this._name,...this._data,transform:[]}}}var SX,xX=function(e,t,i){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,i),i};function kX(e){return e instanceof CX||e instanceof yX||e instanceof wX}class DX{constructor(){SX.set(this,void 0),xX(this,SX,!1)}setModified(){xX(this,SX,!0)}get modifiedFlag(){return function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}(this,SX)}}SX=new WeakMap;class LX extends DX{getNodeDepths(e,t,i){i.set(e,t);for(const n of e.children)this.getNodeDepths(n,t+1,i);return i}optimize(e){const t=[...this.getNodeDepths(e,0,new Map).entries()].sort(((e,t)=>t[1]-e[1]));for(const e of t)this.run(e[0]);return this.modifiedFlag}}class NX extends DX{optimize(e){this.run(e);for(const t of e.children)this.optimize(t);return this.modifiedFlag}}class EX extends NX{mergeNodes(e,t){const i=t.shift();for(const n of t)e.removeChild(n),n.parent=i,n.remove()}run(e){const t=e.children.map((e=>e.hash())),i={};for(let n=0;n1&&(this.setModified(),this.mergeNodes(e,i[t]))}}class AX extends NX{constructor(e){super(),this.requiresSelectionId=e&&QY(e)}run(e){e instanceof bX&&(this.requiresSelectionId&&(kX(e.parent)||e.parent instanceof fX||e.parent instanceof vX)||(this.setModified(),e.remove()))}}class MX extends DX{optimize(e){return this.run(e,new Set),this.modifiedFlag}run(e,t){let i=new Set;e instanceof $G&&(i=e.producedFields(),Az(i,t)&&(this.setModified(),e.removeFormulas(t),0===e.producedFields.length&&e.remove()));for(const n of e.children)this.run(n,new Set([...t,...i]))}}class IX extends NX{constructor(){super()}run(e){e instanceof HG&&!e.isRequired()&&(this.setModified(),e.remove())}}class TX extends LX{run(e){if(!(kX(e)||e.numChildren()>1))for(const t of e.children)if(t instanceof vX)if(e instanceof vX)this.setModified(),e.merge(t);else{if(Iz(e.producedFields(),t.dependentFields()))continue;this.setModified(),t.swapWithParent()}}}class RX extends LX{run(e){const t=[...e.children],i=e.children.filter((e=>e instanceof vX));if(e.numChildren()>1&&i.length>=1){const n={},o=new Set;for(const e of i){const t=e.parse;for(const e of Rz(t))e in n?n[e]!==t[e]&&o.add(e):n[e]=t[e]}for(const e of o)delete n[e];if(!Tz(n)){this.setModified();const i=new vX(e,n);for(const o of t){if(o instanceof vX)for(const e of Rz(n))delete o.parse[e];e.removeChild(o),o.parent=i,o instanceof vX&&0===Rz(o.parse).length&&o.remove()}}}}}class OX extends LX{run(e){e instanceof HG||e.numChildren()>0||e instanceof pX||e instanceof CX||(this.setModified(),e.remove())}}class FX extends LX{run(e){const t=e.children.filter((e=>e instanceof $G)),i=t.pop();for(const e of t)this.setModified(),i.merge(e)}}class PX extends LX{run(e){const t=e.children.filter((e=>e instanceof fX)),i={};for(const e of t){const t=yz(e.groupBy);t in i||(i[t]=[]),i[t].push(e)}for(const t of Rz(i)){const n=i[t];if(n.length>1){const t=n.pop();for(const i of n)t.merge(i)&&(e.removeChild(i),i.parent=t,i.remove(),this.setModified())}}}}class BX extends LX{constructor(e){super(),this.model=e}run(e){const t=!(kX(e)||e instanceof nZ||e instanceof vX||e instanceof bX),i=[],n=[];for(const o of e.children)o instanceof gX&&(t&&!Iz(e.producedFields(),o.dependentFields())?i.push(o):n.push(o));if(i.length>0){const t=i.pop();for(const e of i)t.merge(e,this.model.renameSignal.bind(this.model));this.setModified(),e instanceof gX?e.merge(t,this.model.renameSignal.bind(this.model)):t.swapWithParent()}if(n.length>1){const e=n.pop();for(const t of n)e.merge(t,this.model.renameSignal.bind(this.model));this.setModified()}}}class zX extends LX{run(e){const t=[...e.children];if(!Sz(t,(e=>e instanceof HG))||e.numChildren()<=1)return;const i=[];let n;for(const o of t)if(o instanceof HG){let t=o;for(;1===t.numChildren();){const[e]=t.children;if(!(e instanceof HG))break;t=e}i.push(...t.children),n?(e.removeChild(o),o.parent=n.parent,n.parent.removeChild(n),n.parent=t,this.setModified()):n=t}else i.push(o);if(i.length){this.setModified();for(const e of i)e.parent.removeChild(e),e.parent=n}}}class WX extends VG{constructor(e,t){super(e),this.transform=t}clone(){return new WX(null,mz(this.transform))}addDimensions(e){this.transform.groupby=Lz(this.transform.groupby.concat(e),(e=>e))}dependentFields(){const e=new Set;return this.transform.groupby&&this.transform.groupby.forEach(e.add,e),this.transform.joinaggregate.map((e=>e.field)).filter((e=>void 0!==e)).forEach(e.add,e),e}producedFields(){return new Set(this.transform.joinaggregate.map(this.getDefaultName))}getDefaultName(e){return e.as??Oj(e)}hash(){return`JoinAggregateTransform ${yz(this.transform)}`}assemble(){const e=[],t=[],i=[];for(const n of this.transform.joinaggregate)t.push(n.op),i.push(this.getDefaultName(n)),e.push(void 0===n.field?null:n.field);const n=this.transform.groupby;return{type:"joinaggregate",as:i,ops:t,fields:e,...void 0!==n?{groupby:n}:{}}}}class VX extends VG{constructor(e,t){super(e),this._stack=t}clone(){return new VX(null,mz(this._stack))}static makeFromTransform(e,t){const{stack:i,groupby:n,as:o,offset:r="zero"}=t,s=[],a=[];if(void 0!==t.sort)for(const e of t.sort)s.push(e.field),a.push(Yz(e.order,"ascending"));const l={field:s,order:a};let c;return c=function(e){return li(e)&&e.every((e=>rn(e)))&&e.length>1}(o)?o:rn(o)?[o,`${o}_end`]:[`${t.stack}_start`,`${t.stack}_end`],new VX(e,{stackField:i,groupby:n,offset:r,sort:l,facetby:[],as:c})}static makeFromEncoding(e,t){const i=t.stack,{encoding:n}=t;if(!i)return null;const{groupbyChannel:o,fieldChannel:r,offset:s,impute:a}=i;let l;o&&(l=Uj(n[o]));const c=function(e){return e.stack.stackBy.reduce(((e,t)=>{const i=Oj(t.fieldDef);return i&&e.push(i),e}),[])}(t),u=t.encoding.order;let h;return h=li(u)||Cj(u)?NH(u):c.reduce(((e,t)=>(e.field.push(t),e.order.push("y"===r?"descending":"ascending"),e)),{field:[],order:[]}),new VX(e,{dimensionFieldDef:l,stackField:t.vgField(r),facetby:[],stackby:c,sort:h,offset:s,impute:a,as:[t.vgField(r,{suffix:"start",forAs:!0}),t.vgField(r,{suffix:"end",forAs:!0})]})}get stack(){return this._stack}addDimensions(e){this._stack.facetby.push(...e)}dependentFields(){const e=new Set;return e.add(this._stack.stackField),this.getGroupbyFields().forEach(e.add,e),this._stack.facetby.forEach(e.add,e),this._stack.sort.field.forEach(e.add,e),e}producedFields(){return new Set(this._stack.as)}hash(){return`Stack ${yz(this._stack)}`}getGroupbyFields(){const{dimensionFieldDef:e,impute:t,groupby:i}=this._stack;return e?e.bin?t?[Oj(e,{binSuffix:"mid"})]:[Oj(e,{}),Oj(e,{binSuffix:"end"})]:[Oj(e)]:i??[]}assemble(){const e=[],{facetby:t,dimensionFieldDef:i,stackField:n,stackby:o,sort:r,offset:s,impute:a,as:l}=this._stack;if(a&&i){const{bandPosition:r=.5,bin:s}=i;s&&e.push({type:"formula",expr:`${r}*`+Oj(i,{expr:"datum"})+`+${1-r}*`+Oj(i,{expr:"datum",binSuffix:"end"}),as:Oj(i,{binSuffix:"mid",forAs:!0})}),e.push({type:"impute",field:n,groupby:[...o,...t],key:Oj(i,{binSuffix:"mid"}),method:"value",value:0})}return e.push({type:"stack",groupby:[...this.getGroupbyFields(),...t],field:n,sort:r,as:l,offset:s}),e}}class HX extends VG{constructor(e,t){super(e),this.transform=t}clone(){return new HX(null,mz(this.transform))}addDimensions(e){this.transform.groupby=Lz(this.transform.groupby.concat(e),(e=>e))}dependentFields(){const e=new Set;return(this.transform.groupby??[]).forEach(e.add,e),(this.transform.sort??[]).forEach((t=>e.add(t.field))),this.transform.window.map((e=>e.field)).filter((e=>void 0!==e)).forEach(e.add,e),e}producedFields(){return new Set(this.transform.window.map(this.getDefaultName))}getDefaultName(e){return e.as??Oj(e)}hash(){return`WindowTransform ${yz(this.transform)}`}assemble(){const e=[],t=[],i=[],n=[];for(const o of this.transform.window)t.push(o.op),i.push(this.getDefaultName(o)),n.push(void 0===o.param?null:o.param),e.push(void 0===o.field?null:o.field);const o=this.transform.frame,r=this.transform.groupby;if(o&&null===o[0]&&null===o[1]&&t.every((e=>YV(e))))return{type:"joinaggregate",as:i,ops:t,fields:e,...void 0!==r?{groupby:r}:{}};const s=[],a=[];if(void 0!==this.transform.sort)for(const e of this.transform.sort)s.push(e.field),a.push(e.order??"ascending");const l={field:s,order:a},c=this.transform.ignorePeers;return{type:"window",params:n,as:i,ops:t,fields:e,sort:l,...void 0!==c?{ignorePeers:c}:{},...void 0!==r?{groupby:r}:{},...void 0!==o?{frame:o}:{}}}}function $X(e){if(e instanceof pX)if(1!==e.numChildren()||e.children[0]instanceof HG){const i=e.model.component.data.main;UX(i);const n=(t=e,function e(i){if(!(i instanceof pX)){const n=i.clone();if(n instanceof HG){const e=jX+n.getSource();n.setSource(e),t.model.component.data.outputNodes[e]=n}else(n instanceof fX||n instanceof VX||n instanceof HX||n instanceof WX)&&n.addDimensions(t.fields);for(const t of i.children.flatMap(e))t.parent=n;return[n]}return i.children.flatMap(e)}),o=e.children.map(n).flat();for(const e of o)e.parent=i}else{const t=e.children[0];(t instanceof fX||t instanceof VX||t instanceof HX||t instanceof WX)&&t.addDimensions(e.fields),t.swapWithParent(),$X(e)}else e.children.map($X);var t}function UX(e){if(e instanceof HG&&e.type===OG.Main&&1===e.numChildren()){const t=e.children[0];t instanceof pX||(t.swapWithParent(),UX(e))}}const jX="scale_";function qX(e){for(const t of e){for(const e of t.children)if(e.parent!==t)return!1;if(!qX(t.children))return!1}return!0}function KX(e,t){let i=!1;for(const n of t)i=e.optimize(n)||i;return i}function GX(e,t,i){let n=e.sources,o=!1;return o=KX(new IX,n)||o,o=KX(new AX(t),n)||o,n=n.filter((e=>e.numChildren()>0)),o=KX(new OX,n)||o,n=n.filter((e=>e.numChildren()>0)),i||(o=KX(new TX,n)||o,o=KX(new BX(t),n)||o,o=KX(new MX,n)||o,o=KX(new RX,n)||o,o=KX(new PX,n)||o,o=KX(new FX,n)||o,o=KX(new EX,n)||o,o=KX(new zX,n)||o),e.sources=n,o}class YX{constructor(e){Object.defineProperty(this,"signal",{enumerable:!0,get:e})}static fromName(e,t){return new YX((()=>e(t)))}}function ZX(e){xQ(e)?function(e){const t=e.component.scales;for(const i of Rz(t)){const n=XX(e,i);if(t[i].setWithExplicit("domains",n),tQ(e,i),e.component.data.isFaceted){let t=e;for(;!kQ(t)&&t.parent;)t=t.parent;if("shared"===t.component.resolve.scale[i])for(const e of n.value)dH(e)&&(e.data=jX+e.data.replace(jX,""))}}}(e):function(e){for(const t of e.children)ZX(t);const t=e.component.scales;for(const i of Rz(t)){let n,o=null;for(const t of e.children){const e=t.component.scales[i];if(e){n=void 0===n?e.getWithExplicit("domains"):DG(n,e.getWithExplicit("domains"),"domains","scale",nQ);const t=e.get("selectionExtent");o&&t&&o.param!==t.param&&a$("The same selection must be used to override scale domains in a layered view."),o=t}}t[i].setWithExplicit("domains",n),o&&t[i].set("selectionExtent",o,!0)}}(e)}function XX(e,t){const i=e.getScaleComponent(t).get("type"),{encoding:n}=e,o=function(e,t,i,n){if("unaggregated"===e){const{valid:e,reason:n}=iQ(t,i);if(!e)return void a$(n)}else if(void 0===e&&n.useUnaggregatedDomain){const{valid:e}=iQ(t,i);if(e)return"unaggregated"}return e}(e.scaleDomain(t),e.typedFieldDef(t),i,e.config.scale);return o!==e.scaleDomain(t)&&(e.specifiedScales[t]={...e.specifiedScales[t],domain:o}),"x"===t&&jj(n.x2)?jj(n.x)?DG(JX(i,o,e,"x"),JX(i,o,e,"x2"),"domain","scale",nQ):JX(i,o,e,"x2"):"y"===t&&jj(n.y2)?jj(n.y)?DG(JX(i,o,e,"y"),JX(i,o,e,"y2"),"domain","scale",nQ):JX(i,o,e,"y2"):JX(i,o,e,t)}function QX(e,t,i){const n=C$(i)?.unit;return"temporal"===t||n?function(e,t,i){return e.map((e=>({signal:`{data: ${Qj(e,{timeUnit:i,type:t})}}`})))}(e,t,n):[e]}function JX(e,t,i,n){const{encoding:o}=i,r=jj(o[n]),{type:s}=r,a=r.timeUnit;if(function(e){return e&&e.unionWith}(t)){const o=JX(e,void 0,i,n),r=QX(t.unionWith,s,a);return CG([...o.value,...r])}if(uH(t))return CG([t]);if(t&&"unaggregated"!==t&&!oU(t))return CG(QX(t,s,a));const l=i.stack;if(l&&n===l.fieldChannel){if("normalize"===l.offset)return SG([[0,1]]);const e=i.requestDataName(OG.Main);return SG([{data:e,field:i.vgField(n,{suffix:"start"})},{data:e,field:i.vgField(n,{suffix:"end"})}])}const c=WV(n)&&Cj(r)?function(e,t,i){if(!eU(i))return;const n=e.fieldDef(t),o=n.sort;if(uj(o))return{op:"min",field:bZ(n,t),order:"ascending"};const{stack:r}=e,s=r?[...r.groupbyField?[r.groupbyField]:[],...r.stackBy.map((e=>e.fieldDef.field))]:void 0;if(cj(o))return eQ(o,r&&!Cz(s,o.field));if(lj(o)){const{encoding:t,order:i}=o,n=e.fieldDef(t),{aggregate:a,field:l}=n,c=r&&!Cz(s,l);if(KV(a)||GV(a))return eQ({field:Oj(n),order:i},c);if(YV(a)||!a)return eQ({op:a,field:l,order:i},c)}else{if("descending"===o)return{op:"min",field:e.vgField(t),order:"descending"};if(Cz(["ascending",void 0],o))return!0}}(i,n,e):void 0;if(xj(r))return SG(QX([r.datum],s,a));const u=r;if("unaggregated"===t){const e=i.requestDataName(OG.Main),{field:t}=r;return SG([{data:e,field:Oj({field:t,aggregate:"min"})},{data:e,field:Oj({field:t,aggregate:"max"})}])}if(tH(u.bin)){if(eU(e))return SG("bin-ordinal"===e?[]:[{data:Pz(c)?i.requestDataName(OG.Main):i.requestDataName(OG.Raw),field:i.vgField(n,eq(u,n)?{binSuffix:"range"}:{}),sort:!0!==c&&ci(c)?c:{field:i.vgField(n,{}),op:"min"}}]);{const{bin:e}=u;if(tH(e)){const t=hX(i,u.field,e);return SG([new YX((()=>{const e=i.getSignalName(t);return`[${e}.start, ${e}.stop]`}))])}return SG([{data:i.requestDataName(OG.Main),field:i.vgField(n,{})}])}}if(u.timeUnit&&Cz(["time","utc"],e)&&vj(u,xQ(i)?i.encoding[sV(n)]:void 0,i.markDef,i.config)){const e=i.requestDataName(OG.Main);return SG([{data:e,field:i.vgField(n)},{data:e,field:i.vgField(n,{suffix:"end"})}])}return SG(c?[{data:Pz(c)?i.requestDataName(OG.Main):i.requestDataName(OG.Raw),field:i.vgField(n),sort:c}]:[{data:i.requestDataName(OG.Main),field:i.vgField(n)}])}function eQ(e,t){const{op:i,field:n,order:o}=e;return{op:i??(t?"sum":rj),...n?{field:jz(n)}:{},...o?{order:o}:{}}}function tQ(e,t){const i=e.component.scales[t],n=e.specifiedScales[t].domain,o=e.fieldDef(t)?.bin,r=oU(n)&&n,s=nH(o)&&oH(o.extent)&&o.extent;(r||s)&&i.set("selectionExtent",r??s,!0)}function iQ(e,t){const{aggregate:i,type:n}=e;return i?rn(i)&&!JV[i]?{valid:!1,reason:XH(i)}:"quantitative"===n&&"log"===t?{valid:!1,reason:QH(e)}:{valid:!0}:{valid:!1,reason:ZH(e)}}function nQ(e,t,i,n){return e.explicit&&t.explicit&&a$(function(e,t,i,n){return`Conflicting ${t.toString()} property "${e.toString()}" (${bz(i)} and ${bz(n)}). Using the union of the two domains.`}(i,n,e.value,t.value)),{explicit:e.explicit,value:[...e.value,...t.value]}}function oQ(e){if(dH(e)&&rn(e.field))return e.field;if(function(e){return!li(e)&&"fields"in e&&!("data"in e)}(e)){let t;for(const i of e.fields)if(dH(i)&&rn(i.field))if(t){if(t!==i.field)return a$("Detected faceted independent scales that union domain of multiple fields from different data sources. We will use the first field. The result view size may be incorrect."),t}else t=i.field;return a$("Detected faceted independent scales that union domain of the same fields from different source. We will assume that this is the same field from a different fork of the same data source. However, if this is not the case, the result view size may be incorrect."),t}if(function(e){return!li(e)&&"fields"in e&&"data"in e}(e)){a$("Detected faceted independent scales that union domain of multiple fields from the same data source. We will use the first field. The result view size may be incorrect.");const t=e.fields[0];return rn(t)?t:void 0}}function rQ(e,t){return function(e){const t=Lz(e.map((e=>{if(dH(e)){const{sort:t,...i}=e;return i}return e})),yz),i=Lz(e.map((e=>{if(dH(e)){const t=e.sort;return void 0===t||Pz(t)||("op"in t&&"count"===t.op&&delete t.field,"ascending"===t.order&&delete t.order),t}})).filter((e=>void 0!==e)),yz);if(0===t.length)return;if(1===t.length){const t=e[0];if(dH(t)&&i.length>0){let e=i[0];if(i.length>1)a$(t$),e=!0;else if(ci(e)&&"field"in e){const i=e.field;t.field===i&&(e=!e.order||{order:e.order})}return{...t,sort:e}}return t}const n=Lz(i.map((e=>Pz(e)||!("op"in e)||rn(e.op)&&e.op in qV?e:(a$(function(e){return`Dropping sort property ${bz(e)} as unioned domains only support boolean or op "count", "min", and "max".`}(e)),!0))),yz);let o;1===n.length?o=n[0]:n.length>1&&(a$(t$),o=!0);const r=Lz(e.map((e=>dH(e)?e.data:null)),(e=>e));return 1===r.length&&null!==r[0]?{data:r[0],fields:t.map((e=>e.field)),...o?{sort:o}:{}}:{fields:t,...o?{sort:o}:{}}}(e.component.scales[t].get("domains").map((t=>(dH(t)&&(t.data=e.lookupDataSource(t.data)),t))))}function sQ(e){return LQ(e)||DQ(e)?e.children.reduce(((e,t)=>e.concat(sQ(t))),aQ(e)):aQ(e)}function aQ(e){return Rz(e.component.scales).reduce(((t,i)=>{const n=e.component.scales[i];if(n.merged)return t;const o=n.combine(),{name:r,type:s,selectionExtent:a,domains:l,range:c,reverse:u,...h}=o,d=function(e,t,i,n){if(xV(i)){if(hH(e))return{step:{signal:`${t}_step`}}}else if(ci(e)&&dH(e))return{...e,data:n.lookupDataSource(e.data)};return e}(o.range,r,i,e),g=rQ(e,i),f=a?function(e,t,i,n){const o=rZ(e,t.param,t);return{signal:tU(i.get("type"))&&li(n)&&n[0]>n[1]?`isValid(${o}) && reverse(${o})`:o}}(e,a,n,g):null;return t.push({name:r,type:s,...g?{domain:g}:{},...f?{domainRaw:f}:{},range:d,...void 0!==u?{reverse:u}:{},...h}),t}),[])}class lQ extends wG{constructor(e,t){super({},{name:e}),this.merged=!1,this.setWithExplicit("type",t)}domainDefinitelyIncludesZero(){return!1!==this.get("zero")||Sz(this.get("domains"),(e=>li(e)&&2===e.length&&e[0]<=0&&e[1]>=0))}}const cQ=["range","scheme"];function uQ(e){return"x"===e?"width":"y"===e?"height":void 0}function hQ(e,t){const i=e.fieldDef(t);if(i?.bin){const{bin:n,field:o}=i,r=uQ(t),s=e.getName(r);if(ci(n)&&n.binned&&void 0!==n.step)return new YX((()=>{const i=e.scaleName(t),o=`(domain("${i}")[1] - domain("${i}")[0]) / ${n.step}`;return`${e.getSignalName(s)} / (${o})`}));if(tH(n)){const t=hX(e,o,n);return new YX((()=>{const i=e.getSignalName(t),n=`(${i}.stop - ${i}.start) / ${i}.step`;return`${e.getSignalName(s)} / (${n})`}))}}}function dQ(e,t){const i=t.specifiedScales[e],{size:n}=t,o=t.getScaleComponent(e).get("type");for(const n of cQ)if(void 0!==i[n]){const r=fU(o,n),s=pU(e,n);if(r)if(s)a$(s);else switch(n){case"range":{const n=i.range;if(li(n)){if(xV(e))return CG(n.map((e=>{if("width"===e||"height"===e){const i=t.getName(e),n=t.getSignalName.bind(t);return YX.fromName(n,i)}return e})))}else if(ci(n))return CG({data:t.requestDataName(OG.Main),field:n.field,sort:{op:"min",field:t.vgField(e)}});return CG(n)}case"scheme":return CG(gQ(i[n]))}else a$(JH(o,n,e))}if(e===sW||e===aW){const t=e===sW?"width":"height",i=n[t];if(nK(i)){if(eU(o))return CG({step:i.step});a$(e$(t))}}const{rangeMin:r,rangeMax:s}=i,a=function(e,t){const{size:i,config:n,mark:o,encoding:r}=t,s=t.getSignalName.bind(t),{type:a}=jj(r[e]),l=t.getScaleComponent(e).get("type"),{domain:c,domainMid:u}=t.specifiedScales[e];switch(e){case sW:case aW:{if(Cz(["point","band"],l))if(e!==sW||i.width){if(e===aW&&!i.height){const e=lK(n.view,"height");if(nK(e))return e}}else{const e=lK(n.view,"width");if(nK(e))return e}const o=uQ(e),r=t.getName(o);return e===aW&&tU(l)?[YX.fromName(s,r),0]:[0,YX.fromName(s,r)]}case CW:{const r=fQ(o,t.component.scales[e].get("zero"),n),s=function(e,t,i,n){const o={x:hQ(i,"x"),y:hQ(i,"y")};switch(e){case"bar":case"tick":{if(void 0!==n.scale.maxBandSize)return n.scale.maxBandSize;const e=mQ(t,o,n.view);return nn(e)?e-1:new YX((()=>`${e.signal} - 1`))}case"line":case"trail":case"rule":return n.scale.maxStrokeWidth;case"text":return n.scale.maxFontSize;case"point":case"square":case"circle":{if(n.scale.maxSize)return n.scale.maxSize;const e=mQ(t,o,n.view);return nn(e)?Math.pow(pQ*e,2):new YX((()=>`pow(0.95 * ${e.signal}, 2)`))}}throw new Error(qH("size",e))}(o,i,t,n);return nU(l)?function(e,t,i){const n=()=>{const n=wH(t),o=wH(e),r=`(${n} - ${o}) / (${i} - 1)`;return`sequence(${o}, ${n} + ${r}, ${r})`};return uH(t)?new YX(n):{signal:n()}}(r,s,function(e,t,i,n){switch(e){case"quantile":return t.scale.quantileCount;case"quantize":return t.scale.quantizeCount;case"threshold":return void 0!==i&&li(i)?i.length+1:(a$(function(e){return`Domain for ${e} is required for threshold scale.`}(n)),3)}}(l,n,c,e)):[r,s]}case dW:return[0,2*Math.PI];case SW:return[0,360];case uW:return[0,new YX((()=>`min(${t.getSignalName("width")},${t.getSignalName("height")})/2`))];case LW:return[n.scale.minStrokeWidth,n.scale.maxStrokeWidth];case NW:return[[1,0],[4,2],[2,1],[1,1],[1,2,4,2]];case wW:return"symbol";case vW:case bW:case yW:return"ordinal"===l?"nominal"===a?"category":"ordinal":void 0!==u?"diverging":"rect"===o||"geoshape"===o?"heatmap":"ramp";case xW:case kW:case DW:return[n.scale.minOpacity,n.scale.maxOpacity]}throw new Error(`Scale range undefined for channel ${e}`)}(e,t);return(void 0!==r||void 0!==s)&&fU(o,"rangeMin")&&li(a)&&2===a.length?CG([r??a[0],s??a[1]]):SG(a)}function gQ(e){return function(e){return!rn(e)&&!!e.name}(e)?{scheme:e.name,...vz(e,["name"])}:{scheme:e}}function fQ(e,t,i){if(t)return uH(t)?{signal:`${t.signal} ? 0 : ${fQ(e,!1,i)}`}:0;switch(e){case"bar":case"tick":return i.scale.minBandSize;case"line":case"trail":case"rule":return i.scale.minStrokeWidth;case"text":return i.scale.minFontSize;case"point":case"square":case"circle":return i.scale.minSize}throw new Error(qH("size",e))}const pQ=.95;function mQ(e,t,i){const n=nK(e.width)?e.width.step:aK(i,"width"),o=nK(e.height)?e.height.step:aK(i,"height");return t.x||t.y?new YX((()=>`min(${[t.x?t.x.signal:n,t.y?t.y.signal:o].join(", ")})`)):Math.min(n,o)}function _Q(e,t){xQ(e)?function(e,t){const i=e.component.scales,{config:n,encoding:o,markDef:r,specifiedScales:s}=e;for(const a of Rz(i)){const l=s[a],c=i[a],u=e.getScaleComponent(a),h=jj(o[a]),d=l[t],g=u.get("type"),f=u.get("padding"),p=u.get("paddingInner"),m=fU(g,t),_=pU(a,t);if(void 0!==d&&(m?_&&a$(_):a$(JH(g,t,a))),m&&void 0===_)if(void 0!==d){const e=h.timeUnit,i=h.type;switch(t){case"domainMax":case"domainMin":l$(l[t])||"temporal"===i||e?c.set(t,{signal:Qj(l[t],{type:i,timeUnit:e})},!0):c.set(t,l[t],!0);break;default:c.copyKeyFromObject(t,l)}}else{const i=t in vQ?vQ[t]({model:e,channel:a,fieldOrDatumDef:h,scaleType:g,scalePadding:f,scalePaddingInner:p,domain:l.domain,markDef:r,config:n}):n.scale[t];void 0!==i&&c.set(t,i,!1)}}}(e,t):yQ(e,t)}const vQ={bins:({model:e,fieldOrDatumDef:t})=>Cj(t)?function(e,t){const i=t.bin;if(tH(i)){const n=hX(e,t.field,i);return new YX((()=>e.getSignalName(n)))}if(iH(i)&&nH(i)&&void 0!==i.step)return{step:i.step}}(e,t):void 0,interpolate:({channel:e,fieldOrDatumDef:t})=>function(e,t){if(Cz([vW,bW,yW],e)&&"nominal"!==t)return"hcl"}(e,t.type),nice:({scaleType:e,channel:t,domain:i,fieldOrDatumDef:n})=>function(e,t,i,n){if(!(Uj(n)?.bin||li(i)||Cz([H$,$$],e)))return t in CV||void 0}(e,t,i,n),padding:({channel:e,scaleType:t,fieldOrDatumDef:i,markDef:n,config:o})=>function(e,t,i,n,o,r){if(e in CV){if(iU(t)){if(void 0!==i.continuousPadding)return i.continuousPadding;const{type:t,orient:s}=o;if("bar"===t&&(!Cj(n)||!n.bin&&!n.timeUnit)&&("vertical"===s&&"x"===e||"horizontal"===s&&"y"===e))return r.continuousBandSize}if("point"===t)return i.pointPadding}}(e,t,o.scale,i,n,o.bar),paddingInner:({scalePadding:e,channel:t,markDef:i,config:n})=>function(e,t,i,n){if(void 0===e&&t in CV){const{bandPaddingInner:e,barBandPaddingInner:t,rectBandPaddingInner:o}=n;return Yz(e,"bar"===i?t:o)}}(e,t,i.type,n.scale),paddingOuter:({scalePadding:e,channel:t,scaleType:i,markDef:n,scalePaddingInner:o,config:r})=>function(e,t,i,n,o,r){if(void 0===e&&t in CV&&"band"===i){const{bandPaddingOuter:e}=r;return Yz(e,uH(o)?{signal:`${o.signal}/2`}:o/2)}}(e,t,i,n.type,o,r.scale),reverse:({fieldOrDatumDef:e,scaleType:t,channel:i,config:n})=>function(e,t,i,n){return"x"===i&&void 0!==n.xReverse?tU(e)&&"descending"===t?uH(n.xReverse)?{signal:`!${n.xReverse.signal}`}:!n.xReverse:n.xReverse:!(!tU(e)||"descending"!==t)||void 0}(t,Cj(e)?e.sort:void 0,i,n.scale),zero:({channel:e,fieldOrDatumDef:t,domain:i,markDef:n,scaleType:o})=>function(e,t,i,n,o){if(i&&"unaggregated"!==i&&tU(o)){if(li(i)){const e=i[0],t=i[i.length-1];if(e<=0&&t>=0)return!0}return!1}if("size"===e&&"quantitative"===t.type&&!nU(o))return!0;if((!Cj(t)||!t.bin)&&Cz([...SV,...DV],e)){const{orient:t,type:i}=n;return!Cz(["bar","area","line","trail"],i)||!("horizontal"===t&&"y"===e||"vertical"===t&&"x"===e)}return!1}(e,t,i,n,o)};function bQ(e){xQ(e)?function(e){const t=e.component.scales;for(const i of zV){const n=t[i];if(!n)continue;const o=dQ(i,e);n.setWithExplicit("range",o)}}(e):yQ(e,"range")}function yQ(e,t){const i=e.component.scales;for(const i of e.children)"range"===t?bQ(i):_Q(i,t);for(const n of Rz(i)){let o;for(const i of e.children){const e=i.component.scales[n];e&&(o=DG(o,e.getWithExplicit(t),t,"scale",xG(((e,i)=>{switch(t){case"range":return e.step&&i.step?e.step-i.step:0}return 0}))))}i[n].setWithExplicit(t,o)}}function wQ(e){xQ(e)?e.component.scales=function(e){const{encoding:t,mark:i,markDef:n}=e;return zV.reduce(((o,r)=>{const s=jj(t[r]);if(s&&i===AU&&r===wW&&s.type===W$)return o;let a=s&&s.scale;if(s&&null!==a&&!1!==a){a??(a={});const t=function(e,t,i,n){const o=function(e,t,i){switch(t.type){case"nominal":case"ordinal":if(HW(e)||"discrete"===UV(e))return"shape"===e&&"ordinal"===t.type&&a$(YH(e,"ordinal")),"ordinal";if(e in CV){if(Cz(["rect","bar","image","rule"],i.type))return"band"}else if("arc"===i.type&&e in kV)return"band";return BU(i[aV(e)])||Mj(t)&&t.axis?.tickBand?"band":"point";case"temporal":return HW(e)?"time":"discrete"===UV(e)?(a$(YH(e,"temporal")),"ordinal"):Cj(t)&&t.timeUnit&&C$(t.timeUnit).utc?"utc":"time";case"quantitative":return HW(e)?Cj(t)&&tH(t.bin)?"bin-ordinal":"linear":"discrete"===UV(e)?(a$(YH(e,"quantitative")),"ordinal"):"linear";case"geojson":return}throw new Error($H(t.type))}(t,i,n),{type:r}=e;return WV(t)?void 0!==r?function(e,t){if(!WV(e))return!1;switch(e){case sW:case aW:case dW:case uW:return iU(t)||Cz(["band","point"],t);case CW:case LW:case xW:case kW:case DW:case SW:return iU(t)||nU(t)||Cz(["band","point","ordinal"],t);case vW:case bW:case yW:return"band"!==t;case NW:case wW:return"ordinal"===t||nU(t)}}(t,r)?Cj(i)&&(s=r,a=i.type,!(Cz([P$,z$],a)?void 0===s||eU(s):a===B$?Cz([H$,$$,void 0],s):a!==F$||Cz(["log","pow","sqrt","symlog","quantile","quantize","threshold",V$,void 0],s)))?(a$(function(e,t){return`FieldDef does not work with "${e}" scale. We are using "${t}" scale instead.`}(r,o)),o):r:(a$(function(e,t,i){return`Channel "${e}" does not work with "${t}" scale. We are using "${i}" scale instead.`}(t,r,o)),o):o:null;var s,a}(a,r,s,n);o[r]=new lQ(e.scaleName(`${r}`,!0),{value:t,explicit:a.type===t})}return o}),{})}(e):e.component.scales=function(e){var t;const i=e.component.scales={},n={},o=e.component.resolve;for(const i of e.children){wQ(i);for(const r of Rz(i.component.scales))if((t=o.scale)[r]??(t[r]=VZ(r,e)),"shared"===o.scale[r]){const e=n[r],t=i.component.scales[r].getWithExplicit("type");e?j$(e.value,t.value)?n[r]=DG(e,t,"type","scale",CQ):(o.scale[r]="independent",delete n[r]):n[r]=t}}for(const t of Rz(n)){const o=e.scaleName(t,!0),r=n[t];i[t]=new lQ(o,r);for(const i of e.children){const e=i.component.scales[t];e&&(i.renameScale(e.get("name"),o),e.merged=!0)}}return i}(e)}const CQ=xG(((e,t)=>K$(e)-K$(t)));class SQ{constructor(){this.nameMap={}}rename(e,t){this.nameMap[e]=t}has(e){return void 0!==this.nameMap[e]}get(e){for(;this.nameMap[e]&&e!==this.nameMap[e];)e=this.nameMap[e];return e}}function xQ(e){return"unit"===e?.type}function kQ(e){return"facet"===e?.type}function DQ(e){return"concat"===e?.type}function LQ(e){return"layer"===e?.type}class NQ{constructor(e,t,i,n,o,r,s){this.type=t,this.parent=i,this.config=o,this.correctDataNames=e=>(e.from&&e.from.data&&(e.from.data=this.lookupDataSource(e.from.data)),e.from&&e.from.facet&&e.from.facet.data&&(e.from.facet.data=this.lookupDataSource(e.from.facet.data)),e),this.parent=i,this.config=o,this.view=aH(s),this.name=e.name??n,this.title=cH(e.title)?{text:e.title}:e.title?aH(e.title):void 0,this.scaleNameMap=i?i.scaleNameMap:new SQ,this.projectionNameMap=i?i.projectionNameMap:new SQ,this.signalNameMap=i?i.signalNameMap:new SQ,this.data=e.data,this.description=e.description,this.transforms=(e.transform??[]).map((e=>$K(e)?{filter:fz(e.filter,R$)}:e)),this.layout="layer"===t||"unit"===t?{}:function(e,t,i){const n=i[t],o={},{spacing:r,columns:s}=n;void 0!==r&&(o.spacing=r),void 0!==s&&(gj(e)&&!hj(e.facet)||eK(e))&&(o.columns=s),tK(e)&&(o.columns=1);for(const t of rK)if(void 0!==e[t])if("spacing"===t){const i=e[t];o[t]=nn(i)?i:{row:i.row??r,column:i.column??r}}else o[t]=e[t];return o}(e,t,o),this.component={data:{sources:i?i.component.data.sources:[],outputNodes:i?i.component.data.outputNodes:{},outputNodeRefCounts:i?i.component.data.outputNodeRefCounts:{},isFaceted:gj(e)||i&&i.component.data.isFaceted&&void 0===e.data},layoutSize:new wG,layoutHeaders:{row:{},column:{},facet:{}},mark:null,resolve:{scale:{},axis:{},legend:{},...r?mz(r):{}},selection:null,scales:null,projection:null,axes:{},legends:{}}}get width(){return this.getSizeSignalRef("width")}get height(){return this.getSizeSignalRef("height")}parse(){this.parseScale(),this.parseLayoutSize(),this.renameTopLevelLayoutSizeSignal(),this.parseSelections(),this.parseProjection(),this.parseData(),this.parseAxesAndHeaders(),this.parseLegends(),this.parseMarkGroup()}parseScale(){!function(e,{ignoreRange:t}={}){wQ(e),ZX(e);for(const t of gU)_Q(e,t);t||bQ(e)}(this)}parseProjection(){lX(this)}renameTopLevelLayoutSizeSignal(){"width"!==this.getName("width")&&this.renameSignal(this.getName("width"),"width"),"height"!==this.getName("height")&&this.renameSignal(this.getName("height"),"height")}parseLegends(){eX(this)}assembleGroupStyle(){if("unit"===this.type||"layer"===this.type)return this.view?.style??"cell"}assembleEncodeFromView(e){const{style:t,...i}=e,n={};for(const e of Rz(i)){const t=i[e];void 0!==t&&(n[e]=bH(t))}return n}assembleGroupEncodeEntry(e){let t={};return this.view&&(t=this.assembleEncodeFromView(this.view)),e||(this.description&&(t.description=bH(this.description)),"unit"!==this.type&&"layer"!==this.type)?Tz(t)?void 0:t:{width:this.getSizeSignalRef("width"),height:this.getSizeSignalRef("height"),...t??{}}}assembleLayout(){if(!this.layout)return;const{spacing:e,...t}=this.layout,{component:i,config:n}=this,o=function(e,t){const i={};for(const n of UW){const o=e[n];if(o?.facetFieldDef){const{titleAnchor:e,titleOrient:r}=CZ(["titleAnchor","titleOrient"],o.facetFieldDef.header,t,n),s=yZ(n,r),a=TZ(e,s);void 0!==a&&(i[s]=a)}}return Tz(i)?void 0:i}(i.layoutHeaders,n);return{padding:e,...this.assembleDefaultLayout(),...t,...o?{titleBand:o}:{}}}assembleDefaultLayout(){return{}}assembleHeaderMarks(){const{layoutHeaders:e}=this.component;let t=[];for(const i of UW)e[i].title&&t.push(kZ(this,i));for(const e of SZ)t=t.concat(NZ(this,e));return t}assembleAxes(){return function(e,t){const{x:i=[],y:n=[]}=e;return[...i.map((e=>lZ(e,"grid",t))),...n.map((e=>lZ(e,"grid",t))),...i.map((e=>lZ(e,"main",t))),...n.map((e=>lZ(e,"main",t)))].filter((e=>e))}(this.component.axes,this.config)}assembleLegends(){return oX(this)}assembleProjections(){return LQ(e=this)||DQ(e)?function(e){return e.children.reduce(((e,t)=>e.concat(t.assembleProjections())),rX(e))}(e):rX(e);var e}assembleTitle(){const{encoding:e,...t}=this.title??{},i={...lH(this.config.title).nonMark,...t,...e?{encode:{update:e}}:{}};if(i.text)return Cz(["unit","layer"],this.type)?Cz(["middle",void 0],i.anchor)&&(i.frame??(i.frame="group")):i.anchor??(i.anchor="start"),Tz(i)?void 0:i}assembleGroup(e=[]){const t={};(e=e.concat(this.assembleSignals())).length>0&&(t.signals=e);const i=this.assembleLayout();i&&(t.layout=i),t.marks=[].concat(this.assembleHeaderMarks(),this.assembleMarks());const n=!this.parent||kQ(this.parent)?sQ(this):[];n.length>0&&(t.scales=n);const o=this.assembleAxes();o.length>0&&(t.axes=o);const r=this.assembleLegends();return r.length>0&&(t.legends=r),t}getName(e){return Bz((this.name?`${this.name}_`:"")+e)}getDataName(e){return this.getName(OG[e].toLowerCase())}requestDataName(e){const t=this.getDataName(e),i=this.component.data.outputNodeRefCounts;return i[t]=(i[t]||0)+1,t}getSizeSignalRef(e){if(kQ(this.parent)){const t=LV(zZ(e)),i=this.component.scales[t];if(i&&!i.merged){const e=i.get("type"),n=i.get("range");if(eU(e)&&hH(n)){const e=i.get("name"),n=oQ(rQ(this,t));return n?{signal:BZ(e,i,Oj({aggregate:"distinct",field:n},{expr:"datum"}))}:(a$(FH(t)),null)}}}return{signal:this.signalNameMap.get(this.getName(e))}}lookupDataSource(e){const t=this.component.data.outputNodes[e];return t?t.getSource():e}getSignalName(e){return this.signalNameMap.get(e)}renameSignal(e,t){this.signalNameMap.rename(e,t)}renameScale(e,t){this.scaleNameMap.rename(e,t)}renameProjection(e,t){this.projectionNameMap.rename(e,t)}scaleName(e,t){return t?this.getName(e):tV(e)&&WV(e)&&this.component.scales[e]||this.scaleNameMap.has(this.getName(e))?this.scaleNameMap.get(this.getName(e)):void 0}projectionName(e){return e?this.getName("projection"):this.component.projection&&!this.component.projection.merged||this.projectionNameMap.has(this.getName("projection"))?this.projectionNameMap.get(this.getName("projection")):void 0}getScaleComponent(e){if(!this.component.scales)throw new Error("getScaleComponent cannot be called before parseScale(). Make sure you have called parseScale or use parseUnitModelWithScale().");const t=this.component.scales[e];return t&&!t.merged?t:this.parent?this.parent.getScaleComponent(e):void 0}getSelectionComponent(e,t){let i=this.component.selection[e];if(!i&&this.parent&&(i=this.parent.getSelectionComponent(e,t)),!i)throw new Error(`Cannot find a selection named "${t}".`);return i}hasAxisOrientSignalRef(){return this.component.axes.x?.some((e=>e.hasOrientSignalRef()))||this.component.axes.y?.some((e=>e.hasOrientSignalRef()))}}class EQ extends NQ{vgField(e,t={}){const i=this.fieldDef(e);if(i)return Oj(i,t)}reduceFieldDef(e,t){return function(e,t,i,n){return e?Rz(e).reduce(((i,o)=>{const r=e[o];return li(r)?r.reduce(((e,i)=>t.call(n,e,i,o)),i):t.call(n,i,r,o)}),i):i}(this.getMapping(),((t,i,n)=>{const o=Uj(i);return o?e(t,o,n):t}),t)}forEachFieldDef(e,t){mq(this.getMapping(),((t,i)=>{const n=Uj(t);n&&e(n,i)}),t)}}class AQ extends VG{constructor(e,t){super(e),this.transform=t,this.transform=mz(t);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??"value",i[1]??"density"]}clone(){return new AQ(null,mz(this.transform))}dependentFields(){return new Set([this.transform.density,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`DensityTransform ${yz(this.transform)}`}assemble(){const{density:e,...t}=this.transform;return{type:"kde",field:e,...t}}}class MQ extends VG{constructor(e,t){super(e),this.filter=t}clone(){return new MQ(null,{...this.filter})}static make(e,t){const{config:i,mark:n,markDef:o}=t;if("filter"!==xH("invalid",o,i))return null;const r=t.reduceFieldDef(((e,i,o)=>{const r=WV(o)&&t.getScaleComponent(o);return r&&tU(r.get("type"))&&"count"!==i.aggregate&&!MU(n)&&(e[i.field]=i),e}),{});return Rz(r).length?new MQ(e,r):null}dependentFields(){return new Set(Rz(this.filter))}producedFields(){return new Set}hash(){return`FilterInvalid ${yz(this.filter)}`}assemble(){const e=Rz(this.filter).reduce(((e,t)=>{const i=this.filter[t],n=Oj(i,{expr:"datum"});return null!==i&&("temporal"===i.type?e.push(`(isDate(${n}) || (isValid(${n}) && isFinite(+${n})))`):"quantitative"===i.type&&(e.push(`isValid(${n})`),e.push(`isFinite(+${n})`))),e}),[]);return e.length>0?{type:"filter",expr:e.join(" && ")}:null}}class IQ extends VG{constructor(e,t){super(e),this.transform=t,this.transform=mz(t);const{flatten:i,as:n=[]}=this.transform;this.transform.as=i.map(((e,t)=>n[t]??e))}clone(){return new IQ(this.parent,mz(this.transform))}dependentFields(){return new Set(this.transform.flatten)}producedFields(){return new Set(this.transform.as)}hash(){return`FlattenTransform ${yz(this.transform)}`}assemble(){const{flatten:e,as:t}=this.transform;return{type:"flatten",fields:e,as:t}}}class TQ extends VG{constructor(e,t){super(e),this.transform=t,this.transform=mz(t);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??"key",i[1]??"value"]}clone(){return new TQ(null,mz(this.transform))}dependentFields(){return new Set(this.transform.fold)}producedFields(){return new Set(this.transform.as)}hash(){return`FoldTransform ${yz(this.transform)}`}assemble(){const{fold:e,as:t}=this.transform;return{type:"fold",fields:e,as:t}}}class RQ extends VG{constructor(e,t,i,n){super(e),this.fields=t,this.geojson=i,this.signal=n}clone(){return new RQ(null,mz(this.fields),this.geojson,this.signal)}static parseAll(e,t){if(t.component.projection&&!t.component.projection.isFit)return e;let i=0;for(const n of[[pW,fW],[_W,mW]]){const o=n.map((e=>{const i=jj(t.encoding[e]);return Cj(i)?i.field:xj(i)?{expr:`${i.datum}`}:Ej(i)?{expr:`${i.value}`}:void 0}));(o[0]||o[1])&&(e=new RQ(e,o,null,t.getName("geojson_"+i++)))}if(t.channelHasField(wW)){const n=t.typedFieldDef(wW);n.type===W$&&(e=new RQ(e,null,n.field,t.getName("geojson_"+i++)))}return e}dependentFields(){const e=(this.fields??[]).filter(rn);return new Set([...this.geojson?[this.geojson]:[],...e])}producedFields(){return new Set}hash(){return`GeoJSON ${this.geojson} ${this.signal} ${yz(this.fields)}`}assemble(){return[...this.geojson?[{type:"filter",expr:`isValid(datum["${this.geojson}"])`}]:[],{type:"geojson",...this.fields?{fields:this.fields}:{},...this.geojson?{geojson:this.geojson}:{},signal:this.signal}]}}class OQ extends VG{constructor(e,t,i,n){super(e),this.projection=t,this.fields=i,this.as=n}clone(){return new OQ(null,this.projection,mz(this.fields),mz(this.as))}static parseAll(e,t){if(!t.projectionName())return e;for(const i of[[pW,fW],[_W,mW]]){const n=i.map((e=>{const i=jj(t.encoding[e]);return Cj(i)?i.field:xj(i)?{expr:`${i.datum}`}:Ej(i)?{expr:`${i.value}`}:void 0})),o=i[0]===_W?"2":"";(n[0]||n[1])&&(e=new OQ(e,t.projectionName(),n,[t.getName(`x${o}`),t.getName(`y${o}`)]))}return e}dependentFields(){return new Set(this.fields.filter(rn))}producedFields(){return new Set(this.as)}hash(){return`Geopoint ${this.projection} ${yz(this.fields)} ${yz(this.as)}`}assemble(){return{type:"geopoint",projection:this.projection,fields:this.fields,as:this.as}}}class FQ extends VG{constructor(e,t){super(e),this.transform=t}clone(){return new FQ(null,mz(this.transform))}dependentFields(){return new Set([this.transform.impute,this.transform.key,...this.transform.groupby??[]])}producedFields(){return new Set([this.transform.impute])}processSequence(e){const{start:t=0,stop:i,step:n}=e;return{signal:`sequence(${[t,i,...n?[n]:[]].join(",")})`}}static makeFromTransform(e,t){return new FQ(e,t)}static makeFromEncoding(e,t){const i=t.encoding,n=i.x,o=i.y;if(Cj(n)&&Cj(o)){const r=n.impute?n:o.impute?o:void 0;if(void 0===r)return;const s=n.impute?o:o.impute?n:void 0,{method:a,value:l,frame:c,keyvals:u}=r.impute,h=_q(t.mark,i);return new FQ(e,{impute:r.field,key:s.field,...a?{method:a}:{},...void 0!==l?{value:l}:{},...c?{frame:c}:{},...void 0!==u?{keyvals:u}:{},...h.length?{groupby:h}:{}})}return null}hash(){return`Impute ${yz(this.transform)}`}assemble(){const{impute:e,key:t,keyvals:i,method:n,groupby:o,value:r,frame:s=[null,null]}=this.transform,a={type:"impute",field:e,key:t,...i?{keyvals:UK(i)?this.processSequence(i):i}:{},method:"value",...o?{groupby:o}:{},value:n&&"value"!==n?null:r};return n&&"value"!==n?[a,{type:"window",as:[`imputed_${e}_value`],ops:[n],fields:[e],frame:s,ignorePeers:!1,...o?{groupby:o}:{}},{type:"formula",expr:`datum.${e} === null ? datum.imputed_${e}_value : datum.${e}`,as:e}]:[a]}}class PQ extends VG{constructor(e,t){super(e),this.transform=t,this.transform=mz(t);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??t.on,i[1]??t.loess]}clone(){return new PQ(null,mz(this.transform))}dependentFields(){return new Set([this.transform.loess,this.transform.on,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`LoessTransform ${yz(this.transform)}`}assemble(){const{loess:e,on:t,...i}=this.transform;return{type:"loess",x:t,y:e,...i}}}class BQ extends VG{constructor(e,t,i){super(e),this.transform=t,this.secondary=i}clone(){return new BQ(null,mz(this.transform),this.secondary)}static make(e,t,i,n){const o=t.component.data.sources,{from:r}=i;let s=null;if(function(e){return"data"in e}(r)){let e=JQ(r.data,o);e||(e=new CX(r.data),o.push(e));const i=t.getName(`lookup_${n}`);s=new HG(e,i,OG.Lookup,t.component.data.outputNodeRefCounts),t.component.data.outputNodes[i]=s}else if(function(e){return"param"in e}(r)){const e=r.param;let n;i={as:e,...i};try{n=t.getSelectionComponent(Bz(e),e)}catch(t){throw new Error(`Lookups can only be performed on selection parameters. "${e}" is a variable parameter.`)}if(s=n.materialized,!s)throw new Error(`Cannot define and lookup the "${e}" selection in the same view. Try moving the lookup into a second, layered view?`)}return new BQ(e,i,s.getSource())}dependentFields(){return new Set([this.transform.lookup])}producedFields(){return new Set(this.transform.as?Ti(this.transform.as):this.transform.from.fields)}hash(){return`Lookup ${yz({transform:this.transform,secondary:this.secondary})}`}assemble(){let e;if(this.transform.from.fields)e={values:this.transform.from.fields,...this.transform.as?{as:Ti(this.transform.as)}:{}};else{let t=this.transform.as;rn(t)||(a$('If "from.fields" is not specified, "as" has to be a string that specifies the key to be used for the data from the secondary source.'),t="_lookup"),e={as:[t]}}return{type:"lookup",from:this.secondary,key:this.transform.from.key,fields:[this.transform.lookup],...e,...this.transform.default?{default:this.transform.default}:{}}}}class zQ extends VG{constructor(e,t){super(e),this.transform=t,this.transform=mz(t);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??"prob",i[1]??"value"]}clone(){return new zQ(null,mz(this.transform))}dependentFields(){return new Set([this.transform.quantile,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`QuantileTransform ${yz(this.transform)}`}assemble(){const{quantile:e,...t}=this.transform;return{type:"quantile",field:e,...t}}}class WQ extends VG{constructor(e,t){super(e),this.transform=t,this.transform=mz(t);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??t.on,i[1]??t.regression]}clone(){return new WQ(null,mz(this.transform))}dependentFields(){return new Set([this.transform.regression,this.transform.on,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`RegressionTransform ${yz(this.transform)}`}assemble(){const{regression:e,on:t,...i}=this.transform;return{type:"regression",x:t,y:e,...i}}}class VQ extends VG{constructor(e,t){super(e),this.transform=t}clone(){return new VQ(null,mz(this.transform))}addDimensions(e){this.transform.groupby=Lz((this.transform.groupby??[]).concat(e),(e=>e))}producedFields(){}dependentFields(){return new Set([this.transform.pivot,this.transform.value,...this.transform.groupby??[]])}hash(){return`PivotTransform ${yz(this.transform)}`}assemble(){const{pivot:e,value:t,groupby:i,limit:n,op:o}=this.transform;return{type:"pivot",field:e,value:t,...void 0!==n?{limit:n}:{},...void 0!==o?{op:o}:{},...void 0!==i?{groupby:i}:{}}}}class HQ extends VG{constructor(e,t){super(e),this.transform=t}clone(){return new HQ(null,mz(this.transform))}dependentFields(){return new Set}producedFields(){return new Set}hash(){return`SampleTransform ${yz(this.transform)}`}assemble(){return{type:"sample",size:this.transform.sample}}}function $Q(e){let t=0;return function i(n,o){if(n instanceof CX&&!n.isGenerator&&!NG(n.data)&&(e.push(o),o={name:null,source:o.name,transform:[]}),n instanceof vX&&(n.parent instanceof CX&&!o.source?(o.format={...o.format??{},parse:n.assembleFormatParse()},o.transform.push(...n.assembleTransforms(!0))):o.transform.push(...n.assembleTransforms())),n instanceof pX)return o.name||(o.name="data_"+t++),!o.source||o.transform.length>0?(e.push(o),n.data=o.name):n.data=o.source,void e.push(...n.assemble());switch((n instanceof yX||n instanceof wX||n instanceof MQ||n instanceof nZ||n instanceof vZ||n instanceof OQ||n instanceof fX||n instanceof BQ||n instanceof HX||n instanceof WX||n instanceof TQ||n instanceof IQ||n instanceof AQ||n instanceof PQ||n instanceof zQ||n instanceof WQ||n instanceof bX||n instanceof HQ||n instanceof VQ)&&o.transform.push(n.assemble()),(n instanceof gX||n instanceof $G||n instanceof FQ||n instanceof VX||n instanceof RQ)&&o.transform.push(...n.assemble()),n instanceof HG&&(o.source&&0===o.transform.length?n.setSource(o.source):n.parent instanceof HG?n.setSource(o.name):(o.name||(o.name="data_"+t++),n.setSource(o.name),1===n.numChildren()&&(e.push(o),o={name:null,source:o.name,transform:[]}))),n.numChildren()){case 0:n instanceof HG&&(!o.source||o.transform.length>0)&&e.push(o);break;case 1:i(n.children[0],o);break;default:{o.name||(o.name="data_"+t++);let r=o.name;!o.source||o.transform.length>0?e.push(o):r=o.source;for(const e of n.children)i(e,{name:null,source:r,transform:[]});break}}}}function UQ(e){return"top"===e||"left"===e||uH(e)?"header":"footer"}function jQ(e,t){const{facet:i,config:n,child:o,component:r}=e;if(e.channelHasField(t)){const s=i[t],a=wZ("title",null,n,t);let l=Wj(s,n,{allowDisabling:!0,includeDefault:void 0===a||!!a});o.component.layoutHeaders[t].title&&(l=li(l)?l.join(", "):l,l+=` / ${o.component.layoutHeaders[t].title}`,o.component.layoutHeaders[t].title=null);const c=wZ("labelOrient",s.header,n,t),u=null!==s.header&&Yz(s.header?.labels,n.header.labels,!0),h=Cz(["bottom","right"],c)?"footer":"header";r.layoutHeaders[t]={title:null!==s.header?l:null,facetFieldDef:s,[h]:"facet"===t?[]:[qQ(e,t,u)]}}}function qQ(e,t,i){const n="row"===t?"height":"width";return{labels:i,sizeSignal:e.child.component.layoutSize.get(n)?e.child.getSizeSignalRef(n):void 0,axes:[]}}function KQ(e,t){const{child:i}=e;if(i.component.axes[t]){const{layoutHeaders:n,resolve:o}=e.component;if(o.axis[t]=HZ(o,t),"shared"===o.axis[t]){const o="x"===t?"column":"row",r=n[o];for(const n of i.component.axes[t]){const t=UQ(n.get("orient"));r[t]??(r[t]=[qQ(e,o,!1)]);const i=lZ(n,"main",e.config,{header:!0});i&&r[t][0].axes.push(i),n.mainExtracted=!0}}}}function GQ(e){for(const t of e.children)t.parseLayoutSize()}function YQ(e,t){const i=zZ(t),n=LV(i),o=e.component.resolve,r=e.component.layoutSize;let s;for(const t of e.children){const r=t.component.layoutSize.getWithExplicit(i),a=o.scale[n]??VZ(n,e);if("independent"===a&&"step"===r.value){s=void 0;break}if(s){if("independent"===a&&s.value!==r.value){s=void 0;break}s=DG(s,r,i,"")}else s=r}if(s){for(const n of e.children)e.renameSignal(n.getName(i),e.getName(t)),n.component.layoutSize.set(i,"merged",!1);r.setWithExplicit(t,s)}else r.setWithExplicit(t,{explicit:!1,value:void 0})}function ZQ(e,t){const i="width"===t?"x":"y",n=e.config,o=e.getScaleComponent(i);if(o){const e=o.get("type"),i=o.get("range");if(eU(e)){const e=lK(n.view,t);return hH(i)||nK(e)?"step":e}return sK(n.view,t)}if(e.hasProjection||"arc"===e.mark)return sK(n.view,t);{const e=lK(n.view,t);return nK(e)?e.step:e}}function XQ(e,t,i){return Oj(t,{suffix:`by_${Oj(e)}`,...i??{}})}class QQ extends EQ{constructor(e,t,i,n){super(e,"facet",t,i,n,e.resolve),this.child=CJ(e.spec,this,this.getName("child"),void 0,n),this.children=[this.child],this.facet=this.initFacet(e.facet)}initFacet(e){if(!hj(e))return{facet:this.initFacetFieldDef(e,"facet")};const t=Rz(e),i={};for(const n of t){if(![nW,oW].includes(n)){a$(qH(n,"facet"));break}const t=e[n];if(void 0===t.field){a$(jH(t,n));break}i[n]=this.initFacetFieldDef(t,n)}return i}initFacetFieldDef(e,t){const i=Gj(e,t);return i.header?i.header=aH(i.header):null===i.header&&(i.header=null),i}channelHasField(e){return!!this.facet[e]}fieldDef(e){return this.facet[e]}parseData(){this.component.data=eJ(this),this.child.parseData()}parseLayoutSize(){GQ(this)}parseSelections(){this.child.parseSelections(),this.component.selection=this.child.component.selection}parseMarkGroup(){this.child.parseMarkGroup()}parseAxesAndHeaders(){this.child.parseAxesAndHeaders(),function(e){for(const t of UW)jQ(e,t);KQ(e,"x"),KQ(e,"y")}(this)}assembleSelectionTopLevelSignals(e){return this.child.assembleSelectionTopLevelSignals(e)}assembleSignals(){return this.child.assembleSignals(),[]}assembleSelectionData(e){return this.child.assembleSelectionData(e)}getHeaderLayoutMixins(){const e={};for(const t of UW)for(const i of xZ){const n=this.component.layoutHeaders[t],o=n[i],{facetFieldDef:r}=n;if(r){const i=wZ("titleOrient",r.header,this.config,t);if(["right","bottom"].includes(i)){const n=yZ(t,i);e.titleAnchor??(e.titleAnchor={}),e.titleAnchor[n]="end"}}if(o?.[0]){const o="row"===t?"height":"width",r="header"===i?"headerBand":"footerBand";"facet"===t||this.child.component.layoutSize.get(o)||(e[r]??(e[r]={}),e[r][t]=.5),n.title&&(e.offset??(e.offset={}),e.offset["row"===t?"rowTitle":"columnTitle"]=10)}}return e}assembleDefaultLayout(){const{column:e,row:t}=this.facet,i=e?this.columnDistinctSignal():t?1:void 0;let n="all";return(t||"independent"!==this.component.resolve.scale.x)&&(e||"independent"!==this.component.resolve.scale.y)||(n="none"),{...this.getHeaderLayoutMixins(),...i?{columns:i}:{},bounds:"full",align:n}}assembleLayoutSignals(){return this.child.assembleLayoutSignals()}columnDistinctSignal(){if(!(this.parent&&this.parent instanceof QQ))return{signal:`length(data('${this.getName("column_domain")}'))`}}assembleGroup(e){return this.parent&&this.parent instanceof QQ?{...this.channelHasField("column")?{encode:{update:{columns:{field:Oj(this.facet.column,{prefix:"distinct"})}}}}:{},...super.assembleGroup(e)}:super.assembleGroup(e)}getCardinalityAggregateForChild(){const e=[],t=[],i=[];if(this.child instanceof QQ){if(this.child.channelHasField("column")){const n=Oj(this.child.facet.column);e.push(n),t.push("distinct"),i.push(`distinct_${n}`)}}else for(const n of SV){const o=this.child.component.scales[n];if(o&&!o.merged){const r=o.get("type"),s=o.get("range");if(eU(r)&&hH(s)){const o=oQ(rQ(this.child,n));o?(e.push(o),t.push("distinct"),i.push(`distinct_${o}`)):a$(FH(n))}}}return{fields:e,ops:t,as:i}}assembleFacet(){const{name:e,data:t}=this.component.data.facetRoot,{row:i,column:n}=this.facet,{fields:o,ops:r,as:s}=this.getCardinalityAggregateForChild(),a=[];for(const e of UW){const t=this.facet[e];if(t){a.push(Oj(t));const{bin:l,sort:c}=t;if(tH(l)&&a.push(Oj(t,{binSuffix:"end"})),cj(c)){const{field:e,op:a=rj}=c,l=XQ(t,c);i&&n?(o.push(l),r.push("max"),s.push(l)):(o.push(e),r.push(a),s.push(l))}else if(li(c)){const i=bZ(t,e);o.push(i),r.push("max"),s.push(i)}}}const l=!!i&&!!n;return{name:e,data:t,groupby:a,...l||o.length>0?{aggregate:{...l?{cross:l}:{},...o.length?{fields:o,ops:r,as:s}:{}}}:{}}}facetSortFields(e){const{facet:t}=this,i=t[e];return i?cj(i.sort)?[XQ(i,i.sort,{expr:"datum"})]:li(i.sort)?[bZ(i,e,{expr:"datum"})]:[Oj(i,{expr:"datum"})]:[]}facetSortOrder(e){const{facet:t}=this,i=t[e];if(i){const{sort:e}=i;return[(cj(e)?e.order:!li(e)&&e)||"ascending"]}return[]}assembleLabelTitle(){const{facet:e,config:t}=this;if(e.facet)return AZ(e.facet,"facet",t);const i={row:["top","bottom"],column:["left","right"]};for(const n of SZ)if(e[n]){const o=wZ("labelOrient",e[n]?.header,t,n);if(i[n].includes(o))return AZ(e[n],n,t)}}assembleMarks(){const{child:e}=this,t=function(e){const t=[],i=$Q(t);for(const t of e.children)i(t,{source:e.name,name:null,transform:[]});return t}(this.component.data.facetRoot),i=e.assembleGroupEncodeEntry(!1),n=this.assembleLabelTitle()||e.assembleTitle(),o=e.assembleGroupStyle();return[{name:this.getName("cell"),type:"group",...n?{title:n}:{},...o?{style:o}:{},from:{facet:this.assembleFacet()},sort:{field:UW.map((e=>this.facetSortFields(e))).flat(),order:UW.map((e=>this.facetSortOrder(e))).flat()},...t.length>0?{data:t}:{},...i?{encode:{update:i}}:{},...e.assembleGroup(BG(this,[]))}]}getMapping(){return this.facet}}function JQ(e,t){for(const i of t){const t=i.data;if(e.name&&i.hasName()&&e.name!==i.dataName)continue;const n=e.format?.mesh,o=t.format?.feature;if(n&&o)continue;const r=e.format?.feature;if((r||o)&&r!==o)continue;const s=t.format?.mesh;if(!n&&!s||n===s)if(EG(e)&&EG(t)){if(pz(e.values,t.values))return i}else if(NG(e)&&NG(t)){if(e.url===t.url)return i}else if(AG(e)&&e.name===i.dataName)return i}return null}function eJ(e){let t=function(e,t){if(e.data||!e.parent){if(null===e.data){const e=new CX({values:[]});return t.push(e),e}const i=JQ(e.data,t);if(i)return MG(e.data)||(i.data.format=kz({},e.data.format,i.data.format)),!i.hasName()&&e.data.name&&(i.dataName=e.data.name),i;{const i=new CX(e.data);return t.push(i),i}}return e.parent.component.data.facetRoot?e.parent.component.data.facetRoot:e.parent.component.data.main}(e,e.component.data.sources);const{outputNodes:i,outputNodeRefCounts:n}=e.component.data,o=e.parent?e.parent.component.data.ancestorParse.clone():new LG,r=e.data;MG(r)?(IG(r)?t=new wX(t,r.sequence):RG(r)&&(t=new yX(t,r.graticule)),o.parseNothing=!0):null===r?.format?.parse&&(o.parseNothing=!0),t=vX.makeExplicit(t,e,o)??t,t=new bX(t);const s=e.parent&&LQ(e.parent);(xQ(e)||kQ(e))&&s&&(t=gX.makeFromEncoding(t,e)??t),e.transforms.length>0&&(t=function(e,t,i){let n=0;for(const o of t.transforms){let r,s;if(tG(o))s=e=new vZ(e,o),r="derived";else if($K(o)){const n=_X(o);s=e=vX.makeWithAncestors(e,{},n,i)??e,e=new nZ(e,t,o.filter)}else if(iG(o))s=e=gX.makeFromTransform(e,o,t),r="number";else if(oG(o))r="date",void 0===i.getWithExplicit(o.field).value&&(e=new vX(e,{[o.field]:r}),i.set(o.field,r,!1)),s=e=$G.makeFromTransform(e,o);else if(rG(o))s=e=fX.makeFromTransform(e,o),r="number",QY(t)&&(e=new bX(e));else if(jK(o))s=e=BQ.make(e,t,o,n++),r="derived";else if(QK(o))s=e=new HX(e,o),r="number";else if(JK(o))s=e=new WX(e,o),r="number";else if(sG(o))s=e=VX.makeFromTransform(e,o),r="derived";else if(aG(o))s=e=new TQ(e,o),r="derived";else if(eG(o))s=e=new IQ(e,o),r="derived";else if(qK(o))s=e=new VQ(e,o),r="derived";else if(XK(o))e=new HQ(e,o);else if(nG(o))s=e=FQ.makeFromTransform(e,o),r="derived";else if(KK(o))s=e=new AQ(e,o),r="derived";else if(GK(o))s=e=new zQ(e,o),r="derived";else if(YK(o))s=e=new WQ(e,o),r="derived";else{if(!ZK(o)){a$(`Ignoring an invalid transform: ${bz(o)}.`);continue}s=e=new PQ(e,o),r="derived"}if(s&&void 0!==r)for(const e of s.producedFields()??[])i.set(e,r,!1)}return e}(t,e,o));const a=function(e){const t={};if(xQ(e)&&e.component.selection)for(const i of Rz(e.component.selection)){const n=e.component.selection[i];for(const e of n.project.items)!e.channel&&Gz(e.field)>1&&(t[e.field]="flatten")}return t}(e),l=function(e){const t={};function i(e){var i;Xj(e)?t[e.field]="date":"quantitative"===e.type&&rn(i=e.aggregate)&&Cz(["min","max"],i)?t[e.field]="number":Gz(e.field)>1?e.field in t||(t[e.field]="flatten"):Aj(e)&&cj(e.sort)&&Gz(e.sort.field)>1&&(e.sort.field in t||(t[e.sort.field]="flatten"))}if((xQ(e)||kQ(e))&&e.forEachFieldDef(((t,n)=>{if(Nj(t))i(t);else{const o=oV(n),r=e.fieldDef(o);i({...t,type:r.type})}})),xQ(e)){const{mark:i,markDef:n,encoding:o}=e;if(MU(i)&&!e.encoding.order){const e=o["horizontal"===n.orient?"y":"x"];Cj(e)&&"quantitative"===e.type&&!(e.field in t)&&(t[e.field]="number")}}return t}(e);t=vX.makeWithAncestors(t,{},{...a,...l},o)??t,xQ(e)&&(t=RQ.parseAll(t,e),t=OQ.parseAll(t,e)),(xQ(e)||kQ(e))&&(s||(t=gX.makeFromEncoding(t,e)??t),t=$G.makeFromEncoding(t,e)??t,t=vZ.parseAllForSortIndex(t,e));const c=e.getDataName(OG.Raw),u=new HG(t,c,OG.Raw,n);if(i[c]=u,t=u,xQ(e)){const i=fX.makeFromEncoding(t,e);i&&(t=i,QY(e)&&(t=new bX(t))),t=FQ.makeFromEncoding(t,e)??t,t=VX.makeFromEncoding(t,e)??t}xQ(e)&&(t=MQ.make(t,e)??t);const h=e.getDataName(OG.Main),d=new HG(t,h,OG.Main,n);i[h]=d,t=d,xQ(e)&&function(e,t){for(const[i,n]of Fz(e.component.selection??{})){const o=e.getName(`lookup_${i}`);e.component.data.outputNodes[o]=n.materialized=new HG(new nZ(t,e,{param:i}),o,OG.Lookup,e.component.data.outputNodeRefCounts)}}(e,d);let g=null;if(kQ(e)){const n=e.getName("facet");t=function(e,t){const{row:i,column:n}=t;if(i&&n){let t=null;for(const o of[i,n])if(cj(o.sort)){const{field:i,op:n=rj}=o.sort;e=t=new WX(e,{joinaggregate:[{op:n,field:i,as:XQ(o,o.sort,{forAs:!0})}],groupby:[Oj(o)]})}return t}return null}(t,e.facet)??t,g=new pX(t,e,n,d.getSource()),i[n]=g}return{...e.component.data,outputNodes:i,outputNodeRefCounts:n,raw:u,main:d,facetRoot:g,ancestorParse:o}}class tJ extends NQ{constructor(e,t,i,n){super(e,"concat",t,i,n,e.resolve),"shared"!==e.resolve?.axis?.x&&"shared"!==e.resolve?.axis?.y||a$("Axes cannot be shared in concatenated or repeated views yet (https://github.com/vega/vega-lite/issues/2415)."),this.children=this.getChildren(e).map(((e,t)=>CJ(e,this,this.getName(`concat_${t}`),void 0,n)))}parseData(){this.component.data=eJ(this);for(const e of this.children)e.parseData()}parseSelections(){this.component.selection={};for(const e of this.children){e.parseSelections();for(const t of Rz(e.component.selection))this.component.selection[t]=e.component.selection[t]}}parseMarkGroup(){for(const e of this.children)e.parseMarkGroup()}parseAxesAndHeaders(){for(const e of this.children)e.parseAxesAndHeaders()}getChildren(e){return tK(e)?e.vconcat:iK(e)?e.hconcat:e.concat}parseLayoutSize(){!function(e){GQ(e);const t=1===e.layout.columns?"width":"childWidth",i=void 0===e.layout.columns?"height":"childHeight";YQ(e,t),YQ(e,i)}(this)}parseAxisGroup(){return null}assembleSelectionTopLevelSignals(e){return this.children.reduce(((e,t)=>t.assembleSelectionTopLevelSignals(e)),e)}assembleSignals(){return this.children.forEach((e=>e.assembleSignals())),[]}assembleLayoutSignals(){const e=OZ(this);for(const t of this.children)e.push(...t.assembleLayoutSignals());return e}assembleSelectionData(e){return this.children.reduce(((e,t)=>t.assembleSelectionData(e)),e)}assembleMarks(){return this.children.map((e=>{const t=e.assembleTitle(),i=e.assembleGroupStyle(),n=e.assembleGroupEncodeEntry(!1);return{type:"group",name:e.getName("group"),...t?{title:t}:{},...i?{style:i}:{},...n?{encode:{update:n}}:{},...e.assembleGroup()}}))}assembleDefaultLayout(){const e=this.layout.columns;return{...null!=e?{columns:e}:{},bounds:"full",align:"each"}}}const iJ={disable:1,gridScale:1,scale:1,...rq,labelExpr:1,encode:1},nJ=Rz(iJ);class oJ extends wG{constructor(e={},t={},i=!1){super(),this.explicit=e,this.implicit=t,this.mainExtracted=i}clone(){return new oJ(mz(this.explicit),mz(this.implicit),this.mainExtracted)}hasAxisPart(e){return!("axis"!==e&&("grid"===e||"title"===e?!this.get(e):!1===(t=this.get(e))||null===t));var t}hasOrientSignalRef(){return uH(this.explicit.orient)}}const rJ={bottom:"top",top:"bottom",left:"right",right:"left"};function sJ(e,t){if(!e)return t.map((e=>e.clone()));{if(e.length!==t.length)return;const i=e.length;for(let n=0;n{switch(i){case"title":return MH(e,t);case"gridScale":return{explicit:e.explicit,value:Yz(e.value,t.value)}}return kG(e,t,i,"axis")}));e.setWithExplicit(i,n)}return e}function lJ(e,t,i,n,o){if("disable"===t)return void 0!==i;switch(i=i||{},t){case"titleAngle":case"labelAngle":return e===(uH(i.labelAngle)?i.labelAngle:tW(i.labelAngle));case"values":return!!i.values;case"encode":return!!i.encoding||!!i.labelAngle;case"title":if(e===_Z(n,o))return!0}return e===i[t]}const cJ=new Set(["grid","translate","format","formatType","orient","labelExpr","tickCount","position","tickMinStep"]);function uJ(e,t){let i=t.axis(e);const n=new oJ,o=jj(t.encoding[e]),{mark:r,config:s}=t,a=i?.orient||s["x"===e?"axisX":"axisY"]?.orient||s.axis?.orient||function(e){return"x"===e?"bottom":"left"}(e),l=t.getScaleComponent(e).get("type"),c=function(e,t,i,n){const o="band"===t?["axisDiscrete","axisBand"]:"point"===t?["axisDiscrete","axisPoint"]:t in Z$?["axisQuantitative"]:"time"===t||"utc"===t?["axisTemporal"]:[],r="x"===e?"axisX":"axisY",s=uH(i)?"axisOrient":`axis${Vz(i)}`,a=[...o,...o.map((e=>r+e.substr(4)))],l=["axis",s,r];return{vlOnlyAxisConfig:uZ(a,n,e,i),vgAxisConfig:uZ(l,n,e,i),axisConfigStyle:hZ([...l,...a],n)}}(e,l,a,t.config),u=void 0!==i?!i:dZ("disable",s.style,i?.style,c).configValue;if(n.set("disable",u,void 0!==i),u)return n;i=i||{};const h=function(e,t,i,n,o){const r=t?.labelAngle;if(void 0!==r)return uH(r)?r:tW(r);{const{configValue:r}=dZ("labelAngle",n,t?.style,o);return void 0!==r?tW(r):i!==sW||!Cz([z$,P$],e.type)||Cj(e)&&e.timeUnit?void 0:270}}(o,i,e,s.style,c),d={fieldOrDatumDef:o,axis:i,channel:e,model:t,scaleType:l,orient:a,labelAngle:h,mark:r,config:s};for(const o of nJ){const r=o in gZ?gZ[o](d):aq(o)?i[o]:void 0,a=void 0!==r,l=lJ(r,o,i,t,e);if(a&&l)n.set(o,r,l);else{const{configValue:e,configFrom:t}=aq(o)&&"values"!==o?dZ(o,s.style,i.style,c):{},u=void 0!==e;a&&!u?n.set(o,r,l):("vgAxisConfig"!==t||cJ.has(o)&&u||iq(e)||uH(e))&&n.set(o,e,!1)}}const g=i.encoding??{},f=nq.reduce(((i,o)=>{if(!n.hasAxisPart(o))return i;const r=WZ(g[o]??{},t),s="labels"===o?function(e,t,i){const{encoding:n,config:o}=e,r=jj(n[t])??jj(n[sV(t)]),s=e.axis(t)||{},{format:a,formatType:l}=s;return GU(l)?{text:QU({fieldOrDatumDef:r,field:"datum.value",format:a,formatType:l,config:o}),...i}:i}(t,e,r):r;return void 0===s||Tz(s)||(i[o]={update:s}),i}),{});return Tz(f)||n.set("encode",f,!!i.encoding||void 0!==i.labelAngle),n}function hJ(e,t){const{config:i}=e;return{...LY(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"}),...fY("x",e,{defaultPos:"mid"}),...fY("y",e,{defaultPos:"mid"}),...uY("size",e),...uY("angle",e),...dJ(e,0,t)}}function dJ(e,t,i){return i?{shape:{value:i}}:uY("shape",e)}function gJ(e,t,i){if(void 0===xH("align",e,i))return"center"}function fJ(e,t,i){if(void 0===xH("baseline",e,i))return"middle"}function pJ(e){const{config:t,markDef:i}=e,{orient:n}=i,o="horizontal"===n?"width":"height",r=e.getScaleComponent("horizontal"===n?"x":"y"),s=xH("size",i,t,{vgChannel:o})??t.tick.bandSize;if(void 0!==s)return s;{const e=r?r.get("range"):void 0;return e&&hH(e)&&nn(e.step)?3*e.step/4:3*aK(t.view,o)/4}}const mJ={arc:{vgMark:"arc",encodeEntry:e=>({...LY(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}),...fY("x",e,{defaultPos:"mid"}),...fY("y",e,{defaultPos:"mid"}),...CY(e,"radius","arc"),...CY(e,"theta","arc")})},area:{vgMark:"area",encodeEntry:e=>({...LY(e,{align:"ignore",baseline:"ignore",color:"include",orient:"include",size:"ignore",theta:"ignore"}),...bY("x",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:"horizontal"===e.markDef.orient}),...bY("y",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:"vertical"===e.markDef.orient}),...AY(e)})},bar:{vgMark:"rect",encodeEntry:e=>({...LY(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...CY(e,"x","bar"),...CY(e,"y","bar")})},circle:{vgMark:"symbol",encodeEntry:e=>hJ(e,"circle")},geoshape:{vgMark:"shape",encodeEntry:e=>({...LY(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})}),postEncodingTransform:e=>{const{encoding:t}=e,i=t.shape;return[{type:"geoshape",projection:e.projectionName(),...i&&Cj(i)&&i.type===W$?{field:Oj(i,{expr:"datum"})}:{}}]}},image:{vgMark:"image",encodeEntry:e=>({...LY(e,{align:"ignore",baseline:"ignore",color:"ignore",orient:"ignore",size:"ignore",theta:"ignore"}),...CY(e,"x","image"),...CY(e,"y","image"),...iY(e,"url")})},line:{vgMark:"line",encodeEntry:e=>({...LY(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}),...fY("x",e,{defaultPos:"mid"}),...fY("y",e,{defaultPos:"mid"}),...uY("size",e,{vgChannel:"strokeWidth"}),...AY(e)})},point:{vgMark:"symbol",encodeEntry:e=>hJ(e)},rect:{vgMark:"rect",encodeEntry:e=>({...LY(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...CY(e,"x","rect"),...CY(e,"y","rect")})},rule:{vgMark:"rule",encodeEntry:e=>{const{markDef:t}=e,i=t.orient;return e.encoding.x||e.encoding.y||e.encoding.latitude||e.encoding.longitude?{...LY(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...bY("x",e,{defaultPos:"horizontal"===i?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:"vertical"!==i}),...bY("y",e,{defaultPos:"vertical"===i?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:"horizontal"!==i}),...uY("size",e,{vgChannel:"strokeWidth"})}:{}}},square:{vgMark:"symbol",encodeEntry:e=>hJ(e,"square")},text:{vgMark:"text",encodeEntry:e=>{const{config:t,encoding:i}=e;return{...LY(e,{align:"include",baseline:"include",color:"include",size:"ignore",orient:"ignore",theta:"include"}),...fY("x",e,{defaultPos:"mid"}),...fY("y",e,{defaultPos:"mid"}),...iY(e),...uY("size",e,{vgChannel:"fontSize"}),...uY("angle",e),...MY("align",gJ(e.markDef,0,t)),...MY("baseline",fJ(e.markDef,0,t)),...fY("radius",e,{defaultPos:null}),...fY("theta",e,{defaultPos:null})}}},tick:{vgMark:"rect",encodeEntry:e=>{const{config:t,markDef:i}=e,n=i.orient,o="horizontal"===n?"width":"height",r="horizontal"===n?"height":"width";return{...LY(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...fY("x",e,{defaultPos:"mid",vgChannel:"xc"}),...fY("y",e,{defaultPos:"mid",vgChannel:"yc"}),...uY("size",e,{defaultValue:pJ(e),vgChannel:o}),[r]:bH(xH("thickness",i,t))}}},trail:{vgMark:"trail",encodeEntry:e=>({...LY(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"}),...fY("x",e,{defaultPos:"mid"}),...fY("y",e,{defaultPos:"mid"}),...uY("size",e),...AY(e)})}};const _J="faceted_path_",vJ="stack_group_";function bJ(e,t={fromPrefix:""}){const{mark:i,markDef:n,encoding:o,config:r}=e,s=Yz(n.clip,function(e){const t=e.getScaleComponent("x"),i=e.getScaleComponent("y");return!!(t&&t.get("selectionExtent")||i&&i.get("selectionExtent"))||void 0}(e),function(e){const t=e.component.projection;return!(!t||t.isFit)||void 0}(e)),a=SH(n),l=o.key,c=function(e){const{encoding:t,stack:i,mark:n,markDef:o,config:r}=e,s=t.order;if(!(!li(s)&&Ej(s)&&wz(s.value)||!s&&wz(xH("order",o,r)))){if((li(s)||Cj(s))&&!i)return NH(s,{expr:"datum"});if(MU(n)){const i="horizontal"===o.orient?"y":"x",n=t[i];if(Cj(n)){const t=n.sort;return li(t)?{field:Oj(n,{prefix:i,suffix:"sort_index",expr:"datum"})}:cj(t)?{field:Oj({aggregate:dq(e.encoding)?t.op:void 0,field:t.field},{expr:"datum"})}:lj(t)?{field:Oj(e.fieldDef(t.encoding),{expr:"datum"}),order:t.order}:null===t?void 0:{field:Oj(n,{binSuffix:e.stack&&e.stack.impute?"mid":void 0,expr:"datum"})}}}}}(e),u=function(e){if(!e.component.selection)return null;const t=Rz(e.component.selection).length;let i=t,n=e.parent;for(;n&&0===i;)i=Rz(n.component.selection).length,n=n.parent;return i?{interactive:t>0||!!e.encoding.tooltip}:null}(e),h=xH("aria",n,r),d=mJ[i].postEncodingTransform?mJ[i].postEncodingTransform(e):null;return[{name:e.getName("marks"),type:mJ[i].vgMark,...s?{clip:!0}:{},...a?{style:a}:{},...l?{key:l.field}:{},...c?{sort:c}:{},...u||{},...!1===h?{aria:h}:{},from:{data:t.fromPrefix+e.requestDataName(OG.Main)},encode:{update:mJ[i].encodeEntry(e)},...d?{transform:d}:{}}]}class yJ extends EQ{constructor(e,t,i,n={},o){super(e,"unit",t,i,o,void 0,oK(e)?e.view:void 0),this.specifiedScales={},this.specifiedAxes={},this.specifiedLegends={},this.specifiedProjection={},this.selection=[],this.children=[];const r=RU(e.mark)?{...e.mark}:{type:e.mark},s=r.type;void 0===r.filled&&(r.filled=function(e,t,{graticule:i}){if(i)return!1;const n=kH("filled",e,t),o=e.type;return Yz(n,o!==CU&&o!==wU&&o!==xU)}(r,o,{graticule:e.data&&RG(e.data)}));const a=this.encoding=fq(e.encoding||{},s,r.filled,o);this.markDef=function(e,t,i){const n=aH(e),o=xH("orient",n,i);if(n.orient=function(e,t,i){switch(e){case CU:case NU:case EU:case kU:case SU:case yU:return}const{x:n,y:o,x2:r,y2:s}=t;switch(e){case bU:if(Cj(n)&&(iH(n.bin)||Cj(o)&&o.aggregate&&!n.aggregate))return"vertical";if(Cj(o)&&(iH(o.bin)||Cj(n)&&n.aggregate&&!o.aggregate))return"horizontal";if(s||r){if(i)return i;if(!r&&(Cj(n)&&n.type===F$&&!tH(n.bin)||Dj(n)))return"horizontal";if(!s&&(Cj(o)&&o.type===F$&&!tH(o.bin)||Dj(o)))return"vertical"}case xU:if(r&&(!Cj(n)||!iH(n.bin))&&s&&(!Cj(o)||!iH(o.bin)))return;case vU:if(s)return Cj(o)&&iH(o.bin)?"horizontal":"vertical";if(r)return Cj(n)&&iH(n.bin)?"vertical":"horizontal";if(e===xU){if(n&&!o)return"vertical";if(o&&!n)return"horizontal"}case wU:case DU:{const t=kj(n),r=kj(o);if(i)return i;if(t&&!r)return"tick"!==e?"horizontal":"vertical";if(!t&&r)return"tick"!==e?"vertical":"horizontal";if(t&&r){const t=n,i=o,r=t.type===B$,s=i.type===B$;return r&&!s?"tick"!==e?"vertical":"horizontal":!r&&s?"tick"!==e?"horizontal":"vertical":!t.aggregate&&i.aggregate?"tick"!==e?"vertical":"horizontal":t.aggregate&&!i.aggregate&&"tick"!==e?"horizontal":"vertical"}return}}return"vertical"}(n.type,t,o),void 0!==o&&o!==n.orient&&a$(`Specified orient "${n.orient}" overridden with "${o}".`),"bar"===n.type&&n.orient){const e=xH("cornerRadiusEnd",n,i);if(void 0!==e){const i="horizontal"===n.orient&&t.x2||"vertical"===n.orient&&t.y2?["cornerRadius"]:zU[n.orient];for(const t of i)n[t]=e;void 0!==n.cornerRadiusEnd&&delete n.cornerRadiusEnd}}return void 0===xH("opacity",n,i)&&(n.opacity=function(e,t){if(Cz([CU,DU,NU,EU],e)&&!dq(t))return.7}(n.type,t)),void 0===xH("cursor",n,i)&&(n.cursor=function(e,t,i){return t.href||e.href||xH("href",e,i)?"pointer":e.cursor}(n,t,i)),n}(r,a,o),this.size=function({encoding:e,size:t}){for(const i of SV){const n=aV(i);nK(t[n])&&kj(e[i])&&(delete t[n],a$(e$(n)))}return t}({encoding:a,size:oK(e)?{...n,...e.width?{width:e.width}:{},...e.height?{height:e.height}:{}}:n}),this.stack=LK(s,a),this.specifiedScales=this.initScales(s,a),this.specifiedAxes=this.initAxes(a),this.specifiedLegends=this.initLegends(a),this.specifiedProjection=e.projection,this.selection=(e.params??[]).filter((e=>Qq(e)))}get hasProjection(){const{encoding:e}=this,t=this.mark===AU,i=e&&WW.some((t=>Lj(e[t])));return t||i}scaleDomain(e){const t=this.specifiedScales[e];return t?t.domain:void 0}axis(e){return this.specifiedAxes[e]}legend(e){return this.specifiedLegends[e]}initScales(e,t){return zV.reduce(((e,i)=>{const n=jj(t[i]);return n&&(e[i]=this.initScale(n.scale??{})),e}),{})}initScale(e){const{domain:t,range:i}=e,n=aH(e);return li(t)&&(n.domain=t.map(_H)),li(i)&&(n.range=i.map(_H)),n}initAxes(e){return SV.reduce(((t,i)=>{const n=e[i];if(Lj(n)||i===sW&&Lj(e.x2)||i===aW&&Lj(e.y2)){const e=Lj(n)?n.axis:void 0;t[i]=e?this.initAxis({...e}):e}return t}),{})}initAxis(e){const t=Rz(e),i={};for(const n of t){const t=e[n];i[n]=iq(t)?mH(t):_H(t)}return i}initLegends(e){return PV.reduce(((t,i)=>{const n=jj(e[i]);if(n&&function(e){switch(e){case vW:case bW:case yW:case CW:case wW:case xW:case LW:case NW:return!0;case kW:case DW:case SW:return!1}}(i)){const e=n.legend;t[i]=e?aH(e):e}return t}),{})}parseData(){this.component.data=eJ(this)}parseLayoutSize(){!function(e){const{size:t,component:i}=e;for(const n of SV){const o=aV(n);if(t[o]){const e=t[o];i.layoutSize.set(o,nK(e)?"step":e,!0)}else{const t=ZQ(e,o);i.layoutSize.set(o,t,!1)}}}(this)}parseSelections(){this.component.selection=function(e,t){const i={},n=e.config.selection;if(!t||!t.length)return i;for(const o of t){const t=Bz(o.name),r=o.select,s=rn(r)?r:r.type,a=ci(r)?mz(r):{type:s},{fields:l,encodings:c,...u}=n[s];for(const e in u)"mark"===e&&(a[e]={...u[e],...a[e]}),void 0!==a[e]&&!0!==a[e]||(a[e]=u[e]??a[e]);const h=i[t]={...a,name:t,type:s,init:o.value,bind:o.bind,events:rn(a.on)?BR(a.on,"scope"):Ti(mz(a.on))};for(const t of ZY)t.defined(h)&&t.parse&&t.parse(e,h,o)}return i}(this,this.selection)}parseMarkGroup(){this.component.mark=function(e){if(Cz([wU,vU,LU],e.mark)){const t=_q(e.mark,e.encoding);if(t.length>0)return function(e,t){return[{name:e.getName("pathgroup"),type:"group",from:{facet:{name:_J+e.requestDataName(OG.Main),data:e.requestDataName(OG.Main),groupby:t}},encode:{update:{width:{field:{group:"width"}},height:{field:{group:"height"}}}},marks:bJ(e,{fromPrefix:_J})}]}(e,t)}else if(e.mark===bU){const t=pH.some((t=>xH(t,e.markDef,e.config)));if(e.stack&&!e.fieldDef("size")&&t)return function(e){const[t]=bJ(e,{fromPrefix:vJ}),i=e.scaleName(e.stack.fieldChannel),n=(t={})=>e.vgField(e.stack.fieldChannel,t),o=(e,t)=>`${e}(${[n({prefix:"min",suffix:"start",expr:t}),n({prefix:"max",suffix:"start",expr:t}),n({prefix:"min",suffix:"end",expr:t}),n({prefix:"max",suffix:"end",expr:t})].map((e=>`scale('${i}',${e})`)).join(",")})`;let r,s;"x"===e.stack.fieldChannel?(r={..._z(t.encode.update,["y","yc","y2","height",...pH]),x:{signal:o("min","datum")},x2:{signal:o("max","datum")},clip:{value:!0}},s={x:{field:{group:"x"},mult:-1},height:{field:{group:"height"}}},t.encode.update={...vz(t.encode.update,["y","yc","y2"]),height:{field:{group:"height"}}}):(r={..._z(t.encode.update,["x","xc","x2","width"]),y:{signal:o("min","datum")},y2:{signal:o("max","datum")},clip:{value:!0}},s={y:{field:{group:"y"},mult:-1},width:{field:{group:"width"}}},t.encode.update={...vz(t.encode.update,["x","xc","x2"]),width:{field:{group:"width"}}});for(const i of pH){const n=kH(i,e.markDef,e.config);t.encode.update[i]?(r[i]=t.encode.update[i],delete t.encode.update[i]):n&&(r[i]=bH(n)),n&&(t.encode.update[i]={value:0})}const a=[];if(e.stack.groupbyChannel){const t=e.fieldDef(e.stack.groupbyChannel),i=Oj(t);i&&a.push(i),(t?.bin||t?.timeUnit)&&a.push(Oj(t,{binSuffix:"end"}))}return r=["stroke","strokeWidth","strokeJoin","strokeCap","strokeDash","strokeDashOffset","strokeMiterLimit","strokeOpacity"].reduce(((i,n)=>{if(t.encode.update[n])return{...i,[n]:t.encode.update[n]};{const t=kH(n,e.markDef,e.config);return void 0!==t?{...i,[n]:bH(t)}:i}}),r),r.stroke&&(r.strokeForeground={value:!0},r.strokeOffset={value:0}),[{type:"group",from:{facet:{data:e.requestDataName(OG.Main),name:vJ+e.requestDataName(OG.Main),groupby:a,aggregate:{fields:[n({suffix:"start"}),n({suffix:"start"}),n({suffix:"end"}),n({suffix:"end"})],ops:["min","max","min","max"]}}},encode:{update:r},marks:[{type:"group",encode:{update:s},marks:[t]}]}]}(e)}return bJ(e)}(this)}parseAxesAndHeaders(){var e;this.component.axes=(e=this,SV.reduce(((t,i)=>(e.component.scales[i]&&(t[i]=[uJ(i,e)]),t)),{}))}assembleSelectionTopLevelSignals(e){return function(e,t){let i=!1;for(const n of Oz(e.component.selection??{})){const o=n.name,r=gn(o+qY);if(0===t.filter((e=>e.name===o)).length){const e="global"===n.resolve?"union":n.resolve,i="point"===n.type?", true, true)":")";t.push({name:n.name,update:`${YY}(${r}, ${gn(e)}${i}`})}i=!0;for(const i of ZY)i.defined(n)&&i.topLevelSignals&&(t=i.topLevelSignals(e,n,t))}return i&&0===t.filter((e=>"unit"===e.name)).length&&t.unshift({name:"unit",value:{},on:[{events:"mousemove",update:"isTuple(group()) ? group() : unit"}]}),WG(t)}(this,e)}assembleSignals(){return[...cZ(this),...PG(this,[])]}assembleSelectionData(e){return function(e,t){const i=[...t];for(const t of Oz(e.component.selection??{})){const n={name:t.name+qY};if(t.init){const i=t.project.items.map((e=>{const{signals:t,...i}=e;return i}));n.values=t.init.map((t=>({unit:XY(e,{escape:!1}),fields:i,values:FG(t,!1)})))}i.filter((e=>e.name===t.name+qY)).length||i.push(n)}return i}(this,e)}assembleLayout(){return null}assembleLayoutSignals(){return OZ(this)}assembleMarks(){let e=this.component.mark??[];return this.parent&&LQ(this.parent)||(e=zG(this,e)),e.map(this.correctDataNames)}getMapping(){return this.encoding}get mark(){return this.markDef.type}channelHasField(e){return hq(this.encoding,e)}fieldDef(e){return Uj(this.encoding[e])}typedFieldDef(e){const t=this.fieldDef(e);return Nj(t)?t:null}}class wJ extends NQ{constructor(e,t,i,n,o){super(e,"layer",t,i,o,e.resolve,e.view);const r={...n,...e.width?{width:e.width}:{},...e.height?{height:e.height}:{}};this.children=e.layer.map(((e,t)=>{if(wK(e))return new wJ(e,this,this.getName(`layer_${t}`),r,o);if(cq(e))return new yJ(e,this,this.getName(`layer_${t}`),r,o);throw new Error(IH(e))}))}parseData(){this.component.data=eJ(this);for(const e of this.children)e.parseData()}parseLayoutSize(){GQ(this),YQ(this,"width"),YQ(this,"height")}parseSelections(){this.component.selection={};for(const e of this.children){e.parseSelections();for(const t of Rz(e.component.selection))this.component.selection[t]=e.component.selection[t]}}parseMarkGroup(){for(const e of this.children)e.parseMarkGroup()}parseAxesAndHeaders(){!function(e){const{axes:t,resolve:i}=e.component,n={top:0,bottom:0,right:0,left:0};for(const n of e.children){n.parseAxesAndHeaders();for(const o of Rz(n.component.axes))i.axis[o]=HZ(e.component.resolve,o),"shared"===i.axis[o]&&(t[o]=sJ(t[o],n.component.axes[o]),t[o]||(i.axis[o]="independent",delete t[o]))}for(const o of SV){for(const r of e.children)if(r.component.axes[o]){if("independent"===i.axis[o]){t[o]=(t[o]??[]).concat(r.component.axes[o]);for(const e of r.component.axes[o]){const{value:t,explicit:i}=e.getWithExplicit("orient");if(!uH(t)){if(n[t]>0&&!i){const i=rJ[t];n[t]>n[i]&&e.set("orient",i,!1)}n[t]++}}}delete r.component.axes[o]}if("independent"===i.axis[o]&&t[o]&&t[o].length>1)for(const e of t[o])e.get("grid")&&!e.explicit.grid&&(e.implicit.grid=!1)}}(this)}assembleSelectionTopLevelSignals(e){return this.children.reduce(((e,t)=>t.assembleSelectionTopLevelSignals(e)),e)}assembleSignals(){return this.children.reduce(((e,t)=>e.concat(t.assembleSignals())),cZ(this))}assembleLayoutSignals(){return this.children.reduce(((e,t)=>e.concat(t.assembleLayoutSignals())),OZ(this))}assembleSelectionData(e){return this.children.reduce(((e,t)=>t.assembleSelectionData(e)),e)}assembleTitle(){let e=super.assembleTitle();if(e)return e;for(const t of this.children)if(e=t.assembleTitle(),e)return e}assembleLayout(){return null}assembleMarks(){return function(e,t){for(const i of e.children)xQ(i)&&(t=zG(i,t));return t}(this,this.children.flatMap((e=>e.assembleMarks())))}assembleLegends(){return this.children.reduce(((e,t)=>e.concat(t.assembleLegends())),oX(this))}}function CJ(e,t,i,n,o){if(gj(e))return new QQ(e,t,i,o);if(wK(e))return new wJ(e,t,i,n,o);if(cq(e))return new yJ(e,t,i,n,o);if(function(e){return tK(e)||iK(e)||eK(e)}(e))return new tJ(e,t,i,o);throw new Error(IH(e))}function SJ(e,t={}){var i;t.logger&&(i=t.logger,s$=i),t.fieldTitle&&zj(t.fieldTitle);try{const i=mK(hi(t.config,e.config)),n=fG(e,i),o=CJ(n,null,"",void 0,i);return o.parse(),function(e,t){qX(e.sources);let i=0,n=0;for(let n=0;n<5&&GX(e,t,!0);n++)i++;e.sources.map($X);for(let i=0;i<5&&GX(e,t,!1);i++)n++;qX(e.sources),5===Math.max(i,n)&&a$("Maximum optimization runs(5) reached.")}(o.component.data,o),{spec:function(e,t,i={},n){const o=e.config?function(e){e=mz(e);for(const t of vK)delete e[t];if(e.axis)for(const t in e.axis)iq(e.axis[t])&&delete e.axis[t];if(e.legend)for(const t of Wq)delete e.legend[t];if(e.mark){for(const t of FU)delete e.mark[t];e.mark.tooltip&&ci(e.mark.tooltip)&&delete e.mark.tooltip}e.params&&(e.signals=(e.signals||[]).concat(Jq(e.params)),delete e.params);for(const t of _K){for(const i of FU)delete e[t][i];const i=bK[t];if(i)for(const n of i)delete e[t][n];yK(e,t)}for(const t of Rz(Bq))delete e[t];!function(e){const{titleMarkConfig:t,subtitleMarkConfig:i,subtitle:n}=lH(e.title);Tz(t)||(e.style["group-title"]={...e.style["group-title"],...t}),Tz(i)||(e.style["group-subtitle"]={...e.style["group-subtitle"],...i}),Tz(n)?delete e.title:e.title=n}(e);for(const t in e)ci(e[t])&&Tz(e[t])&&delete e[t];return Tz(e)?void 0:e}(e.config):void 0,r=[].concat(e.assembleSelectionData([]),function(e,t){const i=[],n=$Q(i);let o=0;for(const t of e.sources){t.hasName()||(t.dataName="source_"+o++);const e=t.assemble();n(t,e)}for(const e of i)0===e.transform.length&&delete e.transform;let r=0;for(const[e,t]of i.entries())0!==(t.transform??[]).length||t.source||i.splice(r++,0,i.splice(e,1)[0]);for(const t of i)for(const i of t.transform??[])"lookup"===i.type&&(i.from=e.outputNodes[i.from].getSource());for(const e of i)e.name in t&&(e.values=t[e.name]);return i}(e.component.data,i)),s=e.assembleProjections(),a=e.assembleTitle(),l=e.assembleGroupStyle(),c=e.assembleGroupEncodeEntry(!0);let u=e.assembleLayoutSignals();u=u.filter((e=>"width"!==e.name&&"height"!==e.name||void 0===e.value||(t[e.name]=+e.value,!1)));const{params:h,...d}=t;return{$schema:"https://vega.github.io/schema/vega/v5.json",...e.description?{description:e.description}:{},...d,...a?{title:a}:{},...l?{style:l}:{},...c?{encode:{update:c}}:{},data:r,...s.length>0?{projections:s}:{},...e.assembleGroup([...u,...e.assembleSelectionTopLevelSignals([]),...Jq(h)]),...o?{config:o}:{},...n?{usermeta:n}:{}}}(o,function(e,t,i,n){const o=n.component.layoutSize.get("width"),r=n.component.layoutSize.get("height");if(void 0===t?(t={type:"pad"},n.hasAxisOrientSignalRef()&&(t.resize=!0)):rn(t)&&(t={type:t}),o&&r&&("fit"===(s=t.type)||"fit-x"===s||"fit-y"===s))if("step"===o&&"step"===r)a$(OH()),t.type="pad";else if("step"===o||"step"===r){const e="step"===o?"width":"height";a$(OH(LV(e)));const i="width"===e?"height":"width";t.type=function(e){return e?`fit-${LV(e)}`:"fit"}(i)}var s;return{...1===Rz(t).length&&t.type?"pad"===t.type?{}:{autosize:t.type}:{autosize:t},...yG(i,!1),...yG(e,!0)}}(e,n.autosize,i,o),e.datasets,e.usermeta),normalized:n}}finally{t.logger&&(s$=r$),t.fieldTitle&&zj(Pj)}}const xJ="5.1.0",kJ=function(e){const[t,i]=/schema\/([\w-]+)\/([\w\.\-]+)\.json$/g.exec(e).slice(1,3);return{library:t,version:i}},DJ="#fff",LJ={background:"#333",title:{color:DJ,subtitleColor:DJ},style:{"guide-label":{fill:DJ},"guide-title":{fill:DJ}},axis:{domainColor:DJ,gridColor:"#888",tickColor:DJ}},NJ="#4572a7",EJ={background:"#fff",arc:{fill:NJ},area:{fill:NJ},line:{stroke:NJ,strokeWidth:2},path:{stroke:NJ},rect:{fill:NJ},shape:{stroke:NJ},symbol:{fill:NJ,strokeWidth:1.5,size:50},axis:{bandPosition:.5,grid:!0,gridColor:"#000000",gridOpacity:1,gridWidth:.5,labelPadding:10,tickSize:5,tickWidth:.5},axisBand:{grid:!1,tickExtra:!0},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:50,symbolType:"square"},range:{category:["#4572a7","#aa4643","#8aa453","#71598e","#4598ae","#d98445","#94aace","#d09393","#b9cc98","#a99cbc"]}},AJ="#30a2da",MJ="#cbcbcb",IJ="#f0f0f0",TJ="#333",RJ={arc:{fill:AJ},area:{fill:AJ},axis:{domainColor:MJ,grid:!0,gridColor:MJ,gridWidth:1,labelColor:"#999",labelFontSize:10,titleColor:"#333",tickColor:MJ,tickSize:10,titleFontSize:14,titlePadding:10,labelPadding:4},axisBand:{grid:!1},background:IJ,group:{fill:IJ},legend:{labelColor:TJ,labelFontSize:11,padding:1,symbolSize:30,symbolType:"square",titleColor:TJ,titleFontSize:14,titlePadding:10},line:{stroke:AJ,strokeWidth:2},path:{stroke:AJ,strokeWidth:.5},rect:{fill:AJ},range:{category:["#30a2da","#fc4f30","#e5ae38","#6d904f","#8b8b8b","#b96db8","#ff9e27","#56cc60","#52d2ca","#52689e","#545454","#9fe4f8"],diverging:["#cc0020","#e77866","#f6e7e1","#d6e8ed","#91bfd9","#1d78b5"],heatmap:["#d6e8ed","#cee0e5","#91bfd9","#549cc6","#1d78b5"]},point:{filled:!0,shape:"circle"},shape:{stroke:AJ},bar:{binSpacing:2,fill:AJ,stroke:null},title:{anchor:"start",fontSize:24,fontWeight:600,offset:20}},OJ="#000",FJ={group:{fill:"#e5e5e5"},arc:{fill:OJ},area:{fill:OJ},line:{stroke:OJ},path:{stroke:OJ},rect:{fill:OJ},shape:{stroke:OJ},symbol:{fill:OJ,size:40},axis:{domain:!1,grid:!0,gridColor:"#FFFFFF",gridOpacity:1,labelColor:"#7F7F7F",labelPadding:4,tickColor:"#7F7F7F",tickSize:5.67,titleFontSize:16,titleFontWeight:"normal"},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:40},range:{category:["#000000","#7F7F7F","#1A1A1A","#999999","#333333","#B0B0B0","#4D4D4D","#C9C9C9","#666666","#DCDCDC"]}},PJ="Benton Gothic, sans-serif",BJ="#82c6df",zJ="Benton Gothic Bold, sans-serif",WJ="normal",VJ={"category-6":["#ec8431","#829eb1","#c89d29","#3580b1","#adc839","#ab7fb4"],"fire-7":["#fbf2c7","#f9e39c","#f8d36e","#f4bb6a","#e68a4f","#d15a40","#ab4232"],"fireandice-6":["#e68a4f","#f4bb6a","#f9e39c","#dadfe2","#a6b7c6","#849eae"],"ice-7":["#edefee","#dadfe2","#c4ccd2","#a6b7c6","#849eae","#607785","#47525d"]},HJ={background:"#ffffff",title:{anchor:"start",color:"#000000",font:zJ,fontSize:22,fontWeight:"normal"},arc:{fill:BJ},area:{fill:BJ},line:{stroke:BJ,strokeWidth:2},path:{stroke:BJ},rect:{fill:BJ},shape:{stroke:BJ},symbol:{fill:BJ,size:30},axis:{labelFont:PJ,labelFontSize:11.5,labelFontWeight:"normal",titleFont:zJ,titleFontSize:13,titleFontWeight:WJ},axisX:{labelAngle:0,labelPadding:4,tickSize:3},axisY:{labelBaseline:"middle",maxExtent:45,minExtent:45,tickSize:2,titleAlign:"left",titleAngle:0,titleX:-45,titleY:-11},legend:{labelFont:PJ,labelFontSize:11.5,symbolType:"square",titleFont:zJ,titleFontSize:13,titleFontWeight:WJ},range:{category:VJ["category-6"],diverging:VJ["fireandice-6"],heatmap:VJ["fire-7"],ordinal:VJ["fire-7"],ramp:VJ["fire-7"]}},$J="#ab5787",UJ="#979797",jJ={background:"#f9f9f9",arc:{fill:$J},area:{fill:$J},line:{stroke:$J},path:{stroke:$J},rect:{fill:$J},shape:{stroke:$J},symbol:{fill:$J,size:30},axis:{domainColor:UJ,domainWidth:.5,gridWidth:.2,labelColor:UJ,tickColor:UJ,tickWidth:.2,titleColor:UJ},axisBand:{grid:!1},axisX:{grid:!0,tickSize:10},axisY:{domain:!1,grid:!0,tickSize:0},legend:{labelFontSize:11,padding:1,symbolSize:30,symbolType:"square"},range:{category:["#ab5787","#51b2e5","#703c5c","#168dd9","#d190b6","#00609f","#d365ba","#154866","#666666","#c4c4c4"]}},qJ="#3e5c69",KJ={background:"#fff",arc:{fill:qJ},area:{fill:qJ},line:{stroke:qJ},path:{stroke:qJ},rect:{fill:qJ},shape:{stroke:qJ},symbol:{fill:qJ},axis:{domainWidth:.5,grid:!0,labelPadding:2,tickSize:5,tickWidth:.5,titleFontWeight:"normal"},axisBand:{grid:!1},axisX:{gridWidth:.2},axisY:{gridDash:[3],gridWidth:.4},legend:{labelFontSize:11,padding:1,symbolType:"square"},range:{category:["#3e5c69","#6793a6","#182429","#0570b0","#3690c0","#74a9cf","#a6bddb","#e2ddf2"]}},GJ="#1696d2",YJ="#000000",ZJ="Lato",XJ="Lato",QJ={"main-colors":["#1696d2","#d2d2d2","#000000","#fdbf11","#ec008b","#55b748","#5c5859","#db2b27"],"shades-blue":["#CFE8F3","#A2D4EC","#73BFE2","#46ABDB","#1696D2","#12719E","#0A4C6A","#062635"],"shades-gray":["#F5F5F5","#ECECEC","#E3E3E3","#DCDBDB","#D2D2D2","#9D9D9D","#696969","#353535"],"shades-yellow":["#FFF2CF","#FCE39E","#FDD870","#FCCB41","#FDBF11","#E88E2D","#CA5800","#843215"],"shades-magenta":["#F5CBDF","#EB99C2","#E46AA7","#E54096","#EC008B","#AF1F6B","#761548","#351123"],"shades-green":["#DCEDD9","#BCDEB4","#98CF90","#78C26D","#55B748","#408941","#2C5C2D","#1A2E19"],"shades-black":["#D5D5D4","#ADABAC","#848081","#5C5859","#332D2F","#262223","#1A1717","#0E0C0D"],"shades-red":["#F8D5D4","#F1AAA9","#E9807D","#E25552","#DB2B27","#A4201D","#6E1614","#370B0A"],"one-group":["#1696d2","#000000"],"two-groups-cat-1":["#1696d2","#000000"],"two-groups-cat-2":["#1696d2","#fdbf11"],"two-groups-cat-3":["#1696d2","#db2b27"],"two-groups-seq":["#a2d4ec","#1696d2"],"three-groups-cat":["#1696d2","#fdbf11","#000000"],"three-groups-seq":["#a2d4ec","#1696d2","#0a4c6a"],"four-groups-cat-1":["#000000","#d2d2d2","#fdbf11","#1696d2"],"four-groups-cat-2":["#1696d2","#ec0008b","#fdbf11","#5c5859"],"four-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a"],"five-groups-cat-1":["#1696d2","#fdbf11","#d2d2d2","#ec008b","#000000"],"five-groups-cat-2":["#1696d2","#0a4c6a","#d2d2d2","#fdbf11","#332d2f"],"five-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a","#000000"],"six-groups-cat-1":["#1696d2","#ec008b","#fdbf11","#000000","#d2d2d2","#55b748"],"six-groups-cat-2":["#1696d2","#d2d2d2","#ec008b","#fdbf11","#332d2f","#0a4c6a"],"six-groups-seq":["#cfe8f3","#a2d4ec","#73bfe2","#46abdb","#1696d2","#12719e"],"diverging-colors":["#ca5800","#fdbf11","#fdd870","#fff2cf","#cfe8f3","#73bfe2","#1696d2","#0a4c6a"]},JJ={background:"#FFFFFF",title:{anchor:"start",fontSize:18,font:ZJ},axisX:{domain:!0,domainColor:YJ,domainWidth:1,grid:!1,labelFontSize:12,labelFont:XJ,labelAngle:0,tickColor:YJ,tickSize:5,titleFontSize:12,titlePadding:10,titleFont:ZJ},axisY:{domain:!1,domainWidth:1,grid:!0,gridColor:"#DEDDDD",gridWidth:1,labelFontSize:12,labelFont:XJ,labelPadding:8,ticks:!1,titleFontSize:12,titlePadding:10,titleFont:ZJ,titleAngle:0,titleY:-10,titleX:18},legend:{labelFontSize:12,labelFont:XJ,symbolSize:100,titleFontSize:12,titlePadding:10,titleFont:ZJ,orient:"right",offset:10},view:{stroke:"transparent"},range:{category:QJ["six-groups-cat-1"],diverging:QJ["diverging-colors"],heatmap:QJ["diverging-colors"],ordinal:QJ["six-groups-seq"],ramp:QJ["shades-blue"]},area:{fill:GJ},rect:{fill:GJ},line:{color:GJ,stroke:GJ,strokeWidth:5},trail:{color:GJ,stroke:GJ,strokeWidth:0,size:1},path:{stroke:GJ,strokeWidth:.5},point:{filled:!0},text:{font:"Lato",color:GJ,fontSize:11,align:"center",fontWeight:400,size:11},style:{bar:{fill:GJ,stroke:null}},arc:{fill:GJ},shape:{stroke:GJ},symbol:{fill:GJ,size:30}},e0="#3366CC",t0="#ccc",i0="Arial, sans-serif",n0={arc:{fill:e0},area:{fill:e0},path:{stroke:e0},rect:{fill:e0},shape:{stroke:e0},symbol:{stroke:e0},circle:{fill:e0},background:"#fff",padding:{top:10,right:10,bottom:10,left:10},style:{"guide-label":{font:i0,fontSize:12},"guide-title":{font:i0,fontSize:12},"group-title":{font:i0,fontSize:12}},title:{font:i0,fontSize:14,fontWeight:"bold",dy:-3,anchor:"start"},axis:{gridColor:t0,tickColor:t0,domain:!1,grid:!0},range:{category:["#4285F4","#DB4437","#F4B400","#0F9D58","#AB47BC","#00ACC1","#FF7043","#9E9D24","#5C6BC0","#F06292","#00796B","#C2185B"],heatmap:["#c6dafc","#5e97f6","#2a56c6"]}},o0="2.10.0";const r0="vg-tooltip-element",s0={offsetX:10,offsetY:10,id:r0,styleId:"vega-tooltip-style",theme:"light",disableDefaultStyle:!1,sanitize:function(e){return String(e).replace(/&/g,"&").replace(/e?"[Object]":t.indexOf(n)>=0?"[Circular]":(t.push(n),n)}}(t))}class l0{constructor(e){this.options=Object.assign(Object.assign({},s0),e);const t=this.options.id;if(this.el=null,this.call=this.tooltipHandler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){const e=document.createElement("style");e.setAttribute("id",this.options.styleId),e.innerHTML=function(e){if(!/^[A-Za-z]+[-:.\w]*$/.test(e))throw new Error("Invalid HTML ID");return"#vg-tooltip-element {\n visibility: hidden;\n padding: 8px;\n position: fixed;\n z-index: 1000;\n font-family: sans-serif;\n font-size: 11px;\n border-radius: 3px;\n box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);\n /* The default theme is the light theme. */\n background-color: rgba(255, 255, 255, 0.95);\n border: 1px solid #d9d9d9;\n color: black; }\n #vg-tooltip-element.visible {\n visibility: visible; }\n #vg-tooltip-element h2 {\n margin-top: 0;\n margin-bottom: 10px;\n font-size: 13px; }\n #vg-tooltip-element img {\n max-width: 200px;\n max-height: 200px; }\n #vg-tooltip-element table {\n border-spacing: 0; }\n #vg-tooltip-element table tr {\n border: none; }\n #vg-tooltip-element table tr td {\n overflow: hidden;\n text-overflow: ellipsis;\n padding-top: 2px;\n padding-bottom: 2px; }\n #vg-tooltip-element table tr td.key {\n color: #808080;\n max-width: 150px;\n text-align: right;\n padding-right: 4px; }\n #vg-tooltip-element table tr td.value {\n display: block;\n max-width: 300px;\n max-height: 7em;\n text-align: left; }\n #vg-tooltip-element.dark-theme {\n background-color: rgba(32, 32, 32, 0.9);\n border: 1px solid #f5f5f5;\n color: white; }\n #vg-tooltip-element.dark-theme td.key {\n color: #bfbfbf; }\n".toString().replace(r0,e)}(t);const i=document.head;i.childNodes.length>0?i.insertBefore(e,i.childNodes[0]):i.appendChild(e)}}tooltipHandler(e,t,i,n){if(this.el=document.getElementById(this.options.id),this.el||(this.el=document.createElement("div"),this.el.setAttribute("id",this.options.id),this.el.classList.add("vg-tooltip"),document.body.appendChild(this.el)),(null!=document.fullscreenElement?document.fullscreenElement:document.body).appendChild(this.el),null==n||""===n)return void this.el.classList.remove("visible",`${this.options.theme}-theme`);this.el.innerHTML=function(e,t,i){if(li(e))return`[${e.map((e=>t(rn(e)?e:a0(e,i)))).join(", ")}]`;if(ci(e)){let n="";const o=e,{title:r,image:s}=o,a=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o${t(r)}`),s&&(n+=``);const l=Object.keys(a);if(l.length>0){n+="";for(const e of l){let o=a[e];void 0!==o&&(ci(o)&&(o=a0(o,i)),n+=``)}n+="
${t(e)}:${t(o)}
"}return n||"{}"}return t(e)}(n,this.options.sanitize,this.options.maxDepth),this.el.classList.add("visible",`${this.options.theme}-theme`);const{x:o,y:r}=function(e,t,i,n){let o=e.clientX+i;o+t.width>window.innerWidth&&(o=+e.clientX-i-t.width);let r=e.clientY+n;return r+t.height>window.innerHeight&&(r=+e.clientY-n-t.height),{x:o,y:r}}(t,this.el.getBoundingClientRect(),this.options.offsetX,this.options.offsetY);this.el.setAttribute("style",`top: ${r}px; left: ${o}px`)}}function c0(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function u0(e,t,i,n,o,r,s){try{var a=e[r](s),l=a.value}catch(e){return void i(e)}a.done?t(l):Promise.resolve(l).then(n,o)}function h0(e){return function(){var t=this,i=arguments;return new Promise((function(n,o){var r=e.apply(t,i);function s(e){u0(r,n,o,s,a,"next",e)}function a(e){u0(r,n,o,s,a,"throw",e)}s(void 0)}))}}var d0,g0=Object.prototype,f0=g0.hasOwnProperty,p0="function"==typeof Symbol?Symbol:{},m0=p0.iterator||"@@iterator",_0=p0.asyncIterator||"@@asyncIterator",v0=p0.toStringTag||"@@toStringTag";function b0(e,t,i,n){var o=t&&t.prototype instanceof D0?t:D0,r=Object.create(o.prototype),s=new z0(n||[]);return r._invoke=function(e,t,i){var n=w0;return function(o,r){if(n===S0)throw new Error("Generator is already running");if(n===x0){if("throw"===o)throw r;return V0()}for(i.method=o,i.arg=r;;){var s=i.delegate;if(s){var a=F0(s,i);if(a){if(a===k0)continue;return a}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(n===w0)throw n=x0,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n=S0;var l=y0(e,t,i);if("normal"===l.type){if(n=i.done?x0:C0,l.arg===k0)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(n=x0,i.method="throw",i.arg=l.arg)}}}(e,i,s),r}function y0(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(e){return{type:"throw",arg:e}}}var w0="suspendedStart",C0="suspendedYield",S0="executing",x0="completed",k0={};function D0(){}function L0(){}function N0(){}var E0={};E0[m0]=function(){return this};var A0=Object.getPrototypeOf,M0=A0&&A0(A0(W0([])));M0&&M0!==g0&&f0.call(M0,m0)&&(E0=M0);var I0=N0.prototype=D0.prototype=Object.create(E0);function T0(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function R0(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===L0||"GeneratorFunction"===(t.displayName||t.name))}function O0(e,t){function i(n,o,r,s){var a=y0(e[n],e,o);if("throw"!==a.type){var l=a.arg,c=l.value;return c&&"object"==typeof c&&f0.call(c,"__await")?t.resolve(c.__await).then((function(e){i("next",e,r,s)}),(function(e){i("throw",e,r,s)})):t.resolve(c).then((function(e){l.value=e,r(l)}),(function(e){return i("throw",e,r,s)}))}s(a.arg)}var n;this._invoke=function(e,o){function r(){return new t((function(t,n){i(e,o,t,n)}))}return n=n?n.then(r,r):r()}}function F0(e,t){var i=e.iterator[t.method];if(i===d0){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=d0,F0(e,t),"throw"===t.method))return k0;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return k0}var n=y0(i,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,k0;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=d0),t.delegate=null,k0):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,k0)}function P0(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function B0(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function z0(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P0,this),this.reset(!0)}function W0(e){if(e){var t=e[m0];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,n=function t(){for(;++i=0;--n){var o=this.tryEntries[n],r=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=f0.call(o,"catchLoc"),a=f0.call(o,"finallyLoc");if(s&&a){if(this.prev=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&f0.call(n,"finallyLoc")&&this.prev=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),B0(i),k0}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var n=i.completion;if("throw"===n.type){var o=n.arg;B0(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,i){return this.delegate={iterator:W0(e),resultName:t,nextLoc:i},"next"===this.method&&(this.arg=d0),k0}};var H0={wrap:b0,isGeneratorFunction:R0,AsyncIterator:O0,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,N0):(e.__proto__=N0,v0 in e||(e[v0]="GeneratorFunction")),e.prototype=Object.create(I0),e},awrap:function(e){return{__await:e}},async:function(e,t,i,n,o){void 0===o&&(o=Promise);var r=new O0(b0(e,t,i,n),o);return R0(t)?r:r.next().then((function(e){return e.done?e.value:r.next()}))},keys:function(e){var t=[];for(var i in e)t.push(i);return t.reverse(),function i(){for(;t.length;){var n=t.pop();if(n in e)return i.value=n,i.done=!1,i}return i.done=!0,i}},values:W0};function $0(e,t,i){var n=e.open(t),o=new URL(t).origin,r=40;e.addEventListener("message",(function t(i){i.source===n&&(r=0,e.removeEventListener("message",t,!1))}),!1),setTimeout((function e(){r<=0||(n.postMessage(i,o),setTimeout(e,250),r-=1)}),250)}var U0,j0='.vega-embed {\n position: relative;\n display: inline-block;\n box-sizing: border-box; }\n .vega-embed.has-actions {\n padding-right: 38px; }\n .vega-embed details:not([open]) > :not(summary) {\n display: none !important; }\n .vega-embed summary {\n list-style: none;\n position: absolute;\n top: 0;\n right: 0;\n padding: 6px;\n z-index: 1000;\n background: white;\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);\n color: #1b1e23;\n border: 1px solid #aaa;\n border-radius: 999px;\n opacity: 0.2;\n transition: opacity 0.4s ease-in;\n outline: none;\n cursor: pointer;\n line-height: 0px; }\n .vega-embed summary::-webkit-details-marker {\n display: none; }\n .vega-embed summary:active {\n box-shadow: #aaa 0px 0px 0px 1px inset; }\n .vega-embed summary svg {\n width: 14px;\n height: 14px; }\n .vega-embed details[open] summary {\n opacity: 0.7; }\n .vega-embed:hover summary,\n .vega-embed:focus summary {\n opacity: 1 !important;\n transition: opacity 0.2s ease; }\n .vega-embed .vega-actions {\n position: absolute;\n z-index: 1001;\n top: 35px;\n right: -9px;\n display: flex;\n flex-direction: column;\n padding-bottom: 8px;\n padding-top: 8px;\n border-radius: 4px;\n box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);\n border: 1px solid #d9d9d9;\n background: white;\n animation-duration: 0.15s;\n animation-name: scale-in;\n animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5);\n text-align: left; }\n .vega-embed .vega-actions a {\n padding: 8px 16px;\n font-family: sans-serif;\n font-size: 14px;\n font-weight: 600;\n white-space: nowrap;\n color: #434a56;\n text-decoration: none; }\n .vega-embed .vega-actions a:hover {\n background-color: #f7f7f9;\n color: black; }\n .vega-embed .vega-actions::before, .vega-embed .vega-actions::after {\n content: "";\n display: inline-block;\n position: absolute; }\n .vega-embed .vega-actions::before {\n left: auto;\n right: 14px;\n top: -16px;\n border: 8px solid #0000;\n border-bottom-color: #d9d9d9; }\n .vega-embed .vega-actions::after {\n left: auto;\n right: 15px;\n top: -14px;\n border: 7px solid #0000;\n border-bottom-color: #fff; }\n .vega-embed .chart-wrapper.fit-x {\n width: 100%; }\n .vega-embed .chart-wrapper.fit-y {\n height: 100%; }\n\n.vega-embed-wrapper {\n max-width: 100%;\n overflow: auto;\n padding-right: 14px; }\n\n@keyframes scale-in {\n from {\n opacity: 0;\n transform: scale(0.6); }\n to {\n opacity: 1;\n transform: scale(1); } }\n';function q0(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;ne,"vega-lite":(e,t)=>X0.compile(e,{config:t}).spec},o1='\n\n \n \n \n',r1="chart-wrapper";function s1(e){return"function"==typeof e}function a1(e,t,i,n){var o="".concat(t,'
'),r="
".concat(i,""),s=window.open("");s.document.write(o+e+r),s.document.title="".concat(t1[n]," JSON Source")}function l1(e,t){if(e.$schema){var i,n=kJ(e.$schema);t&&t!==n.library&&console.warn("The given visualization spec is written in ".concat(t1[n.library],", but mode argument sets ").concat(null!==(i=t1[t])&&void 0!==i?i:t,"."));var o=n.library;return(0,nz.satisfies)(i1[o],"^".concat(n.version.slice(1)))||console.warn("The input spec uses ".concat(t1[o]," ").concat(n.version,", but the current version of ").concat(t1[o]," is v").concat(i1[o],".")),o}return"mark"in e||"encoding"in e||"layer"in e||"hconcat"in e||"vconcat"in e||"facet"in e||"repeat"in e?"vega-lite":"marks"in e||"signals"in e||"scales"in e||"axes"in e?"vega":null!=t?t:"vega"}function c1(e){return(t=e)&&"load"in t?e:Z0.loader(e);var t}function u1(e){var t;return null!==(t=e.usermeta&&e.usermeta.embedOptions)&&void 0!==t?t:{}}function h1(){return(h1=h0(H0.mark((function e(t,i){var n,o,r,s,a,l,c,u,h,d,g=arguments;return H0.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=g.length>2&&void 0!==g[2]?g[2]:{},!rn(i)){e.next=10;break}return a=c1(r.loader),e.t0=JSON,e.next=6,a.load(i);case 6:e.t1=e.sent,s=e.t0.parse.call(e.t0,e.t1),e.next=11;break;case 10:s=i;case 11:return l=u1(s).loader,a&&!l||(a=c1(null!==(c=r.loader)&&void 0!==c?c:l)),e.next=15,d1(u1(s),a);case 15:return u=e.sent,e.next=18,d1(r,a);case 18:return h=e.sent,d=Y0(Y0({},q0(h,u)),{},{config:hi(null!==(n=h.config)&&void 0!==n?n:{},null!==(o=u.config)&&void 0!==o?o:{})}),e.next=22,p1(t,s,d,a);case 22:return e.abrupt("return",e.sent);case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d1(e,t){return g1.apply(this,arguments)}function g1(){return(g1=h0(H0.mark((function e(t,i){var n,o,r;return H0.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!rn(t.config)){e.next=8;break}return e.t1=JSON,e.next=4,i.load(t.config);case 4:e.t2=e.sent,e.t0=e.t1.parse.call(e.t1,e.t2),e.next=9;break;case 8:e.t0=null!==(n=t.config)&&void 0!==n?n:{};case 9:if(o=e.t0,!rn(t.patch)){e.next=18;break}return e.t4=JSON,e.next=14,i.load(t.patch);case 14:e.t5=e.sent,e.t3=e.t4.parse.call(e.t4,e.t5),e.next=19;break;case 18:e.t3=t.patch;case 19:return r=e.t3,e.abrupt("return",Y0(Y0(Y0({},t),r?{patch:r}:{}),o?{config:o}:{}));case 21:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f1(e){var t,i=e.getRootNode?e.getRootNode():document;return i instanceof ShadowRoot?{root:i,rootContainer:i}:{root:document,rootContainer:null!==(t=document.head)&&void 0!==t?t:document.body}}function p1(e,t){return m1.apply(this,arguments)}function m1(){return(m1=h0(H0.mark((function e(t,i){var n,o,r,s,a,l,c,u,h,d,g,f,p,m,_,v,y,w,C,S,x,k,D,L,N,E,A,M,I,T,R,O,F,P,B,z,W,V,H,$,U,j,q,K,G,Y,Z,X=arguments;return H0.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Z=function(){P&&document.removeEventListener("click",P),M.finalize()},l=X.length>2&&void 0!==X[2]?X[2]:{},c=X.length>3?X[3]:void 0,u=l.theme?hi(b[l.theme],null!==(n=l.config)&&void 0!==n?n:{}):l.config,h=Ji(l.actions)?l.actions:q0({},J0,null!==(o=l.actions)&&void 0!==o?o:{}),d=Y0(Y0({},e1),l.i18n),g=null!==(r=l.renderer)&&void 0!==r?r:"canvas",f=null!==(s=l.logLevel)&&void 0!==s?s:Z0.Warn,p=null!==(a=l.downloadFileName)&&void 0!==a?a:"visualization",m="string"==typeof t?document.querySelector(t):t){e.next=12;break}throw new Error("".concat(t," does not exist"));case 12:return!1!==l.defaultStyle&&(_="vega-embed-style",v=f1(m),y=v.root,w=v.rootContainer,y.getElementById(_)||((C=document.createElement("style")).id=_,C.innerText=void 0===l.defaultStyle||!0===l.defaultStyle?j0.toString():l.defaultStyle,w.appendChild(C))),S=l1(i,l.mode),x=n1[S](i,u),"vega-lite"===S&&x.$schema&&(k=kJ(x.$schema),(0,nz.satisfies)(i1.vega,"^".concat(k.version.slice(1)))||console.warn("The compiled spec uses Vega ".concat(k.version,", but current version is v").concat(i1.vega,"."))),m.classList.add("vega-embed"),h&&m.classList.add("has-actions"),m.innerHTML="",D=m,h&&((L=document.createElement("div")).classList.add(r1),m.appendChild(L),D=L),(N=l.patch)&&(x=N instanceof Function?N(x):HB(x,N,!0,!1).newDocument),l.formatLocale&&Z0.formatLocale(l.formatLocale),l.timeFormatLocale&&Z0.timeFormatLocale(l.timeFormatLocale),E=l.ast,A=Z0.parse(x,"vega-lite"===S?{}:u,{ast:E}),(M=new(l.viewClass||Z0.View)(A,Y0({loader:c,logLevel:f,renderer:g},E?{expr:Z0.expressionInterpreter}:{}))).addSignalListener("autosize",((e,t)=>{var i=t.type;"fit-x"==i?(D.classList.add("fit-x"),D.classList.remove("fit-y")):"fit-y"==i?(D.classList.remove("fit-x"),D.classList.add("fit-y")):"fit"==i?D.classList.add("fit-x","fit-y"):D.classList.remove("fit-x","fit-y")})),!1!==l.tooltip&&(I=s1(l.tooltip)?l.tooltip:new l0(!0===l.tooltip?{}:l.tooltip).call,M.tooltip(I)),void 0===(T=l.hover)&&(T="vega"===S),T&&(O=(R="boolean"==typeof T?{}:T).hoverSet,F=R.updateSet,M.hover(O,F)),l&&(null!=l.width&&M.width(l.width),null!=l.height&&M.height(l.height),null!=l.padding&&M.padding(l.padding)),e.next=36,M.initialize(D,l.bind).runAsync();case 36:if(!1!==h){if(B=m,!1!==l.defaultStyle&&((z=document.createElement("details")).title=d.CLICK_TO_VIEW_ACTIONS,m.append(z),B=z,(W=document.createElement("summary")).innerHTML=o1,z.append(W),P=e=>{z.contains(e.target)||z.removeAttribute("open")},document.addEventListener("click",P)),V=document.createElement("div"),B.append(V),V.classList.add("vega-actions"),!0===h||!1!==h.export)for(H=function(){var e=U[$];if(!0===h||!0===h.export||h.export[e]){var t=d["".concat(e.toUpperCase(),"_ACTION")],i=document.createElement("a");i.text=t,i.href="#",i.target="_blank",i.download="".concat(p,".").concat(e),i.addEventListener("mousedown",function(){var t=h0(H0.mark((function t(i){var n;return H0.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i.preventDefault(),t.next=3,M.toImageURL(e,l.scaleFactor);case 3:n=t.sent,this.href=n;case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()),V.append(i)}},$=0,U=["svg","png"];$e.length)&&(t=e.length);for(var i=0,n=new Array(t);i=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){a=!0,r=e},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw r}}}}(e.attributes);try{for(n.s();!(i=n.n()).done;){var o=i.value;o.name.startsWith("data-js-")&&t.setAttribute(o.name,o.value)}}catch(e){n.e(e)}finally{n.f()}},onNodeAdded:function(e){if(e.nodeType===Node.ELEMENT_NODE&&e.hasAttribute("autofocus")&&(e.focus(),e.setSelectionRange&&e.value)){var t=e.value.length;e.setSelectionRange(t,t)}}};var C1={ContentEditable:N,Cell:it,Session:Et,FocusOnUpdate:At,ScrollOnUpdate:{mounted:function(){this.__scroll()},updated:function(){this.__scroll()},__scroll:function(){this.el.scrollTop=this.el.scrollHeight}},VirtualizedLines:Ot,Menu:Ft,UserForm:zt,VegaLite:{mounted:function(){var e=this;this.props=_1(this),this.state={container:null,viewPromise:null},this.state.container=document.createElement("div"),this.el.appendChild(this.state.container),this.handleEvent("vega_lite:".concat(this.props.id,":init"),(function(t){var i=t.spec;i.data||(i.data={values:[]}),e.state.viewPromise=function(e,t){return h1.apply(this,arguments)}(e.state.container,i,{}).then((function(e){return e.view})).catch((function(t){var i="Failed to render the given Vega-Lite specification, got the following error:\n\n ".concat(t.message,"\n\nMake sure to check for typos.");e.state.container.innerHTML='\n
'.concat(i,"
\n ")}))}));var t,i,n=(t=function(e){return e.resize()},1e3,i=!1,function(){i||(t.apply(void 0,arguments),i=!0,setTimeout((function(){i=!1}),1e3))});this.handleEvent("vega_lite:".concat(this.props.id,":push"),(function(t){var i=t.data,o=t.dataset,r=t.window;o=o||"source_0",e.state.viewPromise.then((function(e){var t=v1(e.data(o),i,r);n(e),e.change(o,t).run()}))}))},updated:function(){this.props=_1(this)},destroyed:function(){this.state.viewPromise&&this.state.viewPromise.then((function(e){return e.finalize()}))}},Timer:{mounted:function(){var e=this;this.state={start:Date.now(),interval:null},this.state.interval=setInterval((function(){e.__tick()}),100)},destroyed:function(){clearInterval(this.state.interval)},__tick:function(){var e=(Date.now()-this.state.start)/1e3;this.el.innerHTML="".concat(e.toFixed(1),"s")}},MarkdownRenderer:{mounted:function(){this.props=b1(this);var e=new Ue(this.el,"");this.handleEvent("markdown-renderer:".concat(this.props.id,":content"),(function(t){var i=t.content;e.setContent(i)}))},updated:function(){this.props=b1(this)}}},S1=document.querySelector("meta[name='csrf-token']").getAttribute("content"),x1=new S.LiveSocket("/live",y.Socket,{params:function(e){return{_csrf_token:S1,user_data:Bt()}},hooks:C1,dom:w1});C().config({barColors:{0:"#b2c1ff"},shadowColor:"rgba(0, 0, 0, .3)"}),window.addEventListener("phx:page-loading-start",(function(){return C().show()})),window.addEventListener("phx:page-loading-stop",(function(){return C().hide()})),x1.connect(),window.liveSocket=x1},4902:function(e){e.exports=function(e){var t={};function i(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(n,o,function(t){return e[t]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=0)}([function(e,t,i){(function(t){e.exports=t.Phoenix=i(2)}).call(this,i(1))},function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t,i){"use strict";function n(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var i=[],n=!0,o=!1,r=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(i.push(s.value),!t||i.length!==t);n=!0);}catch(e){o=!0,r=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw r}}return i}}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"==typeof e)return a(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(i):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i0&&void 0!==arguments[0]?arguments[0]:this.timeout;if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}},{key:"onClose",value:function(e){this.on(b,e)}},{key:"onError",value:function(e){return this.on(y,(function(t){return e(t)}))}},{key:"on",value:function(e,t){var i=this.bindingRef++;return this.bindings.push({event:e,ref:i,callback:t}),i}},{key:"off",value:function(e,t){this.bindings=this.bindings.filter((function(i){return!(i.event===e&&(void 0===t||t===i.ref))}))}},{key:"canPush",value:function(){return this.socket.isConnected()&&this.isJoined()}},{key:"push",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.timeout;if(t=t||{},!this.joinedOnce)throw new Error("tried to push '".concat(e,"' to '").concat(this.topic,"' before joining. Use channel.join() before pushing events"));var n=new L(this,e,(function(){return t}),i);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}},{key:"leave",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=v;var i=function(){e.socket.hasLogger()&&e.socket.log("channel","leave ".concat(e.topic)),e.trigger(b,"leave")},n=new L(this,S,D({}),t);return n.receive("ok",(function(){return i()})).receive("timeout",(function(){return i()})),n.send(),this.canPush()||n.trigger("ok",{}),n}},{key:"onMessage",value:function(e,t,i){return t}},{key:"isLifecycleEvent",value:function(e){return x.indexOf(e)>=0}},{key:"isMember",value:function(e,t,i,n){return!(this.topic!==e||n&&n!==this.joinRef()&&this.isLifecycleEvent(t)&&(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:i,joinRef:n}),1))}},{key:"joinRef",value:function(){return this.joinPush.ref}},{key:"rejoin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=_,this.joinPush.resend(e))}},{key:"trigger",value:function(e,t,i,n){var o=this.onMessage(e,t,i,n);if(t&&!o)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");for(var r=this.bindings.filter((function(t){return t.event===e})),s=0;s1&&void 0!==arguments[1]?arguments[1]:{};l(this,e),this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=n.timeout||1e4,this.transport=n.transport||g.WebSocket||M,this.defaultEncoder=E.encode.bind(E),this.defaultDecoder=E.decode.bind(E),this.closeWasClean=!1,this.unloaded=!1,this.binaryType=n.binaryType||"arraybuffer",this.transport!==M?(this.encode=n.encode||this.defaultEncoder,this.decode=n.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder),d&&d.addEventListener&&d.addEventListener("beforeunload",(function(e){i.conn&&(i.unloaded=!0,i.abnormalClose("unloaded"))})),this.heartbeatIntervalMs=n.heartbeatIntervalMs||3e4,this.rejoinAfterMs=function(e){return n.rejoinAfterMs?n.rejoinAfterMs(e):[1e3,2e3,5e3][e-1]||1e4},this.reconnectAfterMs=function(e){return i.unloaded?100:n.reconnectAfterMs?n.reconnectAfterMs(e):[10,50,100,150,200,250,500,1e3,2e3][e-1]||5e3},this.logger=n.logger||null,this.longpollerTimeout=n.longpollerTimeout||2e4,this.params=D(n.params||{}),this.endPoint="".concat(t,"/").concat(k),this.vsn=n.vsn||"2.0.0",this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new R((function(){i.teardown((function(){return i.connect()}))}),this.reconnectAfterMs)}return u(e,[{key:"protocol",value:function(){return location.protocol.match(/^https/)?"wss":"ws"}},{key:"endPointURL",value:function(){var e=I.appendParams(I.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return"/"!==e.charAt(0)?e:"/"===e.charAt(1)?"".concat(this.protocol(),":").concat(e):"".concat(this.protocol(),"://").concat(location.host).concat(e)}},{key:"disconnect",value:function(e,t,i){this.closeWasClean=!0,this.reconnectTimer.reset(),this.teardown(e,t,i)}},{key:"connect",value:function(e){var t=this;e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=D(e)),this.conn||(this.closeWasClean=!1,this.conn=new this.transport(this.endPointURL()),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=function(){return t.onConnOpen()},this.conn.onerror=function(e){return t.onConnError(e)},this.conn.onmessage=function(e){return t.onConnMessage(e)},this.conn.onclose=function(e){return t.onConnClose(e)})}},{key:"log",value:function(e,t,i){this.logger(e,t,i)}},{key:"hasLogger",value:function(){return null!==this.logger}},{key:"onOpen",value:function(e){var t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}},{key:"onClose",value:function(e){var t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}},{key:"onError",value:function(e){var t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}},{key:"onMessage",value:function(e){var t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}},{key:"onConnOpen",value:function(){this.hasLogger()&&this.log("transport","connected to ".concat(this.endPointURL())),this.unloaded=!1,this.closeWasClean=!1,this.flushSendBuffer(),this.reconnectTimer.reset(),this.resetHeartbeat(),this.stateChangeCallbacks.open.forEach((function(e){return(0,r(e,2)[1])()}))}},{key:"resetHeartbeat",value:function(){var e=this;this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval((function(){return e.sendHeartbeat()}),this.heartbeatIntervalMs))}},{key:"teardown",value:function(e,t,i){var n=this;if(!this.conn)return e&&e();this.waitForBufferDone((function(){n.conn&&(t?n.conn.close(t,i||""):n.conn.close()),n.waitForSocketClosed((function(){n.conn&&(n.conn.onclose=function(){},n.conn=null),e&&e()}))}))}},{key:"waitForBufferDone",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;5!==i&&this.conn&&this.conn.bufferedAmount?setTimeout((function(){t.waitForBufferDone(e,i+1)}),150*i):e()}},{key:"waitForSocketClosed",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;5!==i&&this.conn&&3!==this.conn.readyState?setTimeout((function(){t.waitForSocketClosed(e,i+1)}),150*i):e()}},{key:"onConnClose",value:function(e){this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(),clearInterval(this.heartbeatTimer),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach((function(t){return(0,r(t,2)[1])(e)}))}},{key:"onConnError",value:function(e){this.hasLogger()&&this.log("transport",e),this.triggerChanError(),this.stateChangeCallbacks.error.forEach((function(t){return(0,r(t,2)[1])(e)}))}},{key:"triggerChanError",value:function(){this.channels.forEach((function(e){e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(y)}))}},{key:"connectionState",value:function(){switch(this.conn&&this.conn.readyState){case 0:return"connecting";case 1:return"open";case 2:return"closing";default:return"closed"}}},{key:"isConnected",value:function(){return"open"===this.connectionState()}},{key:"remove",value:function(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter((function(t){return t.joinRef()!==e.joinRef()}))}},{key:"off",value:function(e){for(var t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter((function(t){var i=r(t,1)[0];return-1===e.indexOf(i)}))}},{key:"channel",value:function(e){var t=new N(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},this);return this.channels.push(t),t}},{key:"push",value:function(e){var t=this;if(this.hasLogger()){var i=e.topic,n=e.event,o=e.payload,r=e.ref,s=e.join_ref;this.log("push","".concat(i," ").concat(n," (").concat(s,", ").concat(r,")"),o)}this.isConnected()?this.encode(e,(function(e){return t.conn.send(e)})):this.sendBuffer.push((function(){return t.encode(e,(function(e){return t.conn.send(e)}))}))}},{key:"makeRef",value:function(){var e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}},{key:"sendHeartbeat",value:function(){if(this.isConnected()){if(this.pendingHeartbeatRef)return this.pendingHeartbeatRef=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection"),void this.abnormalClose("heartbeat timeout");this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef})}}},{key:"abnormalClose",value:function(e){this.closeWasClean=!1,1===this.conn.readyState&&this.conn.close(1e3,e)}},{key:"flushSendBuffer",value:function(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach((function(e){return e()})),this.sendBuffer=[])}},{key:"onConnMessage",value:function(e){var t=this;this.decode(e.data,(function(e){var i=e.topic,n=e.event,o=e.payload,s=e.ref,a=e.join_ref;s&&s===t.pendingHeartbeatRef&&(t.pendingHeartbeatRef=null),t.hasLogger()&&t.log("receive","".concat(o.status||""," ").concat(i," ").concat(n," ").concat(s&&"("+s+")"||""),o);for(var l=0;l1&&void 0!==arguments[1]?arguments[1]:{};l(this,e);var o=n.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(o.state,(function(t){var n=i.caller,o=n.onJoin,r=n.onLeave,s=n.onSync;i.joinRef=i.channel.joinRef(),i.state=e.syncState(i.state,t,o,r),i.pendingDiffs.forEach((function(t){i.state=e.syncDiff(i.state,t,o,r)})),i.pendingDiffs=[],s()})),this.channel.on(o.diff,(function(t){var n=i.caller,o=n.onJoin,r=n.onLeave,s=n.onSync;i.inPendingSyncState()?i.pendingDiffs.push(t):(i.state=e.syncDiff(i.state,t,o,r),s())}))}return u(e,[{key:"onJoin",value:function(e){this.caller.onJoin=e}},{key:"onLeave",value:function(e){this.caller.onLeave=e}},{key:"onSync",value:function(e){this.caller.onSync=e}},{key:"list",value:function(t){return e.list(this.state,t)}},{key:"inPendingSyncState",value:function(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}}],[{key:"syncState",value:function(e,t,i,n){var o=this,r=this.clone(e),s={},a={};return this.map(r,(function(e,i){t[e]||(a[e]=i)})),this.map(t,(function(e,t){var i=r[e];if(i){var n=t.metas.map((function(e){return e.phx_ref})),l=i.metas.map((function(e){return e.phx_ref})),c=t.metas.filter((function(e){return l.indexOf(e.phx_ref)<0})),u=i.metas.filter((function(e){return n.indexOf(e.phx_ref)<0}));c.length>0&&(s[e]=t,s[e].metas=c),u.length>0&&(a[e]=o.clone(i),a[e].metas=u)}else s[e]=t})),this.syncDiff(r,{joins:s,leaves:a},i,n)}},{key:"syncDiff",value:function(e,t,i,o){var r=t.joins,s=t.leaves,a=this.clone(e);return i||(i=function(){}),o||(o=function(){}),this.map(r,(function(e,t){var o=a[e];if(a[e]=t,o){var r,s=a[e].metas.map((function(e){return e.phx_ref})),l=o.metas.filter((function(e){return s.indexOf(e.phx_ref)<0}));(r=a[e].metas).unshift.apply(r,n(l))}i(e,o,t)})),this.map(s,(function(e,t){var i=a[e];if(i){var n=t.metas.map((function(e){return e.phx_ref}));i.metas=i.metas.filter((function(e){return n.indexOf(e.phx_ref)<0})),o(e,i,t),0===i.metas.length&&delete a[e]}})),a}},{key:"list",value:function(e,t){return t||(t=function(e,t){return t}),this.map(e,(function(e,i){return t(e,i)}))}},{key:"map",value:function(e,t){return Object.getOwnPropertyNames(e).map((function(i){return t(i,e[i])}))}},{key:"clone",value:function(e){return JSON.parse(JSON.stringify(e))}}]),e}(),R=function(){function e(t,i){l(this,e),this.callback=t,this.timerCalc=i,this.timer=null,this.tries=0}return u(e,[{key:"reset",value:function(){this.tries=0,clearTimeout(this.timer)}},{key:"scheduleTimeout",value:function(){var e=this;clearTimeout(this.timer),this.timer=setTimeout((function(){e.tries=e.tries+1,e.callback()}),this.timerCalc(this.tries+1))}}]),e}()}])},6458:()=>{"use strict";!function(){var e=function(){if("function"==typeof window.CustomEvent)return window.CustomEvent;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var i=document.createEvent("CustomEvent");return i.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),i}return e.prototype=window.Event.prototype,e}();function t(e,t){var i=document.createElement("input");return i.type="hidden",i.name=e,i.value=t,i}function i(e){var i=e.getAttribute("data-to"),n=t("_method",e.getAttribute("data-method")),o=t("_csrf_token",e.getAttribute("data-csrf")),r=document.createElement("form"),s=e.getAttribute("target");r.method="get"===e.getAttribute("data-method")?"get":"post",r.action=i,r.style.display="hidden",s&&(r.target=s),r.appendChild(o),r.appendChild(n),document.body.appendChild(r),r.submit()}window.addEventListener("click",(function(t){for(var n=t.target;n&&n.getAttribute;){var o=new e("phoenix.link.click",{bubbles:!0,cancelable:!0});if(!n.dispatchEvent(o))return t.preventDefault(),t.stopImmediatePropagation(),!1;if(n.getAttribute("data-method"))return i(n),t.preventDefault(),!1;n=n.parentNode}}),!1),window.addEventListener("phoenix.link.click",(function(e){var t=e.target.getAttribute("data-confirm");t&&!window.confirm(t)&&e.preventDefault()}),!1)}()},6789:function(e){e.exports=function(e){var t={};function i(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},i.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=2)}([function(e,t,i){"use strict";i.r(t);var n,o="undefined"==typeof document?void 0:document,r=!!o&&"content"in o.createElement("template"),s=!!o&&o.createRange&&"createContextualFragment"in o.createRange();function a(e){return e=e.trim(),r?function(e){var t=o.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}(e):s?function(e){return n||(n=o.createRange()).selectNode(o.body),n.createContextualFragment(e).childNodes[0]}(e):function(e){var t=o.createElement("body");return t.innerHTML=e,t.childNodes[0]}(e)}function l(e,t){var i,n,o=e.nodeName,r=t.nodeName;return o===r||(i=o.charCodeAt(0),n=r.charCodeAt(0),i<=90&&n>=97?o===r.toUpperCase():n<=90&&i>=97&&r===o.toUpperCase())}function c(e,t,i){e[i]!==t[i]&&(e[i]=t[i],e[i]?e.setAttribute(i,""):e.removeAttribute(i))}var u={OPTION:function(e,t){var i=e.parentNode;if(i){var n=i.nodeName.toUpperCase();"OPTGROUP"===n&&(n=(i=i.parentNode)&&i.nodeName.toUpperCase()),"SELECT"!==n||i.hasAttribute("multiple")||(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),i.selectedIndex=-1)}c(e,t,"selected")},INPUT:function(e,t){c(e,t,"checked"),c(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var i=t.value;e.value!==i&&(e.value=i);var n=e.firstChild;if(n){var o=n.nodeValue;if(o==i||!i&&o==e.placeholder)return;n.nodeValue=i}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var i,n,o=-1,r=0,s=e.firstChild;s;)if("OPTGROUP"===(n=s.nodeName&&s.nodeName.toUpperCase()))s=(i=s).firstChild;else{if("OPTION"===n){if(s.hasAttribute("selected")){o=r;break}r++}!(s=s.nextSibling)&&i&&(s=i.nextSibling,i=null)}e.selectedIndex=o}}};function h(){}function d(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}var g=function(e){return function(t,i,n){if(n||(n={}),"string"==typeof i)if("#document"===t.nodeName||"HTML"===t.nodeName||"BODY"===t.nodeName){var r=i;(i=o.createElement("html")).innerHTML=r}else i=a(i);var s=n.getNodeKey||d,c=n.onBeforeNodeAdded||h,g=n.onNodeAdded||h,f=n.onBeforeElUpdated||h,p=n.onElUpdated||h,m=n.onBeforeNodeDiscarded||h,_=n.onNodeDiscarded||h,v=n.onBeforeElChildrenUpdated||h,b=!0===n.childrenOnly,y=Object.create(null),w=[];function C(e){w.push(e)}function S(e,t,i){!1!==m(e)&&(t&&t.removeChild(e),_(e),function e(t,i){if(1===t.nodeType)for(var n=t.firstChild;n;){var o=void 0;i&&(o=s(n))?C(o):(_(n),n.firstChild&&e(n,i)),n=n.nextSibling}}(e,i))}function x(e){g(e);for(var t=e.firstChild;t;){var i=t.nextSibling,n=s(t);if(n){var o=y[n];o&&l(t,o)?(t.parentNode.replaceChild(o,t),k(o,t)):x(t)}else x(t);t=i}}function k(t,i,n){var r=s(i);if(r&&delete y[r],!n){if(!1===f(t,i))return;if(e(t,i),p(t),!1===v(t,i))return}"TEXTAREA"!==t.nodeName?function(e,t){var i,n,r,a,h,d=t.firstChild,g=e.firstChild;e:for(;d;){for(a=d.nextSibling,i=s(d);g;){if(r=g.nextSibling,d.isSameNode&&d.isSameNode(g)){d=a,g=r;continue e}n=s(g);var f=g.nodeType,p=void 0;if(f===d.nodeType&&(1===f?(i?i!==n&&((h=y[i])?r===h?p=!1:(e.insertBefore(h,g),n?C(n):S(g,e,!0),g=h):p=!1):n&&(p=!1),(p=!1!==p&&l(g,d))&&k(g,d)):3!==f&&8!=f||(p=!0,g.nodeValue!==d.nodeValue&&(g.nodeValue=d.nodeValue))),p){d=a,g=r;continue e}n?C(n):S(g,e,!0),g=r}if(i&&(h=y[i])&&l(h,d))e.appendChild(h),k(h,d);else{var m=c(d);!1!==m&&(m&&(d=m),d.actualize&&(d=d.actualize(e.ownerDocument||o)),e.appendChild(d),x(d))}d=a,g=r}!function(e,t,i){for(;t;){var n=t.nextSibling;(i=s(t))?C(i):S(t,e,!0),t=n}}(e,g,n);var _=u[e.nodeName];_&&_(e,t)}(t,i):u.TEXTAREA(t,i)}!function e(t){if(1===t.nodeType||11===t.nodeType)for(var i=t.firstChild;i;){var n=s(i);n&&(y[n]=i),e(i),i=i.nextSibling}}(t);var D=t,L=D.nodeType,N=i.nodeType;if(!b)if(1===L)1===N?l(t,i)||(_(t),D=function(e,t){for(var i=e.firstChild;i;){var n=i.nextSibling;t.appendChild(i),i=n}return t}(t,function(e,t){return t&&"http://www.w3.org/1999/xhtml"!==t?o.createElementNS(t,e):o.createElement(e)}(i.nodeName,i.namespaceURI))):D=i;else if(3===L||8===L){if(N===L)return D.nodeValue!==i.nodeValue&&(D.nodeValue=i.nodeValue),D;D=i}if(D===i)_(t);else{if(i.isSameNode&&i.isSameNode(D))return;if(k(D,i,b),w)for(var E=0,A=w.length;E=0;a--)n=(i=s[a]).name,o=i.namespaceURI,r=i.value,o?(n=i.localName||n,e.getAttributeNS(o,n)!==r&&("xmlns"===i.prefix&&(n=i.name),e.setAttributeNS(o,n,r))):e.getAttribute(n)!==r&&e.setAttribute(n,r);for(var l=e.attributes,c=l.length-1;c>=0;c--)n=(i=l[c]).name,(o=i.namespaceURI)?(n=i.localName||n,t.hasAttributeNS(o,n)||e.removeAttributeNS(o,n)):t.hasAttribute(n)||e.removeAttribute(n)}}));function f(e){return C(e)||m(e)||S(e)||w()}function p(e){return function(e){if(Array.isArray(e))return x(e)}(e)||m(e)||S(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function _(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function v(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,n=new Array(t);i=0;return t.size>0&&(i||n)}},{key:"isPreflighted",value:function(e,t){return e.getAttribute("data-phx-preflighted-refs").split(",").indexOf(X.genFileRef(t))>=0&&this.isActive(e,t)}}]),L(e,[{key:"metadata",value:function(){return this.meta}},{key:"progress",value:function(e){var t=this;this._progress=Math.floor(e),this._progress>this._lastProgressSent&&(this._progress>=100?(this._progress=100,this._lastProgressSent=100,this._isDone=!0,this.view.pushFileProgress(this.fileEl,this.ref,100,(function(){X.untrackFile(t.fileEl,t.file),t._onDone()}))):(this._lastProgressSent=this._progress,this.view.pushFileProgress(this.fileEl,this.ref,this._progress)))}},{key:"cancel",value:function(){this._isCancelled=!0,this._isDone=!0,this._onDone()}},{key:"isDone",value:function(){return this._isDone}},{key:"error",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"failed";X.clearFiles(this.fileEl),this.view.pushFileProgress(this.fileEl,this.ref,{error:e})}},{key:"onDone",value:function(e){this._onDone=e}},{key:"toPreflightPayload",value:function(){return{last_modified:this.file.lastModified,name:this.file.name,size:this.file.size,type:this.file.type,ref:this.ref}}},{key:"uploader",value:function(e){if(this.meta.uploader){var t=e[this.meta.uploader]||W("no uploader configured for ".concat(this.meta.uploader));return{name:this.meta.uploader,callback:t}}return{name:"channel",callback:Q}}},{key:"zipPostFlight",value:function(e){this.meta=e.entries[this.ref],this.meta||W("no preflight upload response returned with ref ".concat(this.ref),{input:this.fileEl,response:e})}}]),e}(),Y={LiveFileUpload:{preflightedRefs:function(){return this.el.getAttribute("data-phx-preflighted-refs")},mounted:function(){this.preflightedWas=this.preflightedRefs()},updated:function(){var e=this.preflightedRefs();this.preflightedWas!==e&&(this.preflightedWas=e,""===e&&this.__view.cancelSubmit(this.el.form))}}};Y.LiveImgPreview={mounted:function(){var e=this;this.ref=this.el.getAttribute("data-phx-entry-ref"),this.inputEl=document.getElementById(this.el.getAttribute(R)),X.getEntryDataURL(this.inputEl,this.ref,(function(t){return e.el.src=t}))}};var Z=0,X=function(){function e(t,i,n){k(this,e),this.view=i,this.onComplete=n,this._entries=Array.from(e.filesAwaitingPreflight(t)||[]).map((function(e){return new G(t,e,i)})),this.numEntriesInProgress=this._entries.length}return L(e,null,[{key:"genFileRef",value:function(e){var t=e._phxRef;return void 0!==t?t:(e._phxRef=(Z++).toString(),e._phxRef)}},{key:"getEntryDataURL",value:function(e,t,i){var n=this,o=this.activeFiles(e).find((function(e){return n.genFileRef(e)===t})),r=new FileReader;r.onload=function(e){return i(e.target.result)},r.readAsDataURL(o)}},{key:"hasUploadsInProgress",value:function(e){var t=0;return oe.findUploadInputs(e).forEach((function(e){e.getAttribute("data-phx-preflighted-refs")!==e.getAttribute("data-phx-done-refs")&&t++})),t>0}},{key:"serializeUploads",value:function(e){var t=this,i={};return this.activeFiles(e,"serialize").forEach((function(n){var o={path:e.name},r=e.getAttribute(R);i[r]=i[r]||[],o.ref=t.genFileRef(n),o.name=n.name,o.type=n.type,o.size=n.size,i[r].push(o)})),i}},{key:"clearFiles",value:function(e){e.value=null,e.removeAttribute(R),oe.putPrivate(e,"files",[])}},{key:"untrackFile",value:function(e,t){oe.putPrivate(e,"files",oe.private(e,"files").filter((function(e){return!Object.is(e,t)})))}},{key:"trackFiles",value:function(e,t){var i=this;if(null!==e.getAttribute("multiple")){var n=t.filter((function(t){return!i.activeFiles(e).find((function(e){return Object.is(e,t)}))}));oe.putPrivate(e,"files",this.activeFiles(e).concat(n)),e.value=null}else oe.putPrivate(e,"files",t)}},{key:"activeFileInputs",value:function(e){var t=this,i=oe.findUploadInputs(e);return Array.from(i).filter((function(e){return e.files&&t.activeFiles(e).length>0}))}},{key:"activeFiles",value:function(e){return(oe.private(e,"files")||[]).filter((function(t){return G.isActive(e,t)}))}},{key:"inputsAwaitingPreflight",value:function(e){var t=this,i=oe.findUploadInputs(e);return Array.from(i).filter((function(e){return t.filesAwaitingPreflight(e).length>0}))}},{key:"filesAwaitingPreflight",value:function(e){return this.activeFiles(e).filter((function(t){return!G.isPreflighted(e,t)}))}}]),L(e,[{key:"entries",value:function(){return this._entries}},{key:"initAdapterUpload",value:function(e,t,i){var n=this;this._entries=this._entries.map((function(t){return t.zipPostFlight(e),t.onDone((function(){n.numEntriesInProgress--,0===n.numEntriesInProgress&&n.onComplete()})),t}));var o=this._entries.reduce((function(e,t){var n=t.uploader(i.uploaders),o=n.name,r=n.callback;return e[o]=e[o]||{callback:r,entries:[]},e[o].entries.push(t),e}),{});for(var r in o){var s=o[r];(0,s.callback)(s.entries,t,e,i)}}}]),e}(),Q=function(e,t,i,n){e.forEach((function(e){new J(e,i.config.chunk_size,n).upload()}))},J=function(){function e(t,i,n){k(this,e),this.liveSocket=n,this.entry=t,this.offset=0,this.chunkSize=i,this.chunkTimer=null,this.uploadChannel=n.channel("lvu:".concat(t.ref),{token:t.metadata()})}return L(e,[{key:"error",value:function(e){clearTimeout(this.chunkTimer),this.uploadChannel.leave(),this.entry.error(e)}},{key:"upload",value:function(){var e=this;this.uploadChannel.onError((function(t){return e.error(t)})),this.uploadChannel.join().receive("ok",(function(t){return e.readNextChunk()})).receive("error",(function(t){return e.error(t)}))}},{key:"isDone",value:function(){return this.offset>=this.entry.file.size}},{key:"readNextChunk",value:function(){var e=this,t=new window.FileReader,i=this.entry.file.slice(this.offset,this.chunkSize+this.offset);t.onload=function(t){if(null!==t.target.error)return W("Read error: "+t.target.error);e.offset+=t.target.result.byteLength,e.pushChunk(t.target.result)},t.readAsArrayBuffer(i)}},{key:"pushChunk",value:function(e){var t=this;this.uploadChannel.isJoined()&&this.uploadChannel.push("chunk",e).receive("ok",(function(){t.entry.progress(t.offset/t.entry.file.size*100),t.isDone()||(t.chunkTimer=setTimeout((function(){return t.readNextChunk()}),t.liveSocket.getLatencySim()||0))}))}}]),e}(),ee=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=new FormData(e),n=[];i.forEach((function(e,t,i){e instanceof File&&n.push(t)})),n.forEach((function(e){return i.delete(e)}));var o,r=new URLSearchParams,s=function(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=S(e))){var t=0,i=function(){};return{s:i,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o,r=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return r=e.done,e},e:function(e){s=!0,o=e},f:function(){try{r||null==n.return||n.return()}finally{if(s)throw o}}}}(i.entries());try{for(s.s();!(o=s.n()).done;){var a=y(o.value,2),l=a[0],c=a[1];r.append(l,c)}}catch(e){s.e(e)}finally{s.f()}for(var u in t)r.append(u,t[u]);return r.toString()},te=function(){function e(t,i){k(this,e),this.viewId=t,this.rendered={},this.mergeDiff(i)}return L(e,null,[{key:"extract",value:function(e){var t=e.r,i=e.e,n=e.t;return delete e.r,delete e.e,delete e.t,{diff:e,title:n,reply:t||null,events:i||[]}}}]),L(e,[{key:"parentViewId",value:function(){return this.viewId}},{key:"toString",value:function(e){return this.recursiveToString(this.rendered,this.rendered.c,e)}},{key:"recursiveToString",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.c,i=arguments.length>2?arguments[2]:void 0,n={buffer:"",components:t,onlyCids:i=i?new Set(i):null};return this.toOutputBuffer(e,n),n.buffer}},{key:"componentCIDs",value:function(e){return Object.keys(e.c||{}).map((function(e){return parseInt(e)}))}},{key:"isComponentOnlyDiff",value:function(e){return!!e.c&&1===Object.keys(e).length}},{key:"getComponent",value:function(e,t){return e.c[t]}},{key:"mergeDiff",value:function(e){var t=e.c,i={};if(delete e.c,this.rendered=this.mutableMerge(this.rendered,e),this.rendered.c=this.rendered.c||{},t){var n=this.rendered.c;for(var o in t)t[o]=this.cachedFindComponent(o,t[o],n,t,i);for(var r in t)n[r]=t[r];e.c=t}}},{key:"cachedFindComponent",value:function(e,t,i,n,o){if(o[e])return o[e];var r,s,a,l=t.s;return"number"==typeof l?(s=(a=l>0?this.cachedFindComponent(l,n[l],i,n,o):i[-l]).s,(r=this.cloneMerge(a,t)).s=s):r=void 0!==t.s?t:this.cloneMerge(i[e]||{},t),o[e]=r,r}},{key:"mutableMerge",value:function(e,t){return void 0!==t.s?t:(this.doMutableMerge(e,t),e)}},{key:"doMutableMerge",value:function(e,t){for(var i in t){var n=t[i],o=e[i];j(n)&&void 0===n.s&&j(o)?this.doMutableMerge(o,n):e[i]=n}}},{key:"cloneMerge",value:function(e,t){var i=v(v({},e),t);for(var n in i){var o=t[n],r=e[n];j(o)&&void 0===o.s&&j(r)&&(i[n]=this.cloneMerge(r,o))}return i}},{key:"componentToString",value:function(e){return this.recursiveCIDToString(this.rendered.c,e)}},{key:"pruneCIDs",value:function(e){var t=this;e.forEach((function(e){return delete t.rendered.c[e]}))}},{key:"get",value:function(){return this.rendered}},{key:"isNewFingerprint",value:function(){return!!(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).s}},{key:"toOutputBuffer",value:function(e,t){if(e.d)return this.comprehensionToBuffer(e,t);var i=e.s;t.buffer+=i[0];for(var n=1;n2&&void 0!==arguments[2]?arguments[2]:{};if(k(this,e),this.unloaded=!1,!i||"Object"===i.constructor.name)throw new Error('\n a phoenix Socket must be provided as the second argument to the LiveSocket constructor. For example:\n\n import {Socket} from "phoenix"\n import {LiveSocket} from "phoenix_live_view"\n let liveSocket = new LiveSocket("/live", Socket, {...})\n ');this.socket=new i(t,o),this.bindingPrefix=o.bindingPrefix||B,this.opts=o,this.params=H(o.params||{}),this.viewLogger=o.viewLogger,this.metadataCallbacks=o.metadata||{},this.defaults=Object.assign($(z),o.defaults||{}),this.activeElement=null,this.prevActive=null,this.silenced=!1,this.main=null,this.linkRef=1,this.roots={},this.href=window.location.href,this.pendingLink=null,this.currentLocation=$(window.location),this.hooks=o.hooks||{},this.uploaders=o.uploaders||{},this.loaderTimeout=o.loaderTimeout||1,this.localStorage=o.localStorage||window.localStorage,this.sessionStorage=o.sessionStorage||window.sessionStorage,this.boundTopLevelEvents=!1,this.domCallbacks=Object.assign({onNodeAdded:H(),onBeforeElUpdated:H()},o.dom||{}),window.addEventListener("pagehide",(function(e){n.unloaded=!0})),this.socket.onOpen((function(){n.isUnloaded()&&window.location.reload()}))}return L(e,[{key:"isProfileEnabled",value:function(){return"true"===this.sessionStorage.getItem("phx:live-socket:profiling")}},{key:"isDebugEnabled",value:function(){return"true"===this.sessionStorage.getItem("phx:live-socket:debug")}},{key:"enableDebug",value:function(){this.sessionStorage.setItem("phx:live-socket:debug","true")}},{key:"enableProfiling",value:function(){this.sessionStorage.setItem("phx:live-socket:profiling","true")}},{key:"disableDebug",value:function(){this.sessionStorage.removeItem("phx:live-socket:debug")}},{key:"disableProfiling",value:function(){this.sessionStorage.removeItem("phx:live-socket:profiling")}},{key:"enableLatencySim",value:function(e){this.enableDebug(),console.log("latency simulator enabled for the duration of this browser session. Call disableLatencySim() to disable"),this.sessionStorage.setItem("phx:live-socket:latency-sim",e)}},{key:"disableLatencySim",value:function(){this.sessionStorage.removeItem("phx:live-socket:latency-sim")}},{key:"getLatencySim",value:function(){var e=this.sessionStorage.getItem("phx:live-socket:latency-sim");return e?parseInt(e):null}},{key:"getSocket",value:function(){return this.socket}},{key:"connect",value:function(){var e=this,t=function(){e.joinRootViews()&&(e.bindTopLevelEvents(),e.socket.connect())};["complete","loaded","interactive"].indexOf(document.readyState)>=0?t():document.addEventListener("DOMContentLoaded",(function(){return t()}))}},{key:"disconnect",value:function(e){this.socket.disconnect(e)}},{key:"triggerDOM",value:function(e,t){var i;(i=this.domCallbacks)[e].apply(i,p(t))}},{key:"time",value:function(e,t){if(!this.isProfileEnabled()||!console.time)return t();console.time(e);var i=t();return console.timeEnd(e),i}},{key:"log",value:function(e,t,i){if(this.viewLogger){var n=y(i(),2),o=n[0],r=n[1];this.viewLogger(e,t,o,r)}else if(this.isDebugEnabled()){var s=y(i(),2),a=s[0],l=s[1];V(e,t,a,l)}}},{key:"onChannel",value:function(e,t,i){var n=this;e.on(t,(function(e){var t=n.getLatencySim();t?(console.log("simulating ".concat(t,"ms of latency from server to client")),setTimeout((function(){return i(e)}),t)):i(e)}))}},{key:"wrapPush",value:function(e,t,i){var n=this,o=this.getLatencySim(),r=e.joinCount;if(!o)return t.timeout?i().receive("timeout",(function(){e.joinCount===r&&n.reloadWithJitter(e,(function(){n.log(e,"timeout",(function(){return["received timeout while communicating with server. Falling back to hard refresh for recovery"]}))}))})):i();console.log("simulating ".concat(o,"ms of latency from client to server"));var s={receives:[],receive:function(e,t){this.receives.push([e,t])}};return setTimeout((function(){s.receives.reduce((function(e,t){var i=y(t,2),n=i[0],o=i[1];return e.receive(n,o)}),i())}),o),s}},{key:"reloadWithJitter",value:function(e,t){var i=this;e.destroy(),this.disconnect();var n=E[0],o=E[1],r=Math.floor(Math.random()*(o-n+1))+n,s=ne.updateLocal(this.localStorage,e.name(),"consecutive-reloads",0,(function(e){return e+1}));t?t():this.log(e,"join",(function(){return["encountered ".concat(s," consecutive reloads")]})),s>10&&(this.log(e,"join",(function(){return["exceeded ".concat(10," consecutive reloads. Entering failsafe mode")]})),r=3e4),setTimeout((function(){i.hasPendingLink()?window.location=i.pendingLink:window.location.reload()}),r)}},{key:"getHookCallbacks",value:function(e){return e&&e.startsWith("Phoenix.")?Y[e.split(".")[1]]:this.hooks[e]}},{key:"isUnloaded",value:function(){return this.unloaded}},{key:"isConnected",value:function(){return this.socket.isConnected()}},{key:"getBindingPrefix",value:function(){return this.bindingPrefix}},{key:"binding",value:function(e){return"".concat(this.getBindingPrefix()).concat(e)}},{key:"channel",value:function(e,t){return this.socket.channel(e,t)}},{key:"joinRootViews",value:function(){var e=this,t=!1;return oe.all(document,"".concat(O,":not([").concat("data-phx-parent-id","])"),(function(i){if(!e.getRootById(i.id)){var n=e.joinRootView(i,e.getHref());e.root=e.root||n,i.getAttribute("data-phx-main")&&(e.main=n)}t=!0})),t}},{key:"redirect",value:function(e,t){this.disconnect(),ne.redirect(e,t)}},{key:"replaceMain",value:function(e,t){var i=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.setPendingLink(e),r=this.main.el;this.main.showLoader(this.loaderTimeout),this.main.destroy(),ne.fetchPage(e,(function(s,a){if(200!==s)return i.redirect(e);var l=document.createElement("template");l.innerHTML=a;var c=l.content.childNodes[0];if(!c||!i.isPhxView(c))return i.redirect(e);i.joinRootView(c,e,t,(function(e,t){1===t&&(i.commitPendingLink(o)?(r.replaceWith(e.el),i.main=e,n&&n()):e.destroy())}))}))}},{key:"isPhxView",value:function(e){return e.getAttribute&&null!==e.getAttribute(A)}},{key:"joinRootView",value:function(e,t,i,n){var o=new ae(e,this,null,t,i);return this.roots[o.id]=o,o.join(n),o}},{key:"owner",value:function(e,t){var i=this,n=K(e.closest(O),(function(e){return i.getViewByEl(e)}));n&&t(n)}},{key:"withinOwners",value:function(e,t){var i=this;this.owner(e,(function(n){var o=e.getAttribute(i.binding("target"));null===o?t(n,e):n.withinTargets(o,t)}))}},{key:"getViewByEl",value:function(e){var t=e.getAttribute("data-phx-root-id");return K(this.getRootById(t),(function(t){return t.getDescendentByEl(e)}))}},{key:"getRootById",value:function(e){return this.roots[e]}},{key:"destroyAllViews",value:function(){for(var e in this.roots)this.roots[e].destroy(),delete this.roots[e]}},{key:"destroyViewByEl",value:function(e){var t=this.getRootById(e.getAttribute("data-phx-root-id"));t&&t.destroyDescendent(e.id)}},{key:"setActiveElement",value:function(e){var t=this;if(this.activeElement!==e){this.activeElement=e;var i=function(){e===t.activeElement&&(t.activeElement=null),e.removeEventListener("mouseup",t),e.removeEventListener("touchend",t)};e.addEventListener("mouseup",i),e.addEventListener("touchend",i)}}},{key:"getActiveElement",value:function(){return document.activeElement===document.body?this.activeElement||document.activeElement:document.activeElement||document.body}},{key:"dropActiveElement",value:function(e){this.prevActive&&e.ownsElement(this.prevActive)&&(this.prevActive=null)}},{key:"restorePreviouslyActiveFocus",value:function(){this.prevActive&&this.prevActive!==document.body&&this.prevActive.focus()}},{key:"blurActiveElement",value:function(){this.prevActive=this.getActiveElement(),this.prevActive!==document.body&&this.prevActive.blur()}},{key:"bindTopLevelEvents",value:function(){var e=this;this.boundTopLevelEvents||(this.boundTopLevelEvents=!0,document.body.addEventListener("click",(function(){})),window.addEventListener("pageshow",(function(t){t.persisted&&(e.getSocket().disconnect(),e.withPageLoading({to:window.location.href,kind:"redirect"}),window.location.reload())}),!0),this.bindClicks(),this.bindNav(),this.bindForms(),this.bind({keyup:"keyup",keydown:"keydown"},(function(t,i,n,o,r,s,a){var l=o.getAttribute(e.binding("key")),c=t.key&&t.key.toLowerCase();l&&l.toLowerCase()!==c||n.pushKey(o,r,i,s,v({key:t.key},e.eventMeta(i,t,o)))})),this.bind({blur:"focusout",focus:"focusin"},(function(t,i,n,o,r,s,a){a||n.pushEvent(i,o,r,s,e.eventMeta(i,t,o))})),this.bind({blur:"blur",focus:"focus"},(function(t,i,n,o,r,s,a){a&&"window"!==!a&&n.pushEvent(i,o,r,s,e.eventMeta(i,t,o))})),window.addEventListener("dragover",(function(e){return e.preventDefault()})),window.addEventListener("drop",(function(t){t.preventDefault();var i=K(U(t.target,e.binding("drop-target")),(function(t){return t.getAttribute(e.binding("drop-target"))})),n=i&&document.getElementById(i),o=Array.from(t.dataTransfer.files||[]);n&&!n.disabled&&0!==o.length&&n.files instanceof FileList&&(X.trackFiles(n,o),n.dispatchEvent(new Event("input",{bubbles:!0})))})))}},{key:"eventMeta",value:function(e,t,i){var n=this.metadataCallbacks[e];return n?n(t,i):{}}},{key:"setPendingLink",value:function(e){return this.linkRef++,this.pendingLink=e,this.linkRef}},{key:"commitPendingLink",value:function(e){return this.linkRef===e&&(this.href=this.pendingLink,this.pendingLink=null,!0)}},{key:"getHref",value:function(){return this.href}},{key:"hasPendingLink",value:function(){return!!this.pendingLink}},{key:"bind",value:function(e,t){var i=this,n=function(n){var o=e[n];i.on(o,(function(e){var o=i.binding(n),r=i.binding("window-".concat(n)),s=e.target.getAttribute&&e.target.getAttribute(o);s?i.debounce(e.target,e,(function(){i.withinOwners(e.target,(function(i,o){t(e,n,i,e.target,o,s,null)}))})):oe.all(document,"[".concat(r,"]"),(function(o){var s=o.getAttribute(r);i.debounce(o,e,(function(){i.withinOwners(o,(function(i,r){t(e,n,i,o,r,s,"window")}))}))}))}))};for(var o in e)n(o)}},{key:"bindClicks",value:function(){this.bindClick("click","click",!1),this.bindClick("mousedown","capture-click",!0)}},{key:"bindClick",value:function(e,t,i){var n=this,o=this.binding(t);window.addEventListener(e,(function(e){if(n.isConnected()){var t=null,r=(t=i?e.target.matches("[".concat(o,"]"))?e.target:e.target.querySelector("[".concat(o,"]")):U(e.target,o))&&t.getAttribute(o);r&&("#"===t.getAttribute("href")&&e.preventDefault(),n.debounce(t,e,(function(){n.withinOwners(t,(function(i,o){i.pushEvent("click",t,o,r,n.eventMeta("click",e,t))}))})))}}),i)}},{key:"bindNav",value:function(){var e=this;if(ne.canPushState()){history.scrollRestoration&&(history.scrollRestoration="manual");var t=null;window.addEventListener("scroll",(function(e){clearTimeout(t),t=setTimeout((function(){ne.updateCurrentState((function(e){return Object.assign(e,{scroll:window.scrollY})}))}),100)})),window.addEventListener("popstate",(function(t){if(e.registerNewLocation(window.location)){var i=t.state||{},n=i.type,o=i.id,r=i.root,s=i.scroll,a=window.location.href;e.main.isConnected()&&"patch"===n&&o===e.main.id?e.main.pushLinkPatch(a,null):e.replaceMain(a,null,(function(){r&&e.replaceRootHistory(),"number"==typeof s&&setTimeout((function(){window.scrollTo(0,s)}),0)}))}}),!1),window.addEventListener("click",(function(t){var i=U(t.target,"data-phx-link"),n=i&&i.getAttribute("data-phx-link"),o=t.metaKey||t.ctrlKey||1===t.button;if(n&&e.isConnected()&&e.main&&!o){var r=i.href,s=i.getAttribute("data-phx-link-state");if(t.preventDefault(),e.pendingLink!==r)if("patch"===n)e.pushHistoryPatch(r,s,i);else{if("redirect"!==n)throw new Error("expected ".concat("data-phx-link",' to be "patch" or "redirect", got: ').concat(n));e.historyRedirect(r,s)}}}),!1)}}},{key:"withPageLoading",value:function(e,t){oe.dispatchEvent(window,"phx:page-loading-start",e);var i=function(){return oe.dispatchEvent(window,"phx:page-loading-stop",e)};return t?t(i):i}},{key:"pushHistoryPatch",value:function(e,t,i){var n=this;this.withPageLoading({to:e,kind:"patch"},(function(o){n.main.pushLinkPatch(e,i,(function(i){n.historyPatch(e,t,i),o()}))}))}},{key:"historyPatch",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.setPendingLink(e);this.commitPendingLink(i)&&(ne.pushState(t,{type:"patch",id:this.main.id},e),this.registerNewLocation(window.location))}},{key:"historyRedirect",value:function(e,t,i){var n=this,o=window.scrollY;this.withPageLoading({to:e,kind:"redirect"},(function(r){n.replaceMain(e,i,(function(){ne.pushState(t,{type:"redirect",id:n.main.id,scroll:o},e),n.registerNewLocation(window.location),r()}))}))}},{key:"replaceRootHistory",value:function(){ne.pushState("replace",{root:!0,type:"patch",id:this.main.id})}},{key:"registerNewLocation",value:function(e){var t=this.currentLocation;return t.pathname+t.search!==e.pathname+e.search&&(this.currentLocation=$(e),!0)}},{key:"bindForms",value:function(){var e=this,t=0;this.on("submit",(function(t){var i=t.target.getAttribute(e.binding("submit"));i&&(t.preventDefault(),t.target.disabled=!0,e.withinOwners(t.target,(function(e,n){return e.submitForm(t.target,n,i)})))}),!1);for(var i=function(){var i=o[n];e.on(i,(function(n){var o=n.target,r=o.form&&o.form.getAttribute(e.binding("change"));if(r&&("number"!==o.type||!o.validity||!o.validity.badInput)){var s=t;t++;var a=oe.private(o,"prev-iteration")||{},l=a.at,c=a.type;l===s-1&&i!==c||(oe.putPrivate(o,"prev-iteration",{at:s,type:i}),e.debounce(o,n,(function(){e.withinOwners(o.form,(function(t,i){oe.putPrivate(o,"phx-has-focused",!0),oe.isTextualInput(o)||e.setActiveElement(o),t.pushInput(o,i,r,n.target)}))})))}}),!1)},n=0,o=["change","input"];n=0},findPhxChildren:function(e,t){return this.all(e,"".concat(O,"[").concat("data-phx-parent-id",'="').concat(t,'"]'))},findParentCIDs:function(e,t){var i=this,n=new Set(t);return t.reduce((function(t,n){var o="[".concat(I,'="').concat(n,'"] [').concat(I,"]");return i.filterWithinSameLiveView(i.all(e,o),e).map((function(e){return parseInt(e.getAttribute(I))})).forEach((function(e){return t.delete(e)})),t}),n)},filterWithinSameLiveView:function(e,t){var i=this;return t.querySelector(O)?e.filter((function(e){return i.withinSameLiveView(e,t)})):e},withinSameLiveView:function(e,t){for(;e=e.parentNode;){if(e.isSameNode(t))return!0;if(e.getAttribute(A))return!1}},private:function(e,t){return e.phxPrivate&&e.phxPrivate[t]},deletePrivate:function(e,t){e.phxPrivate&&delete e.phxPrivate[t]},putPrivate:function(e,t,i){e.phxPrivate||(e.phxPrivate={}),e.phxPrivate[t]=i},copyPrivates:function(e,t){t.phxPrivate&&(e.phxPrivate=$(t.phxPrivate))},putTitle:function(e){var t=document.querySelector("title").dataset,i=t.prefix,n=t.suffix;document.title="".concat(i||"").concat(e).concat(n||"")},debounce:function(e,t,i,n,o,r,s){var a=this,l=e.getAttribute(i),c=e.getAttribute(o);""===l&&(l=n),""===c&&(c=r);var u=l||c;switch(u){case null:return s();case"blur":return void(this.once(e,"debounce-blur")&&e.addEventListener("blur",(function(){return s()})));default:var h=parseInt(u),d=this.incCycle(e,"debounce-trigger",(function(){return c?a.deletePrivate(e,"throttled"):s()}));if(isNaN(h))return W("invalid throttle/debounce value: ".concat(u));if(c){var g=!1;if("keydown"===t.type){var f=this.private(e,"debounce-prev-key");this.putPrivate(e,"debounce-prev-key",t.key),g=f!==t.key}if(!g&&this.private(e,"throttled"))return!1;s(),this.putPrivate(e,"throttled",!0),setTimeout((function(){return a.triggerCycle(e,"debounce-trigger")}),h)}else setTimeout((function(){return a.triggerCycle(e,"debounce-trigger",d)}),h);var p=e.form;p&&this.once(p,"bind-debounce")&&p.addEventListener("submit",(function(e){Array.from(new FormData(p).entries(),(function(e){var t=y(e,2),i=t[0],n=(t[1],p.querySelector('[name="'.concat(i,'"]')));a.incCycle(n,"debounce-trigger"),a.deletePrivate(n,"throttled")}))})),this.once(e,"bind-debounce")&&e.addEventListener("blur",(function(t){return a.triggerCycle(e,"debounce-trigger")}))}},triggerCycle:function(e,t,i){var n=y(this.private(e,t),2),o=n[0],r=n[1];i||(i=o),i===o&&(this.incCycle(e,t),r())},once:function(e,t){return!0!==this.private(e,t)&&(this.putPrivate(e,t,!0),!0)},incCycle:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},n=y(this.private(e,t)||[0,i],2),o=n[0];return n[1],o++,this.putPrivate(e,t,[o,i]),o},discardError:function(e,t,i){var n=t.getAttribute&&t.getAttribute(i),o=n&&e.querySelector('[id="'.concat(n,'"], [name="').concat(n,'"]'));o&&(this.private(o,"phx-has-focused")||this.private(o.form,"phx-has-submitted")||t.classList.add("phx-no-feedback"))},showError:function(e,t){var i=this;(e.id||e.name)&&this.all(e.form,"[".concat(t,'="').concat(e.id,'"], [').concat(t,'="').concat(e.name,'"]'),(function(e){i.removeClass(e,"phx-no-feedback")}))},isPhxChild:function(e){return e.getAttribute&&e.getAttribute("data-phx-parent-id")},dispatchEvent:function(e,t){var i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}});e.dispatchEvent(i)},cloneNode:function(e,t){if(void 0===t)return e.cloneNode(!0);var i=e.cloneNode(!1);return i.innerHTML=t,i},mergeAttrs:function(e,t){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i.exclude||[],o=i.isIgnored,r=t.attributes,s=r.length-1;s>=0;s--){var a=r[s].name;n.indexOf(a)<0&&e.setAttribute(a,t.getAttribute(a))}for(var l=e.attributes,c=l.length-1;c>=0;c--){var u=l[c].name;o?u.startsWith("data-")&&!t.hasAttribute(u)&&e.removeAttribute(u):t.hasAttribute(u)||e.removeAttribute(u)}},mergeFocusedInput:function(e,t){e instanceof HTMLSelectElement||oe.mergeAttrs(e,t,{except:["value"]}),t.readOnly?e.setAttribute("readonly",!0):e.removeAttribute("readonly")},hasSelectionRange:function(e){return e.setSelectionRange&&("text"===e.type||"textarea"===e.type)},restoreFocus:function(e,t,i){if(oe.isTextualInput(e)){var n=e.matches(":focus");e.readOnly&&e.blur(),n||e.focus(),this.hasSelectionRange(e)&&e.setSelectionRange(t,i)}},isFormInput:function(e){return/^(?:input|select|textarea)$/i.test(e.tagName)&&"button"!==e.type},syncAttrsToProps:function(e){e instanceof HTMLInputElement&&P.indexOf(e.type.toLocaleLowerCase())>=0&&(e.checked=null!==e.getAttribute("checked"))},isTextualInput:function(e){return F.indexOf(e.type)>=0},isNowTriggerFormExternal:function(e,t){return e.getAttribute&&null!==e.getAttribute(t)},syncPendingRef:function(e,t,i){var n=e.getAttribute(T);return null===n||(oe.isFormInput(e)||null!==e.getAttribute(i)?(oe.isUploadInput(e)&&oe.mergeAttrs(e,t,{isIgnored:!0}),oe.putPrivate(e,T,t),!1):(M.forEach((function(i){e.classList.contains(i)&&t.classList.add(i)})),t.setAttribute(T,n),!0))},cleanChildNodes:function(e,t){if(oe.isPhxUpdate(e,t,["append","prepend"])){var i=[];e.childNodes.forEach((function(e){e.id||(e.nodeType===Node.TEXT_NODE&&""===e.nodeValue.trim()||W("only HTML element tags with an id are allowed inside containers with phx-update.\n\n"+'removing illegal node: "'.concat((e.outerHTML||e.nodeValue).trim(),'"\n\n')),i.push(e))})),i.forEach((function(e){return e.remove()}))}}},re=function(){function e(t,i,n){k(this,e);var o=new Set,r=new Set(p(i.children).map((function(e){return e.id}))),s=[];Array.from(t.children).forEach((function(e){if(e.id&&(o.add(e.id),r.has(e.id))){var t=e.previousElementSibling&&e.previousElementSibling.id;s.push({elementId:e.id,previousElementId:t})}})),this.containerId=i.id,this.updateType=n,this.elementsToModify=s,this.elementIdsToAdd=p(r).filter((function(e){return!o.has(e)}))}return L(e,[{key:"perform",value:function(){var e=oe.byId(this.containerId);this.elementsToModify.forEach((function(t){t.previousElementId?K(document.getElementById(t.previousElementId),(function(e){K(document.getElementById(t.elementId),(function(t){t.previousElementSibling&&t.previousElementSibling.id==e.id||e.insertAdjacentElement("afterend",t)}))})):K(document.getElementById(t.elementId),(function(t){null==t.previousElementSibling||e.insertAdjacentElement("afterbegin",t)}))})),"prepend"==this.updateType&&this.elementIdsToAdd.reverse().forEach((function(t){K(document.getElementById(t),(function(t){return e.insertAdjacentElement("afterbegin",t)}))}))}}]),e}(),se=function(){function e(t,i,n,o,r){k(this,e),this.view=t,this.liveSocket=t.liveSocket,this.container=i,this.id=n,this.rootID=t.root.id,this.html=o,this.targetCID=r,this.cidPatch="number"==typeof this.targetCID,this.callbacks={beforeadded:[],beforeupdated:[],beforephxChildAdded:[],afteradded:[],afterupdated:[],afterdiscarded:[],afterphxChildAdded:[]}}return L(e,null,[{key:"patchEl",value:function(e,t,i){g(e,t,{childrenOnly:!1,onBeforeElUpdated:function(e,t){if(i&&i.isSameNode(e)&&oe.isFormInput(e))return oe.mergeFocusedInput(e,t),!1}})}}]),L(e,[{key:"before",value:function(e,t){this.callbacks["before".concat(e)].push(t)}},{key:"after",value:function(e,t){this.callbacks["after".concat(e)].push(t)}},{key:"trackBefore",value:function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n1?t-1:0),n=1;n *, [phx-update=prepend] > *",(function(e){e.setAttribute("data-phx-remove","")}))}},{key:"perform",value:function(){var e=this,t=this.view,i=this.liveSocket,n=this.container,o=this.html,r=this.isCIDPatch()?this.targetCIDContainer(o):n;if(!this.isCIDPatch()||r){var s=i.getActiveElement(),a=s&&oe.hasSelectionRange(s)?s:{},l=a.selectionStart,c=a.selectionEnd,u=i.binding("update"),h=i.binding("feedback-for"),d=i.binding("disable-with"),f=i.binding("trigger-action"),p=[],m=[],_=[],v=null,b=i.time("premorph container prep",(function(){return e.buildDiffHTML(n,o,u,r)}));return this.trackBefore("added",n),this.trackBefore("updated",n,n),i.time("morphdom",(function(){g(r,b,{childrenOnly:null===r.getAttribute(I),getNodeKey:function(e){return oe.isPhxDestroyed(e)?null:e.id},onBeforeNodeAdded:function(t){return oe.discardError(r,t,h),e.trackBefore("added",t),t},onNodeAdded:function(i){oe.isNowTriggerFormExternal(i,f)&&(v=i),oe.isPhxChild(i)&&t.ownsElement(i)&&e.trackAfter("phxChildAdded",i),p.push(i)},onNodeDiscarded:function(t){oe.isPhxChild(t)&&i.destroyViewByEl(t),e.trackAfter("discarded",t)},onBeforeNodeDiscarded:function(t){return!((!t.getAttribute||null===t.getAttribute("data-phx-remove"))&&(null!==t.parentNode&&oe.isPhxUpdate(t.parentNode,u,["append","prepend"])&&t.id||e.skipCIDSibling(t)))},onElUpdated:function(e){oe.isNowTriggerFormExternal(e,f)&&(v=e),m.push(e)},onBeforeElUpdated:function(t,i){if(oe.cleanChildNodes(i,u),e.skipCIDSibling(i))return!1;if(oe.isIgnored(t,u))return e.trackBefore("updated",t,i),oe.mergeAttrs(t,i,{isIgnored:!0}),m.push(t),!1;if("number"===t.type&&t.validity&&t.validity.badInput)return!1;if(!oe.syncPendingRef(t,i,d))return oe.isUploadInput(t)&&(e.trackBefore("updated",t,i),m.push(t)),!1;if(oe.isPhxChild(i)){var n=t.getAttribute("data-phx-session");return oe.mergeAttrs(t,i,{exclude:["data-phx-static"]}),""!==n&&t.setAttribute("data-phx-session",n),t.setAttribute("data-phx-root-id",e.rootID),!1}return oe.copyPrivates(i,t),oe.discardError(r,i,h),s&&t.isSameNode(s)&&oe.isFormInput(t)&&!e.forceFocusedSelectUpdate(t,i)?(e.trackBefore("updated",t,i),oe.mergeFocusedInput(t,i),oe.syncAttrsToProps(t),m.push(t),!1):(oe.isPhxUpdate(i,u,["append","prepend"])&&_.push(new re(t,i,i.getAttribute(u))),oe.syncAttrsToProps(i),e.trackBefore("updated",t,i),!0)}})})),i.isDebugEnabled()&&function(){for(var e=new Set,t=document.querySelectorAll("*[id]"),i=0,n=t.length;i0&&i.time("post-morph append/prepend restoration",(function(){_.forEach((function(e){return e.perform()}))})),i.silenceEvents((function(){return oe.restoreFocus(s,l,c)})),oe.dispatchEvent(document,"phx:update"),p.forEach((function(t){return e.trackAfter("added",t)})),m.forEach((function(t){return e.trackAfter("updated",t)})),v&&(i.disconnect(),v.submit()),!0}}},{key:"forceFocusedSelectUpdate",value:function(e,t){var i=["select","select-one","select-multiple"].find((function(t){return t===e.type}));return!0===e.multiple||i&&e.innerHTML!=t.innerHTML}},{key:"isCIDPatch",value:function(){return this.cidPatch}},{key:"skipCIDSibling",value:function(e){return e.nodeType===Node.ELEMENT_NODE&&null!==e.getAttribute("data-phx-skip")}},{key:"targetCIDContainer",value:function(e){if(this.isCIDPatch()){var t=f(oe.findComponentNodeList(this.container,this.targetCID)),i=t[0];return 0===t.slice(1).length&&1===oe.childNodeLength(e)?i:i&&i.parentNode}}},{key:"buildDiffHTML",value:function(e,t,i,n){var o=this,r=this.isCIDPatch(),s=r&&n.getAttribute(I)===this.targetCID.toString();if(!r||s)return t;var a=null,l=document.createElement("template");a=oe.cloneNode(n);var c=f(oe.findComponentNodeList(a,this.targetCID)),u=c[0],h=c.slice(1);return l.innerHTML=t,h.forEach((function(e){return e.remove()})),Array.from(a.childNodes).forEach((function(e){e.id&&e.nodeType===Node.ELEMENT_NODE&&e.getAttribute(I)!==o.targetCID.toString()&&(e.setAttribute("data-phx-skip",""),e.innerHTML="")})),Array.from(l.content.childNodes).forEach((function(e){return a.insertBefore(e,u)})),u.remove(),a.outerHTML}}]),e}(),ae=function(){function e(t,i,n,o,r){var s=this;k(this,e),this.liveSocket=i,this.flash=r,this.parent=n,this.root=n?n.root:this,this.el=t,this.id=this.el.id,this.view=this.el.getAttribute(A),this.ref=0,this.childJoins=0,this.loaderTimer=null,this.pendingDiffs=[],this.pruningCIDs=[],this.href=o,this.joinCount=this.parent?this.parent.joinCount-1:0,this.joinPending=!0,this.destroyed=!1,this.joinCallback=function(){},this.stopCallback=function(){},this.pendingJoinOps=this.parent?null:[],this.viewHooks={},this.uploaders={},this.formSubmits=[],this.children=this.parent?null:{},this.root.children[this.id]={},this.channel=this.liveSocket.channel("lv:".concat(this.id),(function(){return{url:s.href,params:s.connectParams(),session:s.getSession(),static:s.getStatic(),flash:s.flash}})),this.showLoader(this.liveSocket.loaderTimeout),this.bindChannel()}return L(e,[{key:"isMain",value:function(){return this.liveSocket.main===this}},{key:"connectParams",value:function(){var e=this.liveSocket.params(this.view),t=oe.all(document,"[".concat(this.binding("track-static"),"]")).map((function(e){return e.src||e.href})).filter((function(e){return"string"==typeof e}));return t.length>0&&(e._track_static=t),e._mounts=this.joinCount,e}},{key:"name",value:function(){return this.view}},{key:"isConnected",value:function(){return this.channel.canPush()}},{key:"getSession",value:function(){return this.el.getAttribute("data-phx-session")}},{key:"getStatic",value:function(){var e=this.el.getAttribute("data-phx-static");return""===e?null:e}},{key:"destroy",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};this.destroyAllChildren(),this.destroyed=!0,delete this.root.children[this.id],this.parent&&delete this.root.children[this.parent.id][this.id],clearTimeout(this.loaderTimer);var i=function(){for(var i in t(),e.viewHooks)e.destroyHook(e.viewHooks[i])};oe.markPhxChildDestroyed(this.el),this.log("destroyed",(function(){return["the child has been removed from the parent"]})),this.channel.leave().receive("ok",i).receive("error",i).receive("timeout",i)}},{key:"setContainerClasses",value:function(){var e;this.el.classList.remove("phx-connected","phx-disconnected","phx-error"),(e=this.el.classList).add.apply(e,arguments)}},{key:"isLoading",value:function(){return this.el.classList.contains("phx-disconnected")}},{key:"showLoader",value:function(e){var t=this;if(clearTimeout(this.loaderTimer),e)this.loaderTimer=setTimeout((function(){return t.showLoader()}),e);else{for(var i in this.viewHooks)this.viewHooks[i].__disconnected();this.setContainerClasses("phx-disconnected")}}},{key:"hideLoader",value:function(){clearTimeout(this.loaderTimer),this.setContainerClasses("phx-connected")}},{key:"triggerReconnected",value:function(){for(var e in this.viewHooks)this.viewHooks[e].__reconnected()}},{key:"log",value:function(e,t){this.liveSocket.log(this,e,t)}},{key:"withinTargets",value:function(e,t){var i=this;if(e instanceof HTMLElement)return this.liveSocket.owner(e,(function(i){return t(i,e)}));if(/^(0|[1-9]\d*)$/.test(e)){var n=oe.findComponentNodeList(this.el,e);0===n.length?W("no component found matching phx-target of ".concat(e)):t(this,n[0])}else{var o=Array.from(document.querySelectorAll(e));0===o.length&&W('nothing found matching the phx-target selector "'.concat(e,'"')),o.forEach((function(e){return i.liveSocket.owner(e,(function(i){return t(i,e)}))}))}}},{key:"applyDiff",value:function(e,t,i){this.log(e,(function(){return["",$(t)]}));var n=te.extract(t),o=n.diff,r=n.reply,s=n.events,a=n.title;return a&&oe.putTitle(a),i({diff:o,reply:r,events:s}),r}},{key:"onJoin",value:function(e){var t=this,i=e.rendered;this.childJoins=0,this.joinPending=!0,this.flash=null,ne.dropLocal(this.liveSocket.localStorage,this.name(),"consecutive-reloads"),this.applyDiff("mount",i,(function(i){var n=i.diff,o=i.events;t.rendered=new te(t.id,n);var r=t.renderContainer(null,"join");t.dropPendingRefs();var s=t.formsForRecovery(r);t.joinCount++,s.length>0?s.forEach((function(e,i){t.pushFormRecovery(e,(function(e){i===s.length-1&&t.onJoinComplete(e,r,o)}))})):t.onJoinComplete(e,r,o)}))}},{key:"dropPendingRefs",value:function(){oe.all(this.el,"[".concat(T,"]"),(function(e){return e.removeAttribute(T)}))}},{key:"onJoinComplete",value:function(e,t,i){var n=this,o=e.live_patch;if(this.joinCount>1||this.parent&&!this.parent.isJoinPending())return this.applyJoinPatch(o,t,i);0===oe.findPhxChildrenInFragment(t,this.id).filter((function(e){var t=e.id&&n.el.querySelector("#".concat(e.id)),i=t&&t.getAttribute("data-phx-static");return i&&e.setAttribute("data-phx-static",i),n.joinChild(e)})).length?this.parent?(this.root.pendingJoinOps.push([this,function(){return n.applyJoinPatch(o,t,i)}]),this.parent.ackJoin(this)):(this.onAllChildJoinsComplete(),this.applyJoinPatch(o,t,i)):this.root.pendingJoinOps.push([this,function(){return n.applyJoinPatch(o,t,i)}])}},{key:"attachTrueDocEl",value:function(){this.el=oe.byId(this.id),this.el.setAttribute("data-phx-root-id",this.root.id)}},{key:"dispatchEvents",value:function(e){e.forEach((function(e){var t=y(e,2),i=t[0],n=t[1];window.dispatchEvent(new CustomEvent("phx:hook:".concat(i),{detail:n}))}))}},{key:"applyJoinPatch",value:function(e,t,i){var n=this;this.attachTrueDocEl();var o=new se(this,this.el,this.id,t,null);if(o.markPrunableContentForRemoval(),this.performPatch(o,!1),this.joinNewChildren(),oe.all(this.el,"[".concat(this.binding("hook"),"], [data-phx-").concat("hook","]"),(function(e){var t=n.addHook(e);t&&t.__mounted()})),this.joinPending=!1,this.dispatchEvents(i),this.applyPendingUpdates(),e){var r=e.kind,s=e.to;this.liveSocket.historyPatch(s,r)}this.hideLoader(),this.joinCount>1&&this.triggerReconnected(),this.stopCallback()}},{key:"triggerBeforeUpdateHook",value:function(e,t){this.liveSocket.triggerDOM("onBeforeElUpdated",[e,t]);var i=this.getHook(e),n=i&&oe.isIgnored(e,this.binding("update"));if(i&&!e.isEqualNode(t)&&(!n||!function(e,t){return JSON.stringify(e)===JSON.stringify(t)}(e.dataset,t.dataset)))return i.__beforeUpdate(),i}},{key:"performPatch",value:function(e,t){var i=this,n=[],o=!1,r=new Set;return e.after("added",(function(e){i.liveSocket.triggerDOM("onNodeAdded",[e]);var t=i.addHook(e);t&&t.__mounted()})),e.after("phxChildAdded",(function(e){return o=!0})),e.before("updated",(function(e,t){i.triggerBeforeUpdateHook(e,t)&&r.add(e.id)})),e.after("updated",(function(e){r.has(e.id)&&i.getHook(e).__updated()})),e.after("discarded",(function(e){var t=i.componentID(e);"number"==typeof t&&-1===n.indexOf(t)&&n.push(t);var o=i.getHook(e);o&&i.destroyHook(o)})),e.perform(),t&&this.maybePushComponentsDestroyed(n),o}},{key:"joinNewChildren",value:function(){var e=this;oe.findPhxChildren(this.el,this.id).forEach((function(t){return e.joinChild(t)}))}},{key:"getChildById",value:function(e){return this.root.children[this.id][e]}},{key:"getDescendentByEl",value:function(e){return e.id===this.id?this:this.children[e.getAttribute("data-phx-parent-id")][e.id]}},{key:"destroyDescendent",value:function(e){for(var t in this.root.children)for(var i in this.root.children[t])if(i===e)return this.root.children[t][i].destroy()}},{key:"joinChild",value:function(t){if(!this.getChildById(t.id)){var i=new e(t,this.liveSocket,this);return this.root.children[this.id][i.id]=i,i.join(),this.childJoins++,!0}}},{key:"isJoinPending",value:function(){return this.joinPending}},{key:"ackJoin",value:function(e){this.childJoins--,0===this.childJoins&&(this.parent?this.parent.ackJoin(this):this.onAllChildJoinsComplete())}},{key:"onAllChildJoinsComplete",value:function(){this.joinCallback(),this.pendingJoinOps.forEach((function(e){var t=y(e,2),i=t[0],n=t[1];i.isDestroyed()||n()})),this.pendingJoinOps=[]}},{key:"update",value:function(e,t){var i=this;if(this.isJoinPending()||this.liveSocket.hasPendingLink())return this.pendingDiffs.push({diff:e,events:t});this.rendered.mergeDiff(e);var n=!1;this.rendered.isComponentOnlyDiff(e)?this.liveSocket.time("component patch complete",(function(){oe.findParentCIDs(i.el,i.rendered.componentCIDs(e)).forEach((function(t){i.componentPatch(i.rendered.getComponent(e,t),t)&&(n=!0)}))})):q(e)||this.liveSocket.time("full patch complete",(function(){var t=i.renderContainer(e,"update"),o=new se(i,i.el,i.id,t,null);n=i.performPatch(o,!0)})),this.dispatchEvents(t),n&&this.joinNewChildren()}},{key:"renderContainer",value:function(e,t){var i=this;return this.liveSocket.time("toString diff (".concat(t,")"),(function(){var t=i.el.tagName,n=e?i.rendered.componentCIDs(e).concat(i.pruningCIDs):null,o=i.rendered.toString(n);return"<".concat(t,">").concat(o,"")}))}},{key:"componentPatch",value:function(e,t){if(q(e))return!1;var i=this.rendered.componentToString(t),n=new se(this,this.el,this.id,i,t);return this.performPatch(n,!0)}},{key:"getHook",value:function(e){return this.viewHooks[ce.elementID(e)]}},{key:"addHook",value:function(e){if(!ce.elementID(e)&&e.getAttribute){var t=e.getAttribute("data-phx-".concat("hook"))||e.getAttribute(this.binding("hook"));if(!t||this.ownsElement(e)){var i=this.liveSocket.getHookCallbacks(t);if(i){e.id||W('no DOM ID for hook "'.concat(t,'". Hooks require a unique ID on each element.'),e);var n=new ce(this,e,i);return this.viewHooks[ce.elementID(n.el)]=n,n}null!==t&&W('unknown hook found for "'.concat(t,'"'),e)}}}},{key:"destroyHook",value:function(e){e.__destroyed(),e.__cleanup__(),delete this.viewHooks[ce.elementID(e.el)]}},{key:"applyPendingUpdates",value:function(){var e=this;this.pendingDiffs.forEach((function(t){var i=t.diff,n=t.events;return e.update(i,n)})),this.pendingDiffs=[]}},{key:"onChannel",value:function(e,t){var i=this;this.liveSocket.onChannel(this.channel,e,(function(e){i.isJoinPending()?i.root.pendingJoinOps.push([i,function(){return t(e)}]):t(e)}))}},{key:"bindChannel",value:function(){var e=this;this.liveSocket.onChannel(this.channel,"diff",(function(t){e.applyDiff("update",t,(function(t){var i=t.diff,n=t.events;return e.update(i,n)}))})),this.onChannel("redirect",(function(t){var i=t.to,n=t.flash;return e.onRedirect({to:i,flash:n})})),this.onChannel("live_patch",(function(t){return e.onLivePatch(t)})),this.onChannel("live_redirect",(function(t){return e.onLiveRedirect(t)})),this.channel.onError((function(t){return e.onError(t)})),this.channel.onClose((function(t){return e.onClose(t)}))}},{key:"destroyAllChildren",value:function(){for(var e in this.root.children[this.id])this.getChildById(e).destroy()}},{key:"onLiveRedirect",value:function(e){var t=e.to,i=e.kind,n=e.flash,o=this.expandURL(t);this.liveSocket.historyRedirect(o,i,n)}},{key:"onLivePatch",value:function(e){var t=e.to,i=e.kind;this.href=this.expandURL(t),this.liveSocket.historyPatch(t,i)}},{key:"expandURL",value:function(e){return e.startsWith("/")?"".concat(window.location.protocol,"//").concat(window.location.host).concat(e):e}},{key:"onRedirect",value:function(e){var t=e.to,i=e.flash;this.liveSocket.redirect(t,i)}},{key:"isDestroyed",value:function(){return this.destroyed}},{key:"join",value:function(e){var t=this;this.parent||(this.stopCallback=this.liveSocket.withPageLoading({to:this.href,kind:"initial"})),this.joinCallback=function(){return e&&e(t,t.joinCount)},this.liveSocket.wrapPush(this,{timeout:!1},(function(){return t.channel.join().receive("ok",(function(e){return t.onJoin(e)})).receive("error",(function(e){return t.onJoinError(e)})).receive("timeout",(function(){return t.onJoinError({reason:"timeout"})}))}))}},{key:"onJoinError",value:function(e){return(e.redirect||e.live_redirect)&&(this.joinPending=!1,this.channel.leave()),e.redirect?this.onRedirect(e.redirect):e.live_redirect?this.onLiveRedirect(e.live_redirect):(this.log("error",(function(){return["unable to join",e]})),this.liveSocket.reloadWithJitter(this))}},{key:"onClose",value:function(e){if(!this.isDestroyed()){if(this.isJoinPending()&&"hidden"!==document.visibilityState||this.liveSocket.hasPendingLink()&&"leave"!==e)return this.liveSocket.reloadWithJitter(this);this.destroyAllChildren(),this.liveSocket.dropActiveElement(this),document.activeElement&&document.activeElement.blur(),this.liveSocket.isUnloaded()&&this.showLoader(200)}}},{key:"onError",value:function(e){this.onClose(e),this.log("error",(function(){return["view crashed",e]})),this.liveSocket.isUnloaded()||this.displayError()}},{key:"displayError",value:function(){this.isMain()&&oe.dispatchEvent(window,"phx:page-loading-start",{to:this.href,kind:"error"}),this.showLoader(),this.setContainerClasses("phx-disconnected","phx-error")}},{key:"pushWithReply",value:function(e,t,i){var n=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){};if(this.isConnected()){var r=y(e?e():[null,[]],2),s=r[0],a=y(r[1],1)[0],l=function(){};return a&&null!==a.getAttribute(this.binding("page-loading"))&&(l=this.liveSocket.withPageLoading({kind:"element",target:a})),"number"!=typeof i.cid&&delete i.cid,this.liveSocket.wrapPush(this,{timeout:!0},(function(){return n.channel.push(t,i,3e4).receive("ok",(function(e){var t=null;null!==s&&n.undoRefs(s),e.diff&&(t=n.applyDiff("update",e.diff,(function(e){var t=e.diff,i=e.events;n.update(t,i)}))),e.redirect&&n.onRedirect(e.redirect),e.live_patch&&n.onLivePatch(e.live_patch),e.live_redirect&&n.onLiveRedirect(e.live_redirect),l(),o(e,t)}))}))}}},{key:"undoRefs",value:function(e){var t=this;oe.all(this.el,"[".concat(T,'="').concat(e,'"]'),(function(e){e.removeAttribute(T),null!==e.getAttribute("data-phx-readonly")&&(e.readOnly=!1,e.removeAttribute("data-phx-readonly")),null!==e.getAttribute("data-phx-disabled")&&(e.disabled=!1,e.removeAttribute("data-phx-disabled")),M.forEach((function(t){return oe.removeClass(e,t)}));var i=e.getAttribute("data-phx-disable-with-restore");null!==i&&(e.innerText=i,e.removeAttribute("data-phx-disable-with-restore"));var n=oe.private(e,T);if(n){var o=t.triggerBeforeUpdateHook(e,n);se.patchEl(e,n,t.liveSocket.getActiveElement()),o&&o.__updated(),oe.deletePrivate(e,T)}}))}},{key:"putRef",value:function(e,t){var i=this.ref++,n=this.binding("disable-with");return e.forEach((function(e){e.classList.add("phx-".concat(t,"-loading")),e.setAttribute(T,i);var o=e.getAttribute(n);null!==o&&(e.getAttribute("data-phx-disable-with-restore")||e.setAttribute("data-phx-disable-with-restore",e.innerText),e.innerText=o)})),[i,e]}},{key:"componentID",value:function(e){var t=e.getAttribute&&e.getAttribute(I);return t?parseInt(t):null}},{key:"targetComponentID",value:function(e,t){return e.getAttribute(this.binding("target"))?this.closestComponentID(t):null}},{key:"closestComponentID",value:function(e){var t=this;return e?K(e.closest("[".concat(I,"]")),(function(e){return t.ownsElement(e)&&t.componentID(e)})):null}},{key:"pushHookEvent",value:function(e,t,i,n){if(!this.isConnected())return this.log("hook",(function(){return["unable to push hook event. LiveView not connected",t,i]})),!1;var o=y(this.putRef([],"hook"),2),r=o[0],s=o[1];return this.pushWithReply((function(){return[r,s]}),"event",{type:"hook",event:t,value:i,cid:this.closestComponentID(e)},(function(e,t){return n(t,r)})),r}},{key:"extractMeta",value:function(e,t){for(var i=this.binding("value-"),n=0;n=0&&!e.checked&&delete t.value),t}},{key:"pushEvent",value:function(e,t,i,n,o){var r=this;this.pushWithReply((function(){return r.putRef([t],e)}),"event",{type:e,event:n,value:this.extractMeta(t,o),cid:this.targetComponentID(t,i)})}},{key:"pushKey",value:function(e,t,i,n,o){var r=this;this.pushWithReply((function(){return r.putRef([e],i)}),"event",{type:i,event:n,value:this.extractMeta(e,o),cid:this.targetComponentID(e,t)})}},{key:"pushFileProgress",value:function(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){};this.liveSocket.withinOwners(e.form,(function(o,r){o.pushWithReply(null,"progress",{event:e.getAttribute(o.binding("progress")),ref:e.getAttribute(R),entry_ref:t,progress:i,cid:o.targetComponentID(e.form,r)},n)}))}},{key:"pushInput",value:function(e,t,i,n,o){var r=this,s=this.targetComponentID(e.form,t),a=function(){return r.putRef([e,e.form],"change")},l=ee(e.form,{_target:n.name});e.files&&e.files.length>0&&X.trackFiles(e,Array.from(e.files));var c={type:"form",event:i,value:l,uploads:X.serializeUploads(e),cid:s};this.pushWithReply(a,"event",c,(function(i){if(oe.showError(e,r.liveSocket.binding("feedback-for")),oe.isUploadInput(e)&&null!==e.getAttribute("data-phx-auto-upload")){if(X.filesAwaitingPreflight(e).length>0){var n=y(a(),2),l=n[0];n[1],r.uploadFiles(e.form,t,l,s,(function(t){o&&o(i),r.triggerAwaitingSubmit(e.form)}))}}else o&&o(i)}))}},{key:"triggerAwaitingSubmit",value:function(e){var t=this.getScheduledSubmit(e);if(t){var i=y(t,3),n=(i[0],i[1],i[2]);this.cancelSubmit(e),n()}}},{key:"getScheduledSubmit",value:function(e){return this.formSubmits.find((function(t){var i=y(t,2),n=i[0];return i[1],n.isSameNode(e)}))}},{key:"scheduleSubmit",value:function(e,t,i){if(this.getScheduledSubmit(e))return!0;this.formSubmits.push([e,t,i])}},{key:"cancelSubmit",value:function(e){var t=this;this.formSubmits=this.formSubmits.filter((function(i){var n=y(i,3),o=n[0],r=n[1];return n[2],!o.isSameNode(e)||(t.undoRefs(r),!1)}))}},{key:"pushFormSubmit",value:function(e,t,i,n){var o=this,r=function(e){return!(U(e,"".concat(o.binding("update"),"=ignore"),e.form)||U(e,"data-phx-update=ignore",e.form))},s=function(e){return e.hasAttribute(o.binding("disable-with"))},a=function(e){return"BUTTON"==e.tagName},l=function(e){return["INPUT","TEXTAREA","SELECT"].includes(e.tagName)},c=function(){var t=Array.from(e.elements),i=t.filter(s),n=t.filter(a).filter(r),c=t.filter(l).filter(r);return n.forEach((function(e){e.setAttribute("data-phx-disabled",e.disabled),e.disabled=!0})),c.forEach((function(e){e.setAttribute("data-phx-readonly",e.readOnly),e.readOnly=!0,e.files&&(e.setAttribute("data-phx-disabled",e.disabled),e.disabled=!0)})),e.setAttribute(o.binding("page-loading"),""),o.putRef([e].concat(i).concat(n).concat(c),"submit")},u=this.targetComponentID(e,t);if(X.hasUploadsInProgress(e)){var h=y(c(),2),d=h[0];return h[1],this.scheduleSubmit(e,d,(function(){return o.pushFormSubmit(e,t,i,n)}))}if(X.inputsAwaitingPreflight(e).length>0){var g=y(c(),2),f=g[0],p=g[1],m=function(){return[f,p]};this.uploadFiles(e,t,f,u,(function(t){var r=ee(e,{});o.pushWithReply(m,"event",{type:"form",event:i,value:r,cid:u},n)}))}else{var _=ee(e);this.pushWithReply(c,"event",{type:"form",event:i,value:_,cid:u},n)}}},{key:"uploadFiles",value:function(e,t,i,n,o){var r=this,s=this.joinCount;X.activeFileInputs(e).forEach((function(e){var n=new X(e,r,o);r.uploaders[e]=n;var a=n.entries().map((function(e){return e.toPreflightPayload()})),l={ref:e.getAttribute(R),entries:a,cid:r.targetComponentID(e.form,t)};r.log("upload",(function(){return["sending preflight request",l]})),r.pushWithReply(null,"allow_upload",l,(function(e){if(r.log("upload",(function(){return["got preflight response",e]})),e.error){r.undoRefs(i);var t=y(e.error,2),o=t[0],a=t[1];r.log("upload",(function(){return["error for entry ".concat(o),a]}))}else n.initAdapterUpload(e,(function(e){r.channel.onError((function(){r.joinCount===s&&e()}))}),r.liveSocket)}))}))}},{key:"pushFormRecovery",value:function(e,t){var i=this;this.liveSocket.withinOwners(e,(function(n,o){var r=e.elements[0],s=e.getAttribute(i.binding("auto-recover"))||e.getAttribute(i.binding("change"));n.pushInput(r,o,s,r,t)}))}},{key:"pushLinkPatch",value:function(e,t,i){var n=this,o=this.liveSocket.setPendingLink(e),r=t?function(){return n.putRef([t],"click")}:null;this.pushWithReply(r,"link",{url:e},(function(t){t.link_redirect?n.liveSocket.replaceMain(e,null,i,o):(n.liveSocket.commitPendingLink(o)&&(n.href=e),n.applyPendingUpdates(),i&&i(o))})).receive("timeout",(function(){return n.liveSocket.redirect(window.location.href)}))}},{key:"formsForRecovery",value:function(e){var t=this;if(0===this.joinCount)return[];var i=this.binding("change"),n=document.createElement("template");return n.innerHTML=e,oe.all(this.el,"form[".concat(i,"]")).filter((function(e){return t.ownsElement(e)})).filter((function(e){return e.elements.length>0})).filter((function(e){return"ignore"!==e.getAttribute(t.binding("auto-recover"))})).filter((function(e){return n.content.querySelector("form[".concat(i,'="').concat(e.getAttribute(i),'"]'))}))}},{key:"maybePushComponentsDestroyed",value:function(e){var t,i=this,n=e.filter((function(e){return 0===oe.findComponentNodeList(i.el,e).length}));n.length>0&&((t=this.pruningCIDs).push.apply(t,p(n)),this.pushWithReply(null,"cids_will_destroy",{cids:n},(function(){i.pruningCIDs=i.pruningCIDs.filter((function(e){return-1!==n.indexOf(e)}));var e=n.filter((function(e){return 0===oe.findComponentNodeList(i.el,e).length}));e.length>0&&i.pushWithReply(null,"cids_destroyed",{cids:e},(function(e){i.rendered.pruneCIDs(e.cids)}))})))}},{key:"ownsElement",value:function(e){return e.getAttribute("data-phx-parent-id")===this.id||K(e.closest(O),(function(e){return e.id}))===this.id}},{key:"submitForm",value:function(e,t,i){var n=this;oe.putPrivate(e,"phx-has-submitted",!0),this.liveSocket.blurActiveElement(this),this.pushFormSubmit(e,t,i,(function(){n.liveSocket.restorePreviouslyActiveFocus()}))}},{key:"binding",value:function(e){return this.liveSocket.binding(e)}}]),e}(),le=1,ce=function(){function e(t,i,n){for(var o in k(this,e),this.__view=t,this.__liveSocket=t.liveSocket,this.__callbacks=n,this.__listeners=new Set,this.__isDisconnected=!1,this.el=i,this.viewName=t.name(),this.el.phxHookId=this.constructor.makeID(),this.__callbacks)this[o]=this.__callbacks[o]}return L(e,null,[{key:"makeID",value:function(){return le++}},{key:"elementID",value:function(e){return e.phxHookId}}]),L(e,[{key:"__mounted",value:function(){this.mounted&&this.mounted()}},{key:"__updated",value:function(){this.updated&&this.updated()}},{key:"__beforeUpdate",value:function(){this.beforeUpdate&&this.beforeUpdate()}},{key:"__destroyed",value:function(){this.destroyed&&this.destroyed()}},{key:"__reconnected",value:function(){this.__isDisconnected&&(this.__isDisconnected=!1,this.reconnected&&this.reconnected())}},{key:"__disconnected",value:function(){this.__isDisconnected=!0,this.disconnected&&this.disconnected()}},{key:"pushEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};return this.__view.pushHookEvent(null,e,t,i)}},{key:"pushEventTo",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){};return this.__view.withinTargets(e,(function(e,o){return e.pushHookEvent(o,t,i,n)}))}},{key:"handleEvent",value:function(e,t){var i=function(i,n){return n?e:t(i.detail)};return window.addEventListener("phx:hook:".concat(e),i),this.__listeners.add(i),i}},{key:"removeHandleEvent",value:function(e){var t=e(null,!0);window.removeEventListener("phx:hook:".concat(t),e),this.__listeners.delete(e)}},{key:"__cleanup__",value:function(){var e=this;this.__listeners.forEach((function(t){return e.removeHandleEvent(t)}))}}]),e}();t.default=ie},function(e,t){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t,i){(function(t){t.Phoenix||(t.Phoenix={}),e.exports=t.Phoenix.LiveView=i(0)}).call(this,i(1))}])},6313:e=>{var t=function(){"use strict";function e(e,t){return null!=t&&e instanceof t}var t,i,n;try{t=Map}catch(e){t=function(){}}try{i=Set}catch(e){i=function(){}}try{n=Promise}catch(e){n=function(){}}function o(r,a,l,c,u){"object"==typeof a&&(l=a.depth,c=a.prototype,u=a.includeNonEnumerable,a=a.circular);var h=[],d=[],g="undefined"!=typeof Buffer;return void 0===a&&(a=!0),void 0===l&&(l=1/0),function r(l,f){if(null===l)return null;if(0===f)return l;var p,m;if("object"!=typeof l)return l;if(e(l,t))p=new t;else if(e(l,i))p=new i;else if(e(l,n))p=new n((function(e,t){l.then((function(t){e(r(t,f-1))}),(function(e){t(r(e,f-1))}))}));else if(o.__isArray(l))p=[];else if(o.__isRegExp(l))p=new RegExp(l.source,s(l)),l.lastIndex&&(p.lastIndex=l.lastIndex);else if(o.__isDate(l))p=new Date(l.getTime());else{if(g&&Buffer.isBuffer(l))return p=Buffer.allocUnsafe?Buffer.allocUnsafe(l.length):new Buffer(l.length),l.copy(p),p;e(l,Error)?p=Object.create(l):void 0===c?(m=Object.getPrototypeOf(l),p=Object.create(m)):(p=Object.create(c),m=c)}if(a){var _=h.indexOf(l);if(-1!=_)return d[_];h.push(l),d.push(p)}for(var v in e(l,t)&&l.forEach((function(e,t){var i=r(t,f-1),n=r(e,f-1);p.set(i,n)})),e(l,i)&&l.forEach((function(e){var t=r(e,f-1);p.add(t)})),l){var b;m&&(b=Object.getOwnPropertyDescriptor(m,v)),b&&null==b.set||(p[v]=r(l[v],f-1))}if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(l);for(v=0;v>>2]>>>24-r%4*8&255;t[n+r>>>2]|=s<<24-(n+r)%4*8}else for(r=0;r>>2]=i[r>>>2];return this.sigBytes+=o,this},clamp:function(){var t=this.words,i=this.sigBytes;t[i>>>2]&=4294967295<<32-i%4*8,t.length=e.ceil(i/4)},clone:function(){var e=l.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],i=0;i>>2]>>>24-o%4*8&255;n.push((r>>>4).toString(16)),n.push((15&r).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,i=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new c.init(i,t/2)}},d=u.Latin1={stringify:function(e){for(var t=e.words,i=e.sigBytes,n=[],o=0;o>>2]>>>24-o%4*8&255;n.push(String.fromCharCode(r))}return n.join("")},parse:function(e){for(var t=e.length,i=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new c.init(i,t)}},g=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(d.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return d.parse(unescape(encodeURIComponent(e)))}},f=a.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=g.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var i,n=this._data,o=n.words,r=n.sigBytes,s=this.blockSize,a=r/(4*s),l=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,u=e.min(4*l,r);if(l){for(var h=0;h>>2]>>>24-r%4*8&255)<<16|(t[r+1>>>2]>>>24-(r+1)%4*8&255)<<8|t[r+2>>>2]>>>24-(r+2)%4*8&255,a=0;a<4&&r+.75*a>>6*(3-a)&63));var l=n.charAt(64);if(l)for(;o.length%4;)o.push(l);return o.join("")},parse:function(e){var t=e.length,i=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var o=0;o>>6-s%4*2;n[o>>>2]|=a<<24-o%4*8,o++}return r.create(n,o)}(e,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)},8214:function(e,t,i){var n;e.exports=(n=i(8249),function(e){var t=n,i=t.lib,o=i.WordArray,r=i.Hasher,s=t.algo,a=[];!function(){for(var t=0;t<64;t++)a[t]=4294967296*e.abs(e.sin(t+1))|0}();var l=s.MD5=r.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var i=0;i<16;i++){var n=t+i,o=e[n];e[n]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var r=this._hash.words,s=e[t+0],l=e[t+1],g=e[t+2],f=e[t+3],p=e[t+4],m=e[t+5],_=e[t+6],v=e[t+7],b=e[t+8],y=e[t+9],w=e[t+10],C=e[t+11],S=e[t+12],x=e[t+13],k=e[t+14],D=e[t+15],L=r[0],N=r[1],E=r[2],A=r[3];L=c(L,N,E,A,s,7,a[0]),A=c(A,L,N,E,l,12,a[1]),E=c(E,A,L,N,g,17,a[2]),N=c(N,E,A,L,f,22,a[3]),L=c(L,N,E,A,p,7,a[4]),A=c(A,L,N,E,m,12,a[5]),E=c(E,A,L,N,_,17,a[6]),N=c(N,E,A,L,v,22,a[7]),L=c(L,N,E,A,b,7,a[8]),A=c(A,L,N,E,y,12,a[9]),E=c(E,A,L,N,w,17,a[10]),N=c(N,E,A,L,C,22,a[11]),L=c(L,N,E,A,S,7,a[12]),A=c(A,L,N,E,x,12,a[13]),E=c(E,A,L,N,k,17,a[14]),L=u(L,N=c(N,E,A,L,D,22,a[15]),E,A,l,5,a[16]),A=u(A,L,N,E,_,9,a[17]),E=u(E,A,L,N,C,14,a[18]),N=u(N,E,A,L,s,20,a[19]),L=u(L,N,E,A,m,5,a[20]),A=u(A,L,N,E,w,9,a[21]),E=u(E,A,L,N,D,14,a[22]),N=u(N,E,A,L,p,20,a[23]),L=u(L,N,E,A,y,5,a[24]),A=u(A,L,N,E,k,9,a[25]),E=u(E,A,L,N,f,14,a[26]),N=u(N,E,A,L,b,20,a[27]),L=u(L,N,E,A,x,5,a[28]),A=u(A,L,N,E,g,9,a[29]),E=u(E,A,L,N,v,14,a[30]),L=h(L,N=u(N,E,A,L,S,20,a[31]),E,A,m,4,a[32]),A=h(A,L,N,E,b,11,a[33]),E=h(E,A,L,N,C,16,a[34]),N=h(N,E,A,L,k,23,a[35]),L=h(L,N,E,A,l,4,a[36]),A=h(A,L,N,E,p,11,a[37]),E=h(E,A,L,N,v,16,a[38]),N=h(N,E,A,L,w,23,a[39]),L=h(L,N,E,A,x,4,a[40]),A=h(A,L,N,E,s,11,a[41]),E=h(E,A,L,N,f,16,a[42]),N=h(N,E,A,L,_,23,a[43]),L=h(L,N,E,A,y,4,a[44]),A=h(A,L,N,E,S,11,a[45]),E=h(E,A,L,N,D,16,a[46]),L=d(L,N=h(N,E,A,L,g,23,a[47]),E,A,s,6,a[48]),A=d(A,L,N,E,v,10,a[49]),E=d(E,A,L,N,k,15,a[50]),N=d(N,E,A,L,m,21,a[51]),L=d(L,N,E,A,S,6,a[52]),A=d(A,L,N,E,f,10,a[53]),E=d(E,A,L,N,w,15,a[54]),N=d(N,E,A,L,l,21,a[55]),L=d(L,N,E,A,b,6,a[56]),A=d(A,L,N,E,D,10,a[57]),E=d(E,A,L,N,_,15,a[58]),N=d(N,E,A,L,x,21,a[59]),L=d(L,N,E,A,p,6,a[60]),A=d(A,L,N,E,C,10,a[61]),E=d(E,A,L,N,g,15,a[62]),N=d(N,E,A,L,y,21,a[63]),r[0]=r[0]+L|0,r[1]=r[1]+N|0,r[2]=r[2]+E|0,r[3]=r[3]+A|0},_doFinalize:function(){var t=this._data,i=t.words,n=8*this._nDataBytes,o=8*t.sigBytes;i[o>>>5]|=128<<24-o%32;var r=e.floor(n/4294967296),s=n;i[15+(o+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),i[14+(o+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),t.sigBytes=4*(i.length+1),this._process();for(var a=this._hash,l=a.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return a},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,i,n,o,r,s){var a=e+(t&i|~t&n)+o+s;return(a<>>32-r)+t}function u(e,t,i,n,o,r,s){var a=e+(t&n|i&~n)+o+s;return(a<>>32-r)+t}function h(e,t,i,n,o,r,s){var a=e+(t^i^n)+o+s;return(a<>>32-r)+t}function d(e,t,i,n,o,r,s){var a=e+(i^(t|~n))+o+s;return(a<>>32-r)+t}t.MD5=r._createHelper(l),t.HmacMD5=r._createHmacHelper(l)}(Math),n.MD5)},7856:function(e){e.exports=function(){"use strict";var e=Object.hasOwnProperty,t=Object.setPrototypeOf,i=Object.isFrozen,n=Object.getPrototypeOf,o=Object.getOwnPropertyDescriptor,r=Object.freeze,s=Object.seal,a=Object.create,l="undefined"!=typeof Reflect&&Reflect,c=l.apply,u=l.construct;c||(c=function(e,t,i){return e.apply(t,i)}),r||(r=function(e){return e}),s||(s=function(e){return e}),u||(u=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t1?i-1:0),o=1;o/gm),z=s(/^data-[\-\w.\u00B7-\uFFFF]/),W=s(/^aria-[\-\w]+$/),V=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=s(/^(?:\w+script|data):/i),$=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function j(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:q(),i=function(t){return e(t)};if(i.version="2.2.6",i.removed=[],!t||!t.document||9!==t.document.nodeType)return i.isSupported=!1,i;var n=t.document,o=t.document,s=t.DocumentFragment,a=t.HTMLTemplateElement,l=t.Node,c=t.Element,u=t.NodeFilter,h=t.NamedNodeMap,C=void 0===h?t.NamedNodeMap||t.MozNamedAttrMap:h,G=t.Text,Y=t.Comment,Z=t.DOMParser,X=t.trustedTypes,Q=c.prototype,J=k(Q,"cloneNode"),ee=k(Q,"nextSibling"),te=k(Q,"childNodes"),ie=k(Q,"parentNode");if("function"==typeof a){var ne=o.createElement("template");ne.content&&ne.content.ownerDocument&&(o=ne.content.ownerDocument)}var oe=K(X,n),re=oe&&Pe?oe.createHTML(""):"",se=o,ae=se.implementation,le=se.createNodeIterator,ce=se.getElementsByTagName,ue=se.createDocumentFragment,he=n.importNode,de={};try{de=x(o).documentMode?o.documentMode:{}}catch(e){}var ge={};i.isSupported=ae&&void 0!==ae.createHTMLDocument&&9!==de;var fe=P,pe=B,me=z,_e=W,ve=H,be=$,ye=V,we=null,Ce=S({},[].concat(j(D),j(L),j(N),j(A),j(I))),Se=null,xe=S({},[].concat(j(T),j(R),j(O),j(F))),ke=null,De=null,Le=!0,Ne=!0,Ee=!1,Ae=!1,Me=!1,Ie=!1,Te=!1,Re=!1,Oe=!1,Fe=!0,Pe=!1,Be=!0,ze=!0,We=!1,Ve={},He=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),$e=null,Ue=S({},["audio","video","img","source","image","track"]),je=null,qe=S({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Ke=null,Ge=o.createElement("form"),Ye=function(e){Ke&&Ke===e||(e&&"object"===(void 0===e?"undefined":U(e))||(e={}),e=x(e),we="ALLOWED_TAGS"in e?S({},e.ALLOWED_TAGS):Ce,Se="ALLOWED_ATTR"in e?S({},e.ALLOWED_ATTR):xe,je="ADD_URI_SAFE_ATTR"in e?S(x(qe),e.ADD_URI_SAFE_ATTR):qe,$e="ADD_DATA_URI_TAGS"in e?S(x(Ue),e.ADD_DATA_URI_TAGS):Ue,ke="FORBID_TAGS"in e?S({},e.FORBID_TAGS):{},De="FORBID_ATTR"in e?S({},e.FORBID_ATTR):{},Ve="USE_PROFILES"in e&&e.USE_PROFILES,Le=!1!==e.ALLOW_ARIA_ATTR,Ne=!1!==e.ALLOW_DATA_ATTR,Ee=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ae=e.SAFE_FOR_TEMPLATES||!1,Me=e.WHOLE_DOCUMENT||!1,Re=e.RETURN_DOM||!1,Oe=e.RETURN_DOM_FRAGMENT||!1,Fe=!1!==e.RETURN_DOM_IMPORT,Pe=e.RETURN_TRUSTED_TYPE||!1,Te=e.FORCE_BODY||!1,Be=!1!==e.SANITIZE_DOM,ze=!1!==e.KEEP_CONTENT,We=e.IN_PLACE||!1,ye=e.ALLOWED_URI_REGEXP||ye,Ae&&(Ne=!1),Oe&&(Re=!0),Ve&&(we=S({},[].concat(j(I))),Se=[],!0===Ve.html&&(S(we,D),S(Se,T)),!0===Ve.svg&&(S(we,L),S(Se,R),S(Se,F)),!0===Ve.svgFilters&&(S(we,N),S(Se,R),S(Se,F)),!0===Ve.mathMl&&(S(we,A),S(Se,O),S(Se,F))),e.ADD_TAGS&&(we===Ce&&(we=x(we)),S(we,e.ADD_TAGS)),e.ADD_ATTR&&(Se===xe&&(Se=x(Se)),S(Se,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&S(je,e.ADD_URI_SAFE_ATTR),ze&&(we["#text"]=!0),Me&&S(we,["html","head","body"]),we.table&&(S(we,["tbody"]),delete ke.tbody),r&&r(e),Ke=e)},Ze=S({},["mi","mo","mn","ms","mtext"]),Xe=S({},["foreignobject","desc","title","annotation-xml"]),Qe=S({},L);S(Qe,N),S(Qe,E);var Je=S({},A);S(Je,M);var et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",it="http://www.w3.org/1999/xhtml",nt=function(e){var t=ie(e);t&&t.tagName||(t={namespaceURI:it,tagName:"template"});var i=p(e.tagName),n=p(t.tagName);if(e.namespaceURI===tt)return t.namespaceURI===it?"svg"===i:t.namespaceURI===et?"svg"===i&&("annotation-xml"===n||Ze[n]):Boolean(Qe[i]);if(e.namespaceURI===et)return t.namespaceURI===it?"math"===i:t.namespaceURI===tt?"math"===i&&Xe[n]:Boolean(Je[i]);if(e.namespaceURI===it){if(t.namespaceURI===tt&&!Xe[n])return!1;if(t.namespaceURI===et&&!Ze[n])return!1;var o=S({},["title","style","font","a","script"]);return!Je[i]&&(o[i]||!Qe[i])}return!1},ot=function(e){f(i.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=re}catch(t){e.remove()}}},rt=function(e,t){try{f(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(i.removed,{attribute:null,from:t})}t.removeAttribute(e)},st=function(e){var t=void 0,i=void 0;if(Te)e=""+e;else{var n=m(e,/^[\r\n\t ]+/);i=n&&n[0]}var r=oe?oe.createHTML(e):e;try{t=(new Z).parseFromString(r,"text/html")}catch(e){}if(!t||!t.documentElement){var s=(t=ae.createHTMLDocument("")).body;s.parentNode.removeChild(s.parentNode.firstElementChild),s.outerHTML=r}return e&&i&&t.body.insertBefore(o.createTextNode(i),t.body.childNodes[0]||null),ce.call(t,Me?"html":"body")[0]},at=function(e){return le.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,(function(){return u.FILTER_ACCEPT}),!1)},lt=function(e){return!(e instanceof G||e instanceof Y||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof C&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore)},ct=function(e){return"object"===(void 0===l?"undefined":U(l))?e instanceof l:e&&"object"===(void 0===e?"undefined":U(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},ut=function(e,t,n){ge[e]&&d(ge[e],(function(e){e.call(i,t,n,Ke)}))},ht=function(e){var t=void 0;if(ut("beforeSanitizeElements",e,null),lt(e))return ot(e),!0;if(m(e.nodeName,/[\u0080-\uFFFF]/))return ot(e),!0;var n=p(e.nodeName);if(ut("uponSanitizeElement",e,{tagName:n,allowedTags:we}),!ct(e.firstElementChild)&&(!ct(e.content)||!ct(e.content.firstElementChild))&&y(/<[/\w]/g,e.innerHTML)&&y(/<[/\w]/g,e.textContent))return ot(e),!0;if(!we[n]||ke[n]){if(ze&&!He[n])for(var o=ie(e),r=te(e),s=r.length-1;s>=0;--s)o.insertBefore(J(r[s],!0),ee(e));return ot(e),!0}return e instanceof c&&!nt(e)?(ot(e),!0):"noscript"!==n&&"noembed"!==n||!y(/<\/no(script|embed)/i,e.innerHTML)?(Ae&&3===e.nodeType&&(t=e.textContent,t=_(t,fe," "),t=_(t,pe," "),e.textContent!==t&&(f(i.removed,{element:e.cloneNode()}),e.textContent=t)),ut("afterSanitizeElements",e,null),!1):(ot(e),!0)},dt=function(e,t,i){if(Be&&("id"===t||"name"===t)&&(i in o||i in Ge))return!1;if(Ne&&y(me,t));else if(Le&&y(_e,t));else{if(!Se[t]||De[t])return!1;if(je[t]);else if(y(ye,_(i,be,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==v(i,"data:")||!$e[e])if(Ee&&!y(ve,_(i,be,"")));else if(i)return!1}return!0},gt=function(e){var t=void 0,n=void 0,o=void 0,r=void 0;ut("beforeSanitizeAttributes",e,null);var s=e.attributes;if(s){var a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Se};for(r=s.length;r--;){var l=t=s[r],c=l.name,u=l.namespaceURI;if(n=b(t.value),o=p(c),a.attrName=o,a.attrValue=n,a.keepAttr=!0,a.forceKeepAttr=void 0,ut("uponSanitizeAttribute",e,a),n=a.attrValue,!a.forceKeepAttr&&(rt(c,e),a.keepAttr))if(y(/\/>/i,n))rt(c,e);else{Ae&&(n=_(n,fe," "),n=_(n,pe," "));var h=e.nodeName.toLowerCase();if(dt(h,o,n))try{u?e.setAttributeNS(u,c,n):e.setAttribute(c,n),g(i.removed)}catch(e){}}}ut("afterSanitizeAttributes",e,null)}},ft=function e(t){var i=void 0,n=at(t);for(ut("beforeSanitizeShadowDOM",t,null);i=n.nextNode();)ut("uponSanitizeShadowNode",i,null),ht(i)||(i.content instanceof s&&e(i.content),gt(i));ut("afterSanitizeShadowDOM",t,null)};return i.sanitize=function(e,o){var r=void 0,a=void 0,c=void 0,u=void 0,h=void 0;if(e||(e="\x3c!--\x3e"),"string"!=typeof e&&!ct(e)){if("function"!=typeof e.toString)throw w("toString is not a function");if("string"!=typeof(e=e.toString()))throw w("dirty is not a string, aborting")}if(!i.isSupported){if("object"===U(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(ct(e))return t.toStaticHTML(e.outerHTML)}return e}if(Ie||Ye(o),i.removed=[],"string"==typeof e&&(We=!1),We);else if(e instanceof l)1===(a=(r=st("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===a.nodeName||"HTML"===a.nodeName?r=a:r.appendChild(a);else{if(!Re&&!Ae&&!Me&&-1===e.indexOf("<"))return oe&&Pe?oe.createHTML(e):e;if(!(r=st(e)))return Re?null:re}r&&Te&&ot(r.firstChild);for(var d=at(We?e:r);c=d.nextNode();)3===c.nodeType&&c===u||ht(c)||(c.content instanceof s&&ft(c.content),gt(c),u=c);if(u=null,We)return e;if(Re){if(Oe)for(h=ue.call(r.ownerDocument);r.firstChild;)h.appendChild(r.firstChild);else h=r;return Fe&&(h=he.call(n,h,!0)),h}var g=Me?r.outerHTML:r.innerHTML;return Ae&&(g=_(g,fe," "),g=_(g,pe," ")),oe&&Pe?oe.createHTML(g):g},i.setConfig=function(e){Ye(e),Ie=!0},i.clearConfig=function(){Ke=null,Ie=!1},i.isValidAttribute=function(e,t,i){Ke||Ye({});var n=p(e),o=p(t);return dt(n,o,i)},i.addHook=function(e,t){"function"==typeof t&&(ge[e]=ge[e]||[],f(ge[e],t))},i.removeHook=function(e){ge[e]&&g(ge[e])},i.removeHooks=function(e){ge[e]&&(ge[e]=[])},i.removeAllHooks=function(){ge={}},i}()}()},4063:e=>{"use strict";e.exports=function e(t,i){if(t===i)return!0;if(t&&i&&"object"==typeof t&&"object"==typeof i){if(t.constructor!==i.constructor)return!1;var n,o,r;if(Array.isArray(t)){if((n=t.length)!=i.length)return!1;for(o=n;0!=o--;)if(!e(t[o],i[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===i.source&&t.flags===i.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===i.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===i.toString();if((n=(r=Object.keys(t)).length)!==Object.keys(i).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(i,r[o]))return!1;for(o=n;0!=o--;){var s=r[o];if(!e(t[s],i[s]))return!1}return!0}return t!=t&&i!=i}},5035:e=>{"use strict";e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var i,n="boolean"==typeof t.cycles&&t.cycles,o=t.cmp&&(i=t.cmp,function(e){return function(t,n){var o={key:t,value:e[t]},r={key:n,value:e[n]};return i(o,r)}}),r=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var i,s;if(Array.isArray(t)){for(s="[",i=0;i{e.exports=function e(t,i,n){function o(s,a){if(!i[s]){if(!t[s]){if(r)return r(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=i[s]={exports:{}};t[s][0].call(c.exports,(function(e){return o(t[s][1][e]||e)}),c,c.exports,e,t,i,n)}return i[s].exports}for(var r=void 0,s=0;sn._averageHeight){var s=n._renderChunk();n._lastRepaint=t,!1!==s&&"function"==typeof o.afterRender&&o.afterRender()}}}()}return n(e,null,[{key:"create",value:function(t,i){return new e(t,i)}},{key:"mergeStyle",value:function(e,t){for(var i in t)e.style[i]!==t[i]&&(e.style[i]=t[i])}},{key:"getMaxBrowserHeight",value:function(){var t=document.createElement("div"),i=document.createElement("div");e.mergeStyle(t,{position:"absolute",height:"1px",opacity:0}),e.mergeStyle(i,{height:"1e7px"}),t.appendChild(i),document.body.appendChild(t);var n=i.offsetHeight;return document.body.removeChild(t),n}}]),n(e,[{key:"destroy",value:function(){window.cancelAnimationFrame(this._renderAnimationFrame)}},{key:"refresh",value:function(t,i){var n;if(Object.assign(this._config,r,i),!t||1!==t.nodeType)throw new Error("HyperList requires a valid DOM Node container");this._element=t;var a=this._config,l=this._scroller||a.scroller||document.createElement(a.scrollerTagName||"tr");if("boolean"!=typeof a.useFragment&&(this._config.useFragment=!0),!a.generate)throw new Error("Missing required `generate` function");if(!s(a.total))throw new Error("Invalid required `total` value, expected number");if(!Array.isArray(a.itemHeight)&&!s(a.itemHeight))throw new Error("\n Invalid required `itemHeight` value, expected number or array\n ".trim());s(a.itemHeight)?this._itemHeights=Array(a.total).fill(a.itemHeight):this._itemHeights=a.itemHeight,Object.keys(r).filter((function(e){return e in a})).forEach((function(e){var t=a[e],i=s(t);if(t&&"string"!=typeof t&&"number"!=typeof t)throw new Error("Invalid optional `"+e+"`, expected string or number");i&&(a[e]=t+"px")}));var c=Boolean(a.horizontal),u=a[c?"width":"height"];if(u){var h=s(u),d=!h&&"%"===u.slice(-1),g=h?u:parseInt(u.replace(/px|%/,""),10),f=window[c?"innerWidth":"innerHeight"];this._containerSize=d?f*g/100:s(u)?u:g}var p=a.scrollContainer,m=a.itemHeight*a.total,_=this._maxElementHeight;m>_&&console.warn(["HyperList: The maximum element height",_+"px has","been exceeded; please reduce your item height."].join(" "));var v={width:""+a.width,height:p?m+"px":""+a.height,overflow:p?"none":"auto",position:"relative"};e.mergeStyle(t,v),p&&e.mergeStyle(a.scrollContainer,{overflow:"auto"});var b=(o(n={opacity:"0",position:"absolute"},c?"height":"width","1px"),o(n,c?"width":"height",m+"px"),n);e.mergeStyle(l,b),this._scroller||t.appendChild(l);var y=this._computeScrollPadding();this._scrollPaddingBottom=y.bottom,this._scrollPaddingTop=y.top,this._scroller=l,this._scrollHeight=this._computeScrollHeight(),this._itemPositions=this._itemPositions||Array(a.total).fill(0),this._computePositions(0),this._renderChunk(null!==this._lastRepaint),"function"==typeof a.afterRender&&a.afterRender()}},{key:"_getRow",value:function(t){var i=this._config,n=i.generate(t),r=n.height;if(void 0!==r&&s(r)?(n=n.element,r!==this._itemHeights[t]&&(this._itemHeights[t]=r,this._computePositions(t),this._scrollHeight=this._computeScrollHeight(t))):r=this._itemHeights[t],!n||1!==n.nodeType)throw new Error("Generator did not return a DOM Node for index: "+t);a(n,i.rowClassName||"vrow");var l=this._itemPositions[t]+this._scrollPaddingTop;return e.mergeStyle(n,o({position:"absolute"},i.horizontal?"left":"top",l+"px")),n}},{key:"_getScrollPosition",value:function(){var e=this._config;return"function"==typeof e.overrideScrollPosition?e.overrideScrollPosition():this._element[e.horizontal?"scrollLeft":"scrollTop"]}},{key:"_renderChunk",value:function(e){var t=this._config,i=this._element,n=this._getScrollPosition(),o=t.total,r=t.reverse?this._getReverseFrom(n):this._getFrom(n)-1;if((r<0||r-this._screenItemsLen<0)&&(r=0),!e&&this._lastFrom===r)return!1;this._lastFrom=r;var s=r+this._cachedItemsLen;(s>o||s+this._cachedItemsLen>o)&&(s=o);var a=t.useFragment?document.createDocumentFragment():[],l=this._scroller;a[t.useFragment?"appendChild":"push"](l);for(var c=r;c0&&void 0!==arguments[0]?arguments[0]:1,t=this._config,i=t.total,n=t.reverse;e<1&&!n&&(e=1);for(var o=e;o0&&this._itemPositions[t]{"use strict";var t=/("(?:[^\\"]|\\.)*")|[:,]/g;e.exports=function(e,i){var n,o,r;return i=i||{},n=JSON.stringify([1],void 0,void 0===i.indent?2:i.indent).slice(2,-3),o=""===n?1/0:void 0===i.maxLength?80:i.maxLength,r=i.replacer,function e(i,s,a){var l,c,u,h,d,g,f,p,m,_,v,b;if(i&&"function"==typeof i.toJSON&&(i=i.toJSON()),void 0===(v=JSON.stringify(i,r)))return v;if(f=o-s.length-a,v.length<=f&&(m=v.replace(t,(function(e,t){return t||e+" "}))).length<=f)return m;if(null!=r&&(i=JSON.parse(v),r=void 0),"object"==typeof i&&null!==i){if(p=s+n,u=[],c=0,Array.isArray(i))for(_="[",l="]",f=i.length;c0)return[_,n+u.join(",\n"+p),l].join("\n"+s)}return v}(e,"",0)}},527:function(e){var t;"undefined"!=typeof self&&self,t=function(){return function(){"use strict";var e={d:function(t,i){for(var n in i)e.o(i,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:i[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{default:function(){return Qn}});var i=function e(t,i){this.position=void 0;var n,o="KaTeX parse error: "+t,r=i&&i.loc;if(r&&r.start<=r.end){var s=r.lexer.input;n=r.start;var a=r.end;n===s.length?o+=" at end of input: ":o+=" at position "+(n+1)+": ";var l=s.slice(n,a).replace(/[^]/g,"$&̲");o+=(n>15?"…"+s.slice(n-15,n):s.slice(0,n))+l+(a+15":">","<":"<",'"':""","'":"'"},s=/[&><"']/g,a=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},l=function(e,t){return-1!==e.indexOf(t)},c=function(e,t){return void 0===e?t:e},u=function(e){return String(e).replace(s,(function(e){return r[e]}))},h=function(e){return e.replace(o,"-$1").toLowerCase()},d=a,g=function(e){var t=a(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},f=function(e){var t=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(e);return null!=t?t[1]:"_relative"},p=function(){function e(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},this.displayMode=c(e.displayMode,!1),this.output=c(e.output,"htmlAndMathml"),this.leqno=c(e.leqno,!1),this.fleqn=c(e.fleqn,!1),this.throwOnError=c(e.throwOnError,!0),this.errorColor=c(e.errorColor,"#cc0000"),this.macros=e.macros||{},this.minRuleThickness=Math.max(0,c(e.minRuleThickness,0)),this.colorIsTextColor=c(e.colorIsTextColor,!1),this.strict=c(e.strict,"warn"),this.trust=c(e.trust,!1),this.maxSize=Math.max(0,c(e.maxSize,1/0)),this.maxExpand=Math.max(0,c(e.maxExpand,1e3)),this.globalGroup=c(e.globalGroup,!1)}var t=e.prototype;return t.reportNonstrict=function(e,t,i){var o=this.strict;if("function"==typeof o&&(o=o(e,t,i)),o&&"ignore"!==o){if(!0===o||"error"===o)throw new n("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",i);"warn"===o?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+o+"': "+t+" ["+e+"]")}},t.useStrictBehavior=function(e,t,i){var n=this.strict;if("function"==typeof n)try{n=n(e,t,i)}catch(e){n="error"}return!(!n||"ignore"===n||!0!==n&&"error"!==n&&("warn"===n?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]"),1)))},t.isTrusted=function(e){e.url&&!e.protocol&&(e.protocol=f(e.url));var t="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(t)},e}(),m=function(){function e(e,t,i){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=i}var t=e.prototype;return t.sup=function(){return _[v[this.id]]},t.sub=function(){return _[b[this.id]]},t.fracNum=function(){return _[y[this.id]]},t.fracDen=function(){return _[w[this.id]]},t.cramp=function(){return _[C[this.id]]},t.text=function(){return _[S[this.id]]},t.isTight=function(){return this.size>=2},e}(),_=[new m(0,0,!1),new m(1,0,!0),new m(2,1,!1),new m(3,1,!0),new m(4,2,!1),new m(5,2,!0),new m(6,3,!1),new m(7,3,!0)],v=[4,5,4,5,6,7,6,7],b=[5,5,5,5,7,7,7,7],y=[2,3,4,5,6,7,6,7],w=[3,3,5,5,7,7,7,7],C=[1,1,3,3,5,5,7,7],S=[0,1,2,3,2,3,2,3],x={DISPLAY:_[0],TEXT:_[2],SCRIPT:_[4],SCRIPTSCRIPT:_[6]},k=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}],D=[];function L(e){for(var t=0;t=D[t]&&e<=D[t+1])return!0;return!1}k.forEach((function(e){return e.blocks.forEach((function(e){return D.push.apply(D,e)}))}));var N={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"},E=function(){function e(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var t=e.prototype;return t.hasClass=function(e){return l(this.classes,e)},t.toNode=function(){for(var e=document.createDocumentFragment(),t=0;t"},R=function(){function e(e,t,i,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,M.call(this,e,i,n),this.children=t||[]}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.hasClass=function(e){return l(this.classes,e)},t.toNode=function(){return I.call(this,"span")},t.toMarkup=function(){return T.call(this,"span")},e}(),O=function(){function e(e,t,i,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,M.call(this,t,n),this.children=i||[],this.setAttribute("href",e)}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.hasClass=function(e){return l(this.classes,e)},t.toNode=function(){return I.call(this,"a")},t.toMarkup=function(){return T.call(this,"a")},e}(),F=function(){function e(e,t,i){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=i}var t=e.prototype;return t.hasClass=function(e){return l(this.classes,e)},t.toNode=function(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e},t.toMarkup=function(){var e=""+this.alt+""},e}(),P={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"},B=function(){function e(e,t,i,n,o,r,s,a){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=i||0,this.italic=n||0,this.skew=o||0,this.width=r||0,this.classes=s||[],this.style=a||{},this.maxFontSize=0;var l=function(e){for(var t=0;t=o[0]&&e<=o[1])return i.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=P[this.text])}var t=e.prototype;return t.hasClass=function(e){return l(this.classes,e)},t.toNode=function(){var e=document.createTextNode(this.text),t=null;for(var i in this.italic>0&&((t=document.createElement("span")).style.marginRight=this.italic+"em"),this.classes.length>0&&((t=t||document.createElement("span")).className=A(this.classes)),this.style)this.style.hasOwnProperty(i)&&((t=t||document.createElement("span")).style[i]=this.style[i]);return t?(t.appendChild(e),t):e},t.toMarkup=function(){var e=!1,t="0&&(i+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(n)&&(i+=h(n)+":"+this.style[n]+";");i&&(e=!0,t+=' style="'+u(i)+'"');var o=u(this.text);return e?(t+=">",t+=o,t+=""):o},e}(),z=function(){function e(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var i=0;i"},e}(),W=function(){function e(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",N[this.pathName]),e},t.toMarkup=function(){return this.alternate?"":""},e}(),V=function(){function e(e){this.attributes=void 0,this.attributes=e||{}}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e},t.toMarkup=function(){var e=""},e}();function H(e){if(e instanceof B)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}var $={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,1],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.67,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.9,0,0,.278],8943:[-.19,.31,0,0,1.172],8945:[-.1,.82,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.744,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.744,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},U={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},j={Å:"A",Ç:"C",Ð:"D",Þ:"o",å:"a",ç:"c",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function q(e,t,i){if(!$[t])throw new Error("Font metrics not found for font: "+t+".");var n=e.charCodeAt(0),o=$[t][n];if(!o&&e[0]in j&&(n=j[e[0]].charCodeAt(0),o=$[t][n]),o||"text"!==i||L(n)&&(o=$[t][77]),o)return{depth:o[0],height:o[1],italic:o[2],skew:o[3],width:o[4]}}var K={},G={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Y={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Z={math:{},text:{}},X=Z;function Q(e,t,i,n,o,r){Z[e][o]={font:t,group:i,replace:n},r&&n&&(Z[e][n]=Z[e][o])}var J="math",ee="text",te="main",ie="ams",ne="accent-token",oe="bin",re="close",se="inner",ae="mathord",le="op-token",ce="open",ue="punct",he="rel",de="spacing",ge="textord";Q(J,te,he,"≡","\\equiv",!0),Q(J,te,he,"≺","\\prec",!0),Q(J,te,he,"≻","\\succ",!0),Q(J,te,he,"∼","\\sim",!0),Q(J,te,he,"⊥","\\perp"),Q(J,te,he,"⪯","\\preceq",!0),Q(J,te,he,"⪰","\\succeq",!0),Q(J,te,he,"≃","\\simeq",!0),Q(J,te,he,"∣","\\mid",!0),Q(J,te,he,"≪","\\ll",!0),Q(J,te,he,"≫","\\gg",!0),Q(J,te,he,"≍","\\asymp",!0),Q(J,te,he,"∥","\\parallel"),Q(J,te,he,"⋈","\\bowtie",!0),Q(J,te,he,"⌣","\\smile",!0),Q(J,te,he,"⊑","\\sqsubseteq",!0),Q(J,te,he,"⊒","\\sqsupseteq",!0),Q(J,te,he,"≐","\\doteq",!0),Q(J,te,he,"⌢","\\frown",!0),Q(J,te,he,"∋","\\ni",!0),Q(J,te,he,"∝","\\propto",!0),Q(J,te,he,"⊢","\\vdash",!0),Q(J,te,he,"⊣","\\dashv",!0),Q(J,te,he,"∋","\\owns"),Q(J,te,ue,".","\\ldotp"),Q(J,te,ue,"⋅","\\cdotp"),Q(J,te,ge,"#","\\#"),Q(ee,te,ge,"#","\\#"),Q(J,te,ge,"&","\\&"),Q(ee,te,ge,"&","\\&"),Q(J,te,ge,"ℵ","\\aleph",!0),Q(J,te,ge,"∀","\\forall",!0),Q(J,te,ge,"ℏ","\\hbar",!0),Q(J,te,ge,"∃","\\exists",!0),Q(J,te,ge,"∇","\\nabla",!0),Q(J,te,ge,"♭","\\flat",!0),Q(J,te,ge,"ℓ","\\ell",!0),Q(J,te,ge,"♮","\\natural",!0),Q(J,te,ge,"♣","\\clubsuit",!0),Q(J,te,ge,"℘","\\wp",!0),Q(J,te,ge,"♯","\\sharp",!0),Q(J,te,ge,"♢","\\diamondsuit",!0),Q(J,te,ge,"ℜ","\\Re",!0),Q(J,te,ge,"♡","\\heartsuit",!0),Q(J,te,ge,"ℑ","\\Im",!0),Q(J,te,ge,"♠","\\spadesuit",!0),Q(ee,te,ge,"§","\\S",!0),Q(ee,te,ge,"¶","\\P",!0),Q(J,te,ge,"†","\\dag"),Q(ee,te,ge,"†","\\dag"),Q(ee,te,ge,"†","\\textdagger"),Q(J,te,ge,"‡","\\ddag"),Q(ee,te,ge,"‡","\\ddag"),Q(ee,te,ge,"‡","\\textdaggerdbl"),Q(J,te,re,"⎱","\\rmoustache",!0),Q(J,te,ce,"⎰","\\lmoustache",!0),Q(J,te,re,"⟯","\\rgroup",!0),Q(J,te,ce,"⟮","\\lgroup",!0),Q(J,te,oe,"∓","\\mp",!0),Q(J,te,oe,"⊖","\\ominus",!0),Q(J,te,oe,"⊎","\\uplus",!0),Q(J,te,oe,"⊓","\\sqcap",!0),Q(J,te,oe,"∗","\\ast"),Q(J,te,oe,"⊔","\\sqcup",!0),Q(J,te,oe,"◯","\\bigcirc",!0),Q(J,te,oe,"∙","\\bullet"),Q(J,te,oe,"‡","\\ddagger"),Q(J,te,oe,"≀","\\wr",!0),Q(J,te,oe,"⨿","\\amalg"),Q(J,te,oe,"&","\\And"),Q(J,te,he,"⟵","\\longleftarrow",!0),Q(J,te,he,"⇐","\\Leftarrow",!0),Q(J,te,he,"⟸","\\Longleftarrow",!0),Q(J,te,he,"⟶","\\longrightarrow",!0),Q(J,te,he,"⇒","\\Rightarrow",!0),Q(J,te,he,"⟹","\\Longrightarrow",!0),Q(J,te,he,"↔","\\leftrightarrow",!0),Q(J,te,he,"⟷","\\longleftrightarrow",!0),Q(J,te,he,"⇔","\\Leftrightarrow",!0),Q(J,te,he,"⟺","\\Longleftrightarrow",!0),Q(J,te,he,"↦","\\mapsto",!0),Q(J,te,he,"⟼","\\longmapsto",!0),Q(J,te,he,"↗","\\nearrow",!0),Q(J,te,he,"↩","\\hookleftarrow",!0),Q(J,te,he,"↪","\\hookrightarrow",!0),Q(J,te,he,"↘","\\searrow",!0),Q(J,te,he,"↼","\\leftharpoonup",!0),Q(J,te,he,"⇀","\\rightharpoonup",!0),Q(J,te,he,"↙","\\swarrow",!0),Q(J,te,he,"↽","\\leftharpoondown",!0),Q(J,te,he,"⇁","\\rightharpoondown",!0),Q(J,te,he,"↖","\\nwarrow",!0),Q(J,te,he,"⇌","\\rightleftharpoons",!0),Q(J,ie,he,"≮","\\nless",!0),Q(J,ie,he,"","\\@nleqslant"),Q(J,ie,he,"","\\@nleqq"),Q(J,ie,he,"⪇","\\lneq",!0),Q(J,ie,he,"≨","\\lneqq",!0),Q(J,ie,he,"","\\@lvertneqq"),Q(J,ie,he,"⋦","\\lnsim",!0),Q(J,ie,he,"⪉","\\lnapprox",!0),Q(J,ie,he,"⊀","\\nprec",!0),Q(J,ie,he,"⋠","\\npreceq",!0),Q(J,ie,he,"⋨","\\precnsim",!0),Q(J,ie,he,"⪹","\\precnapprox",!0),Q(J,ie,he,"≁","\\nsim",!0),Q(J,ie,he,"","\\@nshortmid"),Q(J,ie,he,"∤","\\nmid",!0),Q(J,ie,he,"⊬","\\nvdash",!0),Q(J,ie,he,"⊭","\\nvDash",!0),Q(J,ie,he,"⋪","\\ntriangleleft"),Q(J,ie,he,"⋬","\\ntrianglelefteq",!0),Q(J,ie,he,"⊊","\\subsetneq",!0),Q(J,ie,he,"","\\@varsubsetneq"),Q(J,ie,he,"⫋","\\subsetneqq",!0),Q(J,ie,he,"","\\@varsubsetneqq"),Q(J,ie,he,"≯","\\ngtr",!0),Q(J,ie,he,"","\\@ngeqslant"),Q(J,ie,he,"","\\@ngeqq"),Q(J,ie,he,"⪈","\\gneq",!0),Q(J,ie,he,"≩","\\gneqq",!0),Q(J,ie,he,"","\\@gvertneqq"),Q(J,ie,he,"⋧","\\gnsim",!0),Q(J,ie,he,"⪊","\\gnapprox",!0),Q(J,ie,he,"⊁","\\nsucc",!0),Q(J,ie,he,"⋡","\\nsucceq",!0),Q(J,ie,he,"⋩","\\succnsim",!0),Q(J,ie,he,"⪺","\\succnapprox",!0),Q(J,ie,he,"≆","\\ncong",!0),Q(J,ie,he,"","\\@nshortparallel"),Q(J,ie,he,"∦","\\nparallel",!0),Q(J,ie,he,"⊯","\\nVDash",!0),Q(J,ie,he,"⋫","\\ntriangleright"),Q(J,ie,he,"⋭","\\ntrianglerighteq",!0),Q(J,ie,he,"","\\@nsupseteqq"),Q(J,ie,he,"⊋","\\supsetneq",!0),Q(J,ie,he,"","\\@varsupsetneq"),Q(J,ie,he,"⫌","\\supsetneqq",!0),Q(J,ie,he,"","\\@varsupsetneqq"),Q(J,ie,he,"⊮","\\nVdash",!0),Q(J,ie,he,"⪵","\\precneqq",!0),Q(J,ie,he,"⪶","\\succneqq",!0),Q(J,ie,he,"","\\@nsubseteqq"),Q(J,ie,oe,"⊴","\\unlhd"),Q(J,ie,oe,"⊵","\\unrhd"),Q(J,ie,he,"↚","\\nleftarrow",!0),Q(J,ie,he,"↛","\\nrightarrow",!0),Q(J,ie,he,"⇍","\\nLeftarrow",!0),Q(J,ie,he,"⇏","\\nRightarrow",!0),Q(J,ie,he,"↮","\\nleftrightarrow",!0),Q(J,ie,he,"⇎","\\nLeftrightarrow",!0),Q(J,ie,he,"△","\\vartriangle"),Q(J,ie,ge,"ℏ","\\hslash"),Q(J,ie,ge,"▽","\\triangledown"),Q(J,ie,ge,"◊","\\lozenge"),Q(J,ie,ge,"Ⓢ","\\circledS"),Q(J,ie,ge,"®","\\circledR"),Q(ee,ie,ge,"®","\\circledR"),Q(J,ie,ge,"∡","\\measuredangle",!0),Q(J,ie,ge,"∄","\\nexists"),Q(J,ie,ge,"℧","\\mho"),Q(J,ie,ge,"Ⅎ","\\Finv",!0),Q(J,ie,ge,"⅁","\\Game",!0),Q(J,ie,ge,"‵","\\backprime"),Q(J,ie,ge,"▲","\\blacktriangle"),Q(J,ie,ge,"▼","\\blacktriangledown"),Q(J,ie,ge,"■","\\blacksquare"),Q(J,ie,ge,"⧫","\\blacklozenge"),Q(J,ie,ge,"★","\\bigstar"),Q(J,ie,ge,"∢","\\sphericalangle",!0),Q(J,ie,ge,"∁","\\complement",!0),Q(J,ie,ge,"ð","\\eth",!0),Q(ee,te,ge,"ð","ð"),Q(J,ie,ge,"╱","\\diagup"),Q(J,ie,ge,"╲","\\diagdown"),Q(J,ie,ge,"□","\\square"),Q(J,ie,ge,"□","\\Box"),Q(J,ie,ge,"◊","\\Diamond"),Q(J,ie,ge,"¥","\\yen",!0),Q(ee,ie,ge,"¥","\\yen",!0),Q(J,ie,ge,"✓","\\checkmark",!0),Q(ee,ie,ge,"✓","\\checkmark"),Q(J,ie,ge,"ℶ","\\beth",!0),Q(J,ie,ge,"ℸ","\\daleth",!0),Q(J,ie,ge,"ℷ","\\gimel",!0),Q(J,ie,ge,"ϝ","\\digamma",!0),Q(J,ie,ge,"ϰ","\\varkappa"),Q(J,ie,ce,"┌","\\@ulcorner",!0),Q(J,ie,re,"┐","\\@urcorner",!0),Q(J,ie,ce,"└","\\@llcorner",!0),Q(J,ie,re,"┘","\\@lrcorner",!0),Q(J,ie,he,"≦","\\leqq",!0),Q(J,ie,he,"⩽","\\leqslant",!0),Q(J,ie,he,"⪕","\\eqslantless",!0),Q(J,ie,he,"≲","\\lesssim",!0),Q(J,ie,he,"⪅","\\lessapprox",!0),Q(J,ie,he,"≊","\\approxeq",!0),Q(J,ie,oe,"⋖","\\lessdot"),Q(J,ie,he,"⋘","\\lll",!0),Q(J,ie,he,"≶","\\lessgtr",!0),Q(J,ie,he,"⋚","\\lesseqgtr",!0),Q(J,ie,he,"⪋","\\lesseqqgtr",!0),Q(J,ie,he,"≑","\\doteqdot"),Q(J,ie,he,"≓","\\risingdotseq",!0),Q(J,ie,he,"≒","\\fallingdotseq",!0),Q(J,ie,he,"∽","\\backsim",!0),Q(J,ie,he,"⋍","\\backsimeq",!0),Q(J,ie,he,"⫅","\\subseteqq",!0),Q(J,ie,he,"⋐","\\Subset",!0),Q(J,ie,he,"⊏","\\sqsubset",!0),Q(J,ie,he,"≼","\\preccurlyeq",!0),Q(J,ie,he,"⋞","\\curlyeqprec",!0),Q(J,ie,he,"≾","\\precsim",!0),Q(J,ie,he,"⪷","\\precapprox",!0),Q(J,ie,he,"⊲","\\vartriangleleft"),Q(J,ie,he,"⊴","\\trianglelefteq"),Q(J,ie,he,"⊨","\\vDash",!0),Q(J,ie,he,"⊪","\\Vvdash",!0),Q(J,ie,he,"⌣","\\smallsmile"),Q(J,ie,he,"⌢","\\smallfrown"),Q(J,ie,he,"≏","\\bumpeq",!0),Q(J,ie,he,"≎","\\Bumpeq",!0),Q(J,ie,he,"≧","\\geqq",!0),Q(J,ie,he,"⩾","\\geqslant",!0),Q(J,ie,he,"⪖","\\eqslantgtr",!0),Q(J,ie,he,"≳","\\gtrsim",!0),Q(J,ie,he,"⪆","\\gtrapprox",!0),Q(J,ie,oe,"⋗","\\gtrdot"),Q(J,ie,he,"⋙","\\ggg",!0),Q(J,ie,he,"≷","\\gtrless",!0),Q(J,ie,he,"⋛","\\gtreqless",!0),Q(J,ie,he,"⪌","\\gtreqqless",!0),Q(J,ie,he,"≖","\\eqcirc",!0),Q(J,ie,he,"≗","\\circeq",!0),Q(J,ie,he,"≜","\\triangleq",!0),Q(J,ie,he,"∼","\\thicksim"),Q(J,ie,he,"≈","\\thickapprox"),Q(J,ie,he,"⫆","\\supseteqq",!0),Q(J,ie,he,"⋑","\\Supset",!0),Q(J,ie,he,"⊐","\\sqsupset",!0),Q(J,ie,he,"≽","\\succcurlyeq",!0),Q(J,ie,he,"⋟","\\curlyeqsucc",!0),Q(J,ie,he,"≿","\\succsim",!0),Q(J,ie,he,"⪸","\\succapprox",!0),Q(J,ie,he,"⊳","\\vartriangleright"),Q(J,ie,he,"⊵","\\trianglerighteq"),Q(J,ie,he,"⊩","\\Vdash",!0),Q(J,ie,he,"∣","\\shortmid"),Q(J,ie,he,"∥","\\shortparallel"),Q(J,ie,he,"≬","\\between",!0),Q(J,ie,he,"⋔","\\pitchfork",!0),Q(J,ie,he,"∝","\\varpropto"),Q(J,ie,he,"◀","\\blacktriangleleft"),Q(J,ie,he,"∴","\\therefore",!0),Q(J,ie,he,"∍","\\backepsilon"),Q(J,ie,he,"▶","\\blacktriangleright"),Q(J,ie,he,"∵","\\because",!0),Q(J,ie,he,"⋘","\\llless"),Q(J,ie,he,"⋙","\\gggtr"),Q(J,ie,oe,"⊲","\\lhd"),Q(J,ie,oe,"⊳","\\rhd"),Q(J,ie,he,"≂","\\eqsim",!0),Q(J,te,he,"⋈","\\Join"),Q(J,ie,he,"≑","\\Doteq",!0),Q(J,ie,oe,"∔","\\dotplus",!0),Q(J,ie,oe,"∖","\\smallsetminus"),Q(J,ie,oe,"⋒","\\Cap",!0),Q(J,ie,oe,"⋓","\\Cup",!0),Q(J,ie,oe,"⩞","\\doublebarwedge",!0),Q(J,ie,oe,"⊟","\\boxminus",!0),Q(J,ie,oe,"⊞","\\boxplus",!0),Q(J,ie,oe,"⋇","\\divideontimes",!0),Q(J,ie,oe,"⋉","\\ltimes",!0),Q(J,ie,oe,"⋊","\\rtimes",!0),Q(J,ie,oe,"⋋","\\leftthreetimes",!0),Q(J,ie,oe,"⋌","\\rightthreetimes",!0),Q(J,ie,oe,"⋏","\\curlywedge",!0),Q(J,ie,oe,"⋎","\\curlyvee",!0),Q(J,ie,oe,"⊝","\\circleddash",!0),Q(J,ie,oe,"⊛","\\circledast",!0),Q(J,ie,oe,"⋅","\\centerdot"),Q(J,ie,oe,"⊺","\\intercal",!0),Q(J,ie,oe,"⋒","\\doublecap"),Q(J,ie,oe,"⋓","\\doublecup"),Q(J,ie,oe,"⊠","\\boxtimes",!0),Q(J,ie,he,"⇢","\\dashrightarrow",!0),Q(J,ie,he,"⇠","\\dashleftarrow",!0),Q(J,ie,he,"⇇","\\leftleftarrows",!0),Q(J,ie,he,"⇆","\\leftrightarrows",!0),Q(J,ie,he,"⇚","\\Lleftarrow",!0),Q(J,ie,he,"↞","\\twoheadleftarrow",!0),Q(J,ie,he,"↢","\\leftarrowtail",!0),Q(J,ie,he,"↫","\\looparrowleft",!0),Q(J,ie,he,"⇋","\\leftrightharpoons",!0),Q(J,ie,he,"↶","\\curvearrowleft",!0),Q(J,ie,he,"↺","\\circlearrowleft",!0),Q(J,ie,he,"↰","\\Lsh",!0),Q(J,ie,he,"⇈","\\upuparrows",!0),Q(J,ie,he,"↿","\\upharpoonleft",!0),Q(J,ie,he,"⇃","\\downharpoonleft",!0),Q(J,te,he,"⊶","\\origof",!0),Q(J,te,he,"⊷","\\imageof",!0),Q(J,ie,he,"⊸","\\multimap",!0),Q(J,ie,he,"↭","\\leftrightsquigarrow",!0),Q(J,ie,he,"⇉","\\rightrightarrows",!0),Q(J,ie,he,"⇄","\\rightleftarrows",!0),Q(J,ie,he,"↠","\\twoheadrightarrow",!0),Q(J,ie,he,"↣","\\rightarrowtail",!0),Q(J,ie,he,"↬","\\looparrowright",!0),Q(J,ie,he,"↷","\\curvearrowright",!0),Q(J,ie,he,"↻","\\circlearrowright",!0),Q(J,ie,he,"↱","\\Rsh",!0),Q(J,ie,he,"⇊","\\downdownarrows",!0),Q(J,ie,he,"↾","\\upharpoonright",!0),Q(J,ie,he,"⇂","\\downharpoonright",!0),Q(J,ie,he,"⇝","\\rightsquigarrow",!0),Q(J,ie,he,"⇝","\\leadsto"),Q(J,ie,he,"⇛","\\Rrightarrow",!0),Q(J,ie,he,"↾","\\restriction"),Q(J,te,ge,"‘","`"),Q(J,te,ge,"$","\\$"),Q(ee,te,ge,"$","\\$"),Q(ee,te,ge,"$","\\textdollar"),Q(J,te,ge,"%","\\%"),Q(ee,te,ge,"%","\\%"),Q(J,te,ge,"_","\\_"),Q(ee,te,ge,"_","\\_"),Q(ee,te,ge,"_","\\textunderscore"),Q(J,te,ge,"∠","\\angle",!0),Q(J,te,ge,"∞","\\infty",!0),Q(J,te,ge,"′","\\prime"),Q(J,te,ge,"△","\\triangle"),Q(J,te,ge,"Γ","\\Gamma",!0),Q(J,te,ge,"Δ","\\Delta",!0),Q(J,te,ge,"Θ","\\Theta",!0),Q(J,te,ge,"Λ","\\Lambda",!0),Q(J,te,ge,"Ξ","\\Xi",!0),Q(J,te,ge,"Π","\\Pi",!0),Q(J,te,ge,"Σ","\\Sigma",!0),Q(J,te,ge,"Υ","\\Upsilon",!0),Q(J,te,ge,"Φ","\\Phi",!0),Q(J,te,ge,"Ψ","\\Psi",!0),Q(J,te,ge,"Ω","\\Omega",!0),Q(J,te,ge,"A","Α"),Q(J,te,ge,"B","Β"),Q(J,te,ge,"E","Ε"),Q(J,te,ge,"Z","Ζ"),Q(J,te,ge,"H","Η"),Q(J,te,ge,"I","Ι"),Q(J,te,ge,"K","Κ"),Q(J,te,ge,"M","Μ"),Q(J,te,ge,"N","Ν"),Q(J,te,ge,"O","Ο"),Q(J,te,ge,"P","Ρ"),Q(J,te,ge,"T","Τ"),Q(J,te,ge,"X","Χ"),Q(J,te,ge,"¬","\\neg",!0),Q(J,te,ge,"¬","\\lnot"),Q(J,te,ge,"⊤","\\top"),Q(J,te,ge,"⊥","\\bot"),Q(J,te,ge,"∅","\\emptyset"),Q(J,ie,ge,"∅","\\varnothing"),Q(J,te,ae,"α","\\alpha",!0),Q(J,te,ae,"β","\\beta",!0),Q(J,te,ae,"γ","\\gamma",!0),Q(J,te,ae,"δ","\\delta",!0),Q(J,te,ae,"ϵ","\\epsilon",!0),Q(J,te,ae,"ζ","\\zeta",!0),Q(J,te,ae,"η","\\eta",!0),Q(J,te,ae,"θ","\\theta",!0),Q(J,te,ae,"ι","\\iota",!0),Q(J,te,ae,"κ","\\kappa",!0),Q(J,te,ae,"λ","\\lambda",!0),Q(J,te,ae,"μ","\\mu",!0),Q(J,te,ae,"ν","\\nu",!0),Q(J,te,ae,"ξ","\\xi",!0),Q(J,te,ae,"ο","\\omicron",!0),Q(J,te,ae,"π","\\pi",!0),Q(J,te,ae,"ρ","\\rho",!0),Q(J,te,ae,"σ","\\sigma",!0),Q(J,te,ae,"τ","\\tau",!0),Q(J,te,ae,"υ","\\upsilon",!0),Q(J,te,ae,"ϕ","\\phi",!0),Q(J,te,ae,"χ","\\chi",!0),Q(J,te,ae,"ψ","\\psi",!0),Q(J,te,ae,"ω","\\omega",!0),Q(J,te,ae,"ε","\\varepsilon",!0),Q(J,te,ae,"ϑ","\\vartheta",!0),Q(J,te,ae,"ϖ","\\varpi",!0),Q(J,te,ae,"ϱ","\\varrho",!0),Q(J,te,ae,"ς","\\varsigma",!0),Q(J,te,ae,"φ","\\varphi",!0),Q(J,te,oe,"∗","*"),Q(J,te,oe,"+","+"),Q(J,te,oe,"−","-"),Q(J,te,oe,"⋅","\\cdot",!0),Q(J,te,oe,"∘","\\circ"),Q(J,te,oe,"÷","\\div",!0),Q(J,te,oe,"±","\\pm",!0),Q(J,te,oe,"×","\\times",!0),Q(J,te,oe,"∩","\\cap",!0),Q(J,te,oe,"∪","\\cup",!0),Q(J,te,oe,"∖","\\setminus"),Q(J,te,oe,"∧","\\land"),Q(J,te,oe,"∨","\\lor"),Q(J,te,oe,"∧","\\wedge",!0),Q(J,te,oe,"∨","\\vee",!0),Q(J,te,ge,"√","\\surd"),Q(J,te,ce,"⟨","\\langle",!0),Q(J,te,ce,"∣","\\lvert"),Q(J,te,ce,"∥","\\lVert"),Q(J,te,re,"?","?"),Q(J,te,re,"!","!"),Q(J,te,re,"⟩","\\rangle",!0),Q(J,te,re,"∣","\\rvert"),Q(J,te,re,"∥","\\rVert"),Q(J,te,he,"=","="),Q(J,te,he,":",":"),Q(J,te,he,"≈","\\approx",!0),Q(J,te,he,"≅","\\cong",!0),Q(J,te,he,"≥","\\ge"),Q(J,te,he,"≥","\\geq",!0),Q(J,te,he,"←","\\gets"),Q(J,te,he,">","\\gt",!0),Q(J,te,he,"∈","\\in",!0),Q(J,te,he,"","\\@not"),Q(J,te,he,"⊂","\\subset",!0),Q(J,te,he,"⊃","\\supset",!0),Q(J,te,he,"⊆","\\subseteq",!0),Q(J,te,he,"⊇","\\supseteq",!0),Q(J,ie,he,"⊈","\\nsubseteq",!0),Q(J,ie,he,"⊉","\\nsupseteq",!0),Q(J,te,he,"⊨","\\models"),Q(J,te,he,"←","\\leftarrow",!0),Q(J,te,he,"≤","\\le"),Q(J,te,he,"≤","\\leq",!0),Q(J,te,he,"<","\\lt",!0),Q(J,te,he,"→","\\rightarrow",!0),Q(J,te,he,"→","\\to"),Q(J,ie,he,"≱","\\ngeq",!0),Q(J,ie,he,"≰","\\nleq",!0),Q(J,te,de," ","\\ "),Q(J,te,de," ","~"),Q(J,te,de," ","\\space"),Q(J,te,de," ","\\nobreakspace"),Q(ee,te,de," ","\\ "),Q(ee,te,de," "," "),Q(ee,te,de," ","~"),Q(ee,te,de," ","\\space"),Q(ee,te,de," ","\\nobreakspace"),Q(J,te,de,null,"\\nobreak"),Q(J,te,de,null,"\\allowbreak"),Q(J,te,ue,",",","),Q(J,te,ue,";",";"),Q(J,ie,oe,"⊼","\\barwedge",!0),Q(J,ie,oe,"⊻","\\veebar",!0),Q(J,te,oe,"⊙","\\odot",!0),Q(J,te,oe,"⊕","\\oplus",!0),Q(J,te,oe,"⊗","\\otimes",!0),Q(J,te,ge,"∂","\\partial",!0),Q(J,te,oe,"⊘","\\oslash",!0),Q(J,ie,oe,"⊚","\\circledcirc",!0),Q(J,ie,oe,"⊡","\\boxdot",!0),Q(J,te,oe,"△","\\bigtriangleup"),Q(J,te,oe,"▽","\\bigtriangledown"),Q(J,te,oe,"†","\\dagger"),Q(J,te,oe,"⋄","\\diamond"),Q(J,te,oe,"⋆","\\star"),Q(J,te,oe,"◃","\\triangleleft"),Q(J,te,oe,"▹","\\triangleright"),Q(J,te,ce,"{","\\{"),Q(ee,te,ge,"{","\\{"),Q(ee,te,ge,"{","\\textbraceleft"),Q(J,te,re,"}","\\}"),Q(ee,te,ge,"}","\\}"),Q(ee,te,ge,"}","\\textbraceright"),Q(J,te,ce,"{","\\lbrace"),Q(J,te,re,"}","\\rbrace"),Q(J,te,ce,"[","\\lbrack",!0),Q(ee,te,ge,"[","\\lbrack",!0),Q(J,te,re,"]","\\rbrack",!0),Q(ee,te,ge,"]","\\rbrack",!0),Q(J,te,ce,"(","\\lparen",!0),Q(J,te,re,")","\\rparen",!0),Q(ee,te,ge,"<","\\textless",!0),Q(ee,te,ge,">","\\textgreater",!0),Q(J,te,ce,"⌊","\\lfloor",!0),Q(J,te,re,"⌋","\\rfloor",!0),Q(J,te,ce,"⌈","\\lceil",!0),Q(J,te,re,"⌉","\\rceil",!0),Q(J,te,ge,"\\","\\backslash"),Q(J,te,ge,"∣","|"),Q(J,te,ge,"∣","\\vert"),Q(ee,te,ge,"|","\\textbar",!0),Q(J,te,ge,"∥","\\|"),Q(J,te,ge,"∥","\\Vert"),Q(ee,te,ge,"∥","\\textbardbl"),Q(ee,te,ge,"~","\\textasciitilde"),Q(ee,te,ge,"\\","\\textbackslash"),Q(ee,te,ge,"^","\\textasciicircum"),Q(J,te,he,"↑","\\uparrow",!0),Q(J,te,he,"⇑","\\Uparrow",!0),Q(J,te,he,"↓","\\downarrow",!0),Q(J,te,he,"⇓","\\Downarrow",!0),Q(J,te,he,"↕","\\updownarrow",!0),Q(J,te,he,"⇕","\\Updownarrow",!0),Q(J,te,le,"∐","\\coprod"),Q(J,te,le,"⋁","\\bigvee"),Q(J,te,le,"⋀","\\bigwedge"),Q(J,te,le,"⨄","\\biguplus"),Q(J,te,le,"⋂","\\bigcap"),Q(J,te,le,"⋃","\\bigcup"),Q(J,te,le,"∫","\\int"),Q(J,te,le,"∫","\\intop"),Q(J,te,le,"∬","\\iint"),Q(J,te,le,"∭","\\iiint"),Q(J,te,le,"∏","\\prod"),Q(J,te,le,"∑","\\sum"),Q(J,te,le,"⨂","\\bigotimes"),Q(J,te,le,"⨁","\\bigoplus"),Q(J,te,le,"⨀","\\bigodot"),Q(J,te,le,"∮","\\oint"),Q(J,te,le,"∯","\\oiint"),Q(J,te,le,"∰","\\oiiint"),Q(J,te,le,"⨆","\\bigsqcup"),Q(J,te,le,"∫","\\smallint"),Q(ee,te,se,"…","\\textellipsis"),Q(J,te,se,"…","\\mathellipsis"),Q(ee,te,se,"…","\\ldots",!0),Q(J,te,se,"…","\\ldots",!0),Q(J,te,se,"⋯","\\@cdots",!0),Q(J,te,se,"⋱","\\ddots",!0),Q(J,te,ge,"⋮","\\varvdots"),Q(J,te,ne,"ˊ","\\acute"),Q(J,te,ne,"ˋ","\\grave"),Q(J,te,ne,"¨","\\ddot"),Q(J,te,ne,"~","\\tilde"),Q(J,te,ne,"ˉ","\\bar"),Q(J,te,ne,"˘","\\breve"),Q(J,te,ne,"ˇ","\\check"),Q(J,te,ne,"^","\\hat"),Q(J,te,ne,"⃗","\\vec"),Q(J,te,ne,"˙","\\dot"),Q(J,te,ne,"˚","\\mathring"),Q(J,te,ae,"","\\@imath"),Q(J,te,ae,"","\\@jmath"),Q(J,te,ge,"ı","ı"),Q(J,te,ge,"ȷ","ȷ"),Q(ee,te,ge,"ı","\\i",!0),Q(ee,te,ge,"ȷ","\\j",!0),Q(ee,te,ge,"ß","\\ss",!0),Q(ee,te,ge,"æ","\\ae",!0),Q(ee,te,ge,"œ","\\oe",!0),Q(ee,te,ge,"ø","\\o",!0),Q(ee,te,ge,"Æ","\\AE",!0),Q(ee,te,ge,"Œ","\\OE",!0),Q(ee,te,ge,"Ø","\\O",!0),Q(ee,te,ne,"ˊ","\\'"),Q(ee,te,ne,"ˋ","\\`"),Q(ee,te,ne,"ˆ","\\^"),Q(ee,te,ne,"˜","\\~"),Q(ee,te,ne,"ˉ","\\="),Q(ee,te,ne,"˘","\\u"),Q(ee,te,ne,"˙","\\."),Q(ee,te,ne,"˚","\\r"),Q(ee,te,ne,"ˇ","\\v"),Q(ee,te,ne,"¨",'\\"'),Q(ee,te,ne,"˝","\\H"),Q(ee,te,ne,"◯","\\textcircled");var fe={"--":!0,"---":!0,"``":!0,"''":!0};Q(ee,te,ge,"–","--",!0),Q(ee,te,ge,"–","\\textendash"),Q(ee,te,ge,"—","---",!0),Q(ee,te,ge,"—","\\textemdash"),Q(ee,te,ge,"‘","`",!0),Q(ee,te,ge,"‘","\\textquoteleft"),Q(ee,te,ge,"’","'",!0),Q(ee,te,ge,"’","\\textquoteright"),Q(ee,te,ge,"“","``",!0),Q(ee,te,ge,"“","\\textquotedblleft"),Q(ee,te,ge,"”","''",!0),Q(ee,te,ge,"”","\\textquotedblright"),Q(J,te,ge,"°","\\degree",!0),Q(ee,te,ge,"°","\\degree"),Q(ee,te,ge,"°","\\textdegree",!0),Q(J,te,ge,"£","\\pounds"),Q(J,te,ge,"£","\\mathsterling",!0),Q(ee,te,ge,"£","\\pounds"),Q(ee,te,ge,"£","\\textsterling",!0),Q(J,ie,ge,"✠","\\maltese"),Q(ee,ie,ge,"✠","\\maltese");for(var pe='0123456789/@."',me=0;me=5?0:e>=3?1:2]){var i=K[t]={cssEmPerMu:U.quad[t]/18};for(var n in U)U.hasOwnProperty(n)&&(i[n]=U[n][t])}return K[t]}(this.size)),this._fontMetrics},t.getColor=function(){return this.phantom?"transparent":this.color},e}();Pe.BASESIZE=6;var Be=Pe,ze={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},We={ex:!0,em:!0,mu:!0},Ve=function(e){return"string"!=typeof e&&(e=e.unit),e in ze||e in We||"ex"===e},He=function(e,t){var i;if(e.unit in ze)i=ze[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)i=t.fontMetrics().cssEmPerMu;else{var o;if(o=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)i=o.fontMetrics().xHeight;else{if("em"!==e.unit)throw new n("Invalid unit: '"+e.unit+"'");i=o.fontMetrics().quad}o!==t&&(i*=o.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*i,t.maxSize)},$e=function(e,t,i){return X[i][e]&&X[i][e].replace&&(e=X[i][e].replace),{value:e,metrics:q(e,t,i)}},Ue=function(e,t,i,n,o){var r,s=$e(e,t,i),a=s.metrics;if(e=s.value,a){var l=a.italic;("text"===i||n&&"mathit"===n.font)&&(l=0),r=new B(e,a.height,a.depth,l,a.skew,a.width,o)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+i+"'"),r=new B(e,0,0,0,0,0,o);if(n){r.maxFontSize=n.sizeMultiplier,n.style.isTight()&&r.classes.push("mtight");var c=n.getColor();c&&(r.style.color=c)}return r},je=function(e,t){if(A(e.classes)!==A(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var i=e.classes[0];if("mbin"===i||"mord"===i)return!1}for(var n in e.style)if(e.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;for(var o in t.style)if(t.style.hasOwnProperty(o)&&e.style[o]!==t.style[o])return!1;return!0},qe=function(e){for(var t=0,i=0,n=0,o=0;ot&&(t=r.height),r.depth>i&&(i=r.depth),r.maxFontSize>n&&(n=r.maxFontSize)}e.height=t,e.depth=i,e.maxFontSize=n},Ke=function(e,t,i,n){var o=new R(e,t,i,n);return qe(o),o},Ge=function(e,t,i,n){return new R(e,t,i,n)},Ye=function(e){var t=new E(e);return qe(t),t},Ze=function(e,t,i){var n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}return n+"-"+("textbf"===t&&"textit"===i?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},Xe={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Qe={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Je={fontMap:Xe,makeSymbol:Ue,mathsym:function(e,t,i,n){return void 0===n&&(n=[]),"boldsymbol"===i.font&&$e(e,"Main-Bold",t).metrics?Ue(e,"Main-Bold",t,i,n.concat(["mathbf"])):"\\"===e||"main"===X[t][e].font?Ue(e,"Main-Regular",t,i,n):Ue(e,"AMS-Regular",t,i,n.concat(["amsrm"]))},makeSpan:Ke,makeSvgSpan:Ge,makeLineSpan:function(e,t,i){var n=Ke([e],[],t);return n.height=Math.max(i||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),n.style.borderBottomWidth=n.height+"em",n.maxFontSize=1,n},makeAnchor:function(e,t,i,n){var o=new O(e,t,i,n);return qe(o),o},makeFragment:Ye,wrapFragment:function(e,t){return e instanceof E?Ke([],[e],t):e},makeVList:function(e,t){for(var i=function(e){if("individualShift"===e.positionType){for(var t=e.children,i=[t[0]],n=-t[0].shift-t[0].elem.depth,o=n,r=1;r0&&(s.push(xt(a,t)),a=[]),s.push(o[l]));a.length>0&&s.push(xt(a,t)),i?((r=xt(_t(i,t,!0))).classes=["tag"],s.push(r)):n&&s.push(n);var u=dt(["katex-html"],s);if(u.setAttribute("aria-hidden","true"),r){var h=r.children[0];h.style.height=u.height+u.depth+"em",h.style.verticalAlign=-u.depth+"em"}return u}function Dt(e){return new E(e)}var Lt=function(){function e(e,t,i){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=i||[]}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.getAttribute=function(e){return this.attributes[e]},t.toNode=function(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=A(this.classes));for(var i=0;i0&&(e+=' class ="'+u(A(this.classes))+'"'),e+=">";for(var i=0;i"},t.toText=function(){return this.children.map((function(e){return e.toText()})).join("")},e}(),Nt=function(){function e(e){this.text=void 0,this.text=e}var t=e.prototype;return t.toNode=function(){return document.createTextNode(this.text)},t.toMarkup=function(){return u(this.toText())},t.toText=function(){return this.text},e}(),Et={MathNode:Lt,TextNode:Nt,SpaceNode:function(){function e(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?" ":e>=.1666&&e<=.1667?" ":e>=.2222&&e<=.2223?" ":e>=.2777&&e<=.2778?"  ":e>=-.05556&&e<=-.05555?" ⁣":e>=-.1667&&e<=-.1666?" ⁣":e>=-.2223&&e<=-.2222?" ⁣":e>=-.2778&&e<=-.2777?" ⁣":null}var t=e.prototype;return t.toNode=function(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",this.width+"em"),e},t.toMarkup=function(){return this.character?""+this.character+"":''},t.toText=function(){return this.character?this.character:" "},e}(),newDocumentFragment:Dt},At=function(e,t,i){return!X[t][e]||!X[t][e].replace||55349===e.charCodeAt(0)||fe.hasOwnProperty(e)&&i&&(i.fontFamily&&"tt"===i.fontFamily.substr(4,2)||i.font&&"tt"===i.font.substr(4,2))||(e=X[t][e].replace),new Et.TextNode(e)},Mt=function(e){return 1===e.length?e[0]:new Et.MathNode("mrow",e)},It=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var i=t.font;if(!i||"mathnormal"===i)return null;var n=e.mode;if("mathit"===i)return"italic";if("boldsymbol"===i)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===i)return"bold";if("mathbb"===i)return"double-struck";if("mathfrak"===i)return"fraktur";if("mathscr"===i||"mathcal"===i)return"script";if("mathsf"===i)return"sans-serif";if("mathtt"===i)return"monospace";var o=e.text;return l(["\\imath","\\jmath"],o)?null:(X[n][o]&&X[n][o].replace&&(o=X[n][o].replace),q(o,Je.fontMap[i].fontName,n)?Je.fontMap[i].variant:null)},Tt=function(e,t,i){if(1===e.length){var n=Ot(e[0],t);return i&&n instanceof Lt&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}for(var o,r=[],s=0;s0&&(g.text=g.text.slice(0,1)+"̸"+g.text.slice(1),r.pop())}}}r.push(a),o=a}return r},Rt=function(e,t,i){return Mt(Tt(e,t,i))},Ot=function(e,t){if(!e)return new Et.MathNode("mrow");if(at[e.type])return at[e.type](e,t);throw new n("Got group of unknown type: '"+e.type+"'")};function Ft(e,t,i,n,o){var r,s=Tt(e,i);r=1===s.length&&s[0]instanceof Lt&&l(["mrow","mtable"],s[0].type)?s[0]:new Et.MathNode("mrow",s);var a=new Et.MathNode("annotation",[new Et.TextNode(t)]);a.setAttribute("encoding","application/x-tex");var c=new Et.MathNode("semantics",[r,a]),u=new Et.MathNode("math",[c]);return u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&u.setAttribute("display","block"),Je.makeSpan([o?"katex":"katex-mathml"],[u])}var Pt=function(e){return new Be({style:e.displayMode?x.DISPLAY:x.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Bt=function(e,t){if(t.displayMode){var i=["katex-display"];t.leqno&&i.push("leqno"),t.fleqn&&i.push("fleqn"),e=Je.makeSpan(i,[e])}return e},zt={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\\\cdrightarrow":"→","\\\\cdleftarrow":"←","\\\\cdlongequal":"="},Wt={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Vt=function(e){var t=new Et.MathNode("mo",[new Et.TextNode(zt[e])]);return t.setAttribute("stretchy","true"),t},Ht=function(e,t){var i=function(){var i=4e5,n=e.label.substr(1);if(l(["widehat","widecheck","widetilde","utilde"],n)){var o,r,s,a="ordgroup"===(f=e.base).type?f.body.length:1;if(a>5)"widehat"===n||"widecheck"===n?(o=420,i=2364,s=.42,r=n+"4"):(o=312,i=2340,s=.34,r="tilde4");else{var c=[1,1,2,2,3,3][a];"widehat"===n||"widecheck"===n?(i=[0,1062,2364,2364,2364][c],o=[0,239,300,360,420][c],s=[0,.24,.3,.3,.36,.42][c],r=n+c):(i=[0,600,1033,2339,2340][c],o=[0,260,286,306,312][c],s=[0,.26,.286,.3,.306,.34][c],r="tilde"+c)}var u=new W(r),h=new z([u],{width:"100%",height:s+"em",viewBox:"0 0 "+i+" "+o,preserveAspectRatio:"none"});return{span:Je.makeSvgSpan([],[h],t),minWidth:0,height:s}}var d,g,f,p=[],m=Wt[n],_=m[0],v=m[1],b=m[2],y=b/1e3,w=_.length;if(1===w)d=["hide-tail"],g=[m[3]];else if(2===w)d=["halfarrow-left","halfarrow-right"],g=["xMinYMin","xMaxYMin"];else{if(3!==w)throw new Error("Correct katexImagesData or update code here to support\n "+w+" children.");d=["brace-left","brace-center","brace-right"],g=["xMinYMin","xMidYMin","xMaxYMin"]}for(var C=0;C0&&(n.style.minWidth=o+"em"),n};function $t(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function Ut(e){var t=jt(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function jt(e){return e&&("atom"===e.type||Y.hasOwnProperty(e.type))?e:null}var qt=function(e,t){var i,n,o;e&&"supsub"===e.type?(i=(n=$t(e.base,"accent")).base,e.base=i,o=function(e){if(e instanceof R)return e;throw new Error("Expected span but got "+String(e)+".")}(St(e,t)),e.base=n):i=(n=$t(e,"accent")).base;var r=St(i,t.havingCrampedStyle()),s=0;if(n.isShifty&&g(i)){var a=d(i);s=H(St(a,t.havingCrampedStyle())).skew}var l,c=Math.min(r.height,t.fontMetrics().xHeight);if(n.isStretchy)l=Ht(n,t),l=Je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"elem",elem:l,wrapperClasses:["svg-align"],wrapperStyle:s>0?{width:"calc(100% - "+2*s+"em)",marginLeft:2*s+"em"}:void 0}]},t);else{var u,h;"\\vec"===n.label?(u=Je.staticSvg("vec",t),h=Je.svgData.vec[1]):((u=H(u=Je.makeOrd({mode:n.mode,text:n.label},t,"textord"))).italic=0,h=u.width),l=Je.makeSpan(["accent-body"],[u]);var f="\\textcircled"===n.label;f&&(l.classes.push("accent-full"),c=r.height);var p=s;f||(p-=h/2),l.style.left=p+"em","\\textcircled"===n.label&&(l.style.top=".2em"),l=Je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:-c},{type:"elem",elem:l}]},t)}var m=Je.makeSpan(["mord","accent"],[l],t);return o?(o.children[0]=m,o.height=Math.max(m.height,o.height),o.classes[0]="mord",o):m},Kt=function(e,t){var i=e.isStretchy?Vt(e.label):new Et.MathNode("mo",[At(e.label,e.mode)]),n=new Et.MathNode("mover",[Ot(e.base,t),i]);return n.setAttribute("accent","true"),n},Gt=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((function(e){return"\\"+e})).join("|"));lt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:function(e,t){var i=ut(t[0]),n=!Gt.test(e.funcName),o=!n||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:o,base:i}},htmlBuilder:qt,mathmlBuilder:Kt}),lt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!1,argTypes:["primitive"]},handler:function(e,t){var i=t[0];return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:!1,isShifty:!0,base:i}},htmlBuilder:qt,mathmlBuilder:Kt}),lt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(e,t){var i=e.parser,n=e.funcName,o=t[0];return{type:"accentUnder",mode:i.mode,label:n,base:o}},htmlBuilder:function(e,t){var i=St(e.base,t),n=Ht(e,t),o="\\utilde"===e.label?.12:0,r=Je.makeVList({positionType:"top",positionData:i.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:o},{type:"elem",elem:i}]},t);return Je.makeSpan(["mord","accentunder"],[r],t)},mathmlBuilder:function(e,t){var i=Vt(e.label),n=new Et.MathNode("munder",[Ot(e.base,t),i]);return n.setAttribute("accentunder","true"),n}});var Yt=function(e){var t=new Et.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};lt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler:function(e,t,i){var n=e.parser,o=e.funcName;return{type:"xArrow",mode:n.mode,label:o,body:t[0],below:i[0]}},htmlBuilder:function(e,t){var i,n=t.style,o=t.havingStyle(n.sup()),r=Je.wrapFragment(St(e.body,o,t),t),s="\\x"===e.label.slice(0,2)?"x":"cd";r.classes.push(s+"-arrow-pad"),e.below&&(o=t.havingStyle(n.sub()),(i=Je.wrapFragment(St(e.below,o,t),t)).classes.push(s+"-arrow-pad"));var a,l=Ht(e,t),c=-t.fontMetrics().axisHeight+.5*l.height,u=-t.fontMetrics().axisHeight-.5*l.height-.111;if((r.depth>.25||"\\xleftequilibrium"===e.label)&&(u-=r.depth),i){var h=-t.fontMetrics().axisHeight+i.height+.5*l.height+.111;a=Je.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:u},{type:"elem",elem:l,shift:c},{type:"elem",elem:i,shift:h}]},t)}else a=Je.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:u},{type:"elem",elem:l,shift:c}]},t);return a.children[0].children[0].children[1].classes.push("svg-align"),Je.makeSpan(["mrel","x-arrow"],[a],t)},mathmlBuilder:function(e,t){var i,n=Vt(e.label);if(n.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var o=Yt(Ot(e.body,t));if(e.below){var r=Yt(Ot(e.below,t));i=new Et.MathNode("munderover",[n,r,o])}else i=new Et.MathNode("mover",[n,o])}else if(e.below){var s=Yt(Ot(e.below,t));i=new Et.MathNode("munder",[n,s])}else i=Yt(),i=new Et.MathNode("mover",[n,i]);return i}});var Zt={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Xt=function(e){return"textord"===e.type&&"@"===e.text};function Qt(e,t,i){var n=Zt[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return i.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var o={type:"atom",text:n,mode:"math",family:"rel"},r={type:"ordgroup",mode:"math",body:[i.callFunction("\\\\cdleft",[t[0]],[]),i.callFunction("\\Big",[o],[]),i.callFunction("\\\\cdright",[t[1]],[])]};return i.callFunction("\\\\cdparent",[r],[]);case"\\\\cdlongequal":return i.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return i.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}lt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler:function(e,t){var i=e.parser,n=e.funcName;return{type:"cdlabel",mode:i.mode,side:n.slice(4),label:t[0]}},htmlBuilder:function(e,t){var i=t.havingStyle(t.style.sup()),n=Je.wrapFragment(St(e.label,i,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=.8-n.depth+"em",n.height=0,n.depth=0,n},mathmlBuilder:function(e,t){var i=new Et.MathNode("mrow",[Ot(e.label,t)]);return(i=new Et.MathNode("mpadded",[i])).setAttribute("width","0"),"left"===e.side&&i.setAttribute("lspace","-1width"),i.setAttribute("voffset","0.7em"),(i=new Et.MathNode("mstyle",[i])).setAttribute("displaystyle","false"),i.setAttribute("scriptlevel","1"),i}}),lt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler:function(e,t){return{type:"cdlabelparent",mode:e.parser.mode,fragment:t[0]}},htmlBuilder:function(e,t){var i=Je.wrapFragment(St(e.fragment,t),t);return i.classes.push("cd-vert-arrow"),i},mathmlBuilder:function(e,t){return new Et.MathNode("mrow",[Ot(e.fragment,t)])}}),lt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){for(var i=e.parser,o=$t(t[0],"ordgroup").body,r="",s=0;s","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],bi=[0,1.2,1.8,2.4,3],yi=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],wi=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"stack"}],Ci=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Si=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},xi=function(e,t,i,n){for(var o=Math.min(2,3-n.style.size);ot)return i[o]}return i[i.length-1]},ki=function(e,t,i,n,o,r){var s;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),s=l(vi,e)?yi:l(mi,e)?Ci:wi;var a=xi(e,t,s,n);return"small"===a.type?function(e,t,i,n,o,r){var s=Je.makeSymbol(e,"Main-Regular",o,n),a=ri(s,t,n,r);return i&&si(a,n,t),a}(e,a.style,i,n,o,r):"large"===a.type?ai(e,a.size,i,n,o,r):gi(e,t,i,n,o,r)},Di=function(e,t,i,o,r){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),l(mi,e)||l(vi,e))return ai(e,t,!1,i,o,r);if(l(_i,e))return gi(e,bi[t],!1,i,o,r);throw new n("Illegal delimiter: '"+e+"'")},Li=bi,Ni=ki,Ei=function(e,t,i,n,o,r){var s=n.fontMetrics().axisHeight*n.sizeMultiplier,a=5/n.fontMetrics().ptPerEm,l=Math.max(t-s,i+s),c=Math.max(l/500*901,2*l-a);return ki(e,c,!0,n,o,r)},Ai={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Mi=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Ii(e,t){var i=jt(e);if(i&&l(Mi,i.text))return i;throw new n(i?"Invalid delimiter '"+i.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function Ti(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}lt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:function(e,t){var i=Ii(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Ai[e.funcName].size,mclass:Ai[e.funcName].mclass,delim:i.text}},htmlBuilder:function(e,t){return"."===e.delim?Je.makeSpan([e.mclass]):Di(e.delim,e.size,t,e.mode,[e.mclass])},mathmlBuilder:function(e){var t=[];"."!==e.delim&&t.push(At(e.delim,e.mode));var i=new Et.MathNode("mo",t);return"mopen"===e.mclass||"mclose"===e.mclass?i.setAttribute("fence","true"):i.setAttribute("fence","false"),i.setAttribute("stretchy","true"),i.setAttribute("minsize",Li[e.size]+"em"),i.setAttribute("maxsize",Li[e.size]+"em"),i}}),lt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:function(e,t){var i=e.parser.gullet.macros.get("\\current@color");if(i&&"string"!=typeof i)throw new n("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Ii(t[0],e).text,color:i}}}),lt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:function(e,t){var i=Ii(t[0],e),n=e.parser;++n.leftrightDepth;var o=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var r=$t(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:o,left:i.text,right:r.delim,rightColor:r.color}},htmlBuilder:function(e,t){Ti(e);for(var i,n,o=_t(e.body,t,!0,["mopen","mclose"]),r=0,s=0,a=!1,l=0;l-1?"mpadded":"menclose",[Ot(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(i=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*i+"pt"),n.setAttribute("height","+"+2*i+"pt"),n.setAttribute("lspace",i+"pt"),n.setAttribute("voffset",i+"pt"),"\\fcolorbox"===e.label){var o=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+o+"em solid "+String(e.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};lt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler:function(e,t,i){var n=e.parser,o=e.funcName,r=$t(t[0],"color-token").color,s=t[1];return{type:"enclose",mode:n.mode,label:o,backgroundColor:r,body:s}},htmlBuilder:Ri,mathmlBuilder:Oi}),lt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler:function(e,t,i){var n=e.parser,o=e.funcName,r=$t(t[0],"color-token").color,s=$t(t[1],"color-token").color,a=t[2];return{type:"enclose",mode:n.mode,label:o,backgroundColor:s,borderColor:r,body:a}},htmlBuilder:Ri,mathmlBuilder:Oi}),lt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(e,t){return{type:"enclose",mode:e.parser.mode,label:"\\fbox",body:t[0]}}}),lt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler:function(e,t){var i=e.parser,n=e.funcName,o=t[0];return{type:"enclose",mode:i.mode,label:n,body:o}},htmlBuilder:Ri,mathmlBuilder:Oi}),lt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler:function(e,t){return{type:"enclose",mode:e.parser.mode,label:"\\angl",body:t[0]}}});var Fi={};function Pi(e){for(var t=e.type,i=e.names,n=e.props,o=e.handler,r=e.htmlBuilder,s=e.mathmlBuilder,a={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:o},l=0;l0&&(b+=.25),u.push({pos:b,isDashed:e[t]})}for(y(s[0]),i=0;i0&&(S<(N+=v)&&(S=N),N=0),e.addJot&&(S+=p),k.height=C,k.depth=S,b+=C,k.pos=b,b+=S+N,l[i]=k,y(s[i+1])}var E,A,M=b/2+t.fontMetrics().axisHeight,I=e.cols||[],T=[],R=[];if(e.addEqnNum)for(i=0;i=a)){var H=void 0;(o>0||e.hskipBeforeAndAfter)&&0!==(H=c(B.pregap,g))&&((E=Je.makeSpan(["arraycolsep"],[])).style.width=H+"em",T.push(E));var $=[];for(i=0;i0){for(var K=Je.makeLineSpan("hline",t,h),G=Je.makeLineSpan("hdashline",t,h),Y=[{type:"elem",elem:l,shift:0}];u.length>0;){var Z=u.pop(),X=Z.pos-M;Z.isDashed?Y.push({type:"elem",elem:G,shift:X}):Y.push({type:"elem",elem:K,shift:X})}l=Je.makeVList({positionType:"individualShift",children:Y},t)}if(e.addEqnNum){var Q=Je.makeVList({positionType:"individualShift",children:R},t);return Q=Je.makeSpan(["tag"],[Q],t),Je.makeFragment([l,Q])}return Je.makeSpan(["mord"],[l],t)},$i={c:"center ",l:"left ",r:"right "},Ui=function(e,t){for(var i=[],n=new Et.MathNode("mtd",[],["mtr-glue"]),o=new Et.MathNode("mtd",[],["mml-eqn-num"]),r=0;r0){var g=e.cols,f="",p=!1,m=0,_=g.length;"separator"===g[0].type&&(h+="top ",m=1),"separator"===g[g.length-1].type&&(h+="bottom ",_-=1);for(var v=m;v<_;v++)"align"===g[v].type?(d+=$i[g[v].align],p&&(f+="none "),p=!0):"separator"===g[v].type&&p&&(f+="|"===g[v].separator?"solid ":"dashed ",p=!1);c.setAttribute("columnalign",d.trim()),/[sd]/.test(f)&&c.setAttribute("columnlines",f.trim())}if("align"===e.colSeparationType){for(var b=e.cols||[],y="",w=1;w0?"left ":"",h+=S[S.length-1].length>0?"right ":"";for(var x=1;x-1?"alignat":"align",s=Wi(e.parser,{cols:o,addJot:!0,addEqnNum:"align"===e.envName||"alignat"===e.envName,colSeparationType:r,maxNumCols:"split"===e.envName?2:void 0,leqno:e.parser.settings.leqno},"display"),a=0,l={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var c="",u=0;u0&&h&&(f=1),o[d]={type:"align",align:g,pregap:f,postgap:0}}return s.colSeparationType=h?"align":"alignat",s};Pi({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(e,t){var i=(jt(t[0])?[t[0]]:$t(t[0],"ordgroup").body).map((function(e){var t=Ut(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new n("Unknown column alignment: "+t,e)})),o={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return Wi(e.parser,o,Vi(e.envName))},htmlBuilder:Hi,mathmlBuilder:Ui}),Pi({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler:function(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],i="c",o={hskipBeforeAndAfter:!1,cols:[{type:"align",align:i}]};if("*"===e.envName.charAt(e.envName.length-1)){var r=e.parser;if(r.consumeSpaces(),"["===r.fetch().text){if(r.consume(),r.consumeSpaces(),i=r.fetch().text,-1==="lcr".indexOf(i))throw new n("Expected l or c or r",r.nextToken);r.consume(),r.consumeSpaces(),r.expect("]"),r.consume(),o.cols=[{type:"align",align:i}]}}var s=Wi(e.parser,o,Vi(e.envName));return s.cols=new Array(s.body[0].length).fill({type:"align",align:i}),t?{type:"leftright",mode:e.mode,body:[s],left:t[0],right:t[1],rightColor:void 0}:s},htmlBuilder:Hi,mathmlBuilder:Ui}),Pi({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(e){var t=Wi(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:Hi,mathmlBuilder:Ui}),Pi({type:"array",names:["subarray"],props:{numArgs:1},handler:function(e,t){var i=(jt(t[0])?[t[0]]:$t(t[0],"ordgroup").body).map((function(e){var t=Ut(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new n("Unknown column alignment: "+t,e)}));if(i.length>1)throw new n("{subarray} can contain only one column");var o={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if((o=Wi(e.parser,o,"script")).body.length>0&&o.body[0].length>1)throw new n("{subarray} can contain only one column");return o},htmlBuilder:Hi,mathmlBuilder:Ui}),Pi({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler:function(e){var t=Wi(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},Vi(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Hi,mathmlBuilder:Ui}),Pi({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:ji,htmlBuilder:Hi,mathmlBuilder:Ui}),Pi({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler:function(e){l(["gather","gather*"],e.envName)&&zi(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",addEqnNum:"gather"===e.envName,leqno:e.parser.settings.leqno};return Wi(e.parser,t,"display")},htmlBuilder:Hi,mathmlBuilder:Ui}),Pi({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:ji,htmlBuilder:Hi,mathmlBuilder:Ui}),Pi({type:"array",names:["equation","equation*"],props:{numArgs:0},handler:function(e){zi(e);var t={addEqnNum:"equation"===e.envName,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Wi(e.parser,t,"display")},htmlBuilder:Hi,mathmlBuilder:Ui}),Pi({type:"array",names:["CD"],props:{numArgs:0},handler:function(e){return zi(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var i=e.fetch().text;if("&"!==i&&"\\\\"!==i){if("\\end"===i){0===t[t.length-1].length&&t.pop();break}throw new n("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var o,r,s=[],a=[s],l=0;l-1);else{if(!("<>AV".indexOf(d)>-1))throw new n('Expected one of "<>AV=|." after @',c[h]);for(var f=0;f<2;f++){for(var p=!0,m=h+1;m=x.SCRIPT.id?i.text():x.DISPLAY:"text"===e&&i.size===x.DISPLAY.size?i=x.TEXT:"script"===e?i=x.SCRIPT:"scriptscript"===e&&(i=x.SCRIPTSCRIPT),i},tn=function(e,t){var i,n=en(e.size,t.style),o=n.fracNum(),r=n.fracDen();i=t.havingStyle(o);var s=St(e.numer,i,t);if(e.continued){var a=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;s.height=s.height0?3*h:7*h,f=t.fontMetrics().denom1):(u>0?(d=t.fontMetrics().num2,g=h):(d=t.fontMetrics().num3,g=3*h),f=t.fontMetrics().denom2),c){var y=t.fontMetrics().axisHeight;d-s.depth-(y+.5*u)0&&(t="."===(t=e)?null:t),t};lt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler:function(e,t){var i,n=e.parser,o=t[4],r=t[5],s=ut(t[0]),a="atom"===s.type&&"open"===s.family?rn(s.text):null,l=ut(t[1]),c="atom"===l.type&&"close"===l.family?rn(l.text):null,u=$t(t[2],"size"),h=null;i=!!u.isBlank||(h=u.value).number>0;var d="auto",g=t[3];if("ordgroup"===g.type){if(g.body.length>0){var f=$t(g.body[0],"textord");d=on[Number(f.text)]}}else g=$t(g,"textord"),d=on[Number(g.text)];return{type:"genfrac",mode:n.mode,numer:o,denom:r,continued:!1,hasBarLine:i,barSize:h,leftDelim:a,rightDelim:c,size:d}},htmlBuilder:tn,mathmlBuilder:nn}),lt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(e,t){var i=e.parser,n=(e.funcName,e.token);return{type:"infix",mode:i.mode,replaceWith:"\\\\abovefrac",size:$t(t[0],"size").value,token:n}}}),lt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(e,t){var i=e.parser,n=(e.funcName,t[0]),o=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}($t(t[1],"infix").size),r=t[2],s=o.number>0;return{type:"genfrac",mode:i.mode,numer:n,denom:r,continued:!1,hasBarLine:s,barSize:o,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:tn,mathmlBuilder:nn});var sn=function(e,t){var i,n,o=t.style;"supsub"===e.type?(i=e.sup?St(e.sup,t.havingStyle(o.sup()),t):St(e.sub,t.havingStyle(o.sub()),t),n=$t(e.base,"horizBrace")):n=$t(e,"horizBrace");var r,s=St(n.base,t.havingBaseStyle(x.DISPLAY)),a=Ht(n,t);if(n.isOver?(r=Je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(r=Je.makeVList({positionType:"bottom",positionData:s.depth+.1+a.height,children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s}]},t)).children[0].children[0].children[0].classes.push("svg-align"),i){var l=Je.makeSpan(["mord",n.isOver?"mover":"munder"],[r],t);r=n.isOver?Je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:i}]},t):Je.makeVList({positionType:"bottom",positionData:l.depth+.2+i.height+i.depth,children:[{type:"elem",elem:i},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return Je.makeSpan(["mord",n.isOver?"mover":"munder"],[r],t)};lt({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(e,t){var i=e.parser,n=e.funcName;return{type:"horizBrace",mode:i.mode,label:n,isOver:/^\\over/.test(n),base:t[0]}},htmlBuilder:sn,mathmlBuilder:function(e,t){var i=Vt(e.label);return new Et.MathNode(e.isOver?"mover":"munder",[Ot(e.base,t),i])}}),lt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(e,t){var i=e.parser,n=t[1],o=$t(t[0],"url").url;return i.settings.isTrusted({command:"\\href",url:o})?{type:"href",mode:i.mode,href:o,body:ht(n)}:i.formatUnsupportedCmd("\\href")},htmlBuilder:function(e,t){var i=_t(e.body,t,!1);return Je.makeAnchor(e.href,[],i,t)},mathmlBuilder:function(e,t){var i=Rt(e.body,t);return i instanceof Lt||(i=new Lt("mrow",[i])),i.setAttribute("href",e.href),i}}),lt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(e,t){var i=e.parser,n=$t(t[0],"url").url;if(!i.settings.isTrusted({command:"\\url",url:n}))return i.formatUnsupportedCmd("\\url");for(var o=[],r=0;r0&&(n=He(e.totalheight,t)-i,n=Number(n.toFixed(2)));var o=0;e.width.number>0&&(o=He(e.width,t));var r={height:i+n+"em"};o>0&&(r.width=o+"em"),n>0&&(r.verticalAlign=-n+"em");var s=new F(e.src,e.alt,r);return s.height=i,s.depth=n,s},mathmlBuilder:function(e,t){var i=new Et.MathNode("mglyph",[]);i.setAttribute("alt",e.alt);var n=He(e.height,t),o=0;if(e.totalheight.number>0&&(o=(o=He(e.totalheight,t)-n).toFixed(2),i.setAttribute("valign","-"+o+"em")),i.setAttribute("height",n+o+"em"),e.width.number>0){var r=He(e.width,t);i.setAttribute("width",r+"em")}return i.setAttribute("src",e.src),i}}),lt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler:function(e,t){var i=e.parser,n=e.funcName,o=$t(t[0],"size");if(i.settings.strict){var r="m"===n[1],s="mu"===o.value.unit;r?(s||i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, not "+o.value.unit+" units"),"math"!==i.mode&&i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):s&&i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:i.mode,dimension:o.value}},htmlBuilder:function(e,t){return Je.makeGlue(e.dimension,t)},mathmlBuilder:function(e,t){var i=He(e.dimension,t);return new Et.SpaceNode(i)}}),lt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var i=e.parser,n=e.funcName,o=t[0];return{type:"lap",mode:i.mode,alignment:n.slice(5),body:o}},htmlBuilder:function(e,t){var i;"clap"===e.alignment?(i=Je.makeSpan([],[St(e.body,t)]),i=Je.makeSpan(["inner"],[i],t)):i=Je.makeSpan(["inner"],[St(e.body,t)]);var n=Je.makeSpan(["fix"],[]),o=Je.makeSpan([e.alignment],[i,n],t),r=Je.makeSpan(["strut"]);return r.style.height=o.height+o.depth+"em",r.style.verticalAlign=-o.depth+"em",o.children.unshift(r),o=Je.makeSpan(["thinbox"],[o],t),Je.makeSpan(["mord","vbox"],[o],t)},mathmlBuilder:function(e,t){var i=new Et.MathNode("mpadded",[Ot(e.body,t)]);if("rlap"!==e.alignment){var n="llap"===e.alignment?"-1":"-0.5";i.setAttribute("lspace",n+"width")}return i.setAttribute("width","0px"),i}}),lt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(e,t){var i=e.funcName,n=e.parser,o=n.mode;n.switchMode("math");var r="\\("===i?"\\)":"$",s=n.parseExpression(!1,r);return n.expect(r),n.switchMode(o),{type:"styling",mode:n.mode,style:"text",body:s}}}),lt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(e,t){throw new n("Mismatched "+e.funcName)}});var ln=function(e,t){switch(t.style.size){case x.DISPLAY.size:return e.display;case x.TEXT.size:return e.text;case x.SCRIPT.size:return e.script;case x.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};lt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:function(e,t){return{type:"mathchoice",mode:e.parser.mode,display:ht(t[0]),text:ht(t[1]),script:ht(t[2]),scriptscript:ht(t[3])}},htmlBuilder:function(e,t){var i=ln(e,t),n=_t(i,t,!1);return Je.makeFragment(n)},mathmlBuilder:function(e,t){var i=ln(e,t);return Rt(i,t)}});var cn=function(e,t,i,n,o,r,s){var a,l,c;if(e=Je.makeSpan([],[e]),t){var u=St(t,n.havingStyle(o.sup()),n);l={elem:u,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-u.depth)}}if(i){var h=St(i,n.havingStyle(o.sub()),n);a={elem:h,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-h.height)}}if(l&&a){var d=n.fontMetrics().bigOpSpacing5+a.elem.height+a.elem.depth+a.kern+e.depth+s;c=Je.makeVList({positionType:"bottom",positionData:d,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:a.elem,marginLeft:-r+"em"},{type:"kern",size:a.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:r+"em"},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(a){var g=e.height-s;c=Je.makeVList({positionType:"top",positionData:g,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:a.elem,marginLeft:-r+"em"},{type:"kern",size:a.kern},{type:"elem",elem:e}]},n)}else{if(!l)return e;var f=e.depth+s;c=Je.makeVList({positionType:"bottom",positionData:f,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:r+"em"},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}return Je.makeSpan(["mop","op-limits"],[c],n)},un=["\\smallint"],hn=function(e,t){var i,n,o,r=!1;"supsub"===e.type?(i=e.sup,n=e.sub,o=$t(e.base,"op"),r=!0):o=$t(e,"op");var s,a=t.style,c=!1;if(a.size===x.DISPLAY.size&&o.symbol&&!l(un,o.name)&&(c=!0),o.symbol){var u=c?"Size2-Regular":"Size1-Regular",h="";if("\\oiint"!==o.name&&"\\oiiint"!==o.name||(h=o.name.substr(1),o.name="oiint"===h?"\\iint":"\\iiint"),s=Je.makeSymbol(o.name,u,"math",t,["mop","op-symbol",c?"large-op":"small-op"]),h.length>0){var d=s.italic,g=Je.staticSvg(h+"Size"+(c?"2":"1"),t);s=Je.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:0},{type:"elem",elem:g,shift:c?.08:0}]},t),o.name="\\"+h,s.classes.unshift("mop"),s.italic=d}}else if(o.body){var f=_t(o.body,t,!0);1===f.length&&f[0]instanceof B?(s=f[0]).classes[0]="mop":s=Je.makeSpan(["mop"],f,t)}else{for(var p=[],m=1;m0){for(var a=o.body.map((function(e){var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e})),l=_t(a,t.withFont("mathrm"),!0),c=0;c=0?a.setAttribute("height","+"+o+"em"):(a.setAttribute("height",o+"em"),a.setAttribute("depth","+"+-o+"em")),a.setAttribute("voffset",o+"em"),a}});var _n=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];lt({type:"sizing",names:_n,props:{numArgs:0,allowedInText:!0},handler:function(e,t){var i=e.breakOnTokenText,n=e.funcName,o=e.parser,r=o.parseExpression(!1,i);return{type:"sizing",mode:o.mode,size:_n.indexOf(n)+1,body:r}},htmlBuilder:function(e,t){var i=t.havingSize(e.size);return mn(e.body,i,t)},mathmlBuilder:function(e,t){var i=t.havingSize(e.size),n=Tt(e.body,i),o=new Et.MathNode("mstyle",n);return o.setAttribute("mathsize",i.sizeMultiplier+"em"),o}}),lt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(e,t,i){var n=e.parser,o=!1,r=!1,s=i[0]&&$t(i[0],"ordgroup");if(s)for(var a="",l=0;li.height+i.depth+r&&(r=(r+u-i.height-i.depth)/2);var h=a.height-i.height-r-l;i.style.paddingLeft=c+"em";var d=Je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i,wrapperClasses:["svg-align"]},{type:"kern",size:-(i.height+h)},{type:"elem",elem:a},{type:"kern",size:l}]},t);if(e.index){var g=t.havingStyle(x.SCRIPTSCRIPT),f=St(e.index,g,t),p=.6*(d.height-d.depth),m=Je.makeVList({positionType:"shift",positionData:-p,children:[{type:"elem",elem:f}]},t),_=Je.makeSpan(["root"],[m]);return Je.makeSpan(["mord","sqrt"],[_,d],t)}return Je.makeSpan(["mord","sqrt"],[d],t)},mathmlBuilder:function(e,t){var i=e.body,n=e.index;return n?new Et.MathNode("mroot",[Ot(i,t),Ot(n,t)]):new Et.MathNode("msqrt",[Ot(i,t)])}});var vn={display:x.DISPLAY,text:x.TEXT,script:x.SCRIPT,scriptscript:x.SCRIPTSCRIPT};lt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e,t){var i=e.breakOnTokenText,n=e.funcName,o=e.parser,r=o.parseExpression(!0,i),s=n.slice(1,n.length-5);return{type:"styling",mode:o.mode,style:s,body:r}},htmlBuilder:function(e,t){var i=vn[e.style],n=t.havingStyle(i).withFont("");return mn(e.body,n,t)},mathmlBuilder:function(e,t){var i=vn[e.style],n=t.havingStyle(i),o=Tt(e.body,n),r=new Et.MathNode("mstyle",o),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return r.setAttribute("scriptlevel",s[0]),r.setAttribute("displaystyle",s[1]),r}});ct({type:"supsub",htmlBuilder:function(e,t){var i=function(e,t){var i=e.base;return i?"op"===i.type?i.limits&&(t.style.size===x.DISPLAY.size||i.alwaysHandleSupSub)?hn:null:"operatorname"===i.type?i.alwaysHandleSupSub&&(t.style.size===x.DISPLAY.size||i.limits)?pn:null:"accent"===i.type?g(i.base)?qt:null:"horizBrace"===i.type&&!e.sub===i.isOver?sn:null:null}(e,t);if(i)return i(e,t);var n,o,r,s=e.base,a=e.sup,l=e.sub,c=St(s,t),u=t.fontMetrics(),h=0,d=0,f=s&&g(s);if(a){var p=t.havingStyle(t.style.sup());n=St(a,p,t),f||(h=c.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(l){var m=t.havingStyle(t.style.sub());o=St(l,m,t),f||(d=c.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}r=t.style===x.DISPLAY?u.sup1:t.style.cramped?u.sup3:u.sup2;var _,v=t.sizeMultiplier,b=.5/u.ptPerEm/v+"em",y=null;if(o){var w=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(c instanceof B||w)&&(y=-c.italic+"em")}if(n&&o){h=Math.max(h,r,n.depth+.25*u.xHeight),d=Math.max(d,u.sub2);var C=4*u.defaultRuleThickness;if(h-n.depth-(o.height-d)0&&(h+=S,d-=S)}_=Je.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:d,marginRight:b,marginLeft:y},{type:"elem",elem:n,shift:-h,marginRight:b}]},t)}else if(o){d=Math.max(d,u.sub1,o.height-.8*u.xHeight),_=Je.makeVList({positionType:"shift",positionData:d,children:[{type:"elem",elem:o,marginLeft:y,marginRight:b}]},t)}else{if(!n)throw new Error("supsub must have either sup or sub.");h=Math.max(h,r,n.depth+.25*u.xHeight),_=Je.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:n,marginRight:b}]},t)}var k=wt(c,"right")||"mord";return Je.makeSpan([k],[c,Je.makeSpan(["msupsub"],[_])],t)},mathmlBuilder:function(e,t){var i,n=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(n=!0,i=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var o,r=[Ot(e.base,t)];if(e.sub&&r.push(Ot(e.sub,t)),e.sup&&r.push(Ot(e.sup,t)),n)o=i?"mover":"munder";else if(e.sub)if(e.sup){var s=e.base;o=s&&"op"===s.type&&s.limits&&t.style===x.DISPLAY||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(t.style===x.DISPLAY||s.limits)?"munderover":"msubsup"}else{var a=e.base;o=a&&"op"===a.type&&a.limits&&(t.style===x.DISPLAY||a.alwaysHandleSupSub)||a&&"operatorname"===a.type&&a.alwaysHandleSupSub&&(a.limits||t.style===x.DISPLAY)?"munder":"msub"}else{var l=e.base;o=l&&"op"===l.type&&l.limits&&(t.style===x.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===x.DISPLAY)?"mover":"msup"}return new Et.MathNode(o,r)}}),ct({type:"atom",htmlBuilder:function(e,t){return Je.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder:function(e,t){var i=new Et.MathNode("mo",[At(e.text,e.mode)]);if("bin"===e.family){var n=It(e,t);"bold-italic"===n&&i.setAttribute("mathvariant",n)}else"punct"===e.family?i.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||i.setAttribute("stretchy","false");return i}});var bn={mi:"italic",mn:"normal",mtext:"normal"};ct({type:"mathord",htmlBuilder:function(e,t){return Je.makeOrd(e,t,"mathord")},mathmlBuilder:function(e,t){var i=new Et.MathNode("mi",[At(e.text,e.mode,t)]),n=It(e,t)||"italic";return n!==bn[i.type]&&i.setAttribute("mathvariant",n),i}}),ct({type:"textord",htmlBuilder:function(e,t){return Je.makeOrd(e,t,"textord")},mathmlBuilder:function(e,t){var i,n=At(e.text,e.mode,t),o=It(e,t)||"normal";return i="text"===e.mode?new Et.MathNode("mtext",[n]):/[0-9]/.test(e.text)?new Et.MathNode("mn",[n]):"\\prime"===e.text?new Et.MathNode("mo",[n]):new Et.MathNode("mi",[n]),o!==bn[i.type]&&i.setAttribute("mathvariant",o),i}});var yn={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},wn={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};ct({type:"spacing",htmlBuilder:function(e,t){if(wn.hasOwnProperty(e.text)){var i=wn[e.text].className||"";if("text"===e.mode){var o=Je.makeOrd(e,t,"textord");return o.classes.push(i),o}return Je.makeSpan(["mspace",i],[Je.mathsym(e.text,e.mode,t)],t)}if(yn.hasOwnProperty(e.text))return Je.makeSpan(["mspace",yn[e.text]],[],t);throw new n('Unknown type of space "'+e.text+'"')},mathmlBuilder:function(e,t){if(!wn.hasOwnProperty(e.text)){if(yn.hasOwnProperty(e.text))return new Et.MathNode("mspace");throw new n('Unknown type of space "'+e.text+'"')}return new Et.MathNode("mtext",[new Et.TextNode(" ")])}});var Cn=function(){var e=new Et.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};ct({type:"tag",mathmlBuilder:function(e,t){var i=new Et.MathNode("mtable",[new Et.MathNode("mtr",[Cn(),new Et.MathNode("mtd",[Rt(e.body,t)]),Cn(),new Et.MathNode("mtd",[Rt(e.tag,t)])])]);return i.setAttribute("width","100%"),i}});var Sn={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},xn={"\\textbf":"textbf","\\textmd":"textmd"},kn={"\\textit":"textit","\\textup":"textup"},Dn=function(e,t){var i=e.font;return i?Sn[i]?t.withTextFontFamily(Sn[i]):xn[i]?t.withTextFontWeight(xn[i]):t.withTextFontShape(kn[i]):t};lt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler:function(e,t){var i=e.parser,n=e.funcName,o=t[0];return{type:"text",mode:i.mode,body:ht(o),font:n}},htmlBuilder:function(e,t){var i=Dn(e,t),n=_t(e.body,i,!0);return Je.makeSpan(["mord","text"],n,i)},mathmlBuilder:function(e,t){var i=Dn(e,t);return Rt(e.body,i)}}),lt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){return{type:"underline",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var i=St(e.body,t),n=Je.makeLineSpan("underline-line",t),o=t.fontMetrics().defaultRuleThickness,r=Je.makeVList({positionType:"top",positionData:i.height,children:[{type:"kern",size:o},{type:"elem",elem:n},{type:"kern",size:3*o},{type:"elem",elem:i}]},t);return Je.makeSpan(["mord","underline"],[r],t)},mathmlBuilder:function(e,t){var i=new Et.MathNode("mo",[new Et.TextNode("‾")]);i.setAttribute("stretchy","true");var n=new Et.MathNode("munder",[Ot(e.body,t),i]);return n.setAttribute("accentunder","true"),n}}),lt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler:function(e,t){return{type:"vcenter",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var i=St(e.body,t),n=t.fontMetrics().axisHeight,o=.5*(i.height-n-(i.depth+n));return Je.makeVList({positionType:"shift",positionData:o,children:[{type:"elem",elem:i}]},t)},mathmlBuilder:function(e,t){return new Et.MathNode("mpadded",[Ot(e.body,t)],["vcenter"])}}),lt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(e,t,i){throw new n("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(e,t){for(var i=Ln(e),n=[],o=t.havingStyle(t.style.text()),r=0;r0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var o=this.undefStack[this.undefStack.length-1];o&&!o.hasOwnProperty(e)&&(o[e]=this.current[e])}this.current[e]=t},e}(),On={},Fn=On;function Pn(e,t){On[e]=t}Pn("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),Pn("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),Pn("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),Pn("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),Pn("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var i=e.future();return 1===t[0].length&&t[0][0].text===i.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),Pn("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Pn("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var Bn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Pn("\\char",(function(e){var t,i=e.popToken(),o="";if("'"===i.text)t=8,i=e.popToken();else if('"'===i.text)t=16,i=e.popToken();else if("`"===i.text)if("\\"===(i=e.popToken()).text[0])o=i.text.charCodeAt(1);else{if("EOF"===i.text)throw new n("\\char` missing argument");o=i.text.charCodeAt(0)}else t=10;if(t){if(null==(o=Bn[i.text])||o>=t)throw new n("Invalid base-"+t+" digit "+i.text);for(var r;null!=(r=Bn[e.future().text])&&r":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};Pn("\\dots",(function(e){var t="\\dotso",i=e.expandAfterFuture().text;return i in Wn?t=Wn[i]:("\\not"===i.substr(0,4)||i in X.math&&l(["bin","rel"],X.math[i].group))&&(t="\\dotsb"),t}));var Vn={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Pn("\\dotso",(function(e){return e.future().text in Vn?"\\ldots\\,":"\\ldots"})),Pn("\\dotsc",(function(e){var t=e.future().text;return t in Vn&&","!==t?"\\ldots\\,":"\\ldots"})),Pn("\\cdots",(function(e){return e.future().text in Vn?"\\@cdots\\,":"\\@cdots"})),Pn("\\dotsb","\\cdots"),Pn("\\dotsm","\\cdots"),Pn("\\dotsi","\\!\\cdots"),Pn("\\dotsx","\\ldots\\,"),Pn("\\DOTSI","\\relax"),Pn("\\DOTSB","\\relax"),Pn("\\DOTSX","\\relax"),Pn("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Pn("\\,","\\tmspace+{3mu}{.1667em}"),Pn("\\thinspace","\\,"),Pn("\\>","\\mskip{4mu}"),Pn("\\:","\\tmspace+{4mu}{.2222em}"),Pn("\\medspace","\\:"),Pn("\\;","\\tmspace+{5mu}{.2777em}"),Pn("\\thickspace","\\;"),Pn("\\!","\\tmspace-{3mu}{.1667em}"),Pn("\\negthinspace","\\!"),Pn("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Pn("\\negthickspace","\\tmspace-{5mu}{.277em}"),Pn("\\enspace","\\kern.5em "),Pn("\\enskip","\\hskip.5em\\relax"),Pn("\\quad","\\hskip1em\\relax"),Pn("\\qquad","\\hskip2em\\relax"),Pn("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Pn("\\tag@paren","\\tag@literal{({#1})}"),Pn("\\tag@literal",(function(e){if(e.macros.get("\\df@tag"))throw new n("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Pn("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Pn("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Pn("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Pn("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Pn("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),Pn("\\newline","\\\\\\relax"),Pn("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Hn=$["Main-Regular"]["T".charCodeAt(0)][1]-.7*$["Main-Regular"]["A".charCodeAt(0)][1]+"em";Pn("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+Hn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Pn("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Hn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Pn("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Pn("\\@hspace","\\hskip #1\\relax"),Pn("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Pn("\\ordinarycolon",":"),Pn("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Pn("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Pn("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Pn("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Pn("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Pn("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Pn("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Pn("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Pn("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Pn("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Pn("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Pn("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Pn("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Pn("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Pn("∷","\\dblcolon"),Pn("∹","\\eqcolon"),Pn("≔","\\coloneqq"),Pn("≕","\\eqqcolon"),Pn("⩴","\\Coloneqq"),Pn("\\ratio","\\vcentcolon"),Pn("\\coloncolon","\\dblcolon"),Pn("\\colonequals","\\coloneqq"),Pn("\\coloncolonequals","\\Coloneqq"),Pn("\\equalscolon","\\eqqcolon"),Pn("\\equalscoloncolon","\\Eqqcolon"),Pn("\\colonminus","\\coloneq"),Pn("\\coloncolonminus","\\Coloneq"),Pn("\\minuscolon","\\eqcolon"),Pn("\\minuscoloncolon","\\Eqcolon"),Pn("\\coloncolonapprox","\\Colonapprox"),Pn("\\coloncolonsim","\\Colonsim"),Pn("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Pn("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Pn("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Pn("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Pn("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),Pn("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Pn("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Pn("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Pn("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Pn("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Pn("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Pn("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Pn("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Pn("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),Pn("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),Pn("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),Pn("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),Pn("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),Pn("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),Pn("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),Pn("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),Pn("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),Pn("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),Pn("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),Pn("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),Pn("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),Pn("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),Pn("\\imath","\\html@mathml{\\@imath}{ı}"),Pn("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),Pn("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),Pn("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),Pn("⟦","\\llbracket"),Pn("⟧","\\rrbracket"),Pn("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),Pn("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),Pn("⦃","\\lBrace"),Pn("⦄","\\rBrace"),Pn("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),Pn("⦵","\\minuso"),Pn("\\darr","\\downarrow"),Pn("\\dArr","\\Downarrow"),Pn("\\Darr","\\Downarrow"),Pn("\\lang","\\langle"),Pn("\\rang","\\rangle"),Pn("\\uarr","\\uparrow"),Pn("\\uArr","\\Uparrow"),Pn("\\Uarr","\\Uparrow"),Pn("\\N","\\mathbb{N}"),Pn("\\R","\\mathbb{R}"),Pn("\\Z","\\mathbb{Z}"),Pn("\\alef","\\aleph"),Pn("\\alefsym","\\aleph"),Pn("\\Alpha","\\mathrm{A}"),Pn("\\Beta","\\mathrm{B}"),Pn("\\bull","\\bullet"),Pn("\\Chi","\\mathrm{X}"),Pn("\\clubs","\\clubsuit"),Pn("\\cnums","\\mathbb{C}"),Pn("\\Complex","\\mathbb{C}"),Pn("\\Dagger","\\ddagger"),Pn("\\diamonds","\\diamondsuit"),Pn("\\empty","\\emptyset"),Pn("\\Epsilon","\\mathrm{E}"),Pn("\\Eta","\\mathrm{H}"),Pn("\\exist","\\exists"),Pn("\\harr","\\leftrightarrow"),Pn("\\hArr","\\Leftrightarrow"),Pn("\\Harr","\\Leftrightarrow"),Pn("\\hearts","\\heartsuit"),Pn("\\image","\\Im"),Pn("\\infin","\\infty"),Pn("\\Iota","\\mathrm{I}"),Pn("\\isin","\\in"),Pn("\\Kappa","\\mathrm{K}"),Pn("\\larr","\\leftarrow"),Pn("\\lArr","\\Leftarrow"),Pn("\\Larr","\\Leftarrow"),Pn("\\lrarr","\\leftrightarrow"),Pn("\\lrArr","\\Leftrightarrow"),Pn("\\Lrarr","\\Leftrightarrow"),Pn("\\Mu","\\mathrm{M}"),Pn("\\natnums","\\mathbb{N}"),Pn("\\Nu","\\mathrm{N}"),Pn("\\Omicron","\\mathrm{O}"),Pn("\\plusmn","\\pm"),Pn("\\rarr","\\rightarrow"),Pn("\\rArr","\\Rightarrow"),Pn("\\Rarr","\\Rightarrow"),Pn("\\real","\\Re"),Pn("\\reals","\\mathbb{R}"),Pn("\\Reals","\\mathbb{R}"),Pn("\\Rho","\\mathrm{P}"),Pn("\\sdot","\\cdot"),Pn("\\sect","\\S"),Pn("\\spades","\\spadesuit"),Pn("\\sub","\\subset"),Pn("\\sube","\\subseteq"),Pn("\\supe","\\supseteq"),Pn("\\Tau","\\mathrm{T}"),Pn("\\thetasym","\\vartheta"),Pn("\\weierp","\\wp"),Pn("\\Zeta","\\mathrm{Z}"),Pn("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Pn("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Pn("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Pn("\\bra","\\mathinner{\\langle{#1}|}"),Pn("\\ket","\\mathinner{|{#1}\\rangle}"),Pn("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Pn("\\Bra","\\left\\langle#1\\right|"),Pn("\\Ket","\\left|#1\\right\\rangle"),Pn("\\angln","{\\angl n}"),Pn("\\blue","\\textcolor{##6495ed}{#1}"),Pn("\\orange","\\textcolor{##ffa500}{#1}"),Pn("\\pink","\\textcolor{##ff00af}{#1}"),Pn("\\red","\\textcolor{##df0030}{#1}"),Pn("\\green","\\textcolor{##28ae7b}{#1}"),Pn("\\gray","\\textcolor{gray}{#1}"),Pn("\\purple","\\textcolor{##9d38bd}{#1}"),Pn("\\blueA","\\textcolor{##ccfaff}{#1}"),Pn("\\blueB","\\textcolor{##80f6ff}{#1}"),Pn("\\blueC","\\textcolor{##63d9ea}{#1}"),Pn("\\blueD","\\textcolor{##11accd}{#1}"),Pn("\\blueE","\\textcolor{##0c7f99}{#1}"),Pn("\\tealA","\\textcolor{##94fff5}{#1}"),Pn("\\tealB","\\textcolor{##26edd5}{#1}"),Pn("\\tealC","\\textcolor{##01d1c1}{#1}"),Pn("\\tealD","\\textcolor{##01a995}{#1}"),Pn("\\tealE","\\textcolor{##208170}{#1}"),Pn("\\greenA","\\textcolor{##b6ffb0}{#1}"),Pn("\\greenB","\\textcolor{##8af281}{#1}"),Pn("\\greenC","\\textcolor{##74cf70}{#1}"),Pn("\\greenD","\\textcolor{##1fab54}{#1}"),Pn("\\greenE","\\textcolor{##0d923f}{#1}"),Pn("\\goldA","\\textcolor{##ffd0a9}{#1}"),Pn("\\goldB","\\textcolor{##ffbb71}{#1}"),Pn("\\goldC","\\textcolor{##ff9c39}{#1}"),Pn("\\goldD","\\textcolor{##e07d10}{#1}"),Pn("\\goldE","\\textcolor{##a75a05}{#1}"),Pn("\\redA","\\textcolor{##fca9a9}{#1}"),Pn("\\redB","\\textcolor{##ff8482}{#1}"),Pn("\\redC","\\textcolor{##f9685d}{#1}"),Pn("\\redD","\\textcolor{##e84d39}{#1}"),Pn("\\redE","\\textcolor{##bc2612}{#1}"),Pn("\\maroonA","\\textcolor{##ffbde0}{#1}"),Pn("\\maroonB","\\textcolor{##ff92c6}{#1}"),Pn("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Pn("\\maroonD","\\textcolor{##ca337c}{#1}"),Pn("\\maroonE","\\textcolor{##9e034e}{#1}"),Pn("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Pn("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Pn("\\purpleC","\\textcolor{##aa87ff}{#1}"),Pn("\\purpleD","\\textcolor{##7854ab}{#1}"),Pn("\\purpleE","\\textcolor{##543b78}{#1}"),Pn("\\mintA","\\textcolor{##f5f9e8}{#1}"),Pn("\\mintB","\\textcolor{##edf2df}{#1}"),Pn("\\mintC","\\textcolor{##e0e5cc}{#1}"),Pn("\\grayA","\\textcolor{##f6f7f7}{#1}"),Pn("\\grayB","\\textcolor{##f0f1f2}{#1}"),Pn("\\grayC","\\textcolor{##e3e5e6}{#1}"),Pn("\\grayD","\\textcolor{##d6d8da}{#1}"),Pn("\\grayE","\\textcolor{##babec2}{#1}"),Pn("\\grayF","\\textcolor{##888d93}{#1}"),Pn("\\grayG","\\textcolor{##626569}{#1}"),Pn("\\grayH","\\textcolor{##3b3e40}{#1}"),Pn("\\grayI","\\textcolor{##21242c}{#1}"),Pn("\\kaBlue","\\textcolor{##314453}{#1}"),Pn("\\kaGreen","\\textcolor{##71B307}{#1}");var $n={"\\relax":!0,"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Un=function(){function e(e,t,i){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Rn(Fn,t.macros),this.mode=i,this.stack=[]}var t=e.prototype;return t.feed=function(e){this.lexer=new Tn(e,this.settings)},t.switchMode=function(e){this.mode=e},t.beginGroup=function(){this.macros.beginGroup()},t.endGroup=function(){this.macros.endGroup()},t.future=function(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]},t.popToken=function(){return this.future(),this.stack.pop()},t.pushToken=function(e){this.stack.push(e)},t.pushTokens=function(e){var t;(t=this.stack).push.apply(t,e)},t.scanArgument=function(e){var t,i,n;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken();var o=this.consumeArg(["]"]);n=o.tokens,i=o.end}else{var r=this.consumeArg();n=r.tokens,t=r.start,i=r.end}return this.pushToken(new An("EOF",i.loc)),this.pushTokens(n),t.range(i,"")},t.consumeSpaces=function(){for(;" "===this.future().text;)this.stack.pop()},t.consumeArg=function(e){var t=[],i=e&&e.length>0;i||this.consumeSpaces();var o,r=this.future(),s=0,a=0;do{if(o=this.popToken(),t.push(o),"{"===o.text)++s;else if("}"===o.text){if(-1==--s)throw new n("Extra }",o)}else if("EOF"===o.text)throw new n("Unexpected end of input in a macro argument, expected '"+(e&&i?e[a]:"}")+"'",o);if(e&&i)if((0===s||1===s&&"{"===e[a])&&o.text===e[a]){if(++a===e.length){t.splice(-a,a);break}}else a=0}while(0!==s||i);return"{"===r.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:r,end:o}},t.consumeArgs=function(e,t){if(t){if(t.length!==e+1)throw new n("The length of delimiters doesn't match the number of args!");for(var i=t[0],o=0;othis.settings.maxExpand)throw new n("Too many expansions: infinite loop or need to increase maxExpand setting");var r=o.tokens,s=this.consumeArgs(o.numArgs,o.delimiters);if(o.numArgs)for(var a=(r=r.slice()).length-1;a>=0;--a){var l=r[a];if("#"===l.text){if(0===a)throw new n("Incomplete placeholder at end of macro body",l);if("#"===(l=r[--a]).text)r.splice(a+1,1);else{if(!/^[1-9]$/.test(l.text))throw new n("Not a valid argument number",l);var c;(c=r).splice.apply(c,[a,2].concat(s[+l.text-1]))}}}return this.pushTokens(r),r},t.expandAfterFuture=function(){return this.expandOnce(),this.future()},t.expandNextToken=function(){for(;;){var e=this.expandOnce();if(e instanceof An){if("\\relax"!==e.text&&!e.treatAsRelax)return this.stack.pop();this.stack.pop()}}throw new Error},t.expandMacro=function(e){return this.macros.has(e)?this.expandTokens([new An(e)]):void 0},t.expandTokens=function(e){var t=[],i=this.stack.length;for(this.pushTokens(e);this.stack.length>i;){var n=this.expandOnce(!0);n instanceof An&&(n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),t.push(this.stack.pop()))}return t},t.expandMacroAsText=function(e){var t=this.expandMacro(e);return t?t.map((function(e){return e.text})).join(""):t},t._getExpansion=function(e){var t=this.macros.get(e);if(null==t)return t;var i="function"==typeof t?t(this):t;if("string"==typeof i){var n=0;if(-1!==i.indexOf("#"))for(var o=i.replace(/##/g,"");-1!==o.indexOf("#"+(n+1));)++n;for(var r=new Tn(i,this.settings),s=[],a=r.lex();"EOF"!==a.text;)s.push(a),a=r.lex();return s.reverse(),{tokens:s,numArgs:n}}return i},t.isDefined=function(e){return this.macros.has(e)||Nn.hasOwnProperty(e)||X.math.hasOwnProperty(e)||X.text.hasOwnProperty(e)||$n.hasOwnProperty(e)},t.isExpandable=function(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Nn.hasOwnProperty(e)&&!Nn[e].primitive},e}(),jn={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"}},qn={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",č:"č",ĉ:"ĉ",ċ:"ċ",ď:"ď",ḋ:"ḋ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ĺ:"ĺ",ľ:"ľ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ď:"Ď",Ḋ:"Ḋ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ĺ:"Ĺ",Ľ:"Ľ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ť:"Ť",Ṫ:"Ṫ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"},Kn=function(){function e(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Un(e,t,this.mode),this.settings=t,this.leftrightDepth=0}var t=e.prototype;return t.expect=function(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new n("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()},t.consume=function(){this.nextToken=null},t.fetch=function(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken},t.switchMode=function(e){this.mode=e,this.gullet.switchMode(e)},t.parse=function(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e},t.parseExpression=function(t,i){for(var n=[];;){"math"===this.mode&&this.consumeSpaces();var o=this.fetch();if(-1!==e.endOfExpression.indexOf(o.text))break;if(i&&o.text===i)break;if(t&&Nn[o.text]&&Nn[o.text].infix)break;var r=this.parseAtom(i);if(!r)break;"internal"!==r.type&&n.push(r)}return"text"===this.mode&&this.formLigatures(n),this.handleInfixNodes(n)},t.handleInfixNodes=function(e){for(var t,i=-1,o=0;o=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var a,l=X[this.mode][t].group,c=En.range(e);if(G.hasOwnProperty(l)){var u=l;a={type:"atom",mode:this.mode,family:u,loc:c,text:t}}else a={type:l,mode:this.mode,loc:c,text:t};r=a}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(L(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),r={type:"textord",mode:"text",loc:En.range(e),text:t}}if(this.consume(),s)for(var h=0;h{"use strict";const n=i(4411),o=Symbol("max"),r=Symbol("length"),s=Symbol("lengthCalculator"),a=Symbol("allowStale"),l=Symbol("maxAge"),c=Symbol("dispose"),u=Symbol("noDisposeOnSet"),h=Symbol("lruList"),d=Symbol("cache"),g=Symbol("updateAgeOnGet"),f=()=>1,p=(e,t,i)=>{const n=e[d].get(t);if(n){const t=n.value;if(m(e,t)){if(v(e,n),!e[a])return}else i&&(e[g]&&(n.value.now=Date.now()),e[h].unshiftNode(n));return t.value}},m=(e,t)=>{if(!t||!t.maxAge&&!e[l])return!1;const i=Date.now()-t.now;return t.maxAge?i>t.maxAge:e[l]&&i>e[l]},_=e=>{if(e[r]>e[o])for(let t=e[h].tail;e[r]>e[o]&&null!==t;){const i=t.prev;v(e,t),t=i}},v=(e,t)=>{if(t){const i=t.value;e[c]&&e[c](i.key,i.value),e[r]-=i.length,e[d].delete(i.key),e[h].removeNode(t)}};class b{constructor(e,t,i,n,o){this.key=e,this.value=t,this.length=i,this.now=n,this.maxAge=o||0}}const y=(e,t,i,n)=>{let o=i.value;m(e,o)&&(v(e,i),e[a]||(o=void 0)),o&&t.call(n,o.value,o.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[o]=e.max||1/0;const t=e.length||f;if(this[s]="function"!=typeof t?f:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0,this[c]=e.dispose,this[u]=e.noDisposeOnSet||!1,this[g]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[o]=e||1/0,_(this)}get max(){return this[o]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[l]=e,_(this)}get maxAge(){return this[l]}set lengthCalculator(e){"function"!=typeof e&&(e=f),e!==this[s]&&(this[s]=e,this[r]=0,this[h].forEach((e=>{e.length=this[s](e.value,e.key),this[r]+=e.length}))),_(this)}get lengthCalculator(){return this[s]}get length(){return this[r]}get itemCount(){return this[h].length}rforEach(e,t){t=t||this;for(let i=this[h].tail;null!==i;){const n=i.prev;y(this,e,i,t),i=n}}forEach(e,t){t=t||this;for(let i=this[h].head;null!==i;){const n=i.next;y(this,e,i,t),i=n}}keys(){return this[h].toArray().map((e=>e.key))}values(){return this[h].toArray().map((e=>e.value))}reset(){this[c]&&this[h]&&this[h].length&&this[h].forEach((e=>this[c](e.key,e.value))),this[d]=new Map,this[h]=new n,this[r]=0}dump(){return this[h].map((e=>!m(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[h]}set(e,t,i){if((i=i||this[l])&&"number"!=typeof i)throw new TypeError("maxAge must be a number");const n=i?Date.now():0,a=this[s](t,e);if(this[d].has(e)){if(a>this[o])return v(this,this[d].get(e)),!1;const s=this[d].get(e).value;return this[c]&&(this[u]||this[c](e,s.value)),s.now=n,s.maxAge=i,s.value=t,this[r]+=a-s.length,s.length=a,this.get(e),_(this),!0}const g=new b(e,t,a,n,i);return g.length>this[o]?(this[c]&&this[c](e,t),!1):(this[r]+=g.length,this[h].unshift(g),this[d].set(e,this[h].head),_(this),!0)}has(e){if(!this[d].has(e))return!1;const t=this[d].get(e).value;return!m(this,t)}get(e){return p(this,e,!0)}peek(e){return p(this,e,!1)}pop(){const e=this[h].tail;return e?(v(this,e),e.value):null}del(e){v(this,this[d].get(e))}load(e){this.reset();const t=Date.now();for(let i=e.length-1;i>=0;i--){const n=e[i],o=n.e||0;if(0===o)this.set(n.k,n.v);else{const e=o-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[d].forEach(((e,t)=>p(this,t,!1)))}}},8850:function(e){e.exports=function(){"use strict";function e(e,t){for(var i=0;ie.length)&&(t=e.length);for(var i=0,n=new Array(t);i=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var n=function(e){var t={exports:{}};return e(t,t.exports),t.exports}((function(e){function t(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1},getDefaults:t,changeDefaults:function(t){e.exports.defaults=t}}})),o=/[&<>"']/,r=/[&<>"']/g,s=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},c=function(e){return l[e]};var u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function h(e){return e.replace(u,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var d=/(^|[^\[])\^/g;var g=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;var p={},m=/^[^:]+:\/*[^/]*$/,_=/^([^:]+:)[\s\S]*$/,v=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(e,t){p[" "+e]||(m.test(e)?p[" "+e]=e+"/":p[" "+e]=y(e,"/",!0));var i=-1===(e=p[" "+e]).indexOf(":");return"//"===t.substring(0,2)?i?t:e.replace(_,"$1")+t:"/"===t.charAt(0)?i?t:e.replace(v,"$1")+t:e+t}function y(e,t,i){var n=e.length;if(0===n)return"";for(var o=0;o=0&&"\\"===i[o];)n=!n;return n?"|":" |"})).split(/ \|/),n=0;if(i.length>t)i.splice(t);else for(;i.length1;)1&t&&(i+=e),t>>=1,e+=e;return i+e},I=n.defaults,T=N,R=L,O=w,F=E;function P(e,t,i){var n=t.href,o=t.title?O(t.title):null,r=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:i,href:n,title:o,text:r}:{type:"image",raw:i,href:n,title:o,text:O(r)}}var B=function(){function e(e){this.options=e||I}var t=e.prototype;return t.space=function(e){var t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e){var t=this.rules.block.code.exec(e);if(t){var i=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?i:T(i,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var i=t[0],n=function(e,t){var i=e.match(/^(\s+)(?:```)/);if(null===i)return t;var n=i[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=n.length?e.slice(n.length):e})).join("\n")}(i,t[3]||"");return{type:"code",raw:i,lang:t[2]?t[2].trim():t[2],text:n}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var i=t[2].trim();if(/#$/.test(i)){var n=T(i,"#");this.options.pedantic?i=n.trim():n&&!/ $/.test(n)||(i=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:i}}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var i={type:"table",header:R(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(i.header.length===i.align.length){var n,o=i.align.length;for(n=0;n ?/gm,"");return{type:"blockquote",raw:t[0],text:i}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){var i,n,o,r,s,a,l,c,u=t[0],h=t[2],d=h.length>1,g={type:"list",raw:u,ordered:d,start:d?+h.slice(0,-1):"",loose:!1,items:[]},f=t[0].match(this.rules.block.item),p=!1,m=f.length;o=this.rules.block.listItemStart.exec(f[0]);for(var _=0;_o[1].length:r[1].length>o[0].length||r[1].length>3){f.splice(_,2,f[_]+"\n"+f[_+1]),_--,m--;continue}(!this.options.pedantic||this.options.smartLists?r[2][r[2].length-1]!==h[h.length-1]:d===(1===r[2].length))&&(s=f.slice(_+1).join("\n"),g.raw=g.raw.substring(0,g.raw.length-s.length),_=m-1),o=r}n=i.length,~(i=i.replace(/^ *([*+-]|\d+[.)]) ?/,"")).indexOf("\n ")&&(n-=i.length,i=this.options.pedantic?i.replace(/^ {1,4}/gm,""):i.replace(new RegExp("^ {1,"+n+"}","gm"),"")),a=p||/\n\n(?!\s*$)/.test(i),_!==m-1&&(p="\n"===i.charAt(i.length-1),a||(a=p)),a&&(g.loose=!0),this.options.gfm&&(c=void 0,(l=/^\[[ xX]\] /.test(i))&&(c=" "!==i[1],i=i.replace(/^\[[ xX]\] +/,""))),g.items.push({type:"list_item",raw:u,task:l,checked:c,loose:a,text:i})}return g}},t.html=function(e){var t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):O(t[0]):t[0]}},t.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},t.table=function(e){var t=this.rules.block.table.exec(e);if(t){var i={type:"table",header:R(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(i.header.length===i.align.length){i.raw=t[0];var n,o=i.align.length;for(n=0;n/i.test(n[0])&&(t=!1),!i&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?i=!0:i&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(i=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:t,inRawBlock:i,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):O(n[0]):n[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var i=t[2].trim();if(!this.options.pedantic&&/^$/.test(i))return;var n=T(i.slice(0,-1),"\\");if((i.length-n.length)%2==0)return}else{var o=F(t[2],"()");if(o>-1){var r=(0===t[0].indexOf("!")?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,r).trim(),t[3]=""}}var s=t[2],a="";if(this.options.pedantic){var l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s);l&&(s=l[1],a=l[3])}else a=t[3]?t[3].slice(1,-1):"";return s=s.trim(),/^$/.test(i)?s.slice(1):s.slice(1,-1)),P(t,{href:s?s.replace(this.rules.inline._escapes,"$1"):s,title:a?a.replace(this.rules.inline._escapes,"$1"):a},t[0])}},t.reflink=function(e,t){var i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){var n=(i[2]||i[1]).replace(/\s+/g," ");if(!(n=t[n.toLowerCase()])||!n.href){var o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return P(i,n,i[0])}},t.emStrong=function(e,t,i){void 0===i&&(i="");var n=this.rules.inline.emStrong.lDelim.exec(e);if(n&&(!n[3]||!i.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\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\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\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\u1369-\u137C\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\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\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\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\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-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\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-\uAB69\uAB70-\uABE2\uABF0-\uABF9\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\uFF10-\uFF19\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\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\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\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\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]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\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]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var o=n[1]||n[2]||"";if(!o||o&&(""===i||this.rules.inline.punctuation.exec(i))){var r,s,a=n[0].length-1,l=a,c=0,u="*"===n[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+a);null!=(n=u.exec(t));)if(r=n[1]||n[2]||n[3]||n[4]||n[5]||n[6])if(s=r.length,n[3]||n[4])l+=s;else if(!((n[5]||n[6])&&a%3)||(a+s)%3){if(!((l-=s)>0)){if(l+c-s<=0&&!t.slice(u.lastIndex).match(u)&&(s=Math.min(s,s+l+c)),Math.min(a,s)%2)return{type:"em",raw:e.slice(0,a+n.index+s+1),text:e.slice(1,a+n.index+s)};if(Math.min(a,s)%2==0)return{type:"strong",raw:e.slice(0,a+n.index+s+1),text:e.slice(2,a+n.index+s-1)}}}else c+=s}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var i=t[2].replace(/\n/g," "),n=/[^ ]/.test(i),o=/^ /.test(i)&&/ $/.test(i);return n&&o&&(i=i.substring(1,i.length-1)),i=O(i,!0),{type:"codespan",raw:t[0],text:i}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2]}},t.autolink=function(e,t){var i,n,o=this.rules.inline.autolink.exec(e);if(o)return n="@"===o[2]?"mailto:"+(i=O(this.options.mangle?t(o[1]):o[1])):i=O(o[1]),{type:"link",raw:o[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}},t.url=function(e,t){var i;if(i=this.rules.inline.url.exec(e)){var n,o;if("@"===i[2])o="mailto:"+(n=O(this.options.mangle?t(i[0]):i[0]));else{var r;do{r=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0]}while(r!==i[0]);n=O(i[0]),o="www."===i[1]?"http://"+n:n}return{type:"link",raw:i[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}},t.inlineText=function(e,t,i){var n,o=this.rules.inline.text.exec(e);if(o)return n=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(o[0]):O(o[0]):o[0]:O(this.options.smartypants?i(o[0]):o[0]),{type:"text",raw:o[0],text:n}},e}(),z=k,W=S,V=D,H={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:z,table:z,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};H.def=W(H.def).replace("label",H._label).replace("title",H._title).getRegex(),H.bullet=/(?:[*+-]|\d{1,9}[.)])/,H.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,H.item=W(H.item,"gm").replace(/bull/g,H.bullet).getRegex(),H.listItemStart=W(/^( *)(bull)/).replace("bull",H.bullet).getRegex(),H.list=W(H.list).replace(/bull/g,H.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+H.def.source+")").getRegex(),H._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",H._comment=/|$)/,H.html=W(H.html,"i").replace("comment",H._comment).replace("tag",H._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),H.paragraph=W(H._paragraph).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.blockquote=W(H.blockquote).replace("paragraph",H.paragraph).getRegex(),H.normal=V({},H),H.gfm=V({},H.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),H.gfm.nptable=W(H.gfm.nptable).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.gfm.table=W(H.gfm.table).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.pedantic=V({},H.normal,{html:W("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",H._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:z,paragraph:W(H.normal._paragraph).replace("hr",H.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",H.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var $={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:z,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/\_\_[^_]*?\*[^_]*?\_\_|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/\*\*[^*]*?\_[^*]*?\*\*|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:z,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};$.punctuation=W($.punctuation).replace(/punctuation/g,$._punctuation).getRegex(),$.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,$.escapedEmSt=/\\\*|\\_/g,$._comment=W(H._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),$.emStrong.lDelim=W($.emStrong.lDelim).replace(/punct/g,$._punctuation).getRegex(),$.emStrong.rDelimAst=W($.emStrong.rDelimAst,"g").replace(/punct/g,$._punctuation).getRegex(),$.emStrong.rDelimUnd=W($.emStrong.rDelimUnd,"g").replace(/punct/g,$._punctuation).getRegex(),$._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,$._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,$._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,$.autolink=W($.autolink).replace("scheme",$._scheme).replace("email",$._email).getRegex(),$._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,$.tag=W($.tag).replace("comment",$._comment).replace("attribute",$._attribute).getRegex(),$._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,$._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,$._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,$.link=W($.link).replace("label",$._label).replace("href",$._href).replace("title",$._title).getRegex(),$.reflink=W($.reflink).replace("label",$._label).getRegex(),$.reflinkSearch=W($.reflinkSearch,"g").replace("reflink",$.reflink).replace("nolink",$.nolink).getRegex(),$.normal=V({},$),$.pedantic=V({},$.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:W(/^!?\[(label)\]\((.*?)\)/).replace("label",$._label).getRegex(),reflink:W(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",$._label).getRegex()}),$.gfm=V({},$.normal,{escape:W($.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(i="x"+i.toString(16)),n+="&#"+i+";";return n}var X=function(){function t(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||j,this.options.tokenizer=this.options.tokenizer||new B,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:q.normal,inline:K.normal};this.options.pedantic?(t.block=q.pedantic,t.inline=K.pedantic):this.options.gfm&&(t.block=q.gfm,this.options.breaks?t.inline=K.breaks:t.inline=K.gfm),this.tokenizer.rules=t}t.lex=function(e,i){return new t(i).lex(e)},t.lexInline=function(e,i){return new t(i).inlineTokens(e)};var i,n,o,r=t.prototype;return r.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},r.blockTokens=function(e,t,i){var n,o,r,s;for(void 0===t&&(t=[]),void 0===i&&(i=!0),this.options.pedantic&&(e=e.replace(/^ +$/gm,""));e;)if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),n.type&&t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),(s=t[t.length-1])&&"paragraph"===s.type?(s.raw+="\n"+n.raw,s.text+="\n"+n.text):t.push(n);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.nptable(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),n.tokens=this.blockTokens(n.text,[],i),t.push(n);else if(n=this.tokenizer.list(e)){for(e=e.substring(n.raw.length),r=n.items.length,o=0;o0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(c));)u.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,s.index)+"["+G("a",s[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,s.index)+"["+G("a",s[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(s=this.tokenizer.rules.inline.escapedEmSt.exec(c));)c=c.slice(0,s.index)+"++"+c.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(a||(l=""),a=!1,o=this.tokenizer.escape(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.tag(e,i,n)){e=e.substring(o.raw.length),i=o.inLink,n=o.inRawBlock;var h=t[t.length-1];h&&"text"===o.type&&"text"===h.type?(h.raw+=o.raw,h.text+=o.text):t.push(o)}else if(o=this.tokenizer.link(e))e=e.substring(o.raw.length),"link"===o.type&&(o.tokens=this.inlineTokens(o.text,[],!0,n)),t.push(o);else if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);var d=t[t.length-1];"link"===o.type?(o.tokens=this.inlineTokens(o.text,[],!0,n),t.push(o)):d&&"text"===o.type&&"text"===d.type?(d.raw+=o.raw,d.text+=o.text):t.push(o)}else if(o=this.tokenizer.emStrong(e,c,l))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],i,n),t.push(o);else if(o=this.tokenizer.codespan(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.br(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.del(e))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],i,n),t.push(o);else if(o=this.tokenizer.autolink(e,Z))e=e.substring(o.raw.length),t.push(o);else if(i||!(o=this.tokenizer.url(e,Z))){if(o=this.tokenizer.inlineText(e,n,Y))e=e.substring(o.raw.length),"_"!==o.raw.slice(-1)&&(l=o.raw.slice(-1)),a=!0,(r=t[t.length-1])&&"text"===r.type?(r.raw+=o.raw,r.text+=o.text):t.push(o);else if(e){var g="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(g);break}throw new Error(g)}}else e=e.substring(o.raw.length),t.push(o);return t},i=t,o=[{key:"rules",get:function(){return{block:q,inline:K}}}],(n=null)&&e(i.prototype,n),o&&e(i,o),t}(),Q=n.defaults,J=x,ee=w,te=function(){function e(e){this.options=e||Q}var t=e.prototype;return t.code=function(e,t,i){var n=(t||"").match(/\S*/)[0];if(this.options.highlight){var o=this.options.highlight(e,n);null!=o&&o!==e&&(i=!0,e=o)}return e=e.replace(/\n$/,"")+"\n",n?'
'+(i?e:ee(e,!0))+"
\n":"
"+(i?e:ee(e,!0))+"
\n"},t.blockquote=function(e){return"
\n"+e+"
\n"},t.html=function(e){return e},t.heading=function(e,t,i,n){return this.options.headerIds?"'+e+"\n":""+e+"\n"},t.hr=function(){return this.options.xhtml?"
\n":"
\n"},t.list=function(e,t,i){var n=t?"ol":"ul";return"<"+n+(t&&1!==i?' start="'+i+'"':"")+">\n"+e+"\n"},t.listitem=function(e){return"
  • "+e+"
  • \n"},t.checkbox=function(e){return" "},t.paragraph=function(e){return"

    "+e+"

    \n"},t.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},t.tablerow=function(e){return"\n"+e+"\n"},t.tablecell=function(e,t){var i=t.header?"th":"td";return(t.align?"<"+i+' align="'+t.align+'">':"<"+i+">")+e+"\n"},t.strong=function(e){return""+e+""},t.em=function(e){return""+e+""},t.codespan=function(e){return""+e+""},t.br=function(){return this.options.xhtml?"
    ":"
    "},t.del=function(e){return""+e+""},t.link=function(e,t,i){if(null===(e=J(this.options.sanitize,this.options.baseUrl,e)))return i;var n='"+i+""},t.image=function(e,t,i){if(null===(e=J(this.options.sanitize,this.options.baseUrl,e)))return i;var n=''+i+'":">")},t.text=function(e){return e},e}(),ie=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,i){return""+i},t.image=function(e,t,i){return""+i},t.br=function(){return""},e}(),ne=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var i=e,n=0;if(this.seen.hasOwnProperty(i)){n=this.seen[e];do{i=e+"-"+ ++n}while(this.seen.hasOwnProperty(i))}return t||(this.seen[e]=n,this.seen[i]=0),i},t.slug=function(e,t){void 0===t&&(t={});var i=this.serialize(e);return this.getNextSafeSlug(i,t.dryrun)},e}(),oe=n.defaults,re=C,se=function(){function e(e){this.options=e||oe,this.options.renderer=this.options.renderer||new te,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ie,this.slugger=new ne}e.parse=function(t,i){return new e(i).parse(t)},e.parseInline=function(t,i){return new e(i).parseInline(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var i,n,o,r,s,a,l,c,u,h,d,g,f,p,m,_,v,b,y="",w=e.length;for(i=0;i0&&"text"===m.tokens[0].type?(m.tokens[0].text=b+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&"text"===m.tokens[0].tokens[0].type&&(m.tokens[0].tokens[0].text=b+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:b}):p+=b),p+=this.parse(m.tokens,f),u+=this.renderer.listitem(p,v,_);y+=this.renderer.list(u,d,g);continue;case"html":y+=this.renderer.html(h.text);continue;case"paragraph":y+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(u=h.tokens?this.parseInline(h.tokens):h.text;i+1An error occurred:

    "+ce(e.message+"",!0)+"
    ";throw e}}return ge.options=ge.setOptions=function(e){return ae(ge.defaults,e),he(ge.defaults),ge},ge.getDefaults=ue,ge.defaults=de,ge.use=function(e){var t=ae({},e);if(e.renderer&&function(){var i=ge.defaults.renderer||new te,n=function(t){var n=i[t];i[t]=function(){for(var o=arguments.length,r=new Array(o),s=0;sAn error occurred:

    "+ce(e.message+"",!0)+"
    ";throw e}},ge.Parser=se,ge.parser=se.parse,ge.Renderer=te,ge.TextRenderer=ie,ge.Lexer=X,ge.lexer=X.lex,ge.Tokenizer=B,ge.Slugger=ne,ge.parse=ge,ge}()},158:(e,t,i)=>{var n;self.MonacoEnvironment=(n={editorWorkerService:"editor.worker.js"},{globalAPI:!1,getWorkerUrl:function(e,t){var o=i.p,r=(o?o.replace(/\/$/,"")+"/":"")+n[t];if(/^((http:)|(https:)|(file:)|(\/\/))/.test(r)){var s=String(window.location),a=s.substr(0,s.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(r.substring(0,a.length)!==a){var l=new Blob(["/*"+t+'*/importScripts("'+r+'");'],{type:"application/javascript"});return URL.createObjectURL(l)}}return r}}),i(9477),i(7355),i(7084),i(4594),i(2015),i(9093),i(3832),i(7956),i(9098),i(6522),i(8728),i(2834),i(7441),i(1372),i(3391),i(2943),i(3111),i(4818),i(2698),i(2097),i(2729),i(365),i(7043),i(9646),i(3554),i(638),i(2309),i(7586),i(7830),i(2408),i(674),i(4800),i(8486),i(517),i(7720),i(8944),i(8936),i(5048),i(4454),i(1955),i(3379),i(8250),i(5662),i(9720),i(7847),i(1725),i(185),i(3497),i(9453),i(661),e.exports=i(513),i(7365),i(3709)},6268:(e,t,i)=>{"use strict";i.d(t,{px:()=>r,WP:()=>s,fX:()=>a,ie:()=>l,mX:()=>c,vU:()=>h,Pf:()=>d,i7:()=>g,G6:()=>f,MG:()=>p,Dt:()=>m,$W:()=>_});var n=i(4669);class o{constructor(){this._zoomLevel=0,this._lastZoomLevelChangeTime=0,this._onDidChangeZoomLevel=new n.Q5,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this._zoomFactor=1}getZoomLevel(){return this._zoomLevel}getTimeSinceLastZoomLevelChanged(){return Date.now()-this._lastZoomLevelChangeTime}getZoomFactor(){return this._zoomFactor}getPixelRatio(){let e=document.createElement("canvas").getContext("2d");return(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}}function r(){return o.INSTANCE.getZoomLevel()}function s(){return o.INSTANCE.getTimeSinceLastZoomLevelChanged()}function a(e){return o.INSTANCE.onDidChangeZoomLevel(e)}function l(){return o.INSTANCE.getZoomFactor()}function c(){return o.INSTANCE.getPixelRatio()}o.INSTANCE=new o;const u=navigator.userAgent,h=u.indexOf("Firefox")>=0,d=u.indexOf("AppleWebKit")>=0,g=u.indexOf("Chrome")>=0,f=!g&&u.indexOf("Safari")>=0,p=!g&&!f&&d,m=u.indexOf("Android")>=0,_=window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches},161:(e,t,i)=>{"use strict";i.d(t,{D:()=>r});var n=i(6268),o=i(1432);const r={clipboard:{writeText:o.tY||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:o.tY||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:o.tY||n.$W?0:navigator.keyboard||n.G6?1:2,touch:"ontouchstart"in window||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0)}},3547:(e,t,i)=>{"use strict";i.d(t,{go:()=>n,TN:()=>o,P$:()=>r});const n={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:"text/plain"};class o{constructor(e){this.data=e}update(){}getData(){return this.data}}const r={CurrentDragAndDropData:void 0}},5321:(e,t,i)=>{"use strict";i.d(t,{PO:()=>f,Uw:()=>p,nm:()=>_,mu:()=>b,Gw:()=>y,Lo:()=>w,qV:()=>C,j_:()=>S,RE:()=>x,lI:()=>k,jL:()=>D,Y_:()=>M,Dx:()=>I,D6:()=>T,Ro:()=>O,xQ:()=>F,dp:()=>P,i:()=>B,DI:()=>z,w:()=>W,FK:()=>V,If:()=>H,wn:()=>$,jg:()=>U,Fx:()=>j,uU:()=>q,OO:()=>G,Ay:()=>Y,vY:()=>Z,dS:()=>X,fk:()=>ee,uN:()=>te,Re:()=>ie,tw:()=>ne,zB:()=>oe,vL:()=>re,_0:()=>se,go:()=>le,R3:()=>ce,mc:()=>ue,$:()=>fe,$Z:()=>pe,Cp:()=>me,H$:()=>_e,Uh:()=>ve,V3:()=>be,jt:()=>ye,wY:()=>we,_h:()=>Ce,_q:()=>Se,uB:()=>xe});var n=i(6268),o=i(4850),r=i(9069),s=i(3938),a=i(5393),l=i(7301),c=i(4669),u=i(5976),h=i(1432),d=i(6663),g=i(161);function f(e){for(;e.firstChild;)e.firstChild.remove()}function p(e){var t;return null!==(t=null==e?void 0:e.isConnected)&&void 0!==t&&t}class m{constructor(e,t,i,n){this._node=e,this._type=t,this._handler=i,this._options=n||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function _(e,t,i,n){return new m(e,t,i,n)}function v(e){return function(t){return e(new s.n(t))}}let b=function(e,t,i,n){let o=i;return"click"===t||"mousedown"===t?o=v(i):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(o=function(e){return function(t){return e(new r.y(t))}}(i)),_(e,t,o,n)},y=function(e,t,i){return w(e,v(t),i)};function w(e,t,i){return _(e,h.gn&&g.D.pointerEvents?ne.POINTER_DOWN:ne.MOUSE_DOWN,t,i)}function C(e,t,i){return _(e,h.gn&&g.D.pointerEvents?ne.POINTER_UP:ne.MOUSE_UP,t,i)}function S(e,t){return _(e,"mouseout",(i=>{let n=i.relatedTarget;for(;n&&n!==e;)n=n.parentNode;n!==e&&t(i)}))}function x(e,t){return _(e,"pointerout",(i=>{let n=i.relatedTarget;for(;n&&n!==e;)n=n.parentNode;n!==e&&t(i)}))}let k,D,L=null;class N{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){(0,l.dL)(e)}}static sort(e,t){return t.priority-e.priority}}!function(){let e=[],t=null,i=!1,n=!1,o=()=>{for(i=!1,t=e,e=[],n=!0;t.length>0;)t.sort(N.sort),t.shift().execute();n=!1};D=(t,n=0)=>{let r=new N(t,n);return e.push(r),i||(i=!0,function(e){if(!L){const e=e=>setTimeout((()=>e((new Date).getTime())),0);L=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||e}L.call(self,e)}(o)),r},k=(e,i)=>{if(n){let n=new N(e,i);return t.push(n),n}return D(e,i)}}();const E=function(e,t){return t};class A extends u.JT{constructor(e,t,i,n=E,o=8){super();let r=null,s=0,l=this._register(new a._F),c=()=>{s=(new Date).getTime(),i(r),r=null};this._register(_(e,t,(e=>{r=n(r,e);let t=(new Date).getTime()-s;t>=o?(l.cancel(),c()):l.setIfNotSet(c,o-t)})))}}function M(e,t,i,n,o){return new A(e,t,i,n,o)}function I(e){return document.defaultView.getComputedStyle(e,null)}function T(e){if(e!==document.body)return new O(e.clientWidth,e.clientHeight);if(h.gn&&window.visualViewport)return new O(window.visualViewport.width,window.visualViewport.height);if(window.innerWidth&&window.innerHeight)return new O(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new O(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new O(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}class R{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,i){let n=I(e),o="0";return n&&(o=n.getPropertyValue?n.getPropertyValue(t):n.getAttribute(i)),R.convertToPixels(e,o)}static getBorderLeftWidth(e){return R.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return R.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return R.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return R.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return R.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return R.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return R.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return R.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return R.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return R.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return R.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return R.getDimension(e,"margin-bottom","marginBottom")}}class O{constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new O(e,t):this}static is(e){return"object"==typeof e&&"number"==typeof e.height&&"number"==typeof e.width}static lift(e){return e instanceof O?e:new O(e.width,e.height)}static equals(e,t){return e===t||!(!e||!t)&&e.width===t.width&&e.height===t.height}}function F(e){let t=e.offsetParent,i=e.offsetTop,n=e.offsetLeft;for(;null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement;){i-=e.scrollTop;const o=K(e)?null:I(e);o&&(n-="rtl"!==o.direction?e.scrollLeft:-e.scrollLeft),e===t&&(n+=R.getBorderLeftWidth(e),i+=R.getBorderTopWidth(e),i+=e.offsetTop,n+=e.offsetLeft,t=e.offsetParent)}return{left:n,top:i}}function P(e,t,i){"number"==typeof t&&(e.style.width=`${t}px`),"number"==typeof i&&(e.style.height=`${i}px`)}function B(e){let t=e.getBoundingClientRect();return{left:t.left+z.scrollX,top:t.top+z.scrollY,width:t.width,height:t.height}}const z=new class{get scrollX(){return"number"==typeof window.scrollX?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft}get scrollY(){return"number"==typeof window.scrollY?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop}};function W(e){let t=R.getMarginLeft(e)+R.getMarginRight(e);return e.offsetWidth+t}function V(e){let t=R.getBorderLeftWidth(e)+R.getBorderRightWidth(e),i=R.getPaddingLeft(e)+R.getPaddingRight(e);return e.offsetWidth-t-i}function H(e){let t=R.getBorderTopWidth(e)+R.getBorderBottomWidth(e),i=R.getPaddingTop(e)+R.getPaddingBottom(e);return e.offsetHeight-t-i}function $(e){let t=R.getMarginTop(e)+R.getMarginBottom(e);return e.offsetHeight+t}function U(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function j(e,t,i){for(;e&&e.nodeType===e.ELEMENT_NODE;){if(e.classList.contains(t))return e;if(i)if("string"==typeof i){if(e.classList.contains(i))return null}else if(e===i)return null;e=e.parentNode}return null}function q(e,t,i){return!!j(e,t,i)}function K(e){return e&&!!e.host&&!!e.mode}function G(e){return!!Y(e)}function Y(e){for(;e.parentNode;){if(e===document.body)return null;e=e.parentNode}return K(e)?e:null}function Z(){let e=document.activeElement;for(;null==e?void 0:e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function X(e=document.getElementsByTagName("head")[0]){let t=document.createElement("style");return t.type="text/css",t.media="screen",e.appendChild(t),t}let Q=null;function J(){return Q||(Q=X()),Q}function ee(e,t,i=J()){i&&t&&i.sheet.insertRule(e+"{"+t+"}",0)}function te(e,t=J()){if(!t)return;let i=function(e){var t,i;return(null===(t=null==e?void 0:e.sheet)||void 0===t?void 0:t.rules)?e.sheet.rules:(null===(i=null==e?void 0:e.sheet)||void 0===i?void 0:i.cssRules)?e.sheet.cssRules:[]}(t),n=[];for(let t=0;t=0;e--)t.sheet.deleteRule(n[e])}function ie(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName}const ne={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:n.Pf?"webkitAnimationStart":"animationstart",ANIMATION_END:n.Pf?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:n.Pf?"webkitAnimationIteration":"animationiteration"},oe={stop:function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)}};function re(e){let t=[];for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)t[i]=e.scrollTop,e=e.parentNode;return t}function se(e,t){for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)e.scrollTop!==t[i]&&(e.scrollTop=t[i]),e=e.parentNode}class ae extends u.JT{constructor(e){super(),this._onDidFocus=this._register(new c.Q5),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new c.Q5),this.onDidBlur=this._onDidBlur.event;let t=U(document.activeElement,e),i=!1;const n=()=>{i=!1,t||(t=!0,this._onDidFocus.fire())},r=()=>{t&&(i=!0,window.setTimeout((()=>{i&&(i=!1,t=!1,this._onDidBlur.fire())}),0))};this._refreshStateHandler=()=>{U(document.activeElement,e)!==t&&(t?r():n())},this._register((0,o.jt)(e,ne.FOCUS,!0)(n)),this._register((0,o.jt)(e,ne.BLUR,!0)(r))}}function le(e){return new ae(e)}function ce(e,...t){if(e.append(...t),1===t.length&&"string"!=typeof t[0])return t[0]}function ue(e,...t){e.innerText="",ce(e,...t)}const he=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var de;function ge(e,t,i,...n){let o=he.exec(t);if(!o)throw new Error("Bad use of emmet");i=Object.assign({},i||{});let r,s=o[1]||"div";return r=e!==de.HTML?document.createElementNS(e,s):document.createElement(s),o[3]&&(r.id=o[3]),o[4]&&(r.className=o[4].replace(/\./g," ").trim()),Object.keys(i).forEach((e=>{const t=i[e];void 0!==t&&(/^on\w+$/.test(e)?r[e]=t:"selected"===e?t&&r.setAttribute(e,"true"):r.setAttribute(e,t))})),r.append(...n),r}function fe(e,t,...i){return ge(de.HTML,e,t,...i)}function pe(...e){for(let t of e)t.style.display="",t.removeAttribute("aria-hidden")}function me(...e){for(let t of e)t.style.display="none",t.setAttribute("aria-hidden","true")}function _e(e){return Array.prototype.slice.call(document.getElementsByTagName(e),0)}function ve(e){const t=window.devicePixelRatio*e;return Math.max(1,Math.floor(t))/window.devicePixelRatio}function be(e){window.open(e,"_blank","noopener")}function ye(e){const t=()=>{e(),i=D(t)};let i=D(t);return(0,u.OF)((()=>i.dispose()))}function we(e){return e?`url('${d.Gi.asBrowserUri(e).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function Ce(e){return`'${e.replace(/'/g,"%27")}'`}!function(e){e.HTML="http://www.w3.org/1999/xhtml",e.SVG="http://www.w3.org/2000/svg"}(de||(de={})),fe.SVG=function(e,t,...i){return ge(de.SVG,e,t,...i)},d.WX.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");class Se extends c.Q5{constructor(){super(),this._subscriptions=new u.SL,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add((0,o.jt)(window,"keydown",!0)((e=>{if(e.defaultPrevented)return;const t=new r.y(e);if(6!==t.keyCode||!e.repeat){if(e.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(e.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(e.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(e.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else{if(6===t.keyCode)return;this._keyStatus.lastKeyPressed=void 0}this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=e,this.fire(this._keyStatus))}}))),this._subscriptions.add((0,o.jt)(window,"keyup",!0)((e=>{e.defaultPrevented||(!e.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!e.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!e.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!e.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=e,this.fire(this._keyStatus)))}))),this._subscriptions.add((0,o.jt)(document.body,"mousedown",!0)((e=>{this._keyStatus.lastKeyPressed=void 0}))),this._subscriptions.add((0,o.jt)(document.body,"mouseup",!0)((e=>{this._keyStatus.lastKeyPressed=void 0}))),this._subscriptions.add((0,o.jt)(document.body,"mousemove",!0)((e=>{e.buttons&&(this._keyStatus.lastKeyPressed=void 0)}))),this._subscriptions.add((0,o.jt)(window,"blur")((e=>{this.resetKeyStatus()})))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return Se.instance||(Se.instance=new Se),Se.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}function xe(e,t){const i=window.matchMedia(e);"function"==typeof i.addEventListener?i.addEventListener("change",t):i.addListener(t)}},4850:(e,t,i)=>{"use strict";i.d(t,{jt:()=>o,Yp:()=>r,p7:()=>s,sT:()=>a});var n=i(4669);const o=(e,t,i)=>{const o=e=>r.fire(e),r=new n.Q5({onFirstListenerAdd:()=>{e.addEventListener(t,o,i)},onLastListenerRemove:()=>{e.removeEventListener(t,o,i)}});return r.event};class r{constructor(e,t,i){const o=e=>this.emitter.fire(e);this.emitter=new n.Q5({onFirstListenerAdd:()=>e.addEventListener(t,o,i),onLastListenerRemove:()=>e.removeEventListener(t,o,i)})}get event(){return this.emitter.event}dispose(){this.emitter.dispose()}}function s(e){return e.preventDefault(),e.stopPropagation(),e}function a(e){return n.ju.map(e,s)}},8626:(e,t,i)=>{"use strict";i.d(t,{Z:()=>n,X:()=>o});class n{constructor(e){this.domNode=e,this._maxWidth=-1,this._width=-1,this._height=-1,this._top=-1,this._left=-1,this._bottom=-1,this._right=-1,this._fontFamily="",this._fontWeight="",this._fontSize=-1,this._fontFeatureSettings="",this._lineHeight=-1,this._letterSpacing=-100,this._className="",this._display="",this._position="",this._visibility="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){this._maxWidth!==e&&(this._maxWidth=e,this.domNode.style.maxWidth=this._maxWidth+"px")}setWidth(e){this._width!==e&&(this._width=e,this.domNode.style.width=this._width+"px")}setHeight(e){this._height!==e&&(this._height=e,this.domNode.style.height=this._height+"px")}setTop(e){this._top!==e&&(this._top=e,this.domNode.style.top=this._top+"px")}unsetTop(){-1!==this._top&&(this._top=-1,this.domNode.style.top="")}setLeft(e){this._left!==e&&(this._left=e,this.domNode.style.left=this._left+"px")}setBottom(e){this._bottom!==e&&(this._bottom=e,this.domNode.style.bottom=this._bottom+"px")}setRight(e){this._right!==e&&(this._right=e,this.domNode.style.right=this._right+"px")}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){this._fontSize!==e&&(this._fontSize=e,this.domNode.style.fontSize=this._fontSize+"px")}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setLineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.domNode.style.lineHeight=this._lineHeight+"px")}setLetterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.domNode.style.letterSpacing=this._letterSpacing+"px")}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}function o(e){return new n(e)}},8764:(e,t,i)=>{"use strict";i.d(t,{IY:()=>o,BO:()=>r,az:()=>s});var n=i(5321);function o(e,t={}){const i=s(t);return i.textContent=e,i}function r(e,t={}){const i=s(t);return l(i,function(e,t){const i={type:1,children:[]};let n=0,o=i;const r=[],s=new a(e);for(;!s.eos();){let e=s.next();const i="\\"===e&&0!==c(s.peek(),t);if(i&&(e=s.next()),i||0===c(e,t)||e!==s.peek())if("\n"===e)2===o.type&&(o=r.pop()),o.children.push({type:8});else if(2!==o.type){const t={type:2,content:e};o.children.push(t),r.push(o),o=t}else o.content+=e;else{s.advance(),2===o.type&&(o=r.pop());const i=c(e,t);if(o.type===i||5===o.type&&6===i)o=r.pop();else{const e={type:i,children:[]};5===i&&(e.index=n,n++),o.children.push(e),r.push(o),o=e}}}return 2===o.type&&(o=r.pop()),r.length,i}(e,!!t.renderCodeSegements),t.actionHandler,t.renderCodeSegements),i}function s(e){const t=e.inline?"span":"div",i=document.createElement(t);return e.className&&(i.className=e.className),i}class a{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function l(e,t,i,o){let r;if(2===t.type)r=document.createTextNode(t.content||"");else if(3===t.type)r=document.createElement("b");else if(4===t.type)r=document.createElement("i");else if(7===t.type&&o)r=document.createElement("code");else if(5===t.type&&i){const e=document.createElement("a");e.href="#",i.disposeables.add(n.mu(e,"click",(e=>{i.callback(String(t.index),e)}))),r=e}else 8===t.type?r=document.createElement("br"):1===t.type&&(r=e);r&&e!==r&&e.appendChild(r),r&&Array.isArray(t.children)&&t.children.forEach((e=>{l(r,e,i,o)}))}function c(e,t){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return t?7:0;default:return 0}}},7974:(e,t,i)=>{"use strict";i.d(t,{e:()=>l,Z:()=>c});var n=i(5321),o=i(262),r=i(3938),s=i(5976),a=i(1432);function l(e,t){let i=new r.n(t);return i.preventDefault(),{leftButton:i.leftButton,buttons:i.buttons,posx:i.posx,posy:i.posy}}class c{constructor(){this._hooks=new s.SL,this._mouseMoveEventMerger=null,this._mouseMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._mouseMoveEventMerger=null,this._mouseMoveCallback=null;const i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(t)}isMonitoring(){return!!this._mouseMoveEventMerger}startMonitoring(e,t,i,s,l){if(this.isMonitoring())return;this._mouseMoveEventMerger=i,this._mouseMoveCallback=s,this._onStopCallback=l;const c=o.E.getSameOriginWindowChain(),u=a.gn?"pointermove":"mousemove",h=c.map((e=>e.window.document)),d=n.Ay(e);d&&h.unshift(d);for(const e of h)this._hooks.add(n.Y_(e,u,(e=>{e.buttons===t?this._mouseMoveCallback(e):this.stopMonitoring(!0)}),((e,t)=>this._mouseMoveEventMerger(e,t)))),this._hooks.add(n.nm(e,"mouseup",(e=>this.stopMonitoring(!0))));if(o.E.hasDifferentOriginAncestor()){let e=c[c.length-1];this._hooks.add(n.nm(e.window.document,"mouseout",(e=>{"html"===new r.n(e).target.tagName.toLowerCase()&&this.stopMonitoring(!0)}))),this._hooks.add(n.nm(e.window.document,"mouseover",(e=>{"html"===new r.n(e).target.tagName.toLowerCase()&&this.stopMonitoring(!0)}))),this._hooks.add(n.nm(e.window.document.body,"mouseleave",(e=>{this.stopMonitoring(!0)})))}}}},262:(e,t,i)=>{"use strict";i.d(t,{E:()=>s});let n=!1,o=null;function r(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,i=e.parent.location;if("null"!==t.origin&&"null"!==i.origin&&(t.protocol!==i.protocol||t.hostname!==i.hostname||t.port!==i.port))return n=!0,null}catch(e){return n=!0,null}return e.parent}class s{static getSameOriginWindowChain(){if(!o){o=[];let e,t=window;do{e=r(t),e?o.push({window:t,iframeElement:t.frameElement||null}):o.push({window:t,iframeElement:null}),t=e}while(t)}return o.slice(0)}static hasDifferentOriginAncestor(){return o||this.getSameOriginWindowChain(),n}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,n=0,o=this.getSameOriginWindowChain();for(const e of o){if(i+=e.window.scrollY,n+=e.window.scrollX,e.window===t)break;if(!e.iframeElement)break;let o=e.iframeElement.getBoundingClientRect();i+=o.top,n+=o.left}return{top:i,left:n}}}},9069:(e,t,i)=>{"use strict";i.d(t,{y:()=>u});var n=i(6268),o=i(2258),r=i(1432);let s=new Array(230),a=new Array(112);!function(){for(let e=0;e{"use strict";i.d(t,{n:()=>s,q:()=>a});var n=i(6268),o=i(262),r=i(1432);class s{constructor(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=0===e.button,this.middleButton=1===e.button,this.rightButton=2===e.button,this.buttons=e.buttons,this.target=e.target,this.detail=e.detail||1,"dblclick"===e.type&&(this.detail=2),this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,"number"==typeof e.pageX?(this.posx=e.pageX,this.posy=e.pageY):(this.posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);let t=o.E.getPositionOfChildWindowRelativeToAncestorWindow(self,e.view);this.posx-=t.left,this.posy-=t.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class a{constructor(e,t=0,i=0){if(this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t,e){let t=e,i=e;if(void 0!==t.wheelDeltaY)this.deltaY=t.wheelDeltaY/120;else if(void 0!==i.VERTICAL_AXIS&&i.axis===i.VERTICAL_AXIS)this.deltaY=-i.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?n.vU&&!r.dz?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(void 0!==t.wheelDeltaX)n.G6&&r.ED?this.deltaX=-t.wheelDeltaX/120:this.deltaX=t.wheelDeltaX/120;else if(void 0!==i.HORIZONTAL_AXIS&&i.axis===i.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?n.vU&&!r.dz?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation()}}},553:(e,t,i)=>{"use strict";i.d(t,{t:()=>n,o:()=>l});var n,o=i(9488),r=i(5976),s=i(5321),a=i(9898);!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(n||(n={}));class l extends r.JT{constructor(){super(),this.dispatched=!1,this.activeTouches={},this.handle=null,this.targets=[],this.ignoreTargets=[],this._lastSetTapCountTime=0,this._register(s.nm(document,"touchstart",(e=>this.onTouchStart(e)),{passive:!1})),this._register(s.nm(document,"touchend",(e=>this.onTouchEnd(e)))),this._register(s.nm(document,"touchmove",(e=>this.onTouchMove(e)),{passive:!1}))}static addTarget(e){return l.isTouchDevice()?(l.INSTANCE||(l.INSTANCE=new l),l.INSTANCE.targets.push(e),{dispose:()=>{l.INSTANCE.targets=l.INSTANCE.targets.filter((t=>t!==e))}}):r.JT.None}static ignoreTarget(e){return l.isTouchDevice()?(l.INSTANCE||(l.INSTANCE=new l),l.INSTANCE.ignoreTargets.push(e),{dispose:()=>{l.INSTANCE.ignoreTargets=l.INSTANCE.ignoreTargets.filter((t=>t!==e))}}):r.JT.None}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){let t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let i=0,o=e.targetTouches.length;i=l.HOLD_DELAY&&Math.abs(a.initialPageX-o.Gb(a.rollingPageX))<30&&Math.abs(a.initialPageY-o.Gb(a.rollingPageY))<30){let e=this.newGestureEvent(n.Contextmenu,a.initialTarget);e.pageX=o.Gb(a.rollingPageX),e.pageY=o.Gb(a.rollingPageY),this.dispatchEvent(e)}else if(1===i){let e=o.Gb(a.rollingPageX),i=o.Gb(a.rollingPageY),n=o.Gb(a.rollingTimestamps)-a.rollingTimestamps[0],r=e-a.rollingPageX[0],s=i-a.rollingPageY[0];const l=this.targets.filter((e=>a.initialTarget instanceof Node&&e.contains(a.initialTarget)));this.inertia(l,t,Math.abs(r)/n,r>0?1:-1,e,Math.abs(s)/n,s>0?1:-1,i)}this.dispatchEvent(this.newGestureEvent(n.End,a.initialTarget)),delete this.activeTouches[s.identifier]}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){let i=document.createEvent("CustomEvent");return i.initEvent(e,!1,!0),i.initialTarget=t,i.tapCount=0,i}dispatchEvent(e){if(e.type===n.Tap){const t=(new Date).getTime();let i=0;i=t-this._lastSetTapCountTime>l.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=t,e.tapCount=i}else e.type!==n.Change&&e.type!==n.Contextmenu||(this._lastSetTapCountTime=0);for(let t=0;t{e.initialTarget instanceof Node&&t.contains(e.initialTarget)&&(t.dispatchEvent(e),this.dispatched=!0)}))}inertia(e,t,i,o,r,a,c,u){this.handle=s.jL((()=>{let s=Date.now(),h=s-t,d=0,g=0,f=!0;i+=l.SCROLL_FRICTION*h,a+=l.SCROLL_FRICTION*h,i>0&&(f=!1,d=o*i*h),a>0&&(f=!1,g=c*a*h);let p=this.newGestureEvent(n.Change);p.translationX=d,p.translationY=g,e.forEach((e=>e.dispatchEvent(p))),f||this.inertia(e,s,i,o,r+d,a,c,u+g)}))}onTouchMove(e){let t=Date.now();for(let i=0,r=e.changedTouches.length;i3&&(s.rollingPageX.shift(),s.rollingPageY.shift(),s.rollingTimestamps.shift()),s.rollingPageX.push(r.pageX),s.rollingPageY.push(r.pageY),s.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}l.SCROLL_FRICTION=-.005,l.HOLD_DELAY=700,l.CLEAR_TAP_COUNT_TIME=400,function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([a.H],l,"isTouchDevice",null)},6033:(e,t,i)=>{"use strict";i.d(t,{Y:()=>d,g:()=>g});var n=i(1432),o=i(3580),r=i(5976),s=i(4741),a=i(8401),l=i(553),c=i(3547),u=i(6268),h=i(5321);class d extends r.JT{constructor(e,t,i={}){super(),this.options=i,this._context=e||this,this._action=t,t instanceof s.aU&&this._register(t.onDidChange((e=>{this.element&&this.handleActionChangeEvent(e)})))}handleActionChangeEvent(e){void 0!==e.enabled&&this.updateEnabled(),void 0!==e.checked&&this.updateChecked(),void 0!==e.class&&this.updateClass(),void 0!==e.label&&(this.updateLabel(),this.updateTooltip()),void 0!==e.tooltip&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new s.Wi)),this._actionRunner}set actionRunner(e){this._actionRunner=e}getAction(){return this._action}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(l.o.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,u.vU&&this._register((0,h.nm)(e,h.tw.DRAG_START,(e=>{var t;return null===(t=e.dataTransfer)||void 0===t?void 0:t.setData(c.go.TEXT,this._action.label)})))),this._register((0,h.nm)(t,l.t.Tap,(e=>this.onClick(e)))),this._register((0,h.nm)(t,h.tw.MOUSE_DOWN,(e=>{i||h.zB.stop(e,!0),this._action.enabled&&0===e.button&&t.classList.add("active")}))),n.dz&&this._register((0,h.nm)(t,h.tw.CONTEXT_MENU,(e=>{0===e.button&&!0===e.ctrlKey&&this.onClick(e)}))),this._register((0,h.nm)(t,h.tw.CLICK,(e=>{h.zB.stop(e,!0),this.options&&this.options.isMenu||n.xS((()=>this.onClick(e)))}))),this._register((0,h.nm)(t,h.tw.DBLCLICK,(e=>{h.zB.stop(e,!0)}))),[h.tw.MOUSE_UP,h.tw.MOUSE_OUT].forEach((e=>{this._register((0,h.nm)(t,e,(e=>{h.zB.stop(e),t.classList.remove("active")})))}))}onClick(e){var t;h.zB.stop(e,!0);const i=a.Jp(this._context)?(null===(t=this.options)||void 0===t?void 0:t.useEventAsContext)?e:void 0:this._context;this.actionRunner.run(this._action,i)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}updateTooltip(){}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),super.dispose()}}class g extends d{constructor(e,t,i={}){super(e,t,i),this.options=i,this.options.icon=void 0!==i.icon&&i.icon,this.options.label=void 0===i.label||i.label,this.cssClass=""}render(e){super.render(e),this.element&&(this.label=(0,h.R3)(this.element,(0,h.$)("a.action-label"))),this.label&&(this._action.id===s.Z0.ID?this.label.setAttribute("role","presentation"):this.options.isMenu?this.label.setAttribute("role","menuitem"):this.label.setAttribute("role","button")),this.options.label&&this.options.keybinding&&this.element&&((0,h.R3)(this.element,(0,h.$)("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.getAction().label)}updateTooltip(){let e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=o.N({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.label&&(this.label.title=e)}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getAction().class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label&&this.label.classList.remove("codicon")}updateEnabled(){this.getAction().enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element&&this.element.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element&&this.element.classList.add("disabled"))}updateChecked(){this.label&&(this.getAction().checked?this.label.classList.add("checked"):this.label.classList.remove("checked"))}}},317:(e,t,i)=>{"use strict";i.d(t,{o:()=>u});var n=i(5976),o=i(4741),r=i(5321),s=i(8401),a=i(9069),l=i(4669),c=i(6033);class u extends n.JT{constructor(e,t={}){var i,n,s,u,h,d;let g,f;switch(super(),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new l.Q5),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new l.Q5({onFirstListenerAdd:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new l.Q5),this.onDidRun=this._onDidRun.event,this._onBeforeRun=this._register(new l.Q5),this.onBeforeRun=this._onBeforeRun.event,this.options=t,this._context=null!==(i=t.context)&&void 0!==i?i:null,this._orientation=null!==(n=this.options.orientation)&&void 0!==n?n:0,this._triggerKeys={keyDown:null!==(u=null===(s=this.options.triggerKeys)||void 0===s?void 0:s.keyDown)&&void 0!==u&&u,keys:null!==(d=null===(h=this.options.triggerKeys)||void 0===h?void 0:h.keys)&&void 0!==d?d:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new o.Wi,this._register(this._actionRunner)),this._register(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e)))),this._register(this._actionRunner.onBeforeRun((e=>this._onBeforeRun.fire(e)))),this._actionIds=[],this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",!1!==t.animated&&this.domNode.classList.add("animated"),this._orientation){case 0:g=[15],f=[17];break;case 1:g=[16],f=[18],this.domNode.className+=" vertical"}this._register(r.nm(this.domNode,r.tw.KEY_DOWN,(e=>{const t=new a.y(e);let i=!0;const n="number"==typeof this.focusedItem?this.viewItems[this.focusedItem]:void 0;g&&(t.equals(g[0])||t.equals(g[1]))?i=this.focusPrevious():f&&(t.equals(f[0])||t.equals(f[1]))?i=this.focusNext():t.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():t.equals(14)?i=this.focusFirst():t.equals(13)?i=this.focusLast():t.equals(2)&&n instanceof c.Y&&n.trapsArrowNavigation?i=this.focusNext():this.isTriggerKeyEvent(t)?this._triggerKeys.keyDown?this.doTrigger(t):this.triggerKeyDown=!0:i=!1,i&&(t.preventDefault(),t.stopPropagation())}))),this._register(r.nm(this.domNode,r.tw.KEY_UP,(e=>{const t=new a.y(e);this.isTriggerKeyEvent(t)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(t)),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026))&&this.updateFocusedItem()}))),this.focusTracker=this._register(r.go(this.domNode)),this._register(this.focusTracker.onDidBlur((()=>{r.vY()!==this.domNode&&r.jg(r.vY(),this.domNode)||(this._onDidBlur.fire(),this.focusedItem=void 0,this.triggerKeyDown=!1)}))),this._register(this.focusTracker.onDidFocus((()=>this.updateFocusedItem()))),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.actionsList.setAttribute("role","toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach((i=>{t=t||e.equals(i)})),t}updateFocusedItem(){for(let e=0;et.setActionContext(e)))}get actionRunner(){return this._actionRunner}set actionRunner(e){e&&(this._actionRunner=e,this.viewItems.forEach((t=>t.actionRunner=e)))}getContainer(){return this.domNode}push(e,t={}){const i=Array.isArray(e)?e:[e];let n=s.hj(t.index)?t.index:null;i.forEach((e=>{const i=document.createElement("li");let o;i.className="action-item",i.setAttribute("role","presentation"),this.options.allowContextMenu||this._register(r.nm(i,r.tw.CONTEXT_MENU,(e=>{r.zB.stop(e,!0)}))),this.options.actionViewItemProvider&&(o=this.options.actionViewItemProvider(e)),o||(o=new c.g(this.context,e,t)),o.actionRunner=this._actionRunner,o.setActionContext(this.context),o.render(i),this.focusable&&o instanceof c.Y&&0===this.viewItems.length&&o.setFocusable(!0),null===n||n<0||n>=this.actionsList.children.length?(this.actionsList.appendChild(i),this.viewItems.push(o),this._actionIds.push(e.id)):(this.actionsList.insertBefore(i,this.actionsList.children[n]),this.viewItems.splice(n,0,o),this._actionIds.splice(n,0,e.id),n++)})),"number"==typeof this.focusedItem&&this.focus(this.focusedItem)}clear(){(0,n.B9)(this.viewItems),this.viewItems=[],this._actionIds=[],r.PO(this.actionsList)}length(){return this.viewItems.length}focus(e){let t,i=!1;if(void 0===e?i=!0:"number"==typeof e?t=e:"boolean"==typeof e&&(i=e),i&&void 0===this.focusedItem){const e=this.viewItems.findIndex((e=>e.isEnabled()));this.focusedItem=-1===e?void 0:e,this.updateFocus()}else void 0!==t&&(this.focusedItem=t),this.updateFocus()}focusFirst(){return this.focusedItem=this.length()>1?1:0,this.focusPrevious()}focusLast(){return this.focusedItem=this.length()<2?0:this.length()-2,this.focusNext()}focusNext(){if(void 0===this.focusedItem)this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const e=this.focusedItem;let t;do{if(this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=e,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,t=this.viewItems[this.focusedItem]}while(this.focusedItem!==e&&this.options.focusOnlyEnabledItems&&!t.isEnabled());return this.updateFocus(),!0}focusPrevious(){if(void 0===this.focusedItem)this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const e=this.focusedItem;let t;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(this.options.preventLoopNavigation)return this.focusedItem=e,!1;this.focusedItem=this.viewItems.length-1}t=this.viewItems[this.focusedItem]}while(this.focusedItem!==e&&this.options.focusOnlyEnabledItems&&!t.isEnabled());return this.updateFocus(!0),!0}updateFocus(e,t){void 0===this.focusedItem&&this.actionsList.focus({preventScroll:t});for(let i=0;i{"use strict";i.d(t,{wW:()=>u,Z9:()=>h,i7:()=>d});var n=i(1432),o=i(5321);let r,s,a,l,c;function u(e){r=document.createElement("div"),r.className="monaco-aria-container";const t=()=>{const e=document.createElement("div");return e.className="monaco-alert",e.setAttribute("role","alert"),e.setAttribute("aria-atomic","true"),r.appendChild(e),e};s=t(),a=t();const i=()=>{const e=document.createElement("div");return e.className="monaco-status",e.setAttribute("role","complementary"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),r.appendChild(e),e};l=i(),c=i(),e.appendChild(r)}function h(e){r&&(s.textContent!==e?(o.PO(a),g(s,e)):(o.PO(s),g(a,e)))}function d(e){r&&(n.dz?h(e):l.textContent!==e?(o.PO(c),g(l,e)):(o.PO(l),g(c,e)))}function g(e,t){o.PO(e),t.length>2e4&&(t=t.substr(0,2e4)),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}},8609:(e,t,i)=>{"use strict";i.d(t,{a:()=>o});var n=i(3046);function o(e){let t=e.definition;for(;t instanceof n.lA;)t=t.definition;return`.codicon-${e.id}:before { content: '${t.fontCharacter}'; }`}},7488:(e,t,i)=>{"use strict";i.d(t,{Z:()=>l});var n=i(5321),o=i(7295),r=i(1264),s=i(6248);const a={badgeBackground:r.Il.fromHex("#4D4D4D"),badgeForeground:r.Il.fromHex("#FFFFFF")};class l{constructor(e,t){this.count=0,this.options=t||Object.create(null),(0,s.jB)(this.options,a,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=(0,n.R3)(e,(0,n.$)(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){this.element.textContent=(0,o.WU)(this.countFormat,this.count),this.element.title=(0,o.WU)(this.titleFormat,this.count),this.applyStyles()}style(e){this.badgeBackground=e.badgeBackground,this.badgeForeground=e.badgeForeground,this.badgeBorder=e.badgeBorder,this.applyStyles()}applyStyles(){if(this.element){const e=this.badgeBackground?this.badgeBackground.toString():"",t=this.badgeForeground?this.badgeForeground.toString():"",i=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}}}},4650:(e,t,i)=>{"use strict";i.d(t,{q:()=>s});var n=i(6248),o=i(5321),r=i(6811);class s{constructor(e,t){this.supportIcons=t,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.domNode=document.createElement("span"),this.domNode.className="monaco-highlighted-label",e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t=[],i="",o){e||(e=""),o&&(e=s.escapeNewLines(e,t)),this.didEverRender&&this.text===e&&this.title===i&&n.fS(this.highlights,t)||(this.text=e,this.title=i,this.highlights=t,this.render())}render(){const e=[];let t=0;for(const i of this.highlights){if(i.end===i.start)continue;if(t{n="\r\n"===e?-1:0,o+=i;for(const e of t)e.end<=o||(e.start>=o&&(e.start+=n),e.end>=o&&(e.end+=n));return i+=n,"⏎"}))}}},8801:(e,t,i)=>{"use strict";i.d(t,{g:()=>p});var n=i(5321),o=i(4650),r=i(5976),s=i(1134),a=i(6248),l=i(8401),c=i(1050),u=i(4850),h=i(3580),d=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function g(e,t,i,n){if(e&&n)return void 0===t||void 0!==i.placement&&"mouse"!==i.placement||(e.target.x=t+10),i.showHover(e)}class f{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class p extends r.JT{constructor(e,t){super(),this.customHovers=new Map,this.domNode=this._register(new f(n.R3(e,n.$(".monaco-icon-label")))),this.labelContainer=n.R3(this.domNode.element,n.$(".monaco-icon-label-container"));const i=n.R3(this.labelContainer,n.$("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new f(n.R3(this.labelContainer,n.$("span.monaco-icon-description-container")))),(null==t?void 0:t.supportHighlights)||(null==t?void 0:t.supportIcons)?this.nameNode=new _(i,!!t.supportIcons):this.nameNode=new m(i),(null==t?void 0:t.supportDescriptionHighlights)?this.descriptionNodeFactory=()=>new o.q(n.R3(this.descriptionContainer.element,n.$("span.label-description")),!!t.supportIcons):this.descriptionNodeFactory=()=>this._register(new f(n.R3(this.descriptionContainer.element,n.$("span.label-description")))),this.hoverDelegate=null==t?void 0:t.hoverDelegate}setLabel(e,t,i){const n=["monaco-icon-label"];i&&(i.extraClasses&&n.push(...i.extraClasses),i.italic&&n.push("italic"),i.strikethrough&&n.push("strikethrough")),this.domNode.className=n.join(" "),this.setupHover(this.labelContainer,null==i?void 0:i.title),this.nameNode.setLabel(e,i),(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof o.q?(this.descriptionNode.set(t||"",i?i.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,null==i?void 0:i.descriptionTitle)):(this.descriptionNode.textContent=t||"",this.setupHover(this.descriptionNode.element,(null==i?void 0:i.descriptionTitle)||""),this.descriptionNode.empty=!t))}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),t)if(this.hoverDelegate){const i=function(e,t,i){if(!i)return;const o=function(e){if((0,l.HD)(e))return()=>d(this,void 0,void 0,(function*(){return e}));if((0,l.mf)(e.markdown))return e.markdown;{const t=e.markdown;return()=>d(this,void 0,void 0,(function*(){return t}))}}(i);let r,s,a,f,p=!1;const m=new u.Yp(t,n.tw.MOUSE_OVER,!0);return m.event((m=>{if(p)return;function _(e){const i=e.type===n.tw.MOUSE_DOWN;i&&(null==f||f.dispose(),f=void 0),(i||e.fromElement===t)&&(p=!1,r=void 0,a.dispose(!0),v.dispose(),b.dispose())}a=new c.A;const v=new u.Yp(t,n.tw.MOUSE_LEAVE,!0);v.event(_);const b=new u.Yp(t,n.tw.MOUSE_DOWN,!0);b.event(_),p=!0;const y=new u.Yp(t,n.tw.MOUSE_MOVE,!0);y.event((function(e){s=e.x})),setTimeout((()=>d(this,void 0,void 0,(function*(){var n;if(p&&o&&!r){const c={targetElements:[t],dispose:()=>{}};r={text:(0,h.N)("iconLabel.loading","Loading..."),target:c,hoverPosition:2},f=g(r,s,e,p);const u=null!==(n=yield o(a.token))&&void 0!==n?n:(0,l.HD)(i)?void 0:i.markdownNotSupportedFallback;u?(r={text:u,target:c,showPointer:"element"===e.placement,hoverPosition:2},f=g(r,s,e,p)):f&&(f.dispose(),f=void 0)}y.dispose()}))),e.delay)})),m}(this.hoverDelegate,e,t);i&&this.customHovers.set(e,i)}else!function(e,t){(0,l.HD)(t)?e.title=t:(null==t?void 0:t.markdownNotSupportedFallback)?e.title=t.markdownNotSupportedFallback:e.removeAttribute("title")}(e,t);else e.removeAttribute("title")}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}}class m{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!(0,a.fS)(this.options,t))if(this.label=e,this.options=t,"string"==typeof e)this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=n.R3(this.container,n.$("a.label-name",{id:null==t?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i{const o={start:n,end:n+e.length},r=i.map((e=>s.e.intersect(o,e))).filter((e=>!s.e.isEmpty(e))).map((({start:e,end:t})=>({start:e-n,end:t-n})));return n=o.end+t.length,r}))}(e,i,null==t?void 0:t.matches);for(let s=0;s{"use strict";i.d(t,{T:()=>s});var n=i(5321),o=i(3046);const r=new RegExp(`(\\\\)?\\$\\((${o.dT.iconNameExpression}(?:${o.dT.iconModifierExpression})?)\\)`,"g");function s(e){const t=new Array;let i,n=0,o=0;for(;null!==(i=r.exec(e));){o=i.index||0,t.push(e.substring(n,o)),n=(i.index||0)+i[0].length;const[,r,s]=i;t.push(r?`$(${s})`:a({id:s}))}return n{"use strict";i.d(t,{p:()=>b,W:()=>v});var n=i(3580),o=i(5321),r=i(8764),s=i(5152),a=i(317),l=i(4669),c=i(3794),u=i(1264),h=i(6248);class d{constructor(e,t=0,i=e.length,n=t-1){this.items=e,this.start=t,this.end=i,this.index=n}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class g{constructor(e=[],t=10){this._initialize(e),this._limit=t,this._onChange()}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._currentPosition()!==this._elements.length-1?this._navigator.next():null}previous(){return 0!==this._currentPosition()?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new d(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const t of e)this._history.add(t)}get _elements(){const e=[];return this._history.forEach((t=>e.push(t))),e}}var f=i(9802),p=i(4850);const m=o.$,_={inputBackground:u.Il.fromHex("#3C3C3C"),inputForeground:u.Il.fromHex("#CCCCCC"),inputValidationInfoBorder:u.Il.fromHex("#55AAFF"),inputValidationInfoBackground:u.Il.fromHex("#063B49"),inputValidationWarningBorder:u.Il.fromHex("#B89500"),inputValidationWarningBackground:u.Il.fromHex("#352A05"),inputValidationErrorBorder:u.Il.fromHex("#BE1100"),inputValidationErrorBackground:u.Il.fromHex("#5A1D1D")};class v extends c.${constructor(e,t,i){var n;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new l.Q5),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new l.Q5),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i||Object.create(null),(0,h.jB)(this.options,_,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=null!==(n=this.options.tooltip)&&void 0!==n?n:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.inputBackground=this.options.inputBackground,this.inputForeground=this.options.inputForeground,this.inputBorder=this.options.inputBorder,this.inputValidationInfoBorder=this.options.inputValidationInfoBorder,this.inputValidationInfoBackground=this.options.inputValidationInfoBackground,this.inputValidationInfoForeground=this.options.inputValidationInfoForeground,this.inputValidationWarningBorder=this.options.inputValidationWarningBorder,this.inputValidationWarningBackground=this.options.inputValidationWarningBackground,this.inputValidationWarningForeground=this.options.inputValidationWarningForeground,this.inputValidationErrorBorder=this.options.inputValidationErrorBorder,this.inputValidationErrorBackground=this.options.inputValidationErrorBackground,this.inputValidationErrorForeground=this.options.inputValidationErrorForeground,this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=o.R3(e,m(".monaco-inputbox.idle"));let r=this.options.flexibleHeight?"textarea":"input",s=o.R3(this.element,m(".ibwrapper"));if(this.input=o.R3(s,m(r+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,(()=>this.element.classList.add("synthetic-focus"))),this.onblur(this.input,(()=>this.element.classList.remove("synthetic-focus"))),this.options.flexibleHeight){this.maxHeight="number"==typeof this.options.flexibleMaxHeight?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=o.R3(s,m("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new f.NB(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),o.R3(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll((e=>this.input.scrollTop=e.scrollTop)));const t=l.ju.filter((0,p.jt)(document,"selectionchange"),(()=>{const e=document.getSelection();return(null==e?void 0:e.anchorNode)===s}));this._register(t(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,(()=>this.onValueChange())),this.onblur(this.input,(()=>this.onBlur())),this.onfocus(this.input,(()=>this.onFocus())),this.ignoreGesture(this.input),setTimeout((()=>this.updateMirror()),0),this.options.actions&&(this.actionbar=this._register(new a.o(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage()}onFocus(){this._showMessage()}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.input.title=e}setAriaLabel(e){this.ariaLabel=e,e?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}getAriaLabel(){return this.ariaLabel}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return"number"==typeof this.cachedHeight?this.cachedHeight:o.wn(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}get width(){return o.w(this.input)}set width(e){if(this.options.flexibleHeight&&this.options.flexibleWidth){let t=0;this.mirror&&(t=(parseFloat(this.mirror.style.paddingLeft||"")||0)+(parseFloat(this.mirror.style.paddingRight||"")||0)),this.input.style.width=e-t+"px"}else this.input.style.width=e+"px";this.mirror&&(this.mirror.style.width=e+"px")}set paddingRight(e){this.options.flexibleHeight&&this.options.flexibleWidth?this.input.style.width=`calc(100% - ${e}px)`:this.input.style.paddingRight=e+"px",this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if("number"!=typeof this.cachedContentHeight||"number"!=typeof this.cachedHeight||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,i=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:i})}showMessage(e,t){this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const i=this.stylesForType(this.message.type);this.element.style.border=i.border?`1px solid ${i.border}`:"",(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),null==e?void 0:e.type}stylesForType(e){switch(e){case 1:return{border:this.inputValidationInfoBorder,background:this.inputValidationInfoBackground,foreground:this.inputValidationInfoForeground};case 2:return{border:this.inputValidationWarningBorder,background:this.inputValidationWarningBackground,foreground:this.inputValidationWarningForeground};default:return{border:this.inputValidationErrorBorder,background:this.inputValidationErrorBackground,foreground:this.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e,t,i=()=>e.style.width=o.w(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:t=>{if(!this.message)return null;e=o.R3(t,m(".monaco-inputbox-container")),i();const n={inline:!0,className:"monaco-inputbox-message"},s=this.message.formatContent?(0,r.BO)(this.message.content,n):(0,r.IY)(this.message.content,n);s.classList.add(this.classForType(this.message.type));const a=this.stylesForType(this.message.type);return s.style.backgroundColor=a.background?a.background.toString():"",s.style.color=a.foreground?a.foreground.toString():"",s.style.border=a.border?`1px solid ${a.border}`:"",o.R3(e,s),null},onHide:()=>{this.state="closed"},layout:i}),t=3===this.message.type?n.N("alertErrorMessage","Error: {0}",this.message.content):2===this.message.type?n.N("alertWarningMessage","Warning: {0}",this.message.content):n.N("alertInfoMessage","Info: {0}",this.message.content),s.Z9(t),this.state="open"}_hideMessage(){this.contextViewProvider&&("open"===this.state&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),"open"===this.state&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,t=10===e.charCodeAt(e.length-1)?" ":"";e+t?this.mirror.textContent=e+t:this.mirror.innerText=" ",this.layout()}style(e){this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){const e=this.inputBackground?this.inputBackground.toString():"",t=this.inputForeground?this.inputForeground.toString():"",i=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.input.style.backgroundColor="inherit",this.input.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=o.wn(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const t=this.inputElement,i=t.selectionStart,n=t.selectionEnd,o=t.value;null!==i&&null!==n&&(this.value=o.substr(0,i)+e+o.substr(n),t.setSelectionRange(i+1,i+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar&&this.actionbar.dispose(),super.dispose()}}class b extends v{constructor(e,t,i){super(e,t,i),this.history=new g(i.history,100)}addToHistory(){this.value&&this.value!==this.getCurrentValue()&&this.history.add(this.value)}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),e&&(this.value=e,s.i7(this.value))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,s.i7(this.value))}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()||this.history.last()}}},5707:(e,t,i)=>{"use strict";i.d(t,{kX:()=>S,Bv:()=>L});var n=i(6248),o=i(5976),r=i(553),s=i(4669),a=i(4850),l=i(9802),c=i(6633),u=i(1134);function h(e,t){const i=[];for(let n of t){if(e.start>=n.range.end)continue;if(e.end({range:d(e.range,n),size:e.size}))),s=i.map(((t,i)=>({range:{start:e+i,end:e+i+1},size:t.size})));this.groups=function(...e){return function(e){const t=[];let i=null;for(let n of e){const e=n.range.start,o=n.range.end,r=n.size;i&&r===i.size?i.range.end=o:(i={range:{start:e,end:o},size:r},t.push(i))}return t}(e.reduce(((e,t)=>e.concat(t)),[]))}(o,s,r),this._size=this.groups.reduce(((e,t)=>e+t.size*(t.range.end-t.range.start)),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;let t=0,i=0;for(let n of this.groups){const o=n.range.end-n.range.start,r=i+o*n.size;if(e{for(const i of e)this.getRenderer(t).disposeTemplate(i.templateData),i.templateData=null})),this.cache.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}var m=i(9898),_=i(9488),v=i(3547),b=i(5393),y=i(6268),w=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const C={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements:e=>[e],getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class S{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class x{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class k{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;ti,(null==e?void 0:e.getPosInSet)?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(e,t)=>t+1,(null==e?void 0:e.getRole)?this.getRole=e.getRole.bind(e):this.getRole=e=>"listitem",(null==e?void 0:e.isChecked)?this.isChecked=e.isChecked.bind(e):this.isChecked=e=>{}}}class L{constructor(e,t,i,u=C){if(this.virtualDelegate=t,this.domId="list_id_"+ ++L.InstanceCount,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new b.vp(50),this.splicing=!1,this.dragOverAnimationStopDisposable=o.JT.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=o.JT.None,this.onDragLeaveTimeout=o.JT.None,this.disposables=new o.SL,this._onDidChangeContentHeight=new s.Q5,this._horizontalScrolling=!1,u.horizontalScrolling&&u.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new g;for(const e of i)this.renderers.set(e.templateId,e);this.cache=this.disposables.add(new p(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support","boolean"!=typeof u.mouseSupport||u.mouseSupport),this._horizontalScrolling=(0,n.CJ)(u,(e=>e.horizontalScrolling),C.horizontalScrolling),this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight=void 0===u.additionalScrollHeight?0:u.additionalScrollHeight,this.accessibilityProvider=new D(u.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",(0,n.CJ)(u,(e=>e.transformOptimization),C.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(r.o.addTarget(this.rowsContainer)),this.scrollable=new c.Rm((0,n.CJ)(u,(e=>e.smoothScrolling),!1)?125:0,(e=>(0,f.jL)(e))),this.scrollableElement=this.disposables.add(new l.$Z(this.rowsContainer,{alwaysConsumeMouseWheel:(0,n.CJ)(u,(e=>e.alwaysConsumeMouseWheel),C.alwaysConsumeMouseWheel),horizontal:1,vertical:(0,n.CJ)(u,(e=>e.verticalScrollMode),C.verticalScrollMode),useShadows:(0,n.CJ)(u,(e=>e.useShadows),C.useShadows)},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),(0,a.jt)(this.rowsContainer,r.t.Change)((e=>this.onTouchChange(e)),this,this.disposables),(0,a.jt)(this.scrollableElement.getDomNode(),"scroll")((e=>e.target.scrollTop=0),null,this.disposables),s.ju.map((0,a.jt)(this.domNode,"dragover"),(e=>this.toDragEvent(e)))(this.onDragOver,this,this.disposables),s.ju.map((0,a.jt)(this.domNode,"drop"),(e=>this.toDragEvent(e)))(this.onDrop,this,this.disposables),(0,a.jt)(this.domNode,"dragleave")(this.onDragLeave,this,this.disposables),(0,a.jt)(window,"dragend")(this.onDragEnd,this,this.disposables),this.setRowLineHeight=(0,n.CJ)(u,(e=>e.setRowLineHeight),C.setRowLineHeight),this.setRowHeight=(0,n.CJ)(u,(e=>e.setRowHeight),C.setRowHeight),this.supportDynamicHeights=(0,n.CJ)(u,(e=>e.supportDynamicHeights),C.supportDynamicHeights),this.dnd=(0,n.CJ)(u,(e=>e.dnd),C.dnd),this.layout()}get contentHeight(){return this.rangeMap.size}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const e of this.items)this.measureItemWidth(e);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:(0,f.FK)(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}updateOptions(e){void 0!==e.additionalScrollHeight&&(this.additionalScrollHeight=e.additionalScrollHeight,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),void 0!==e.smoothScrolling&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),void 0!==e.horizontalScrolling&&(this.horizontalScrolling=e.horizontalScrolling)}splice(e,t,i=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,i)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,i=[]){const n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),r={start:e,end:e+t},s=u.e.intersect(n,r),a=new Map;for(let e=s.start;e({id:String(this.itemId++),element:e,templateId:this.virtualDelegate.getTemplateId(e),size:this.virtualDelegate.getHeight(e),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(e),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:o.JT.None})));let p;0===e&&t>=this.items.length?(this.rangeMap=new g,this.rangeMap.splice(0,0,f),p=this.items,this.items=f):(this.rangeMap.splice(e,t,f),p=this.items.splice(e,t,...f));const m=i.length-t,_=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),v=d(c,m),b=u.e.intersect(_,v);for(let e=b.start;ed(e,m))),C=[{start:e,end:e+i.length},...w].map((e=>u.e.intersect(_,e))),S=this.getNextToLastElement(C);for(const e of C)for(let t=e.start;te.element))}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=(0,f.jL)((()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null})))}eventuallyUpdateScrollWidth(){this.horizontalScrolling?this.scrollableElementWidthDelayer.trigger((()=>this.updateScrollWidth())):this.scrollableElementWidthDelayer.cancel()}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)void 0!==t.width&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:0===e?0:e+10})}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}element(e){return this.items[e].element}domElement(e){const t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){let i={height:"number"==typeof e?e:(0,f.If)(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,i.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(i),void 0!==t&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:"number"==typeof t?t:(0,f.FK)(this.domNode)})}render(e,t,i,n,o,r=!1){const s=this.getRenderRange(t,i),a=u.e.relativeComplement(s,e),l=u.e.relativeComplement(e,s),c=this.getNextToLastElement(a);if(r){const t=u.e.intersect(e,s);for(let e=t.start;ethis.onDragStart(n.element,l,e)))}this.horizontalScrolling&&(this.measureItemWidth(n),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width=y.vU?"-moz-fit-content":"fit-content",e.width=(0,f.FK)(e.row.domNode);const t=window.getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.row){const i=this.renderers.get(t.templateId);i&&i.disposeElement&&i.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.additionalScrollHeight}get onMouseClick(){return s.ju.map((0,a.jt)(this.domNode,"click"),(e=>this.toMouseEvent(e)))}get onMouseDblClick(){return s.ju.map((0,a.jt)(this.domNode,"dblclick"),(e=>this.toMouseEvent(e)))}get onMouseMiddleClick(){return s.ju.filter(s.ju.map((0,a.jt)(this.domNode,"auxclick"),(e=>this.toMouseEvent(e))),(e=>1===e.browserEvent.button))}get onMouseDown(){return s.ju.map((0,a.jt)(this.domNode,"mousedown"),(e=>this.toMouseEvent(e)))}get onContextMenu(){return s.ju.any(s.ju.map((0,a.jt)(this.domNode,"contextmenu"),(e=>this.toMouseEvent(e))),s.ju.map((0,a.jt)(this.domNode,r.t.Contextmenu),(e=>this.toGestureEvent(e))))}get onTouchStart(){return s.ju.map((0,a.jt)(this.domNode,"touchstart"),(e=>this.toTouchEvent(e)))}get onTap(){return s.ju.map((0,a.jt)(this.rowsContainer,r.t.Tap),(e=>this.toGestureEvent(e)))}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,i){if(!i.dataTransfer)return;const n=this.dnd.getDragElements(e);if(i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(v.go.RESOURCES,JSON.stringify([t])),i.dataTransfer.setDragImage){let e;this.dnd.getDragLabel&&(e=this.dnd.getDragLabel(n,i)),void 0===e&&(e=String(n.length));const t=(0,f.$)(".monaco-drag-image");t.textContent=e,document.body.appendChild(t),i.dataTransfer.setDragImage(t,-10,-10),setTimeout((()=>document.body.removeChild(t)),0)}this.currentDragData=new S(n),v.P$.CurrentDragAndDropData=new x(n),this.dnd.onDragStart&&this.dnd.onDragStart(this.currentDragData,i)}onDragOver(e){if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),v.P$.CurrentDragAndDropData&&"vscode-ui"===v.P$.CurrentDragAndDropData.getData())return!1;if(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer)return!1;if(!this.currentDragData)if(v.P$.CurrentDragAndDropData)this.currentDragData=v.P$.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new k}const t=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.browserEvent);if(this.canDrop="boolean"==typeof t?t:t.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;let i;if(e.browserEvent.dataTransfer.dropEffect="boolean"!=typeof t&&0===t.effect?"copy":"move",i="boolean"!=typeof t&&t.feedback?t.feedback:void 0===e.index?[-1]:[e.index],i=(0,_.EB)(i).filter((e=>e>=-1&&ee-t)),i=-1===i[0]?[-1]:i,n=this.currentDragFeedback,r=i,Array.isArray(n)&&Array.isArray(r)?(0,_.fS)(n,r):n===r)return!0;var n,r;if(this.currentDragFeedback=i,this.currentDragFeedbackDisposable.dispose(),-1===i[0])this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=(0,o.OF)((()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")}));else{for(const e of i){const t=this.items[e];t.dropTarget=!0,t.row&&t.row.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=(0,o.OF)((()=>{for(const e of i){const t=this.items[e];t.dropTarget=!1,t.row&&t.row.domNode.classList.remove("drop-target")}}))}return!0}onDragLeave(){this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=(0,b.Vg)((()=>this.clearDragOverFeedback()),100)}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,v.P$.CurrentDragAndDropData=void 0,t&&e.browserEvent.dataTransfer&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.browserEvent))}onDragEnd(e){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,v.P$.CurrentDragAndDropData=void 0,this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=o.JT.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const e=(0,f.xQ)(this.domNode).top;this.dragOverAnimationDisposable=(0,f.jt)(this.animateDragAndDropScrollTop.bind(this,e))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=(0,b.Vg)((()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}),1e3),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(void 0===this.dragOverMouseY)return;const t=this.dragOverMouseY-e,i=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>i&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-i))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let i=e;for(;i instanceof HTMLElement&&i!==this.rowsContainer&&t.contains(i);){const e=i.getAttribute("data-index");if(e){const t=Number(e);if(!isNaN(t))return t}i=i.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,i){const n=this.getRenderRange(e,t);let o,r;e===this.elementTop(n.start)?(o=n.start,r=0):n.end-n.start>1&&(o=n.start+1,r=this.elementTop(o)-e);let s=0;for(;;){const a=this.getRenderRange(e,t);let l=!1;for(let e=a.start;e{"use strict";i.d(t,{WK:()=>I,wD:()=>z,aV:()=>K,sx:()=>B,cK:()=>E,hD:()=>A,wn:()=>F,Zo:()=>O});var n=i(5976),o=i(8401),r=i(9488),s=i(9898),a=i(1432),l=i(553),c=i(9069),u=i(4669),h=i(4850);class d extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}var g=i(5707),f=i(1264),p=i(6248);class m{constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach((n=>n.splice(e,t,i)))}}var _,v=i(9870),b=i(5392),y=i(5152),w=i(5321),C=i(5393),S=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},x=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class k{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.trait}`}renderTemplate(e){return e}renderElement(e,t,i){const n=this.renderedElements.findIndex((e=>e.templateData===i));if(n>=0){const e=this.renderedElements[n];this.trait.unrender(i),e.index=t}else{const e={index:t,templateData:i};this.renderedElements.push(e)}this.trait.renderIndex(t,i)}splice(e,t,i){const n=[];for(const o of this.renderedElements)o.index=e+t&&n.push({index:o.index+i-t,templateData:o.templateData});this.renderedElements=n}renderIndexes(e){for(const{index:t,templateData:i}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,i)}disposeTemplate(e){const t=this.renderedElements.findIndex((t=>t.templateData===e));t<0||this.renderedElements.splice(t,1)}}class D{constructor(e){this._trait=e,this.indexes=[],this.sortedIndexes=[],this._onChange=new u.Q5,this.onChange=this._onChange.event}get trait(){return this._trait}get renderer(){return new k(this)}splice(e,t,i){const n=i.length-t,o=e+t,r=[...this.sortedIndexes.filter((t=>tt?i+e:-1)).filter((e=>-1!==e)),...this.sortedIndexes.filter((e=>e>=o)).map((e=>e+n))];this.renderer.splice(e,t,i.length),this._set(r,r)}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort($),t)}_set(e,t,i){const n=this.indexes,o=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const r=H(o,e);return this.renderer.renderIndexes(r),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return(0,r.ry)(this.sortedIndexes,e,$)>=0}dispose(){(0,n.B9)(this._onChange)}}S([s.H],D.prototype,"renderer",null);class L extends D{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}class N{constructor(e,t,i){this.trait=e,this.view=t,this.identityProvider=i}splice(e,t,i){if(!this.identityProvider)return this.trait.splice(e,t,i.map((()=>!1)));const n=this.trait.get().map((e=>this.identityProvider.getId(this.view.element(e)).toString())),o=i.map((e=>n.indexOf(this.identityProvider.getId(e).toString())>-1));this.trait.splice(e,t,o)}}function E(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function A(e){return!!e.classList.contains("monaco-editor")||!e.classList.contains("monaco-list")&&!!e.parentElement&&A(e.parentElement)}class M{constructor(e,t,i){this.list=e,this.view=t,this.disposables=new n.SL;const o=!1!==i.multipleSelectionSupport,r=u.ju.chain((0,h.jt)(t.domNode,"keydown")).filter((e=>!E(e.target))).map((e=>new c.y(e)));r.filter((e=>3===e.keyCode)).on(this.onEnter,this,this.disposables),r.filter((e=>16===e.keyCode)).on(this.onUpArrow,this,this.disposables),r.filter((e=>18===e.keyCode)).on(this.onDownArrow,this,this.disposables),r.filter((e=>11===e.keyCode)).on(this.onPageUpArrow,this,this.disposables),r.filter((e=>12===e.keyCode)).on(this.onPageDownArrow,this,this.disposables),r.filter((e=>9===e.keyCode)).on(this.onEscape,this,this.disposables),o&&r.filter((e=>(a.dz?e.metaKey:e.ctrlKey)&&31===e.keyCode)).on(this.onCtrlA,this,this.disposables)}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection((0,r.w6)(this.list.length),e.browserEvent),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.view.domNode.focus())}dispose(){this.disposables.dispose()}}!function(e){e[e.Idle=0]="Idle",e[e.Typing=1]="Typing"}(_||(_={}));const I=new class{mightProducePrintableCharacter(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30||e.keyCode>=93&&e.keyCode<=102||e.keyCode>=80&&e.keyCode<=90)}};class T{constructor(e,t,i,o){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.delegate=o,this.enabled=!1,this.state=_.Idle,this.automaticKeyboardNavigation=!0,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new n.SL,this.disposables=new n.SL,this.updateOptions(e.options)}updateOptions(e){void 0===e.enableKeyboardNavigation||e.enableKeyboardNavigation?this.enable():this.disable(),void 0!==e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation)}enable(){if(this.enabled)return;const e=u.ju.chain((0,h.jt)(this.view.domNode,"keydown")).filter((e=>!E(e.target))).filter((()=>this.automaticKeyboardNavigation||this.triggered)).map((e=>new c.y(e))).filter((e=>this.delegate.mightProducePrintableCharacter(e))).forEach((e=>{e.stopPropagation(),e.preventDefault()})).map((e=>e.browserEvent.key)).event,t=u.ju.debounce(e,(()=>null),800);u.ju.reduce(u.ju.any(e,t),((e,t)=>null===t?null:(e||"")+t))(this.onInput,this,this.enabledDisposables),t(this.onClear,this,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var e;const t=this.list.getFocus();if(t.length>0&&t[0]===this.previouslyFocused){const i=null===(e=this.list.options.accessibilityProvider)||void 0===e?void 0:e.getAriaLabel(this.list.element(t[0]));i&&(0,y.Z9)(i)}this.previouslyFocused=-1}onInput(e){if(!e)return this.state=_.Idle,void(this.triggered=!1);const t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===_.Idle?1:0;this.state=_.Typing;for(let t=0;t!E(e.target))).map((e=>new c.y(e))).filter((e=>!(2!==e.keyCode||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey))).on(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(0===t.length)return;const i=this.view.domElement(t[0]);if(!i)return;const n=i.querySelector("[tabIndex]");if(!(n&&n instanceof HTMLElement&&-1!==n.tabIndex))return;const o=window.getComputedStyle(n);"hidden"!==o.visibility&&"none"!==o.display&&(e.preventDefault(),e.stopPropagation(),n.focus())}dispose(){this.disposables.dispose()}}function O(e){return a.dz?e.browserEvent.metaKey:e.browserEvent.ctrlKey}function F(e){return e.browserEvent.shiftKey}const P={isSelectionSingleChangeEvent:O,isSelectionRangeChangeEvent:F};class B{constructor(e){this.list=e,this.disposables=new n.SL,this._onPointer=new u.Q5,this.onPointer=this._onPointer.event,this.multipleSelectionSupport=!(!1===e.options.multipleSelectionSupport),this.multipleSelectionSupport&&(this.multipleSelectionController=e.options.multipleSelectionController||P),this.mouseSupport=void 0===e.options.mouseSupport||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(l.o.addTarget(e.getHTMLElement()))),u.ju.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}isSelectionSingleChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):a.dz?e.browserEvent.metaKey:e.browserEvent.ctrlKey}isSelectionRangeChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):e.browserEvent.shiftKey}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){A(e.browserEvent.target)||document.activeElement!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(A(e.browserEvent.target))return;const t=void 0===e.index?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport)return;if(E(e.browserEvent.target)||A(e.browserEvent.target))return;const t=e.index;return void 0===t?(this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),void this.list.setAnchor(void 0)):this.multipleSelectionSupport&&this.isSelectionRangeChangeEvent(e)||this.multipleSelectionSupport&&this.isSelectionChangeEvent(e)?this.changeSelection(e):(this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),(i=e.browserEvent)instanceof MouseEvent&&2===i.button||this.list.setSelection([t],e.browserEvent),void this._onPointer.fire(e));var i}onDoubleClick(e){if(E(e.browserEvent.target)||A(e.browserEvent.target))return;if(this.multipleSelectionSupport&&this.isSelectionChangeEvent(e))return;const t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){const t=e.index;let i=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){if(void 0===i){const e=this.list.getFocus()[0];i=null!=e?e:t,this.list.setAnchor(i)}const n=Math.min(i,t),o=Math.max(i,t),s=(0,r.w6)(n,o+1),a=this.list.getSelection(),l=function(e,t){const i=e.indexOf(t);if(-1===i)return[];const n=[];let o=i-1;for(;o>=0&&e[o]===t-(i-o);)n.push(e[o--]);for(n.reverse(),o=i;o=e.length)i.push(t[o++]);else if(o>=t.length)i.push(e[n++]);else{if(e[n]===t[o]){n++,o++;continue}e[n]e!==t));this.list.setFocus([t]),this.list.setAnchor(t),i.length===n.length?this.list.setSelection([...n,t],e.browserEvent):this.list.setSelection(n,e.browserEvent)}}dispose(){this.disposables.dispose()}}class z{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){const t=this.selectorSuffix&&`.${this.selectorSuffix}`,i=[];e.listBackground&&(e.listBackground.isOpaque()?i.push(`.monaco-list${t} .monaco-list-rows { background: ${e.listBackground}; }`):a.dz||console.warn(`List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),e.listFocusBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listFocusAndSelectionBackground&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }\n\t\t\t`),e.listFocusAndSelectionForeground&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }\n\t\t\t`),e.listInactiveFocusForeground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveFocusBackground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(i.push(`.monaco-list${t} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&i.push(`.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&i.push(`.monaco-list${t}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&i.push(`.monaco-list${t} .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`),e.listSelectionOutline&&i.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listFocusOutline&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t`),e.listInactiveFocusOutline&&i.push(`.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&i.push(`.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropBackground&&i.push(`\n\t\t\t\t.monaco-list${t}.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-rows.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-row.drop-target { background-color: ${e.listDropBackground} !important; color: inherit !important; }\n\t\t\t`),e.listFilterWidgetBackground&&i.push(`.monaco-list-type-filter { background-color: ${e.listFilterWidgetBackground} }`),e.listFilterWidgetOutline&&i.push(`.monaco-list-type-filter { border: 1px solid ${e.listFilterWidgetOutline}; }`),e.listFilterWidgetNoMatchesOutline&&i.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${e.listFilterWidgetNoMatchesOutline}; }`),e.listMatchesShadow&&i.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${e.listMatchesShadow}; }`),e.tableColumnsBorder&&i.push(`\n\t\t\t\t.monaco-table:hover > .monaco-split-view2,\n\t\t\t\t.monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: ${e.tableColumnsBorder};\n\t\t\t}`),this.styleElement.textContent=i.join("\n")}}const W={listFocusBackground:f.Il.fromHex("#7FB0D0"),listActiveSelectionBackground:f.Il.fromHex("#0E639C"),listActiveSelectionForeground:f.Il.fromHex("#FFFFFF"),listFocusAndSelectionBackground:f.Il.fromHex("#094771"),listFocusAndSelectionForeground:f.Il.fromHex("#FFFFFF"),listInactiveSelectionBackground:f.Il.fromHex("#3F3F46"),listHoverBackground:f.Il.fromHex("#2A2D2E"),listDropBackground:f.Il.fromHex("#383B3D"),treeIndentGuidesStroke:f.Il.fromHex("#a9a9a9"),tableColumnsBorder:f.Il.fromHex("#cccccc").transparent(.2)},V={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){}}};function H(e,t){const i=[];let n=0,o=0;for(;n=e.length)i.push(t[o++]);else if(o>=t.length)i.push(e[n++]);else{if(e[n]===t[o]){i.push(e[n]),n++,o++;continue}e[n]e-t;class U{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map((t=>t.renderTemplate(e)))}renderElement(e,t,i,n){let o=0;for(const r of this.renderers)r.renderElement(e,t,i[o++],n)}disposeElement(e,t,i,n){let o=0;for(const r of this.renderers)r.disposeElement&&r.disposeElement(e,t,i[o],n),o+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class j{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return e}renderElement(e,t,i){const n=this.accessibilityProvider.getAriaLabel(e);n?i.setAttribute("aria-label",n):i.removeAttribute("aria-label");const o=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);"number"==typeof o?i.setAttribute("aria-level",`${o}`):i.removeAttribute("aria-level")}disposeTemplate(e){}}class q{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(e,t)}onDragOver(e,t,i,n){return this.dnd.onDragOver(e,t,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}drop(e,t,i,n){this.dnd.drop(e,t,i,n)}}class K{constructor(e,t,i,o,r=V){var s;this.user=e,this._options=r,this.focus=new D("focused"),this.anchor=new D("anchor"),this.eventBufferer=new u.E7,this._ariaLabel="",this.disposables=new n.SL,this._onDidDispose=new u.Q5,this.onDidDispose=this._onDidDispose.event;const a=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?null===(s=this._options.accessibilityProvider)||void 0===s?void 0:s.getWidgetRole():"list";this.selection=new L("listbox"!==a),(0,p.jB)(r,W,!1);const l=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=r.accessibilityProvider,this.accessibilityProvider&&(l.push(new j(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant&&this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant,this,this.disposables)),o=o.map((e=>new U(e.templateId,[...l,e])));const c=Object.assign(Object.assign({},r),{dnd:r.dnd&&new q(this,r.dnd)});if(this.view=new g.Bv(t,i,o,c),this.view.domNode.setAttribute("role",a),r.styleController)this.styleController=r.styleController(this.view.domId);else{const e=(0,w.dS)(this.view.domNode);this.styleController=new z(e,this.view.domId)}if(this.spliceable=new m([new N(this.focus,this.view,r.identityProvider),new N(this.selection,this.view,r.identityProvider),new N(this.anchor,this.view,r.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.onDidFocus=u.ju.map((0,h.jt)(this.view.domNode,"focus",!0),(()=>null)),this.onDidBlur=u.ju.map((0,h.jt)(this.view.domNode,"blur",!0),(()=>null)),this.disposables.add(new R(this,this.view)),"boolean"!=typeof r.keyboardSupport||r.keyboardSupport){const e=new M(this,this.view,r);this.disposables.add(e)}if(r.keyboardNavigationLabelProvider){const e=r.keyboardNavigationDelegate||I;this.typeLabelController=new T(this,this.view,r.keyboardNavigationLabelProvider,e),this.disposables.add(this.typeLabelController)}this.mouseController=this.createMouseController(r),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),r.multipleSelectionSupport&&this.view.domNode.setAttribute("aria-multiselectable","true")}get onDidChangeFocus(){return u.ju.map(this.eventBufferer.wrapEvent(this.focus.onChange),(e=>this.toListEvent(e)))}get onDidChangeSelection(){return u.ju.map(this.eventBufferer.wrapEvent(this.selection.onChange),(e=>this.toListEvent(e)))}get domId(){return this.view.domId}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=u.ju.chain((0,h.jt)(this.view.domNode,"keydown")).map((e=>new c.y(e))).filter((t=>e=58===t.keyCode||t.shiftKey&&68===t.keyCode)).map(h.p7).filter((()=>!1)).event,i=u.ju.chain((0,h.jt)(this.view.domNode,"keyup")).forEach((()=>e=!1)).map((e=>new c.y(e))).filter((e=>58===e.keyCode||e.shiftKey&&68===e.keyCode)).map(h.p7).map((({browserEvent:e})=>{const t=this.getFocus(),i=t.length?t[0]:void 0;return{index:i,element:void 0!==i?this.view.element(i):void 0,anchor:void 0!==i?this.view.domElement(i):this.view.domNode,browserEvent:e}})).event,n=u.ju.chain(this.view.onContextMenu).filter((t=>!e)).map((({element:e,index:t,browserEvent:i})=>({element:e,index:t,anchor:{x:i.pageX+1,y:i.pageY},browserEvent:i}))).event;return u.ju.any(t,i,n)}get onKeyDown(){return(0,h.jt)(this.view.domNode,"keydown")}createMouseController(e){return new B(this)}updateOptions(e={}){this._options=Object.assign(Object.assign({},this._options),e),this.typeLabelController&&this.typeLabelController.updateOptions(this._options),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new d(this.user,`Invalid start index: ${e}`);if(t<0)throw new d(this.user,`Invalid delete count: ${t}`);0===t&&0===i.length||this.eventBufferer.bufferEvents((()=>this.spliceable.splice(e,t,i)))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(const t of e)if(t<0||t>=this.length)throw new d(this.user,`Invalid index ${t}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map((e=>this.view.element(e)))}setAnchor(e){if(void 0!==e){if(e<0||e>=this.length)throw new d(this.user,`Invalid index ${e}`);this.anchor.set([e])}else this.anchor.set([])}getAnchor(){return(0,r.Xh)(this.anchor.get(),void 0)}setFocus(e,t){for(const t of e)if(t<0||t>=this.length)throw new d(this.user,`Invalid index ${t}`);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(0===this.length)return;const o=this.focus.get(),r=this.findNextIndex(o.length>0?o[0]+e:0,t,n);r>-1&&this.setFocus([r],i)}focusPrevious(e=1,t=!1,i,n){if(0===this.length)return;const o=this.focus.get(),r=this.findPreviousIndex(o.length>0?o[0]-e:0,t,n);r>-1&&this.setFocus([r],i)}focusNextPage(e,t){return x(this,void 0,void 0,(function*(){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=0===i?0:i-1;const n=this.view.element(i),o=this.getFocusedElements()[0];if(o!==n){const n=this.findPreviousIndex(i,!1,t);n>-1&&o!==this.view.element(n)?this.setFocus([n],e):this.setFocus([i],e)}else{const n=this.view.getScrollTop();this.view.setScrollTop(n+this.view.renderHeight-this.view.elementHeight(i)),this.view.getScrollTop()!==n&&(this.setFocus([]),yield(0,C.Vs)(0),yield this.focusNextPage(e,t))}}))}focusPreviousPage(e,t){return x(this,void 0,void 0,(function*(){let i;const n=this.view.getScrollTop();i=0===n?this.view.indexAt(n):this.view.indexAfter(n-1);const o=this.view.element(i),r=this.getFocusedElements()[0];if(r!==o){const n=this.findNextIndex(i,!1,t);n>-1&&r!==this.view.element(n)?this.setFocus([n],e):this.setFocus([i],e)}else{const i=n;this.view.setScrollTop(n-this.view.renderHeight),this.view.getScrollTop()!==i&&(this.setFocus([]),yield(0,C.Vs)(0),yield this.focusPreviousPage(e,t))}}))}focusLast(e,t){if(0===this.length)return;const i=this.findPreviousIndex(this.length-1,!1,t);i>-1&&this.setFocus([i],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,i){if(0===this.length)return;const n=this.findNextIndex(e,!1,i);n>-1&&this.setFocus([n],t)}findNextIndex(e,t=!1,i){for(let n=0;n=this.length&&!t)return-1;if(e%=this.length,!i||i(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,i){for(let n=0;nthis.view.element(e)))}reveal(e,t){if(e<0||e>=this.length)throw new d(this.user,`Invalid index ${e}`);const i=this.view.getScrollTop(),n=this.view.elementTop(e),r=this.view.elementHeight(e);if((0,o.hj)(t)){const e=r-this.view.renderHeight;this.view.setScrollTop(e*(0,v.u)(t,0,1)+n)}else{const e=n+r,t=i+this.view.renderHeight;n=t||(n=t&&r>=this.view.renderHeight?this.view.setScrollTop(n):e>=t&&this.view.setScrollTop(e-this.view.renderHeight))}}getRelativeTop(e){if(e<0||e>=this.length)throw new d(this.user,`Invalid index ${e}`);const t=this.view.getScrollTop(),i=this.view.elementTop(e),n=this.view.elementHeight(e);if(it+this.view.renderHeight)return null;const o=n-this.view.renderHeight;return Math.abs((t-i)/o)}getHTMLElement(){return this.view.domNode}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map((e=>this.view.element(e))),browserEvent:t}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var e;const t=this.focus.get();if(t.length>0){let i;(null===(e=this.accessibilityProvider)||void 0===e?void 0:e.getActiveDescendantId)&&(i=this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),this.view.domNode.setAttribute("aria-activedescendant",i||this.view.getElementDomId(t[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",0===e.length),this.view.domNode.classList.toggle("selection-single",1===e.length),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}S([s.H],K.prototype,"onDidChangeFocus",null),S([s.H],K.prototype,"onDidChangeSelection",null),S([s.H],K.prototype,"onContextMenu",null)},6542:(e,t,i)=>{"use strict";i.d(t,{S:()=>n});const n="monaco-mouse-cursor-text"},3098:(e,t,i)=>{"use strict";i.d(t,{l:()=>n,g:()=>v});var n,o=i(5976),r=i(1432),s=i(553),a=i(4669),l=i(5321),c=i(4850),u=i(5393),h=i(9898),d=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};!function(e){e.North="north",e.South="south",e.East="east",e.West="west"}(n||(n={}));const g=new a.Q5,f=new a.Q5;class p{constructor(){this.disposables=new o.SL}get onPointerMove(){return this.disposables.add(new c.Yp(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new c.Yp(window,"mouseup")).event}dispose(){this.disposables.dispose()}}d([h.H],p.prototype,"onPointerMove",null),d([h.H],p.prototype,"onPointerUp",null);class m{constructor(e){this.el=e,this.disposables=new o.SL}get onPointerMove(){return this.disposables.add(new c.Yp(this.el,s.t.Change)).event}get onPointerUp(){return this.disposables.add(new c.Yp(this.el,s.t.End)).event}dispose(){this.disposables.dispose()}}d([h.H],m.prototype,"onPointerMove",null),d([h.H],m.prototype,"onPointerUp",null);class _{constructor(e){this.factory=e}get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}dispose(){}}d([h.H],_.prototype,"onPointerMove",null),d([h.H],_.prototype,"onPointerUp",null);class v extends o.JT{constructor(e,t,i){super(),this.hoverDelay=300,this.hoverDelayer=this._register(new u.vp(this.hoverDelay)),this._state=3,this._onDidEnablementChange=this._register(new a.Q5),this.onDidEnablementChange=this._onDidEnablementChange.event,this._onDidStart=this._register(new a.Q5),this.onDidStart=this._onDidStart.event,this._onDidChange=this._register(new a.Q5),this.onDidChange=this._onDidChange.event,this._onDidReset=this._register(new a.Q5),this.onDidReset=this._onDidReset.event,this._onDidEnd=this._register(new a.Q5),this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.orthogonalStartSashDisposables=this._register(new o.SL),this.orthogonalStartDragHandleDisposables=this._register(new o.SL),this.orthogonalEndSashDisposables=this._register(new o.SL),this.orthogonalEndDragHandleDisposables=this._register(new o.SL),this.el=(0,l.R3)(e,(0,l.$)(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),r.dz&&this.el.classList.add("mac");const n=this._register(new c.Yp(this.el,"mousedown")).event;this._register(n((e=>this.onPointerStart(e,new p)),this));const h=this._register(new c.Yp(this.el,"dblclick")).event;this._register(h(this.onPointerDoublePress,this));const d=this._register(new c.Yp(this.el,"mouseenter")).event;this._register(d((()=>v.onMouseEnter(this))));const _=this._register(new c.Yp(this.el,"mouseleave")).event;this._register(_((()=>v.onMouseLeave(this)))),this._register(s.o.addTarget(this.el));const b=a.ju.map(this._register(new c.Yp(this.el,s.t.Start)).event,(e=>{var t;return Object.assign(Object.assign({},e),{target:null!==(t=e.initialTarget)&&void 0!==t?t:null})}));this._register(b((e=>this.onPointerStart(e,new m(this.el))),this));const y=this._register(new c.Yp(this.el,s.t.Tap)).event,w=a.ju.map(a.ju.filter(a.ju.debounce(y,((e,t)=>{var i;return{event:t,count:(null!==(i=null==e?void 0:e.count)&&void 0!==i?i:0)+1}}),250),(({count:e})=>2===e)),(({event:e})=>{var t;return Object.assign(Object.assign({},e),{target:null!==(t=e.initialTarget)&&void 0!==t?t:null})}));this._register(w(this.onPointerDoublePress,this)),"number"==typeof i.size?(this.size=i.size,0===i.orientation?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=4,this._register(g.event((e=>{this.size=e,this.layout()})))),this._register(f.event((e=>this.hoverDelay=e))),this.hidden=!1,this.layoutProvider=t,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,1===this.orientation?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",!1),this.layout()}get state(){return this._state}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",0===e),this.el.classList.toggle("minimum",1===e),this.el.classList.toggle("maximum",2===e),this._state=e,this._onDidEnablementChange.fire(e))}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=t=>{this.orthogonalStartDragHandleDisposables.clear(),0!==t&&(this._orthogonalStartDragHandle=(0,l.R3)(this.el,(0,l.$)(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add((0,o.OF)((()=>this._orthogonalStartDragHandle.remove()))),this.orthogonalEndDragHandleDisposables.add(new c.Yp(this._orthogonalStartDragHandle,"mouseenter")).event((()=>v.onMouseEnter(e)),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new c.Yp(this._orthogonalStartDragHandle,"mouseleave")).event((()=>v.onMouseLeave(e)),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange(t,this)),t(e.state)}this._orthogonalStartSash=e}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=t=>{this.orthogonalEndDragHandleDisposables.clear(),0!==t&&(this._orthogonalEndDragHandle=(0,l.R3)(this.el,(0,l.$)(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add((0,o.OF)((()=>this._orthogonalEndDragHandle.remove()))),this.orthogonalEndDragHandleDisposables.add(new c.Yp(this._orthogonalEndDragHandle,"mouseenter")).event((()=>v.onMouseEnter(e)),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new c.Yp(this._orthogonalEndDragHandle,"mouseleave")).event((()=>v.onMouseLeave(e)),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange(t,this)),t(e.state)}this._orthogonalEndSash=e}onPointerStart(e,t){l.zB.stop(e);let i=!1;if(!e.__orthogonalSashEvent){const n=this.getOrthogonalSash(e);n&&(i=!0,e.__orthogonalSashEvent=!0,n.onPointerStart(e,new _(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new _(t))),!this.state)return;const n=[...(0,l.H$)("iframe"),...(0,l.H$)("webview")];for(const e of n)e.style.pointerEvents="none";const s=e.pageX,a=e.pageY,c=e.altKey,u={startX:s,currentX:s,startY:a,currentY:a,altKey:c};this.el.classList.add("active"),this._onDidStart.fire(u);const h=(0,l.dS)(this.el),d=()=>{let e="";e=i?"all-scroll":1===this.orientation?1===this.state?"s-resize":2===this.state?"n-resize":r.dz?"row-resize":"ns-resize":1===this.state?"e-resize":2===this.state?"w-resize":r.dz?"col-resize":"ew-resize",h.textContent=`* { cursor: ${e} !important; }`},g=new o.SL;d(),i||this.onDidEnablementChange(d,null,g),t.onPointerMove((e=>{l.zB.stop(e,!1);const t={startX:s,currentX:e.pageX,startY:a,currentY:e.pageY,altKey:c};this._onDidChange.fire(t)}),null,g),t.onPointerUp((e=>{l.zB.stop(e,!1),this.el.removeChild(h),this.el.classList.remove("active"),this._onDidEnd.fire(),g.dispose();for(const e of n)e.style.pointerEvents="auto"}),null,g),g.add(t)}onPointerDoublePress(e){const t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger((()=>e.el.classList.add("hover")),e.hoverDelay).then(void 0,(()=>{})),!t&&e.linkedSash&&v.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&v.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){v.onMouseLeave(this)}layout(){if(0===this.orientation){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}hide(){this.hidden=!0,this.el.style.display="none",this.el.setAttribute("aria-hidden","true")}getOrthogonalSash(e){if(e.target&&e.target instanceof HTMLElement)return e.target.classList.contains("orthogonal-drag-handle")?e.target.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash:void 0}dispose(){super.dispose(),this.el.remove()}}},9802:(e,t,i)=>{"use strict";i.d(t,{s$:()=>A,NB:()=>N,$Z:()=>E});var n=i(5321),o=i(8626),r=i(3938),s=i(7974),a=i(3794),l=i(5393);class c extends a.${constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",void 0!==e.top&&(this.bgDomNode.style.top="0px"),void 0!==e.left&&(this.bgDomNode.style.left="0px"),void 0!==e.bottom&&(this.bgDomNode.style.bottom="0px"),void 0!==e.right&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...e.icon.classNamesArray),this.domNode.style.position="absolute",this.domNode.style.width="11px",this.domNode.style.height="11px",void 0!==e.top&&(this.domNode.style.top=e.top+"px"),void 0!==e.left&&(this.domNode.style.left=e.left+"px"),void 0!==e.bottom&&(this.domNode.style.bottom=e.bottom+"px"),void 0!==e.right&&(this.domNode.style.right=e.right+"px"),this._mouseMoveMonitor=this._register(new s.Z),this.onmousedown(this.bgDomNode,(e=>this._arrowMouseDown(e))),this.onmousedown(this.domNode,(e=>this._arrowMouseDown(e))),this._mousedownRepeatTimer=this._register(new l.zh),this._mousedownScheduleRepeatTimer=this._register(new l._F)}_arrowMouseDown(e){this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet((()=>{this._mousedownRepeatTimer.cancelAndSet((()=>this._onActivate()),1e3/24)}),200),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,s.e,(e=>{}),(()=>{this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancel()})),e.preventDefault()}}var u=i(5976);class h extends u.JT{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new l._F)}applyVisibilitySetting(e){return 2!==this._visibility&&(3===this._visibility||e)}setShouldBeVisible(e){const t=this.applyVisibilitySetting(e);this._shouldBeVisible!==t&&(this._shouldBeVisible=t,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet((()=>{this._domNode&&this._domNode.setClassName(this._visibleClassName)}),0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(e?" fade":"")))}}var d=i(1432);class g extends a.${constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new h(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._mouseMoveMonitor=this._register(new s.Z),this._shouldRender=!0,this.domNode=(0,o.X)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this.onmousedown(this.domNode.domNode,(e=>this._domNodeMouseDown(e)))}_createArrow(e){const t=this._register(new c(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=(0,o.X)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),"number"==typeof i&&this.slider.setWidth(i),"number"==typeof n&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,(e=>{e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(()=>{})))})),this.onclick(this.slider.domNode,(e=>{e.leftButton&&e.stopPropagation()}))}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodeMouseDown(e){e.target===this.domNode.domNode&&this._onMouseDown(e)}delegateMouseDown(e){const t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),o=this._sliderMousePosition(e);i<=o&&o<=n?e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(()=>{}))):this._onMouseDown(e)}_onMouseDown(e){let t,i;if(e.target===this.domNode.domNode&&"number"==typeof e.browserEvent.offsetX&&"number"==typeof e.browserEvent.offsetY)t=e.browserEvent.offsetX,i=e.browserEvent.offsetY;else{const o=n.i(this.domNode.domNode);t=e.posx-o.left,i=e.posy-o.top}const o=this._mouseDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(o):this._scrollbarState.getDesiredScrollPositionFromOffset(o)),e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(()=>{})))}_sliderMouseDown(e,t){const i=this._sliderMousePosition(e),n=this._sliderOrthogonalMousePosition(e),o=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,s.e,(e=>{const t=this._sliderOrthogonalMousePosition(e),r=Math.abs(t-n);if(d.ED&&r>140)return void this._setDesiredScrollPositionNow(o.getScrollPosition());const s=this._sliderMousePosition(e)-i;this._setDesiredScrollPositionNow(o.getDesiredScrollPositionFromDelta(s))}),(()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd(),t()})),this._host.onDragStart()}_setDesiredScrollPositionNow(e){const t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}class f{constructor(e,t,i,n,o,r){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(i),this._arrowSize=Math.round(e),this._visibleSize=n,this._scrollSize=o,this._scrollPosition=r,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new f(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){const t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)}setScrollSize(e){const t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)}setScrollPosition(e){const t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)}setScrollbarSize(e){this._scrollbarSize=e}static _computeValues(e,t,i,n,o){const r=Math.max(0,i-e),s=Math.max(0,r-2*t),a=n>0&&n>i;if(!a)return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(s),computedSliderRatio:0,computedSliderPosition:0};const l=Math.round(Math.max(20,Math.floor(i*s/n))),c=(s-l)/(n-i),u=o*c;return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(l),computedSliderRatio:c,computedSliderPosition:Math.round(u)}}_refreshComputedValues(){const e=f._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize;let i=this._scrollPosition;return tthis._host.onMouseWheel(new r.q(null,1,0))}),this._createArrow({className:"scra",icon:_,top:i,left:void 0,bottom:void 0,right:e,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new r.q(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(e,t){return e}_sliderMousePosition(e){return e.posx}_sliderOrthogonalMousePosition(e){return e.posy}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}}const b=(0,p.CM)("scrollbar-button-up",p.lA.triangleUp),y=(0,p.CM)("scrollbar-button-down",p.lA.triangleDown);class w extends g{constructor(e,t,i){const n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new f(t.verticalHasArrows?t.arrowSize:0,2===t.vertical?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,o.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){const e=(t.arrowSize-11)/2,i=(t.verticalScrollbarSize-11)/2;this._createArrow({className:"scra",icon:b,top:e,left:i,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new r.q(null,0,1))}),this._createArrow({className:"scra",icon:y,top:void 0,left:i,bottom:e,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new r.q(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(e,t){return t}_sliderMousePosition(e){return e.posy}_sliderOrthogonalMousePosition(e){return e.posx}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}}var C=i(4669),S=i(6633),x=i(6268);class k{constructor(e,t,i){this.timestamp=e,this.deltaX=t,this.deltaY=i,this.score=0}}class D{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(-1===this._front&&-1===this._rear)return!1;let e=1,t=0,i=1,n=this._rear;for(;;){const o=n===this._front?e:Math.pow(2,-i);if(e-=o,t+=this._memory[n].score*o,n===this._front)break;n=(this._capacity+n-1)%this._capacity,i++}return t<=.5}accept(e,t,i){const n=new k(e,t,i);n.score=this._computeScore(n),-1===this._front&&-1===this._rear?(this._memory[0]=n,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=n)}_computeScore(e){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let t=.5;return-1===this._front&&-1===this._rear||this._memory[this._rear],this._isAlmostInt(e.deltaX)&&this._isAlmostInt(e.deltaY)||(t+=.25),Math.min(Math.max(t,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}}D.INSTANCE=new D;class L extends a.${constructor(e,t,i){super(),this._onScroll=this._register(new C.Q5),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new C.Q5),e.style.overflow="hidden",this._options=function(e){const t={lazyRender:void 0!==e.lazyRender&&e.lazyRender,className:void 0!==e.className?e.className:"",useShadows:void 0===e.useShadows||e.useShadows,handleMouseWheel:void 0===e.handleMouseWheel||e.handleMouseWheel,flipAxes:void 0!==e.flipAxes&&e.flipAxes,consumeMouseWheelIfScrollbarIsNeeded:void 0!==e.consumeMouseWheelIfScrollbarIsNeeded&&e.consumeMouseWheelIfScrollbarIsNeeded,alwaysConsumeMouseWheel:void 0!==e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:void 0!==e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:void 0!==e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:void 0!==e.fastScrollSensitivity?e.fastScrollSensitivity:5,scrollPredominantAxis:void 0===e.scrollPredominantAxis||e.scrollPredominantAxis,mouseWheelSmoothScroll:void 0===e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:void 0!==e.arrowSize?e.arrowSize:11,listenOnDomNode:void 0!==e.listenOnDomNode?e.listenOnDomNode:null,horizontal:void 0!==e.horizontal?e.horizontal:1,horizontalScrollbarSize:void 0!==e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:void 0!==e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:void 0!==e.horizontalHasArrows&&e.horizontalHasArrows,vertical:void 0!==e.vertical?e.vertical:1,verticalScrollbarSize:void 0!==e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:void 0!==e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:void 0!==e.verticalSliderSize?e.verticalSliderSize:0,scrollByPage:void 0!==e.scrollByPage&&e.scrollByPage};return t.horizontalSliderSize=void 0!==e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=void 0!==e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,d.dz&&(t.className+=" mac"),t}(t),this._scrollable=i,this._register(this._scrollable.onScroll((e=>{this._onWillScroll.fire(e),this._onDidScroll(e),this._onScroll.fire(e)})));const n={onMouseWheel:e=>this._onMouseWheel(e),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new w(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new v(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=(0,o.X)(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=(0,o.X)(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=(0,o.X)(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,(e=>this._onMouseOver(e))),this.onnonbubblingmouseout(this._listenOnDomNode,(e=>this._onMouseOut(e))),this._hideTimeout=this._register(new l._F),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=(0,u.B9)(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarMouseDown(e){this._verticalScrollbar.delegateMouseDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,d.dz&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){void 0!==e.handleMouseWheel&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),void 0!==e.mouseWheelScrollSensitivity&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),void 0!==e.fastScrollSensitivity&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),void 0!==e.scrollPredominantAxis&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),void 0!==e.horizontalScrollbarSize&&this._horizontalScrollbar.updateScrollbarSize(e.horizontalScrollbarSize),this._options.lazyRender||this._render()}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=(0,u.B9)(this._mouseWheelToDispose),e)){const e=e=>{this._onMouseWheel(new r.q(e))};this._mouseWheelToDispose.push(n.nm(this._listenOnDomNode,n.tw.MOUSE_WHEEL,e,{passive:!1}))}}_onMouseWheel(e){const t=D.INSTANCE;{const i=window.devicePixelRatio/(0,x.ie)();d.ED||d.IJ?t.accept(Date.now(),e.deltaX/i,e.deltaY/i):t.accept(Date.now(),e.deltaX,e.deltaY)}let i=!1;if(e.deltaY||e.deltaX){let n=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(Math.abs(n)>=Math.abs(o)?o=0:n=0),this._options.flipAxes&&([n,o]=[o,n]);const r=!d.dz&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!r||o||(o=n,n=0),e.browserEvent&&e.browserEvent.altKey&&(o*=this._options.fastScrollSensitivity,n*=this._options.fastScrollSensitivity);const s=this._scrollable.getFutureScrollPosition();let a={};if(n){const e=s.scrollTop-50*n;this._verticalScrollbar.writeScrollPosition(a,e)}if(o){const e=s.scrollLeft-50*o;this._horizontalScrollbar.writeScrollPosition(a,e)}a=this._scrollable.validateScrollPosition(a),(s.scrollLeft!==a.scrollLeft||s.scrollTop!==a.scrollTop)&&(this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),i=!0)}let n=i;!n&&this._options.alwaysConsumeMouseWheel&&(n=!0),!n&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(n=!0),n&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,n=i?" left":"",o=t?" top":"",r=i||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${o}`),this._topLeftShadowDomNode.setClassName(`shadow${r}${o}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseOut(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet((()=>this._hide()),500)}}class N extends L{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new S.Rm(0,(e=>n.jL(e)));super(e,t,i),this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class E extends L{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class A extends N{constructor(e,t){super(e,t),this._element=e,this.onScroll((e=>{e.scrollTopChanged&&(this._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this._element.scrollLeft=e.scrollLeft)})),this.scanDomNode()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}},3937:(e,t,i)=>{"use strict";i.d(t,{M:()=>b,z:()=>y});var n=i(5976),o=i(4669),r=i(8401),s=i(9870),a=i(9488),l=i(3098),c=i(1264),u=i(4850),h=i(5321),d=i(9802),g=i(6633);const f={separatorBorder:c.Il.transparent};class p{constructor(e,t,i,n){this.container=e,this.view=t,this.disposable=n,this._cachedVisibleSize=void 0,"number"==typeof i?(this._size=i,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=i.cachedVisibleSize)}set size(e){this._size=e}get size(){return this._size}get visible(){return void 0===this._cachedVisibleSize}setVisible(e,t){e!==this.visible&&(e?(this.size=(0,s.u)(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize="number"==typeof t?t:this.size,this.size=0),this.container.classList.toggle("visible",e),this.view.setVisible&&this.view.setVisible(e))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}layout(e,t){this.layoutContainer(e),this.view.layout(this.size,e,t)}dispose(){return this.disposable.dispose(),this.view}}class m extends p{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class _ extends p{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var v,b;!function(e){e[e.Idle=0]="Idle",e[e.Busy=1]="Busy"}(v||(v={})),function(e){e.Distribute={type:"distribute"},e.Split=function(e){return{type:"split",index:e}},e.Invisible=function(e){return{type:"invisible",cachedVisibleSize:e}}}(b||(b={}));class y extends n.JT{constructor(e,t={}){var i,n;super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=v.Idle,this._onDidSashChange=this._register(new o.Q5),this.onDidSashChange=this._onDidSashChange.event,this._onDidSashReset=this._register(new o.Q5),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.orientation=r.o8(t.orientation)?0:t.orientation,this.inverseAltBehavior=!!t.inverseAltBehavior,this.proportionalLayout=!!r.o8(t.proportionalLayout)||!!t.proportionalLayout,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(0===this.orientation?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=(0,h.R3)(this.el,(0,h.$)(".sash-container")),this.viewContainer=(0,h.$)(".split-view-container"),this.scrollable=new g.Rm(125,h.jL),this.scrollableElement=this._register(new d.$Z(this.viewContainer,{vertical:0===this.orientation?null!==(i=t.scrollbarVisibility)&&void 0!==i?i:1:2,horizontal:1===this.orientation?null!==(n=t.scrollbarVisibility)&&void 0!==n?n:1:2},this.scrollable)),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll((e=>{this.viewContainer.scrollTop=e.scrollTop,this.viewContainer.scrollLeft=e.scrollLeft}))),(0,h.R3)(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||f),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach(((e,t)=>{const i=r.o8(e.visible)||e.visible?e.size:{type:"invisible",cachedVisibleSize:e.size},n=e.view;this.doAddView(n,i,t,!0)})),this.contentSize=this.viewItems.reduce(((e,t)=>e+t.size),0),this.saveProportions())}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(e){for(const t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(e){for(const t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}get startSnappingEnabled(){return this._startSnappingEnabled}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}get endSnappingEnabled(){return this._endSnappingEnabled}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,i=this.viewItems.length,n){this.doAddView(e,t,i,n)}layout(e,t){const i=Math.max(this.size,this.contentSize);if(this.size=e,this.layoutContext=t,this.proportions)for(let t=0;t1===this.viewItems[e].priority)),o=t.filter((e=>2===this.viewItems[e].priority));this.resize(this.viewItems.length-1,e-i,void 0,n,o)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map((e=>e.size/this.contentSize)))}onSashStart({sash:e,start:t,alt:i}){for(const e of this.viewItems)e.enabled=!1;const o=this.sashItems.findIndex((t=>t.sash===e)),r=(0,n.F8)((0,u.jt)(document.body,"keydown")((e=>s(this.sashDragState.current,e.altKey))),(0,u.jt)(document.body,"keyup")((()=>s(this.sashDragState.current,!1)))),s=(e,t)=>{const i=this.viewItems.map((e=>e.size));let n,s,l=Number.NEGATIVE_INFINITY,c=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(t=!t),t)if(o===this.sashItems.length-1){const e=this.viewItems[o];l=(e.minimumSize-e.size)/2,c=(e.maximumSize-e.size)/2}else{const e=this.viewItems[o+1];l=(e.size-e.maximumSize)/2,c=(e.size-e.minimumSize)/2}if(!t){const e=(0,a.w6)(o,-1),t=(0,a.w6)(o+1,this.viewItems.length),r=e.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),l=e.reduce(((e,t)=>e+(this.viewItems[t].viewMaximumSize-i[t])),0),c=0===t.length?Number.POSITIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),u=0===t.length?Number.NEGATIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].viewMaximumSize)),0),h=Math.max(r,u),d=Math.min(c,l),g=this.findFirstSnapIndex(e),f=this.findFirstSnapIndex(t);if("number"==typeof g){const e=this.viewItems[g],t=Math.floor(e.viewMinimumSize/2);n={index:g,limitDelta:e.visible?h-t:h+t,size:e.size}}if("number"==typeof f){const e=this.viewItems[f],t=Math.floor(e.viewMinimumSize/2);s={index:f,limitDelta:e.visible?d+t:d-t,size:e.size}}}this.sashDragState={start:e,current:e,index:o,sizes:i,minDelta:l,maxDelta:c,alt:t,snapBefore:n,snapAfter:s,disposable:r}};s(t,i)}onSashChange({current:e}){const{index:t,start:i,sizes:n,alt:o,minDelta:r,maxDelta:s,snapBefore:a,snapAfter:l}=this.sashDragState;this.sashDragState.current=e;const c=e-i,u=this.resize(t,c,n,void 0,void 0,r,s,a,l);if(o){const e=t===this.sashItems.length-1,i=this.viewItems.map((e=>e.size)),n=e?t:t+1,o=this.viewItems[n],r=o.size-o.maximumSize,s=o.size-o.minimumSize,a=e?t-1:t+1;this.resize(a,-u,i,void 0,void 0,r,s)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const e of this.viewItems)e.enabled=!0}onViewChange(e,t){const i=this.viewItems.indexOf(e);i<0||i>=this.viewItems.length||(t="number"==typeof t?t:e.size,t=(0,s.u)(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&i>0?(this.resize(i-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([i],void 0)))}resizeView(e,t){if(this.state!==v.Idle)throw new Error("Cant modify splitview");if(this.state=v.Busy,e<0||e>=this.viewItems.length)return;const i=(0,a.w6)(this.viewItems.length).filter((t=>t!==e)),n=[...i.filter((e=>1===this.viewItems[e].priority)),e],o=i.filter((e=>2===this.viewItems[e].priority)),r=this.viewItems[e];t=Math.round(t),t=(0,s.u)(t,r.minimumSize,Math.min(r.maximumSize,this.size)),r.size=t,this.relayout(n,o),this.state=v.Idle}distributeViewSizes(){const e=[];let t=0;for(const i of this.viewItems)i.maximumSize-i.minimumSize>0&&(e.push(i),t+=i.size);const i=Math.floor(t/e.length);for(const t of e)t.size=(0,s.u)(i,t.minimumSize,t.maximumSize);const n=(0,a.w6)(this.viewItems.length),o=n.filter((e=>1===this.viewItems[e].priority)),r=n.filter((e=>2===this.viewItems[e].priority));this.relayout(o,r)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,i=this.viewItems.length,r){if(this.state!==v.Idle)throw new Error("Cant modify splitview");this.state=v.Busy;const s=(0,h.$)(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(s):this.viewContainer.insertBefore(s,this.viewContainer.children.item(i));const c=e.onDidChange((e=>this.onViewChange(f,e))),u=(0,n.OF)((()=>this.viewContainer.removeChild(s))),d=(0,n.F8)(c,u);let g;g="number"==typeof t?t:"split"===t.type?this.getViewSize(t.index)/2:"invisible"===t.type?{cachedVisibleSize:t.cachedVisibleSize}:e.minimumSize;const f=0===this.orientation?new m(s,e,g,d):new _(s,e,g,d);if(this.viewItems.splice(i,0,f),this.viewItems.length>1){let e={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash};const t=0===this.orientation?new l.g(this.sashContainer,{getHorizontalSashTop:e=>this.getSashPosition(e),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},e),{orientation:1})):new l.g(this.sashContainer,{getVerticalSashLeft:e=>this.getSashPosition(e),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},e),{orientation:0})),r=0===this.orientation?e=>({sash:t,start:e.startY,current:e.currentY,alt:e.altKey}):e=>({sash:t,start:e.startX,current:e.currentX,alt:e.altKey}),s=o.ju.map(t.onDidStart,r)(this.onSashStart,this),c=o.ju.map(t.onDidChange,r)(this.onSashChange,this),u=o.ju.map(t.onDidEnd,(()=>this.sashItems.findIndex((e=>e.sash===t))))(this.onSashEnd,this),h=t.onDidReset((()=>{const e=this.sashItems.findIndex((e=>e.sash===t)),i=(0,a.w6)(e,-1),n=(0,a.w6)(e+1,this.viewItems.length),o=this.findFirstSnapIndex(i),r=this.findFirstSnapIndex(n);("number"!=typeof o||this.viewItems[o].visible)&&("number"!=typeof r||this.viewItems[r].visible)&&this._onDidSashReset.fire(e)})),d=(0,n.F8)(s,c,u,h,t),g={sash:t,disposable:d};this.sashItems.splice(i-1,0,g)}let p;s.appendChild(e.element),"number"!=typeof t&&"split"===t.type&&(p=[t.index]),r||this.relayout([i],p),this.state=v.Idle,r||"number"==typeof t||"distribute"!==t.type||this.distributeViewSizes()}relayout(e,t){const i=this.viewItems.reduce(((e,t)=>e+t.size),0);this.resize(this.viewItems.length-1,this.size-i,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,i=this.viewItems.map((e=>e.size)),n,o,r=Number.NEGATIVE_INFINITY,l=Number.POSITIVE_INFINITY,c,u){if(e<0||e>=this.viewItems.length)return 0;const h=(0,a.w6)(e,-1),d=(0,a.w6)(e+1,this.viewItems.length);if(o)for(const e of o)(0,a.zI)(h,e),(0,a.zI)(d,e);if(n)for(const e of n)(0,a.al)(h,e),(0,a.al)(d,e);const g=h.map((e=>this.viewItems[e])),f=h.map((e=>i[e])),p=d.map((e=>this.viewItems[e])),m=d.map((e=>i[e])),_=h.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),v=h.reduce(((e,t)=>e+(this.viewItems[t].maximumSize-i[t])),0),b=0===d.length?Number.POSITIVE_INFINITY:d.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),y=0===d.length?Number.NEGATIVE_INFINITY:d.reduce(((e,t)=>e+(i[t]-this.viewItems[t].maximumSize)),0),w=Math.max(_,y,r),C=Math.min(b,v,l);let S=!1;if(c){const e=this.viewItems[c.index],i=t>=c.limitDelta;S=i!==e.visible,e.setVisible(i,c.size)}if(!S&&u){const e=this.viewItems[u.index],i=te+t.size),0);let i=this.size-t;const n=(0,a.w6)(this.viewItems.length-1,-1),o=n.filter((e=>1===this.viewItems[e].priority)),r=n.filter((e=>2===this.viewItems[e].priority));for(const e of r)(0,a.zI)(n,e);for(const e of o)(0,a.al)(n,e);"number"==typeof e&&(0,a.al)(n,e);for(let e=0;0!==i&&ee+t.size),0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach((e=>e.sash.layout())),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){0===this.orientation?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this.contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this.contentSize})}updateSashEnablement(){let e=!1;const t=this.viewItems.map((t=>e=t.size-t.minimumSize>0||e));e=!1;const i=this.viewItems.map((t=>e=t.maximumSize-t.size>0||e)),n=[...this.viewItems].reverse();e=!1;const o=n.map((t=>e=t.size-t.minimumSize>0||e)).reverse();e=!1;const r=n.map((t=>e=t.maximumSize-t.size>0||e)).reverse();let s=0;for(let e=0;e0||this.startSnappingEnabled)?n.state=1:h&&t[e]&&(s0)return;if(!e.visible&&e.snap)return t}}dispose(){super.dispose(),this.viewItems.forEach((e=>e.dispose())),this.viewItems=[],this.sashItems.forEach((e=>e.disposable.dispose())),this.sashItems=[]}}},3794:(e,t,i)=>{"use strict";i.d(t,{$:()=>l});var n=i(5321),o=i(9069),r=i(3938),s=i(5976),a=i(553);class l extends s.JT{onclick(e,t){this._register(n.nm(e,n.tw.CLICK,(e=>t(new r.n(e)))))}onmousedown(e,t){this._register(n.nm(e,n.tw.MOUSE_DOWN,(e=>t(new r.n(e)))))}onmouseover(e,t){this._register(n.nm(e,n.tw.MOUSE_OVER,(e=>t(new r.n(e)))))}onnonbubblingmouseout(e,t){this._register(n.j_(e,(e=>t(new r.n(e)))))}onkeydown(e,t){this._register(n.nm(e,n.tw.KEY_DOWN,(e=>t(new o.y(e)))))}onkeyup(e,t){this._register(n.nm(e,n.tw.KEY_UP,(e=>t(new o.y(e)))))}oninput(e,t){this._register(n.nm(e,n.tw.INPUT,t))}onblur(e,t){this._register(n.nm(e,n.tw.BLUR,t))}onfocus(e,t){this._register(n.nm(e,n.tw.FOCUS,t))}ignoreGesture(e){a.o.ignoreTarget(e)}}},4741:(e,t,i)=>{"use strict";i.d(t,{aU:()=>a,Wi:()=>l,Z0:()=>c,wY:()=>u,eZ:()=>h});var n=i(3580),o=i(5976),r=i(4669),s=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class a extends o.JT{constructor(e,t="",i="",n=!0,o){super(),this._onDidChange=this._register(new r.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._checked=!1,this._id=e,this._label=t,this._cssClass=i,this._enabled=n,this._actionCallback=o}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}run(e,t){return s(this,void 0,void 0,(function*(){this._actionCallback&&(yield this._actionCallback(e))}))}}class l extends o.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new r.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new r.Q5),this.onDidRun=this._onDidRun.event}run(e,t){return s(this,void 0,void 0,(function*(){if(!e.enabled)return;let i;this._onBeforeRun.fire({action:e});try{yield this.runAction(e,t)}catch(e){i=e}this._onDidRun.fire({action:e,error:i})}))}runAction(e,t){return s(this,void 0,void 0,(function*(){yield e.run(t)}))}}class c extends a{constructor(e){super(c.ID,e,e?"separator text":"separator"),this.checked=!1,this.enabled=!1}}c.ID="vs.actions.separator";class u{constructor(e,t,i,n){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=e,this.label=t,this.class=n,this._actions=i}get actions(){return this._actions}dispose(){}run(){return s(this,void 0,void 0,(function*(){}))}}class h extends a{constructor(){super(h.ID,n.N("submenu.empty","(empty)"),void 0,!1)}}h.ID="vs.actions.empty"},9488:(e,t,i)=>{"use strict";function n(e,t=0){return e[e.length-(1+t)]}function o(e){if(0===e.length)throw new Error("Invalid tail call");return[e.slice(0,e.length-1),e[e.length-1]]}function r(e,t,i=((e,t)=>e===t)){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let n=0,o=e.length;n0))return r;o=r-1}}return-(n+1)}function a(e,t){let i=0,n=e.length;if(0===n)return 0;for(;i=t.length)throw new TypeError("invalid index");let n=t[Math.floor(t.length*Math.random())],o=[],r=[],s=[];for(let e of t){const t=i(e,n);t<0?o.push(e):t>0?r.push(e):s.push(e)}return e!!e))}function h(e){return!Array.isArray(e)||0===e.length}function d(e){return Array.isArray(e)&&e.length>0}function g(e,t){if(!t)return e.filter(((t,i)=>e.indexOf(t)===i));const i=Object.create(null);return e.filter((e=>{const n=t(e);return!i[n]&&(i[n]=!0,!0)}))}function f(e){const t=new Set;return e.filter((e=>!t.has(e)&&(t.add(e),!0)))}function p(e,t){return e.length>0?e[0]:t}function m(e){return[].concat(...e)}function _(e,t){let i="number"==typeof t?e:0;"number"==typeof t?i=e:(i=0,t=e);const n=[];if(i<=t)for(let e=i;et;e--)n.push(e);return n}function v(e,t,i){const n=e.slice(0,t),o=e.slice(t);return n.concat(i,o)}function b(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.unshift(t))}function y(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.push(t))}function w(e){return Array.isArray(e)?e:[e]}i.d(t,{Gb:()=>n,JH:()=>o,fS:()=>r,ry:()=>s,lG:()=>a,HW:()=>l,vM:()=>c,kX:()=>u,XY:()=>h,Of:()=>d,EB:()=>g,cU:()=>f,Xh:()=>p,xH:()=>m,w6:()=>_,Zv:()=>v,zI:()=>b,al:()=>y,_2:()=>w})},5146:(e,t,i)=>{"use strict";function n(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}i.d(t,{ok:()=>n})},5393:(e,t,i)=>{"use strict";i.d(t,{J8:()=>a,PG:()=>l,eP:()=>c,vp:()=>h,rH:()=>d,Vs:()=>g,Vg:()=>f,Ps:()=>p,_F:()=>m,zh:()=>_,pY:()=>v,To:()=>b,Ue:()=>y,jT:()=>w});var n=i(1050),o=i(7301),r=i(5976),s=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function a(e){return!!e&&"function"==typeof e.then}function l(e){const t=new n.A,i=e(t.token),r=new Promise(((e,n)=>{t.token.onCancellationRequested((()=>{n((0,o.F0)())})),Promise.resolve(i).then((i=>{t.dispose(),e(i)}),(e=>{t.dispose(),n(e)}))}));return new class{cancel(){t.cancel()}then(e,t){return r.then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return r.finally(e)}}}function c(e,t,i){return Promise.race([e,new Promise((e=>t.onCancellationRequested((()=>e(i)))))])}class u{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const e=()=>{this.queuedPromise=null;const e=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,e};this.queuedPromise=new Promise((t=>{this.activePromise.then(e,e).then(t)}))}return new Promise(((e,t)=>{this.queuedPromise.then(e,t)}))}return this.activePromise=e(),new Promise(((e,t)=>{this.activePromise.then((t=>{this.activePromise=null,e(t)}),(e=>{this.activePromise=null,t(e)}))}))}}class h{constructor(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){return this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(((e,t)=>{this.doResolve=e,this.doReject=t})).then((()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const e=this.task;return this.task=null,e()}}))),this.timeout=setTimeout((()=>{this.timeout=null,this.doResolve&&this.doResolve(null)}),t),this.completionPromise}isTriggered(){return null!==this.timeout}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject&&this.doReject((0,o.F0)()),this.completionPromise=null)}cancelTimeout(){null!==this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}dispose(){this.cancelTimeout()}}class d{constructor(e){this.delayer=new h(e),this.throttler=new u}trigger(e,t){return this.delayer.trigger((()=>this.throttler.queue(e)),t)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose()}}function g(e,t){return t?new Promise(((i,n)=>{const r=setTimeout(i,e);t.onCancellationRequested((()=>{clearTimeout(r),n((0,o.F0)())}))})):l((t=>g(e,t)))}function f(e,t=0){const i=setTimeout(e,t);return(0,r.OF)((()=>clearTimeout(i)))}function p(e,t=(e=>!!e),i=null){let n=0;const o=e.length,r=()=>{if(n>=o)return Promise.resolve(i);const s=e[n++];return Promise.resolve(s()).then((e=>t(e)?Promise.resolve(e):r()))};return r()}class m{constructor(e,t){this._token=-1,"function"==typeof e&&"number"==typeof t&&this.setIfNotSet(e,t)}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setTimeout((()=>{this._token=-1,e()}),t)}setIfNotSet(e,t){-1===this._token&&(this._token=setTimeout((()=>{this._token=-1,e()}),t))}}class _{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearInterval(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setInterval((()=>{e()}),t)}}class v{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner&&this.runner()}}let b;!function(){if("function"!=typeof requestIdleCallback||"function"!=typeof cancelIdleCallback){const e=Object.freeze({didTimeout:!0,timeRemaining:()=>15});b=t=>{const i=setTimeout((()=>t(e)));let n=!1;return{dispose(){n||(n=!0,clearTimeout(i))}}}}else b=(e,t)=>{const i=requestIdleCallback(e,"number"==typeof t?{timeout:t}:void 0);let n=!1;return{dispose(){n||(n=!0,cancelIdleCallback(i))}}}}();class y{constructor(e){this._didRun=!1,this._executor=()=>{try{this._value=e()}catch(e){this._error=e}finally{this._didRun=!0}},this._handle=b((()=>this._executor()))}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}}var w;!function(e){e.allSettled=function(e){return s(this,void 0,void 0,(function*(){return"function"==typeof Promise.allSettled?function(e){return s(this,void 0,void 0,(function*(){return Promise.allSettled(e)}))}(e):function(e){return s(this,void 0,void 0,(function*(){return Promise.all(e.map((e=>e.then((e=>({status:"fulfilled",value:e})),(e=>({status:"rejected",reason:e}))))))}))}(e)}))},e.settled=function(e){return s(this,void 0,void 0,(function*(){let t;const i=yield Promise.all(e.map((e=>e.then((e=>e),(e=>{t||(t=e)})))));if(void 0!==t)throw t;return i}))}}(w||(w={}))},3060:(e,t,i)=>{"use strict";i.d(t,{KN:()=>a,mP:()=>l,oq:()=>c,Ag:()=>u,T4:()=>h,Q$:()=>d,Cg:()=>g});var n=i(7295);const o="undefined"!=typeof Buffer,r="undefined"!=typeof TextDecoder;let s;class a{constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}static wrap(e){return o&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new a(e)}toString(){return o?this.buffer.toString():r?(s||(s=new TextDecoder),s.decode(this.buffer)):n.CZ(this.buffer)}}function l(e,t){return e[t+0]<<0>>>0|e[t+1]<<8>>>0}function c(e,t,i){e[i+0]=255&t,t>>>=8,e[i+1]=255&t}function u(e,t){return e[t]*Math.pow(2,24)+e[t+1]*Math.pow(2,16)+e[t+2]*Math.pow(2,8)+e[t+3]}function h(e,t,i){e[i+3]=t,t>>>=8,e[i+2]=t,t>>>=8,e[i+1]=t,t>>>=8,e[i]=t}function d(e,t){return e[t]}function g(e,t,i){e[i]=t}},1050:(e,t,i)=>{"use strict";i.d(t,{T:()=>r,A:()=>a});var n=i(4669);const o=Object.freeze((function(e,t){const i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}));var r;!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||t instanceof s||!(!t||"object"!=typeof t)&&"boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.ju.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:o})}(r||(r={}));class s{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?o:(this._emitter||(this._emitter=new n.Q5),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class a{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new s),this._token}cancel(){this._token?this._token instanceof s&&this._token.cancel():this._token=r.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof s&&this._token.dispose():this._token=r.None}}},3046:(e,t,i)=>{"use strict";i.d(t,{fK:()=>r,CM:()=>s,JL:()=>a,lA:()=>l,dT:()=>c});var n=i(4669);const o=new class{constructor(){this._icons=new Map,this._onDidRegister=new n.Q5}add(e){const t=this._icons.get(e.id);t?e.description?t.description=e.description:console.error(`Duplicate registration of codicon ${e.id}`):(this._icons.set(e.id,e),this._onDidRegister.fire(e))}get(e){return this._icons.get(e)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}},r=o;function s(e,t){return new l(e,t)}function a(e){return e?e.replace(/\$\((.*?)\)/g,((e,t)=>` ${t} `)).trim():""}class l{constructor(e,t,i){this.id=e,this.definition=t,this.description=i,o.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var c;!function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9\\-]+",e.iconModifierExpression="~[A-Za-z]+";const t=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function i(e){if(e instanceof l)return["codicon","codicon-"+e.id];const n=t.exec(e.id);if(!n)return i(l.error);let[,o,r]=n;const s=["codicon","codicon-"+o];return r&&s.push("codicon-modifier-"+r.substr(1)),s}e.asClassNameArray=i,e.asClassName=function(e){return i(e).join(" ")},e.asCSSSelector=function(e){return"."+i(e).join(".")}}(c||(c={})),function(e){e.add=new e("add",{fontCharacter:"\\ea60"}),e.plus=new e("plus",{fontCharacter:"\\ea60"}),e.gistNew=new e("gist-new",{fontCharacter:"\\ea60"}),e.repoCreate=new e("repo-create",{fontCharacter:"\\ea60"}),e.lightbulb=new e("lightbulb",{fontCharacter:"\\ea61"}),e.lightBulb=new e("light-bulb",{fontCharacter:"\\ea61"}),e.repo=new e("repo",{fontCharacter:"\\ea62"}),e.repoDelete=new e("repo-delete",{fontCharacter:"\\ea62"}),e.gistFork=new e("gist-fork",{fontCharacter:"\\ea63"}),e.repoForked=new e("repo-forked",{fontCharacter:"\\ea63"}),e.gitPullRequest=new e("git-pull-request",{fontCharacter:"\\ea64"}),e.gitPullRequestAbandoned=new e("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),e.recordKeys=new e("record-keys",{fontCharacter:"\\ea65"}),e.keyboard=new e("keyboard",{fontCharacter:"\\ea65"}),e.tag=new e("tag",{fontCharacter:"\\ea66"}),e.tagAdd=new e("tag-add",{fontCharacter:"\\ea66"}),e.tagRemove=new e("tag-remove",{fontCharacter:"\\ea66"}),e.person=new e("person",{fontCharacter:"\\ea67"}),e.personFollow=new e("person-follow",{fontCharacter:"\\ea67"}),e.personOutline=new e("person-outline",{fontCharacter:"\\ea67"}),e.personFilled=new e("person-filled",{fontCharacter:"\\ea67"}),e.gitBranch=new e("git-branch",{fontCharacter:"\\ea68"}),e.gitBranchCreate=new e("git-branch-create",{fontCharacter:"\\ea68"}),e.gitBranchDelete=new e("git-branch-delete",{fontCharacter:"\\ea68"}),e.sourceControl=new e("source-control",{fontCharacter:"\\ea68"}),e.mirror=new e("mirror",{fontCharacter:"\\ea69"}),e.mirrorPublic=new e("mirror-public",{fontCharacter:"\\ea69"}),e.star=new e("star",{fontCharacter:"\\ea6a"}),e.starAdd=new e("star-add",{fontCharacter:"\\ea6a"}),e.starDelete=new e("star-delete",{fontCharacter:"\\ea6a"}),e.starEmpty=new e("star-empty",{fontCharacter:"\\ea6a"}),e.comment=new e("comment",{fontCharacter:"\\ea6b"}),e.commentAdd=new e("comment-add",{fontCharacter:"\\ea6b"}),e.alert=new e("alert",{fontCharacter:"\\ea6c"}),e.warning=new e("warning",{fontCharacter:"\\ea6c"}),e.search=new e("search",{fontCharacter:"\\ea6d"}),e.searchSave=new e("search-save",{fontCharacter:"\\ea6d"}),e.logOut=new e("log-out",{fontCharacter:"\\ea6e"}),e.signOut=new e("sign-out",{fontCharacter:"\\ea6e"}),e.logIn=new e("log-in",{fontCharacter:"\\ea6f"}),e.signIn=new e("sign-in",{fontCharacter:"\\ea6f"}),e.eye=new e("eye",{fontCharacter:"\\ea70"}),e.eyeUnwatch=new e("eye-unwatch",{fontCharacter:"\\ea70"}),e.eyeWatch=new e("eye-watch",{fontCharacter:"\\ea70"}),e.circleFilled=new e("circle-filled",{fontCharacter:"\\ea71"}),e.primitiveDot=new e("primitive-dot",{fontCharacter:"\\ea71"}),e.closeDirty=new e("close-dirty",{fontCharacter:"\\ea71"}),e.debugBreakpoint=new e("debug-breakpoint",{fontCharacter:"\\ea71"}),e.debugBreakpointDisabled=new e("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),e.debugHint=new e("debug-hint",{fontCharacter:"\\ea71"}),e.primitiveSquare=new e("primitive-square",{fontCharacter:"\\ea72"}),e.edit=new e("edit",{fontCharacter:"\\ea73"}),e.pencil=new e("pencil",{fontCharacter:"\\ea73"}),e.info=new e("info",{fontCharacter:"\\ea74"}),e.issueOpened=new e("issue-opened",{fontCharacter:"\\ea74"}),e.gistPrivate=new e("gist-private",{fontCharacter:"\\ea75"}),e.gitForkPrivate=new e("git-fork-private",{fontCharacter:"\\ea75"}),e.lock=new e("lock",{fontCharacter:"\\ea75"}),e.mirrorPrivate=new e("mirror-private",{fontCharacter:"\\ea75"}),e.close=new e("close",{fontCharacter:"\\ea76"}),e.removeClose=new e("remove-close",{fontCharacter:"\\ea76"}),e.x=new e("x",{fontCharacter:"\\ea76"}),e.repoSync=new e("repo-sync",{fontCharacter:"\\ea77"}),e.sync=new e("sync",{fontCharacter:"\\ea77"}),e.clone=new e("clone",{fontCharacter:"\\ea78"}),e.desktopDownload=new e("desktop-download",{fontCharacter:"\\ea78"}),e.beaker=new e("beaker",{fontCharacter:"\\ea79"}),e.microscope=new e("microscope",{fontCharacter:"\\ea79"}),e.vm=new e("vm",{fontCharacter:"\\ea7a"}),e.deviceDesktop=new e("device-desktop",{fontCharacter:"\\ea7a"}),e.file=new e("file",{fontCharacter:"\\ea7b"}),e.fileText=new e("file-text",{fontCharacter:"\\ea7b"}),e.more=new e("more",{fontCharacter:"\\ea7c"}),e.ellipsis=new e("ellipsis",{fontCharacter:"\\ea7c"}),e.kebabHorizontal=new e("kebab-horizontal",{fontCharacter:"\\ea7c"}),e.mailReply=new e("mail-reply",{fontCharacter:"\\ea7d"}),e.reply=new e("reply",{fontCharacter:"\\ea7d"}),e.organization=new e("organization",{fontCharacter:"\\ea7e"}),e.organizationFilled=new e("organization-filled",{fontCharacter:"\\ea7e"}),e.organizationOutline=new e("organization-outline",{fontCharacter:"\\ea7e"}),e.newFile=new e("new-file",{fontCharacter:"\\ea7f"}),e.fileAdd=new e("file-add",{fontCharacter:"\\ea7f"}),e.newFolder=new e("new-folder",{fontCharacter:"\\ea80"}),e.fileDirectoryCreate=new e("file-directory-create",{fontCharacter:"\\ea80"}),e.trash=new e("trash",{fontCharacter:"\\ea81"}),e.trashcan=new e("trashcan",{fontCharacter:"\\ea81"}),e.history=new e("history",{fontCharacter:"\\ea82"}),e.clock=new e("clock",{fontCharacter:"\\ea82"}),e.folder=new e("folder",{fontCharacter:"\\ea83"}),e.fileDirectory=new e("file-directory",{fontCharacter:"\\ea83"}),e.symbolFolder=new e("symbol-folder",{fontCharacter:"\\ea83"}),e.logoGithub=new e("logo-github",{fontCharacter:"\\ea84"}),e.markGithub=new e("mark-github",{fontCharacter:"\\ea84"}),e.github=new e("github",{fontCharacter:"\\ea84"}),e.terminal=new e("terminal",{fontCharacter:"\\ea85"}),e.console=new e("console",{fontCharacter:"\\ea85"}),e.repl=new e("repl",{fontCharacter:"\\ea85"}),e.zap=new e("zap",{fontCharacter:"\\ea86"}),e.symbolEvent=new e("symbol-event",{fontCharacter:"\\ea86"}),e.error=new e("error",{fontCharacter:"\\ea87"}),e.stop=new e("stop",{fontCharacter:"\\ea87"}),e.variable=new e("variable",{fontCharacter:"\\ea88"}),e.symbolVariable=new e("symbol-variable",{fontCharacter:"\\ea88"}),e.array=new e("array",{fontCharacter:"\\ea8a"}),e.symbolArray=new e("symbol-array",{fontCharacter:"\\ea8a"}),e.symbolModule=new e("symbol-module",{fontCharacter:"\\ea8b"}),e.symbolPackage=new e("symbol-package",{fontCharacter:"\\ea8b"}),e.symbolNamespace=new e("symbol-namespace",{fontCharacter:"\\ea8b"}),e.symbolObject=new e("symbol-object",{fontCharacter:"\\ea8b"}),e.symbolMethod=new e("symbol-method",{fontCharacter:"\\ea8c"}),e.symbolFunction=new e("symbol-function",{fontCharacter:"\\ea8c"}),e.symbolConstructor=new e("symbol-constructor",{fontCharacter:"\\ea8c"}),e.symbolBoolean=new e("symbol-boolean",{fontCharacter:"\\ea8f"}),e.symbolNull=new e("symbol-null",{fontCharacter:"\\ea8f"}),e.symbolNumeric=new e("symbol-numeric",{fontCharacter:"\\ea90"}),e.symbolNumber=new e("symbol-number",{fontCharacter:"\\ea90"}),e.symbolStructure=new e("symbol-structure",{fontCharacter:"\\ea91"}),e.symbolStruct=new e("symbol-struct",{fontCharacter:"\\ea91"}),e.symbolParameter=new e("symbol-parameter",{fontCharacter:"\\ea92"}),e.symbolTypeParameter=new e("symbol-type-parameter",{fontCharacter:"\\ea92"}),e.symbolKey=new e("symbol-key",{fontCharacter:"\\ea93"}),e.symbolText=new e("symbol-text",{fontCharacter:"\\ea93"}),e.symbolReference=new e("symbol-reference",{fontCharacter:"\\ea94"}),e.goToFile=new e("go-to-file",{fontCharacter:"\\ea94"}),e.symbolEnum=new e("symbol-enum",{fontCharacter:"\\ea95"}),e.symbolValue=new e("symbol-value",{fontCharacter:"\\ea95"}),e.symbolRuler=new e("symbol-ruler",{fontCharacter:"\\ea96"}),e.symbolUnit=new e("symbol-unit",{fontCharacter:"\\ea96"}),e.activateBreakpoints=new e("activate-breakpoints",{fontCharacter:"\\ea97"}),e.archive=new e("archive",{fontCharacter:"\\ea98"}),e.arrowBoth=new e("arrow-both",{fontCharacter:"\\ea99"}),e.arrowDown=new e("arrow-down",{fontCharacter:"\\ea9a"}),e.arrowLeft=new e("arrow-left",{fontCharacter:"\\ea9b"}),e.arrowRight=new e("arrow-right",{fontCharacter:"\\ea9c"}),e.arrowSmallDown=new e("arrow-small-down",{fontCharacter:"\\ea9d"}),e.arrowSmallLeft=new e("arrow-small-left",{fontCharacter:"\\ea9e"}),e.arrowSmallRight=new e("arrow-small-right",{fontCharacter:"\\ea9f"}),e.arrowSmallUp=new e("arrow-small-up",{fontCharacter:"\\eaa0"}),e.arrowUp=new e("arrow-up",{fontCharacter:"\\eaa1"}),e.bell=new e("bell",{fontCharacter:"\\eaa2"}),e.bold=new e("bold",{fontCharacter:"\\eaa3"}),e.book=new e("book",{fontCharacter:"\\eaa4"}),e.bookmark=new e("bookmark",{fontCharacter:"\\eaa5"}),e.debugBreakpointConditionalUnverified=new e("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),e.debugBreakpointConditional=new e("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),e.debugBreakpointConditionalDisabled=new e("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),e.debugBreakpointDataUnverified=new e("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),e.debugBreakpointData=new e("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),e.debugBreakpointDataDisabled=new e("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),e.debugBreakpointLogUnverified=new e("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),e.debugBreakpointLog=new e("debug-breakpoint-log",{fontCharacter:"\\eaab"}),e.debugBreakpointLogDisabled=new e("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),e.briefcase=new e("briefcase",{fontCharacter:"\\eaac"}),e.broadcast=new e("broadcast",{fontCharacter:"\\eaad"}),e.browser=new e("browser",{fontCharacter:"\\eaae"}),e.bug=new e("bug",{fontCharacter:"\\eaaf"}),e.calendar=new e("calendar",{fontCharacter:"\\eab0"}),e.caseSensitive=new e("case-sensitive",{fontCharacter:"\\eab1"}),e.check=new e("check",{fontCharacter:"\\eab2"}),e.checklist=new e("checklist",{fontCharacter:"\\eab3"}),e.chevronDown=new e("chevron-down",{fontCharacter:"\\eab4"}),e.chevronLeft=new e("chevron-left",{fontCharacter:"\\eab5"}),e.chevronRight=new e("chevron-right",{fontCharacter:"\\eab6"}),e.chevronUp=new e("chevron-up",{fontCharacter:"\\eab7"}),e.chromeClose=new e("chrome-close",{fontCharacter:"\\eab8"}),e.chromeMaximize=new e("chrome-maximize",{fontCharacter:"\\eab9"}),e.chromeMinimize=new e("chrome-minimize",{fontCharacter:"\\eaba"}),e.chromeRestore=new e("chrome-restore",{fontCharacter:"\\eabb"}),e.circleOutline=new e("circle-outline",{fontCharacter:"\\eabc"}),e.debugBreakpointUnverified=new e("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),e.circleSlash=new e("circle-slash",{fontCharacter:"\\eabd"}),e.circuitBoard=new e("circuit-board",{fontCharacter:"\\eabe"}),e.clearAll=new e("clear-all",{fontCharacter:"\\eabf"}),e.clippy=new e("clippy",{fontCharacter:"\\eac0"}),e.closeAll=new e("close-all",{fontCharacter:"\\eac1"}),e.cloudDownload=new e("cloud-download",{fontCharacter:"\\eac2"}),e.cloudUpload=new e("cloud-upload",{fontCharacter:"\\eac3"}),e.code=new e("code",{fontCharacter:"\\eac4"}),e.collapseAll=new e("collapse-all",{fontCharacter:"\\eac5"}),e.colorMode=new e("color-mode",{fontCharacter:"\\eac6"}),e.commentDiscussion=new e("comment-discussion",{fontCharacter:"\\eac7"}),e.compareChanges=new e("compare-changes",{fontCharacter:"\\eafd"}),e.creditCard=new e("credit-card",{fontCharacter:"\\eac9"}),e.dash=new e("dash",{fontCharacter:"\\eacc"}),e.dashboard=new e("dashboard",{fontCharacter:"\\eacd"}),e.database=new e("database",{fontCharacter:"\\eace"}),e.debugContinue=new e("debug-continue",{fontCharacter:"\\eacf"}),e.debugDisconnect=new e("debug-disconnect",{fontCharacter:"\\ead0"}),e.debugPause=new e("debug-pause",{fontCharacter:"\\ead1"}),e.debugRestart=new e("debug-restart",{fontCharacter:"\\ead2"}),e.debugStart=new e("debug-start",{fontCharacter:"\\ead3"}),e.debugStepInto=new e("debug-step-into",{fontCharacter:"\\ead4"}),e.debugStepOut=new e("debug-step-out",{fontCharacter:"\\ead5"}),e.debugStepOver=new e("debug-step-over",{fontCharacter:"\\ead6"}),e.debugStop=new e("debug-stop",{fontCharacter:"\\ead7"}),e.debug=new e("debug",{fontCharacter:"\\ead8"}),e.deviceCameraVideo=new e("device-camera-video",{fontCharacter:"\\ead9"}),e.deviceCamera=new e("device-camera",{fontCharacter:"\\eada"}),e.deviceMobile=new e("device-mobile",{fontCharacter:"\\eadb"}),e.diffAdded=new e("diff-added",{fontCharacter:"\\eadc"}),e.diffIgnored=new e("diff-ignored",{fontCharacter:"\\eadd"}),e.diffModified=new e("diff-modified",{fontCharacter:"\\eade"}),e.diffRemoved=new e("diff-removed",{fontCharacter:"\\eadf"}),e.diffRenamed=new e("diff-renamed",{fontCharacter:"\\eae0"}),e.diff=new e("diff",{fontCharacter:"\\eae1"}),e.discard=new e("discard",{fontCharacter:"\\eae2"}),e.editorLayout=new e("editor-layout",{fontCharacter:"\\eae3"}),e.emptyWindow=new e("empty-window",{fontCharacter:"\\eae4"}),e.exclude=new e("exclude",{fontCharacter:"\\eae5"}),e.extensions=new e("extensions",{fontCharacter:"\\eae6"}),e.eyeClosed=new e("eye-closed",{fontCharacter:"\\eae7"}),e.fileBinary=new e("file-binary",{fontCharacter:"\\eae8"}),e.fileCode=new e("file-code",{fontCharacter:"\\eae9"}),e.fileMedia=new e("file-media",{fontCharacter:"\\eaea"}),e.filePdf=new e("file-pdf",{fontCharacter:"\\eaeb"}),e.fileSubmodule=new e("file-submodule",{fontCharacter:"\\eaec"}),e.fileSymlinkDirectory=new e("file-symlink-directory",{fontCharacter:"\\eaed"}),e.fileSymlinkFile=new e("file-symlink-file",{fontCharacter:"\\eaee"}),e.fileZip=new e("file-zip",{fontCharacter:"\\eaef"}),e.files=new e("files",{fontCharacter:"\\eaf0"}),e.filter=new e("filter",{fontCharacter:"\\eaf1"}),e.flame=new e("flame",{fontCharacter:"\\eaf2"}),e.foldDown=new e("fold-down",{fontCharacter:"\\eaf3"}),e.foldUp=new e("fold-up",{fontCharacter:"\\eaf4"}),e.fold=new e("fold",{fontCharacter:"\\eaf5"}),e.folderActive=new e("folder-active",{fontCharacter:"\\eaf6"}),e.folderOpened=new e("folder-opened",{fontCharacter:"\\eaf7"}),e.gear=new e("gear",{fontCharacter:"\\eaf8"}),e.gift=new e("gift",{fontCharacter:"\\eaf9"}),e.gistSecret=new e("gist-secret",{fontCharacter:"\\eafa"}),e.gist=new e("gist",{fontCharacter:"\\eafb"}),e.gitCommit=new e("git-commit",{fontCharacter:"\\eafc"}),e.gitCompare=new e("git-compare",{fontCharacter:"\\eafd"}),e.gitMerge=new e("git-merge",{fontCharacter:"\\eafe"}),e.githubAction=new e("github-action",{fontCharacter:"\\eaff"}),e.githubAlt=new e("github-alt",{fontCharacter:"\\eb00"}),e.globe=new e("globe",{fontCharacter:"\\eb01"}),e.grabber=new e("grabber",{fontCharacter:"\\eb02"}),e.graph=new e("graph",{fontCharacter:"\\eb03"}),e.gripper=new e("gripper",{fontCharacter:"\\eb04"}),e.heart=new e("heart",{fontCharacter:"\\eb05"}),e.home=new e("home",{fontCharacter:"\\eb06"}),e.horizontalRule=new e("horizontal-rule",{fontCharacter:"\\eb07"}),e.hubot=new e("hubot",{fontCharacter:"\\eb08"}),e.inbox=new e("inbox",{fontCharacter:"\\eb09"}),e.issueClosed=new e("issue-closed",{fontCharacter:"\\eb0a"}),e.issueReopened=new e("issue-reopened",{fontCharacter:"\\eb0b"}),e.issues=new e("issues",{fontCharacter:"\\eb0c"}),e.italic=new e("italic",{fontCharacter:"\\eb0d"}),e.jersey=new e("jersey",{fontCharacter:"\\eb0e"}),e.json=new e("json",{fontCharacter:"\\eb0f"}),e.kebabVertical=new e("kebab-vertical",{fontCharacter:"\\eb10"}),e.key=new e("key",{fontCharacter:"\\eb11"}),e.law=new e("law",{fontCharacter:"\\eb12"}),e.lightbulbAutofix=new e("lightbulb-autofix",{fontCharacter:"\\eb13"}),e.linkExternal=new e("link-external",{fontCharacter:"\\eb14"}),e.link=new e("link",{fontCharacter:"\\eb15"}),e.listOrdered=new e("list-ordered",{fontCharacter:"\\eb16"}),e.listUnordered=new e("list-unordered",{fontCharacter:"\\eb17"}),e.liveShare=new e("live-share",{fontCharacter:"\\eb18"}),e.loading=new e("loading",{fontCharacter:"\\eb19"}),e.location=new e("location",{fontCharacter:"\\eb1a"}),e.mailRead=new e("mail-read",{fontCharacter:"\\eb1b"}),e.mail=new e("mail",{fontCharacter:"\\eb1c"}),e.markdown=new e("markdown",{fontCharacter:"\\eb1d"}),e.megaphone=new e("megaphone",{fontCharacter:"\\eb1e"}),e.mention=new e("mention",{fontCharacter:"\\eb1f"}),e.milestone=new e("milestone",{fontCharacter:"\\eb20"}),e.mortarBoard=new e("mortar-board",{fontCharacter:"\\eb21"}),e.move=new e("move",{fontCharacter:"\\eb22"}),e.multipleWindows=new e("multiple-windows",{fontCharacter:"\\eb23"}),e.mute=new e("mute",{fontCharacter:"\\eb24"}),e.noNewline=new e("no-newline",{fontCharacter:"\\eb25"}),e.note=new e("note",{fontCharacter:"\\eb26"}),e.octoface=new e("octoface",{fontCharacter:"\\eb27"}),e.openPreview=new e("open-preview",{fontCharacter:"\\eb28"}),e.package_=new e("package",{fontCharacter:"\\eb29"}),e.paintcan=new e("paintcan",{fontCharacter:"\\eb2a"}),e.pin=new e("pin",{fontCharacter:"\\eb2b"}),e.play=new e("play",{fontCharacter:"\\eb2c"}),e.run=new e("run",{fontCharacter:"\\eb2c"}),e.plug=new e("plug",{fontCharacter:"\\eb2d"}),e.preserveCase=new e("preserve-case",{fontCharacter:"\\eb2e"}),e.preview=new e("preview",{fontCharacter:"\\eb2f"}),e.project=new e("project",{fontCharacter:"\\eb30"}),e.pulse=new e("pulse",{fontCharacter:"\\eb31"}),e.question=new e("question",{fontCharacter:"\\eb32"}),e.quote=new e("quote",{fontCharacter:"\\eb33"}),e.radioTower=new e("radio-tower",{fontCharacter:"\\eb34"}),e.reactions=new e("reactions",{fontCharacter:"\\eb35"}),e.references=new e("references",{fontCharacter:"\\eb36"}),e.refresh=new e("refresh",{fontCharacter:"\\eb37"}),e.regex=new e("regex",{fontCharacter:"\\eb38"}),e.remoteExplorer=new e("remote-explorer",{fontCharacter:"\\eb39"}),e.remote=new e("remote",{fontCharacter:"\\eb3a"}),e.remove=new e("remove",{fontCharacter:"\\eb3b"}),e.replaceAll=new e("replace-all",{fontCharacter:"\\eb3c"}),e.replace=new e("replace",{fontCharacter:"\\eb3d"}),e.repoClone=new e("repo-clone",{fontCharacter:"\\eb3e"}),e.repoForcePush=new e("repo-force-push",{fontCharacter:"\\eb3f"}),e.repoPull=new e("repo-pull",{fontCharacter:"\\eb40"}),e.repoPush=new e("repo-push",{fontCharacter:"\\eb41"}),e.report=new e("report",{fontCharacter:"\\eb42"}),e.requestChanges=new e("request-changes",{fontCharacter:"\\eb43"}),e.rocket=new e("rocket",{fontCharacter:"\\eb44"}),e.rootFolderOpened=new e("root-folder-opened",{fontCharacter:"\\eb45"}),e.rootFolder=new e("root-folder",{fontCharacter:"\\eb46"}),e.rss=new e("rss",{fontCharacter:"\\eb47"}),e.ruby=new e("ruby",{fontCharacter:"\\eb48"}),e.saveAll=new e("save-all",{fontCharacter:"\\eb49"}),e.saveAs=new e("save-as",{fontCharacter:"\\eb4a"}),e.save=new e("save",{fontCharacter:"\\eb4b"}),e.screenFull=new e("screen-full",{fontCharacter:"\\eb4c"}),e.screenNormal=new e("screen-normal",{fontCharacter:"\\eb4d"}),e.searchStop=new e("search-stop",{fontCharacter:"\\eb4e"}),e.server=new e("server",{fontCharacter:"\\eb50"}),e.settingsGear=new e("settings-gear",{fontCharacter:"\\eb51"}),e.settings=new e("settings",{fontCharacter:"\\eb52"}),e.shield=new e("shield",{fontCharacter:"\\eb53"}),e.smiley=new e("smiley",{fontCharacter:"\\eb54"}),e.sortPrecedence=new e("sort-precedence",{fontCharacter:"\\eb55"}),e.splitHorizontal=new e("split-horizontal",{fontCharacter:"\\eb56"}),e.splitVertical=new e("split-vertical",{fontCharacter:"\\eb57"}),e.squirrel=new e("squirrel",{fontCharacter:"\\eb58"}),e.starFull=new e("star-full",{fontCharacter:"\\eb59"}),e.starHalf=new e("star-half",{fontCharacter:"\\eb5a"}),e.symbolClass=new e("symbol-class",{fontCharacter:"\\eb5b"}),e.symbolColor=new e("symbol-color",{fontCharacter:"\\eb5c"}),e.symbolConstant=new e("symbol-constant",{fontCharacter:"\\eb5d"}),e.symbolEnumMember=new e("symbol-enum-member",{fontCharacter:"\\eb5e"}),e.symbolField=new e("symbol-field",{fontCharacter:"\\eb5f"}),e.symbolFile=new e("symbol-file",{fontCharacter:"\\eb60"}),e.symbolInterface=new e("symbol-interface",{fontCharacter:"\\eb61"}),e.symbolKeyword=new e("symbol-keyword",{fontCharacter:"\\eb62"}),e.symbolMisc=new e("symbol-misc",{fontCharacter:"\\eb63"}),e.symbolOperator=new e("symbol-operator",{fontCharacter:"\\eb64"}),e.symbolProperty=new e("symbol-property",{fontCharacter:"\\eb65"}),e.wrench=new e("wrench",{fontCharacter:"\\eb65"}),e.wrenchSubaction=new e("wrench-subaction",{fontCharacter:"\\eb65"}),e.symbolSnippet=new e("symbol-snippet",{fontCharacter:"\\eb66"}),e.tasklist=new e("tasklist",{fontCharacter:"\\eb67"}),e.telescope=new e("telescope",{fontCharacter:"\\eb68"}),e.textSize=new e("text-size",{fontCharacter:"\\eb69"}),e.threeBars=new e("three-bars",{fontCharacter:"\\eb6a"}),e.thumbsdown=new e("thumbsdown",{fontCharacter:"\\eb6b"}),e.thumbsup=new e("thumbsup",{fontCharacter:"\\eb6c"}),e.tools=new e("tools",{fontCharacter:"\\eb6d"}),e.triangleDown=new e("triangle-down",{fontCharacter:"\\eb6e"}),e.triangleLeft=new e("triangle-left",{fontCharacter:"\\eb6f"}),e.triangleRight=new e("triangle-right",{fontCharacter:"\\eb70"}),e.triangleUp=new e("triangle-up",{fontCharacter:"\\eb71"}),e.twitter=new e("twitter",{fontCharacter:"\\eb72"}),e.unfold=new e("unfold",{fontCharacter:"\\eb73"}),e.unlock=new e("unlock",{fontCharacter:"\\eb74"}),e.unmute=new e("unmute",{fontCharacter:"\\eb75"}),e.unverified=new e("unverified",{fontCharacter:"\\eb76"}),e.verified=new e("verified",{fontCharacter:"\\eb77"}),e.versions=new e("versions",{fontCharacter:"\\eb78"}),e.vmActive=new e("vm-active",{fontCharacter:"\\eb79"}),e.vmOutline=new e("vm-outline",{fontCharacter:"\\eb7a"}),e.vmRunning=new e("vm-running",{fontCharacter:"\\eb7b"}),e.watch=new e("watch",{fontCharacter:"\\eb7c"}),e.whitespace=new e("whitespace",{fontCharacter:"\\eb7d"}),e.wholeWord=new e("whole-word",{fontCharacter:"\\eb7e"}),e.window=new e("window",{fontCharacter:"\\eb7f"}),e.wordWrap=new e("word-wrap",{fontCharacter:"\\eb80"}),e.zoomIn=new e("zoom-in",{fontCharacter:"\\eb81"}),e.zoomOut=new e("zoom-out",{fontCharacter:"\\eb82"}),e.listFilter=new e("list-filter",{fontCharacter:"\\eb83"}),e.listFlat=new e("list-flat",{fontCharacter:"\\eb84"}),e.listSelection=new e("list-selection",{fontCharacter:"\\eb85"}),e.selection=new e("selection",{fontCharacter:"\\eb85"}),e.listTree=new e("list-tree",{fontCharacter:"\\eb86"}),e.debugBreakpointFunctionUnverified=new e("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),e.debugBreakpointFunction=new e("debug-breakpoint-function",{fontCharacter:"\\eb88"}),e.debugBreakpointFunctionDisabled=new e("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),e.debugStackframeActive=new e("debug-stackframe-active",{fontCharacter:"\\eb89"}),e.debugStackframeDot=new e("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),e.debugStackframe=new e("debug-stackframe",{fontCharacter:"\\eb8b"}),e.debugStackframeFocused=new e("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),e.debugBreakpointUnsupported=new e("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),e.symbolString=new e("symbol-string",{fontCharacter:"\\eb8d"}),e.debugReverseContinue=new e("debug-reverse-continue",{fontCharacter:"\\eb8e"}),e.debugStepBack=new e("debug-step-back",{fontCharacter:"\\eb8f"}),e.debugRestartFrame=new e("debug-restart-frame",{fontCharacter:"\\eb90"}),e.callIncoming=new e("call-incoming",{fontCharacter:"\\eb92"}),e.callOutgoing=new e("call-outgoing",{fontCharacter:"\\eb93"}),e.menu=new e("menu",{fontCharacter:"\\eb94"}),e.expandAll=new e("expand-all",{fontCharacter:"\\eb95"}),e.feedback=new e("feedback",{fontCharacter:"\\eb96"}),e.groupByRefType=new e("group-by-ref-type",{fontCharacter:"\\eb97"}),e.ungroupByRefType=new e("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),e.account=new e("account",{fontCharacter:"\\eb99"}),e.bellDot=new e("bell-dot",{fontCharacter:"\\eb9a"}),e.debugConsole=new e("debug-console",{fontCharacter:"\\eb9b"}),e.library=new e("library",{fontCharacter:"\\eb9c"}),e.output=new e("output",{fontCharacter:"\\eb9d"}),e.runAll=new e("run-all",{fontCharacter:"\\eb9e"}),e.syncIgnored=new e("sync-ignored",{fontCharacter:"\\eb9f"}),e.pinned=new e("pinned",{fontCharacter:"\\eba0"}),e.githubInverted=new e("github-inverted",{fontCharacter:"\\eba1"}),e.debugAlt=new e("debug-alt",{fontCharacter:"\\eb91"}),e.serverProcess=new e("server-process",{fontCharacter:"\\eba2"}),e.serverEnvironment=new e("server-environment",{fontCharacter:"\\eba3"}),e.pass=new e("pass",{fontCharacter:"\\eba4"}),e.stopCircle=new e("stop-circle",{fontCharacter:"\\eba5"}),e.playCircle=new e("play-circle",{fontCharacter:"\\eba6"}),e.record=new e("record",{fontCharacter:"\\eba7"}),e.debugAltSmall=new e("debug-alt-small",{fontCharacter:"\\eba8"}),e.vmConnect=new e("vm-connect",{fontCharacter:"\\eba9"}),e.cloud=new e("cloud",{fontCharacter:"\\ebaa"}),e.merge=new e("merge",{fontCharacter:"\\ebab"}),e.exportIcon=new e("export",{fontCharacter:"\\ebac"}),e.graphLeft=new e("graph-left",{fontCharacter:"\\ebad"}),e.magnet=new e("magnet",{fontCharacter:"\\ebae"}),e.notebook=new e("notebook",{fontCharacter:"\\ebaf"}),e.redo=new e("redo",{fontCharacter:"\\ebb0"}),e.checkAll=new e("check-all",{fontCharacter:"\\ebb1"}),e.pinnedDirty=new e("pinned-dirty",{fontCharacter:"\\ebb2"}),e.passFilled=new e("pass-filled",{fontCharacter:"\\ebb3"}),e.circleLargeFilled=new e("circle-large-filled",{fontCharacter:"\\ebb4"}),e.circleLargeOutline=new e("circle-large-outline",{fontCharacter:"\\ebb5"}),e.combine=new e("combine",{fontCharacter:"\\ebb6"}),e.gather=new e("gather",{fontCharacter:"\\ebb6"}),e.table=new e("table",{fontCharacter:"\\ebb7"}),e.variableGroup=new e("variable-group",{fontCharacter:"\\ebb8"}),e.typeHierarchy=new e("type-hierarchy",{fontCharacter:"\\ebb9"}),e.typeHierarchySub=new e("type-hierarchy-sub",{fontCharacter:"\\ebba"}),e.typeHierarchySuper=new e("type-hierarchy-super",{fontCharacter:"\\ebbb"}),e.gitPullRequestCreate=new e("git-pull-request-create",{fontCharacter:"\\ebbc"}),e.runAbove=new e("run-above",{fontCharacter:"\\ebbd"}),e.runBelow=new e("run-below",{fontCharacter:"\\ebbe"}),e.notebookTemplate=new e("notebook-template",{fontCharacter:"\\ebbf"}),e.debugRerun=new e("debug-rerun",{fontCharacter:"\\ebc0"}),e.workspaceTrusted=new e("workspace-trusted",{fontCharacter:"\\ebc1"}),e.workspaceUntrusted=new e("workspace-untrusted",{fontCharacter:"\\ebc2"}),e.workspaceUnspecified=new e("workspace-unspecified",{fontCharacter:"\\ebc3"}),e.terminalCmd=new e("terminal-cmd",{fontCharacter:"\\ebc4"}),e.terminalDebian=new e("terminal-debian",{fontCharacter:"\\ebc5"}),e.terminalLinux=new e("terminal-linux",{fontCharacter:"\\ebc6"}),e.terminalPowershell=new e("terminal-powershell",{fontCharacter:"\\ebc7"}),e.terminalTmux=new e("terminal-tmux",{fontCharacter:"\\ebc8"}),e.terminalUbuntu=new e("terminal-ubuntu",{fontCharacter:"\\ebc9"}),e.terminalBash=new e("terminal-bash",{fontCharacter:"\\ebca"}),e.arrowSwap=new e("arrow-swap",{fontCharacter:"\\ebcb"}),e.copy=new e("copy",{fontCharacter:"\\ebcc"}),e.personAdd=new e("person-add",{fontCharacter:"\\ebcd"}),e.filterFilled=new e("filter-filled",{fontCharacter:"\\ebce"}),e.wand=new e("wand",{fontCharacter:"\\ebcf"}),e.debugLineByLine=new e("debug-line-by-line",{fontCharacter:"\\ebd0"}),e.inspect=new e("inspect",{fontCharacter:"\\ebd1"}),e.dropDownButton=new e("drop-down-button",e.chevronDown.definition)}(l||(l={}))},6626:(e,t,i)=>{"use strict";i.d(t,{E:()=>o,r:()=>r});const n=Object.prototype.hasOwnProperty;function o(e,t){for(let i in e)if(n.call(e,i)&&!1===t({key:i,value:e[i]},(function(){delete e[i]})))return}class r{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){const i=this.map.get(e);i&&(i.delete(t),0===i.size&&this.map.delete(e))}forEach(e,t){const i=this.map.get(e);i&&i.forEach(t)}}},1264:(e,t,i)=>{"use strict";function n(e,t){const i=Math.pow(10,t);return Math.round(e*i)/i}i.d(t,{VS:()=>o,tx:()=>s,Il:()=>a});class o{constructor(e,t,i,o=1){this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,i)),this.a=n(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class r{constructor(e,t,i,o){this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.l=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,o=e.a,s=Math.max(t,i,n),a=Math.min(t,i,n);let l=0,c=0;const u=(a+s)/2,h=s-a;if(h>0){switch(c=Math.min(u<=.5?h/(2*u):h/(2-2*u),1),s){case t:l=(i-n)/h+(i1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}static toRGBA(e){const t=e.h/360,{s:i,l:n,a:s}=e;let a,l,c;if(0===i)a=l=c=n;else{const e=n<.5?n*(1+i):n+i-n*i,o=2*n-e;a=r._hue2rgb(o,e,t+1/3),l=r._hue2rgb(o,e,t),c=r._hue2rgb(o,e,t-1/3)}return new o(Math.round(255*a),Math.round(255*l),Math.round(255*c),s)}}class s{constructor(e,t,i,o){this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.v=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,o=Math.max(t,i,n),r=o-Math.min(t,i,n),a=0===o?0:r/o;let l;return l=0===r?0:o===t?((i-n)/r%6+6)%6:o===i?(n-t)/r+2:(t-i)/r+4,new s(Math.round(60*l),a,o,e.a)}static toRGBA(e){const{h:t,s:i,v:n,a:r}=e,s=n*i,a=s*(1-Math.abs(t/60%2-1)),l=n-s;let[c,u,h]=[0,0,0];return t<60?(c=s,u=a):t<120?(c=a,u=s):t<180?(u=s,h=a):t<240?(u=a,h=s):t<300?(c=a,h=s):t<=360&&(c=s,h=a),c=Math.round(255*(c+l)),u=Math.round(255*(u+l)),h=Math.round(255*(h+l)),new o(c,u,h,r)}}class a{constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof o)this.rgba=e;else if(e instanceof r)this._hsla=e,this.rgba=r.toRGBA(e);else{if(!(e instanceof s))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=s.toRGBA(e)}}static fromHex(e){return a.Format.CSS.parseHex(e)||a.red}get hsla(){return this._hsla?this._hsla:r.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:s.fromRGBA(this.rgba)}equals(e){return!!e&&o.equals(this.rgba,e.rgba)&&r.equals(this.hsla,e.hsla)&&s.equals(this.hsva,e.hsva)}getRelativeLuminance(){return n(.2126*a._relativeLuminanceForComponent(this.rgba.r)+.7152*a._relativeLuminanceForComponent(this.rgba.g)+.0722*a._relativeLuminanceForComponent(this.rgba.b),4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128}isLighterThan(e){return this.getRelativeLuminance()>e.getRelativeLuminance()}isDarkerThan(e){return this.getRelativeLuminance(){"use strict";function n(e,t,i){let n=null,o=null;if("function"==typeof i.value?(n="value",o=i.value,0!==o.length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"==typeof i.get&&(n="get",o=i.get),!o)throw new Error("not supported");const r=`$memoize$${t}`;i[n]=function(...e){return this.hasOwnProperty(r)||Object.defineProperty(this,r,{configurable:!1,enumerable:!1,writable:!1,value:o.apply(this,e)}),this[r]}}i.d(t,{H:()=>n})},2484:(e,t,i)=>{"use strict";i.d(t,{Hs:()=>u,a$:()=>s});class n{constructor(e,t,i,n){this.originalStart=e,this.originalLength=t,this.modifiedStart=i,this.modifiedLength=n}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}var o=i(9954);class r{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let i=0,n=e.length;i0||this.m_modifiedCount>0)&&this.m_changes.push(new n(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class u{constructor(e,t,i=null){this.ContinueProcessingPredicate=i;const[n,o,r]=u._getElements(e),[s,a,l]=u._getElements(t);this._hasStrings=r&&l,this._originalStringElements=n,this._originalElementsOrHash=o,this._modifiedStringElements=s,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"==typeof e[0]}static _getElements(e){const t=e.getElements();if(u._isStringArray(t)){const e=new Int32Array(t.length);for(let i=0,n=t.length;i=e&&o>=i&&this.ElementsAreEqual(t,o);)t--,o--;if(e>t||i>o){let r;return i<=o?(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),r=[new n(e,0,i,o-i+1)]):e<=t?(a.Assert(i===o+1,"modifiedStart should only be one more than modifiedEnd"),r=[new n(e,t-e+1,i,0)]):(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a.Assert(i===o+1,"modifiedStart should only be one more than modifiedEnd"),r=[]),r}const s=[0],l=[0],c=this.ComputeRecursionPoint(e,t,i,o,s,l,r),u=s[0],h=l[0];if(null!==c)return c;if(!r[0]){const s=this.ComputeDiffRecursive(e,u,i,h,r);let a=[];return a=r[0]?[new n(u+1,t-(u+1)+1,h+1,o-(h+1)+1)]:this.ComputeDiffRecursive(u+1,t,h+1,o,r),this.ConcatenateChanges(s,a)}return[new n(e,t-e+1,i,o-i+1)]}WALKTRACE(e,t,i,o,r,s,a,l,u,h,d,g,f,p,m,_,v,b){let y=null,w=null,C=new c,S=t,x=i,k=f[0]-_[0]-o,D=-1073741824,L=this.m_forwardHistory.length-1;do{const t=k+e;t===S||t=0&&(e=(u=this.m_forwardHistory[L])[0],S=1,x=u.length-1)}while(--L>=-1);if(y=C.getReverseChanges(),b[0]){let e=f[0]+1,t=_[0]+1;if(null!==y&&y.length>0){const i=y[y.length-1];e=Math.max(e,i.getOriginalEnd()),t=Math.max(t,i.getModifiedEnd())}w=[new n(e,g-e+1,t,m-t+1)]}else{C=new c,S=s,x=a,k=f[0]-_[0]-l,D=1073741824,L=v?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=k+r;e===S||e=h[e+1]?(p=(d=h[e+1]-1)-k-l,d>D&&C.MarkNextChange(),D=d+1,C.AddOriginalElement(d+1,p+1),k=e+1-r):(p=(d=h[e-1])-k-l,d>D&&C.MarkNextChange(),D=d,C.AddModifiedElement(d+1,p+1),k=e-1-r),L>=0&&(r=(h=this.m_reverseHistory[L])[0],S=1,x=h.length-1)}while(--L>=-1);w=C.getChanges()}return this.ConcatenateChanges(y,w)}ComputeRecursionPoint(e,t,i,o,r,s,a){let c=0,u=0,h=0,d=0,g=0,f=0;e--,i--,r[0]=0,s[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const p=t-e+(o-i),m=p+1,_=new Int32Array(m),v=new Int32Array(m),b=o-i,y=t-e,w=e-i,C=t-o,S=(y-b)%2==0;_[b]=e,v[y]=t,a[0]=!1;for(let x=1;x<=p/2+1;x++){let p=0,k=0;h=this.ClipDiagonalBound(b-x,x,b,m),d=this.ClipDiagonalBound(b+x,x,b,m);for(let e=h;e<=d;e+=2){c=e===h||ep+k&&(p=c,k=u),!S&&Math.abs(e-y)<=x-1&&c>=v[e])return r[0]=c,s[0]=u,i<=v[e]&&x<=1448?this.WALKTRACE(b,h,d,w,y,g,f,C,_,v,c,t,r,u,o,s,S,a):null}const D=(p-e+(k-i)-x)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(p,D))return a[0]=!0,r[0]=p,s[0]=k,D>0&&x<=1448?this.WALKTRACE(b,h,d,w,y,g,f,C,_,v,c,t,r,u,o,s,S,a):(e++,i++,[new n(e,t-e+1,i,o-i+1)]);g=this.ClipDiagonalBound(y-x,x,y,m),f=this.ClipDiagonalBound(y+x,x,y,m);for(let n=g;n<=f;n+=2){c=n===g||n=v[n+1]?v[n+1]-1:v[n-1],u=c-(n-y)-C;const l=c;for(;c>e&&u>i&&this.ElementsAreEqual(c,u);)c--,u--;if(v[n]=c,S&&Math.abs(n-b)<=x&&c<=_[n])return r[0]=c,s[0]=u,l>=_[n]&&x<=1448?this.WALKTRACE(b,h,d,w,y,g,f,C,_,v,c,t,r,u,o,s,S,a):null}if(x<=1447){let e=new Int32Array(d-h+2);e[0]=b-h+1,l.Copy2(_,h,e,1,d-h+1),this.m_forwardHistory.push(e),e=new Int32Array(f-g+2),e[0]=y-g+1,l.Copy2(v,g,e,1,f-g+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(b,h,d,w,y,g,f,C,_,v,c,t,r,u,o,s,S,a)}PrettifyChanges(e){for(let t=0;t0,s=i.modifiedLength>0;for(;i.originalStart+i.originalLength=0;t--){const i=e[t];let n=0,o=0;if(t>0){const i=e[t-1];n=i.originalStart+i.originalLength,o=i.modifiedStart+i.modifiedLength}const r=i.originalLength>0,s=i.modifiedLength>0;let a=0,l=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let e=1;;e++){const t=i.originalStart-e,c=i.modifiedStart-e;if(tl&&(l=u,a=e)}i.originalStart-=a,i.modifiedStart-=a;const c=[null];t>0&&this.ChangesOverlap(e[t-1],e[t],c)&&(e[t-1]=c[0],e.splice(t,1),t++)}if(this._hasStrings)for(let t=1,i=e.length;t0&&i>a&&(a=i,l=t,c=e)}return a>0?[l,c]:null}_contiguousSequenceScore(e,t,i){let n=0;for(let o=0;o=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(e,t,i,n){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(i,n)?1:0)}ConcatenateChanges(e,t){let i=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],i)){const n=new Array(e.length+t.length-1);return l.Copy(e,0,n,0,e.length-1),n[e.length-1]=i[0],l.Copy(t,1,n,e.length,t.length-1),n}{const i=new Array(e.length+t.length);return l.Copy(e,0,i,0,e.length),l.Copy(t,0,i,e.length,t.length),i}}ChangesOverlap(e,t,i){if(a.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),a.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const o=e.originalStart;let r=e.originalLength;const s=e.modifiedStart;let a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(r=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),i[0]=new n(o,r,s,a),!0}return i[0]=null,!1}ClipDiagonalBound(e,t,i,n){if(e>=0&&e{"use strict";i.d(t,{dL:()=>o,Cp:()=>r,ri:()=>s,VV:()=>l,F0:()=>c,b1:()=>u,L6:()=>h});const n=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((()=>{if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e}),0)}}emit(e){this.listeners.forEach((t=>{t(e)}))}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function o(e){l(e)||n.onUnexpectedError(e)}function r(e){l(e)||n.onUnexpectedExternalError(e)}function s(e){if(e instanceof Error){let{name:t,message:i}=e;return{$isError:!0,name:t,message:i,stack:e.stacktrace||e.stack}}return e}const a="Canceled";function l(e){return e instanceof Error&&e.name===a&&e.message===a}function c(){const e=new Error(a);return e.name=e.message,e}function u(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}function h(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")}},4669:(e,t,i)=>{"use strict";i.d(t,{ju:()=>n,Q5:()=>c,K3:()=>u,E7:()=>h,ZD:()=>d});var n,o=i(7301),r=i(5976),s=i(1741),a=i(4013);!function(e){function t(e){return(t,i=null,n)=>{let o,r=!1;return o=e((e=>{if(!r)return o?o.dispose():r=!0,t.call(i,e)}),null,n),r&&o.dispose(),o}}function i(e,t){return a(((i,n=null,o)=>e((e=>i.call(n,t(e))),null,o)))}function n(e,t){return a(((i,n=null,o)=>e((e=>{t(e),i.call(n,e)}),null,o)))}function o(e,t){return a(((i,n=null,o)=>e((e=>t(e)&&i.call(n,e)),null,o)))}function s(e,t,n){let o=n;return i(e,(e=>(o=t(o,e),o)))}function a(e){let t;const i=new c({onFirstListenerAdd(){t=e(i.fire,i)},onLastListenerRemove(){t.dispose()}});return i.event}function l(e,t,i=100,n=!1,o){let r,s,a,l=0;const u=new c({leakWarningThreshold:o,onFirstListenerAdd(){r=e((e=>{l++,s=t(s,e),n&&!a&&(u.fire(s),s=void 0),clearTimeout(a),a=setTimeout((()=>{const e=s;s=void 0,a=void 0,(!n||l>1)&&u.fire(e),l=0}),i)}))},onLastListenerRemove(){r.dispose()}});return u.event}function u(e,t=((e,t)=>e===t)){let i,n=!0;return o(e,(e=>{const o=n||!t(e,i);return n=!1,i=e,o}))}e.None=()=>r.JT.None,e.once=t,e.map=i,e.forEach=n,e.filter=o,e.signal=function(e){return e},e.any=function(...e){return(t,i=null,n)=>(0,r.F8)(...e.map((e=>e((e=>t.call(i,e)),null,n))))},e.reduce=s,e.snapshot=a,e.debounce=l,e.stopwatch=function(e){const n=(new Date).getTime();return i(t(e),(e=>(new Date).getTime()-n))},e.latch=u,e.split=function(t,i){return[e.filter(t,i),e.filter(t,(e=>!i(e)))]},e.buffer=function(e,t=!1,i=[]){let n=i.slice(),o=e((e=>{n?n.push(e):s.fire(e)}));const r=()=>{n&&n.forEach((e=>s.fire(e))),n=null},s=new c({onFirstListenerAdd(){o||(o=e((e=>s.fire(e))))},onFirstListenerDidAdd(){n&&(t?setTimeout(r):r())},onLastListenerRemove(){o&&o.dispose(),o=null}});return s.event};class h{constructor(e){this.event=e}map(e){return new h(i(this.event,e))}forEach(e){return new h(n(this.event,e))}filter(e){return new h(o(this.event,e))}reduce(e,t){return new h(s(this.event,e,t))}latch(){return new h(u(this.event))}debounce(e,t=100,i=!1,n){return new h(l(this.event,e,t,i,n))}on(e,t,i){return this.event(e,t,i)}once(e,i,n){return t(this.event)(e,i,n)}}e.chain=function(e){return new h(e)},e.fromNodeEventEmitter=function(e,t,i=(e=>e)){const n=(...e)=>o.fire(i(...e)),o=new c({onFirstListenerAdd:()=>e.on(t,n),onLastListenerRemove:()=>e.removeListener(t,n)});return o.event},e.fromDOMEventEmitter=function(e,t,i=(e=>e)){const n=(...e)=>o.fire(i(...e)),o=new c({onFirstListenerAdd:()=>e.addEventListener(t,n),onLastListenerRemove:()=>e.removeEventListener(t,n)});return o.event},e.fromPromise=function(e){const t=new c;let i=!1;return e.then(void 0,(()=>null)).then((()=>{i?t.fire(void 0):setTimeout((()=>t.fire(void 0)),0)})),i=!0,t.event},e.toPromise=function(e){return new Promise((i=>t(e)(i)))}}(n||(n={}));class l{constructor(e){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${e}_${l._idPool++}`}start(e){this._stopWatch=new a.G(!0),this._listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this._elapsedOverall+=e,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${e.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}l._idPool=0;class c{constructor(e){var t;this._disposed=!1,this._options=e,this._leakageMon=void 0,this._perfMon=(null===(t=this._options)||void 0===t?void 0:t._profName)?new l(this._options._profName):void 0}get event(){return this._event||(this._event=(e,t,i)=>{var n;this._listeners||(this._listeners=new s.S);const o=this._listeners.isEmpty();o&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const a=this._listeners.push(t?[e,t]:e);o&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,e,t);const l=null===(n=this._leakageMon)||void 0===n?void 0:n.check(this._listeners.size);let u;return u={dispose:()=>{l&&l(),u.dispose=c._noop,!this._disposed&&(a(),this._options&&this._options.onLastListenerRemove)&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this))}},i instanceof r.SL?i.add(u):Array.isArray(i)&&i.push(u),u}),this._event}fire(e){var t,i;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new s.S);for(let t of this._listeners)this._deliveryQueue.push([t,e]);for(null===(t=this._perfMon)||void 0===t||t.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[e,t]=this._deliveryQueue.shift();try{"function"==typeof e?e.call(void 0,t):e[0].call(e[1],t)}catch(e){(0,o.dL)(e)}}null===(i=this._perfMon)||void 0===i||i.stop()}}dispose(){var e,t,i,n,o;this._disposed||(this._disposed=!0,null===(e=this._listeners)||void 0===e||e.clear(),null===(t=this._deliveryQueue)||void 0===t||t.clear(),null===(n=null===(i=this._options)||void 0===i?void 0:i.onLastListenerRemove)||void 0===n||n.call(i),null===(o=this._leakageMon)||void 0===o||o.dispose())}}c._noop=function(){};class u extends c{constructor(e){super(e),this._isPaused=0,this._eventQueue=new s.S,this._mergeFn=null==e?void 0:e.merge}pause(){this._isPaused++}resume(){if(0!==this._isPaused&&0==--this._isPaused)if(this._mergeFn){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}else for(;!this._isPaused&&0!==this._eventQueue.size;)super.fire(this._eventQueue.shift())}fire(e){this._listeners&&(0!==this._isPaused?this._eventQueue.push(e):super.fire(e))}}class h{constructor(){this.buffers=[]}wrapEvent(e){return(t,i,n)=>e((e=>{const n=this.buffers[this.buffers.length-1];n?n.push((()=>t.call(i,e))):t.call(i,e)}),void 0,n)}bufferEvents(e){const t=[];this.buffers.push(t);const i=e();return this.buffers.pop(),t.forEach((e=>e())),i}}class d{constructor(){this.listening=!1,this.inputEvent=n.None,this.inputEventListener=r.JT.None,this.emitter=new c({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},5527:(e,t,i)=>{"use strict";i.d(t,{fn:()=>s,KM:()=>a,vY:()=>l,oP:()=>c});var n=i(1432),o=i(7295),r=i(8721);function s(e){return-1===e.indexOf("/")&&(e=function(e){return e.replace(/[\\/]/g,r.KR.sep)}(e)),/^[a-zA-Z]:(\/|$)/.test(e)&&(e="/"+e),e}function a(e,t,i,n=r.ir){if(e===t)return!0;if(!e||!t)return!1;if(t.length>e.length)return!1;if(i){if(!(0,o.ok)(e,t))return!1;if(t.length===e.length)return!0;let i=t.length;return t.charAt(t.length-1)===n&&i--,e.charAt(i)===n}return t.charAt(t.length-1)!==n&&(t+=n),0===e.indexOf(t)}function l(e){const t=(0,r.Fv)(e);return n.ED?!(e.length>3)&&c(t)&&(2===e.length||92===t.charCodeAt(2)):t===r.KR.sep}function c(e){return!!n.ED&&((t=e.charCodeAt(0))>=65&&t<=90||t>=97&&t<=122)&&58===e.charCodeAt(1);var t}},5392:(e,t,i)=>{"use strict";i.d(t,{or:()=>r,Ji:()=>s,ir:()=>a,KZ:()=>y,Oh:()=>D,jB:()=>L,mB:()=>N,CL:()=>W,EW:()=>V,l7:()=>$});var n=i(3702),o=i(7295);function r(...e){return function(t,i){for(let n=0,o=e.length;n0?[{start:0,end:t.length}]:[]:null}.bind(void 0,!0);function a(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1===i?null:[{start:i,end:i+e.length}]}function l(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]===t[n]){let o=null;return(o=l(e,t,i+1,n+1))?m({start:n,end:n+1},o):null}return l(e,t,i,n+1)}function c(e){return 97<=e&&e<=122}function u(e){return 65<=e&&e<=90}function h(e){return 48<=e&&e<=57}function d(e){return 32===e||9===e||10===e||13===e}const g=new Set;function f(e){return d(e)||g.has(e)}function p(e){return c(e)||u(e)||h(e)}function m(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function _(e,t){for(let i=t;i0&&!p(e.charCodeAt(i-1)))return i}return e.length}function v(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]!==t[n].toLowerCase())return null;{let o=null,r=n+1;for(o=v(e,t,i+1,n+1);!o&&(r=_(t,r))60)return null;const i=function(e){let t=0,i=0,n=0,o=0,r=0;for(let s=0;s.2&&t<.8&&n>.6&&o<.2}(i)){if(!function(e){const{upperPercent:t,lowerPercent:i}=e;return 0===i&&t>.6}(i))return null;t=t.toLowerCase()}let n=null,o=0;for(e=e.toLowerCase();o0&&f(e.charCodeAt(i-1)))return i;return e.length}"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?".split("").forEach((e=>g.add(e.charCodeAt(0))));const S=r(s,b,a),x=r(s,b,(function(e,t){return l(e.toLowerCase(),t.toLowerCase(),0,0)})),k=new n.z6(1e4);function D(e,t,i=!1){if("string"!=typeof e||"string"!=typeof t)return null;let n=k.get(e);n||(n=new RegExp(o.un(e),"i"),k.set(e,n));const r=n.exec(t);return r?[{start:r.index,end:r.index+r[0].length}]:i?x(e,t):S(e,t)}function L(e,t,i,n,o,r){const s=Math.min(13,e.length);for(;i1;n--){const o=e[n]+i,r=t[t.length-1];r&&r.end===o?r.end=o+1:t.push({start:o,end:o+1})}return t}const E=128;function A(){const e=[],t=[];for(let e=0;e<=E;e++)t[e]=0;for(let i=0;i<=E;i++)e.push(t.slice(0));return e}function M(e){const t=[];for(let i=0;i<=e;i++)t[i]=0;return t}const I=M(256),T=M(256),R=A(),O=A(),F=A();function P(e,t){if(t<0||t>=e.length)return!1;const i=e.codePointAt(t);switch(i){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 40:case 91:return!0;case void 0:return!1;default:return!!o.C8(i)}}function B(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}function z(e,t,i){return t[e]!==i[e]}var W;function V(e,t,i,n,o,r,s){const a=e.length>E?E:e.length,l=n.length>E?E:n.length;if(i>=a||r>=l||a-i>l-r)return;if(!function(e,t,i,n,o,r,s=!1){for(;t=i&&a>=n;)o[s]===r[a]&&(T[s]=a,s--),a--}(a,l,i,r,t,o);let c=1,u=1,h=i,d=r;const g=[!1];for(c=1,h=i;hs,v=_?O[c][u-1]+(R[c][u-1]>0?-5:0):0,b=d>s+1&&R[c][u-1]>0,y=b?O[c][u-2]+(R[c][u-2]>0?-5:0):0;if(b&&(!_||y>=v)&&(!p||y>=m))O[c][u]=y,F[c][u]=3,R[c][u]=0;else if(_&&(!p||v>=m))O[c][u]=v,F[c][u]=2,R[c][u]=0;else{if(!p)throw new Error("not possible");O[c][u]=m,F[c][u]=1,R[c][u]=R[c-1][u-1]+1}}}if(!g[0]&&!s)return;c--,u--;const f=[O[c][u],r];let p=0,m=0;for(;c>=1;){let e=u;do{const t=F[c][e];if(3===t)e-=2;else{if(2!==t)break;e-=1}}while(e>=1);p>1&&t[i+c-1]===o[r+u-1]&&!z(e+r-1,n,o)&&p+1>R[c][e]&&(e=u),e===u?p++:p=1,m||(m=e),c--,u=e-1,f.push(u)}l===a&&(f[0]+=2);const _=m-a;return f[0]-=_,f}function H(e,t,i,n,o,r,s,a,l,c,u){if(t[i]!==r[s])return Number.MIN_SAFE_INTEGER;let h=1,d=!1;return s===i-n?h=e[i]===o[s]?7:5:!z(s,o,r)||0!==s&&z(s-1,o,r)?!P(r,s)||0!==s&&P(r,s-1)?(P(r,s-1)||B(r,s-1))&&(h=5,d=!0):h=5:(h=e[i]===o[s]?7:5,d=!0),h>1&&i===n&&(u[0]=!0),d||(d=z(s,o,r)||P(r,s-1)||B(r,s-1)),i===n?s>l&&(h-=d?3:5):h+=c?d?2:0:d?0:1,s+1===a&&(h-=d?3:5),h}function $(e,t,i,n,o,r,s){return function(e,t,i,n,o,r,s,a){let l=V(e,t,i,n,o,r,a);if(e.length>=3){const t=Math.min(7,e.length-1);for(let s=i+1;sl[0])&&(l=e))}}}return l}(e,t,i,n,o,r,0,s)}function U(e,t){if(t+1>=e.length)return;const i=e[t],n=e[t+1];return i!==n?e.slice(0,t)+n+i+e.slice(t+2):void 0}!function(e){e.Default=[-100,0],e.isDefault=function(e){return!e||2===e.length&&-100===e[0]&&0===e[1]}}(W||(W={}))},8289:(e,t,i)=>{"use strict";function n(e){const t=this;let i,n=!1;return function(){return n||(n=!0,i=e.apply(t,arguments)),i}}i.d(t,{I:()=>n})},4118:(e,t,i)=>{"use strict";i.d(t,{EQ:()=>D});var n=i(7295),o=i(5527),r=i(8721),s=i(3702),a=i(5393);const l="**",c=/\//g;function u(e){switch(e){case 0:return"";case 1:return"[^/\\\\]*?";default:return"(?:[/\\\\]|[^/\\\\]+[/\\\\]|[/\\\\][^/\\\\]+)*?"}}function h(e,t){if(!e)return[];const i=[];let n=!1,o=!1,r="";for(const s of e){switch(s){case t:if(!n&&!o){i.push(r),r="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":o=!0;break;case"]":o=!1}r+=s}return r&&i.push(r),i}function d(e){if(!e)return"";let t="";const i=h(e,"/");if(i.every((e=>e===l)))t=".*";else{let e=!1;i.forEach(((o,r)=>{if(o===l)return void(e||(t+=u(2),e=!0));let s=!1,a="",c=!1,g="";for(const e of o)if("}"!==e&&s)a+=e;else if(!c||"]"===e&&g)switch(e){case"{":s=!0;continue;case"[":c=!0;continue;case"}":const i=`(?:${h(a,",").map((e=>d(e))).join("|")})`;t+=i,s=!1,a="";break;case"]":t+="["+g+"]",c=!1,g="";break;case"?":t+="[^/\\\\]";continue;case"*":t+=u(1);continue;default:t+=n.ec(e)}else{let t;t="-"===e?e:"^"!==e&&"!"!==e||g?"/"===e?"":n.ec(e):"^",g+=t}rC(e,t))).filter((e=>e!==w)),e),n=i.length;if(!n)return w;if(1===n)return i[0];const o=function(t,n){for(let o=0,r=i.length;o!!e.allBasenames));r&&(o.allBasenames=r.allBasenames);const s=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return s.length&&(o.allPaths=s),o}(i,t):(o=_.exec(x(i,t)))?k(o[1].substr(1),i,!0):(o=v.exec(x(i,t)))?k(o[1],i,!1):function(e){try{const t=new RegExp(`^${d(e)}$`);return function(i){return t.lastIndex=0,"string"==typeof i&&t.test(i)?e:null}}catch(e){return w}}(i);return b.set(n,r),S(r,e)}function S(e,t){return"string"==typeof t?e:function(i,n){return o.KM(i,t.base)?e(r.Gf(t.base,i),n):null}}function x(e,t){return t.trimForExclusions&&e.endsWith("/**")?e.substr(0,e.length-2):e}function k(e,t,i){const n=r.ir===r.KR.sep,o=n?e:e.replace(c,r.ir),s=r.ir+o,a=r.KR.sep+e,l=i?function(i,r){return"string"!=typeof i||i!==o&&!i.endsWith(s)&&(n||i!==e&&!i.endsWith(a))?null:t}:function(i,r){return"string"!=typeof i||i!==o&&(n||i!==e)?null:t};return l.allPaths=[(i?"*/":"./")+e],l}function D(e,t,i){return!(!e||"string"!=typeof t)&&function(e,t={}){if(!e)return y;if("string"==typeof e||function(e){const t=e;return t&&"string"==typeof t.base&&"string"==typeof t.pattern}(e)){const i=C(e,t);if(i===w)return y;const n=function(e,t){return!!i(e,t)};return i.allBasenames&&(n.allBasenames=i.allBasenames),i.allPaths&&(n.allPaths=i.allPaths),n}return function(e,t){const i=L(Object.getOwnPropertyNames(e).map((i=>function(e,t,i){if(!1===t)return w;const n=C(e,i);if(n===w)return w;if("boolean"==typeof t)return n;if(t){const i=t.when;if("string"==typeof i){const t=(t,o,r,s)=>{if(!s||!n(t,o))return null;const l=s(i.replace("$(basename)",r));return(0,a.J8)(l)?l.then((t=>t?e:null)):l?e:null};return t.requiresSiblings=!0,t}}return n}(i,e[i],t))).filter((e=>e!==w))),n=i.length;if(!n)return w;if(!i.some((e=>!!e.requiresSiblings))){if(1===n)return i[0];const e=function(e,t){for(let n=0,o=i.length;n!!e.allBasenames));t&&(e.allBasenames=t.allBasenames);const o=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return o.length&&(e.allPaths=o),e}const o=function(e,t,n){let o;for(let s=0,a=i.length;s!!e.allBasenames));s&&(o.allBasenames=s.allBasenames);const l=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return l.length&&(o.allPaths=l),o}(e,t)}(e)(t,void 0,i)}function L(e,t){const i=e.filter((e=>!!e.basenames));if(i.length<2)return e;const n=i.reduce(((e,t)=>{const i=t.basenames;return i?e.concat(i):e}),[]);let o;if(t){o=[];for(let e=0,i=n.length;e{const i=t.patterns;return i?e.concat(i):e}),[]);const r=function(e,t){if("string"!=typeof e)return null;if(!t){let i;for(i=e.length;i>0;i--){const t=e.charCodeAt(i-1);if(47===t||92===t)break}t=e.substr(i)}const i=n.indexOf(t);return-1!==i?o[i]:null};r.basenames=n,r.patterns=o,r.allBasenames=n;const s=e.filter((e=>!e.basenames));return s.push(r),s}},9954:(e,t,i)=>{"use strict";i.d(t,{vp:()=>o,Cv:()=>a,yP:()=>h});var n=i(7295);function o(e){return r(e,0)}function r(e,t){switch(typeof e){case"object":return null===e?s(349,t):Array.isArray(e)?(i=e,n=s(104579,n=t),i.reduce(((e,t)=>r(t,e)),n)):function(e,t){return t=s(181387,t),Object.keys(e).sort().reduce(((t,i)=>(t=a(i,t),r(e[i],t))),t)}(e,t);case"string":return a(e,t);case"boolean":return function(e,t){return s(e?433:863,t)}(e,t);case"number":return s(e,t);case"undefined":return s(937,t);default:return s(617,t)}var i,n}function s(e,t){return(t<<5)-t+e|0}function a(e,t){t=s(149417,t);for(let i=0,n=e.length;i>>n)>>>0}function c(e,t=0,i=e.byteLength,n=0){for(let o=0;oe.toString(16).padStart(2,"0"))).join(""):function(e,t,i="0"){for(;e.length>>0).toString(16),t/4)}class h{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const i=this._buff;let o,r,s=this._buffLen,a=this._leftoverHighSurrogate;for(0!==a?(o=a,r=-1,a=0):(o=e.charCodeAt(0),r=0);;){let l=o;if(n.ZG(o)){if(!(r+1>>6,e[t++]=128|(63&i)>>>0):i<65536?(e[t++]=224|(61440&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0):(e[t++]=240|(1835008&i)>>>18,e[t++]=128|(258048&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),u(this._h0)+u(this._h1)+u(this._h2)+u(this._h3)+u(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,c(this._buff,this._buffLen),this._buffLen>56&&(this._step(),c(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=h._bigBlock32,t=this._buffDV;for(let i=0;i<64;i+=4)e.setUint32(i,t.getUint32(i,!1),!1);for(let t=64;t<320;t+=4)e.setUint32(t,l(e.getUint32(t-12,!1)^e.getUint32(t-32,!1)^e.getUint32(t-56,!1)^e.getUint32(t-64,!1),1),!1);let i,n,o,r=this._h0,s=this._h1,a=this._h2,c=this._h3,u=this._h4;for(let t=0;t<80;t++)t<20?(i=s&a|~s&c,n=1518500249):t<40?(i=s^a^c,n=1859775393):t<60?(i=s&a|s&c|a&c,n=2400959708):(i=s^a^c,n=3395469782),o=l(r,5)+i+u+n+e.getUint32(4*t,!1)&4294967295,u=c,c=a,a=l(s,30),s=r,r=o;this._h0=this._h0+r&4294967295,this._h1=this._h1+s&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+c&4294967295,this._h4=this._h4+u&4294967295}}h._bigBlock32=new DataView(new ArrayBuffer(320))},9365:(e,t,i)=>{"use strict";i.d(t,{W5:()=>r,CP:()=>s,oR:()=>a,v1:()=>l});var n=i(1212),o=i(7301);class r{constructor(e="",t=!1){var i,n;if(this.value=e,"string"!=typeof this.value)throw(0,o.b1)("value");"boolean"==typeof t?(this.isTrusted=t,this.supportThemeIcons=!1):(this.isTrusted=null!==(i=t.isTrusted)&&void 0!==i?i:void 0,this.supportThemeIcons=null!==(n=t.supportThemeIcons)&&void 0!==n&&n)}appendText(e,t=0){var i;return this.value+=(i=this.supportThemeIcons?(0,n.Qo)(e):e,i.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")).replace(/([ \t]+)/g,((e,t)=>" ".repeat(t.length))).replace(/^>/gm,"\\>").replace(/\n/g,1===t?"\\\n":"\n\n"),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+="\n```",this.value+=e,this.value+="\n",this.value+=t,this.value+="\n```\n",this}}function s(e){return(t=e)instanceof r||t&&"object"==typeof t&&!("string"!=typeof t.value||"boolean"!=typeof t.isTrusted&&void 0!==t.isTrusted||"boolean"!=typeof t.supportThemeIcons&&void 0!==t.supportThemeIcons)?!e.value:!Array.isArray(e)||e.every(s);var t}function a(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1"):e}function l(e){const t=[],i=e.split("|").map((e=>e.trim()));e=i[0];const n=i[1];if(n){const e=/height=(\d+)/.exec(n),i=/width=(\d+)/.exec(n),o=e?e[1]:"",r=i?i[1]:"",s=isFinite(parseInt(r)),a=isFinite(parseInt(o));s&&t.push(`width="${r}"`),a&&t.push(`height="${o}"`)}return{href:e,dimensions:t}}},1212:(e,t,i)=>{"use strict";i.d(t,{Qo:()=>c,f$:()=>h,x$:()=>g,Ho:()=>f,Gt:()=>p});var n=i(3046),o=i(5392),r=i(7295);const s="$(",a=new RegExp(`\\$\\(${n.dT.iconNameExpression}(?:${n.dT.iconModifierExpression})?\\)`,"g"),l=new RegExp(`(\\\\)?${a.source}`,"g");function c(e){return e.replace(l,((e,t)=>t?e:`\\${e}`))}const u=new RegExp(`\\\\${a.source}`,"g");function h(e){return e.replace(u,(e=>`\\${e}`))}const d=new RegExp(`(\\s)?(\\\\)?${a.source}(\\s)?`,"g");function g(e){return-1===e.indexOf(s)?e:e.replace(d,((e,t,i,n)=>i?e:t||n||""))}function f(e){const t=e.indexOf(s);return-1===t?{text:e}:function(e,t){const i=[];let n="";function o(e){if(e){n+=e;for(const t of e)i.push(u)}}let r,a,l=-1,c="",u=0,h=t;const d=e.length;for(o(e.substr(0,t));h{"use strict";i.d(t,{R:()=>n,a:()=>o});class n{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const o=new n("id#")},3725:(e,t,i)=>{"use strict";var n;i.d(t,{$:()=>n}),function(e){e.is=function(e){return e&&"object"==typeof e&&"function"==typeof e[Symbol.iterator]};const t=Object.freeze([]);e.empty=function(){return t},e.single=function*(e){yield e},e.from=function(e){return e||t},e.isEmpty=function(e){return!e||!0===e[Symbol.iterator]().next().done},e.first=function(e){return e[Symbol.iterator]().next().value},e.some=function(e,t){for(const i of e)if(t(i))return!0;return!1},e.find=function(e,t){for(const i of e)if(t(i))return i},e.filter=function*(e,t){for(const i of e)t(i)&&(yield i)},e.map=function*(e,t){let i=0;for(const n of e)yield t(n,i++)},e.concat=function*(...e){for(const t of e)for(const e of t)yield e},e.concatNested=function*(e){for(const t of e)for(const e of t)yield e},e.reduce=function(e,t,i){let n=i;for(const i of e)n=t(n,i);return n},e.slice=function*(e,t,i=e.length){for(t<0&&(t+=e.length),i<0?i+=e.length:i>e.length&&(i=e.length);to}]},e.equals=function(e,t,i=((e,t)=>e===t)){const n=e[Symbol.iterator](),o=t[Symbol.iterator]();for(;;){const e=n.next(),t=o.next();if(e.done!==t.done)return!1;if(e.done)return!0;if(!i(e.value,t.value))return!1}}}(n||(n={}))},2258:(e,t,i)=>{"use strict";i.d(t,{kL:()=>l,gx:()=>c,gm:()=>u,QC:()=>d,BQ:()=>f,f1:()=>p});var n=i(7301);class o{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const r=new o,s=new o,a=new o;var l;function c(e,t){return(e|(65535&t)<<16>>>0)>>>0}function u(e,t){if(0===e)return null;const i=(65535&e)>>>0,n=(4294901760&e)>>>16;return new g(0!==n?[h(i,t),h(n,t)]:[h(i,t)])}function h(e,t){const i=!!(2048&e),n=!!(256&e);return new d(2===t?n:i,!!(1024&e),!!(512&e),2===t?i:n,255&e)}!function(){function e(e,t,i=t,n=i){r.define(e,t),s.define(e,i),a.define(e,n)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")}(),function(e){e.toString=function(e){return r.keyCodeToStr(e)},e.fromString=function(e){return r.strToKeyCode(e)},e.toUserSettingsUS=function(e){return s.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return a.keyCodeToStr(e)},e.fromUserSettings=function(e){return s.strToKeyCode(e)||a.strToKeyCode(e)}}(l||(l={}));class d{constructor(e,t,i,n,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyCode=o}equals(e){return this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode}toChord(){return new g([this])}isDuplicateModifierCase(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode}}class g{constructor(e){if(0===e.length)throw(0,n.b1)("parts");this.parts=e}}class f{constructor(e,t,i,n,o,r){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyLabel=o,this.keyAriaLabel=r}}class p{}},8030:(e,t,i)=>{"use strict";i.d(t,{xo:()=>r,X4:()=>s});var n=i(3580);class o{constructor(e,t,i=t){this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=i}toLabel(e,t,i){if(0===t.length)return null;const n=[];for(let o=0,r=t.length;o{"use strict";i.d(t,{p:()=>l,D:()=>c});var n=i(666),o=i(6663),r=i(1432),s=i(5935),a=i(5527);function l(e){if(!e)return;"string"==typeof e&&(e=n.o.file(e));const t=(0,s.EZ)(e)||(e.scheme===o.lg.file?e.fsPath:e.path);return r.ED&&(0,a.vY)(t)?c(t):t}function c(e){return(0,a.oP)(e)?e.charAt(0).toUpperCase()+e.slice(1):e}},5976:(e,t,i)=>{"use strict";i.d(t,{wi:()=>r,Wf:()=>a,B9:()=>l,F8:()=>c,OF:()=>u,SL:()=>h,JT:()=>d,XK:()=>g,Jz:()=>f});var n=i(3725);function o(e){}function r(e){return e}class s extends Error{constructor(e){super(`Encountered errors while disposing of store. Errors: [${e.join(", ")}]`),this.errors=e}}function a(e){return"function"==typeof e.dispose&&0===e.dispose.length}function l(e){if(n.$.is(e)){let t=[];for(const i of e)if(i)try{i.dispose()}catch(e){t.push(e)}if(1===t.length)throw t[0];if(t.length>1)throw new s(t);return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function c(...e){return e.forEach(o),u((()=>l(e)))}function u(e){const t={dispose:()=>{e()}};return t}class h{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){try{l(this._toDispose.values())}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?h.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}}h.DISABLE_DISPOSED_WARNING=!1;class d{constructor(){this._store=new h}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}d.None=Object.freeze({dispose(){}});class g{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||(null===(t=this._value)||void 0===t||t.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,null===(e=this._value)||void 0===e||e.dispose(),this._value=void 0}}class f{constructor(e){this.object=e}dispose(){}}},1741:(e,t,i)=>{"use strict";i.d(t,{S:()=>o});class n{constructor(e){this.element=e,this.next=n.Undefined,this.prev=n.Undefined}}n.Undefined=new n(void 0);class o{constructor(){this._first=n.Undefined,this._last=n.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===n.Undefined}clear(){let e=this._first;for(;e!==n.Undefined;){const t=e.next;e.prev=n.Undefined,e.next=n.Undefined,e=t}this._first=n.Undefined,this._last=n.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new n(e);if(this._first===n.Undefined)this._first=i,this._last=i;else if(t){const e=this._last;this._last=i,i.prev=e,e.next=i}else{const e=this._first;this._first=i,i.next=e,e.prev=i}this._size+=1;let o=!1;return()=>{o||(o=!0,this._remove(i))}}shift(){if(this._first!==n.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==n.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==n.Undefined&&e.next!==n.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===n.Undefined&&e.next===n.Undefined?(this._first=n.Undefined,this._last=n.Undefined):e.next===n.Undefined?(this._last=this._last.prev,this._last.next=n.Undefined):e.prev===n.Undefined&&(this._first=this._first.next,this._first.prev=n.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==n.Undefined;)yield e.element,e=e.next}}},3702:(e,t,i)=>{"use strict";i.d(t,{Id:()=>d,Y9:()=>g,z6:()=>p});var n,o,r=i(666),s=i(7295);class a{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos!1)){return new d(new u(e))}static forStrings(){return new d(new a)}static forConfigKeys(){return new d(new l)}clear(){this._root=void 0}set(e,t){const i=this._iter.reset(e);let n;for(this._root||(this._root=new h,this._root.segment=i.value()),n=this._root;;){const e=i.cmp(n.segment);if(e>0)n.left||(n.left=new h,n.left.segment=i.value()),n=n.left;else if(e<0)n.right||(n.right=new h,n.right.segment=i.value()),n=n.right;else{if(!i.hasNext())break;i.next(),n.mid||(n.mid=new h,n.mid.segment=i.value()),n=n.mid}}const o=n.value;return n.value=t,n.key=e,o}get(e){var t;return null===(t=this._getNode(e))||void 0===t?void 0:t.value}_getNode(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else{if(!t.hasNext())break;t.next(),i=i.mid}}return i}has(e){const t=this._getNode(e);return!(void 0===(null==t?void 0:t.value)&&void 0===(null==t?void 0:t.mid))}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){const i=this._iter.reset(e),n=[];let o=this._root;for(;o;){const e=i.cmp(o.segment);if(e>0)n.push([1,o]),o=o.left;else if(e<0)n.push([-1,o]),o=o.right;else{if(!i.hasNext()){for(t?(o.left=void 0,o.mid=void 0,o.right=void 0):o.value=void 0;n.length>0&&o.isEmpty();){let[e,t]=n.pop();switch(e){case 1:t.left=void 0;break;case 0:t.mid=void 0;break;case-1:t.right=void 0}o=t}break}i.next(),n.push([0,o]),o=o.mid}}}findSubstr(e){const t=this._iter.reset(e);let i,n=this._root;for(;n;){const e=t.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!t.hasNext())break;t.next(),i=n.value||i,n=n.mid}}return n&&n.value||i}findSuperstr(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else{if(!t.hasNext())return i.mid?this._entries(i.mid):void 0;t.next(),i=i.mid}}}forEach(e){for(const[t,i]of this)e(i,t)}*[Symbol.iterator](){yield*this._entries(this._root)}*_entries(e,t=0){t>5e3?console.log("potential CYCLE detected",(new Error).stack):e&&(yield*this._entries(e.left,t++),e.value&&(yield[e.key,e.value]),yield*this._entries(e.mid,t++),yield*this._entries(e.right,t++))}}class g{constructor(e,t){this[n]="ResourceMap",e instanceof g?(this.map=new Map(e.map),this.toKey=null!=t?t:g.defaultToKey):(this.map=new Map,this.toKey=null!=e?e:g.defaultToKey)}set(e,t){return this.map.set(this.toKey(e),t),this}get(e){return this.map.get(this.toKey(e))}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){void 0!==t&&(e=e.bind(t));for(let[t,i]of this.map)e(i,r.o.parse(t),this)}values(){return this.map.values()}*keys(){for(let e of this.map.keys())yield r.o.parse(e)}*entries(){for(let e of this.map.entries())yield[r.o.parse(e[0]),e[1]]}*[(n=Symbol.toStringTag,Symbol.iterator)](){for(let e of this.map)yield[r.o.parse(e[0]),e[1]]}}g.defaultToKey=e=>e.toString();class f{constructor(){this[o]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}has(e){return this._map.has(e)}get(e,t=0){const i=this._map.get(e);if(i)return 0!==t&&this.touch(i,t),i.value}set(e,t,i=0){let n=this._map.get(e);if(n)n.value=t,0!==i&&this.touch(n,i);else{switch(n={key:e,value:t,next:void 0,previous:void 0},i){case 0:this.addItemLast(n);break;case 1:this.addItemFirst(n);break;case 2:default:this.addItemLast(n)}this._map.set(e,n),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const i=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.key,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.value,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:[i.key,i.value],done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}[(o=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.next,i--;this._head=t,this._size=i,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,i=e.previous;if(!t||!i)throw new Error("Invalid list");t.previous=i,i.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(t.previous=i,i.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,i=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=i,i.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,i)=>{e.push([i,t])})),e}fromJSON(e){this.clear();for(const[t,i]of e)this.set(t,i)}}class p extends f{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},3720:function(e){e.exports=function(){"use strict";function e(e,t){for(var i=0;ie.length)&&(t=e.length);for(var i=0,n=new Array(t);i=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var n=function(e){var t={exports:{}};return e(t,t.exports),t.exports}((function(e){function t(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1},getDefaults:t,changeDefaults:function(t){e.exports.defaults=t}}})),o=/[&<>"']/,r=/[&<>"']/g,s=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},c=function(e){return l[e]};var u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function h(e){return e.replace(u,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var d=/(^|[^\[])\^/g;var g=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;var p={},m=/^[^:]+:\/*[^/]*$/,_=/^([^:]+:)[\s\S]*$/,v=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(e,t){p[" "+e]||(m.test(e)?p[" "+e]=e+"/":p[" "+e]=y(e,"/",!0));var i=-1===(e=p[" "+e]).indexOf(":");return"//"===t.substring(0,2)?i?t:e.replace(_,"$1")+t:"/"===t.charAt(0)?i?t:e.replace(v,"$1")+t:e+t}function y(e,t,i){var n=e.length;if(0===n)return"";for(var o=0;o=0&&"\\"===i[o];)n=!n;return n?"|":" |"})).split(/ \|/),n=0;if(i.length>t)i.splice(t);else for(;i.length1;)1&t&&(i+=e),t>>=1,e+=e;return i+e},I=n.defaults,T=N,R=L,O=w,F=E;function P(e,t,i){var n=t.href,o=t.title?O(t.title):null,r=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:i,href:n,title:o,text:r}:{type:"image",raw:i,href:n,title:o,text:O(r)}}var B=function(){function e(e){this.options=e||I}var t=e.prototype;return t.space=function(e){var t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e){var t=this.rules.block.code.exec(e);if(t){var i=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?i:T(i,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var i=t[0],n=function(e,t){var i=e.match(/^(\s+)(?:```)/);if(null===i)return t;var n=i[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=n.length?e.slice(n.length):e})).join("\n")}(i,t[3]||"");return{type:"code",raw:i,lang:t[2]?t[2].trim():t[2],text:n}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var i=t[2].trim();if(/#$/.test(i)){var n=T(i,"#");this.options.pedantic?i=n.trim():n&&!/ $/.test(n)||(i=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:i}}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var i={type:"table",header:R(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(i.header.length===i.align.length){var n,o=i.align.length;for(n=0;n ?/gm,"");return{type:"blockquote",raw:t[0],text:i}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){var i,n,o,r,s,a,l,c,u=t[0],h=t[2],d=h.length>1,g={type:"list",raw:u,ordered:d,start:d?+h.slice(0,-1):"",loose:!1,items:[]},f=t[0].match(this.rules.block.item),p=!1,m=f.length;o=this.rules.block.listItemStart.exec(f[0]);for(var _=0;_o[1].length:r[1].length>o[0].length||r[1].length>3){f.splice(_,2,f[_]+"\n"+f[_+1]),_--,m--;continue}(!this.options.pedantic||this.options.smartLists?r[2][r[2].length-1]!==h[h.length-1]:d===(1===r[2].length))&&(s=f.slice(_+1).join("\n"),g.raw=g.raw.substring(0,g.raw.length-s.length),_=m-1),o=r}n=i.length,~(i=i.replace(/^ *([*+-]|\d+[.)]) ?/,"")).indexOf("\n ")&&(n-=i.length,i=this.options.pedantic?i.replace(/^ {1,4}/gm,""):i.replace(new RegExp("^ {1,"+n+"}","gm"),"")),a=p||/\n\n(?!\s*$)/.test(i),_!==m-1&&(p="\n"===i.charAt(i.length-1),a||(a=p)),a&&(g.loose=!0),this.options.gfm&&(c=void 0,(l=/^\[[ xX]\] /.test(i))&&(c=" "!==i[1],i=i.replace(/^\[[ xX]\] +/,""))),g.items.push({type:"list_item",raw:u,task:l,checked:c,loose:a,text:i})}return g}},t.html=function(e){var t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):O(t[0]):t[0]}},t.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},t.table=function(e){var t=this.rules.block.table.exec(e);if(t){var i={type:"table",header:R(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(i.header.length===i.align.length){i.raw=t[0];var n,o=i.align.length;for(n=0;n/i.test(n[0])&&(t=!1),!i&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?i=!0:i&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(i=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:t,inRawBlock:i,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):O(n[0]):n[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var i=t[2].trim();if(!this.options.pedantic&&/^$/.test(i))return;var n=T(i.slice(0,-1),"\\");if((i.length-n.length)%2==0)return}else{var o=F(t[2],"()");if(o>-1){var r=(0===t[0].indexOf("!")?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,r).trim(),t[3]=""}}var s=t[2],a="";if(this.options.pedantic){var l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s);l&&(s=l[1],a=l[3])}else a=t[3]?t[3].slice(1,-1):"";return s=s.trim(),/^$/.test(i)?s.slice(1):s.slice(1,-1)),P(t,{href:s?s.replace(this.rules.inline._escapes,"$1"):s,title:a?a.replace(this.rules.inline._escapes,"$1"):a},t[0])}},t.reflink=function(e,t){var i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){var n=(i[2]||i[1]).replace(/\s+/g," ");if(!(n=t[n.toLowerCase()])||!n.href){var o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return P(i,n,i[0])}},t.emStrong=function(e,t,i){void 0===i&&(i="");var n=this.rules.inline.emStrong.lDelim.exec(e);if(n&&(!n[3]||!i.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\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\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\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\u1369-\u137C\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\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\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\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\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-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\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-\uAB69\uAB70-\uABE2\uABF0-\uABF9\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\uFF10-\uFF19\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\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\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\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\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]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\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]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var o=n[1]||n[2]||"";if(!o||o&&(""===i||this.rules.inline.punctuation.exec(i))){var r,s,a=n[0].length-1,l=a,c=0,u="*"===n[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+a);null!=(n=u.exec(t));)if(r=n[1]||n[2]||n[3]||n[4]||n[5]||n[6])if(s=r.length,n[3]||n[4])l+=s;else if(!((n[5]||n[6])&&a%3)||(a+s)%3){if(!((l-=s)>0)){if(l+c-s<=0&&!t.slice(u.lastIndex).match(u)&&(s=Math.min(s,s+l+c)),Math.min(a,s)%2)return{type:"em",raw:e.slice(0,a+n.index+s+1),text:e.slice(1,a+n.index+s)};if(Math.min(a,s)%2==0)return{type:"strong",raw:e.slice(0,a+n.index+s+1),text:e.slice(2,a+n.index+s-1)}}}else c+=s}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var i=t[2].replace(/\n/g," "),n=/[^ ]/.test(i),o=/^ /.test(i)&&/ $/.test(i);return n&&o&&(i=i.substring(1,i.length-1)),i=O(i,!0),{type:"codespan",raw:t[0],text:i}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2]}},t.autolink=function(e,t){var i,n,o=this.rules.inline.autolink.exec(e);if(o)return n="@"===o[2]?"mailto:"+(i=O(this.options.mangle?t(o[1]):o[1])):i=O(o[1]),{type:"link",raw:o[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}},t.url=function(e,t){var i;if(i=this.rules.inline.url.exec(e)){var n,o;if("@"===i[2])o="mailto:"+(n=O(this.options.mangle?t(i[0]):i[0]));else{var r;do{r=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0]}while(r!==i[0]);n=O(i[0]),o="www."===i[1]?"http://"+n:n}return{type:"link",raw:i[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}},t.inlineText=function(e,t,i){var n,o=this.rules.inline.text.exec(e);if(o)return n=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(o[0]):O(o[0]):o[0]:O(this.options.smartypants?i(o[0]):o[0]),{type:"text",raw:o[0],text:n}},e}(),z=k,W=S,V=D,H={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:z,table:z,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};H.def=W(H.def).replace("label",H._label).replace("title",H._title).getRegex(),H.bullet=/(?:[*+-]|\d{1,9}[.)])/,H.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,H.item=W(H.item,"gm").replace(/bull/g,H.bullet).getRegex(),H.listItemStart=W(/^( *)(bull)/).replace("bull",H.bullet).getRegex(),H.list=W(H.list).replace(/bull/g,H.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+H.def.source+")").getRegex(),H._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",H._comment=/|$)/,H.html=W(H.html,"i").replace("comment",H._comment).replace("tag",H._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),H.paragraph=W(H._paragraph).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.blockquote=W(H.blockquote).replace("paragraph",H.paragraph).getRegex(),H.normal=V({},H),H.gfm=V({},H.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),H.gfm.nptable=W(H.gfm.nptable).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.gfm.table=W(H.gfm.table).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.pedantic=V({},H.normal,{html:W("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",H._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:z,paragraph:W(H.normal._paragraph).replace("hr",H.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",H.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var $={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:z,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/\_\_[^_]*?\*[^_]*?\_\_|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/\*\*[^*]*?\_[^*]*?\*\*|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:z,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};$.punctuation=W($.punctuation).replace(/punctuation/g,$._punctuation).getRegex(),$.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,$.escapedEmSt=/\\\*|\\_/g,$._comment=W(H._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),$.emStrong.lDelim=W($.emStrong.lDelim).replace(/punct/g,$._punctuation).getRegex(),$.emStrong.rDelimAst=W($.emStrong.rDelimAst,"g").replace(/punct/g,$._punctuation).getRegex(),$.emStrong.rDelimUnd=W($.emStrong.rDelimUnd,"g").replace(/punct/g,$._punctuation).getRegex(),$._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,$._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,$._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,$.autolink=W($.autolink).replace("scheme",$._scheme).replace("email",$._email).getRegex(),$._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,$.tag=W($.tag).replace("comment",$._comment).replace("attribute",$._attribute).getRegex(),$._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,$._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,$._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,$.link=W($.link).replace("label",$._label).replace("href",$._href).replace("title",$._title).getRegex(),$.reflink=W($.reflink).replace("label",$._label).getRegex(),$.reflinkSearch=W($.reflinkSearch,"g").replace("reflink",$.reflink).replace("nolink",$.nolink).getRegex(),$.normal=V({},$),$.pedantic=V({},$.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:W(/^!?\[(label)\]\((.*?)\)/).replace("label",$._label).getRegex(),reflink:W(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",$._label).getRegex()}),$.gfm=V({},$.normal,{escape:W($.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(i="x"+i.toString(16)),n+="&#"+i+";";return n}var X=function(){function t(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||j,this.options.tokenizer=this.options.tokenizer||new B,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:q.normal,inline:K.normal};this.options.pedantic?(t.block=q.pedantic,t.inline=K.pedantic):this.options.gfm&&(t.block=q.gfm,this.options.breaks?t.inline=K.breaks:t.inline=K.gfm),this.tokenizer.rules=t}t.lex=function(e,i){return new t(i).lex(e)},t.lexInline=function(e,i){return new t(i).inlineTokens(e)};var i,n,o,r=t.prototype;return r.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},r.blockTokens=function(e,t,i){var n,o,r,s;for(void 0===t&&(t=[]),void 0===i&&(i=!0),this.options.pedantic&&(e=e.replace(/^ +$/gm,""));e;)if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),n.type&&t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),(s=t[t.length-1])&&"paragraph"===s.type?(s.raw+="\n"+n.raw,s.text+="\n"+n.text):t.push(n);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.nptable(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),n.tokens=this.blockTokens(n.text,[],i),t.push(n);else if(n=this.tokenizer.list(e)){for(e=e.substring(n.raw.length),r=n.items.length,o=0;o0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(c));)u.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,s.index)+"["+G("a",s[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,s.index)+"["+G("a",s[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(s=this.tokenizer.rules.inline.escapedEmSt.exec(c));)c=c.slice(0,s.index)+"++"+c.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(a||(l=""),a=!1,o=this.tokenizer.escape(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.tag(e,i,n)){e=e.substring(o.raw.length),i=o.inLink,n=o.inRawBlock;var h=t[t.length-1];h&&"text"===o.type&&"text"===h.type?(h.raw+=o.raw,h.text+=o.text):t.push(o)}else if(o=this.tokenizer.link(e))e=e.substring(o.raw.length),"link"===o.type&&(o.tokens=this.inlineTokens(o.text,[],!0,n)),t.push(o);else if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);var d=t[t.length-1];"link"===o.type?(o.tokens=this.inlineTokens(o.text,[],!0,n),t.push(o)):d&&"text"===o.type&&"text"===d.type?(d.raw+=o.raw,d.text+=o.text):t.push(o)}else if(o=this.tokenizer.emStrong(e,c,l))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],i,n),t.push(o);else if(o=this.tokenizer.codespan(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.br(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.del(e))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],i,n),t.push(o);else if(o=this.tokenizer.autolink(e,Z))e=e.substring(o.raw.length),t.push(o);else if(i||!(o=this.tokenizer.url(e,Z))){if(o=this.tokenizer.inlineText(e,n,Y))e=e.substring(o.raw.length),"_"!==o.raw.slice(-1)&&(l=o.raw.slice(-1)),a=!0,(r=t[t.length-1])&&"text"===r.type?(r.raw+=o.raw,r.text+=o.text):t.push(o);else if(e){var g="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(g);break}throw new Error(g)}}else e=e.substring(o.raw.length),t.push(o);return t},i=t,o=[{key:"rules",get:function(){return{block:q,inline:K}}}],(n=null)&&e(i.prototype,n),o&&e(i,o),t}(),Q=n.defaults,J=x,ee=w,te=function(){function e(e){this.options=e||Q}var t=e.prototype;return t.code=function(e,t,i){var n=(t||"").match(/\S*/)[0];if(this.options.highlight){var o=this.options.highlight(e,n);null!=o&&o!==e&&(i=!0,e=o)}return e=e.replace(/\n$/,"")+"\n",n?'
    '+(i?e:ee(e,!0))+"
    \n":"
    "+(i?e:ee(e,!0))+"
    \n"},t.blockquote=function(e){return"
    \n"+e+"
    \n"},t.html=function(e){return e},t.heading=function(e,t,i,n){return this.options.headerIds?"'+e+"\n":""+e+"\n"},t.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},t.list=function(e,t,i){var n=t?"ol":"ul";return"<"+n+(t&&1!==i?' start="'+i+'"':"")+">\n"+e+"\n"},t.listitem=function(e){return"
  • "+e+"
  • \n"},t.checkbox=function(e){return" "},t.paragraph=function(e){return"

    "+e+"

    \n"},t.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},t.tablerow=function(e){return"\n"+e+"\n"},t.tablecell=function(e,t){var i=t.header?"th":"td";return(t.align?"<"+i+' align="'+t.align+'">':"<"+i+">")+e+"\n"},t.strong=function(e){return""+e+""},t.em=function(e){return""+e+""},t.codespan=function(e){return""+e+""},t.br=function(){return this.options.xhtml?"
    ":"
    "},t.del=function(e){return""+e+""},t.link=function(e,t,i){if(null===(e=J(this.options.sanitize,this.options.baseUrl,e)))return i;var n='"+i+""},t.image=function(e,t,i){if(null===(e=J(this.options.sanitize,this.options.baseUrl,e)))return i;var n=''+i+'":">")},t.text=function(e){return e},e}(),ie=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,i){return""+i},t.image=function(e,t,i){return""+i},t.br=function(){return""},e}(),ne=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var i=e,n=0;if(this.seen.hasOwnProperty(i)){n=this.seen[e];do{i=e+"-"+ ++n}while(this.seen.hasOwnProperty(i))}return t||(this.seen[e]=n,this.seen[i]=0),i},t.slug=function(e,t){void 0===t&&(t={});var i=this.serialize(e);return this.getNextSafeSlug(i,t.dryrun)},e}(),oe=n.defaults,re=C,se=function(){function e(e){this.options=e||oe,this.options.renderer=this.options.renderer||new te,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ie,this.slugger=new ne}e.parse=function(t,i){return new e(i).parse(t)},e.parseInline=function(t,i){return new e(i).parseInline(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var i,n,o,r,s,a,l,c,u,h,d,g,f,p,m,_,v,b,y="",w=e.length;for(i=0;i0&&"text"===m.tokens[0].type?(m.tokens[0].text=b+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&"text"===m.tokens[0].tokens[0].type&&(m.tokens[0].tokens[0].text=b+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:b}):p+=b),p+=this.parse(m.tokens,f),u+=this.renderer.listitem(p,v,_);y+=this.renderer.list(u,d,g);continue;case"html":y+=this.renderer.html(h.text);continue;case"paragraph":y+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(u=h.tokens?this.parseInline(h.tokens):h.text;i+1An error occurred:

    "+ce(e.message+"",!0)+"
    ";throw e}}return ge.options=ge.setOptions=function(e){return ae(ge.defaults,e),he(ge.defaults),ge},ge.getDefaults=ue,ge.defaults=de,ge.use=function(e){var t=ae({},e);if(e.renderer&&function(){var i=ge.defaults.renderer||new te,n=function(t){var n=i[t];i[t]=function(){for(var o=arguments.length,r=new Array(o),s=0;sAn error occurred:

    "+ce(e.message+"",!0)+"
    ";throw e}},ge.Parser=se,ge.parser=se.parse,ge.Renderer=te,ge.TextRenderer=ie,ge.Lexer=X,ge.lexer=X.lex,ge.Tokenizer=B,ge.Slugger=ne,ge.parse=ge,ge}()},3897:(e,t,i)=>{"use strict";i.d(t,{Q:()=>r});var n=i(3060),o=i(666);function r(e){let t=JSON.parse(e);return t=s(t),t}function s(e,t=0){if(!e||t>200)return e;if("object"==typeof e){switch(e.$mid){case 1:return o.o.revive(e);case 2:return new RegExp(e.source,e.flags)}if(e instanceof n.KN||e instanceof Uint8Array)return e;if(Array.isArray(e))for(let i=0;i{"use strict";i.d(t,{lg:()=>n,WX:()=>s,Gi:()=>a});var n,o=i(666),r=i(1432);!function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.userData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebook="vscode-notebook",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp"}(n||(n={}));const s=new class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null}setPreferredWebSchema(e){this._preferredWebSchema=e}rewrite(e){if(this._delegate)return this._delegate(e);const t=e.authority;let i=this._hosts[t];i&&-1!==i.indexOf(":")&&(i=`[${i}]`);const s=this._ports[t],a=this._connectionTokens[t];let l=`path=${encodeURIComponent(e.path)}`;return"string"==typeof a&&(l+=`&tkn=${encodeURIComponent(a)}`),o.o.from({scheme:r.$L?this._preferredWebSchema:n.vscodeRemoteResource,authority:`${i}:${s}`,path:"/vscode-remote-resource",query:l})}},a=new class{constructor(){this.FALLBACK_AUTHORITY="vscode-app"}asBrowserUri(e,t,i){const o=this.toUri(e,t);return o.scheme===n.vscodeRemote?s.rewrite(o):r.tY&&(i||r.MM)&&o.scheme===n.file?o.with({scheme:n.vscodeFileResource,authority:o.authority||this.FALLBACK_AUTHORITY,query:null,fragment:null}):o}toUri(e,t){return o.o.isUri(e)?e:o.o.parse(t.toUrl(e))}}},9870:(e,t,i)=>{"use strict";function n(e,t,i){return Math.min(Math.max(e,t),i)}i.d(t,{u:()=>n,n:()=>o});class o{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this}get value(){return this._val}}},6248:(e,t,i)=>{"use strict";i.d(t,{I8:()=>o,_A:()=>r,rs:()=>a,jB:()=>c,fS:()=>u,CJ:()=>h});var n=i(8401);function o(e){if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach((i=>{e[i]&&"object"==typeof e[i]?t[i]=o(e[i]):t[i]=e[i]})),t}function r(e){if(!e||"object"!=typeof e)return e;const t=[e];for(;t.length>0;){const e=t.shift();Object.freeze(e);for(const i in e)if(s.call(e,i)){const n=e[i];"object"!=typeof n||Object.isFrozen(n)||t.push(n)}}return e}const s=Object.prototype.hasOwnProperty;function a(e,t){return l(e,t,new Set)}function l(e,t,i){if((0,n.Jp)(e))return e;const o=t(e);if(void 0!==o)return o;if((0,n.kJ)(e)){const n=[];for(const o of e)n.push(l(o,t,i));return n}if((0,n.Kn)(e)){if(i.has(e))throw new Error("Cannot clone recursive data-structure");i.add(e);const n={};for(let o in e)s.call(e,o)&&(n[o]=l(e[o],t,i));return i.delete(e),n}return e}function c(e,t,i=!0){return(0,n.Kn)(e)?((0,n.Kn)(t)&&Object.keys(t).forEach((o=>{o in e?i&&((0,n.Kn)(e[o])&&(0,n.Kn)(t[o])?c(e[o],t[o],i):e[o]=t[o]):e[o]=t[o]})),e):t}function u(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let i,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(i=0;i{"use strict";i.d(t,{EZ:()=>k,XX:()=>x,DZ:()=>D,Fv:()=>w,KR:()=>y,Gf:()=>S,DB:()=>C,ir:()=>L,Ku:()=>b});var n=i(1432);let o;if(void 0!==n.li.vscode&&void 0!==n.li.vscode.process){const e=n.li.vscode.process;o={get platform(){return e.platform},get env(){return e.env},cwd:()=>e.cwd(),nextTick:e=>(0,n.xS)(e)}}else o="undefined"!=typeof process?{get platform(){return process.platform},get env(){return process.env},cwd:()=>process.env.VSCODE_CWD||process.cwd(),nextTick:e=>process.nextTick(e)}:{get platform(){return n.ED?"win32":n.dz?"darwin":"linux"},nextTick:e=>(0,n.xS)(e),get env(){return{}},cwd:()=>"/"};const r=o.cwd,s=o.env,a=o.platform,l=46,c=47,u=92,h=58;class d extends Error{constructor(e,t,i){let n;"string"==typeof t&&0===t.indexOf("not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";const o=-1!==e.indexOf(".")?"property":"argument";let r=`The "${e}" ${o} ${n} of type ${t}`;r+=". Received type "+typeof i,super(r),this.code="ERR_INVALID_ARG_TYPE"}}function g(e,t){if("string"!=typeof e)throw new d(t,"string",e)}function f(e){return e===c||e===u}function p(e){return e===c}function m(e){return e>=65&&e<=90||e>=97&&e<=122}function _(e,t,i,n){let o="",r=0,s=-1,a=0,u=0;for(let h=0;h<=e.length;++h){if(h2){const e=o.lastIndexOf(i);-1===e?(o="",r=0):(o=o.slice(0,e),r=o.length-1-o.lastIndexOf(i)),s=h,a=0;continue}if(0!==o.length){o="",r=0,s=h,a=0;continue}}t&&(o+=o.length>0?`${i}..`:"..",r=2)}else o.length>0?o+=`${i}${e.slice(s+1,h)}`:o=e.slice(s+1,h),r=h-s-1;s=h,a=0}else u===l&&-1!==a?++a:a=-1}return o}function v(e,t){if(null===t||"object"!=typeof t)throw new d("pathObject","Object",t);const i=t.dir||t.root,n=t.base||`${t.name||""}${t.ext||""}`;return i?i===t.root?`${i}${n}`:`${i}${e}${n}`:n}const b={resolve(...e){let t="",i="",n=!1;for(let o=e.length-1;o>=-1;o--){let a;if(o>=0){if(a=e[o],g(a,"path"),0===a.length)continue}else 0===t.length?a=r():(a=s[`=${t}`]||r(),(void 0===a||a.slice(0,2).toLowerCase()!==t.toLowerCase()&&a.charCodeAt(2)===u)&&(a=`${t}\\`));const l=a.length;let c=0,d="",p=!1;const _=a.charCodeAt(0);if(1===l)f(_)&&(c=1,p=!0);else if(f(_))if(p=!0,f(a.charCodeAt(1))){let e=2,t=e;for(;e2&&f(a.charCodeAt(2))&&(p=!0,c=3));if(d.length>0)if(t.length>0){if(d.toLowerCase()!==t.toLowerCase())continue}else t=d;if(n){if(t.length>0)break}else if(i=`${a.slice(c)}\\${i}`,n=p,p&&t.length>0)break}return i=_(i,!n,"\\",f),n?`${t}\\${i}`:`${t}${i}`||"."},normalize(e){g(e,"path");const t=e.length;if(0===t)return".";let i,n=0,o=!1;const r=e.charCodeAt(0);if(1===t)return p(r)?"\\":e;if(f(r))if(o=!0,f(e.charCodeAt(1))){let o=2,r=o;for(;o2&&f(e.charCodeAt(2))&&(o=!0,n=3));let s=n0&&f(e.charCodeAt(t-1))&&(s+="\\"),void 0===i?o?`\\${s}`:s:o?`${i}\\${s}`:`${i}${s}`},isAbsolute(e){g(e,"path");const t=e.length;if(0===t)return!1;const i=e.charCodeAt(0);return f(i)||t>2&&m(i)&&e.charCodeAt(1)===h&&f(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,i;for(let n=0;n0&&(void 0===t?t=i=o:t+=`\\${o}`)}if(void 0===t)return".";let n=!0,o=0;if("string"==typeof i&&f(i.charCodeAt(0))){++o;const e=i.length;e>1&&f(i.charCodeAt(1))&&(++o,e>2&&(f(i.charCodeAt(2))?++o:n=!1))}if(n){for(;o=2&&(t=`\\${t.slice(o)}`)}return b.normalize(t)},relative(e,t){if(g(e,"from"),g(t,"to"),e===t)return"";const i=b.resolve(e),n=b.resolve(t);if(i===n)return"";if((e=i.toLowerCase())===(t=n.toLowerCase()))return"";let o=0;for(;oo&&e.charCodeAt(r-1)===u;)r--;const s=r-o;let a=0;for(;aa&&t.charCodeAt(l-1)===u;)l--;const c=l-a,h=sh){if(t.charCodeAt(a+f)===u)return n.slice(a+f+1);if(2===f)return n.slice(a+f)}s>h&&(e.charCodeAt(o+f)===u?d=f:2===f&&(d=3)),-1===d&&(d=0)}let p="";for(f=o+d+1;f<=r;++f)f!==r&&e.charCodeAt(f)!==u||(p+=0===p.length?"..":"\\..");return a+=d,p.length>0?`${p}${n.slice(a,l)}`:(n.charCodeAt(a)===u&&++a,n.slice(a,l))},toNamespacedPath(e){if("string"!=typeof e)return e;if(0===e.length)return"";const t=b.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===u){if(t.charCodeAt(1)===u){const e=t.charCodeAt(2);if(63!==e&&e!==l)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(m(t.charCodeAt(0))&&t.charCodeAt(1)===h&&t.charCodeAt(2)===u)return`\\\\?\\${t}`;return e},dirname(e){g(e,"path");const t=e.length;if(0===t)return".";let i=-1,n=0;const o=e.charCodeAt(0);if(1===t)return f(o)?e:".";if(f(o)){if(i=n=1,f(e.charCodeAt(1))){let o=2,r=o;for(;o2&&f(e.charCodeAt(2))?3:2,n=i);let r=-1,s=!0;for(let i=t-1;i>=n;--i)if(f(e.charCodeAt(i))){if(!s){r=i;break}}else s=!1;if(-1===r){if(-1===i)return".";r=i}return e.slice(0,r)},basename(e,t){void 0!==t&&g(t,"ext"),g(e,"path");let i,n=0,o=-1,r=!0;if(e.length>=2&&m(e.charCodeAt(0))&&e.charCodeAt(1)===h&&(n=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let s=t.length-1,a=-1;for(i=e.length-1;i>=n;--i){const l=e.charCodeAt(i);if(f(l)){if(!r){n=i+1;break}}else-1===a&&(r=!1,a=i+1),s>=0&&(l===t.charCodeAt(s)?-1==--s&&(o=i):(s=-1,o=a))}return n===o?o=a:-1===o&&(o=e.length),e.slice(n,o)}for(i=e.length-1;i>=n;--i)if(f(e.charCodeAt(i))){if(!r){n=i+1;break}}else-1===o&&(r=!1,o=i+1);return-1===o?"":e.slice(n,o)},extname(e){g(e,"path");let t=0,i=-1,n=0,o=-1,r=!0,s=0;e.length>=2&&e.charCodeAt(1)===h&&m(e.charCodeAt(0))&&(t=n=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(f(t)){if(!r){n=a+1;break}}else-1===o&&(r=!1,o=a+1),t===l?-1===i?i=a:1!==s&&(s=1):-1!==i&&(s=-1)}return-1===i||-1===o||0===s||1===s&&i===o-1&&i===n+1?"":e.slice(i,o)},format:v.bind(null,"\\"),parse(e){g(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.length;let n=0,o=e.charCodeAt(0);if(1===i)return f(o)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(f(o)){if(n=1,f(e.charCodeAt(1))){let t=2,o=t;for(;t0&&(t.root=e.slice(0,n));let r=-1,s=n,a=-1,c=!0,u=e.length-1,d=0;for(;u>=n;--u)if(o=e.charCodeAt(u),f(o)){if(!c){s=u+1;break}}else-1===a&&(c=!1,a=u+1),o===l?-1===r?r=u:1!==d&&(d=1):-1!==r&&(d=-1);return-1!==a&&(-1===r||0===d||1===d&&r===a-1&&r===s+1?t.base=t.name=e.slice(s,a):(t.name=e.slice(s,r),t.base=e.slice(s,a),t.ext=e.slice(r,a))),t.dir=s>0&&s!==n?e.slice(0,s-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},y={resolve(...e){let t="",i=!1;for(let n=e.length-1;n>=-1&&!i;n--){const o=n>=0?e[n]:r();g(o,"path"),0!==o.length&&(t=`${o}/${t}`,i=o.charCodeAt(0)===c)}return t=_(t,!i,"/",p),i?`/${t}`:t.length>0?t:"."},normalize(e){if(g(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===c,i=e.charCodeAt(e.length-1)===c;return 0===(e=_(e,!t,"/",p)).length?t?"/":i?"./":".":(i&&(e+="/"),t?`/${e}`:e)},isAbsolute:e=>(g(e,"path"),e.length>0&&e.charCodeAt(0)===c),join(...e){if(0===e.length)return".";let t;for(let i=0;i0&&(void 0===t?t=n:t+=`/${n}`)}return void 0===t?".":y.normalize(t)},relative(e,t){if(g(e,"from"),g(t,"to"),e===t)return"";if((e=y.resolve(e))===(t=y.resolve(t)))return"";const i=e.length,n=i-1,o=t.length-1,r=nr){if(t.charCodeAt(1+a)===c)return t.slice(1+a+1);if(0===a)return t.slice(1+a)}else n>r&&(e.charCodeAt(1+a)===c?s=a:0===a&&(s=0));let l="";for(a=1+s+1;a<=i;++a)a!==i&&e.charCodeAt(a)!==c||(l+=0===l.length?"..":"/..");return`${l}${t.slice(1+s)}`},toNamespacedPath:e=>e,dirname(e){if(g(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===c;let i=-1,n=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===c){if(!n){i=t;break}}else n=!1;return-1===i?t?"/":".":t&&1===i?"//":e.slice(0,i)},basename(e,t){void 0!==t&&g(t,"ext"),g(e,"path");let i,n=0,o=-1,r=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let s=t.length-1,a=-1;for(i=e.length-1;i>=0;--i){const l=e.charCodeAt(i);if(l===c){if(!r){n=i+1;break}}else-1===a&&(r=!1,a=i+1),s>=0&&(l===t.charCodeAt(s)?-1==--s&&(o=i):(s=-1,o=a))}return n===o?o=a:-1===o&&(o=e.length),e.slice(n,o)}for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===c){if(!r){n=i+1;break}}else-1===o&&(r=!1,o=i+1);return-1===o?"":e.slice(n,o)},extname(e){g(e,"path");let t=-1,i=0,n=-1,o=!0,r=0;for(let s=e.length-1;s>=0;--s){const a=e.charCodeAt(s);if(a!==c)-1===n&&(o=!1,n=s+1),a===l?-1===t?t=s:1!==r&&(r=1):-1!==t&&(r=-1);else if(!o){i=s+1;break}}return-1===t||-1===n||0===r||1===r&&t===n-1&&t===i+1?"":e.slice(t,n)},format:v.bind(null,"/"),parse(e){g(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.charCodeAt(0)===c;let n;i?(t.root="/",n=1):n=0;let o=-1,r=0,s=-1,a=!0,u=e.length-1,h=0;for(;u>=n;--u){const t=e.charCodeAt(u);if(t!==c)-1===s&&(a=!1,s=u+1),t===l?-1===o?o=u:1!==h&&(h=1):-1!==o&&(h=-1);else if(!a){r=u+1;break}}if(-1!==s){const n=0===r&&i?1:r;-1===o||0===h||1===h&&o===s-1&&o===r+1?t.base=t.name=e.slice(n,s):(t.name=e.slice(n,o),t.base=e.slice(n,s),t.ext=e.slice(o,s))}return r>0?t.dir=e.slice(0,r-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};y.win32=b.win32=b,y.posix=b.posix=y;const w="win32"===a?b.normalize:y.normalize,C="win32"===a?b.resolve:y.resolve,S="win32"===a?b.relative:y.relative,x="win32"===a?b.dirname:y.dirname,k="win32"===a?b.basename:y.basename,D="win32"===a?b.extname:y.extname,L="win32"===a?b.sep:y.sep},1432:(e,t,i)=>{"use strict";var n;i.d(t,{li:()=>m,MM:()=>y,ED:()=>C,dz:()=>S,IJ:()=>x,tY:()=>k,$L:()=>D,gn:()=>L,WE:()=>N,xS:()=>E,OS:()=>A,r:()=>T});const o="en";let r,s,a,l=!1,c=!1,u=!1,h=!1,d=!1,g=!1,f=!1,p=null;const m="object"==typeof self?self:"object"==typeof i.g?i.g:{};let _;void 0!==m.vscode&&void 0!==m.vscode.process?_=m.vscode.process:"undefined"!=typeof process&&(_=process);const v="string"==typeof(null===(n=null==_?void 0:_.versions)||void 0===n?void 0:n.electron)&&"renderer"===_.type,b=v&&(null==_?void 0:_.sandboxed),y="string"==typeof(()=>{if(b)return"bypassHeatCheck";const e=null==_?void 0:_.env.VSCODE_BROWSER_CODE_LOADING;return"string"==typeof e?"none"===e||"code"===e||"bypassHeatCheck"===e||"bypassHeatCheckAndEagerCompile"===e?e:"bypassHeatCheck":void 0})();if("object"!=typeof navigator||v)if("object"==typeof _){l="win32"===_.platform,c="darwin"===_.platform,u="linux"===_.platform,h=u&&!!_.env.SNAP&&!!_.env.SNAP_REVISION,r=o,p=o;const e=_.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),i=t.availableLanguages["*"];r=t.locale,p=i||o,s=t._translationsConfigFile}catch(e){}d=!0}else console.error("Unable to resolve platform.");else a=navigator.userAgent,l=a.indexOf("Windows")>=0,c=a.indexOf("Macintosh")>=0,f=(a.indexOf("Macintosh")>=0||a.indexOf("iPad")>=0||a.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,u=a.indexOf("Linux")>=0,g=!0,r=navigator.language,p=r;let w=0;c?w=1:l?w=3:u&&(w=2);const C=l,S=c,x=u,k=d,D=g,L=f,N=a,E=function(){if(m.setImmediate)return m.setImmediate.bind(m);if("function"==typeof m.postMessage&&!m.importScripts){let e=[];m.addEventListener("message",(t=>{if(t.data&&t.data.vscodeSetImmediateId)for(let i=0,n=e.length;i{const n=++t;e.push({id:n,callback:i}),m.postMessage({vscodeSetImmediateId:n},"*")}}if("function"==typeof(null==_?void 0:_.nextTick))return _.nextTick.bind(_);const e=Promise.resolve();return t=>e.then(t)}(),A=c||f?2:l?1:3;let M=!0,I=!1;function T(){if(!I){I=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);M=513===t[0]}return M}},1134:(e,t,i)=>{"use strict";var n;i.d(t,{e:()=>n}),function(e){function t(e,t){if(e.start>=t.end||t.start>=e.end)return{start:0,end:0};const i=Math.max(e.start,t.start),n=Math.min(e.end,t.end);return n-i<=0?{start:0,end:0}:{start:i,end:n}}function i(e){return e.end-e.start<=0}e.intersect=t,e.isEmpty=i,e.intersects=function(e,n){return!i(t(e,n))},e.relativeComplement=function(e,t){const n=[],o={start:e.start,end:Math.min(t.start,e.end)},r={start:Math.max(t.end,e.start),end:e.end};return i(o)||n.push(o),i(r)||n.push(r),n}}(n||(n={}))},5935:(e,t,i)=>{"use strict";i.d(t,{z_:()=>l,SF:()=>c,Xy:()=>u,Hx:()=>h,EZ:()=>d,XX:()=>g,Vo:()=>f,AH:()=>p,i3:()=>m,Vb:()=>_});var n=i(5527),o=i(8721),r=i(666),s=i(7295),a=i(6663);function l(e){return(0,r.q)(e,!0)}const c=new class{constructor(e){this._ignorePathCasing=e}compare(e,t,i=!1){return e===t?0:(0,s.qu)(this.getComparisonKey(e,i),this.getComparisonKey(t,i))}isEqual(e,t,i=!1){return e===t||!(!e||!t)&&this.getComparisonKey(e,i)===this.getComparisonKey(t,i)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}joinPath(e,...t){return r.o.joinPath(e,...t)}basenameOrAuthority(e){return d(e)||e.authority}basename(e){return o.KR.basename(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===a.lg.file?t=r.o.file(o.XX(l(e))).path:(t=o.KR.dirname(e.path),e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===a.lg.file?r.o.file(o.Fv(l(e))).path:o.KR.normalize(e.path),e.with({path:t})}resolvePath(e,t){if(e.scheme===a.lg.file){const i=r.o.file(o.DB(l(e),t));return e.with({authority:i.authority,path:i.path})}return t=n.fn(t),e.with({path:o.KR.resolve(e.path,t)})}}((()=>!1)),u=c.isEqual.bind(c),h=c.basenameOrAuthority.bind(c),d=c.basename.bind(c),g=c.dirname.bind(c),f=c.joinPath.bind(c),p=c.normalizePath.bind(c),m=c.resolvePath.bind(c);var _;!function(e){e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=function(t){const i=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach((e=>{const[t,n]=e.split(":");t&&n&&i.set(t,n)}));const n=t.path.substring(0,t.path.indexOf(";"));return n&&i.set(e.META_DATA_MIME,n),i}}(_||(_={}))},6633:(e,t,i)=>{"use strict";i.d(t,{Rm:()=>s});var n=i(4669),o=i(5976);class r{constructor(e,t,i,n,o,r){e|=0,t|=0,i|=0,n|=0,o|=0,r|=0,this.rawScrollLeft=i,this.rawScrollTop=r,e<0&&(e=0),i+e>t&&(i=t-e),i<0&&(i=0),n<0&&(n=0),r+n>o&&(r=o-n),r<0&&(r=0),this.width=e,this.scrollWidth=t,this.scrollLeft=i,this.height=n,this.scrollHeight=o,this.scrollTop=r}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new r(void 0!==e.width?e.width:this.width,void 0!==e.scrollWidth?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,void 0!==e.height?e.height:this.height,void 0!==e.scrollHeight?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new r(this.width,this.scrollWidth,void 0!==e.scrollLeft?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,void 0!==e.scrollTop?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){const i=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,o=this.scrollLeft!==e.scrollLeft,r=this.height!==e.height,s=this.scrollHeight!==e.scrollHeight,a=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:i,scrollWidthChanged:n,scrollLeftChanged:o,heightChanged:r,scrollHeightChanged:s,scrollTopChanged:a}}}class s extends o.JT{constructor(e,t){super(),this._onScroll=this._register(new n.Q5),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e,this._scheduleAtNextAnimationFrame=t,this._state=new r(0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){const i=this._state.withScrollDimensions(e,t);this._setState(i,Boolean(this._smoothScrolling)),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:void 0===e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:void 0===e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};const i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let n;n=t?new c(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{const t=this._state.withScrollPosition(e);this._smoothScrolling=c.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);return this._setState(t,!0),this._smoothScrolling?e.isDone?(this._smoothScrolling.dispose(),void(this._smoothScrolling=null)):void(this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))):void 0}_setState(e,t){const i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}}class a{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}function l(e,t){const i=t-e;return function(t){return e+i*(1-(n=1-t,Math.pow(n,3)));var n}}class c{constructor(e,t,i,n){this.from=e,this.to=t,this.duration=n,this.startTime=i,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,t,i){if(Math.abs(e-t)>2.5*i){let s,a;return e{"use strict";i.d(t,{Z:()=>r});var n,o=i(7295);!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(n||(n={})),function(e){const t="error",i="warning",n="info";e.fromValue=function(r){return r?o.qq(t,r)?e.Error:o.qq(i,r)||o.qq("warn",r)?e.Warning:o.qq(n,r)?e.Info:e.Ignore:e.Ignore},e.toString=function(o){switch(o){case e.Error:return t;case e.Warning:return i;case e.Info:return n;default:return"ignore"}}}(n||(n={}));const r=n},4013:(e,t,i)=>{"use strict";i.d(t,{G:()=>r});var n=i(1432);const o=n.li.performance&&"function"==typeof n.li.performance.now;class r{constructor(e){this._highResolution=o&&e,this._startTime=this._now(),this._stopTime=-1}static create(e=!0){return new r(e)}stop(){this._stopTime=this._now()}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?n.li.performance.now():Date.now()}}},7295:(e,t,i)=>{"use strict";function n(e){return!e||"string"!=typeof e||0===e.trim().length}i.d(t,{m5:()=>n,WU:()=>r,YU:()=>s,ec:()=>a,fy:()=>l,j3:()=>c,oL:()=>u,un:()=>h,R1:()=>d,GF:()=>g,IO:()=>f,mr:()=>p,uq:()=>m,LC:()=>_,V8:()=>v,ow:()=>b,qu:()=>y,TT:()=>w,zY:()=>C,j_:()=>S,mK:()=>x,df:()=>k,qq:()=>L,ok:()=>E,Mh:()=>A,P1:()=>M,ZG:()=>I,YK:()=>T,rL:()=>R,ZH:()=>O,vH:()=>P,HO:()=>B,CZ:()=>z,Ut:()=>V,RP:()=>$,$i:()=>j,Qe:()=>q,ab:()=>K,xe:()=>G,K7:()=>Y,C8:()=>Z,c1:()=>X,uS:()=>Q,Kw:()=>J,PJ:()=>ee,S6:()=>te,fi:()=>ie,oH:()=>oe});const o=/{(\d+)}/g;function r(e,...t){return 0===t.length?e:e.replace(o,(function(e,i){const n=parseInt(i,10);return isNaN(n)||n<0||n>=t.length?e:t[n]}))}function s(e){return e.replace(/[<>&]/g,(function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}}))}function a(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function l(e,t=" "){return u(c(e,t),t)}function c(e,t){if(!e||!t)return e;const i=t.length;if(0===i||0===e.length)return e;let n=0;for(;e.indexOf(t,n)===n;)n+=i;return e.substring(n)}function u(e,t){if(!e||!t)return e;const i=t.length,n=e.length;if(0===i||0===n)return e;let o=n,r=-1;for(;r=e.lastIndexOf(t,o-1),-1!==r&&r+i===o;){if(0===r)return"";o=r}return e.substring(0,o)}function h(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function d(e){return e.replace(/\*/g,"")}function g(e,t,i={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=a(e)),i.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let n="";return i.global&&(n+="g"),i.matchCase||(n+="i"),i.multiline&&(n+="m"),i.unicode&&(n+="u"),new RegExp(e,n)}function f(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&!(!e.exec("")||0!==e.lastIndex)}function p(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")}function m(e){return e.split(/\r\n|\r|\n/)}function _(e){for(let t=0,i=e.length;t=0;i--){const t=e.charCodeAt(i);if(32!==t&&9!==t)return i}return-1}function y(e,t){return et?1:0}function w(e,t,i=0,n=e.length,o=0,r=t.length){for(;ir)return 1}const s=n-i,a=r-o;return sa?1:0}function C(e,t){return S(e,t,0,e.length,0,t.length)}function S(e,t,i=0,n=e.length,o=0,r=t.length){for(;ia?1:0}function x(e){return e>=97&&e<=122}function k(e){return e>=65&&e<=90}function D(e){return x(e)||k(e)}function L(e,t){return e.length===t.length&&N(e,t)}function N(e,t,i=e.length){for(let n=0;ne.length)&&N(e,t,i)}function A(e,t){let i,n=Math.min(e.length,t.length);for(i=0;i1){const n=e.charCodeAt(t-2);if(I(n))return R(n,i)}return i}function P(e,t){const i=ne.getInstance(),n=t,o=e.length,r=O(e,o,t);t+=r>=65536?2:1;let s=i.getGraphemeBreakType(r);for(;t=65536?2:1,s=r}return t-n}function B(e,t){const i=ne.getInstance(),n=t,o=F(e,t);t-=o>=65536?2:1;let r=i.getGraphemeBreakType(o);for(;t>0;){const n=F(e,t),o=i.getGraphemeBreakType(n);if(ie(o,r))break;t-=n>=65536?2:1,r=o}return n-t}function z(e){const t=e.byteLength,i=[];let n=0;for(;n=240&&n+3>>0|(63&e[n++])<<12>>>0|(63&e[n++])<<6>>>0|(63&e[n++])<<0>>>0:o>=224&&n+2>>0|(63&e[n++])<<6>>>0|(63&e[n++])<<0>>>0:o>=192&&n+1>>0|(63&e[n++])<<0>>>0:e[n++],r>=0&&r<=55295||r>=57344&&r<=65535)i.push(String.fromCharCode(r));else if(r>=65536&&r<=1114111){const e=r-65536,t=55296+((1047552&e)>>>10),n=56320+((1023&e)>>>0);i.push(String.fromCharCode(t)),i.push(String.fromCharCode(n))}else i.push(String.fromCharCode(65533))}return i.join("")}const W=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function V(e){return W.test(e)}const H=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function $(e){return H.test(e)}const U=/^[\t\n\r\x20-\x7E]*$/;function j(e){return U.test(e)}const q=/[\u2028\u2029]/;function K(e){return q.test(e)}function G(e){for(let t=0,i=e.length;t=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function Z(e){return e>=127462&&e<=127487||8986===e||8987===e||9200===e||9203===e||e>=9728&&e<=10175||11088===e||11093===e||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129003||e>=129280&&e<=129535||e>=129648&&e<=129750}const X=String.fromCharCode(65279);function Q(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function J(e,t=!1){return!!e&&(t&&(e=e.replace(/\\./g,"")),e.toLowerCase()!==e)}function ee(e){return(e%=52)<26?String.fromCharCode(97+e):String.fromCharCode(65+e-26)}function te(e){return ne.getInstance().getGraphemeBreakType(e)}function ie(e,t){return 0===e?5!==t&&7!==t:!(2===e&&3===t||4!==e&&2!==e&&3!==e&&4!==t&&2!==t&&3!==t&&(8===e&&(8===t||9===t||11===t||12===t)||!(11!==e&&9!==e||9!==t&&10!==t)||(12===e||10===e)&&10===t||5===t||13===t||7===t||1===e||13===e&&14===t||6===e&&6===t))}class ne{constructor(){this._data=JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}static getInstance(){return ne._INSTANCE||(ne._INSTANCE=new ne),ne._INSTANCE}getGraphemeBreakType(e){if(e<32)return 10===e?3:13===e?2:4;if(e<127)return 0;const t=this._data,i=t.length/3;let n=1;for(;n<=i;)if(et[3*n+1]))return t[3*n+2];n=2*n+1}return 0}}function oe(e,t){if(0===e)return 0;const i=function(e,t){let i=F(t,e);for(e-=re(i);se(i)||65039===i||8419===i;){if(0===e)return;i=F(t,e),e-=re(i)}if(Z(i)){if(e>=0){const i=F(t,e);8205===i&&(e-=re(i))}return e}}(e,t);return void 0!==i?i:e-re(F(t,e))}function re(e){return e>=65536?2:1}function se(e){return 127995<=e&&e<=127999}ne._INSTANCE=null},8401:(e,t,i)=>{"use strict";function n(e){return Array.isArray(e)}function o(e){return"string"==typeof e}function r(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function s(e){return"number"==typeof e&&!isNaN(e)}function a(e){return!0===e||!1===e}function l(e){return void 0===e}function c(e){return l(e)||null===e}function u(e,t){if(!e)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function h(e){if(c(e))throw new Error("Assertion Failed: argument is undefined or null");return e}function d(e){return"function"==typeof e}function g(e,t){const i=Math.min(e.length,t.length);for(let n=0;nfunction(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)};let n={};for(const t of e)n[t]=i(t);return n}function _(e){return null===e?void 0:e}function v(e){throw new Error("Unreachable")}i.d(t,{kJ:()=>n,HD:()=>o,Kn:()=>r,hj:()=>s,jn:()=>a,o8:()=>l,Jp:()=>c,p_:()=>u,cW:()=>h,mf:()=>d,D8:()=>g,$E:()=>p,IU:()=>m,f6:()=>_,vE:()=>v})},5427:(e,t,i)=>{"use strict";function n(e){return e<0?0:e>255?255:0|e}function o(e){return e<0?0:e>4294967295?4294967295:0|e}i.d(t,{K:()=>n,A:()=>o})},666:(e,t,i)=>{"use strict";i.d(t,{o:()=>d,q:()=>v});var n=i(1432),o=i(8721);const r=/^\w[\w\d+.-]*$/,s=/^\//,a=/^\/\//;function l(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!r.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!s.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const c="",u="/",h=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{constructor(e,t,i,n,o,r=!1){"object"==typeof e?(this.scheme=e.scheme||c,this.authority=e.authority||c,this.path=e.path||c,this.query=e.query||c,this.fragment=e.fragment||c):(this.scheme=function(e,t){return e||t?e:"file"}(e,r),this.authority=t||c,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==u&&(t=u+t):t=u}return t}(this.scheme,i||c),this.query=n||c,this.fragment=o||c,l(this,r))}static isUri(e){return e instanceof d||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}get fsPath(){return v(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:i,path:n,query:o,fragment:r}=e;return void 0===t?t=this.scheme:null===t&&(t=c),void 0===i?i=this.authority:null===i&&(i=c),void 0===n?n=this.path:null===n&&(n=c),void 0===o?o=this.query:null===o&&(o=c),void 0===r?r=this.fragment:null===r&&(r=c),t===this.scheme&&i===this.authority&&n===this.path&&o===this.query&&r===this.fragment?this:new f(t,i,n,o,r)}static parse(e,t=!1){const i=h.exec(e);return i?new f(i[2]||c,C(i[4]||c),C(i[5]||c),C(i[7]||c),C(i[9]||c),t):new f(c,c,c,c,c)}static file(e){let t=c;if(n.ED&&(e=e.replace(/\\/g,u)),e[0]===u&&e[1]===u){const i=e.indexOf(u,2);-1===i?(t=e.substring(2),e=u):(t=e.substring(2,i),e=e.substring(i)||u)}return new f("file",t,e,c,c)}static from(e){const t=new f(e.scheme,e.authority,e.path,e.query,e.fragment);return l(t,!0),t}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let i;return i=n.ED&&"file"===e.scheme?d.file(o.Ku.join(v(e,!0),...t)).path:o.KR.join(e.path,...t),e.with({path:i})}toString(e=!1){return b(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof d)return e;{const t=new f(e);return t._formatted=e.external,t._fsPath=e._sep===g?e.fsPath:null,t}}return e}}const g=n.ED?1:void 0;class f extends d{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath}toString(e=!1){return e?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=g),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const p={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function m(e,t){let i,n=-1;for(let o=0;o=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r)-1!==n&&(i+=encodeURIComponent(e.substring(n,o)),n=-1),void 0!==i&&(i+=e.charAt(o));else{void 0===i&&(i=e.substr(0,o));const t=p[r];void 0!==t?(-1!==n&&(i+=encodeURIComponent(e.substring(n,o)),n=-1),i+=t):-1===n&&(n=o)}}return-1!==n&&(i+=encodeURIComponent(e.substring(n))),void 0!==i?i:e}function _(e){let t;for(let i=0;i1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,n.ED&&(i=i.replace(/\//g,"\\")),i}function b(e,t){const i=t?_:m;let n="",{scheme:o,authority:r,path:s,query:a,fragment:l}=e;if(o&&(n+=o,n+=":"),(r||"file"===o)&&(n+=u,n+=u),r){let e=r.indexOf("@");if(-1!==e){const t=r.substr(0,e);r=r.substr(e+1),e=t.indexOf(":"),-1===e?n+=i(t,!1):(n+=i(t.substr(0,e),!1),n+=":",n+=i(t.substr(e+1),!1)),n+="@"}r=r.toLowerCase(),e=r.indexOf(":"),-1===e?n+=i(r,!1):(n+=i(r.substr(0,e),!1),n+=r.substr(e))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const e=s.charCodeAt(1);e>=65&&e<=90&&(s=`/${String.fromCharCode(e+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const e=s.charCodeAt(0);e>=65&&e<=90&&(s=`${String.fromCharCode(e+32)}:${s.substr(2)}`)}n+=i(s,!0)}return a&&(n+="?",n+=i(a,!1)),l&&(n+="#",n+=t?l:m(l,!1)),n}function y(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+y(e.substr(3)):e}}const w=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function C(e){return e.match(w)?e.replace(w,(e=>y(e))):e}},7746:(e,t,i)=>{"use strict";i.d(t,{X5:()=>n,Jq:()=>o,jG:()=>r});const n={ctrlCmd:!1,alt:!1};var o,r;!function(e){e[e.Blur=1]="Blur",e[e.Gesture=2]="Gesture",e[e.Other=3]="Other"}(o||(o={})),function(e){e[e.NONE=0]="NONE",e[e.FIRST=1]="FIRST",e[e.SECOND=2]="SECOND",e[e.LAST=3]="LAST"}(r||(r={}))},272:(e,t,i)=>{"use strict";i.d(t,{H:()=>a});var n=i(158),o={},r={},s=function(){function e(e){var t=this;this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((function(e,i){t._lazyLoadPromiseResolve=e,t._lazyLoadPromiseReject=i}))}return e.getOrCreate=function(t){return r[t]||(r[t]=new e(t)),r[t]},e.prototype.whenLoaded=function(){return this._lazyLoadPromise},e.prototype.load=function(){var e=this;return this._loadingTriggered||(this._loadingTriggered=!0,o[this._languageId].loader().then((function(t){return e._lazyLoadPromiseResolve(t)}),(function(t){return e._lazyLoadPromiseReject(t)}))),this._lazyLoadPromise},e}();function a(e){var t=e.id;o[t]=e,n.languages.register(e);var i=s.getOrCreate(t);n.languages.setMonarchTokensProvider(t,i.whenLoaded().then((function(e){return e.language}))),n.languages.onLanguage(t,(function(){i.load().then((function(e){n.languages.setLanguageConfiguration(t,e.conf)}))}))}},3709:(e,t,i)=>{"use strict";i.r(t),(0,i(272).H)({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:function(){return i.e(240).then(i.bind(i,2240))}})},7365:(e,t,i)=>{"use strict";i.r(t),(0,i(272).H)({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:function(){return i.e(954).then(i.bind(i,2954))}})},9052:(e,t,i)=>{"use strict";i.d(t,{V:()=>m,P:()=>f});var n=i(6268),o=i(4669),r=i(5976),s=i(1432);class a{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class l{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";const t=document.createElement("div");t.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),t.style.fontWeight=this._bareFontInfo.fontWeight,t.style.fontSize=this._bareFontInfo.fontSize+"px",t.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,t.style.lineHeight=this._bareFontInfo.lineHeight+"px",t.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",e.appendChild(t);const i=document.createElement("div");i.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),i.style.fontWeight="bold",i.style.fontSize=this._bareFontInfo.fontSize+"px",i.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,i.style.lineHeight=this._bareFontInfo.lineHeight+"px",i.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",e.appendChild(i);const n=document.createElement("div");n.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),n.style.fontWeight=this._bareFontInfo.fontWeight,n.style.fontSize=this._bareFontInfo.fontSize+"px",n.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,n.style.lineHeight=this._bareFontInfo.lineHeight+"px",n.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",n.style.fontStyle="italic",e.appendChild(n);const o=[];for(const e of this._requests){let r;0===e.type&&(r=t),2===e.type&&(r=i),1===e.type&&(r=n),r.appendChild(document.createElement("br"));const s=document.createElement("span");l._render(s,e),r.appendChild(s),o.push(s)}this._container=e,this._testElements=o}static _render(e,t){if(" "===t.chr){let t=" ";for(let e=0;e<8;e++)t+=t;e.innerText=t}else{let i=t.chr;for(let e=0;e<8;e++)i+=i;e.textContent=i}}_readFromDomElements(){for(let e=0,t=this._requests.length;ethis._values[e]))}}function f(){p.INSTANCE.clearCache()}class p extends r.JT{constructor(){super(),this._onDidChange=this._register(new o.Q5),this.onDidChange=this._onDidChange.event,this._cache=new g,this._evictUntrustedReadingsTimeout=-1}dispose(){-1!==this._evictUntrustedReadingsTimeout&&(clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearCache(){this._cache=new g,this._onDidChange.fire()}_writeToCache(e,t){this._cache.put(e,t),t.isTrusted||-1!==this._evictUntrustedReadingsTimeout||(this._evictUntrustedReadingsTimeout=setTimeout((()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()}),5e3))}_evictUntrustedReadings(){const e=this._cache.getValues();let t=!1;for(const i of e)i.isTrusted||(t=!0,this._cache.remove(i));t&&this._onDidChange.fire()}readConfiguration(e){if(!this._cache.has(e)){let t=p._actualReadConfiguration(e);(t.typicalHalfwidthCharacterWidth<=2||t.typicalFullwidthCharacterWidth<=2||t.spaceWidth<=2||t.maxDigitWidth<=2)&&(t=new d.pR({zoomLevel:n.px(),pixelRatio:n.mX(),fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:t.isMonospace,typicalHalfwidthCharacterWidth:Math.max(t.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(t.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:t.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(t.spaceWidth,5),middotWidth:Math.max(t.middotWidth,5),wsmiddotWidth:Math.max(t.wsmiddotWidth,5),maxDigitWidth:Math.max(t.maxDigitWidth,5)},!1)),this._writeToCache(e,t)}return this._cache.get(e)}static createRequest(e,t,i,n){const o=new a(e,t);return i.push(o),n&&n.push(o),o}static _actualReadConfiguration(e){const t=[],i=[],o=this.createRequest("n",0,t,i),r=this.createRequest("m",0,t,null),s=this.createRequest(" ",0,t,i),a=this.createRequest("0",0,t,i),c=this.createRequest("1",0,t,i),u=this.createRequest("2",0,t,i),g=this.createRequest("3",0,t,i),f=this.createRequest("4",0,t,i),p=this.createRequest("5",0,t,i),m=this.createRequest("6",0,t,i),_=this.createRequest("7",0,t,i),v=this.createRequest("8",0,t,i),b=this.createRequest("9",0,t,i),y=this.createRequest("→",0,t,i),w=this.createRequest("→",0,t,null),C=this.createRequest("·",0,t,i),S=this.createRequest(String.fromCharCode(11825),0,t,null);this.createRequest("|",0,t,i),this.createRequest("/",0,t,i),this.createRequest("-",0,t,i),this.createRequest("_",0,t,i),this.createRequest("i",0,t,i),this.createRequest("l",0,t,i),this.createRequest("m",0,t,i),this.createRequest("|",1,t,i),this.createRequest("_",1,t,i),this.createRequest("i",1,t,i),this.createRequest("l",1,t,i),this.createRequest("m",1,t,i),this.createRequest("n",1,t,i),this.createRequest("|",2,t,i),this.createRequest("_",2,t,i),this.createRequest("i",2,t,i),this.createRequest("l",2,t,i),this.createRequest("m",2,t,i),this.createRequest("n",2,t,i),function(e,t){new l(e,t).read()}(e,t);const x=Math.max(a.width,c.width,u.width,g.width,f.width,p.width,m.width,_.width,v.width,b.width);let k=e.fontFeatureSettings===h.n0.OFF;const D=i[0].width;for(let e=1,t=i.length;k&&e.001){k=!1;break}}let L=!0;k&&w.width!==D&&(L=!1),w.width>y.width&&(L=!1);const N=n.WP()>2e3;return new d.pR({zoomLevel:n.px(),pixelRatio:n.mX(),fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:k,typicalHalfwidthCharacterWidth:o.width,typicalFullwidthCharacterWidth:r.width,canUseHalfwidthRightwardsArrow:L,spaceWidth:s.width,middotWidth:C.width,wsmiddotWidth:S.width,maxDigitWidth:x},N)}}p.INSTANCE=new p;class m extends u.fv{constructor(e,t,i=null,o){super(e,t),this.accessibilityService=o,this._elementSizeObserver=this._register(new c.I(i,t.dimension,(()=>this._recomputeOptions()))),this._register(p.INSTANCE.onDidChange((()=>this._recomputeOptions()))),this._validatedOptions.get(10)&&this._elementSizeObserver.startObserving(),this._register(n.fX((e=>this._recomputeOptions()))),this._register(this.accessibilityService.onDidChangeScreenReaderOptimized((()=>this._recomputeOptions()))),this._recomputeOptions()}static applyFontInfoSlow(e,t){e.style.fontFamily=t.getMassagedFontFamily(),e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.fontFeatureSettings=t.fontFeatureSettings,e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px"}static applyFontInfo(e,t){e.setFontFamily(t.getMassagedFontFamily()),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setFontFeatureSettings(t.fontFeatureSettings),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)}observeReferenceElement(e){this._elementSizeObserver.observe(e)}updatePixelRatio(){this._recomputeOptions()}static _getExtraEditorClassName(){let e="";return n.G6||n.MG||(e+="no-user-select "),n.G6&&(e+="no-minimap-shadow "),s.dz&&(e+="mac "),e}_getEnvConfiguration(){return{extraEditorClassName:m._getExtraEditorClassName(),outerWidth:this._elementSizeObserver.getWidth(),outerHeight:this._elementSizeObserver.getHeight(),emptySelectionClipboard:n.Pf||n.vU,pixelRatio:n.mX(),zoomLevel:n.px(),accessibilitySupport:this.accessibilityService.isScreenReaderOptimized()?2:this.accessibilityService.getAccessibilitySupport()}}readConfiguration(e){return p.INSTANCE.readConfiguration(e)}}},4534:(e,t,i)=>{"use strict";i.d(t,{I:()=>o});var n=i(5976);class o extends n.JT{constructor(e,t,i){super(),this.referenceDomElement=e,this.changeCallback=i,this.width=-1,this.height=-1,this.resizeObserver=null,this.measureReferenceDomElementToken=-1,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this.width}getHeight(){return this.height}startObserving(){"undefined"!=typeof ResizeObserver?!this.resizeObserver&&this.referenceDomElement&&(this.resizeObserver=new ResizeObserver((e=>{e&&e[0]&&e[0].contentRect?this.observe({width:e[0].contentRect.width,height:e[0].contentRect.height}):this.observe()})),this.resizeObserver.observe(this.referenceDomElement)):-1===this.measureReferenceDomElementToken&&(this.measureReferenceDomElementToken=setInterval((()=>this.observe()),100))}stopObserving(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),-1!==this.measureReferenceDomElementToken&&(clearInterval(this.measureReferenceDomElementToken),this.measureReferenceDomElementToken=-1)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let i=0,n=0;t?(i=t.width,n=t.height):this.referenceDomElement&&(i=this.referenceDomElement.clientWidth,n=this.referenceDomElement.clientHeight),i=Math.max(5,i),n=Math.max(5,n),this.width===i&&this.height===n||(this.width=i,this.height=n,e&&this.changeCallback())}}},8728:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CoreEditingCommands:()=>L,CoreEditorCommand:()=>C,CoreNavigationCommands:()=>p,EditorScroll_:()=>g,RevealLine_:()=>f});var n=i(3580),o=i(6268),r=i(8401),s=i(5152),a=i(6830),l=i(1640),c=i(3181),u=i(187),h=i(4314);class d{static columnSelect(e,t,i,n,o,r){let s=Math.abs(o-i)+1,a=i>o,l=n>r,d=nr)continue;if(_n)continue;if(m0&&n--,d.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,n)}static columnSelectRight(e,t,i){let n=0;const o=Math.min(i.fromViewLineNumber,i.toViewLineNumber),r=Math.max(i.fromViewLineNumber,i.toViewLineNumber);for(let i=o;i<=r;i++){const o=t.getLineMaxColumn(i),r=c.io.visibleColumnFromColumn2(e,t,new u.L(i,o));n=Math.max(n,r)}let s=i.toViewVisualColumn;return s{const i=e.get(l.$).getFocusedCodeEditor();return!(!i||!i.hasTextFocus())&&this._runEditorCommand(e,i,t)})),e.addImplementation(1e3,"generic-dom-input-textarea",((e,t)=>{const i=document.activeElement;return!!(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)&&(this.runDOMCommand(),!0)})),e.addImplementation(0,"generic-dom",((e,t)=>{const i=e.get(l.$).getActiveCodeEditor();return!!i&&(i.focus(),this._runEditorCommand(e,i,t))}))}_runEditorCommand(e,t,i){return this.runEditorCommand(e,t,i)||!0}}!function(e){class t extends C{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[_.P.moveTo(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)]),e.revealPrimaryCursor(t.source,!0)}}e.MoveTo=(0,a.fK)(new t({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),e.MoveToSelect=(0,a.fK)(new t({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class i extends C{runCoreEditorCommand(e,t){e.model.pushStackElement();const i=this._getColumnSelectResult(e,e.getPrimaryCursorState(),e.getCursorColumnSelectData(),t);e.setCursorStates(t.source,3,i.viewStates.map((e=>c.Vi.fromViewState(e)))),e.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:i.fromLineNumber,fromViewVisualColumn:i.fromVisualColumn,toViewLineNumber:i.toLineNumber,toViewVisualColumn:i.toVisualColumn}),i.reversed?e.revealTopMostCursor(t.source):e.revealBottomMostCursor(t.source)}}e.ColumnSelect=(0,a.fK)(new class extends i{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(e,t,i,n){const o=e.model.validatePosition(n.position),r=e.coordinatesConverter.validateViewPosition(new u.L(n.viewPosition.lineNumber,n.viewPosition.column),o);let s=n.doColumnSelect?i.fromViewLineNumber:r.lineNumber,a=n.doColumnSelect?i.fromViewVisualColumn:n.mouseColumn-1;return d.columnSelect(e.cursorConfig,e,s,a,r.lineNumber,n.mouseColumn-1)}}),e.CursorColumnSelectLeft=(0,a.fK)(new class extends i{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return d.columnSelectLeft(e.cursorConfig,e,i)}}),e.CursorColumnSelectRight=(0,a.fK)(new class extends i{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return d.columnSelectRight(e.cursorConfig,e,i)}});class r extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return d.columnSelectUp(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectUp=(0,a.fK)(new r({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=(0,a.fK)(new r({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3595,linux:{primary:0}}}));class l extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return d.columnSelectDown(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectDown=(0,a.fK)(new l({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=(0,a.fK)(new l({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3596,linux:{primary:0}}}));class p extends C{constructor(){super({id:"cursorMove",precondition:void 0,description:_.N.description})}runCoreEditorCommand(e,t){const i=_.N.parse(t);i&&this._runCursorMove(e,t.source,i)}_runCursorMove(e,t,i){e.model.pushStackElement(),e.setCursorStates(t,3,p._move(e,e.getCursorStates(),i)),e.revealPrimaryCursor(t,!0)}static _move(e,t,i){const n=i.select,o=i.value;switch(i.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return _.P.simpleMove(e,t,i.direction,n,o,i.unit);case 11:case 13:case 12:case 14:return _.P.viewportMove(e,t,i.direction,n,o);default:return null}}}e.CursorMoveImpl=p,e.CursorMove=(0,a.fK)(new p);class m extends C{constructor(e){super(e),this._staticArgs=e.args}runCoreEditorCommand(e,t){let i=this._staticArgs;-1===this._staticArgs.value&&(i={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:e.cursorConfig.pageSize}),e.model.pushStackElement(),e.setCursorStates(t.source,3,_.P.simpleMove(e,e.getCursorStates(),i.direction,i.select,i.value,i.unit)),e.revealPrimaryCursor(t.source,!0)}}e.CursorLeft=(0,a.fK)(new m({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=(0,a.fK)(new m({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1039}})),e.CursorRight=(0,a.fK)(new m({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=(0,a.fK)(new m({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1041}})),e.CursorUp=(0,a.fK)(new m({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=(0,a.fK)(new m({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=(0,a.fK)(new m({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:11}})),e.CursorPageUpSelect=(0,a.fK)(new m({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1035}})),e.CursorDown=(0,a.fK)(new m({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=(0,a.fK)(new m({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=(0,a.fK)(new m({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:12}})),e.CursorPageDownSelect=(0,a.fK)(new m({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1036}})),e.CreateCursor=(0,a.fK)(new class extends C{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(e,t){let i;i=t.wholeLine?_.P.line(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition):_.P.moveTo(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition);const n=e.getCursorStates();if(n.length>1){const o=i.modelState?i.modelState.position:null,r=i.viewState?i.viewState.position:null;for(let i=0,s=n.length;ir&&(o=r);const s=new h.e(o,1,o,e.model.getLineMaxColumn(o));let a=0;if(i.at)switch(i.at){case f.RawAtArgument.Top:a=3;break;case f.RawAtArgument.Center:a=1;break;case f.RawAtArgument.Bottom:a=4}const l=e.coordinatesConverter.convertModelRangeToViewRange(s);e.revealRange(t.source,!1,l,a,0)}}),e.SelectAll=new class extends S{constructor(){super(a.Sq)}runDOMCommand(){o.vU&&(document.activeElement.focus(),document.activeElement.select()),document.execCommand("selectAll")}runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditorCommand(n,i)}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates("keyboard",3,[_.P.selectAll(e,e.getPrimaryCursorState())])}},e.SetSelection=(0,a.fK)(new class extends C{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[c.Vi.fromModelSelection(t.selection)])}})}(p||(p={}));const x=y.Ao.and(b.u.textInputFocus,b.u.columnSelection);function k(e,t){w.W.registerKeybindingRule({id:e,primary:t,when:x,weight:1})}function D(e){return e.register(),e}var L;k(p.CursorColumnSelectLeft.id,1039),k(p.CursorColumnSelectRight.id,1041),k(p.CursorColumnSelectUp.id,1040),k(p.CursorColumnSelectPageUp.id,1035),k(p.CursorColumnSelectDown.id,1042),k(p.CursorColumnSelectPageDown.id,1036),function(e){class t extends a._l{runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditingCommand(t,n,i||{})}}e.CoreEditingCommand=t,e.LineBreakInsert=(0,a.fK)(new class extends t{constructor(){super({id:"lineBreakInsert",precondition:b.u.writable,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,v.u.lineBreakInsert(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection))))}}),e.Outdent=(0,a.fK)(new class extends t{constructor(){super({id:"outdent",precondition:b.u.writable,kbOpts:{weight:0,kbExpr:y.Ao.and(b.u.editorTextFocus,b.u.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,v.u.outdent(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.Tab=(0,a.fK)(new class extends t{constructor(){super({id:"tab",precondition:b.u.writable,kbOpts:{weight:0,kbExpr:y.Ao.and(b.u.editorTextFocus,b.u.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,v.u.tab(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.DeleteLeft=(0,a.fK)(new class extends t{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(e,t,i){const[n,o]=m.A.deleteLeft(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)),t.getCursorAutoClosedCharacters());n&&e.pushUndoStop(),e.executeCommands(this.id,o),t.setPrevEditOperationType(2)}}),e.DeleteRight=(0,a.fK)(new class extends t{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(e,t,i){const[n,o]=m.A.deleteRight(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)));n&&e.pushUndoStop(),e.executeCommands(this.id,o),t.setPrevEditOperationType(3)}}),e.Undo=new class extends S{constructor(){super(a.n_)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(78))return t.getModel().undo()}},e.Redo=new class extends S{constructor(){super(a.kz)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(78))return t.getModel().redo()}}}(L||(L={}));class N extends a.mY{constructor(e,t,i){super({id:e,precondition:void 0,description:i}),this._handlerId=t}runCommand(e,t){const i=e.get(l.$).getFocusedCodeEditor();i&&i.trigger("keyboard",this._handlerId,t)}}function E(e,t){D(new N("default:"+e,e)),D(new N(e,e,t))}E("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),E("replacePreviousChar"),E("compositionType"),E("compositionStart"),E("compositionEnd"),E("paste"),E("cut")},5715:(e,t,i)=>{"use strict";i.d(t,{pd:()=>n,RA:()=>f,Nl:()=>p,Fz:()=>m});var n,o=i(6268),r=i(5321),s=i(5393),a=i(4669),l=i(5976),c=i(1432),u=i(7295),h=i(5887),d=i(187),g=i(3860);!function(e){e.Tap="-monaco-textarea-synthetic-tap"}(n||(n={}));const f={forceCopyWithSyntaxHighlighting:!1};class p{constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}}p.INSTANCE=new p;class m extends l.JT{constructor(e,t){super(),this.textArea=t,this._onFocus=this._register(new a.Q5),this.onFocus=this._onFocus.event,this._onBlur=this._register(new a.Q5),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new a.Q5),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new a.Q5),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new a.Q5),this.onCut=this._onCut.event,this._onPaste=this._register(new a.Q5),this.onPaste=this._onPaste.event,this._onType=this._register(new a.Q5),this.onType=this._onType.event,this._onCompositionStart=this._register(new a.Q5),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new a.Q5),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new a.Q5),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new a.Q5),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._host=e,this._textArea=this._register(new v(t)),this._asyncTriggerCut=this._register(new s.pY((()=>this._onCut.fire()),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new s.pY((()=>this.writeScreenReaderContent("asyncFocusGain")),0)),this._textAreaState=h.un.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._isDoingComposition=!1,this._nextCommand=0;let i=null;this._register(r.mu(t.domNode,"keydown",(e=>{(109===e.keyCode||this._isDoingComposition&&1===e.keyCode)&&e.stopPropagation(),e.equals(9)&&e.preventDefault(),i=e,this._onKeyDown.fire(e)}))),this._register(r.mu(t.domNode,"keyup",(e=>{this._onKeyUp.fire(e)}))),this._register(r.nm(t.domNode,"compositionstart",(e=>{if(h.al&&console.log("[compositionstart]",e),!this._isDoingComposition){if(this._isDoingComposition=!0,c.dz&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===e.data&&(i&&i.equals(109)&&("ArrowRight"===i.code||"ArrowLeft"===i.code)||o.vU))return h.al&&console.log("[compositionstart] Handling long press case on macOS + arrow key or Firefox",e),this._textAreaState=new h.un(this._textAreaState.value,this._textAreaState.selectionStart-1,this._textAreaState.selectionEnd,this._textAreaState.selectionStartPosition?new d.L(this._textAreaState.selectionStartPosition.lineNumber,this._textAreaState.selectionStartPosition.column-1):null,this._textAreaState.selectionEndPosition),void this._onCompositionStart.fire({revealDeltaColumns:-1});o.Dt?this._onCompositionStart.fire({revealDeltaColumns:-this._textAreaState.selectionStart}):(this._setAndWriteTextAreaState("compositionstart",h.un.EMPTY),this._onCompositionStart.fire({revealDeltaColumns:0}))}})));const l=e=>{const t=this._textAreaState,i=h.un.readFromTextArea(this._textArea);return[i,h.un.deduceInput(t,i,e)]},g=()=>{const e=this._textAreaState,t=h.un.readFromTextArea(this._textArea);return[t,h.un.deduceAndroidCompositionInput(e,t)]},f=e=>{const t=this._textAreaState,i=h.un.selectedText(e);return[i,{text:i.value,replacePrevCharCnt:t.selectionEnd-t.selectionStart,replaceNextCharCnt:0,positionDelta:0}]};this._register(r.nm(t.domNode,"compositionupdate",(e=>{if(h.al&&console.log("[compositionupdate]",e),o.Dt){const[t,i]=g();return this._textAreaState=t,this._onType.fire(i),void this._onCompositionUpdate.fire(e)}const[t,i]=f(e.data||"");this._textAreaState=t,this._onType.fire(i),this._onCompositionUpdate.fire(e)}))),this._register(r.nm(t.domNode,"compositionend",(e=>{if(h.al&&console.log("[compositionend]",e),!this._isDoingComposition)return;if(this._isDoingComposition=!1,o.Dt){const[e,t]=g();return this._textAreaState=e,this._onType.fire(t),void this._onCompositionEnd.fire()}const[t,i]=f(e.data||"");this._textAreaState=t,this._onType.fire(i),(o.i7||o.vU)&&(this._textAreaState=h.un.readFromTextArea(this._textArea)),this._onCompositionEnd.fire()}))),this._register(r.nm(t.domNode,"input",(()=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._isDoingComposition)return;const[e,t]=l(c.dz);0===t.replacePrevCharCnt&&1===t.text.length&&u.ZG(t.text.charCodeAt(0))||(this._textAreaState=e,0===this._nextCommand?""===t.text&&0===t.replacePrevCharCnt||this._onType.fire(t):(""===t.text&&0===t.replacePrevCharCnt||this._firePaste(t.text,null),this._nextCommand=0))}))),this._register(r.nm(t.domNode,"cut",(e=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(e),this._asyncTriggerCut.schedule()}))),this._register(r.nm(t.domNode,"copy",(e=>{this._ensureClipboardGetsEditorSelection(e)}))),this._register(r.nm(t.domNode,"paste",(e=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),_.canUseTextData(e)){const[t,i]=_.getTextData(e);""!==t&&this._firePaste(t,i)}else this._textArea.getSelectionStart()!==this._textArea.getSelectionEnd()&&this._setAndWriteTextAreaState("paste",h.un.EMPTY),this._nextCommand=1}))),this._register(r.nm(t.domNode,"focus",(()=>{const e=this._hasFocus;this._setHasFocus(!0),o.G6&&!e&&this._hasFocus&&this._asyncFocusGainWriteScreenReaderContent.schedule()}))),this._register(r.nm(t.domNode,"blur",(()=>{this._isDoingComposition&&(this._isDoingComposition=!1,this.writeScreenReaderContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)}))),this._register(r.nm(t.domNode,n.Tap,(()=>{o.Dt&&this._isDoingComposition&&(this._isDoingComposition=!1,this.writeScreenReaderContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())})))}_installSelectionChangeListener(){let e=0;return r.nm(document,"selectionchange",(t=>{if(!this._hasFocus)return;if(this._isDoingComposition)return;if(!o.i7)return;const i=Date.now(),n=i-e;if(e=i,n<5)return;const r=i-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),r<100)return;if(!this._textAreaState.selectionStartPosition||!this._textAreaState.selectionEndPosition)return;const s=this._textArea.getValue();if(this._textAreaState.value!==s)return;const a=this._textArea.getSelectionStart(),l=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===a&&this._textAreaState.selectionEnd===l)return;const c=this._textAreaState.deduceEditorPosition(a),u=this._host.deduceModelPosition(c[0],c[1],c[2]),h=this._textAreaState.deduceEditorPosition(l),d=this._host.deduceModelPosition(h[0],h[1],h[2]),f=new g.Y(u.lineNumber,u.column,d.lineNumber,d.column);this._onSelectionChangeRequest.fire(f)}))}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){const e=r.Ay(this.textArea.domNode);e?this._setHasFocus(e.activeElement===this.textArea.domNode):r.Uw(this.textArea.domNode)?this._setHasFocus(document.activeElement===this.textArea.domNode):this._setHasFocus(!1)}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeScreenReaderContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeScreenReaderContent(e){this._isDoingComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent(this._textAreaState))}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy(_.canUseTextData(e)),i={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};p.INSTANCE.set(o.vU?t.text.replace(/\r\n/g,"\n"):t.text,i),_.canUseTextData(e)?_.setTextData(e,t.text,t.html,i):this._setAndWriteTextAreaState("copy or cut",h.un.selectedText(t.text))}_firePaste(e,t){t||(t=p.INSTANCE.get(e)),this._onPaste.fire({text:e,metadata:t})}}class _{static canUseTextData(e){return!!e.clipboardData||!!window.clipboardData}static getTextData(e){if(e.clipboardData){e.preventDefault();const t=e.clipboardData.getData("text/plain");let i=null;const n=e.clipboardData.getData("vscode-editor-data");if("string"==typeof n)try{i=JSON.parse(n),1!==i.version&&(i=null)}catch(e){}return[t,i]}if(window.clipboardData)return e.preventDefault(),[window.clipboardData.getData("Text"),null];throw new Error("ClipboardEventUtils.getTextData: Cannot use text data!")}static setTextData(e,t,i,n){if(e.clipboardData)return e.clipboardData.setData("text/plain",t),"string"==typeof i&&e.clipboardData.setData("text/html",i),e.clipboardData.setData("vscode-editor-data",JSON.stringify(n)),void e.preventDefault();if(window.clipboardData)return window.clipboardData.setData("Text",t),void e.preventDefault();throw new Error("ClipboardEventUtils.setTextData: Cannot use text data!")}}class v extends l.JT{constructor(e){super(),this._actual=e,this._ignoreSelectionChangeTime=0}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.domNode.value}setValue(e,t){const i=this._actual.domNode;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return"backward"===this._actual.domNode.selectionDirection?this._actual.domNode.selectionEnd:this._actual.domNode.selectionStart}getSelectionEnd(){return"backward"===this._actual.domNode.selectionDirection?this._actual.domNode.selectionStart:this._actual.domNode.selectionEnd}setSelectionRange(e,t,i){const n=this._actual.domNode;let s=null;const a=r.Ay(n);s=a?a.activeElement:document.activeElement;const l=s===n,c=n.selectionStart,u=n.selectionEnd;if(l&&c===t&&u===i)o.vU&&window.parent!==window&&n.focus();else{if(l)return this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),void(o.vU&&window.parent!==window&&n.focus());try{const e=r.vL(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),r._0(n,e)}catch(e){}}}}},5887:(e,t,i)=>{"use strict";i.d(t,{al:()=>s,un:()=>a,ee:()=>l});var n=i(7295),o=i(187),r=i(4314);const s=!1;class a{constructor(e,t,i,n,o){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selectionStartPosition=n,this.selectionEndPosition=o}toString(){return"[ <"+this.value+">, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+"]"}static readFromTextArea(e){return new a(e.getValue(),e.getSelectionStart(),e.getSelectionEnd(),null,null)}collapseSelection(){return new a(this.value,this.value.length,this.value.length,null,null)}writeToTextArea(e,t,i){s&&console.log("writeToTextArea "+e+": "+this.toString()),t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){if(e<=this.selectionStart){const t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,t,-1)}if(e>=this.selectionEnd){const t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selectionEndPosition,t,1)}const t=this.value.substring(this.selectionStart,e);if(-1===t.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selectionStartPosition,t,1);const i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,i,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,o=-1;for(;-1!==(o=t.indexOf("\n",o+1));)n++;return[e,i*t.length,n]}static selectedText(e){return new a(e,0,e.length,null,null)}static deduceInput(e,t,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};s&&(console.log("------------------------deduceInput"),console.log("PREVIOUS STATE: "+e.toString()),console.log("CURRENT STATE: "+t.toString()));let o=e.value,r=e.selectionStart,a=e.selectionEnd,l=t.value,c=t.selectionStart,u=t.selectionEnd;const h=o.substring(a),d=l.substring(u),g=n.P1(h,d);l=l.substring(0,l.length-g),o=o.substring(0,o.length-g);const f=o.substring(0,r),p=l.substring(0,c),m=n.Mh(f,p);if(l=l.substring(m),o=o.substring(m),c-=m,r-=m,u-=m,a-=m,s&&(console.log("AFTER DIFFING PREVIOUS STATE: <"+o+">, selectionStart: "+r+", selectionEnd: "+a),console.log("AFTER DIFFING CURRENT STATE: <"+l+">, selectionStart: "+c+", selectionEnd: "+u)),i&&c===u&&o.length>0){let e=null;if(c===l.length?l.startsWith(o)&&(e=l.substring(o.length)):l.endsWith(o)&&(e=l.substring(0,l.length-o.length)),null!==e&&e.length>0&&(/\uFE0F/.test(e)||n.RP(e)))return{text:e,replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0}}if(c===u){if(o===l&&0===r&&a===o.length&&c===l.length&&-1===l.indexOf("\n")&&n.xe(l))return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};const e=f.length-m;return s&&console.log("REMOVE PREVIOUS: "+(f.length-m)+" chars"),{text:l,replacePrevCharCnt:e,replaceNextCharCnt:0,positionDelta:0}}return{text:l,replacePrevCharCnt:a-r,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(s&&(console.log("------------------------deduceAndroidCompositionInput"),console.log("PREVIOUS STATE: "+e.toString()),console.log("CURRENT STATE: "+t.toString())),e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};const i=Math.min(n.Mh(e.value,t.value),e.selectionEnd),o=Math.min(n.P1(e.value,t.value),e.value.length-e.selectionEnd),r=e.value.substring(i,e.value.length-o),a=t.value.substring(i,t.value.length-o),l=e.selectionStart-i,c=e.selectionEnd-i,u=t.selectionStart-i,h=t.selectionEnd-i;return s&&(console.log("AFTER DIFFING PREVIOUS STATE: <"+r+">, selectionStart: "+l+", selectionEnd: "+c),console.log("AFTER DIFFING CURRENT STATE: <"+a+">, selectionStart: "+u+", selectionEnd: "+h)),{text:a,replacePrevCharCnt:c,replaceNextCharCnt:r.length-c,positionDelta:h-a.length}}}a.EMPTY=new a("",0,0,null,null);class l{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const i=e*t,n=i+1,o=i+t;return new r.e(n,1,o+1,1)}static fromEditorSelection(e,t,i,n,s){const c=l._getPageOfLine(i.startLineNumber,n),u=l._getRangeForPage(c,n),h=l._getPageOfLine(i.endLineNumber,n),d=l._getRangeForPage(h,n),g=u.intersectRanges(new r.e(1,1,i.startLineNumber,i.startColumn));let f=t.getValueInRange(g,1);const p=t.getLineCount(),m=t.getLineMaxColumn(p),_=d.intersectRanges(new r.e(i.endLineNumber,i.endColumn,p,m));let v,b=t.getValueInRange(_,1);if(c===h||c+1===h)v=t.getValueInRange(i,1);else{const e=u.intersectRanges(i),n=d.intersectRanges(i);v=t.getValueInRange(e,1)+String.fromCharCode(8230)+t.getValueInRange(n,1)}if(s){const e=500;f.length>e&&(f=f.substring(f.length-e,f.length)),b.length>e&&(b=b.substring(0,e)),v.length>2*e&&(v=v.substring(0,e)+String.fromCharCode(8230)+v.substring(v.length-e,v.length))}return new a(f+v+b,f.length,f.length+v.length,new o.L(i.startLineNumber,i.startColumn),new o.L(i.endLineNumber,i.endColumn))}}},9925:(e,t,i)=>{"use strict";i.d(t,{yy:()=>m,Dl:()=>_,ZF:()=>b,YQ:()=>v});var n=i(7295),o=i(4314),r=i(1050),s=i(5976),a=i(6830),l=i(8819),c=i(1741),u=i(2065),h=i(5026),d=i(3580);const g=(0,u.yh)("IEditorCancelService"),f=new l.uy("cancellableOperation",!1,(0,d.N)("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));(0,h.z)(g,class{constructor(){this._tokens=new WeakMap}add(e,t){let i,n=this._tokens.get(e);return n||(n=e.invokeWithinContext((e=>({key:f.bindTo(e.get(l.i6)),tokens:new c.S}))),this._tokens.set(e,n)),n.key.set(!0),i=n.tokens.push(t),()=>{i&&(i(),n.key.set(!n.tokens.isEmpty()),i=void 0)}}cancel(e){const t=this._tokens.get(e);if(!t)return;const i=t.tokens.pop();i&&(i.cancel(),t.key.set(!t.tokens.isEmpty()))}},!0);class p extends r.A{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext((t=>t.get(g).add(e,this)))}dispose(){this._unregister(),super.dispose()}}(0,a.fK)(new class extends a._l{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:f})}runEditorCommand(e,t){e.get(g).cancel(t)}});class m{constructor(e,t){if(this.flags=t,0!=(1&this.flags)){const t=e.getModel();this.modelVersionId=t?n.WU("{0}#{1}",t.uri.toString(),t.getVersionId()):null}else this.modelVersionId=null;0!=(4&this.flags)?this.position=e.getPosition():this.position=null,0!=(2&this.flags)?this.selection=e.getSelection():this.selection=null,0!=(8&this.flags)?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof m))return!1;const t=e;return this.modelVersionId===t.modelVersionId&&this.scrollLeft===t.scrollLeft&&this.scrollTop===t.scrollTop&&!(!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position))&&!(!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))}validate(e){return this._equals(new m(e,this.flags))}}class _ extends p{constructor(e,t,i,n){super(e,n),this._listener=new s.SL,4&t&&this._listener.add(e.onDidChangeCursorPosition((e=>{i&&o.e.containsPosition(i,e.position)||this.cancel()}))),2&t&&this._listener.add(e.onDidChangeCursorSelection((e=>{i&&o.e.containsRange(i,e.selection)||this.cancel()}))),8&t&&this._listener.add(e.onDidScrollChange((e=>this.cancel()))),1&t&&(this._listener.add(e.onDidChangeModel((e=>this.cancel()))),this._listener.add(e.onDidChangeModelContent((e=>this.cancel()))))}dispose(){this._listener.dispose(),super.dispose()}}class v extends r.A{constructor(e,t){super(t),this._listener=e.onDidChangeContent((()=>this.cancel()))}dispose(){this._listener.dispose(),super.dispose()}}class b{constructor(e,t,i){this._visiblePosition=e,this._visiblePositionScrollDelta=t,this._cursorPosition=i}static capture(e){let t=null,i=0;if(0!==e.getScrollTop()){const n=e.getVisibleRanges();if(n.length>0){t=n[0].getStartPosition();const o=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-o}}return new b(t,i,e.getPosition())}restore(e){if(this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){const t=e.getPosition();if(!this._cursorPosition||!t)return;const i=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+i)}}},3947:(e,t,i)=>{"use strict";i.d(t,{$:()=>M});var n=i(5321),o=i(8764),r=i(7301),s=i(9365),a=i(4742),l=i(3720);let c;!function e(t,i,n){function o(s,a){if(!i[s]){if(!t[s]){if(r)return r(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=i[s]={exports:{}};t[s][0].call(c.exports,(function(e){return o(t[s][1][e]||e)}),c,c.exports,e,t,i,n)}return i[s].exports}for(var r=void 0,s=0;s\s]+))?)*)\s*(\/?)\s*>/,a=/^<\s*\/\s*([\w:-]+)[^>]*>/,l=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,c=/^=0&&(t.comment&&t.comment(e.substring(4,n)),e=e.substring(n+3),i=!1):u.test(e)?f(a,m):c.test(e)&&f(s,p),function(){if(i){var n,o=e.indexOf("<");o>=0?(n=e.substring(0,o),e=e.substring(o)):(n=e,e=""),t.chars&&t.chars(n)}}();var o=e===d;d=e,o&&(e="")}function f(t,n){var o=e.match(t);o&&(e=e.substring(o[0].length),o[0].replace(t,n),i=!1)}function p(e,i,s,a){var c={},u=o(i),d=r.voids[u]||!!a;s.replace(l,(function(e,t,i,o,r){c[t]=void 0===i&&void 0===o&&void 0===r?void 0:n.decode(i||o||r||"")})),d||h.push(u),t.start&&t.start(u,c,d)}function m(e,i){var n,r=0,s=o(i);if(s)for(r=h.length-1;r>=0&&h[r]!==s;r--);if(r>=0){for(n=h.length-1;n>=r;n--)t.end&&t.end(h[n]);h.length=r}}m()}},{"./attributes":1,"./elements":3,"./lowercase":5,he:9}],8:[function(e,t,i){var n=e("he"),o=e("./lowercase"),r=e("./attributes"),s=e("./elements");t.exports=function(e,t){var i,a=t||{};return u(),{start:function(e,t,s){var u=o(e);i.ignoring?c(u):-1!==(a.allowedTags||[]).indexOf(u)&&(!a.filter||a.filter({tag:u,attrs:t}))?(l("<"),l(u),Object.keys(t).forEach((function(e){var i=t[e],s=(a.allowedClasses||{})[u]||[],c=(a.allowedAttributes||{})[u]||[];c=c.concat((a.allowedAttributes||{})["*"]||[]);var h=o(e);("class"===h&&-1===c.indexOf(h)?(i=i.split(" ").filter((function(e){return s&&-1!==s.indexOf(e)})).join(" ").trim()).length:-1!==c.indexOf(h)&&(!0!==r.uris[h]||function(e){var t=e[0];if("#"===t||"/"===t)return!0;var i=e.indexOf(":");if(-1===i)return!0;var n=e.indexOf("?");if(-1!==n&&i>n)return!0;var o=e.indexOf("#");return-1!==o&&i>o||a.allowedSchemes.some((function(t){return 0===e.indexOf(t+":")}))}(i)))&&(l(" "),l(e),"string"==typeof i&&(l('="'),l(n.encode(i)),l('"')))})),l(s?"/>":">")):c(u)},end:function(e){var t=o(e);-1!==(a.allowedTags||[]).indexOf(t)&&!1===i.ignoring?(l("")):function(e){i.ignoring===e&&--i.depth<=0&&u()}(t)},chars:function(e){!1===i.ignoring&&l(a.transformText?a.transformText(e):e)}};function l(t){e.push(t)}function c(e){s.voids[e]||(!1===i.ignoring?i={ignoring:e,depth:1}:i.ignoring===e&&i.depth++)}function u(){i={ignoring:!1,depth:0}}}},{"./attributes":1,"./elements":3,"./lowercase":5,he:9}],9:[function(e,t,i){var n={"&":"&","<":"<",">":">",'"':""","'":"'"},o={"&":"&","<":"<",">":">",""":'"',"'":"'"},r=/(&|<|>|"|')/g,s=/[&<>"']/g;function a(e){return n[e]}function l(e){return o[e]}function c(e){return null==e?"":String(e).replace(s,a)}function u(e){return null==e?"":String(e).replace(r,l)}c.options=u.options={},t.exports={encode:c,escape:c,decode:u,unescape:u,version:"1.0.0-browser"}},{}],10:[function(e,t,i){function n(e,t){return e[t]=!0,e}t.exports=function(e){return e.reduce(n,{})}},{}]},{},[4]);var u,h=c,d=i(3897),g=i(6248),f=i(7295),p=i(666),m=i(6663),_=i(1212),v=i(5935),b=i(3938),y=i(6811),w=i(4669),C=i(4850);const S=null===(u=window.trustedTypes)||void 0===u?void 0:u.createPolicy("insane",{createHTML:(e,t)=>h(e,t)});var x,k=i(988),D=i(1531),L=i(5713),N=i(5976),E=i(4101),A=function(e,t){return function(i,n){t(i,n,e)}};let M=class e{constructor(e,t,i){this._options=e,this._modeService=t,this._openerService=i,this._onDidRenderAsync=new w.Q5,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,i){const c=new N.SL;let u;return u=e?function(e,t={},i={}){var c;const u=(0,o.az)(t),x=function(t){let i;try{i=(0,d.Q)(decodeURIComponent(t))}catch(e){}return i?(i=(0,g.rs)(i,(t=>e.uris&&e.uris[t]?p.o.revive(e.uris[t]):void 0)),encodeURIComponent(JSON.stringify(i))):t},k=function(t,i){const n=e.uris&&e.uris[t];if(!n)return t;let o=p.o.revive(n);return p.o.parse(t).toString()===o.toString()?t:i?m.Gi.asBrowserUri(o).toString(!0):(o.query&&(o=o.with({query:x(o.query)})),o.toString())};let D;const L=new Promise((e=>D=e)),N=new l.Renderer;N.image=(e,i,n)=>{let o=[],r=[];if(e){({href:e,dimensions:o}=(0,s.v1)(e)),e=k(e,!0);try{const i=p.o.parse(e);t.baseUrl&&i.scheme===m.lg.file&&(e=(0,v.i3)(t.baseUrl,e).toString())}catch(e){}r.push(`src="${e}"`)}return n&&r.push(`alt="${n}"`),i&&r.push(`title="${i}"`),o.length&&(r=r.concat(o)),""},N.link=(i,n,o)=>(i===o&&(o=(0,s.oR)(o)),i=k(i,!1),t.baseUrl&&(/^\w[\w\d+.-]*:/.test(i)||(i=(0,v.i3)(t.baseUrl,i).toString())),n=(0,s.oR)(n),!(i=(0,s.oR)(i))||i.match(/^data:|javascript:/i)||i.match(/^command:/i)&&!e.isTrusted||i.match(/^command:(\/\/\/)?_workbench\.downloadResource/i)?o:`/g,">").replace(/"/g,""").replace(/'/g,"'")}" title="${n||i}">${o}`),N.paragraph=t=>(e.supportThemeIcons&&(t=(0,y.T)(t).map((e=>"string"==typeof e?e:e.outerHTML)).join("")),`

    ${t}

    `),t.codeBlockRenderer&&(N.code=(e,i)=>{const o=t.codeBlockRenderer(i,e),r=a.a.nextId(),s=Promise.all([o,L]).then((e=>{const t=u.querySelector(`div[data-code="${r}"]`);t&&n.mc(t,e[0])})).catch((e=>{}));return t.asyncRenderCallback&&s.then(t.asyncRenderCallback),`
    ${(0,f.YU)(e)}
    `}),t.actionHandler&&t.actionHandler.disposeables.add(w.ju.any((0,C.jt)(u,"click"),(0,C.jt)(u,"auxclick"))((e=>{const i=new b.n(e);if(!i.leftButton&&!i.middleButton)return;let n=i.target;if("A"===n.tagName||(n=n.parentElement,n&&"A"===n.tagName))try{const e=n.dataset.href;e&&t.actionHandler.callback(e,i)}catch(e){(0,r.dL)(e)}finally{i.preventDefault()}}))),i.sanitizer=t=>(e.isTrusted?t.match(/^(]+>)|(<\/\s*span>)$/):void 0)?t:"",i.sanitize=!0,i.silent=!0,i.renderer=N;let E=null!==(c=e.value)&&void 0!==c?c:"";E.length>1e5&&(E=`${E.substr(0,1e5)}…`),e.supportThemeIcons&&(E=(0,_.f$)(E));const A=l.parse(E,i);if(u.innerHTML=function(e,t){var i;const n=function(e){const t=[m.lg.http,m.lg.https,m.lg.mailto,m.lg.data,m.lg.file,m.lg.vscodeRemote,m.lg.vscodeRemoteResource];return e.isTrusted&&t.push(m.lg.command),{allowedSchemes:t,allowedTags:["ul","li","p","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"],allowedAttributes:{a:["href","name","target","data-href"],img:["src","title","alt","width","height"],div:["class","data-code"],span:["class","style"],th:["align"],td:["align"]},filter:t=>!("span"===t.tag&&e.isTrusted&&(t.attrs.style&&1===Object.keys(t.attrs).length?!t.attrs.style.match(/^(color\:#[0-9a-fA-F]+;)?(background-color\:#[0-9a-fA-F]+;)?$/):!t.attrs.class||!t.attrs.class.match(/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/)))}}(e);return null!==(i=null==S?void 0:S.createHTML(t,n))&&void 0!==i?i:h(t,n)}(e,A),D(),t.asyncRenderCallback)for(const e of u.getElementsByTagName("img")){const i=n.nm(e,"load",(()=>{i.dispose(),t.asyncRenderCallback()}))}return u}(e,Object.assign(Object.assign({},this._getRenderOptions(e,c)),t),i):document.createElement("span"),{element:u,dispose:()=>c.dispose()}}_getRenderOptions(t,i){return{baseUrl:this._options.baseUrl,codeBlockRenderer:(t,i)=>{return n=this,o=void 0,s=function*(){var n,o,r,s;let a;t?a=this._modeService.getModeIdForLanguageName(t):this._options.editor&&(a=null===(n=this._options.editor.getModel())||void 0===n?void 0:n.getLanguageIdentifier().language),a||(a="plaintext"),this._modeService.triggerMode(a);const l=null!==(o=yield E.RW.getPromise(a))&&void 0!==o?o:void 0,c=document.createElement("span");c.innerHTML=null!==(s=null===(r=e._ttpTokenizer)||void 0===r?void 0:r.createHTML(i,l))&&void 0!==s?s:(0,L.C)(i,l);let u=this._options.codeBlockFontFamily;return this._options.editor&&(u=this._options.editor.getOption(40).fontFamily),u&&(c.style.fontFamily=u),c},new((r=void 0)||(r=Promise))((function(e,t){function i(e){try{l(s.next(e))}catch(e){t(e)}}function a(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(i,a)}l((s=s.apply(n,o||[])).next())}));var n,o,r,s},asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:e=>this._openerService.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:t.isTrusted}).catch(r.dL),disposeables:i}}}};M._ttpTokenizer=null===(x=window.trustedTypes)||void 0===x?void 0:x.createPolicy("tokenizeToString",{createHTML:(e,t)=>(0,L.C)(e,t)}),M=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([A(1,D.h),A(2,k.v4)],M)},5520:(e,t,i)=>{"use strict";i.d(t,{CL:()=>o,QI:()=>r,Pi:()=>s});var n=i(6518);function o(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===n.g.ICodeEditor}function r(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===n.g.IDiffEditor}function s(e){return o(e)?e:r(e)?e.getModifiedEditor():null}},6830:(e,t,i)=>{"use strict";i.d(t,{mY:()=>v,AJ:()=>b,_l:()=>w,R6:()=>C,jY:()=>S,sb:()=>x,f:()=>k,fK:()=>D,Qr:()=>L,rn:()=>N,QG:()=>E,_K:()=>A,Uc:()=>n,n_:()=>T,kz:()=>R,Sq:()=>O});var n,o=i(3580),r=i(666),s=i(1640),a=i(187),l=i(1200),c=i(8216),u=i(4144),h=i(4565),d=i(8819),g=i(9989),f=i(9872),p=i(829),m=i(8401),_=i(3557);class v{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this._description=e.description}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const e=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const t of e){let e=t.kbExpr;this.precondition&&(e=e?d.Ao.and(e,this.precondition):this.precondition);const i={id:this.id,weight:t.weight,args:t.args,when:e,primary:t.primary,secondary:t.secondary,win:t.win,linux:t.linux,mac:t.mac};g.W.registerKeybindingRule(i)}}h.P.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),description:this._description})}_registerMenuItem(e){u.BH.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}}class b extends v{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,i){return this._implementations.push({priority:e,name:t,implementation:i}),this._implementations.sort(((e,t)=>t.priority-e.priority)),{dispose:()=>{for(let e=0;e{if(e.get(d.i6).contextMatchesRules((0,m.f6)(this.precondition)))return this.runEditorCommand(e,n,t)}))}}class C extends w{constructor(e){super(C.convertOptions(e)),this.label=e.label,this.alias=e.alias}static convertOptions(e){let t;function i(t){return t.menuId||(t.menuId=u.eH.EditorContext),t.title||(t.title=e.label),t.when=d.Ao.and(e.precondition,t.when),t}return t=Array.isArray(e.menuOpts)?e.menuOpts:e.menuOpts?[e.menuOpts]:[],Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(i)):e.contextMenuOpts&&t.push(i(e.contextMenuOpts)),e.menuOpts=t,e}runEditorCommand(e,t,i){return this.reportTelemetry(e,t),this.run(e,t,i||{})}reportTelemetry(e,t){e.get(p.b).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class S extends C{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort(((e,t)=>t[0]-e[0])),{dispose:()=>{for(let e=0;enew Promise(((n,r)=>{try{n(t(e.object.textEditorModel,a.L.lift(o),i.slice(2)))}catch(e){r(e)}})).finally((()=>{e.dispose()}))))}))}function k(e,t){h.P.registerCommand(e,(function(e,...i){const[n]=i;(0,m.p_)(r.o.isUri(n));const o=e.get(l.q).getModel(n);return o?t(o,...i.slice(1)):e.get(c.S).createModelReference(n).then((e=>new Promise(((n,o)=>{try{n(t(e.object.textEditorModel,i.slice(1)))}catch(e){o(e)}})).finally((()=>{e.dispose()}))))}))}function D(e){return M.INSTANCE.registerEditorCommand(e),e}function L(e){const t=new e;return M.INSTANCE.registerEditorAction(t),t}function N(e){return M.INSTANCE.registerEditorAction(e),e}function E(e){M.INSTANCE.registerEditorAction(e)}function A(e,t){M.INSTANCE.registerEditorContribution(e,t)}!function(e){e.getEditorCommand=function(e){return M.INSTANCE.getEditorCommand(e)},e.getEditorActions=function(){return M.INSTANCE.getEditorActions()},e.getEditorContributions=function(){return M.INSTANCE.getEditorContributions()},e.getSomeEditorContributions=function(e){return M.INSTANCE.getEditorContributions().filter((t=>e.indexOf(t.id)>=0))},e.getDiffEditorContributions=function(){return M.INSTANCE.getDiffEditorContributions()}}(n||(n={}));class M{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t){this.editorContributions.push({id:e,ctor:t})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions.slice(0)}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}function I(e){return e.register(),e}M.INSTANCE=new M,f.B.add("editor.contributions",M.INSTANCE);const T=I(new b({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:u.eH.MenubarEditMenu,group:"1_do",title:o.N({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:u.eH.CommandPalette,group:"",title:o.N("undo","Undo"),order:1}]}));I(new y(T,{id:"default:undo",precondition:void 0}));const R=I(new b({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:u.eH.MenubarEditMenu,group:"1_do",title:o.N({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:u.eH.CommandPalette,group:"",title:o.N("redo","Redo"),order:1}]}));I(new y(R,{id:"default:redo",precondition:void 0}));const O=I(new b({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:u.eH.MenubarSelectionMenu,group:"1_basic",title:o.N({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:u.eH.CommandPalette,group:"",title:o.N("selectAll","Select All"),order:1}]}))},6007:(e,t,i)=>{"use strict";i.d(t,{vu:()=>s,fo:()=>a,Gl:()=>l});var n=i(2065),o=i(666),r=i(8401);const s=(0,n.yh)("IWorkspaceEditService");class a{constructor(e){this.metadata=e}static convert(e){return e.edits.map((e=>{if(t=e,(0,r.Kn)(t)&&o.o.isUri(t.resource)&&(0,r.Kn)(t.edit))return new l(e.resource,e.edit,e.modelVersionId,e.metadata);var t;if(function(e){return(0,r.Kn)(e)&&(Boolean(e.newUri)||Boolean(e.oldUri))}(e))return new c(e.oldUri,e.newUri,e.options,e.metadata);throw new Error("Unsupported edit")}))}}class l extends a{constructor(e,t,i,n){super(n),this.resource=e,this.textEdit=t,this.versionId=i}}class c extends a{constructor(e,t,i,n){super(n),this.oldResource=e,this.newResource=t,this.options=i}}},1640:(e,t,i)=>{"use strict";i.d(t,{$:()=>n});const n=(0,i(2065).yh)("codeEditorService")},2073:(e,t,i)=>{"use strict";i.d(t,{Gm:()=>Gn});var n=i(6479),o=i(6830);let r=class{constructor(e,t){}dispose(){}};var s,a;r.ID="editor.contrib.markerDecorations",r=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(s=1,a=n.i,function(e,t){a(e,t,s)})],r),(0,o._K)(r.ID,r);var l=i(3580),c=i(5321),u=i(7301),h=i(4669),d=i(5976),g=i(6663),f=i(9052),p=i(1640),m=i(6268),_=i(3860),v=i(8626),b=i(1432),y=i(553),w=i(3938),C=i(5393),S=i(7974);class x{constructor(e,t){this.x=e,this.y=t}toClientCoordinates(){return new k(this.x-c.DI.scrollX,this.y-c.DI.scrollY)}}class k{constructor(e,t){this.clientX=e,this.clientY=t}toPageCoordinates(){return new x(this.clientX+c.DI.scrollX,this.clientY+c.DI.scrollY)}}class D{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n}}function L(e){const t=c.i(e);return new D(t.left,t.top,t.width,t.height)}class N extends w.n{constructor(e,t){super(e),this.pos=new x(this.posx,this.posy),this.editorPos=L(t)}}class E{constructor(e){this._editorViewDomNode=e}_create(e){return new N(e,this._editorViewDomNode)}onContextMenu(e,t){return c.nm(e,"contextmenu",(e=>{t(this._create(e))}))}onMouseUp(e,t){return c.nm(e,"mouseup",(e=>{t(this._create(e))}))}onMouseDown(e,t){return c.nm(e,"mousedown",(e=>{t(this._create(e))}))}onMouseLeave(e,t){return c.j_(e,(e=>{t(this._create(e))}))}onMouseMoveThrottled(e,t,i,n){return c.Y_(e,"mousemove",t,((e,t)=>i(e,this._create(t))),n)}}class A{constructor(e){this._editorViewDomNode=e}_create(e){return new N(e,this._editorViewDomNode)}onPointerUp(e,t){return c.nm(e,"pointerup",(e=>{t(this._create(e))}))}onPointerDown(e,t){return c.nm(e,"pointerdown",(e=>{t(this._create(e))}))}onPointerLeave(e,t){return c.RE(e,(e=>{t(this._create(e))}))}onPointerMoveThrottled(e,t,i,n){return c.Y_(e,"pointermove",t,((e,t)=>i(e,this._create(t))),n)}}class M extends d.JT{constructor(e){super(),this._editorViewDomNode=e,this._globalMouseMoveMonitor=this._register(new S.Z),this._keydownListener=null}startMonitoring(e,t,i,n,o){this._keydownListener=c.mu(document,"keydown",(e=>{e.toKeybinding().isModifierKey()||this._globalMouseMoveMonitor.stopMonitoring(!0,e.browserEvent)}),!0),this._globalMouseMoveMonitor.startMonitoring(e,t,((e,t)=>i(e,new N(t,this._editorViewDomNode))),n,(e=>{this._keydownListener.dispose(),o(e)}))}stopMonitoring(){this._globalMouseMoveMonitor.stopMonitoring(!0)}}class I extends d.JT{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let i=0,n=e.length;i=a?o=Math.max(o,a+l-n):(t[i++]=new P(n,o),n=a,o=l)}return t[i++]=new P(n,o),t}static _createHorizontalRangesFromClientRects(e,t){if(!e||0===e.length)return null;const i=[];for(let n=0,o=e.length;na)return null;if((t=Math.min(a,Math.max(0,t)))===(n=Math.min(a,Math.max(0,n)))&&i===o&&0===i&&!e.children[t].firstChild){const i=e.children[t].getClientRects();return this._createHorizontalRangesFromClientRects(i,r)}t!==n&&n>0&&0===o&&(n--,o=1073741824);let l=e.children[t].firstChild,c=e.children[n].firstChild;if(l&&c||(!l&&0===i&&t>0&&(l=e.children[t-1].firstChild,i=1073741824),!c&&0===o&&n>0&&(c=e.children[n-1].firstChild,o=1073741824)),!l||!c)return null;i=Math.min(l.textContent.length,Math.max(0,i)),o=Math.min(c.textContent.length,Math.max(0,o));const u=this._readClientRects(l,i,c,o,s);return this._createHorizontalRangesFromClientRects(u,r)}}var H=i(2550),$=i(7736),U=i(2321),j=i(4141);const q=!!b.tY||!(b.IJ||m.vU||m.G6);let K=!0;class G{constructor(e,t){this._domNode=e,this._clientRectDeltaLeft=0,this._clientRectDeltaLeftRead=!1,this.endNode=t}get clientRectDeltaLeft(){return this._clientRectDeltaLeftRead||(this._clientRectDeltaLeftRead=!0,this._clientRectDeltaLeft=this._domNode.getBoundingClientRect().left),this._clientRectDeltaLeft}}class Y{constructor(e,t){this.themeType=t;const i=e.options,n=i.get(40);this.renderWhitespace=i.get(86),this.renderControlCharacters=i.get(80),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(27),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(56),this.stopRenderingLineAfter=i.get(103),this.fontLigatures=i.get(41)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}}class Z{constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=(0,v.X)(e)}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return(this._options.themeType===U.e.HIGH_CONTRAST||"selection"===this._options.renderWhitespace)&&(this._isMaybeInvalid=!0,!0)}renderLine(e,t,i,n){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;const o=i.getViewLineRenderingData(e),r=this._options,s=H.Kp.filter(o.inlineDecorations,e,o.minColumn,o.maxColumn);let a=null;if(r.themeType===U.e.HIGH_CONTRAST||"selection"===this._options.renderWhitespace){const t=i.selections;for(const i of t){if(i.endLineNumbere)continue;const t=i.startLineNumber===e?i.startColumn:o.minColumn,n=i.endLineNumber===e?i.endColumn:o.maxColumn;t');const c=(0,$.d1)(l,n);n.appendASCIIString("");let u=null;return K&&q&&o.isBasicASCII&&r.useMonospaceOptimizations&&0===c.containsForeignElements&&o.content.length<300&&l.lineTokens.getCount()<100&&(u=new X(this._renderedViewLine?this._renderedViewLine.domNode:null,l,c.characterMapping)),u||(u=ee(this._renderedViewLine?this._renderedViewLine.domNode:null,l,c.characterMapping,c.containsRTL,c.containsForeignElements)),this._renderedViewLine=u,!0}layoutLine(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(){return this._renderedViewLine?this._renderedViewLine.getWidth():0}getWidthIsFast(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()}needsMonospaceFontCheck(){return!!this._renderedViewLine&&this._renderedViewLine instanceof X}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof X?this._renderedViewLine.monospaceAssumptionsAreValid():K}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof X&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,i){if(!this._renderedViewLine)return null;e|=0,t|=0,e=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,e)),t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t));const n=0|this._renderedViewLine.input.stopRenderingLineAfter;let o=!1;-1!==n&&e>n+1&&t>n+1&&(o=!0),-1!==n&&e>n+1&&(e=n+1),-1!==n&&t>n+1&&(t=n+1);const r=this._renderedViewLine.getVisibleRangesForRange(e,t,i);return r&&r.length>0?new z(o,r):null}getColumnOfNodeOffset(e,t,i){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t,i):1}}Z.CLASS_NAME="view-line";class X{constructor(e,t,i){this.domNode=e,this.input=t,this._characterMapping=i,this._charWidth=t.spaceWidth}getWidth(){return this._getCharPosition(this._characterMapping.length)}getWidthIsFast(){return!0}monospaceAssumptionsAreValid(){if(!this.domNode)return K;const e=this.getWidth(),t=this.domNode.domNode.firstChild.offsetWidth;return Math.abs(e-t)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),K=!1),K}toSlowRenderedLine(){return ee(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,i){const n=this._getCharPosition(e),o=this._getCharPosition(t);return[new P(n,o-n)]}_getCharPosition(e){const t=this._characterMapping.getAbsoluteOffsets();return 0===t.length?0:Math.round(this._charWidth*t[e-1])}getColumnOfNodeOffset(e,t,i){const n=t.textContent.length;let o=-1;for(;t;)t=t.previousSibling,o++;return this._characterMapping.partDataToCharOffset(o,n,i)+1}}class Q{constructor(e,t,i,n,o){if(this.domNode=e,this.input=t,this._characterMapping=i,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=o,this._cachedWidth=-1,this._pixelOffsetCache=null,!n||0===this._characterMapping.length){this._pixelOffsetCache=new Int32Array(Math.max(2,this._characterMapping.length+1));for(let e=0,t=this._characterMapping.length;e<=t;e++)this._pixelOffsetCache[e]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),this._cachedWidth):0}getWidthIsFast(){return-1!==this._cachedWidth}getVisibleRangesForRange(e,t,i){if(!this.domNode)return null;if(null!==this._pixelOffsetCache){const n=this._readPixelOffset(this.domNode,e,i);if(-1===n)return null;const o=this._readPixelOffset(this.domNode,t,i);return-1===o?null:[new P(n,o-n)]}return this._readVisibleRangesForRange(this.domNode,e,t,i)}_readVisibleRangesForRange(e,t,i,n){if(t===i){const i=this._readPixelOffset(e,t,n);return-1===i?null:[new P(i,0)]}return this._readRawVisibleRangesForRange(e,t,i,n)}_readPixelOffset(e,t,i){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth();const t=this._getReadingTarget(e);return t.firstChild?t.firstChild.offsetWidth:0}if(null!==this._pixelOffsetCache){const n=this._pixelOffsetCache[t];if(-1!==n)return n;const o=this._actualReadPixelOffset(e,t,i);return this._pixelOffsetCache[t]=o,o}return this._actualReadPixelOffset(e,t,i)}_actualReadPixelOffset(e,t,i){if(0===this._characterMapping.length){const t=V.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,i.clientRectDeltaLeft,i.endNode);return t&&0!==t.length?t[0].left:-1}if(t===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth();const n=this._characterMapping.charOffsetToPartData(t-1),o=$.fH.getPartIndex(n),r=$.fH.getCharIndex(n),s=V.readHorizontalRanges(this._getReadingTarget(e),o,r,o,r,i.clientRectDeltaLeft,i.endNode);if(!s||0===s.length)return-1;const a=s[0].left;if(this.input.isBasicASCII){const e=this._characterMapping.getAbsoluteOffsets(),i=Math.round(this.input.spaceWidth*e[t-1]);if(Math.abs(i-a)<=1)return i}return a}_readRawVisibleRangesForRange(e,t,i,n){if(1===t&&i===this._characterMapping.length)return[new P(0,this.getWidth())];const o=this._characterMapping.charOffsetToPartData(t-1),r=$.fH.getPartIndex(o),s=$.fH.getCharIndex(o),a=this._characterMapping.charOffsetToPartData(i-1),l=$.fH.getPartIndex(a),c=$.fH.getCharIndex(a);return V.readHorizontalRanges(this._getReadingTarget(e),r,s,l,c,n.clientRectDeltaLeft,n.endNode)}getColumnOfNodeOffset(e,t,i){const n=t.textContent.length;let o=-1;for(;t;)t=t.previousSibling,o++;return this._characterMapping.partDataToCharOffset(o,n,i)+1}}class J extends Q{_readVisibleRangesForRange(e,t,i,n){const o=super._readVisibleRangesForRange(e,t,i,n);if(!o||0===o.length||t===i||1===t&&i===this._characterMapping.length)return o;if(!this.input.containsRTL){const t=this._readPixelOffset(e,i,n);if(-1!==t){const e=o[o.length-1];e.left=4&&3===e[0]&&7===e[3]}static isStrictChildOfViewLines(e){return e.length>4&&3===e[0]&&7===e[3]}static isChildOfScrollableElement(e){return e.length>=2&&3===e[0]&&5===e[1]}static isChildOfMinimap(e){return e.length>=2&&3===e[0]&&8===e[1]}static isChildOfContentWidgets(e){return e.length>=4&&3===e[0]&&1===e[3]}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&2===e[0]}static isChildOfOverlayWidgets(e){return e.length>=2&&3===e[0]&&4===e[1]}}class he{constructor(e,t,i){this.model=e.model;const n=e.configuration.options;this.layoutInfo=n.get(128),this.viewDomNode=t.viewDomNode,this.lineHeight=n.get(56),this.stickyTabStops=n.get(102),this.typicalHalfwidthCharacterWidth=n.get(40).typicalHalfwidthCharacterWidth,this.lastRenderData=i,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return he.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){const i=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(i){const n=i.verticalOffset+i.height/2,o=e.model.getLineCount();let r,s=null,a=null;return i.afterLineNumber!==o&&(a=new ie.L(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(s=new ie.L(i.afterLineNumber,e.model.getLineMaxColumn(i.afterLineNumber))),r=null===a?s:null===s?a:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,pe._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}{constructor(e,t,i,n){super(e,t,i),this._ctx=e,n?(this.target=n,this.targetPath=R.collect(n,e.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\n\ttarget: ${this.target?this.target.outerHTML:null}`}fulfill(e,t=null,i=null,n=null){let o=this.mouseColumn;return t&&t.columnr.contentLeft+r.width)continue;const i=e.getVerticalOffsetForLineNumber(r.position.lineNumber);if(i<=o&&o<=i+r.height)return t.fulfill(6,r.position,null,{mightBeForeignElement:!1})}}return null}static _hitTestViewZone(e,t){const i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){const e=t.isInContentArea?8:5;return t.fulfill(e,i.position,null,i)}return null}static _hitTestTextArea(e,t){return ue.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfill(6,e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1}):t.fulfill(1,e.lastRenderData.lastTextareaPosition):null}static _hitTestMargin(e,t){if(t.isInMarginArea){const i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition();let o=Math.abs(t.pos.x-t.editorPos.x);const r={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:o};return o-=e.layoutInfo.glyphMarginLeft,o<=e.layoutInfo.glyphMarginWidth?t.fulfill(2,n,i.range,r):(o-=e.layoutInfo.glyphMarginWidth,o<=e.layoutInfo.lineNumbersWidth?t.fulfill(3,n,i.range,r):(o-=e.layoutInfo.lineNumbersWidth,t.fulfill(4,n,i.range,r)))}return null}static _hitTestViewLines(e,t,i){if(!ue.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfill(7,new ie.L(1,1),null,ge);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const i=e.model.getLineCount(),n=e.model.getLineMaxColumn(i);return t.fulfill(7,new ie.L(i,n),null,ge)}if(i){if(ue.isStrictChildOfViewLines(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(0===e.model.getLineLength(i)){const n=e.getLineWidth(i),o=fe(t.mouseContentHorizontalOffset-n);return t.fulfill(7,new ie.L(i,1),null,o)}const n=e.getLineWidth(i);if(t.mouseContentHorizontalOffset>=n){const o=fe(t.mouseContentHorizontalOffset-n),r=new ie.L(i,e.model.getLineMaxColumn(i));return t.fulfill(7,r,null,o)}}return t.fulfill(0)}const n=pe._doHitTest(e,t);return 1===n.type?pe.createMouseTargetFromHitTestPosition(e,t,n.spanNode,n.position):this._createMouseTarget(e,t.withTarget(n.hitTarget),!0)}static _hitTestMinimap(e,t){if(ue.isChildOfMinimap(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(i);return t.fulfill(11,new ie.L(i,n))}return null}static _hitTestScrollbarSlider(e,t){if(ue.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){const i=t.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(i);return t.fulfill(11,new ie.L(i,n))}}return null}static _hitTestScrollbar(e,t){if(ue.isChildOfScrollableElement(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(i);return t.fulfill(11,new ie.L(i,n))}return null}getMouseColumn(e,t){const i=this._context.configuration.options,n=i.get(128),o=this._context.viewLayout.getCurrentScrollLeft()+t.x-e.x-n.contentLeft;return pe._getMouseColumn(o,i.get(40).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){return e<0?1:Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,i,n){const o=n.lineNumber,r=n.column,s=e.getLineWidth(o);if(t.mouseContentHorizontalOffset>s){const e=fe(t.mouseContentHorizontalOffset-s);return t.fulfill(7,n,null,e)}const a=e.visibleRangeForPosition(o,r);if(!a)return t.fulfill(0,n);const l=a.left;if(t.mouseContentHorizontalOffset===l)return t.fulfill(6,n,null,{mightBeForeignElement:!1});const c=[];if(c.push({offset:a.left,column:r}),r>1){const t=e.visibleRangeForPosition(o,r-1);t&&c.push({offset:t.left,column:r-1})}if(re.offset-t.offset));const u=t.pos.toClientCoordinates(),h=i.getBoundingClientRect(),d=h.left<=u.clientX&&u.clientX<=h.right;for(let e=1;e=t.editorPos.y+e.layoutInfo.height&&(o=t.editorPos.y+e.layoutInfo.height-1);const r=new x(t.pos.x,o),s=this._actualDoHitTestWithCaretRangeFromPoint(e,r.toClientCoordinates());return 1===s.type?s:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const i=c.Ay(e.viewDomNode);let n;if(n=i?void 0===i.caretRangeFromPoint?function(e,t,i){const n=document.createRange();let o=e.elementFromPoint(t,i);if(null!==o){for(;o&&o.firstChild&&o.firstChild.nodeType!==o.firstChild.TEXT_NODE&&o.lastChild&&o.lastChild.firstChild;)o=o.lastChild;const e=o.getBoundingClientRect(),i=window.getComputedStyle(o,null).getPropertyValue("font"),r=o.innerText;let s,a=e.left,l=0;if(t>e.left+e.width)l=r.length;else{const e=me.getInstance();for(let n=0;nthis._createMouseTarget(e,t)),(e=>this._getMouseColumn(e)))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(128).height;const n=new E(this.viewHelper.viewDomNode);this._register(n.onContextMenu(this.viewHelper.viewDomNode,(e=>this._onContextMenu(e,!0)))),this._register(n.onMouseMoveThrottled(this.viewHelper.viewDomNode,(e=>this._onMouseMove(e)),ve(this.mouseTargetFactory),be.MOUSE_MOVE_MINIMUM_TIME)),this._register(n.onMouseUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onMouseLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e)))),this._register(n.onMouseDown(this.viewHelper.viewDomNode,(e=>this._onMouseDown(e)))),this._register(c.nm(this.viewHelper.viewDomNode,c.tw.MOUSE_WHEEL,(e=>{if(this.viewController.emitMouseWheel(e),!this._context.configuration.options.get(65))return;const t=new w.q(e);if(b.dz?(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey:e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey){const e=_e.C.getZoomLevel(),i=t.deltaY>0?1:-1;_e.C.setZoomLevel(e+i),t.preventDefault(),t.stopPropagation()}}),{capture:!0,passive:!1})),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(128)){const e=this._context.configuration.options.get(128).height;this._height!==e&&(this._height=e,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}onScrollChanged(e){return this._mouseDownOperation.onScrollChanged(),!1}getTargetAtClientPoint(e,t){const i=new k(e,t).toPageCoordinates(),n=L(this.viewHelper.viewDomNode);return i.yn.y+n.height||i.xn.x+n.width?null:this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),n,i,null)}_createMouseTarget(e,t){return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,t?e.target:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.editorPos,e.pos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){this._mouseDownOperation.isActive()||e.timestamp{e.preventDefault(),this.viewHelper.focusTextArea()};if(l&&(i||o&&r))c(),this._mouseDownOperation.start(t.type,e);else if(n)e.preventDefault();else if(s){const i=t.detail;this.viewHelper.shouldSuppressMouseDownOnViewZone(i.viewZoneId)&&(c(),this._mouseDownOperation.start(t.type,e),e.preventDefault())}else a&&this.viewHelper.shouldSuppressMouseDownOnWidget(t.detail)&&(c(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:t})}}be.MOUSE_MOVE_MINIMUM_TIME=100;class ye extends d.JT{constructor(e,t,i,n,o){super(),this._context=e,this._viewController=t,this._viewHelper=i,this._createMouseTarget=n,this._getMouseColumn=o,this._mouseMoveMonitor=this._register(new M(this._viewHelper.viewDomNode)),this._onScrollTimeout=this._register(new C._F),this._mouseState=new we,this._currentSelection=new _.Y(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);const t=this._findMousePosition(e,!0);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):this._dispatchMouse(t,!0))}start(e,t){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(3===e),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const i=this._findMousePosition(t,!0);if(!i||!i.position)return;this._mouseState.trySetCount(t.detail,i.position),t.detail=this._mouseState.count;const n=this._context.configuration.options;if(!n.get(78)&&n.get(29)&&!n.get(16)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&6===i.type&&i.position&&this._currentSelection.containsPosition(i.position))return this._mouseState.isDragAndDrop=!0,this._isActive=!0,void this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,ve(null),(e=>this._onMouseDownThenMove(e)),(e=>{const t=this._findMousePosition(this._lastMouseEvent,!0);e&&e instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:t?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()}));this._mouseState.isDragAndDrop=!1,this._dispatchMouse(i,t.shiftKey),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,ve(null),(e=>this._onMouseDownThenMove(e)),(()=>this._stop())))}_stop(){this._isActive=!1,this._onScrollTimeout.cancel()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onScrollChanged(){this._isActive&&this._onScrollTimeout.setIfNotSet((()=>{if(!this._lastMouseEvent)return;const e=this._findMousePosition(this._lastMouseEvent,!1);e&&(this._mouseState.isDragAndDrop||this._dispatchMouse(e,!0))}),10)}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const t=e.editorPos,i=this._context.model,n=this._context.viewLayout,o=this._getMouseColumn(e);if(e.posyt.y+t.height){const r=n.getCurrentScrollTop()+(e.posy-t.y),s=he.getZoneAtCoord(this._context,r);if(s){const e=this._helpPositionJumpOverViewZone(s);if(e)return new ce(null,13,o,e)}const a=n.getLineNumberAtVerticalOffset(r);return new ce(null,13,o,new ie.L(a,i.getLineMaxColumn(a)))}const r=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+(e.posy-t.y));return e.posxt.x+t.width?new ce(null,13,o,new ie.L(r,i.getLineMaxColumn(r))):null}_findMousePosition(e,t){const i=this._getPositionOutsideEditor(e);if(i)return i;const n=this._createMouseTarget(e,t);if(!n.position)return null;if(8===n.type||5===n.type){const e=this._helpPositionJumpOverViewZone(n.detail);if(e)return new ce(n.element,n.type,n.mouseColumn,e,null,n.detail)}return n}_helpPositionJumpOverViewZone(e){const t=new ie.L(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,n=e.positionAfter;return i&&n?i.isBefore(t)?i:n:null}_dispatchMouse(e,t){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton})}}class we{constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){const i=(new Date).getTime();i-this._lastSetMouseDownCountTime>we.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=i,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}we.CLEAR_MOUSE_DOWN_COUNT_TIME=400;var Ce=i(161),Se=i(5715);class xe extends be{constructor(e,t,i){super(e,t,i),this._register(y.o.addTarget(this.viewHelper.linesContentDomNode)),this._register(c.nm(this.viewHelper.linesContentDomNode,y.t.Tap,(e=>this.onTap(e)))),this._register(c.nm(this.viewHelper.linesContentDomNode,y.t.Change,(e=>this.onChange(e)))),this._register(c.nm(this.viewHelper.linesContentDomNode,y.t.Contextmenu,(e=>this._onContextMenu(new N(e,this.viewHelper.viewDomNode),!1)))),this._lastPointerType="mouse",this._register(c.nm(this.viewHelper.linesContentDomNode,"pointerdown",(e=>{const t=e.pointerType;this._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"})));const n=new A(this.viewHelper.viewDomNode);this._register(n.onPointerMoveThrottled(this.viewHelper.viewDomNode,(e=>this._onMouseMove(e)),ve(this.mouseTargetFactory),be.MOUSE_MOVE_MINIMUM_TIME)),this._register(n.onPointerUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e)))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,(e=>this._onMouseDown(e))))}onTap(e){if(!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget))return;e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new N(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1})}onChange(e){"touch"===this._lastPointerType&&this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}_onMouseDown(e){"touch"!==e.browserEvent.pointerType&&super._onMouseDown(e)}}class ke extends be{constructor(e,t,i){super(e,t,i),this._register(y.o.addTarget(this.viewHelper.linesContentDomNode)),this._register(c.nm(this.viewHelper.linesContentDomNode,y.t.Tap,(e=>this.onTap(e)))),this._register(c.nm(this.viewHelper.linesContentDomNode,y.t.Change,(e=>this.onChange(e)))),this._register(c.nm(this.viewHelper.linesContentDomNode,y.t.Contextmenu,(e=>this._onContextMenu(new N(e,this.viewHelper.viewDomNode),!1))))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new N(e,this.viewHelper.viewDomNode),!1);if(t.position){const e=document.createEvent("CustomEvent");e.initEvent(Se.pd.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(e),this.viewController.moveTo(t.position)}}onChange(e){this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}}class De extends d.JT{constructor(e,t,i){super(),b.gn&&Ce.D.pointerEvents?this.handler=this._register(new xe(e,t,i)):window.TouchEvent?this.handler=this._register(new ke(e,t,i)):this.handler=this._register(new be(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}var Le=i(7295),Ne=i(5887);class Ee extends I{}var Ae=i(7869),Me=i(7781);class Ie extends Ee{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new ie.L(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(56);const t=e.get(57);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(82);const i=e.get(128);this._lineNumbersLeft=i.lineNumbersLeft,this._lineNumbersWidth=i.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(t);let i=!1;return this._activeLineNumber!==t.lineNumber&&(this._activeLineNumber=t.lineNumber,i=!0),2!==this._renderLineNumbers&&3!==this._renderLineNumbers||(i=!0),i}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getLineRenderLineNumber(e){const t=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new ie.L(e,1));if(1!==t.column)return"";const i=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(2===this._renderLineNumbers){const e=Math.abs(this._lastCursorModelPosition.lineNumber-i);return 0===e?''+i+"":String(e)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===i||i%10==0?String(i):"":String(i)}prepareRender(e){if(0===this._renderLineNumbers)return void(this._renderResult=null);const t=b.IJ?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,o='
    ',r=this._context.model.getLineCount(),s=[];for(let e=i;e<=n;e++){const n=e-i;if(!this._renderFinalNewline&&e===r&&0===this._context.model.getLineLength(e)){s[n]="";continue}const a=this._getLineRenderLineNumber(e);a?e===this._activeLineNumber?s[n]='
    '+a+"
    ":s[n]=o+a+"
    ":s[n]=""}this._renderResult=s}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}Ie.CLASS_NAME="line-numbers",(0,Me.Ic)(((e,t)=>{const i=e.getColor(Ae.hw);i&&t.addRule(`.monaco-editor .line-numbers { color: ${i}; }`);const n=e.getColor(Ae.DD);n&&t.addRule(`.monaco-editor .line-numbers.active-line-number { color: ${n}; }`)}));class Te extends T{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(128);this._canUseLayerHinting=!t.get(26),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._domNode=(0,v.X)(document.createElement("div")),this._domNode.setClassName(Te.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=(0,v.X)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(Te.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(128);return this._canUseLayerHinting=!t.get(26),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);const i=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(i),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(i)}}Te.CLASS_NAME="glyph-margin",Te.OUTER_CLASS_NAME="margin";var Re=i(9410),Oe=i(6542);class Fe{constructor(e,t,i){this.top=e,this.left=t,this.width=i}setWidth(e){return new Fe(this.top,this.left,e)}}const Pe=m.vU;class Be extends T{constructor(e,t,i){super(e),this._primaryCursorPosition=new ie.L(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._viewHelper=i,this._scrollLeft=0,this._scrollTop=0;const n=this._context.configuration.options,o=n.get(128);this._setAccessibilityOptions(n),this._contentLeft=o.contentLeft,this._contentWidth=o.contentWidth,this._contentHeight=o.height,this._fontInfo=n.get(40),this._lineHeight=n.get(56),this._emptySelectionClipboard=n.get(30),this._copyWithSyntaxHighlighting=n.get(19),this._visibleTextArea=null,this._selections=[new _.Y(1,1,1,1)],this._modelSelections=[new _.Y(1,1,1,1)],this._lastRenderPosition=null,this.textArea=(0,v.X)(document.createElement("textarea")),R.write(this.textArea,6),this.textArea.setClassName(`inputarea ${Oe.S}`),this.textArea.setAttribute("wrap","off"),this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(n)),this.textArea.setAttribute("tabindex",String(n.get(110))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",l.N("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),n.get(28)&&n.get(78)&&this.textArea.setAttribute("readonly","true"),this.textAreaCover=(0,v.X)(document.createElement("div")),this.textAreaCover.setPosition("absolute");const r={getLineCount:()=>this._context.model.getLineCount(),getLineMaxColumn:e=>this._context.model.getLineMaxColumn(e),getValueInRange:(e,t)=>this._context.model.getValueInRange(e,t)},s={getDataToCopy:e=>{const t=this._context.model.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,b.ED),i=this._context.model.getEOL(),n=this._emptySelectionClipboard&&1===this._modelSelections.length&&this._modelSelections[0].isEmpty(),o=Array.isArray(t)?t:null,r=Array.isArray(t)?t.join(i):t;let s,a=null;if(e&&(Se.RA.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&r.length<65536)){const e=this._context.model.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);e&&(s=e.html,a=e.mode)}return{isFromEmptySelection:n,multicursorText:o,text:r,html:s,mode:a}},getScreenReaderContent:e=>{if(1===this._accessibilitySupport){if(b.dz){const e=this._selections[0];if(e.isEmpty()){const t=e.getStartPosition();let i=this._getWordBeforePosition(t);if(0===i.length&&(i=this._getCharacterBeforePosition(t)),i.length>0)return new Ne.un(i,i.length,i.length,t,t)}}return Ne.un.EMPTY}if(m.Dt){const e=this._selections[0];if(e.isEmpty()){const t=e.getStartPosition(),[i,n]=this._getAndroidWordAtPosition(t);if(i.length>0)return new Ne.un(i,n,n,t,t)}return Ne.un.EMPTY}return Ne.ee.fromEditorSelection(e,r,this._selections[0],this._accessibilityPageSize,0===this._accessibilitySupport)},deduceModelPosition:(e,t,i)=>this._context.model.deduceModelPositionRelativeToViewPosition(e,t,i)};this._textAreaInput=this._register(new Se.Fz(s,this.textArea)),this._register(this._textAreaInput.onKeyDown((e=>{this._viewController.emitKeyDown(e)}))),this._register(this._textAreaInput.onKeyUp((e=>{this._viewController.emitKeyUp(e)}))),this._register(this._textAreaInput.onPaste((e=>{let t=!1,i=null,n=null;e.metadata&&(t=this._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection,i=void 0!==e.metadata.multicursorText?e.metadata.multicursorText:null,n=e.metadata.mode),this._viewController.paste(e.text,t,i,n)}))),this._register(this._textAreaInput.onCut((()=>{this._viewController.cut()}))),this._register(this._textAreaInput.onType((e=>{e.replacePrevCharCnt||e.replaceNextCharCnt||e.positionDelta?(Ne.al&&console.log(` => compositionType: <<${e.text}>>, ${e.replacePrevCharCnt}, ${e.replaceNextCharCnt}, ${e.positionDelta}`),this._viewController.compositionType(e.text,e.replacePrevCharCnt,e.replaceNextCharCnt,e.positionDelta)):(Ne.al&&console.log(` => type: <<${e.text}>>`),this._viewController.type(e.text))}))),this._register(this._textAreaInput.onSelectionChangeRequest((e=>{this._viewController.setSelection(e)}))),this._register(this._textAreaInput.onCompositionStart((e=>{const t=this._selections[0].startLineNumber,i=this._selections[0].startColumn+e.revealDeltaColumns;this._context.model.revealRange("keyboard",!0,new ne.e(t,i,t,i),0,1);const n=this._viewHelper.visibleRangeForPositionRelativeToEditor(t,i);n&&(this._visibleTextArea=new Fe(this._context.viewLayout.getVerticalOffsetForLineNumber(t),n.left,Pe?0:1),this._render()),this.textArea.setClassName(`inputarea ${Oe.S} ime-input`),this._viewController.compositionStart(),this._context.model.onCompositionStart()}))),this._register(this._textAreaInput.onCompositionUpdate((e=>{this._visibleTextArea&&(this._visibleTextArea=this._visibleTextArea.setWidth(function(e,t){const i=document.createElement("canvas").getContext("2d");var n;i.font=("normal",`normal normal ${(n=t).fontWeight} ${n.fontSize}px / ${n.lineHeight}px ${n.fontFamily}`);const o=i.measureText(e);return m.vU?o.width+2:o.width}(e.data,this._fontInfo)),this._render())}))),this._register(this._textAreaInput.onCompositionEnd((()=>{this._visibleTextArea=null,this._render(),this.textArea.setClassName(`inputarea ${Oe.S}`),this._viewController.compositionEnd(),this._context.model.onCompositionEnd()}))),this._register(this._textAreaInput.onFocus((()=>{this._context.model.setHasFocus(!0)}))),this._register(this._textAreaInput.onBlur((()=>{this._context.model.setHasFocus(!1)})))}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t=this._context.model.getLineContent(e.lineNumber),i=(0,Re.u)('`~!@#$%^&*()-=+[{]}\\|;:",.<>/?');let n=!0,o=e.column,r=!0,s=e.column,a=0;for(;a<50&&(n||r);){if(n&&o<=1&&(n=!1),n){const e=t.charCodeAt(o-2);0!==i.get(e)?n=!1:o--}if(r&&s>t.length&&(r=!1),r){const e=t.charCodeAt(s-1);0!==i.get(e)?r=!1:s++}a++}return[t.substring(o-1,s-1),e.column-o]}_getWordBeforePosition(e){const t=this._context.model.getLineContent(e.lineNumber),i=(0,Re.u)(this._context.configuration.options.get(114));let n=e.column,o=0;for(;n>1;){const r=t.charCodeAt(n-2);if(0!==i.get(r)||o>50)return t.substring(n-1,e.column-1);o++,n--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const t=this._context.model.getLineContent(e.lineNumber).charAt(e.column-2);if(!Le.ZG(t.charCodeAt(0)))return t}return""}_getAriaLabel(e){return 1===e.get(2)?l.N("accessibilityOffAriaLabel","The editor is not accessible at this time. Press {0} for options.",b.IJ?"Shift+Alt+F1":"Alt+F1"):e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);2===this._accessibilitySupport&&t===j.BH.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(128);return this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(40),this._lineHeight=t.get(56),this._emptySelectionClipboard=t.get(30),this._copyWithSyntaxHighlighting=t.get(19),this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("tabindex",String(t.get(110))),(e.hasChanged(28)||e.hasChanged(78))&&(t.get(28)&&t.get(78)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),e.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}prepareRender(e){this._primaryCursorPosition=new ie.L(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition)}render(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){if(this._visibleTextArea)return void this._renderInsideEditor(null,this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight);if(!this._primaryCursorVisibleRange)return void this._renderAtTopLeft();const e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth)return void this._renderAtTopLeft();const t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;t<0||t>this._contentHeight?this._renderAtTopLeft():b.dz?this._renderInsideEditor(this._primaryCursorPosition,t,e,Pe?0:1,this._lineHeight):this._renderInsideEditor(this._primaryCursorPosition,t,e,Pe?0:1,Pe?0:1)}_renderInsideEditor(e,t,i,n,o){this._lastRenderPosition=e;const r=this.textArea,s=this.textAreaCover;f.V.applyFontInfo(r,this._fontInfo),r.setTop(t),r.setLeft(i),r.setWidth(n),r.setHeight(o),s.setTop(0),s.setLeft(0),s.setWidth(0),s.setHeight(0)}_renderAtTopLeft(){this._lastRenderPosition=null;const e=this.textArea,t=this.textAreaCover;if(f.V.applyFontInfo(e,this._fontInfo),e.setTop(0),e.setLeft(0),t.setTop(0),t.setLeft(0),Pe)return e.setWidth(0),e.setHeight(0),t.setWidth(0),void t.setHeight(0);e.setWidth(1),e.setHeight(1),t.setWidth(1),t.setHeight(1);const i=this._context.configuration.options;i.get(46)?t.setClassName("monaco-editor-background textAreaCover "+Te.OUTER_CLASS_NAME):0!==i.get(57).renderType?t.setClassName("monaco-editor-background textAreaCover "+Ie.CLASS_NAME):t.setClassName("monaco-editor-background textAreaCover")}}var ze=i(8728);class We{constructor(e,t,i,n){this.configuration=e,this.viewModel=t,this.userInputEvents=i,this.commandDelegate=n}paste(e,t,i,n){this.commandDelegate.paste(e,t,i,n)}type(e){this.commandDelegate.type(e)}compositionType(e,t,i,n){this.commandDelegate.compositionType(e,t,i,n)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){ze.CoreNavigationCommands.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position):this._lastCursorLineSelect(e.position):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):2===e.mouseDownCount?this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position):e.inSelectionMode?this._wordSelectDrag(e.position):this._wordSelect(e.position):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey||n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position):this.moveTo(e.position)}_usualArgs(e){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e}}moveTo(e){ze.CoreNavigationCommands.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_moveToSelect(e){ze.CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_columnSelect(e,t,i){e=this._validateViewColumn(e),ze.CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),ze.CoreNavigationCommands.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e){ze.CoreNavigationCommands.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelect(e){ze.CoreNavigationCommands.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelectDrag(e){ze.CoreNavigationCommands.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorWordSelect(e){ze.CoreNavigationCommands.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelect(e){ze.CoreNavigationCommands.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelectDrag(e){ze.CoreNavigationCommands.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelect(e){ze.CoreNavigationCommands.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelectDrag(e){ze.CoreNavigationCommands.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_selectAll(){ze.CoreNavigationCommands.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}class Ve{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){this.onKeyDown&&this.onKeyDown(e)}emitKeyUp(e){this.onKeyUp&&this.onKeyUp(e)}emitContextMenu(e){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(e))}emitMouseMove(e){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(e))}emitMouseDown(e){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(e))}emitMouseUp(e){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){this.onMouseDropCanceled&&this.onMouseDropCanceled()}emitMouseWheel(e){this.onMouseWheel&&this.onMouseWheel(e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return Ve.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){return new He(e.element,e.type,e.mouseColumn,e.position?t.convertViewPositionToModelPosition(e.position):null,e.range?t.convertViewRangeToModelRange(e.range):null,e.detail)}}class He{constructor(e,t,i,n,o,r){this.element=e,this.type=t,this.mouseColumn=i,this.position=n,this.range=o,this.detail=r}toString(){return ce.toString(this)}}var $e,Ue=i(72);class je{constructor(e){this._createLine=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(0===this.getCount())return null;const i=this.getStartLineNumber(),n=this.getEndLineNumber();if(tn)return null;let o=0,r=0;for(let s=i;s<=n;s++){const i=s-this._rendLineNumberStart;e<=s&&s<=t&&(0===r?(o=i,r=1):r++)}if(e=i&&r<=n&&(this._lines[r-this._rendLineNumberStart].onContentChanged(),o=!0);return o}onLinesInserted(e,t){if(0===this.getCount())return null;const i=t-e+1,n=this.getStartLineNumber(),o=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=i,null;if(e>o)return null;if(i+e>o)return this._lines.splice(e-this._rendLineNumberStart,o-e+1);const r=[];for(let e=0;ei)continue;const s=Math.max(t,r.fromLineNumber),a=Math.min(i,r.toLineNumber);for(let e=s;e<=a;e++){const t=e-this._rendLineNumberStart;this._lines[t].onTokensChanged(),n=!0}}return n}}class qe{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new je((()=>this._host.createVisibleLine()))}_createDomNode(){const e=(0,v.X)(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(128)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let e=0,i=t.length;et){const e=t,r=Math.min(i,o.rendLineNumberStart-1);e<=r&&(this._insertLinesBefore(o,e,r,n,t),o.linesLength+=r-e+1)}else if(o.rendLineNumberStart0&&(this._removeLinesBefore(o,e),o.linesLength-=e)}if(o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1i){const e=Math.max(0,i-o.rendLineNumberStart+1),t=o.linesLength-1-e+1;t>0&&(this._removeLinesAfter(o,t),o.linesLength-=t)}return this._finishRendering(o,!1,n),o}_renderUntouchedLines(e,t,i,n,o){const r=e.rendLineNumberStart,s=e.lines;for(let e=t;e<=i;e++){const t=r+e;s[e].layoutLine(t,n[t-o])}}_insertLinesBefore(e,t,i,n,o){const r=[];let s=0;for(let e=t;e<=i;e++)r[s++]=this.host.createVisibleLine();e.lines=r.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i=0;t--){const i=e.lines[t];n[t]&&(i.setDomNode(r),r=r.previousSibling)}}_finishRenderingInvalidLines(e,t,i){const n=document.createElement("div");Ke._ttPolicy&&(t=Ke._ttPolicy.createHTML(t)),n.innerHTML=t;for(let t=0;te}),Ke._sb=(0,Ue.l$)(1e5);class Ge extends T{constructor(e){super(e),this._visibleLines=new qe(this),this.domNode=this._visibleLines.domNode,this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;ee.shouldRender()));for(let i=0,n=t.length;i'),n.appendASCIIString(o),n.appendASCIIString(""),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}class Ze extends Ge{constructor(e){super(e);const t=this._context.configuration.options.get(128);this._contentWidth=t.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const t=this._context.configuration.options.get(128);return this._contentWidth=t.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class Xe extends Ge{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(128);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),f.V.applyFontInfo(this.domNode,t.get(40))}onConfigurationChanged(e){const t=this._context.configuration.options;f.V.applyFontInfo(this.domNode,t.get(40));const i=t.get(128);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class Qe{constructor(e,t){this.top=e,this.left=t}}class Je extends T{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=(0,v.X)(document.createElement("div")),R.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=(0,v.X)(document.createElement("div")),R.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onLineMappingChanged(e);return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}addWidget(e){const t=new et(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,i){this._widgets[e.getId()].setPosition(t,i),this.setShouldRender()}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t];delete this._widgets[t];const i=e.domNode.domNode;i.parentNode.removeChild(i),i.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return!!this._widgets.hasOwnProperty(e)&&this._widgets[e].suppressMouseDown}onBeforeRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onBeforeRender(e)}prepareRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].prepareRender(e)}render(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].render(e)}}class et{constructor(e,t,i){this._context=e,this._viewDomNode=t,this._actual=i,this.domNode=(0,v.X)(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const n=this._context.configuration.options,o=n.get(128);this._fixedOverflowWidgets=n.get(34),this._contentWidth=o.contentWidth,this._contentLeft=o.contentLeft,this._lineHeight=n.get(56),this._range=null,this._viewRange=null,this._preference=[],this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){const t=this._context.configuration.options;if(this._lineHeight=t.get(56),e.hasChanged(128)){const e=t.get(128);this._contentLeft=e.contentLeft,this._contentWidth=e.contentWidth,this._maxWidth=this._getMaxWidth()}}onLineMappingChanged(e){this._setPosition(this._range)}_setPosition(e){if(this._range=e,this._viewRange=null,this._range){const e=this._context.model.validateModelRange(this._range);(this._context.model.coordinatesConverter.modelPositionIsVisible(e.getStartPosition())||this._context.model.coordinatesConverter.modelPositionIsVisible(e.getEndPosition()))&&(this._viewRange=this._context.model.coordinatesConverter.convertModelRangeToViewRange(e))}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth:this._contentWidth}setPosition(e,t){this._setPosition(e),this._preference=t,this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1}_layoutBoxInViewport(e,t,i,n,o){const r=e.top,s=r,a=t.top+this._lineHeight,l=r-n,c=s>=n,u=a,h=o.viewportHeight-a>=n;let d=e.left,g=t.left;return d+i>o.scrollLeft+o.viewportWidth&&(d=o.scrollLeft+o.viewportWidth-i),g+i>o.scrollLeft+o.viewportWidth&&(g=o.scrollLeft+o.viewportWidth-i),dr){const e=s-(r-n);s-=e,i-=e}if(s=22,_=u+n<=h.height-22;return this._fixedOverflowWidgets?{fitsAbove:m,aboveTop:Math.max(l,22),aboveLeft:g,fitsBelow:_,belowTop:u,belowLeft:p}:{fitsAbove:m,aboveTop:r,aboveLeft:d,fitsBelow:_,belowTop:s,belowLeft:f}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new Qe(e.top,e.left+this._contentLeft)}_getTopAndBottomLeft(e){if(!this._viewRange)return[null,null];const t=e.linesVisibleRangesForRange(this._viewRange,!1);if(!t||0===t.length)return[null,null];let i=t[0],n=t[0];for(const e of t)e.lineNumbern.lineNumber&&(n=e);let o=1073741824;for(const e of i.ranges)e.lefte.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData)return this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),void("function"==typeof this._actual.afterRender&&tt(this._actual.afterRender,this._actual,null));this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),"function"==typeof this._actual.afterRender&&tt(this._actual.afterRender,this._actual,this._renderData.position)}}function tt(e,t,...i){try{return e.call(t,...i)}catch(e){return null}}var it=i(9488);let nt=!0;class ot extends Ee{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(128);this._lineHeight=t.get(56),this._renderLineHighlight=t.get(83),this._renderLineHighlightOnlyWhenFocus=t.get(84),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new _.Y(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=nt?this._selections.slice(0,1):this._selections,i=t.map((e=>e.positionLineNumber));i.sort(((e,t)=>e-t)),it.fS(this._cursorLineNumbers,i)||(this._cursorLineNumbers=i,e=!0);const n=t.every((e=>e.isEmpty()));return this._selectionIsEmpty!==n&&(this._selectionIsEmpty=n,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(128);return this._lineHeight=t.get(56),this._renderLineHighlight=t.get(83),this._renderLineHighlightOnlyWhenFocus=t.get(84),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return!!this._renderLineHighlightOnlyWhenFocus&&(this._focused=e.isFocused,!0)}prepareRender(e){if(!this._shouldRenderThis())return void(this._renderData=null);const t=this._renderOne(e),i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,o=this._cursorLineNumbers.length;let r=0;const s=[];for(let e=i;e<=n;e++){const n=e-i;for(;r=this._renderData.length?"":this._renderData[i]}}class rt extends ot{_renderOne(e){return`
    `}_shouldRenderThis(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderOther(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class st extends ot{_renderOne(e){return`
    `}_shouldRenderMargin(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderThis(){return!0}_shouldRenderOther(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}(0,Me.Ic)(((e,t)=>{nt=!1;const i=e.getColor(Ae.Kh);if(i&&(t.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }`)),!i||i.isTransparent()||e.defines(Ae.Mm)){const i=e.getColor(Ae.Mm);i&&(nt=!0,t.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${i}; }`),"hc"===e.type&&(t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}}));class at extends Ee{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(56),this._typicalHalfwidthCharacterWidth=t.get(40).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(56),this._typicalHalfwidthCharacterWidth=t.get(40).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let e=0,o=t.length;e{if(e.options.zIndext.options.zIndex)return 1;const i=e.options.className,n=t.options.className;return in?1:ne.e.compareRangesUsingStarts(e.range,t.range)}));const o=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,s=[];for(let e=o;e<=r;e++)s[e-o]="";this._renderWholeLineDecorations(e,i,s),this._renderNormalDecorations(e,i,s),this._renderResult=s}_renderWholeLineDecorations(e,t,i){const n=String(this._lineHeight),o=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber;for(let e=0,s=t.length;e',l=Math.max(s.range.startLineNumber,o),c=Math.min(s.range.endLineNumber,r);for(let e=l;e<=c;e++)i[e-o]+=a}}_renderNormalDecorations(e,t,i){const n=String(this._lineHeight),o=e.visibleRange.startLineNumber;let r=null,s=!1,a=null;for(let l=0,c=t.length;l';s[l]+=r}}}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}var lt=i(9802);class ct extends T{constructor(e,t,i,n){super(e);const o=this._context.configuration.options,r=o.get(90),s=o.get(64),a=o.get(32),l=o.get(93),u={listenOnDomNode:i.domNode,className:"editor-scrollable "+(0,Me.m6)(e.theme.type),useShadows:!1,lazyRender:!0,vertical:r.vertical,horizontal:r.horizontal,verticalHasArrows:r.verticalHasArrows,horizontalHasArrows:r.horizontalHasArrows,verticalScrollbarSize:r.verticalScrollbarSize,verticalSliderSize:r.verticalSliderSize,horizontalScrollbarSize:r.horizontalScrollbarSize,horizontalSliderSize:r.horizontalSliderSize,handleMouseWheel:r.handleMouseWheel,alwaysConsumeMouseWheel:r.alwaysConsumeMouseWheel,arrowSize:r.arrowSize,mouseWheelScrollSensitivity:s,fastScrollSensitivity:a,scrollPredominantAxis:l,scrollByPage:r.scrollByPage};this.scrollbar=this._register(new lt.$Z(t.domNode,u,this._context.viewLayout.getScrollable())),R.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=(0,v.X)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const h=(e,t,i)=>{const n={};if(t){const t=e.scrollTop;t&&(n.scrollTop=this._context.viewLayout.getCurrentScrollTop()+t,e.scrollTop=0)}if(i){const t=e.scrollLeft;t&&(n.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+t,e.scrollLeft=0)}this._context.model.setScrollPosition(n,1)};this._register(c.nm(i.domNode,"scroll",(e=>h(i.domNode,!0,!0)))),this._register(c.nm(t.domNode,"scroll",(e=>h(t.domNode,!0,!1)))),this._register(c.nm(n.domNode,"scroll",(e=>h(n.domNode,!0,!1)))),this._register(c.nm(this.scrollbarDomNode.domNode,"scroll",(e=>h(this.scrollbarDomNode.domNode,!0,!1))))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(128);this.scrollbarDomNode.setLeft(t.contentLeft),"right"===e.get(62).side?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarMouseDown(e){this.scrollbar.delegateVerticalScrollbarMouseDown(e)}onConfigurationChanged(e){if(e.hasChanged(90)||e.hasChanged(64)||e.hasChanged(32)){const e=this._context.configuration.options,t=e.get(90),i=e.get(64),n=e.get(32),o=e.get(93),r={handleMouseWheel:t.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:n,scrollPredominantAxis:o};this.scrollbar.updateOptions(r)}return e.hasChanged(128)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+(0,Me.m6)(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}class ut{constructor(e,t,i){this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(i)}}class ht extends Ee{_render(e,t,i){const n=[];for(let i=e;i<=t;i++)n[i-e]=[];if(0===i.length)return n;i.sort(((e,t)=>e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className',s=[];for(let e=t;e<=i;e++){const i=e-t,o=n[i];0===o.length?s[i]="":s[i]='
    =this._renderResult.length?"":this._renderResult[i]}}class gt extends Ee{constructor(e){super(),this._context=e,this._primaryLineNumber=0;const t=this._context.configuration.options,i=t.get(129),n=t.get(40);this._lineHeight=t.get(56),this._spaceWidth=n.spaceWidth,this._enabled=t.get(81),this._activeIndentEnabled=t.get(49),this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(129),n=t.get(40);return this._lineHeight=t.get(56),this._spaceWidth=n.spaceWidth,this._enabled=t.get(81),this._activeIndentEnabled=t.get(49),this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){const t=e.selections[0],i=t.isEmpty()?t.positionLineNumber:0;return this._primaryLineNumber!==i&&(this._primaryLineNumber=i,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){if(!this._enabled)return void(this._renderResult=null);const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,{indentSize:n}=this._context.model.getTextModelOptions(),o=n*this._spaceWidth,r=e.scrollWidth,s=this._lineHeight,a=this._context.model.getLinesIndentGuides(t,i);let l=0,c=0,u=0;if(this._activeIndentEnabled&&this._primaryLineNumber){const e=this._context.model.getActiveIndentGuide(this._primaryLineNumber,t,i);l=e.startLineNumber,c=e.endLineNumber,u=e.indent}const h=[];for(let n=t;n<=i;n++){const i=l<=n&&n<=c,d=n-t,g=a[d];let f="";if(g>=1){const t=e.visibleRangeForPosition(new ie.L(n,1));let a=t?t.left:0;for(let e=1;e<=g&&(f+=`
    `,a+=o,!(a>r||this._maxIndentLeft>0&&a>this._maxIndentLeft));e++);}h[d]=f}this._renderResult=h}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}(0,Me.Ic)(((e,t)=>{const i=e.getColor(Ae.tR);i&&t.addRule(`.monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 ${i} inset; }`);const n=e.getColor(Ae.Ym)||i;n&&t.addRule(`.monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 ${n} inset; }`)}));class ft{constructor(){this._currentVisibleRange=new ne.e(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class pt{constructor(e,t,i,n,o,r){this.lineNumber=e,this.startColumn=t,this.endColumn=i,this.startScrollTop=n,this.stopScrollTop=o,this.scrollType=r,this.type="range",this.minLineNumber=e,this.maxLineNumber=e}}class mt{constructor(e,t,i,n){this.selections=e,this.startScrollTop=t,this.stopScrollTop=i,this.scrollType=n,this.type="selections";let o=e[0].startLineNumber,r=e[0].endLineNumber;for(let t=1,i=e.length;t{this._updateLineWidthsSlow()}),200),this._asyncCheckMonospaceFontAssumptions=new C.pY((()=>{this._checkMonospaceFontAssumptions()}),2e3),this._lastRenderedData=new ft,this._horizontalRevealRequest=null}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new Z(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(129)&&(this._maxLineWidth=0);const t=this._context.configuration.options,i=t.get(40),n=t.get(129);return this._lineHeight=t.get(56),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(87),this._cursorSurroundingLines=t.get(23),this._cursorSurroundingLinesStyle=t.get(24),this._canUseLayerHinting=!t.get(26),f.V.applyFontInfo(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(128)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new Y(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const e=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let t=e;t<=i;t++)this._visibleLines.getVisibleLine(t).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=!1;for(let e=t;e<=i;e++)n=this._visibleLines.getVisibleLine(e).onSelectionChanged()||n;return n}onDecorationsChanged(e){{const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.range,e.selections,e.verticalType);if(-1===t)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new pt(e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new mt(e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const n=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.model.setScrollPosition(i,n),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),i=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopi)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.model.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const i=this._getViewLineDomNode(e);if(null===i)return null;const n=this._getLineNumberFor(i);if(-1===n)return null;if(n<1||n>this._context.model.getLineCount())return null;if(1===this._context.model.getLineMaxColumn(n))return new ie.L(n,1);const o=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();if(nr)return null;let s=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(n,e,t);const a=this._context.model.getLineMinColumn(n);return si?-1:this._visibleLines.getVisibleLine(e).getWidth()}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const i=e.endLineNumber,n=ne.e.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;let o=[],r=0;const s=new G(this.domNode.domNode,this._textRangeRestingSpot);let a=0;t&&(a=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new ie.L(n.startLineNumber,1)).lineNumber);const l=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let e=n.startLineNumber;e<=n.endLineNumber;e++){if(ec)continue;const u=e===n.startLineNumber?n.startColumn:1,h=e===n.endLineNumber?n.endColumn:this._context.model.getLineMaxColumn(e),d=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(u,h,s);if(d){if(t&&ethis._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(t,i,new G(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new B(t.outsideRenderedLine,t.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=1,o=!0;for(let r=t;r<=i;r++){const t=this._visibleLines.getVisibleLine(r);!e||t.getWidthIsFast()?n=Math.max(n,t.getWidth()):o=!1}return o&&1===t&&i===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),o}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let o=i;o<=n;o++){const i=this._visibleLines.getVisibleLine(o);if(i.needsMonospaceFontCheck()){const n=i.getWidth();n>t&&(t=n,e=o)}}if(-1!==e&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let e=i;e<=n;e++)this._visibleLines.getVisibleLine(e).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const t=this._horizontalRevealRequest;if(e.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const e=this._computeScrollLeftToReveal(t);e&&(this._isViewportWrapping||this._ensureMaxLineWidth(e.maxHorizontalOffset),this._context.model.setScrollPosition({scrollLeft:e.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),b.IJ&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)if(this._visibleLines.getVisibleLine(i).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const t=Math.ceil(e);this._maxLineWidth0){let e=n[0].startLineNumber,t=n[0].endLineNumber;for(let i=1,o=n.length;is){if(!l)return-1;h=c}else if(5===o||6===o)if(6===o&&r<=c&&u<=a)h=r;else{const e=c-Math.max(5*this._lineHeight,.2*s),t=u-s;h=Math.max(t,e)}else if(1===o||2===o)if(2===o&&r<=c&&u<=a)h=r;else{const e=(c+u)/2;h=Math.max(0,e-s/2)}else h=this._computeMinimumScrolling(r,a,c,u,3===o,4===o);return h}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),i=t.left,n=i+t.width;let o=1073741824,r=0;if("range"===e.type){const t=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!t)return null;for(const e of t.ranges)o=Math.min(o,e.left),r=Math.max(r,e.left+e.width)}else for(const t of e.selections){if(t.startLineNumber!==t.endLineNumber)return null;const e=this._visibleRangesForLineRange(t.startLineNumber,t.startColumn,t.endColumn);if(!e)return null;for(const t of e.ranges)o=Math.min(o,t.left),r=Math.max(r,t.left+t.width)}return o=Math.max(0,o-_t.HORIZONTAL_EXTRA_PX),r+=this._revealHorizontalRightPadding,"selections"===e.type&&r-o>t.width?null:{scrollLeft:this._computeMinimumScrolling(i,n,o,r),maxHorizontalOffset:r}}_computeMinimumScrolling(e,t,i,n,o,r){o=!!o,r=!!r;const s=(t|=0)-(e|=0);return(n|=0)-(i|=0)t?Math.max(0,n-s):e:i}}_t.HORIZONTAL_EXTRA_PX=30;class vt extends ht{constructor(e){super(),this._context=e;const t=this._context.configuration.options.get(128);this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options.get(128);return this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let e=0,o=t.length;e
    ',r=[];for(let e=t;e<=i;e++){const i=e-t,s=n[i];let a="";for(let e=0,t=s.length;e';o[i]=s}this._renderResult=o}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}class yt{constructor(e,t,i,n){this.r=yt._clamp(e),this.g=yt._clamp(t),this.b=yt._clamp(i),this.a=yt._clamp(n)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:0|e}}yt.Empty=new yt(0,0,0,0);var wt=i(4101);class Ct{constructor(){this._onDidChange=new h.Q5,this.onDidChange=this._onDidChange.event,this._updateColorMap(),wt.RW.onDidChange((e=>{e.changedColorMap&&this._updateColorMap()}))}static getInstance(){return this._INSTANCE||(this._INSTANCE=new Ct),this._INSTANCE}_updateColorMap(){const e=wt.RW.getColorMap();if(!e)return this._colors=[yt.Empty],void(this._backgroundIsLight=!0);this._colors=[yt.Empty];for(let t=1;t=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}Ct._INSTANCE=null;var St=i(3824),xt=i(3910);const kt=(()=>{const e=[];for(let t=32;t<=126;t++)e.push(t);return e.push(65533),e})();var Dt=i(5427);class Lt{constructor(e,t){this.scale=t,this.charDataNormal=Lt.soften(e,.8),this.charDataLight=Lt.soften(e,50/60)}static soften(e,t){let i=new Uint8ClampedArray(e.length);for(let n=0,o=e.length;ne.width||i+h>e.height)return void console.warn("bad render request outside image data");const d=a?this.charDataLight:this.charDataNormal,g=((e,t)=>(e-=32)<0||e>96?t<=2?(e+96)%96:95:e)(n,s),f=4*e.width,p=r.r,m=r.g,_=r.b,v=o.r-p,b=o.g-m,y=o.b-_,w=e.data;let C=g*c*u,S=i*f+4*t;for(let e=0;ee.width||i+c>e.height)return void console.warn("bad render request outside image data");const u=4*e.width,h=o.r,d=o.g,g=o.b,f=h+.5*(n.r-h),p=d+.5*(n.g-d),m=g+.5*(n.b-g),_=e.data;let v=i*u+4*t;for(let e=0;e{const t=new Uint8ClampedArray(e.length/2);for(let i=0;i>1]=Et[e[i]]<<4|15&Et[e[i+1]];return t},Mt={1:(0,Nt.I)((()=>At("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792"))),2:(0,Nt.I)((()=>At("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")))};class It{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let i;return i=Mt[e]?new Lt(Mt[e](),e):It.createFromSampleData(It.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=i,i}static createSampleData(e){const t=document.createElement("canvas"),i=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",i.fillStyle="#ffffff",i.font=`bold 16px ${e}`,i.textBaseline="middle";let n=0;for(const e of kt)i.fillText(String.fromCharCode(e),n,8),n+=10;return i.getImageData(0,0,960,16)}static createFromSampleData(e,t){if(61440!==e.length)throw new Error("Unexpected source in MinimapCharRenderer");let i=It._downsample(e,t);return new Lt(i,t)}static _downsampleChar(e,t,i,n,o){const r=1*o,s=2*o;let a=n,l=0;for(let n=0;n0){const e=255/a;for(let t=0;tIt.create(this.fontScale,a.fontFamily))),this.backgroundColor=Rt._getMinimapBackground(t,i)}static _getMinimapBackground(e,t){const i=e.getColor(xt.kV);return i?new yt(i.rgba.r,i.rgba.g,i.rgba.b,i.rgba.a):t.getColor(2)}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.showSlider===e.showSlider&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)}}class Ot{constructor(e,t,i,n,o,r,s,a){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=o,this.sliderHeight=r,this.startLineNumber=s,this.endLineNumber=a}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}static create(e,t,i,n,o,r,s,a,l,c,u){const h=e.pixelRatio,d=e.minimapLineHeight,g=Math.floor(e.canvasInnerHeight/d),f=e.lineHeight;if(e.minimapHeightIsEditorHeight){const t=a*e.lineHeight+(e.scrollBeyondLastLine?o-e.lineHeight:0),i=Math.max(1,Math.floor(o*o/t)),n=Math.max(0,e.minimapHeight-i),r=n/(c-o),u=l*r,h=n>0,d=Math.floor(e.canvasInnerHeight/e.minimapLineHeight);return new Ot(l,c,h,r,u,i,1,Math.min(s,d))}let p,m;if(r&&i!==s){const e=i-t+1;p=Math.floor(e*d/h)}else{const e=o/f;p=Math.floor(e*d/h)}m=e.scrollBeyondLastLine?(s-1)*d/h:Math.max(0,s*d/h-p),m=Math.min(e.minimapHeight-p,m);const _=m/(c-o),v=l*_;let b=0;if(e.scrollBeyondLastLine&&(b=o/f-1),g>=s+b)return new Ot(l,c,m>0,_,v,p,1,s);{let e=Math.max(1,Math.floor(t-v*h/d));u&&u.scrollHeight===c&&(u.scrollTop>l&&(e=Math.min(e,u.startLineNumber)),u.scrollTopFt.INVALID)),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;const t=this._renderedLines._get().lines;for(let e=0,i=t.length;e1){for(let t=0,i=s-1;t0&&this.minimapLines[i-1]>=e;)i--;let n=this.modelLineToMinimapLine(t)-1;for(;n+1t)return null}return[i+1,n+1]}decorationLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e),n=this.modelLineToMinimapLine(t);return e!==t&&n===i&&(n===this.minimapLines.length?i>1&&i--:n++),[i,n]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let i=this.minimapLines.length,n=0;for(let o=this.minimapLines.length-1;o>=0&&!(this.minimapLines[o]=0&&!(this.minimapLines[i]0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:i,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(n)}_recreateLineSampling(){this._minimapSelections=null;const e=Boolean(this._samplingState),[t,i]=zt.compute(this.options,this._context.model.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const e of i)switch(e.type){case"deleted":this._actual.onLinesDeleted(e.deleteFromLineNumber,e.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(e.insertFromLineNumber,e.insertToLineNumber);break;case"flush":this._actual.onFlushed()}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.model.getLineCount()}getRealLineCount(){return this._context.model.getLineCount()}getLineContent(e){return this._samplingState?this._context.model.getLineContent(this._samplingState.minimapLines[e-1]):this._context.model.getLineContent(e)}getMinimapLinesRenderingData(e,t,i){if(this._samplingState){let n=[];for(let o=0,r=t-e+1;o{if(e.preventDefault(),0===this._model.options.renderMinimap)return;if(!this._lastRenderData)return;if("proportional"!==this._model.options.size){if(e.leftButton&&this._lastRenderData){const t=c.i(this._slider.domNode),i=t.top+t.height/2;this._startSliderDragging(e.buttons,e.posx,i,e.posy,this._lastRenderData.renderedLayout)}return}const t=this._model.options.minimapLineHeight,i=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*e.browserEvent.offsetY;let n=Math.floor(i/t)+this._lastRenderData.renderedLayout.startLineNumber;n=Math.min(n,this._model.getLineCount()),this._model.revealLineNumber(n)})),this._sliderMouseMoveMonitor=new S.Z,this._sliderMouseDownListener=c.mu(this._slider.domNode,"mousedown",(e=>{e.preventDefault(),e.stopPropagation(),e.leftButton&&this._lastRenderData&&this._startSliderDragging(e.buttons,e.posx,e.posy,e.posy,this._lastRenderData.renderedLayout)})),this._gestureDisposable=y.o.addTarget(this._domNode.domNode),this._sliderTouchStartListener=c.nm(this._domNode.domNode,y.t.Start,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(e))}),{passive:!1}),this._sliderTouchMoveListener=c.nm(this._domNode.domNode,y.t.Change,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(e)}),{passive:!1}),this._sliderTouchEndListener=c.mu(this._domNode.domNode,y.t.End,(e=>{e.preventDefault(),e.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)}))}_startSliderDragging(e,t,i,n,o){this._slider.toggleClassName("active",!0);const r=(e,n)=>{const r=Math.abs(n-t);if(b.ED&&r>140)return void this._model.setScrollTop(o.scrollTop);const s=e-i;this._model.setScrollTop(o.getDesiredScrollTopFromDelta(s))};n!==i&&r(n,t),this._sliderMouseMoveMonitor.startMonitoring(this._slider.domNode,e,S.e,(e=>r(e.posy,e.posx)),(()=>{this._slider.toggleClassName("active",!1)}))}scrollDueToTouchEvent(e){const t=this._domNode.domNode.getBoundingClientRect().top,i=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(i)}dispose(){this._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){return"always"===this._model.options.showSlider?"minimap slider-always":"minimap slider-mouseover"}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new Bt(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e,t)}onLinesDeleted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e,t),!0}onLinesInserted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(xt.ov),this._renderDecorations=!0,!0}onTokensChanged(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(0===this._model.options.renderMinimap)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const t=Ot.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(t.sliderNeeded?"block":"none"),this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight);const i=e.scrollLeft/this._model.options.typicalHalfwidthCharacterWidth,n=Math.min(this._model.options.minimapWidth,Math.round(i*this._model.options.minimapCharWidth/this._model.options.pixelRatio));this._sliderHorizontal.setLeft(n),this._sliderHorizontal.setWidth(this._model.options.minimapWidth-n),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this.renderDecorations(t),this._lastRenderData=this.renderLines(t)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections(),i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber),{canvasInnerWidth:n,canvasInnerHeight:o}=this._model.options,r=this._model.options.minimapLineHeight,s=this._model.options.minimapCharWidth,a=this._model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,n,o);const c=new Map;for(let i=0;ithis._model.options.canvasInnerHeight)return;let h=t.get(r);const d=!h;if(!h){const e=this._model.getLineContent(r);h=[j.y0];for(let t=1;tr?h.length-1:f-1;if(v>0){const t=h[v]-_||2;this.renderDecoration(e,n,_,u,t,s)}d&&this.renderLineHighlight(e,n,u,s)}renderLineHighlight(e,t,i,n){e.fillStyle=t&&t.transparent(.5).toString()||"",e.fillRect(j.y0,i,e.canvas.width,n)}renderDecoration(e,t,i,n,o,r){e.fillStyle=t&&t.toString()||"",e.fillRect(i,n,o,r)}renderLines(e){const t=e.startLineNumber,i=e.endLineNumber,n=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){const t=this._lastRenderData._get();return new Pt(e,t.imageData,t.lines)}const o=this._getBuffer();if(!o)return null;let[r,s,a]=Vt._renderUntouchedLines(o,t,i,n,this._lastRenderData);const l=this._model.getMinimapLinesRenderingData(t,i,a),c=this._model.getOptions().tabSize,u=this._model.options.backgroundColor,h=this._model.tokensColorTracker,d=h.backgroundIsLight(),g=this._model.options.renderMinimap,f=this._model.options.charRenderer(),p=this._model.options.fontScale,m=this._model.options.minimapCharWidth,_=(1===g?2:3)*p,v=n>_?Math.floor((n-_)/2):0;let b=0;const y=[];for(let e=0,r=i-t+1;e=0&&op)return;const r=g.charCodeAt(v);if(9===r){const e=c-(v+b)%c;b+=e-1,_+=e*o}else if(32===r)_+=o;else{const c=Le.K7(r)?2:1;for(let u=0;up)return}}}}}(0,Me.Ic)(((e,t)=>{const i=e.getColor(xt.kV);i&&t.addRule(`.monaco-editor .minimap > canvas { opacity: ${i.rgba.a}; will-change: opacity; }`);const n=e.getColor(xt.CA);n&&t.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${n}; }`);const o=e.getColor(xt.Xy);o&&t.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${o}; }`);const r=e.getColor(xt.br);r&&t.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${r}; }`);const s=e.getColor(xt._w);s&&t.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${s} -6px 0 6px -6px inset; }`)}));class Ht extends T{constructor(e){super(e);const t=this._context.configuration.options.get(128);this._widgets={},this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,this._domNode=(0,v.X)(document.createElement("div")),R.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options.get(128);return this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,!0}addWidget(e){const t=(0,v.X)(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender()}setWidgetPosition(e,t){const i=this._widgets[e.getId()];return i.preference!==t&&(i.preference=t,this.setShouldRender(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t].domNode.domNode;delete this._widgets[t],e.parentNode.removeChild(e),this.setShouldRender()}}_renderWidget(e){const t=e.domNode;if(null!==e.preference)if(0===e.preference)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(1===e.preference){const e=t.domNode.clientHeight;t.setTop(this._editorHeight-e-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else 2===e.preference&&(t.setTop(0),t.domNode.style.right="50%");else t.unsetTop()}prepareRender(e){}render(e){this._domNode.setWidth(this._editorWidth);const t=Object.keys(this._widgets);for(let e=0,i=t.length;e=3){const t=Math.floor(n/3),i=Math.floor(n/3),o=n-t-i,r=e+t;return[[0,e,r,e,e+t+o,e,r,e],[0,t,o,t+o,i,t+o+i,o+i,t+o+i]]}if(2===i){const t=Math.floor(n/2),i=n-t;return[[0,e,e,e,e+t,e,e,e],[0,t,t,t,i,t+i,t+i,t+i]]}return[[0,e,e,e,e,e,e,e],[0,n,n,n,n,n,n,n]]}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&this.backgroundColor===e.backgroundColor&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class jt extends T{constructor(e){super(e),this._domNode=(0,v.X)(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=wt.RW.onDidChange((e=>{e.changedColorMap&&this._updateSettings(!0)})),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new Ut(this._context.configuration,this._context.theme);return!(this._settings&&this._settings.equals(t)||(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),0))}onConfigurationChanged(e){return this._updateSettings(!1)}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;tt&&(e=t-a),_=e-a,v=e+a}_>m+1||r!==f?(0!==e&&l.fillRect(c[f],p,u[f],m-p),f=r,p=_,m=v):v>m&&(m=v)}l.fillRect(c[f],p,u[f],m-p)}if(!this._settings.hideCursor&&this._settings.cursorColor){const e=2*this._settings.pixelRatio|0,i=e/2|0,r=this._settings.x[7],s=this._settings.w[7];l.fillStyle=this._settings.cursorColor;let a=-100,c=-100;for(let u=0,h=this._cursorPositions.length;ut&&(d=t-i);const g=d-i,f=g+e;g>c+1?(0!==u&&l.fillRect(r,a,s,c-a),a=g,c=f):f>c&&(c=f)}l.fillRect(r,a,s,c-a)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(l.beginPath(),l.lineWidth=1,l.strokeStyle=this._settings.borderColor,l.moveTo(0,0),l.lineTo(0,t),l.stroke(),l.moveTo(0,0),l.lineTo(e,0),l.stroke())}}var qt=i(2003);class Kt extends I{constructor(e,t){super(),this._context=e;const i=this._context.configuration.options;this._domNode=(0,v.X)(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new qt.Tj((e=>this._context.viewLayout.getVerticalOffsetForLineNumber(e))),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(56)),this._zoneManager.setPixelRatio(i.get(126)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(56)&&(this._zoneManager.setLineHeight(t.get(56)),this._render()),e.hasChanged(126)&&(this._zoneManager.setPixelRatio(t.get(126)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(0===this._zoneManager.getOuterHeight())return!1;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),o=this._domNode.domNode.getContext("2d");return o.clearRect(0,0,e,t),i.length>0&&this._renderOneLane(o,i,n,e),!0}_renderOneLane(e,t,i,n){let o=0,r=0,s=0;for(const a of t){const t=a.colorId,l=a.from,c=a.to;t!==o?(e.fillRect(0,r,n,s-r),o=t,e.fillStyle=i[o],r=l,s=c):s>=l?s=Math.max(s,c):(e.fillRect(0,r,n,s-r),r=l,s=c)}e.fillRect(0,r,n,s-r)}}class Gt extends T{constructor(e){super(e),this.domNode=(0,v.X)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(89),this._typicalHalfwidthCharacterWidth=t.get(40).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(89),this._typicalHalfwidthCharacterWidth=t.get(40).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e0;){const e=(0,v.X)(document.createElement("div"));e.setClassName("view-ruler"),e.setWidth(n),this.domNode.appendChild(e),this._renderedRulers.push(e),o--}return}let i=e-t;for(;i>0;){const e=this._renderedRulers.pop();this.domNode.removeChild(e),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t{const i=e.getColor(Ae.zk);i&&t.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${i} inset; }`)}));class Yt extends T{constructor(e){super(e),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const t=this._context.configuration.options.get(90);this._useShadows=t.useShadows,this._domNode=(0,v.X)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e&&(this._shouldShow=e,!0)}getDomNode(){return this._domNode}_updateWidth(){const e=this._context.configuration.options.get(128);0===e.minimap.renderMinimap||e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?this._width=e.width:this._width=e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}onConfigurationChanged(e){const t=this._context.configuration.options.get(90);return this._useShadows=t.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}(0,Me.Ic)(((e,t)=>{const i=e.getColor(xt._w);i&&t.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${i} 0 6px 6px -6px inset; }`)}));class Zt{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class Xt{constructor(e,t){this.lineNumber=e,this.ranges=t}}function Qt(e){return new Zt(e)}function Jt(e){return new Xt(e.lineNumber,e.ranges.map(Qt))}class ei extends Ee{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(56),this._roundedSelection=t.get(88),this._typicalHalfwidthCharacterWidth=t.get(40).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(56),this._roundedSelection=t.get(88),this._typicalHalfwidthCharacterWidth=t.get(40).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,i=e.length;t1)return!0;return!1}_enrichVisibleRangesWithStyle(e,t,i){const n=this._typicalHalfwidthCharacterWidth/4;let o=null,r=null;if(i&&i.length>0&&t.length>0){const n=t[0].lineNumber;if(n===e.startLineNumber)for(let e=0;!o&&e=0;e--)i[e].lineNumber===s&&(r=i[e].ranges[0]);o&&!o.startStyle&&(o=null),r&&!r.startStyle&&(r=null)}for(let e=0,i=t.length;e0){const i=t[e-1].ranges[0].left,o=t[e-1].ranges[0].left+t[e-1].ranges[0].width;ti(a-i)i&&(c.top=1),ti(l-o)'}_actualRenderOneSelection(e,t,i,n){if(0===n.length)return;const o=!!n[0].ranges[0].startStyle,r=this._lineHeight.toString(),s=(this._lineHeight-1).toString(),a=n[0].lineNumber,l=n[n.length-1].lineNumber;for(let c=0,u=n.length;c1,s)}this._previousFrameVisibleRangesWithStyle=o,this._renderResult=t.map((([e,t])=>e+t))}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function ti(e){return e<0?-e:e}ei.SELECTION_CLASS_NAME="selected-text",ei.SELECTION_TOP_LEFT="top-left-radius",ei.SELECTION_BOTTOM_LEFT="bottom-left-radius",ei.SELECTION_TOP_RIGHT="top-right-radius",ei.SELECTION_BOTTOM_RIGHT="bottom-right-radius",ei.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",ei.ROUNDED_PIECE_WIDTH=10,(0,Me.Ic)(((e,t)=>{const i=e.getColor(xt.hE);i&&t.addRule(`.monaco-editor .focused .selected-text { background-color: ${i}; }`);const n=e.getColor(xt.ES);n&&t.addRule(`.monaco-editor .selected-text { background-color: ${n}; }`);const o=e.getColor(xt.yb);o&&!o.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${o}; }`)}));class ii{constructor(e,t,i,n,o,r){this.top=e,this.left=t,this.width=i,this.height=n,this.textContent=o,this.textContentClassName=r}}class ni{constructor(e){this._context=e;const t=this._context.configuration.options,i=t.get(40);this._cursorStyle=t.get(22),this._lineHeight=t.get(56),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(25),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=(0,v.X)(document.createElement("div")),this._domNode.setClassName(`cursor ${Oe.S}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),f.V.applyFontInfo(this._domNode,i),this._domNode.setDisplay("none"),this._position=new ie.L(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(40);return this._cursorStyle=t.get(22),this._lineHeight=t.get(56),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(25),this._typicalHalfwidthCharacterWidth),f.V.applyFontInfo(this._domNode,i),!0}onCursorPositionChanged(e){return this._position=e,!0}_prepareRender(e){let t="";if(this._cursorStyle===j.d2.Line||this._cursorStyle===j.d2.LineThin){const i=e.visibleRangeForPosition(this._position);if(!i||i.outsideRenderedLine)return null;let n;if(this._cursorStyle===j.d2.Line){if(n=c.Uh(this._lineCursorWidth>0?this._lineCursorWidth:2),n>2){const e=this._context.model.getLineContent(this._position.lineNumber),i=Le.vH(e,this._position.column-1);t=e.substr(this._position.column-1,i)}}else n=c.Uh(1);let o=i.left;n>=2&&o>=1&&(o-=1);const r=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta;return new ii(r,o,n,this._lineHeight,t,"")}const i=this._context.model.getLineContent(this._position.lineNumber),n=Le.vH(i,this._position.column-1),o=e.linesVisibleRangesForRange(new ne.e(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+n),!1);if(!o||0===o.length)return null;const r=o[0];if(r.outsideRenderedLine||0===r.ranges.length)return null;const s=r.ranges[0],a=s.width<1?this._typicalHalfwidthCharacterWidth:s.width;let l="";if(this._cursorStyle===j.d2.Block){const e=this._context.model.getViewLineData(this._position.lineNumber);t=i.substr(this._position.column-1,n);const o=e.tokens.findTokenIndexAtOffset(this._position.column-1);l=e.tokens.getClassName(o)}let u=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta,h=this._lineHeight;return this._cursorStyle!==j.d2.Underline&&this._cursorStyle!==j.d2.UnderlineThin||(u+=this._lineHeight-2,h=2),new ii(u,s.left,a,h,t,l)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${Oe.S} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class oi extends T{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(78),this._cursorBlinking=t.get(20),this._cursorStyle=t.get(22),this._cursorSmoothCaretAnimation=t.get(21),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new ni(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=(0,v.X)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new C._F,this._cursorFlatBlinkInterval=new C.zh,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const t=this._context.configuration.options;this._readOnly=t.get(78),this._cursorBlinking=t.get(20),this._cursorStyle=t.get(22),this._cursorSmoothCaretAnimation=t.get(21),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let t=0,i=this._secondaryCursors.length;tt.length){const e=this._secondaryCursors.length-t.length;for(let t=0;t{for(let i=0,n=e.ranges.length;i{this._isVisible?this._hide():this._show()}),oi.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet((()=>{this._blinkingEnabled=!0,this._updateDomClassName()}),oi.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case j.d2.Line:e+=" cursor-line-style";break;case j.d2.Block:e+=" cursor-block-style";break;case j.d2.Underline:e+=" cursor-underline-style";break;case j.d2.LineThin:e+=" cursor-line-thin-style";break;case j.d2.BlockOutline:e+=" cursor-block-outline-style";break;case j.d2.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return this._cursorSmoothCaretAnimation&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{const i=e.getColor(Ae.n0);if(i){let n=e.getColor(Ae.fY);n||(n=i.opposite()),t.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${i}; border-color: ${i}; color: ${n}; }`),"hc"===e.type&&t.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${n}; border-right: 1px solid ${n}; }`)}}));const ri=()=>{throw new Error("Invalid change accessor")};class si extends T{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(128);this._lineHeight=t.get(56),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=(0,v.X)(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=(0,v.X)(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const i of e)t.set(i.id,i);let i=!1;return this._context.model.changeWhitespace((e=>{const n=Object.keys(this._zones);for(let o=0,r=n.length;o{const n={addZone:e=>(t=!0,this._addZone(i,e)),removeZone:e=>{e&&(t=this._removeZone(i,e)||t)},layoutZone:e=>{e&&(t=this._layoutZone(i,e)||t)}};!function(e,t){try{e(t)}catch(e){(0,u.dL)(e)}}(e,n),n.addZone=ri,n.removeZone=ri,n.layoutZone=ri})),t}_addZone(e,t){const i=this._computeWhitespaceProps(t),n={whitespaceId:e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),delegate:t,isVisible:!1,domNode:(0,v.X)(t.domNode),marginDomNode:t.marginDomNode?(0,v.X)(t.marginDomNode):null};return this._safeCallOnComputedHeight(n.delegate,i.heightInPx),n.domNode.setPosition("absolute"),n.domNode.domNode.style.width="100%",n.domNode.setDisplay("none"),n.domNode.setAttribute("monaco-view-zone",n.whitespaceId),this.domNode.appendChild(n.domNode),n.marginDomNode&&(n.marginDomNode.setPosition("absolute"),n.marginDomNode.domNode.style.width="100%",n.marginDomNode.setDisplay("none"),n.marginDomNode.setAttribute("monaco-view-zone",n.whitespaceId),this.marginDomNode.appendChild(n.marginDomNode)),this._zones[n.whitespaceId]=n,this.setShouldRender(),n.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t];return delete this._zones[t],e.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.parentNode.removeChild(i.domNode.domNode),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.parentNode.removeChild(i.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t],n=this._computeWhitespaceProps(i.delegate);return e.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){if(this._zones.hasOwnProperty(e)){const t=this._zones[e];return Boolean(t.delegate.suppressMouseDown)}return!1}_heightInPixels(e){return"number"==typeof e.heightInPx?e.heightInPx:"number"==typeof e.heightInLines?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return"number"==typeof e.minWidthInPx?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if("function"==typeof e.onComputedHeight)try{e.onComputedHeight(t)}catch(e){(0,u.dL)(e)}}_safeCallOnDomNodeTop(e,t){if("function"==typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(e){(0,u.dL)(e)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,i={};let n=!1;for(let e=0,o=t.length;e{this._context.theme.update(e),this._context.model.onDidColorThemeChange(),this.render(!0,!1)}))),this._viewParts=[],this._textAreaHandler=new Be(this._context,s,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=(0,v.X)(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=(0,v.X)(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=(0,v.X)(document.createElement("div")),R.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new ct(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new _t(this._context,this._linesContent),this._viewZones=new si(this._context),this._viewParts.push(this._viewZones);const a=new jt(this._context);this._viewParts.push(a);const l=new Yt(this._context);this._viewParts.push(l);const c=new Ze(this._context);this._viewParts.push(c),c.addDynamicOverlay(new rt(this._context)),c.addDynamicOverlay(new ei(this._context)),c.addDynamicOverlay(new gt(this._context)),c.addDynamicOverlay(new at(this._context));const u=new Xe(this._context);this._viewParts.push(u),u.addDynamicOverlay(new st(this._context)),u.addDynamicOverlay(new dt(this._context)),u.addDynamicOverlay(new bt(this._context)),u.addDynamicOverlay(new vt(this._context)),u.addDynamicOverlay(new Ie(this._context));const h=new Te(this._context);h.getDomNode().appendChild(this._viewZones.marginDomNode),h.getDomNode().appendChild(u.getDomNode()),this._viewParts.push(h),this._contentWidgets=new Je(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new oi(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new Ht(this._context),this._viewParts.push(this._overlayWidgets);const d=new Gt(this._context);this._viewParts.push(d);const g=new Wt(this._context);if(this._viewParts.push(g),a){const e=this._scrollbar.getOverviewRulerLayoutInfo();e.parent.insertBefore(a.getDomNode(),e.insertBefore)}this._linesContent.appendChild(c.getDomNode()),this._linesContent.appendChild(d.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(h.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(l.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(g.getDomNode()),this.domNode.appendChild(this._overflowGuardContainer),r?r.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new De(this._context,s,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._renderNow()}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new le(e,t)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new ie.L(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPositionRelativeToEditor:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new ie.L(e,t)))}}_applyLayout(){const e=this._context.configuration.options.get(128);this.domNode.setWidth(e.width),this.domNode.setHeight(e.height),this._overflowGuardContainer.setWidth(e.width),this._overflowGuardContainer.setHeight(e.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(125)+" "+(0,Me.m6)(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this._configPixelRatio=this._context.configuration.options.get(126),this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){null===this._renderAnimationFrame&&(this._renderAnimationFrame=c.lI(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){!function(e){try{e()}catch(e){(0,u.dL)(e)}}((()=>this._actualRender()))}_getViewPartsToRender(){let e=[],t=0;for(const i of this._viewParts)i.shouldRender()&&(e[t++]=i);return e}_actualRender(){if(!c.Uw(this.domNode.domNode))return;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&0===e.length)return;const t=this._context.viewLayout.getLinesViewportData();this._context.model.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const i=new ci(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.model);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(i),this._viewLines.shouldRender()&&(this._viewLines.renderText(i),this._viewLines.onDidRender(),e=this._getViewPartsToRender());const n=new O(this._context.viewLayout,i,this._viewLines);for(const t of e)t.prepareRender(n);for(const t of e)t.render(n),t.onDidRender();Math.abs(m.mX()-this._configPixelRatio)>.001&&this._context.configuration.updatePixelRatio()}delegateVerticalScrollbarMouseDown(e){this._scrollbar.delegateVerticalScrollbarMouseDown(e)}restoreState(e){this._context.model.setScrollPosition({scrollTop:e.scrollTop},1),this._context.model.tokenizeViewport(),this._renderNow(),this._viewLines.updateLineWidths(),this._context.model.setScrollPosition({scrollLeft:e.scrollLeft},1)}getOffsetForColumn(e,t){const i=this._context.model.validateModelPosition({lineNumber:e,column:t}),n=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(i);this._flushAccumulatedAndRenderNow();const o=this._viewLines.visibleRangeForPosition(new ie.L(n.lineNumber,n.column));return o?o.left:-1}getTargetAtClientPoint(e,t){const i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?Ve.convertViewToModelMouseTarget(i,this._context.model.coordinatesConverter):null}createOverviewRuler(e){return new Kt(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(const e of this._viewParts)e.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){let t=e.position&&e.position.range||null;if(null===t){const i=e.position?e.position.position:null;null!==i&&(t=new ne.e(i.lineNumber,i.column,i.lineNumber,i.column))}const i=e.position?e.position.preference:null;this._contentWidgets.setWidgetPosition(e.widget,t,i),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){const t=e.position?e.position.preference:null;this._overlayWidgets.setWidgetPosition(e.widget,t)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}}class hi{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new oe.rS(new ne.e(1,1,1,1),0,new ie.L(1,1),0),new oe.rS(new ne.e(1,1,1,1),0,new ie.L(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new oe.Vi(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return 0===this.modelState.selection.getDirection()?new _.Y(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new _.Y(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,i){this._setState(e,t,i)}_setState(e,t,i){if(t){const i=e.model.validateRange(t.selectionStart),n=t.selectionStart.equalsRange(i)?t.selectionStartLeftoverVisibleColumns:0,o=e.model.validatePosition(t.position),r=t.position.equals(o)?t.leftoverVisibleColumns:0;t=new oe.rS(i,n,o,r)}else{if(!i)return;const n=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(i.selectionStart)),o=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(i.position));t=new oe.rS(n,i.selectionStartLeftoverVisibleColumns,o,i.leftoverVisibleColumns)}if(i){const n=e.coordinatesConverter.validateViewRange(i.selectionStart,t.selectionStart),o=e.coordinatesConverter.validateViewPosition(i.position,t.position);i=new oe.rS(n,t.selectionStartLeftoverVisibleColumns,o,t.leftoverVisibleColumns)}else{const n=e.coordinatesConverter.convertModelPositionToViewPosition(new ie.L(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),o=e.coordinatesConverter.convertModelPositionToViewPosition(new ie.L(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),r=new ne.e(n.lineNumber,n.column,o.lineNumber,o.column),s=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new oe.rS(r,t.selectionStartLeftoverVisibleColumns,s,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}class di{constructor(e){this.context=e,this.primaryCursor=new hi(e),this.secondaryCursors=[],this.lastAddedCursorIndex=0}dispose(){this.primaryCursor.dispose(this.context),this.killSecondaryCursors()}startTrackingSelections(){this.primaryCursor.startTrackingSelection(this.context);for(let e=0,t=this.secondaryCursors.length;ei){let e=t-i;for(let t=0;t=e+1&&this.lastAddedCursorIndex--,this.secondaryCursors[e].dispose(this.context),this.secondaryCursors.splice(e,1)}_getAll(){let e=[];e[0]=this.primaryCursor;for(let t=0,i=this.secondaryCursors.length;te.selection.startLineNumber===t.selection.startLineNumber?e.selection.startColumn-t.selection.startColumn:e.selection.startLineNumber-t.selection.startLineNumber));for(let i=0;ia&&e.index--;e.splice(a,1),t.splice(s,1),this._removeSecondaryCursor(a-1),i--}}}}var gi=i(1380),fi=i(3582);class pi{constructor(){this.type=0}}class mi{constructor(){this.type=1}}class _i{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class vi{constructor(e,t){this.type=3,this.selections=e,this.modelSelections=t}}class bi{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0)}}class yi{constructor(){this.type=5}}class wi{constructor(e){this.type=6,this.isFocused=e}}class Ci{constructor(){this.type=7}}class Si{constructor(){this.type=8}}class xi{constructor(e,t){this.type=9,this.fromLineNumber=e,this.toLineNumber=t}}class ki{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}}class Di{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}}class Li{constructor(e,t,i,n,o,r){this.type=12,this.source=e,this.range=t,this.selections=i,this.verticalType=n,this.revealHorizontal=o,this.scrollType=r}}class Ni{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}class Ei{constructor(){this.type=14}}class Ai{constructor(e){this.type=15,this.ranges=e}}class Mi{constructor(){this.type=16}}class Ii{constructor(){this.type=17}}class Ti extends d.JT{constructor(){super(),this._onEvent=this._register(new h.Q5),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOugoingEvents()}_addOutgoingEvent(e){for(let t=0,i=this._outgoingEvents.length;t0;){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,i=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOugoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const i of t)i.handleEvents(e)}}}class Ri{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class Oi{constructor(e,t,i,n){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=i,this.contentHeight=n,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}merge(e){return 0!==e.kind?this:new Oi(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class Fi{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}merge(e){return 1!==e.kind?this:new Fi(this.oldHasFocus,e.hasFocus)}}class Pi{constructor(e,t,i,n,o,r,s,a){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=i,this._oldScrollTop=n,this.scrollWidth=o,this.scrollLeft=r,this.scrollHeight=s,this.scrollTop=a,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!(this.scrollWidthChanged||this.scrollLeftChanged||this.scrollHeightChanged||this.scrollTopChanged)}merge(e){return 2!==e.kind?this:new Pi(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class Bi{constructor(){this.kind=3}isNoOp(){return!1}merge(e){return this}}class zi{constructor(e,t,i,n,o,r,s){this.kind=5,this.oldSelections=e,this.selections=t,this.oldModelVersionId=i,this.modelVersionId=n,this.source=o,this.reason=r,this.reachedMaxCursorCount=s}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const i=e.length;if(i!==t.length)return!1;for(let n=0;n=t.length)return!1;if(!t[i].strictContainsRange(e[i]))return!1}return!0}}class $i extends d.JT{constructor(e,t,i,n){super(),this._model=e,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=t,this._coordinatesConverter=i,this.context=new oe.zp(this._model,this._coordinatesConverter,n),this._cursors=new di(this.context),this._hasFocus=!1,this._isHandling=!1,this._isDoingComposition=!1,this._selectionsWhenCompositionStarted=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=(0,d.B9)(this._autoClosedActions),super.dispose()}updateConfiguration(e){this.context=new oe.zp(this._model,this._coordinatesConverter,e),this._cursors.updateContext(this.context)}onLineMappingChanged(e){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(e,"viewModel",0,this.getCursorStates())}setHasFocus(e){this._hasFocus=e}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){let e=this._cursors.getSelections();for(let t=0;t$i.MAX_CURSOR_COUNT&&(n=n.slice(0,$i.MAX_CURSOR_COUNT),o=!0);const r=new Vi(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,r,o)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,i,n){const o=this._cursors.getViewPositions();if(o.length>1)this._emitCursorRevealRange(e,t,null,this._cursors.getViewSelections(),0,i,n);else{const r=o[0],s=new ne.e(r.lineNumber,r.column,r.lineNumber,r.column);this._emitCursorRevealRange(e,t,s,null,0,i,n)}}_revealPrimaryCursor(e,t,i,n,o){const r=this._cursors.getViewPositions();if(r.length>1)this._emitCursorRevealRange(e,t,null,this._cursors.getViewSelections(),i,n,o);else{const s=r[0],a=new ne.e(s.lineNumber,s.column,s.lineNumber,s.column);this._emitCursorRevealRange(e,t,a,null,i,n,o)}}_emitCursorRevealRange(e,t,i,n,o,r,s){e.emitViewEvent(new Li(t,i,n,o,r,s))}saveState(){let e=[];const t=this._cursors.getSelections();for(let i=0,n=t.length;i0){const i=oe.Vi.fromModelSelections(t.resultingSelection);this.setStates(e,"modelChange",t.isUndoing?5:t.isRedoing?6:2,i)&&this._revealPrimaryCursor(e,"modelChange",0,!0,0)}else{const t=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,oe.Vi.fromModelSelections(t))}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),i=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:oe.io.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,t),toViewLineNumber:i.lineNumber,toViewVisualColumn:oe.io.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,i)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,i,n){this.setStates(e,t,n,oe.Vi.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){let i=[],n=[];for(let o=0,r=e.length;o0&&(r[0]._isTracked=!0);let s=e.model.pushEditOperations(e.selectionsBefore,r,(i=>{let n=[];for(let t=0;te.identifier.minor-t.identifier.minor;let r=[];for(let i=0;i0?(n[i].sort(o),r[i]=t[i].computeCursorState(e.model,{getInverseEditOperations:()=>n[i],getTrackedSelection:t=>{const i=parseInt(t,10),n=e.model._getTrackedRange(e.trackedRanges[i]);return 0===e.trackedRangesDirection[i]?new _.Y(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new _.Y(n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn)}})):r[i]=e.selectionsBefore[i];return r}));s||(s=e.selectionsBefore);let a=[];for(let e in o)o.hasOwnProperty(e)&&a.push(parseInt(e,10));a.sort(((e,t)=>t-e));for(const e of a)s.splice(e,1);return s}static _arrayIsEmpty(e){for(let t=0,i=e.length;t{ne.e.isEmpty(e)&&""===r||n.push({identifier:{major:t,minor:o++},range:e,text:r,forceMoveMarkers:s,isAutoWhitespaceEdit:i.insertsAutoWhitespace})};let s=!1;const a={addEditOperation:r,addTrackedEditOperation:(e,t,i)=>{s=!0,r(e,t,i)},trackSelection:(t,i)=>{const n=_.Y.liftSelection(t);let o;if(n.isEmpty())if("boolean"==typeof i)o=i?2:3;else{const t=e.model.getLineMaxColumn(n.startLineNumber);o=n.startColumn===t?2:3}else o=1;const r=e.trackedRanges.length,s=e.model._setTrackedRange(null,n,o);return e.trackedRanges[r]=s,e.trackedRangesDirection[r]=n.getDirection(),r.toString()}};try{i.getEditOperations(e.model,a)}catch(e){return(0,u.dL)(e),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:s}}static _getLoserCursorMap(e){(e=e.slice(0)).sort(((e,t)=>-ne.e.compareRangesUsingEnds(e.range,t.range)));let t={};for(let i=1;io.identifier.major?n.identifier.major:o.identifier.major,t[r.toString()]=!0;for(let t=0;t0&&i--}}return t}}.executeCommands(this._model,this._cursors.getSelections(),e.commands);if(t){this._interpretCommandResult(t);let i=[],n=[];for(let t=0;t0&&this._pushAutoClosedAction(i,n),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){e&&0!==e.length||(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,i,n,o){const r=new Vi(this._model,this);if(r.equals(n))return!1;const s=this._cursors.getSelections(),a=this._cursors.getViewSelections();if(e.emitViewEvent(new vi(a,s)),!n||n.cursorState.length!==r.cursorState.length||r.cursorState.some(((e,t)=>!e.modelState.equals(n.cursorState[t].modelState)))){const a=n?n.cursorState.map((e=>e.modelState.selection)):null,l=n?n.modelVersionId:0;e.emitOutgoingEvent(new zi(a,s,l,r.modelVersionId,t||"keyboard",i,o))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;let t=[];for(let i=0,n=e.length;i=0)return null;const o=n.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!o)return null;const r=o[1],s=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(r);if(!s||1!==s.length)return null;const a=s[0].open,l=n.text.length-o[2].length-1,c=n.text.lastIndexOf(a,l-1);if(-1===c)return null;t.push([c,l])}return t}executeEdits(e,t,i,n){let o=null;"snippet"===t&&(o=this._findAutoClosingPairs(i)),o&&(i[0]._isTracked=!0);let r=[],s=[];const a=this._model.pushEditOperations(this.getSelections(),i,(e=>{if(o)for(let t=0,i=o.length;t0&&this._pushAutoClosedAction(r,s)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const o=new Vi(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(e){(0,u.dL)(e)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,o,!1)&&this._revealPrimaryCursor(t,i,0,!0,0)}setIsDoingComposition(e){this._isDoingComposition=e}getAutoClosedCharacters(){return Hi.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._selectionsWhenCompositionStarted=this.getSelections().slice(0)}endComposition(e,t){this._executeEdit((()=>{"keyboard"===t&&(this._executeEditOperation(fi.u.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this._selectionsWhenCompositionStarted,this.getSelections(),this.getAutoClosedCharacters())),this._selectionsWhenCompositionStarted=null)}),e,t)}type(e,t,i){this._executeEdit((()=>{if("keyboard"===i){const e=t.length;let i=0;for(;i{this._executeEditOperation(fi.u.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,o))}),e,r);else if(0!==o){const t=this.getSelections().map((e=>{const t=e.getPosition();return new _.Y(t.lineNumber,t.column+o,t.lineNumber,t.column+o)}));this.setSelections(e,r,t,0)}}paste(e,t,i,n,o){this._executeEdit((()=>{this._executeEditOperation(fi.u.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))}),e,o,4)}cut(e,t){this._executeEdit((()=>{this._executeEditOperation(gi.A.cut(this.context.cursorConfig,this._model,this.getSelections()))}),e,t)}executeCommand(e,t,i){this._executeEdit((()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new oe.Tp(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}executeCommands(e,t,i){this._executeEdit((()=>{this._executeEditOperation(new oe.Tp(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}}$i.MAX_CURSOR_COUNT=1e4;var Ui=i(653),ji=i(6518),qi=i(9102),Ki=i(5713),Gi=i(6633);class Yi{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;const t=this._inserts,i=this._changes,n=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,i,n)}}class Zi{constructor(e,t,i,n,o){this.id=e,this.afterLineNumber=t,this.ordinal=i,this.height=n,this.minWidth=o,this.prefixSum=0}}class Xi{constructor(e,t,i,n){this._instanceId=Le.PJ(++Xi.INSTANCE_COUNT),this._pendingChanges=new Yi,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=t,this._paddingTop=i,this._paddingBottom=n}static findInsertionIndex(e,t,i){let n=0,o=e.length;for(;n>>1;t===e[r].afterLineNumber?i{t=!0,e|=0,i|=0,n|=0,o|=0;const r=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new Zi(r,e,i,n,o)),r},changeOneWhitespace:(e,i,n)=>{t=!0,i|=0,n|=0,this._pendingChanges.change({id:e,newAfterLineNumber:i,newHeight:n})},removeWhitespace:e=>{t=!0,this._pendingChanges.remove({id:e})}})}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,i){if((e.length>0||i.length>0)&&(this._minWidth=-1),e.length+t.length+i.length<=1){for(const t of e)this._insertWhitespace(t);for(const e of t)this._changeOneWhitespace(e.id,e.newAfterLineNumber,e.newHeight);for(const e of i){const t=this._findWhitespaceIndex(e.id);-1!==t&&this._removeWhitespace(t)}return}const n=new Set;for(const e of i)n.add(e.id);const o=new Map;for(const e of t)o.set(e.id,e);const r=e=>{let t=[];for(const i of e)if(!n.has(i.id)){if(o.has(i.id)){const e=o.get(i.id);i.afterLineNumber=e.newAfterLineNumber,i.height=e.newHeight}t.push(i)}return t},s=r(this._arr).concat(r(e));s.sort(((e,t)=>e.afterLineNumber===t.afterLineNumber?e.ordinal-t.ordinal:e.afterLineNumber-t.afterLineNumber)),this._arr=s,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=Xi.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){const t=this._arr;for(let i=0,n=t.length;it&&(this._arr[i].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount+=t-e+1;for(let i=0,n=this._arr.length;i=t.length||t[o+1].afterLineNumber>=e)return o;i=o+1|0}else n=o-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t1?this._lineHeight*(e-1):0,t+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e)+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),-1===this._minWidth){let e=0;for(let t=0,i=this._arr.length;tthis.getLinesTotalHeight()}isInTopPadding(e){return 0!==this._paddingTop&&(this._checkPendingChanges(),e=this.getLinesTotalHeight()-this._paddingBottom)}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),(e|=0)<0)return 1;const t=0|this._lineCount,i=this._lineHeight;let n=1,o=t;for(;n=r+i)n=t+1;else{if(e>=r)return t;o=t}}return n>t?t:n}getLinesViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this._lineHeight,n=0|this.getLineNumberAtOrAfterVerticalOffset(e),o=0|this.getVerticalOffsetForLineNumber(n);let r=0|this._lineCount,s=0|this.getFirstWhitespaceIndexAfterLineNumber(n);const a=0|this.getWhitespacesCount();let l,c;-1===s?(s=a,c=r+1,l=0):(c=0|this.getAfterLineNumberForWhitespaceIndex(s),l=0|this.getHeightForWhitespaceIndex(s));let u=o,h=u;const d=5e5;let g=0;o>=d&&(g=Math.floor(o/d)*d,g=Math.floor(g/i)*i,h-=g);const f=[],p=e+(t-e)/2;let m=-1;for(let e=n;e<=r;e++){if(-1===m){const t=u,n=u+i;(t<=p&&pp)&&(m=e)}for(u+=i,f[e-n]=h,h+=i;c===e;)h+=l,u+=l,s++,s>=a?c=r+1:(c=0|this.getAfterLineNumberForWhitespaceIndex(s),l=0|this.getHeightForWhitespaceIndex(s));if(u>=t){r=e;break}}-1===m&&(m=r);const _=0|this.getVerticalOffsetForLineNumber(r);let v=n,b=r;return vt&&b--,{bigNumbersDelta:g,startLineNumber:n,endLineNumber:r,relativeVerticalOffset:f,centeredLineNumber:m,completelyVisibleStartLineNumber:v,completelyVisibleEndLineNumber:b}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e|=0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let i,n;return i=t>=1?this._lineHeight*t:0,n=e>0?this.getWhitespacesAccumulatedHeight(e-1):0,i+n+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e|=0;let t=0,i=this.getWhitespacesCount()-1;if(i<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(i)+this.getHeightForWhitespaceIndex(i))return-1;for(;t=o+this.getHeightForWhitespaceIndex(n))t=n+1;else{if(e>=o)return n;i=n}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e|=0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this.getWhitespacesCount())return null;const i=this.getVerticalOffsetForWhitespaceIndex(t);if(i>e)return null;const n=this.getHeightForWhitespaceIndex(t);return{id:this.getIdForWhitespaceIndex(t),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:i,height:n}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this.getWhitespacesCount()-1;if(i<0)return[];let o=[];for(let e=i;e<=n;e++){const i=this.getVerticalOffsetForWhitespaceIndex(e),n=this.getHeightForWhitespaceIndex(e);if(i>=t)break;o.push({id:this.getIdForWhitespaceIndex(e),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(e),verticalOffset:i,height:n})}return o}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].height}}Xi.INSTANCE_COUNT=0;class Qi{constructor(e,t,i,n){(e|=0)<0&&(e=0),(t|=0)<0&&(t=0),(i|=0)<0&&(i=0),(n|=0)<0&&(n=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=i,this.contentHeight=n,this.scrollHeight=Math.max(i,n)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class Ji extends d.JT{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new h.Q5),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new Qi(0,0,0,0),this._scrollable=this._register(new Gi.Rm(e,t)),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const i=t.contentWidth!==e.contentWidth,n=t.contentHeight!==e.contentHeight;(i||n)&&this._onDidContentSizeChange.fire(new Oi(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}}class en extends d.JT{constructor(e,t,i){super(),this._configuration=e;const n=this._configuration.options,o=n.get(128),r=n.get(72);this._linesLayout=new Xi(t,n.get(56),r.top,r.bottom),this._scrollable=this._register(new Ji(0,i)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new Qi(o.contentWidth,0,o.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(101)?125:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(56)&&this._linesLayout.setLineHeight(t.get(56)),e.hasChanged(72)){const e=t.get(72);this._linesLayout.setPadding(e.top,e.bottom)}if(e.hasChanged(128)){const e=t.get(128),i=e.contentWidth,n=e.height,o=this._scrollable.getScrollDimensions(),r=o.contentWidth;this._scrollable.setScrollDimensions(new Qi(i,o.contentWidth,n,this._getContentHeight(i,n,r)))}else this._updateHeight();e.hasChanged(101)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){const i=this._configuration.options.get(90);return 2===i.horizontal||e>=t?0:i.horizontalScrollbarSize}_getContentHeight(e,t,i){const n=this._configuration.options;let o=this._linesLayout.getLinesTotalHeight();return n.get(92)?o+=Math.max(0,t-n.get(56)-n.get(72).bottom):o+=this._getHorizontalScrollbarHeight(e,i),o}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,i=e.height,n=e.contentWidth;this._scrollable.setScrollDimensions(new Qi(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new St.l_(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new St.l_(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(e){const t=this._configuration.options,i=t.get(129),n=t.get(40);if(i.isViewportWrapping){const i=t.get(128),o=t.get(62);return e>i.contentWidth+n.typicalHalfwidthCharacterWidth&&o.enabled&&"right"===o.side?e+i.verticalScrollbarWidth:e}{const i=t.get(91)*n.typicalHalfwidthCharacterWidth,o=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+i,o)}}setMaxLineWidth(e){const t=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new Qi(t.width,this._computeContentWidth(e),t.height,t.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition();let t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i),scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e){return this._linesLayout.getVerticalOffsetForLineNumber(e)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){1===t?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}deltaScrollNow(e,t){const i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})}}var tn=i(3411),nn=i(3544);class on{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column)}convertModelRangeToViewRange(e){return this._lines.convertModelRangeToViewRange(e)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}}class rn{constructor(e){this._counts=e,this._isValid=!1,this._validEndIndex=-1,this._modelToView=[],this._viewToModel=[]}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._counts.length;e0?this._modelToView[e-1]:0;this._modelToView[e]=i+t;for(let n=0;n0?this._modelToView[t-1]:0;return new nn.T(t,e-i)}}class sn{constructor(e,t,i,n,o,r,s,a){this.model=e,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=t,this._monospaceLineBreaksComputerFactory=i,this.fontInfo=n,this.tabSize=o,this.wrappingStrategy=r,this.wrappingColumn=s,this.wrappingIndent=a,this._constructLines(!0,null)}dispose(){this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,[])}createCoordinatesConverter(){return new on(this)}_constructLines(e,t){this.lines=[],e&&(this.hiddenAreasIds=[]);let i=this.model.getLinesContent();const n=i.length,o=this.createLineBreaksComputer();for(let e=0;ethis.model.getDecorationRange(e))).sort(ne.e.compareRangesUsingStarts),l=1,c=0,u=-1,h=u+1=l&&t<=c,o=gn(r[e],!i);s[e]=o.getViewLineCount(),this.lines[e]=o}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new rn(s)}getHiddenAreas(){return this.hiddenAreasIds.map((e=>this.model.getDecorationRange(e)))}_reduceRanges(e){if(0===e.length)return[];let t=e.map((e=>this.model.validateRange(e))).sort(ne.e.compareRangesUsingStarts),i=[],n=t[0].startLineNumber,o=t[0].endLineNumber;for(let e=1,r=t.length;eo+1?(i.push(new ne.e(n,1,o,1)),n=r.startLineNumber,o=r.endLineNumber):r.endLineNumber>o&&(o=r.endLineNumber)}return i.push(new ne.e(n,1,o,1)),i}setHiddenAreas(e){let t=this._reduceRanges(e),i=this.hiddenAreasIds.map((e=>this.model.getDecorationRange(e))).sort(ne.e.compareRangesUsingStarts);if(t.length===i.length){let e=!1;for(let n=0;n=r&&t<=s?this.lines[e].isVisible()&&(this.lines[e]=this.lines[e].setVisible(!1),i=!0):(c=!0,this.lines[e].isVisible()||(this.lines[e]=this.lines[e].setVisible(!0),i=!0)),i){let t=this.lines[e].getViewLineCount();this.prefixSumComputer.changeValue(e,t)}}return c||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return!(e<1||e>this.lines.length)&&this.lines[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.lines.length?1:this.lines[e-1].getViewLineCount()}setTabSize(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,i,n){const o=this.fontInfo.equals(e),r=this.wrappingStrategy===t,s=this.wrappingColumn===i,a=this.wrappingIndent===n;if(o&&r&&s&&a)return!1;const l=o&&r&&!s&&a;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n;let c=null;if(l){c=[];for(let e=0,t=this.lines.length;e2&&!this.lines[t-2].isVisible();let r=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,s=0,a=[],l=[];for(let e=0,t=n.length;es?(l=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,c=l+s-1,d=c+1,g=d+(o-s)-1,a=!0):ot?t:0|e}getActiveIndentGuide(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),i=this._toValidViewLineNumber(i);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),r=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),s=this.model.getActiveIndentGuide(n.lineNumber,o.lineNumber,r.lineNumber),a=this.convertModelPositionToViewPosition(s.startLineNumber,1),l=this.convertModelPositionToViewPosition(s.endLineNumber,this.model.getLineMaxColumn(s.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:l.lineNumber,indent:s.indent}}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),n=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let o=[],r=[],s=[];const a=i.lineNumber-1,l=n.lineNumber-1;let c=null;for(let e=a;e<=l;e++){const t=this.lines[e];if(t.isVisible()){let n=t.getViewLineNumberOfModelPosition(0,e===a?i.column:1),o=t.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(e+1)),l=o-n+1,u=0;l>1&&1===t.getViewLineMinColumn(this.model,e+1,o)&&(u=0===n?1:2),r.push(l),s.push(u),null===c&&(c=new ie.L(e+1,0))}else null!==c&&(o=o.concat(this.model.getLinesIndentGuides(c.lineNumber,e)),c=null)}null!==c&&(o=o.concat(this.model.getLinesIndentGuides(c.lineNumber,n.lineNumber)),c=null);const u=t-e+1;let h=new Array(u),d=0;for(let e=0,t=o.length;et&&(h=!0,u=t-o+1);let d=c+u;if(l.getViewLinesData(this.model,n+1,c,d,o-e,i,a),o+=u,h)break}return a}validateViewPosition(e,t,i){e=this._toValidViewLineNumber(e);let n=this.prefixSumComputer.getIndexOf(e-1),o=n.index,r=n.remainder,s=this.lines[o],a=s.getViewLineMinColumn(this.model,o+1,r),l=s.getViewLineMaxColumn(this.model,o+1,r);tl&&(t=l);let c=s.getModelColumnOfViewPosition(r,t);return this.model.validatePosition(new ie.L(o+1,c)).equals(i)?new ie.L(e,t):this.convertModelPositionToViewPosition(i.lineNumber,i.column)}validateViewRange(e,t){const i=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),n=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new ne.e(i.lineNumber,i.column,n.lineNumber,n.column)}convertViewPositionToModelPosition(e,t){e=this._toValidViewLineNumber(e);let i=this.prefixSumComputer.getIndexOf(e-1),n=i.index,o=i.remainder,r=this.lines[n].getModelColumnOfViewPosition(o,t);return this.model.validatePosition(new ie.L(n+1,r))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new ne.e(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t){const i=this.model.validatePosition(new ie.L(e,t)),n=i.lineNumber,o=i.column;let r=n-1,s=!1;for(;r>0&&!this.lines[r].isVisible();)r--,s=!0;if(0===r&&!this.lines[r].isVisible())return new ie.L(1,1);const a=1+(0===r?0:this.prefixSumComputer.getAccumulatedValue(r-1));let l;return l=s?this.lines[r].getViewPositionOfModelPosition(a,this.model.getLineMaxColumn(r+1)):this.lines[n-1].getViewPositionOfModelPosition(a,o),l}convertModelRangeToViewRange(e){let t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn),i=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn);return e.startLineNumber===e.endLineNumber&&t.lineNumber!==i.lineNumber&&i.column===this.getViewLineMinColumn(i.lineNumber)?new ne.e(t.lineNumber,t.column,i.lineNumber-1,this.getViewLineMaxColumn(i.lineNumber-1)):new ne.e(t.lineNumber,t.column,i.lineNumber,i.column)}_getViewLineNumberForModelPosition(e,t){let i=e-1;if(this.lines[i].isVisible()){const e=1+(0===i?0:this.prefixSumComputer.getAccumulatedValue(i-1));return this.lines[i].getViewLineNumberOfModelPosition(e,t)}for(;i>0&&!this.lines[i].isVisible();)i--;if(0===i&&!this.lines[i].isVisible())return 1;const n=1+(0===i?0:this.prefixSumComputer.getAccumulatedValue(i-1));return this.lines[i].getViewLineNumberOfModelPosition(n,this.model.getLineMaxColumn(i+1))}getAllOverviewRulerDecorations(e,t,i){const n=this.model.getOverviewRulerDecorations(e,t),o=new mn;for(const e of n){const t=e.options.overviewRuler,n=t?t.position:0;if(0===n)continue;const r=t.getColor(i),s=this._getViewLineNumberForModelPosition(e.range.startLineNumber,e.range.startColumn),a=this._getViewLineNumberForModelPosition(e.range.endLineNumber,e.range.endColumn);o.accept(r,s,a,n)}return o.result}getDecorationsInRange(e,t,i){const n=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),o=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(o.lineNumber-n.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new ne.e(n.lineNumber,1,o.lineNumber,o.column),t,i);let r=[];const s=n.lineNumber-1,a=o.lineNumber-1;let l=null;for(let e=s;e<=a;e++)if(this.lines[e].isVisible())null===l&&(l=new ie.L(e+1,e===s?n.column:1));else if(null!==l){const n=this.model.getLineMaxColumn(e);r=r.concat(this.model.getDecorationsInRange(new ne.e(l.lineNumber,l.column,e,n),t,i)),l=null}null!==l&&(r=r.concat(this.model.getDecorationsInRange(new ne.e(l.lineNumber,l.column,o.lineNumber,o.column),t,i)),l=null),r.sort(((e,t)=>{const i=ne.e.compareRangesUsingStarts(e.range,t.range);return 0===i?e.idt.id?1:0:i}));let c=[],u=0,h=null;for(const e of r){const t=e.id;h!==t&&(h=t,c[u++]=e)}return c}normalizePosition(e,t){const i=this._toValidViewLineNumber(e.lineNumber),n=this.prefixSumComputer.getIndexOf(i-1),o=n.index,r=n.remainder;return this.lines[o].normalizePosition(this.model,o+1,r,e,t)}getLineIndentColumn(e){const t=this._toValidViewLineNumber(e),i=this.prefixSumComputer.getIndexOf(t-1),n=i.index;return 0===i.remainder?this.model.getLineIndentColumn(n+1):0}}class an{constructor(){}isVisible(){return!0}setVisible(e){return e?this:ln.INSTANCE}getLineBreakData(){return null}getViewLineCount(){return 1}getViewLineContent(e,t,i){return e.getLineContent(t)}getViewLineLength(e,t,i){return e.getLineLength(t)}getViewLineMinColumn(e,t,i){return e.getLineMinColumn(t)}getViewLineMaxColumn(e,t,i){return e.getLineMaxColumn(t)}getViewLineData(e,t,i){let n=e.getLineTokens(t),o=n.getLineContent();return new St.IP(o,!1,1,o.length+1,0,n.inflate())}getViewLinesData(e,t,i,n,o,r,s){r[o]?s[o]=this.getViewLineData(e,t,0):s[o]=null}getModelColumnOfViewPosition(e,t){return t}getViewPositionOfModelPosition(e,t){return new ie.L(e,t)}getViewLineNumberOfModelPosition(e,t){return e}normalizePosition(e,t,i,n,o){return n}}an.INSTANCE=new an;class ln{constructor(){}isVisible(){return!1}setVisible(e){return e?an.INSTANCE:this}getLineBreakData(){return null}getViewLineCount(){return 0}getViewLineContent(e,t,i){throw new Error("Not supported")}getViewLineLength(e,t,i){throw new Error("Not supported")}getViewLineMinColumn(e,t,i){throw new Error("Not supported")}getViewLineMaxColumn(e,t,i){throw new Error("Not supported")}getViewLineData(e,t,i){throw new Error("Not supported")}getViewLinesData(e,t,i,n,o,r,s){throw new Error("Not supported")}getModelColumnOfViewPosition(e,t){throw new Error("Not supported")}getViewPositionOfModelPosition(e,t){throw new Error("Not supported")}getViewLineNumberOfModelPosition(e,t){throw new Error("Not supported")}normalizePosition(e,t,i,n,o){throw new Error("Not supported")}}ln.INSTANCE=new ln;class cn{constructor(e,t){this._lineBreakData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getLineBreakData(){return this._lineBreakData}getViewLineCount(){return this._isVisible?this._lineBreakData.breakOffsets.length:0}getInputStartOffsetOfOutputLineIndex(e){return St.le.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets,e,0)}getInputEndOffsetOfOutputLineIndex(e,t,i){return i+1===this._lineBreakData.breakOffsets.length?e.getLineMaxColumn(t)-1:St.le.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets,i+1,0)}getViewLineContent(e,t,i){if(!this._isVisible)throw new Error("Not supported");let n=this.getInputStartOffsetOfOutputLineIndex(i),o=this.getInputEndOffsetOfOutputLineIndex(e,t,i),r=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:o+1});return i>0&&(r=hn(this._lineBreakData.wrappedTextIndentLength)+r),r}getViewLineLength(e,t,i){if(!this._isVisible)throw new Error("Not supported");let n=this.getInputStartOffsetOfOutputLineIndex(i),o=this.getInputEndOffsetOfOutputLineIndex(e,t,i)-n;return i>0&&(o=this._lineBreakData.wrappedTextIndentLength+o),o}getViewLineMinColumn(e,t,i){if(!this._isVisible)throw new Error("Not supported");return this._getViewLineMinColumn(i)}_getViewLineMinColumn(e){return e>0?this._lineBreakData.wrappedTextIndentLength+1:1}getViewLineMaxColumn(e,t,i){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineLength(e,t,i)+1}getViewLineData(e,t,i){if(!this._isVisible)throw new Error("Not supported");let n=this.getInputStartOffsetOfOutputLineIndex(i),o=this.getInputEndOffsetOfOutputLineIndex(e,t,i),r=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:o+1});i>0&&(r=hn(this._lineBreakData.wrappedTextIndentLength)+r);let s=i>0?this._lineBreakData.wrappedTextIndentLength+1:1,a=r.length+1,l=i+10&&(c=this._lineBreakData.wrappedTextIndentLength);let u=e.getLineTokens(t);const h=0===i?0:this._lineBreakData.breakOffsetsVisibleColumn[i-1];return new St.IP(r,l,s,a,h,u.sliceAndInflate(n,o,c))}getViewLinesData(e,t,i,n,o,r,s){if(!this._isVisible)throw new Error("Not supported");for(let a=i;a0&&(i0&&(o+=this._lineBreakData.wrappedTextIndentLength),new ie.L(e+n,o)}getViewLineNumberOfModelPosition(e,t){if(!this._isVisible)throw new Error("Not supported");return e+St.le.getOutputPositionOfInputOffset(this._lineBreakData.breakOffsets,t-1).outputLineIndex}normalizePosition(e,t,i,n,o){if(0===o){if(i>0&&n.column===this._getViewLineMinColumn(i))return new ie.L(n.lineNumber-1,this.getViewLineMaxColumn(e,t,i-1))}else if(1===o&&i=un.length)for(let t=1;t<=e;t++)un[t]=dn(t);return un[e]}function dn(e){return new Array(e+1).join(" ")}function gn(e,t){return null===e?t?an.INSTANCE:ln.INSTANCE:new cn(e,t)}class fn{constructor(e){this._lines=e}_validPosition(e){return this._lines.model.validatePosition(e)}_validRange(e){return this._lines.model.validateRange(e)}convertViewPositionToModelPosition(e){return this._validPosition(e)}convertViewRangeToModelRange(e){return this._validRange(e)}validateViewPosition(e,t){return this._validPosition(t)}validateViewRange(e,t){return this._validRange(t)}convertModelPositionToViewPosition(e){return this._validPosition(e)}convertModelRangeToViewRange(e){return this._validRange(e)}modelPositionIsVisible(e){const t=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t)}getModelLineViewLineCount(e){return 1}}class pn{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new fn(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,i,n){return!1}createLineBreaksComputer(){let e=[];return{addRequest:(t,i)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,i){return new ki(t,i)}onModelLinesInserted(e,t,i,n){return new Di(t,i)}onModelLineChanged(e,t,i){return[!1,new xi(t,t),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,i){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesIndentGuides(e,t){const i=t-e+1;let n=new Array(i);for(let e=0;e=t)return void(i>r&&(o[o.length-1]=i));o.push(n,t,i)}else this.result[e]=[n,t,i]}}class _n{constructor(e,t,i,n,o){this.editorId=e,this.model=t,this.configuration=i,this._linesCollection=n,this._coordinatesConverter=o,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const t=e.id;let i=this._decorationsCache[t];if(!i){const n=e.range,o=e.options;let r;if(o.isWholeLine){const e=this._coordinatesConverter.convertModelPositionToViewPosition(new ie.L(n.startLineNumber,1)),t=this._coordinatesConverter.convertModelPositionToViewPosition(new ie.L(n.endLineNumber,this.model.getLineMaxColumn(n.endLineNumber)));r=new ne.e(e.lineNumber,e.column,t.lineNumber,t.column)}else r=this._coordinatesConverter.convertModelRangeToViewRange(n);i=new St.$l(r,o),this._decorationsCache[t]=i}return i}getDecorationsViewportData(e){let t=null!==this._cachedModelDecorationsResolver;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}_getDecorationsViewportData(e){const t=this._linesCollection.getDecorationsInRange(e,this.editorId,(0,j.$J)(this.configuration.options)),i=e.startLineNumber,n=e.endLineNumber;let o=[],r=0,s=[];for(let e=i;e<=n;e++)s[e-i]=[];for(let e=0,a=t.length;ethis.tokenizeViewport()),50)),this._updateConfigurationViewLineCount=this._register(new C.pY((()=>this._updateConfigurationViewLineCountNow()),0)),this._hasFocus=!1,this._viewportStartLine=-1,this._viewportStartLineTrackedRange=null,this._viewportStartLineDelta=0,this.model.isTooLargeForTokenization())this._lines=new pn(this.model);else{const e=this._configuration.options,t=e.get(40),i=e.get(122),r=e.get(129),s=e.get(121);this._lines=new sn(this.model,n,o,t,this.model.getOptions().tabSize,i,r.wrappingColumn,s)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new $i(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new en(this._configuration,this.getLineCount(),r)),this._register(this.viewLayout.onDidScroll((e=>{e.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),this._eventDispatcher.emitSingleViewEvent(new Ni(e)),this._eventDispatcher.emitOutgoingEvent(new Pi(e.oldScrollWidth,e.oldScrollLeft,e.oldScrollHeight,e.oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop))}))),this._register(this.viewLayout.onDidContentSizeChange((e=>{this._eventDispatcher.emitOutgoingEvent(e)}))),this._decorations=new _n(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}}))),this._register(Ct.getInstance().onDidChange((()=>{this._eventDispatcher.emitSingleViewEvent(new Mi)}))),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this.invalidateMinimapColorCache(),this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,null,1),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}tokenizeViewport(){const e=this.viewLayout.getLinesViewportData(),t=this.coordinatesConverter.convertViewPositionToModelPosition(new ie.L(e.startLineNumber,1)),i=this.coordinatesConverter.convertViewPositionToModelPosition(new ie.L(e.endLineNumber,1));this.model.tokenizeViewport(t.lineNumber,i.lineNumber)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new wi(e)),this._eventDispatcher.emitOutgoingEvent(new Fi(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new pi)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new mi)}onDidColorThemeChange(){this._eventDispatcher.emitSingleViewEvent(new Ei)}_onConfigurationChanged(e,t){let i=null;if(-1!==this._viewportStartLine){let e=new ie.L(this._viewportStartLine,this.getLineMinColumn(this._viewportStartLine));i=this.coordinatesConverter.convertViewPositionToModelPosition(e)}let n=!1;const o=this._configuration.options,r=o.get(40),s=o.get(122),a=o.get(129),l=o.get(121);if(this._lines.setWrappingSettings(r,s,a.wrappingColumn,l)&&(e.emitViewEvent(new yi),e.emitViewEvent(new Si),e.emitViewEvent(new bi(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),0!==this.viewLayout.getCurrentScrollTop()&&(n=!0),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(78)&&(this._decorations.reset(),e.emitViewEvent(new bi(null))),e.emitViewEvent(new _i(t)),this.viewLayout.onConfigurationChanged(t),n&&i){const e=this.coordinatesConverter.convertModelPositionToViewPosition(i),t=this.viewLayout.getVerticalOffsetForLineNumber(e.lineNumber);this.viewLayout.setScrollPosition({scrollTop:t+this._viewportStartLineDelta},1)}oe.LM.shouldRecreate(t)&&(this.cursorConfig=new oe.LM(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeRawContentFast((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();let i=!1,n=!1;const o=e.changes,r=e.versionId,s=this._lines.createLineBreaksComputer();for(const e of o)switch(e.changeType){case 4:for(const t of e.detail)s.addRequest(t,null);break;case 2:s.addRequest(e.detail,null)}const a=s.finalize();let l=0;for(const e of o)switch(e.changeType){case 1:this._lines.onModelFlushed(),t.emitViewEvent(new yi),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),i=!0;break;case 3:{const n=this._lines.onModelLinesDeleted(r,e.fromLineNumber,e.toLineNumber);null!==n&&(t.emitViewEvent(n),this.viewLayout.onLinesDeleted(n.fromLineNumber,n.toLineNumber)),i=!0;break}case 4:{const n=a.slice(l,l+e.detail.length);l+=e.detail.length;const o=this._lines.onModelLinesInserted(r,e.fromLineNumber,e.toLineNumber,n);null!==o&&(t.emitViewEvent(o),this.viewLayout.onLinesInserted(o.fromLineNumber,o.toLineNumber)),i=!0;break}case 2:{const i=a[l];l++;const[o,s,c,u]=this._lines.onModelLineChanged(r,e.lineNumber,i);n=o,s&&t.emitViewEvent(s),c&&(t.emitViewEvent(c),this.viewLayout.onLinesInserted(c.fromLineNumber,c.toLineNumber)),u&&(t.emitViewEvent(u),this.viewLayout.onLinesDeleted(u.fromLineNumber,u.toLineNumber));break}}this._lines.acceptVersionId(r),this.viewLayout.onHeightMaybeChanged(),!i&&n&&(t.emitViewEvent(new Si),t.emitViewEvent(new bi(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}if(this._viewportStartLine=-1,this._configuration.setMaxLineNumber(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&this._viewportStartLineTrackedRange){const e=this.model._getTrackedRange(this._viewportStartLineTrackedRange);if(e){const t=this.coordinatesConverter.convertModelPositionToViewPosition(e.getStartPosition()),i=this.viewLayout.getVerticalOffsetForLineNumber(t.lineNumber);this.viewLayout.setScrollPosition({scrollTop:i+this._viewportStartLineDelta},1)}}try{const t=this._eventDispatcher.beginEmitViewEvents();this._cursor.onModelContentChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}}))),this._register(this.model.onDidChangeTokens((e=>{let t=[];for(let i=0,n=e.ranges.length;i{this._eventDispatcher.emitSingleViewEvent(new Ci),this.cursorConfig=new oe.LM(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)}))),this._register(this.model.onDidChangeLanguage((e=>{this.cursorConfig=new oe.LM(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)}))),this._register(this.model.onDidChangeOptions((e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const e=this._eventDispatcher.beginEmitViewEvents();e.emitViewEvent(new yi),e.emitViewEvent(new Si),e.emitViewEvent(new bi(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new oe.LM(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)}))),this._register(this.model.onDidChangeDecorations((e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new bi(e))})))}setHiddenAreas(e){try{const t=this._eventDispatcher.beginEmitViewEvents();this._lines.setHiddenAreas(e)&&(t.emitViewEvent(new yi),t.emitViewEvent(new Si),t.emitViewEvent(new bi(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(128),t=this._configuration.options.get(56),i=Math.max(20,Math.round(e.height/t)),n=this.viewLayout.getLinesViewportData(),o=Math.max(1,n.completelyVisibleStartLineNumber-i),r=Math.min(this.getLineCount(),n.completelyVisibleEndLineNumber+i);return this._toModelVisibleRanges(new ne.e(o,this.getLineMinColumn(o),r,this.getLineMaxColumn(r)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),i=this._lines.getHiddenAreas();if(0===i.length)return[t];let n=[],o=0,r=t.startLineNumber,s=t.startColumn,a=t.endLineNumber,l=t.endColumn;for(let e=0,t=i.length;ea||(re.startLineNumber));let o="";for(let e=0;e0&&i[e-1]===i[e]||(o+=this.model.getLineContent(i[e])+n);return o}if(o&&t){let t=[],n=0;for(const o of e){const e=o.startLineNumber;o.isEmpty()?e!==n&&t.push(this.model.getLineContent(e)):t.push(this.model.getValueInRange(o,i?2:0)),n=e}return 1===t.length?t[0]:t}let s=[];for(const t of e)t.isEmpty()||s.push(this.model.getValueInRange(t,i?2:0));return 1===s.length?s[0]:s}getRichTextToCopy(e,t){const i=this.model.getLanguageIdentifier();if(1===i.id)return null;if(1!==e.length)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const e=n.startLineNumber;n=new ne.e(e,this.model.getLineMinColumn(e),e,this.model.getLineMaxColumn(e))}const o=this._configuration.options.get(40),r=this._getColorMap();let s;return/[:;\\\/<>]/.test(o.fontFamily)||o.fontFamily===j.hL.fontFamily?s=j.hL.fontFamily:(s=o.fontFamily,s=s.replace(/"/g,"'"),/[,']/.test(s)||/[+ ]/.test(s)&&(s=`'${s}'`),s=`${s}, ${j.hL.fontFamily}`),{mode:i.language,html:`
    `+this._getHTMLToCopy(n,r)+"
    "}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,r=e.endColumn,s=this.getTabSize();let a="";for(let e=i;e<=o;e++){const l=this.model.getLineTokens(e),c=l.getLineContent(),u=e===i?n-1:0,h=e===o?r-1:c.length;a+=""===c?"
    ":(0,Ki.F)(c,l.inflate(),t,u,h,s,b.ED)}return a}_getColorMap(){let e=wt.RW.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;ithis._cursor.setStates(n,e,t,i)))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,i=0){this._withViewEventsCollector((n=>this._cursor.setSelections(n,e,t,i)))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector((t=>this._cursor.restoreState(t,e)))}_executeCursorEdit(e){this._cursor.context.cursorConfig.readOnly?this._eventDispatcher.emitOutgoingEvent(new Wi):this._withViewEventsCollector(e)}executeEdits(e,t,i){this._executeCursorEdit((n=>this._cursor.executeEdits(n,e,t,i)))}startComposition(){this._cursor.setIsDoingComposition(!0),this._executeCursorEdit((e=>this._cursor.startComposition(e)))}endComposition(e){this._cursor.setIsDoingComposition(!1),this._executeCursorEdit((t=>this._cursor.endComposition(t,e)))}type(e,t){this._executeCursorEdit((i=>this._cursor.type(i,e,t)))}compositionType(e,t,i,n,o){this._executeCursorEdit((r=>this._cursor.compositionType(r,e,t,i,n,o)))}paste(e,t,i,n){this._executeCursorEdit((o=>this._cursor.paste(o,e,t,i,n)))}cut(e){this._executeCursorEdit((t=>this._cursor.cut(t,e)))}executeCommand(e,t){this._executeCursorEdit((i=>this._cursor.executeCommand(i,e,t)))}executeCommands(e,t){this._executeCursorEdit((i=>this._cursor.executeCommands(i,e,t)))}revealPrimaryCursor(e,t){this._withViewEventsCollector((i=>this._cursor.revealPrimary(i,e,t,0)))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),i=new ne.e(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new Li(e,i,null,0,!0,0))))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new ne.e(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new Li(e,i,null,0,!0,0))))}revealRange(e,t,i,n,o){this._withViewEventsCollector((r=>r.emitViewEvent(new Li(e,i,null,n,t,o))))}getVerticalOffsetForLineNumber(e){return this.viewLayout.getVerticalOffsetForLineNumber(e)}getScrollTop(){return this.viewLayout.getCurrentScrollTop()}setScrollTop(e,t){this.viewLayout.setScrollPosition({scrollTop:e},t)}setScrollPosition(e,t){this.viewLayout.setScrollPosition(e,t)}deltaScrollNow(e,t){this.viewLayout.deltaScrollNow(e,t)}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new Ii),this._eventDispatcher.emitOutgoingEvent(new Bi))}setMaxLineWidth(e){this.viewLayout.setMaxLineWidth(e)}_withViewEventsCollector(e){try{e(this._eventDispatcher.beginEmitViewEvents())}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}}var bn=i(4565),yn=i(8819),wn=i(2065),Cn=i(972),Sn=i(9422),xn=i(1106),kn=i(8401),Dn=i(4906);class Ln extends Dn.N{constructor(e,t){super(0);for(let t=0;t=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let Nn=[],En=[];class An{constructor(e,t){this.classifier=new Ln(e,t)}static create(e){return new An(e.get(117),e.get(116))}createLineBreaksComputer(e,t,i,n){t|=0,i=+i;let o=[],r=[];return{addRequest:(e,t)=>{o.push(e),r.push(t)},finalize:()=>{const s=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth;let a=[];for(let e=0,l=o.length;e=0){let e=Math.abs(c[b]-_);for(;b+1=e)break;e=t,b++}}for(;bt&&(t=p,o=m);let s=0,u=0,y=0,w=0;if(o<=_){let m=o,v=0===t?0:i.charCodeAt(t-1),b=0===t?0:e.get(v),C=!0;for(let o=t;op&&On(0,b,a,l)&&(s=t,u=m),m+=c,m>_){t>p?(y=t,w=m-c):(y=o+1,w=m),m-u>h&&(s=0),C=!1;break}v=a,b=l}if(C){f>0&&(d[f]=l[l.length-1],g[f]=c[l.length-1],f++);break}}if(0===s){let a=o,l=i.charCodeAt(t),c=e.get(l),d=!1;for(let n=t-1;n>=p;n--){const t=n+1,o=i.charCodeAt(n);if(9===o){d=!0;break}let g,f;if(Le.YK(o)?(n--,g=0,f=2):(g=e.get(o),f=Le.K7(o)?r:1),a<=_){if(0===y&&(y=t,w=a),a<=_-h)break;if(On(0,g,l,c)){s=t,u=a;break}}a-=f,l=o,c=g}if(0!==s){const e=h-(w-u);if(e<=n){const t=i.charCodeAt(y);let o;o=Le.ZG(t)?2:Tn(t,w,n,r),e-o<0&&(s=0)}}if(d){b--;continue}}if(0===s&&(s=y,u=w),s<=p){const e=i.charCodeAt(p);Le.ZG(e)?(s=p+2,u=m+2):(s=p+1,u=m+Tn(e,m,n,r))}for(p=s,d[f]=s,m=u,g[f]=u,f++,_=u+h;b<0||b=C)break;C=e,b++}}return 0===f?null:(d.length=f,g.length=f,Nn=t.breakOffsets,En=t.breakOffsetsVisibleColumn,t.breakOffsets=d,t.breakOffsetsVisibleColumn=g,t.wrappedTextIndentLength=u,t)}function In(e,t,i,n,o,r){if(-1===n)return null;const s=t.length;if(s<=1)return null;const a=Fn(t,i,n,o,r),l=n-a;let c=[],u=[],h=0,d=0,g=0,f=n,p=t.charCodeAt(0),m=e.get(p),_=Tn(p,0,i,o),v=1;Le.ZG(p)&&(_+=1,p=t.charCodeAt(1),m=e.get(p),v++);for(let n=v;nf&&((0===d||_-g>l)&&(d=r,g=_-v),c[h]=d,u[h]=g,h++,f=g+l,d=0),p=s,m=a}return 0===h?null:(c[h]=s,u[h]=_,new St.le(c,u,a))}function Tn(e,t,i,n){return 9===e?i-t%i:Le.K7(e)||e<32?n:1}function Rn(e,t){return t-e%t}function On(e,t,i,n){return 32!==i&&(2===t||3===t&&2!==n||1===n||3===n&&1!==t)}function Fn(e,t,i,n,o){let r=0;if(0!==o){const s=Le.LC(e);if(-1!==s){for(let i=0;ii&&(r=0)}}return r}var Pn;const Bn=null===(Pn=window.trustedTypes)||void 0===Pn?void 0:Pn.createPolicy("domLineBreaksComputer",{createHTML:e=>e});class zn{static create(){return new zn}constructor(){}createLineBreaksComputer(e,t,i,n){t|=0,i=+i;let o=[];return{addRequest:(e,t)=>{o.push(e)},finalize:()=>function(e,t,i,n,o){var r;if(-1===n){const t=[];for(let i=0,n=e.length;is?(a=0,f=0):p=s-e}const m=r.substr(a),_=Wn(m,f,i,p,l);c[n]=a,u[n]=f,h[n]=m,d[n]=_[0],g[n]=_[1]}const p=l.build(),m=null!==(r=null==Bn?void 0:Bn.createHTML(p))&&void 0!==r?r:p;a.innerHTML=m,a.style.position="absolute",a.style.top="10000",a.style.wordWrap="break-word",document.body.appendChild(a);let _=document.createRange();const v=Array.prototype.slice.call(a.children,0);let b=[];for(let t=0;t');const r=e.length;let s=t,a=0,l=[],c=[],u=0");for(let t=0;t"),l[t]=a,c[t]=s;const n=u;u=t+1"),l[e.length]=a,c[e.length]=s,o.appendASCIIString(""),[l,c]}function Vn(e,t,i,n){if(i.length<=1)return null;const o=Array.prototype.slice.call(t.children,0),r=[];try{Hn(e,o,n,0,null,i.length-1,null,r)}catch(e){return console.log(e),null}return 0===r.length?null:(r.push(i.length),r)}function Hn(e,t,i,n,o,r,s,a){if(n===r)return;if(o=o||$n(e,t,i[n],i[n+1]),s=s||$n(e,t,i[r],i[r+1]),Math.abs(o[0].top-s[0].top)<=.1)return;if(n+1===r)return void a.push(r);const l=n+(r-n)/2|0,c=$n(e,t,i[l],i[l+1]);Hn(e,t,i,n,o,l,c,a),Hn(e,t,i,l,c,r,s,a)}function $n(e,t,i,n){return e.setStart(t[i/16384|0].firstChild,i%16384),e.setEnd(t[n/16384|0].firstChild,n%16384),e.getClientRects()}var Un=i(5795),jn=function(e,t){return function(i,n){t(i,n,e)}};let qn=0;class Kn{constructor(e,t,i,n,o){this.model=e,this.viewModel=t,this.view=i,this.hasRealView=n,this.listenersToRemove=o}dispose(){(0,d.B9)(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let Gn=class e extends d.JT{constructor(e,t,i,n,r,s,a,l,c,d){super(),this._onDidDispose=this._register(new h.Q5),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new h.Q5),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new h.Q5),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new h.Q5),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new h.Q5),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new h.Q5),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeConfiguration=this._register(new h.Q5),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new h.Q5),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new h.Q5),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new h.Q5),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new h.Q5),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new h.Q5),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new Yn),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new Yn),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new h.Q5),this.onWillType=this._onWillType.event,this._onDidType=this._register(new h.Q5),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new h.Q5),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new h.Q5),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new h.Q5),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new h.Q5),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new h.Q5),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new h.Q5),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new h.Q5),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new h.Q5),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onContextMenu=this._register(new h.Q5),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new h.Q5),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new h.Q5),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new h.Q5),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new h.Q5),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new h.Q5),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new h.Q5),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new h.Q5),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new h.Q5),this.onDidChangeViewZones=this._onDidChangeViewZones.event;const g=Object.assign({},t);let f;this._domElement=e,this._overflowWidgetsDomNode=g.overflowWidgetsDomNode,delete g.overflowWidgetsDomNode,this._id=++qn,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this.isSimpleWidget=i.isSimpleWidget||!1,this._telemetryData=i.telemetryData,this._configuration=this._register(this._createConfiguration(g,d)),this._register(this._configuration.onDidChange((e=>{this._onDidChangeConfiguration.fire(e);const t=this._configuration.options;if(e.hasChanged(128)){const e=t.get(128);this._onDidLayoutChange.fire(e)}}))),this._contextKeyService=this._register(a.createScoped(this._domElement)),this._notificationService=c,this._codeEditorService=r,this._commandService=s,this._themeService=l,this._register(new Zn(this,this._contextKeyService)),this._register(new Xn(this,this._contextKeyService)),this._instantiationService=n.createChild(new Cn.y([yn.i6,this._contextKeyService])),this._modelData=null,this._contributions={},this._actions={},this._focusTracker=new Qn(e),this._focusTracker.onChange((()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={},f=Array.isArray(i.contributions)?i.contributions:o.Uc.getEditorContributions();for(const e of f)if(this._contributions[e.id])(0,u.dL)(new Error(`Cannot have two contributions with the same id ${e.id}`));else try{const t=this._instantiationService.createInstance(e.ctor,this);this._contributions[e.id]=t}catch(e){(0,u.dL)(e)}o.Uc.getEditorActions().forEach((e=>{if(this._actions[e.id])return void(0,u.dL)(new Error(`Cannot have two actions with the same id ${e.id}`));const t=new Ui.p(e.id,e.label,e.alias,(0,kn.f6)(e.precondition),(()=>this._instantiationService.invokeFunction((t=>Promise.resolve(e.runEditorCommand(t,this,null))))),this._contextKeyService);this._actions[t.id]=t})),this._codeEditorService.addCodeEditor(this)}_createConfiguration(e,t){return new f.V(this.isSimpleWidget,e,this._domElement,t)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return ji.g.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();const e=Object.keys(this._contributions);for(let t=0,i=e.length;tne.e.lift(e))))}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return oe.io.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e){if(this._modelData){if(!ie.L.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections("api",[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!ne.e.isIRange(e))throw new Error("Invalid arguments");const o=this._modelData.model.validateRange(e),r=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(o);this._modelData.viewModel.revealRange("api",i,r,t,n)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,i){if("number"!=typeof e)throw new Error("Invalid arguments");this._sendRevealRange(new ne.e(e,1,e,1),t,!1,i)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,i,n){if(!ie.L.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new ne.e(e.lineNumber,e.column,e.lineNumber,e.column),t,i,n)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e){const t=_.Y.isISelection(e),i=ne.e.isIRange(e);if(!t&&!i)throw new Error("Invalid arguments");if(t)this._setSelectionImpl(e);else if(i){const t={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(t)}}_setSelectionImpl(e){if(!this._modelData)return;const t=new _.Y(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections("api",[t])}revealLines(e,t,i=0){this._revealLines(e,t,0,i)}revealLinesInCenter(e,t,i=0){this._revealLines(e,t,1,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._revealLines(e,t,2,i)}revealLinesNearTop(e,t,i=0){this._revealLines(e,t,5,i)}_revealLines(e,t,i,n){if("number"!=typeof e||"number"!=typeof t)throw new Error("Invalid arguments");this._sendRevealRange(new ne.e(e,1,t,1),i,!1,n)}revealRange(e,t=0,i=!1,n=!0){this._revealRange(e,i?1:0,n,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,i,n){if(!ne.e.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(ne.e.lift(e),t,i,n)}setSelections(e,t="api",i=0){if(this._modelData){if(!e||0===e.length)throw new Error("Invalid arguments");for(let t=0,i=e.length;te.isSupported())),e}getAction(e){return this._actions[e]||null}trigger(e,t,i){switch(i=i||{},t){case"compositionStart":return void this._startComposition();case"compositionEnd":return void this._endComposition(e);case"type":{const t=i;return void this._type(e,t.text||"")}case"replacePreviousChar":{const t=i;return void this._compositionType(e,t.text||"",t.replaceCharCnt||0,0,0)}case"compositionType":{const t=i;return void this._compositionType(e,t.text||"",t.replacePrevCharCnt||0,t.replaceNextCharCnt||0,t.positionDelta||0)}case"paste":{const t=i;return void this._paste(e,t.text||"",t.pasteOnNewLine||!1,t.multicursorText||null,t.mode||null)}case"cut":return void this._cut(e)}const n=this.getAction(t);n?Promise.resolve(n.run()).then(void 0,u.dL):this._modelData&&(this._triggerEditorCommand(e,t,i)||this._triggerCommand(t,i))}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){this._modelData&&0!==t.length&&("keyboard"===e&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),"keyboard"===e&&this._onDidType.fire(t))}_compositionType(e,t,i,n,o){this._modelData&&this._modelData.viewModel.compositionType(t,i,n,o,e)}_paste(e,t,i,n,o){if(!this._modelData||0===t.length)return;const r=this._modelData.viewModel.getSelection().getStartPosition();this._modelData.viewModel.paste(t,i,n,e);const s=this._modelData.viewModel.getSelection().getStartPosition();"keyboard"===e&&this._onDidPaste.fire({range:new ne.e(r.lineNumber,r.column,s.lineNumber,s.column),mode:o})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){const n=o.Uc.getEditorCommand(t);return!!n&&((i=i||{}).source=e,this._instantiationService.invokeFunction((e=>{Promise.resolve(n.runEditorCommand(e,this,i)).then(void 0,u.dL)})),!0)}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!!this._modelData&&!this._configuration.options.get(78)&&(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!!this._modelData&&!this._configuration.options.get(78)&&(this._modelData.model.popStackElement(),!0)}executeEdits(e,t,i){if(!this._modelData)return!1;if(this._configuration.options.get(78))return!1;let n;return n=i?Array.isArray(i)?()=>i:i:()=>null,this._modelData.viewModel.executeEdits(e,t,n),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,(0,j.$J)(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?0===e.length&&0===t.length?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){const t=this._decorationTypeKeysToIds[e];t&&this.deltaDecorations(t,[]),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(128)}createOverviewRuler(e){return this._modelData&&this._modelData.hasRealView?this._modelData.view.createOverviewRuler(e):null}getContainerDomNode(){return this._domElement}getDomNode(){return this._modelData&&this._modelData.hasRealView?this._modelData.view.domNode.domNode:null}delegateVerticalScrollbarMouseDown(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateVerticalScrollbarMouseDown(e)}layout(e){this._configuration.observeReferenceElement(e),this.render()}focus(){this._modelData&&this._modelData.hasRealView&&this._modelData.view.focus()}hasTextFocus(){return!(!this._modelData||!this._modelData.hasRealView)&&this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const i=this._contentWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(i)}}removeContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const e=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(e)}}addOverlayWidget(e){const t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const i=this._overlayWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(i)}}removeOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const e=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(e)}}changeViewZones(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getTargetAtClientPoint(e,t):null}getScrolledVisiblePosition(t){if(!this._modelData||!this._modelData.hasRealView)return null;const i=this._modelData.model.validatePosition(t),n=this._configuration.options,o=n.get(128);return{top:e._getVerticalOffsetForPosition(this._modelData,i.lineNumber,i.column)-this.getScrollTop(),left:this._modelData.view.getOffsetForColumn(i.lineNumber,i.column)+o.glyphMarginWidth+o.lineNumbersWidth+o.decorationsWidth-this.getScrollLeft(),height:n.get(56)}}getOffsetForColumn(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getOffsetForColumn(e,t):-1}render(e=!1){this._modelData&&this._modelData.hasRealView&&this._modelData.view.render(!0,e)}setAriaOptions(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.setAriaOptions(e)}applyFontInfo(e){f.V.applyFontInfoSlow(e,this._configuration.options.get(40))}_attachModel(e){if(!e)return void(this._modelData=null);const t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageIdentifier().language),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setMaxLineNumber(e.getLineCount()),e.onBeforeAttached();const i=new vn(this._id,this._configuration,e,zn.create(),An.create(this._configuration.options),(e=>c.jL(e)));t.push(e.onDidChangeDecorations((e=>this._onDidChangeModelDecorations.fire(e)))),t.push(e.onDidChangeLanguage((t=>{this._domElement.setAttribute("data-mode-id",e.getLanguageIdentifier().language),this._onDidChangeModelLanguage.fire(t)}))),t.push(e.onDidChangeLanguageConfiguration((e=>this._onDidChangeModelLanguageConfiguration.fire(e)))),t.push(e.onDidChangeContent((e=>this._onDidChangeModelContent.fire(e)))),t.push(e.onDidChangeOptions((e=>this._onDidChangeModelOptions.fire(e)))),t.push(e.onWillDispose((()=>this.setModel(null)))),t.push(i.onEvent((e=>{switch(e.kind){case 0:this._onDidContentSizeChange.fire(e);break;case 1:this._editorTextFocus.setValue(e.hasFocus);break;case 2:this._onDidScrollChange.fire(e);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidAttemptReadOnlyEdit.fire();break;case 5:{e.reachedMaxCursorCount&&this._notificationService.warn(l.N("cursors.maximum","The number of cursors has been limited to {0}.",$i.MAX_CURSOR_COUNT));const t=[];for(let i=0,n=e.selections.length;i{this._paste("keyboard",e,t,i,n)},type:e=>{this._type("keyboard",e)},compositionType:(e,t,i,n)=>{this._compositionType("keyboard",e,t,i,n)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:{paste:(e,t,i,n)=>{const o={text:e,pasteOnNewLine:t,multicursorText:i,mode:n};this._commandService.executeCommand("paste",o)},type:e=>{const t={text:e};this._commandService.executeCommand("type",t)},compositionType:(e,t,i,n)=>{if(i||n){const o={text:e,replacePrevCharCnt:t,replaceNextCharCnt:i,positionDelta:n};this._commandService.executeCommand("compositionType",o)}else{const i={text:e,replaceCharCnt:t};this._commandService.executeCommand("replacePreviousChar",i)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const i=new Ve(e.coordinatesConverter);return i.onKeyDown=e=>this._onKeyDown.fire(e),i.onKeyUp=e=>this._onKeyUp.fire(e),i.onContextMenu=e=>this._onContextMenu.fire(e),i.onMouseMove=e=>this._onMouseMove.fire(e),i.onMouseLeave=e=>this._onMouseLeave.fire(e),i.onMouseDown=e=>this._onMouseDown.fire(e),i.onMouseUp=e=>this._onMouseUp.fire(e),i.onMouseDrag=e=>this._onMouseDrag.fire(e),i.onMouseDrop=e=>this._onMouseDrop.fire(e),i.onMouseDropCanceled=e=>this._onMouseDropCanceled.fire(e),i.onMouseWheel=e=>this._onMouseWheel.fire(e),[new ui(t,this._configuration,this._themeService,e,i,this._overflowWidgetsDomNode),!0]}_postDetachModelCleanup(e){e&&e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&this._domElement.removeChild(t),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return null!==this._modelData}};Gn=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([jn(3,wn.TG),jn(4,p.$),jn(5,bn.H),jn(6,yn.i6),jn(7,Me.XE),jn(8,Sn.lT),jn(9,xn.F)],Gn);class Yn extends d.JT{constructor(){super(),this._onDidChangeToTrue=this._register(new h.Q5),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new h.Q5),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,2===this._value?this._onDidChangeToTrue.fire():1===this._value&&this._onDidChangeToFalse.fire())}}class Zn extends d.JT{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=qi.u.editorSimpleInput.bindTo(t),this._editorFocus=qi.u.focus.bindTo(t),this._textInputFocus=qi.u.textInputFocus.bindTo(t),this._editorTextFocus=qi.u.editorTextFocus.bindTo(t),this._editorTabMovesFocus=qi.u.tabMovesFocus.bindTo(t),this._editorReadonly=qi.u.readOnly.bindTo(t),this._inDiffEditor=qi.u.inDiffEditor.bindTo(t),this._editorColumnSelection=qi.u.columnSelection.bindTo(t),this._hasMultipleSelections=qi.u.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=qi.u.hasNonEmptySelection.bindTo(t),this._canUndo=qi.u.canUndo.bindTo(t),this._canRedo=qi.u.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromConfig()))),this._register(this._editor.onDidChangeCursorSelection((()=>this._updateFromSelection()))),this._register(this._editor.onDidFocusEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidFocusEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidChangeModel((()=>this._updateFromModel()))),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromModel()))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._editorTabMovesFocus.set(e.get(127)),this._editorReadonly.set(e.get(78)),this._inDiffEditor.set(e.get(51)),this._editorColumnSelection.set(e.get(16))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some((e=>!e.isEmpty())))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))}}class Xn extends d.JT{constructor(e,t){super(),this._editor=e,this._contextKeyService=t,this._langId=qi.u.languageId.bindTo(t),this._hasCompletionItemProvider=qi.u.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=qi.u.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=qi.u.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=qi.u.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=qi.u.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=qi.u.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=qi.u.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=qi.u.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=qi.u.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=qi.u.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=qi.u.hasReferenceProvider.bindTo(t),this._hasRenameProvider=qi.u.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=qi.u.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=qi.u.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=qi.u.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=qi.u.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=qi.u.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=qi.u.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=qi.u.isInWalkThroughSnippet.bindTo(t);const i=()=>this._update();this._register(e.onDidChangeModel(i)),this._register(e.onDidChangeModelLanguage(i)),this._register(wt.KZ.onDidChange(i)),this._register(wt.H9.onDidChange(i)),this._register(wt.He.onDidChange(i)),this._register(wt.Ct.onDidChange(i)),this._register(wt.RN.onDidChange(i)),this._register(wt.vI.onDidChange(i)),this._register(wt.tA.onDidChange(i)),this._register(wt.xp.onDidChange(i)),this._register(wt.vH.onDidChange(i)),this._register(wt.vJ.onDidChange(i)),this._register(wt.FL.onDidChange(i)),this._register(wt.G0.onDidChange(i)),this._register(wt.Az.onDidChange(i)),this._register(wt.vN.onDidChange(i)),this._register(wt.nD.onDidChange(i)),this._register(wt.mX.onDidChange(i)),i()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents((()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInWalkThrough.reset()}))}_update(){const e=this._editor.getModel();e?this._contextKeyService.bufferChangeEvents((()=>{this._langId.set(e.getLanguageIdentifier().language),this._hasCompletionItemProvider.set(wt.KZ.has(e)),this._hasCodeActionsProvider.set(wt.H9.has(e)),this._hasCodeLensProvider.set(wt.He.has(e)),this._hasDefinitionProvider.set(wt.Ct.has(e)),this._hasDeclarationProvider.set(wt.RN.has(e)),this._hasImplementationProvider.set(wt.vI.has(e)),this._hasTypeDefinitionProvider.set(wt.tA.has(e)),this._hasHoverProvider.set(wt.xp.has(e)),this._hasDocumentHighlightProvider.set(wt.vH.has(e)),this._hasDocumentSymbolProvider.set(wt.vJ.has(e)),this._hasReferenceProvider.set(wt.FL.has(e)),this._hasRenameProvider.set(wt.G0.has(e)),this._hasSignatureHelpProvider.set(wt.nD.has(e)),this._hasInlayHintsProvider.set(wt.mX.has(e)),this._hasDocumentFormattingProvider.set(wt.Az.has(e)||wt.vN.has(e)),this._hasDocumentSelectionFormattingProvider.set(wt.vN.has(e)),this._hasMultipleDocumentFormattingProvider.set(wt.Az.all(e).length+wt.vN.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(wt.vN.all(e).length>1),this._isInWalkThrough.set(e.uri.scheme===g.lg.walkThroughSnippet)})):this.reset()}}class Qn extends d.JT{constructor(e){super(),this._onChange=this._register(new h.Q5),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(c.go(e)),this._register(this._domFocusTracker.onDidFocus((()=>{this._hasFocus=!0,this._onChange.fire(void 0)}))),this._register(this._domFocusTracker.onDidBlur((()=>{this._hasFocus=!1,this._onChange.fire(void 0)})))}hasFocus(){return this._hasFocus}}const Jn=encodeURIComponent("");function to(e){return Jn+encodeURIComponent(e.toString())+eo}const io=encodeURIComponent('');(0,Me.Ic)(((e,t)=>{const i=e.getColor(xt.b6);i&&t.addRule(`.monaco-editor .squiggly-error { border-bottom: 4px double ${i}; }`);const n=e.getColor(xt.lX);n&&t.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${to(n)}") repeat-x bottom left; }`);const o=e.getColor(xt.A2);o&&t.addRule(`.monaco-editor .squiggly-error::before { display: block; content: ''; width: 100%; height: 100%; background: ${o}; }`);const r=e.getColor(xt.pW);r&&t.addRule(`.monaco-editor .squiggly-warning { border-bottom: 4px double ${r}; }`);const s=e.getColor(xt.uo);s&&t.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${to(s)}") repeat-x bottom left; }`);const a=e.getColor(xt.gp);a&&t.addRule(`.monaco-editor .squiggly-warning::before { display: block; content: ''; width: 100%; height: 100%; background: ${a}; }`);const l=e.getColor(xt.T8);l&&t.addRule(`.monaco-editor .squiggly-info { border-bottom: 4px double ${l}; }`);const c=e.getColor(xt.c6);c&&t.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${to(c)}") repeat-x bottom left; }`);const u=e.getColor(xt.fe);u&&t.addRule(`.monaco-editor .squiggly-info::before { display: block; content: ''; width: 100%; height: 100%; background: ${u}; }`);const h=e.getColor(xt.fE);h&&t.addRule(`.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${h}; }`);const d=e.getColor(xt.Du);d&&t.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${function(e){return io+encodeURIComponent(e.toString())+no}(d)}") no-repeat bottom left; }`);const g=e.getColor(Ae.zu);g&&t.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${g.rgba.a}; }`);const f=e.getColor(Ae.kp);f&&t.addRule(`.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${f}; }`);const p=e.getColor(xt.NO)||"inherit";t.addRule(`.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${p}}`)}))},4527:(e,t,i)=>{"use strict";i.d(t,{H:()=>g});var n=i(6248),o=i(1640),r=i(2073),s=i(4565),a=i(8819),l=i(2065),c=i(9422),u=i(7781),h=i(1106),d=function(e,t){return function(i,n){t(i,n,e)}};let g=class extends r.Gm{constructor(e,t,i,n,o,r,s,a,l,c){super(e,Object.assign(Object.assign({},i.getRawOptions()),{overflowWidgetsDomNode:i.getOverflowWidgetsDomNode()}),{},n,o,r,s,a,l,c),this._parentEditor=i,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(i.onDidChangeConfiguration((e=>this._onParentConfigurationChanged(e))))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){n.jB(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};g=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([d(3,l.TG),d(4,o.$),d(5,s.H),d(6,a.i6),d(7,u.XE),d(8,c.lT),d(9,h.F)],g)},1329:(e,t,i)=>{"use strict";i.d(t,{T4:()=>o,OY:()=>r,Sj:()=>s,Uo:()=>a,hP:()=>l});var n=i(3860);class o{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return new n.Y(i.endLineNumber,i.endColumn,i.endLineNumber,i.endColumn)}}class r{constructor(e,t){this._range=e,this._text=t}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return new n.Y(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)}}class s{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return new n.Y(i.startLineNumber,i.startColumn,i.startLineNumber,i.startColumn)}}class a{constructor(e,t,i,n,o=!1){this._range=e,this._text=t,this._columnDeltaOffset=n,this._lineNumberDeltaOffset=i,this.insertsAutoWhitespace=o}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return new n.Y(i.endLineNumber+this._lineNumberDeltaOffset,i.endColumn+this._columnDeltaOffset,i.endLineNumber+this._lineNumberDeltaOffset,i.endColumn+this._columnDeltaOffset)}}class l{constructor(e,t,i,n=!1){this._range=e,this._text=t,this._initialSelection=i,this._forceMoveMarkers=n,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}},291:(e,t,i)=>{"use strict";i.d(t,{U:()=>u});var n=i(7295),o=i(3181),r=i(4314),s=i(3860),a=i(3831);const l=Object.create(null);function c(e,t){if(t<=0)return"";l[e]||(l[e]=["",e]);const i=l[e];for(let n=i.length;n<=t;n++)i[n]=i[n-1]+e;return i[t]}class u{constructor(e,t){this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}static unshiftIndent(e,t,i,n,r){const s=o.io.visibleColumnFromColumn(e,t,i);if(r){const e=c(" ",n);return c(e,o.io.prevIndentTabStop(s,n)/n)}return c("\t",o.io.prevRenderTabStop(s,i)/i)}static shiftIndent(e,t,i,n,r){const s=o.io.visibleColumnFromColumn(e,t,i);if(r){const e=c(" ",n);return c(e,o.io.nextIndentTabStop(s,n)/n)}return c("\t",o.io.nextRenderTabStop(s,i)/i)}_addEditOperation(e,t,i){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,i):e.addEditOperation(t,i)}getEditOperations(e,t){const i=this._selection.startLineNumber;let s=this._selection.endLineNumber;1===this._selection.endColumn&&i!==s&&(s-=1);const{tabSize:l,indentSize:h,insertSpaces:d}=this._opts,g=i===s;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(i))&&(this._useLastEditRangeForCursorEndPosition=!0);let c=0,f=0;for(let p=i;p<=s;p++,c=f){f=0;let s,m=e.getLineContent(p),_=n.LC(m);if((!this._opts.isUnshift||0!==m.length&&0!==_)&&(g||this._opts.isUnshift||0!==m.length)){if(-1===_&&(_=m.length),p>1&&o.io.visibleColumnFromColumn(m,_+1,l)%h!=0&&e.isCheapToTokenize(p-1)){let t=a.zu.getEnterAction(this._opts.autoIndent,e,new r.e(p-1,e.getLineMaxColumn(p-1),p-1,e.getLineMaxColumn(p-1)));if(t){if(f=c,t.appendText)for(let e=0,i=t.appendText.length;e{"use strict";i.d(t,{nG:()=>f,fv:()=>y,ei:()=>L,Pe:()=>N});var n=i(3580),o=i(4669),r=i(5976),s=i(6248),a=i(9488),l=i(4141),c=i(2334),u=i(7374),h=i(3193),d=i(9872),g=i(6626);const f=new class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new o.Q5,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus!==e&&(this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus))}},p=Object.hasOwnProperty;class m{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class _{constructor(){this._values=[]}_read(e){return this._values[e]}_write(e,t){this._values[e]=t}}class v{static readOptions(e){const t=e,i=new _;for(const e of l.Bc){const n="_never_"===e.name?void 0:t[e.name];i._write(e.id,n)}return i}static validateOptions(e){const t=new l.hu;for(const i of l.Bc)t._write(i.id,i.validate(e._read(i.id)));return t}static computeOptions(e,t){const i=new m;for(const n of l.Bc)i._write(n.id,n.compute(t,i,e._read(n.id)));return i}static _deepEquals(e,t){if("object"!=typeof e||"object"!=typeof t)return e===t;if(Array.isArray(e)||Array.isArray(t))return!(!Array.isArray(e)||!Array.isArray(t))&&a.fS(e,t);for(let i in e)if(!v._deepEquals(e[i],t[i]))return!1;return!0}static checkEquals(e,t){const i=[];let n=!1;for(const o of l.Bc){const r=!v._deepEquals(e._read(o.id),t._read(o.id));i[o.id]=r,r&&(n=!0)}return n?new l.Bb(i):null}}function b(e){const t=s.I8(e);return function(e){const t=e.wordWrap;!0===t?e.wordWrap="on":!1===t&&(e.wordWrap="off");const i=e.lineNumbers;!0===i?e.lineNumbers="on":!1===i&&(e.lineNumbers="off"),!1===e.autoClosingBrackets&&(e.autoClosingBrackets="never",e.autoClosingQuotes="never",e.autoSurround="never"),"visible"===e.cursorBlinking&&(e.cursorBlinking="solid");const n=e.renderWhitespace;!0===n?e.renderWhitespace="boundary":!1===n&&(e.renderWhitespace="none");const o=e.renderLineHighlight;!0===o?e.renderLineHighlight="line":!1===o&&(e.renderLineHighlight="none");const r=e.acceptSuggestionOnEnter;!0===r?e.acceptSuggestionOnEnter="on":!1===r&&(e.acceptSuggestionOnEnter="off");const s=e.tabCompletion;!1===s?e.tabCompletion="off":!0===s&&(e.tabCompletion="onlySnippets");const a=e.suggest;if(a&&"object"==typeof a.filteredTypes&&a.filteredTypes){const e={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};(0,g.E)(e,(e=>{const t=a.filteredTypes[e.key];!1===t&&(a[e.value]=t)}))}const l=e.hover;!0===l?e.hover={enabled:!0}:!1===l&&(e.hover={enabled:!1});const c=e.parameterHints;!0===c?e.parameterHints={enabled:!0}:!1===c&&(e.parameterHints={enabled:!1});const u=e.autoIndent;!0===u?e.autoIndent="full":!1===u&&(e.autoIndent="advanced");const h=e.matchBrackets;!0===h?e.matchBrackets="always":!1===h&&(e.matchBrackets="never")}(t),t}class y extends r.JT{constructor(e,t){super(),this._onDidChange=this._register(new o.Q5),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new o.Q5),this.onDidChangeFast=this._onDidChangeFast.event,this.isSimpleWidget=e,this._isDominatedByLongLines=!1,this._computeOptionsMemory=new l.LJ,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._rawOptions=b(t),this._readOptions=v.readOptions(this._rawOptions),this._validatedOptions=v.validateOptions(this._readOptions),this._register(c.C.onDidChangeZoomLevel((e=>this._recomputeOptions()))),this._register(f.onDidChangeTabFocus((e=>this._recomputeOptions())))}observeReferenceElement(e){}updatePixelRatio(){}_recomputeOptions(){const e=this.options,t=this._computeInternalOptions();if(e){const i=v.checkEquals(e,t);if(null===i)return;this.options=t,this._onDidChangeFast.fire(i),this._onDidChange.fire(i)}else this.options=t}getRawOptions(){return this._rawOptions}_computeInternalOptions(){const e=this._getEnvConfiguration(),t=u.E4.createFromValidatedSettings(this._validatedOptions,e.zoomLevel,e.pixelRatio,this.isSimpleWidget),i={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,fontInfo:this.readConfiguration(t),extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:f.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport};return v.computeOptions(this._validatedOptions,i)}static _subsetEquals(e,t){for(const i in t)if(p.call(t,i)){const n=t[i],o=e[i];if(o===n)continue;if(Array.isArray(o)&&Array.isArray(n)){if(!a.fS(o,n))return!1;continue}if(o&&"object"==typeof o&&n&&"object"==typeof n){if(!this._subsetEquals(o,n))return!1;continue}return!1}return!0}updateOptions(e){if(void 0===e)return;const t=b(e);y._subsetEquals(this._rawOptions,t)||(this._rawOptions=s.jB(this._rawOptions,t||{}),this._readOptions=v.readOptions(this._rawOptions),this._validatedOptions=v.validateOptions(this._readOptions),this._recomputeOptions())}setIsDominatedByLongLines(e){this._isDominatedByLongLines=e,this._recomputeOptions()}setMaxLineNumber(e){const t=y._digitCount(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}static _digitCount(e){let t=0;for(;e;)e=Math.floor(e/10),t++;return t||1}}const w=Object.freeze({id:"editor",order:5,type:"object",title:n.N("editorConfigurationTitle","Editor"),scope:5}),C=d.B.as(h.IP.Configuration),S=Object.assign(Object.assign({},w),{properties:{"editor.tabSize":{type:"number",default:l.DB.tabSize,minimum:1,markdownDescription:n.N("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.insertSpaces":{type:"boolean",default:l.DB.insertSpaces,markdownDescription:n.N("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.detectIndentation":{type:"boolean",default:l.DB.detectIndentation,markdownDescription:n.N("detectIndentation","Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.")},"editor.trimAutoWhitespace":{type:"boolean",default:l.DB.trimAutoWhitespace,description:n.N("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:l.DB.largeFileOptimizations,description:n.N("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:n.N("wordBasedSuggestions","Controls whether completions should be computed based on words in the document.")},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[n.N("wordBasedSuggestionsMode.currentDocument","Only suggest words from the active document."),n.N("wordBasedSuggestionsMode.matchingDocuments","Suggest words from all open documents of the same language."),n.N("wordBasedSuggestionsMode.allDocuments","Suggest words from all open documents.")],description:n.N("wordBasedSuggestionsMode","Controls from which documents word based completions are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[n.N("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),n.N("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),n.N("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:n.N("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:n.N("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:n.N("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:n.N("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:n.N("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:n.N("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:n.N("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:!1,description:n.N("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[n.N("wordWrap.off","Lines will never wrap."),n.N("wordWrap.on","Lines will wrap at the viewport width."),n.N("wordWrap.inherit","Lines will wrap according to the `#editor.wordWrap#` setting.")]}}});for(const e of l.Bc){const t=e.schema;if(void 0!==t)if(void 0!==(x=t).type||void 0!==x.anyOf)S.properties[`editor.${e.name}`]=t;else for(let e in t)p.call(t,e)&&(S.properties[e]=t[e])}var x;let k=null;function D(){return null===k&&(k=Object.create(null),Object.keys(S.properties).forEach((e=>{k[e]=!0}))),k}function L(e){return D()[`editor.${e}`]||!1}function N(e){return D()[`diffEditor.${e}`]||!1}C.registerConfiguration(S)},4141:(e,t,i)=>{"use strict";i.d(t,{y0:()=>s,Bb:()=>a,hu:()=>l,LJ:()=>c,O7:()=>g,NY:()=>v,d2:()=>w,n0:()=>C,gk:()=>x,$J:()=>k,hL:()=>L,DB:()=>N,Bc:()=>E,BH:()=>M});var n=i(3580),o=i(1432),r=i(7461);const s=8;class a{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class l{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class c{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class u{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}compute(e,t,i){return i}}class h{constructor(e,t=null){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0,this.deps=t}validate(e){return this.defaultValue}}class d{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}validate(e){return void 0===e?this.defaultValue:e}compute(e,t,i){return i}}function g(e,t){return void 0===e?t:"false"!==e&&Boolean(e)}class f extends d{constructor(e,t,i,n){void 0!==n&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return g(e,this.defaultValue)}}class p extends d{constructor(e,t,i,n,o,r){void 0!==r&&(r.type="integer",r.default=i,r.minimum=n,r.maximum=o),super(e,t,i,r),this.minimum=n,this.maximum=o}static clampedInt(e,t,i,n){if(void 0===e)return t;let o=parseInt(e,10);return isNaN(o)?t:(o=Math.max(i,o),o=Math.min(n,o),0|o)}validate(e){return p.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}class m extends d{constructor(e,t,i,n,o){void 0!==o&&(o.type="number",o.default=i),super(e,t,i,o),this.validationFn=n}static clamp(e,t,i){return ei?i:e}static float(e,t){if("number"==typeof e)return e;if(void 0===e)return t;const i=parseFloat(e);return isNaN(i)?t:i}validate(e){return this.validationFn(m.float(e,this.defaultValue))}}class _ extends d{static string(e,t){return"string"!=typeof e?t:e}constructor(e,t,i,n){void 0!==n&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return _.string(e,this.defaultValue)}}function v(e,t,i){return"string"!=typeof e||-1===i.indexOf(e)?t:e}class b extends d{constructor(e,t,i,n,o){void 0!==o&&(o.type="string",o.enum=n,o.default=i),super(e,t,i,o),this._allowedValues=n}validate(e){return v(e,this.defaultValue,this._allowedValues)}}class y extends u{constructor(e,t,i,n,o,r,s){void 0!==s&&(s.type="string",s.enum=o,s.default=n),super(e,t,i,s),this._allowedValues=o,this._convert=r}validate(e){return"string"!=typeof e||-1===this._allowedValues.indexOf(e)?this.defaultValue:this._convert(e)}}var w;!function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(w||(w={}));class C extends u{constructor(){super(41,"fontLigatures",C.OFF,{anyOf:[{type:"boolean",description:n.N("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:n.N("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:n.N("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return void 0===e?this.defaultValue:"string"==typeof e?"false"===e?C.OFF:"true"===e?C.ON:e:Boolean(e)?C.ON:C.OFF}}C.OFF='"liga" off, "calt" off',C.ON='"liga" on, "calt" on';class S extends u{constructor(){super(43,"fontWeight",L.fontWeight,{anyOf:[{type:"number",minimum:S.MINIMUM_VALUE,maximum:S.MAXIMUM_VALUE,errorMessage:n.N("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:S.SUGGESTION_VALUES}],default:L.fontWeight,description:n.N("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return"normal"===e||"bold"===e?e:String(p.clampedInt(e,L.fontWeight,S.MINIMUM_VALUE,S.MAXIMUM_VALUE))}}S.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],S.MINIMUM_VALUE=1,S.MAXIMUM_VALUE=1e3;class x extends h{constructor(){super(128,[46,55,35,62,90,57,58,92,115,118,119,120,2])}compute(e,t,i){return x.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=e.scrollBeyondLastLine?t-1:0,n=(e.viewLineCount+i)/(e.pixelRatio*e.height);return{typicalViewportLineCount:t,extraLinesBeyondLastLine:i,desiredRatio:n,minimapLineCount:Math.floor(e.viewLineCount/n)}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,o=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(o*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const r=t.stableMinimapLayoutInput,a=r&&e.outerHeight===r.outerHeight&&e.lineHeight===r.lineHeight&&e.typicalHalfwidthCharacterWidth===r.typicalHalfwidthCharacterWidth&&e.pixelRatio===r.pixelRatio&&e.scrollBeyondLastLine===r.scrollBeyondLastLine&&e.minimap.enabled===r.minimap.enabled&&e.minimap.side===r.minimap.side&&e.minimap.size===r.minimap.size&&e.minimap.showSlider===r.minimap.showSlider&&e.minimap.renderCharacters===r.minimap.renderCharacters&&e.minimap.maxColumn===r.minimap.maxColumn&&e.minimap.scale===r.minimap.scale&&e.verticalScrollbarWidth===r.verticalScrollbarWidth&&e.isViewportWrapping===r.isViewportWrapping,l=e.lineHeight,c=e.typicalHalfwidthCharacterWidth,u=e.scrollBeyondLastLine,h=e.minimap.renderCharacters;let d=o>=2?Math.round(2*e.minimap.scale):e.minimap.scale;const g=e.minimap.maxColumn,f=e.minimap.size,p=e.minimap.side,m=e.verticalScrollbarWidth,_=e.viewLineCount,v=e.remainingWidth,b=e.isViewportWrapping,y=h?2:3;let w=Math.floor(o*n);const C=w/o;let S=!1,k=!1,D=y*d,L=d/o,N=1;if("fill"===f||"fit"===f){const{typicalViewportLineCount:i,extraLinesBeyondLastLine:r,desiredRatio:s,minimapLineCount:c}=x.computeContainedMinimapLineCount({viewLineCount:_,scrollBeyondLastLine:u,height:n,lineHeight:l,pixelRatio:o});if(_/c>1)S=!0,k=!0,d=1,D=1,L=d/o;else{let n=!1,c=d+1;if("fit"===f){const i=Math.ceil((_+r)*D);b&&a&&v<=t.stableFitRemainingWidth?(n=!0,c=t.stableFitMaxMinimapScale):(n=i>w,b&&n?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=v):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0))}if("fill"===f||n){S=!0;const e=d;D=Math.min(l*o,Math.max(1,Math.floor(1/s))),d=Math.min(c,Math.max(1,Math.floor(D/y))),d>e&&(N=Math.min(2,d/e)),L=d/o/N,w=Math.ceil(Math.max(i,_+r)*D),b&&n&&(t.stableFitMaxMinimapScale=d)}}}const E=Math.floor(g*L),A=Math.min(E,Math.max(0,Math.floor((v-m-2)*L/(c+L)))+s);let M=Math.floor(o*A);const I=M/o;return M=Math.floor(M*N),{renderMinimap:h?1:2,minimapLeft:"left"===p?0:i-A-m,minimapWidth:A,minimapHeightIsEditorHeight:S,minimapIsSampling:k,minimapScale:d,minimapLineHeight:D,minimapCanvasInnerWidth:M,minimapCanvasInnerHeight:w,minimapCanvasOuterWidth:I,minimapCanvasOuterHeight:C}}static computeLayout(e,t){const i=0|t.outerWidth,n=0|t.outerHeight,o=0|t.lineHeight,r=0|t.lineNumbersDigitCount,s=t.typicalHalfwidthCharacterWidth,a=t.maxDigitWidth,l=t.pixelRatio,u=t.viewLineCount,h=e.get(120),d="inherit"===h?e.get(119):h,g="inherit"===d?e.get(115):d,f=e.get(118),m=e.get(2),_=t.isDominatedByLongLines,v=e.get(46),b=0!==e.get(57).renderType,y=e.get(58),w=e.get(92),C=e.get(62),S=e.get(90),k=S.verticalScrollbarSize,D=S.verticalHasArrows,L=S.arrowSize,N=S.horizontalScrollbarSize,E=e.get(55),A=e.get(35);let M;if("string"==typeof E&&/^\d+(\.\d+)?ch$/.test(E)){const e=parseFloat(E.substr(0,E.length-2));M=p.clampedInt(e*s,0,0,1e3)}else M=p.clampedInt(E,0,0,1e3);A&&(M+=16);let I=0;if(b){const e=Math.max(r,y);I=Math.round(e*a)}let T=0;v&&(T=o);let R=0,O=R+T,F=O+I,P=F+M;const B=i-T-I-M;let z=!1,W=!1,V=-1;2!==m&&("inherit"===d&&_?(z=!0,W=!0):"on"===g||"bounded"===g?W=!0:"wordWrapColumn"===g&&(V=f));const H=x._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:o,typicalHalfwidthCharacterWidth:s,pixelRatio:l,scrollBeyondLastLine:w,minimap:C,verticalScrollbarWidth:k,viewLineCount:u,remainingWidth:B,isViewportWrapping:W},t.memory||new c);0!==H.renderMinimap&&0===H.minimapLeft&&(R+=H.minimapWidth,O+=H.minimapWidth,F+=H.minimapWidth,P+=H.minimapWidth);const $=B-H.minimapWidth,U=Math.max(1,Math.floor(($-k-2)/s)),j=D?L:0;return W&&(V=Math.max(1,U),"bounded"===g&&(V=Math.min(V,f))),{width:i,height:n,glyphMarginLeft:R,glyphMarginWidth:T,lineNumbersLeft:O,lineNumbersWidth:I,decorationsLeft:F,decorationsWidth:M,contentLeft:P,contentWidth:$,minimap:H,viewportColumn:U,isWordWrapMinified:z,isViewportWrapping:W,wrappingColumn:V,verticalScrollbarWidth:k,horizontalScrollbarHeight:N,overviewRuler:{top:j,width:k,height:n-2*j,right:0}}}}function k(e){const t=e.get(85);return"editable"===t?e.get(78):"on"!==t}function D(e,t){if("string"!=typeof e)return t;switch(e){case"hidden":return 2;case"visible":return 3;default:return 1}}const L={fontFamily:o.dz?"Menlo, Monaco, 'Courier New', monospace":o.IJ?"'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:o.dz?12:14,lineHeight:0,letterSpacing:0},N={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0},E=[];function A(e){return E[e.id]=e,e}const M={acceptSuggestionOnCommitCharacter:A(new f(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:n.N("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:A(new b(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",n.N("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:n.N("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:A(new class extends u{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[n.N("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),n.N("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled."),n.N("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:n.N("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return 0===i?e.accessibilitySupport:i}}),accessibilityPageSize:A(new p(3,"accessibilityPageSize",10,1,1073741824,{description:n.N("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default.")})),ariaLabel:A(new _(4,"ariaLabel",n.N("editorViewAccessibleLabel","Editor content"))),autoClosingBrackets:A(new b(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",n.N("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),n.N("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:n.N("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingDelete:A(new b(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",n.N("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:n.N("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:A(new b(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",n.N("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:n.N("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:A(new b(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",n.N("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),n.N("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:n.N("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:A(new y(9,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],(function(e){switch(e){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}),{enumDescriptions:[n.N("editor.autoIndent.none","The editor will not insert indentation automatically."),n.N("editor.autoIndent.keep","The editor will keep the current line's indentation."),n.N("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),n.N("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),n.N("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:n.N("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:A(new f(10,"automaticLayout",!1)),autoSurround:A(new b(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[n.N("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),n.N("editor.autoSurround.quotes","Surround with quotes but not brackets."),n.N("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:n.N("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),stickyTabStops:A(new f(102,"stickyTabStops",!1,{description:n.N("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:A(new f(12,"codeLens",!0,{description:n.N("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:A(new _(13,"codeLensFontFamily","",{description:n.N("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:A(new p(14,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,description:n.N("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to `0`, the 90% of `#editor.fontSize#` is used.")})),colorDecorators:A(new f(15,"colorDecorators",!0,{description:n.N("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),columnSelection:A(new f(16,"columnSelection",!1,{description:n.N("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:A(new class extends u{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(17,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:n.N("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:n.N("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertSpace:g(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:g(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}),contextmenu:A(new f(18,"contextmenu",!0)),copyWithSyntaxHighlighting:A(new f(19,"copyWithSyntaxHighlighting",!0,{description:n.N("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:A(new y(20,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],(function(e){switch(e){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}),{description:n.N("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:A(new f(21,"cursorSmoothCaretAnimation",!1,{description:n.N("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:A(new y(22,"cursorStyle",w.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],(function(e){switch(e){case"line":return w.Line;case"block":return w.Block;case"underline":return w.Underline;case"line-thin":return w.LineThin;case"block-outline":return w.BlockOutline;case"underline-thin":return w.UnderlineThin}}),{description:n.N("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:A(new p(23,"cursorSurroundingLines",0,0,1073741824,{description:n.N("cursorSurroundingLines","Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:A(new b(24,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[n.N("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),n.N("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],description:n.N("cursorSurroundingLinesStyle","Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:A(new p(25,"cursorWidth",0,0,1073741824,{markdownDescription:n.N("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:A(new f(26,"disableLayerHinting",!1)),disableMonospaceOptimizations:A(new f(27,"disableMonospaceOptimizations",!1)),domReadOnly:A(new f(28,"domReadOnly",!1)),dragAndDrop:A(new f(29,"dragAndDrop",!0,{description:n.N("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:A(new class extends f{constructor(){super(30,"emptySelectionClipboard",!0,{description:n.N("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}),extraEditorClassName:A(new _(31,"extraEditorClassName","")),fastScrollSensitivity:A(new m(32,"fastScrollSensitivity",5,(e=>e<=0?5:e),{markdownDescription:n.N("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:A(new class extends u{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:!0,autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(33,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:n.N("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"boolean",default:e.seedSearchStringFromSelection,description:n.N("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[n.N("editor.find.autoFindInSelection.never","Never turn on Find in selection automatically (default)."),n.N("editor.find.autoFindInSelection.always","Always turn on Find in selection automatically."),n.N("editor.find.autoFindInSelection.multiline","Turn on Find in selection automatically when multiple lines of content are selected.")],description:n.N("find.autoFindInSelection","Controls the condition for turning on find in selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:n.N("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:o.dz},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:n.N("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:n.N("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{cursorMoveOnType:g(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:g(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection),autoFindInSelection:"boolean"==typeof e.autoFindInSelection?e.autoFindInSelection?"always":"never":v(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:g(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:g(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:g(t.loop,this.defaultValue.loop)}}}),fixedOverflowWidgets:A(new f(34,"fixedOverflowWidgets",!1)),folding:A(new f(35,"folding",!0,{description:n.N("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:A(new b(36,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[n.N("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),n.N("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:n.N("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:A(new f(37,"foldingHighlight",!0,{description:n.N("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),unfoldOnClickAfterEndOfLine:A(new f(38,"unfoldOnClickAfterEndOfLine",!1,{description:n.N("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:A(new _(39,"fontFamily",L.fontFamily,{description:n.N("fontFamily","Controls the font family.")})),fontInfo:A(new class extends h{constructor(){super(40)}compute(e,t,i){return e.fontInfo}}),fontLigatures2:A(new C),fontSize:A(new class extends d{constructor(){super(42,"fontSize",L.fontSize,{type:"number",minimum:6,maximum:100,default:L.fontSize,description:n.N("fontSize","Controls the font size in pixels.")})}validate(e){let t=m.float(e,this.defaultValue);return 0===t?L.fontSize:m.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}),fontWeight:A(new S),formatOnPaste:A(new f(44,"formatOnPaste",!1,{description:n.N("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:A(new f(45,"formatOnType",!1,{description:n.N("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:A(new f(46,"glyphMargin",!0,{description:n.N("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:A(new class extends u{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[n.N("editor.gotoLocation.multiple.peek","Show peek view of the results (default)"),n.N("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),n.N("editor.gotoLocation.multiple.goto","Go to the primary result and enable peek-less navigation to others")]},i=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(47,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:n.N("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:n.N("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:n.N("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:n.N("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:n.N("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:n.N("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist.")},t),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:n.N("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:n.N("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:i,description:n.N("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:n.N("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:n.N("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,i,n,o,r;if(!e||"object"!=typeof e)return this.defaultValue;const s=e;return{multiple:v(s.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:null!==(t=s.multipleDefinitions)&&void 0!==t?t:v(s.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:null!==(i=s.multipleTypeDefinitions)&&void 0!==i?i:v(s.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:null!==(n=s.multipleDeclarations)&&void 0!==n?n:v(s.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:null!==(o=s.multipleImplementations)&&void 0!==o?o:v(s.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:null!==(r=s.multipleReferences)&&void 0!==r?r:v(s.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:_.string(s.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:_.string(s.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:_.string(s.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:_.string(s.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:_.string(s.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}),hideCursorInOverviewRuler:A(new f(48,"hideCursorInOverviewRuler",!1,{description:n.N("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),highlightActiveIndentGuide:A(new f(49,"highlightActiveIndentGuide",!0,{description:n.N("highlightActiveIndentGuide","Controls whether the editor should highlight the active indent guide.")})),hover:A(new class extends u{constructor(){const e={enabled:!0,delay:300,sticky:!0};super(50,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:n.N("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,description:n.N("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:n.N("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:g(t.enabled,this.defaultValue.enabled),delay:p.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:g(t.sticky,this.defaultValue.sticky)}}}),inDiffEditor:A(new f(51,"inDiffEditor",!1)),letterSpacing:A(new m(53,"letterSpacing",L.letterSpacing,(e=>m.clamp(e,-5,20)),{description:n.N("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:A(new class extends u{constructor(){const e={enabled:!0};super(54,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:n.N("codeActions","Enables the code action lightbulb in the editor.")}})}validate(e){return e&&"object"==typeof e?{enabled:g(e.enabled,this.defaultValue.enabled)}:this.defaultValue}}),lineDecorationsWidth:A(new d(55,"lineDecorationsWidth",10)),lineHeight:A(new class extends p{constructor(){super(56,"lineHeight",L.lineHeight,0,150,{description:n.N("lineHeight","Controls the line height. Use 0 to compute the line height from the font size.")})}compute(e,t,i){return e.fontInfo.lineHeight}}),lineNumbers:A(new class extends u{constructor(){super(57,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[n.N("lineNumbers.off","Line numbers are not rendered."),n.N("lineNumbers.on","Line numbers are rendered as absolute number."),n.N("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),n.N("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:n.N("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return void 0!==e&&("function"==typeof e?(t=4,i=e):t="interval"===e?3:"relative"===e?2:"on"===e?1:0),{renderType:t,renderFn:i}}}),lineNumbersMinChars:A(new p(58,"lineNumbersMinChars",5,1,300)),linkedEditing:A(new f(59,"linkedEditing",!1,{description:n.N("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols, e.g. HTML tags, are updated while editing.")})),links:A(new f(60,"links",!0,{description:n.N("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:A(new b(61,"matchBrackets","always",["always","near","never"],{description:n.N("matchBrackets","Highlight matching brackets.")})),minimap:A(new class extends u{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120,scale:1};super(62,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:n.N("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[n.N("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),n.N("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),n.N("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:n.N("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:n.N("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:n.N("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:n.N("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:n.N("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:n.N("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:g(t.enabled,this.defaultValue.enabled),size:v(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:v(t.side,this.defaultValue.side,["right","left"]),showSlider:v(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:g(t.renderCharacters,this.defaultValue.renderCharacters),scale:p.clampedInt(t.scale,1,1,3),maxColumn:p.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}),mouseStyle:A(new b(63,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:A(new m(64,"mouseWheelScrollSensitivity",1,(e=>0===e?1:e),{markdownDescription:n.N("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:A(new f(65,"mouseWheelZoom",!1,{markdownDescription:n.N("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:A(new f(66,"multiCursorMergeOverlapping",!0,{description:n.N("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:A(new y(67,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],(function(e){return"ctrlCmd"===e?o.dz?"metaKey":"ctrlKey":"altKey"}),{markdownEnumDescriptions:[n.N("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),n.N("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:n.N({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go To Definition and Open Link mouse gestures will adapt such that they do not conflict with the multicursor modifier. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:A(new b(68,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[n.N("multiCursorPaste.spread","Each cursor pastes a single line of the text."),n.N("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:n.N("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),occurrencesHighlight:A(new f(69,"occurrencesHighlight",!0,{description:n.N("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:A(new f(70,"overviewRulerBorder",!0,{description:n.N("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:A(new p(71,"overviewRulerLanes",3,0,3)),padding:A(new class extends u{constructor(){super(72,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:n.N("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:n.N("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{top:p.clampedInt(t.top,0,0,1e3),bottom:p.clampedInt(t.bottom,0,0,1e3)}}}),parameterHints:A(new class extends u{constructor(){const e={enabled:!0,cycle:!1};super(73,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:n.N("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:n.N("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:g(t.enabled,this.defaultValue.enabled),cycle:g(t.cycle,this.defaultValue.cycle)}}}),peekWidgetDefaultFocus:A(new b(74,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[n.N("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),n.N("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:n.N("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:A(new f(75,"definitionLinkOpensInPeek",!1,{description:n.N("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:A(new class extends u{constructor(){const e={other:!0,comments:!1,strings:!1};super(76,"quickSuggestions",e,{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:e.strings,description:n.N("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{type:"boolean",default:e.comments,description:n.N("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{type:"boolean",default:e.other,description:n.N("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}}}],default:e,description:n.N("quickSuggestions","Controls whether suggestions should automatically show up while typing.")}),this.defaultValue=e}validate(e){if("boolean"==typeof e)return e;if(e&&"object"==typeof e){const t=e,i={other:g(t.other,this.defaultValue.other),comments:g(t.comments,this.defaultValue.comments),strings:g(t.strings,this.defaultValue.strings)};return!!(i.other&&i.comments&&i.strings)||!!(i.other||i.comments||i.strings)&&i}return this.defaultValue}}),quickSuggestionsDelay:A(new p(77,"quickSuggestionsDelay",10,0,1073741824,{description:n.N("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:A(new f(78,"readOnly",!1)),renameOnType:A(new f(79,"renameOnType",!1,{description:n.N("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:n.N("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:A(new f(80,"renderControlCharacters",!1,{description:n.N("renderControlCharacters","Controls whether the editor should render control characters.")})),renderIndentGuides:A(new f(81,"renderIndentGuides",!0,{description:n.N("renderIndentGuides","Controls whether the editor should render indent guides.")})),renderFinalNewline:A(new f(82,"renderFinalNewline",!0,{description:n.N("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:A(new b(83,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",n.N("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:n.N("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:A(new f(84,"renderLineHighlightOnlyWhenFocus",!1,{description:n.N("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:A(new b(85,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:A(new b(86,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",n.N("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),n.N("renderWhitespace.selection","Render whitespace characters only on selected text."),n.N("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:n.N("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:A(new p(87,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:A(new f(88,"roundedSelection",!0,{description:n.N("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:A(new class extends u{constructor(){const e=[],t={type:"number",description:n.N("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(89,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:n.N("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:n.N("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){let t=[];for(let i of e)if("number"==typeof i)t.push({column:p.clampedInt(i,0,0,1e4),color:null});else if(i&&"object"==typeof i){const e=i;t.push({column:p.clampedInt(e.column,0,0,1e4),color:e.color})}return t.sort(((e,t)=>e.column-t.column)),t}return this.defaultValue}}),scrollbar:A(new class extends u{constructor(){super(90,"scrollbar",{vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e,i=p.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=p.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:p.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:D(t.vertical,this.defaultValue.vertical),horizontal:D(t.horizontal,this.defaultValue.horizontal),useShadows:g(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:g(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:g(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:g(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:g(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:p.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:p.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:g(t.scrollByPage,this.defaultValue.scrollByPage)}}}),scrollBeyondLastColumn:A(new p(91,"scrollBeyondLastColumn",5,0,1073741824,{description:n.N("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:A(new f(92,"scrollBeyondLastLine",!0,{description:n.N("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:A(new f(93,"scrollPredominantAxis",!0,{description:n.N("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:A(new f(94,"selectionClipboard",!0,{description:n.N("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:o.IJ})),selectionHighlight:A(new f(95,"selectionHighlight",!0,{description:n.N("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:A(new f(96,"selectOnLineNumbers",!0)),showFoldingControls:A(new b(97,"showFoldingControls","mouseover",["always","mouseover"],{enumDescriptions:[n.N("showFoldingControls.always","Always show the folding controls."),n.N("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:n.N("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:A(new f(98,"showUnused",!0,{description:n.N("showUnused","Controls fading out of unused code.")})),showDeprecated:A(new f(123,"showDeprecated",!0,{description:n.N("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:A(new class extends u{constructor(){const e={enabled:!0,fontSize:0,fontFamily:L.fontFamily};super(124,"inlayHints",e,{"editor.inlayHints.enabled":{type:"boolean",default:e.enabled,description:n.N("inlayHints.enable","Enables the inlay hints in the editor.")},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,description:n.N("inlayHints.fontSize","Controls font size of inlay hints in the editor. When set to `0`, the 90% of `#editor.fontSize#` is used.")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,description:n.N("inlayHints.fontFamily","Controls font family of inlay hints in the editor.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:g(t.enabled,this.defaultValue.enabled),fontSize:p.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:_.string(t.fontFamily,this.defaultValue.fontFamily)}}}),snippetSuggestions:A(new b(99,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[n.N("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),n.N("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),n.N("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),n.N("snippetSuggestions.none","Do not show snippet suggestions.")],description:n.N("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:A(new class extends u{constructor(){super(100,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:n.N("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"}})}validate(e){return e&&"object"==typeof e?{selectLeadingAndTrailingWhitespace:g(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}:this.defaultValue}}),smoothScrolling:A(new f(101,"smoothScrolling",!1,{description:n.N("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:A(new p(103,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:A(new class extends u{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,showStatusBar:!1,preview:!1,showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(104,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[n.N("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),n.N("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:n.N("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:n.N("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:n.N("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:n.N("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:n.N("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:n.N("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:n.N("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:n.N("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:n.N("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:n.N("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:n.N("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertMode:v(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:g(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:g(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:g(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:g(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:g(t.showIcons,this.defaultValue.showIcons),showStatusBar:g(t.showStatusBar,this.defaultValue.showStatusBar),preview:g(t.preview,this.defaultValue.preview),showInlineDetails:g(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:g(t.showMethods,this.defaultValue.showMethods),showFunctions:g(t.showFunctions,this.defaultValue.showFunctions),showConstructors:g(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:g(t.showDeprecated,this.defaultValue.showDeprecated),showFields:g(t.showFields,this.defaultValue.showFields),showVariables:g(t.showVariables,this.defaultValue.showVariables),showClasses:g(t.showClasses,this.defaultValue.showClasses),showStructs:g(t.showStructs,this.defaultValue.showStructs),showInterfaces:g(t.showInterfaces,this.defaultValue.showInterfaces),showModules:g(t.showModules,this.defaultValue.showModules),showProperties:g(t.showProperties,this.defaultValue.showProperties),showEvents:g(t.showEvents,this.defaultValue.showEvents),showOperators:g(t.showOperators,this.defaultValue.showOperators),showUnits:g(t.showUnits,this.defaultValue.showUnits),showValues:g(t.showValues,this.defaultValue.showValues),showConstants:g(t.showConstants,this.defaultValue.showConstants),showEnums:g(t.showEnums,this.defaultValue.showEnums),showEnumMembers:g(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:g(t.showKeywords,this.defaultValue.showKeywords),showWords:g(t.showWords,this.defaultValue.showWords),showColors:g(t.showColors,this.defaultValue.showColors),showFiles:g(t.showFiles,this.defaultValue.showFiles),showReferences:g(t.showReferences,this.defaultValue.showReferences),showFolders:g(t.showFolders,this.defaultValue.showFolders),showTypeParameters:g(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:g(t.showSnippets,this.defaultValue.showSnippets),showUsers:g(t.showUsers,this.defaultValue.showUsers),showIssues:g(t.showIssues,this.defaultValue.showIssues)}}}),inlineSuggest:A(new class extends u{constructor(){const e={enabled:!1};super(52,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:n.N("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")}})}validate(e){return e&&"object"==typeof e?{enabled:g(e.enabled,this.defaultValue.enabled)}:this.defaultValue}}),suggestFontSize:A(new p(105,"suggestFontSize",0,0,1e3,{markdownDescription:n.N("suggestFontSize","Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.")})),suggestLineHeight:A(new p(106,"suggestLineHeight",0,0,1e3,{markdownDescription:n.N("suggestLineHeight","Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used. The minimum value is 8.")})),suggestOnTriggerCharacters:A(new f(107,"suggestOnTriggerCharacters",!0,{description:n.N("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:A(new b(108,"suggestSelection","recentlyUsed",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[n.N("suggestSelection.first","Always select the first suggestion."),n.N("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),n.N("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:n.N("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:A(new b(109,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[n.N("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),n.N("tabCompletion.off","Disable tab completions."),n.N("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:n.N("tabCompletion","Enables tab completions.")})),tabIndex:A(new p(110,"tabIndex",0,-1,1073741824)),unusualLineTerminators:A(new b(111,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[n.N("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),n.N("unusualLineTerminators.off","Unusual line terminators are ignored."),n.N("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:n.N("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:A(new f(112,"useShadowDOM",!0)),useTabStops:A(new f(113,"useTabStops",!0,{description:n.N("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordSeparators:A(new _(114,"wordSeparators",r.vu,{description:n.N("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:A(new b(115,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[n.N("wordWrap.off","Lines will never wrap."),n.N("wordWrap.on","Lines will wrap at the viewport width."),n.N({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),n.N({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:n.N({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:A(new _(116,"wordWrapBreakAfterCharacters"," \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:A(new _(117,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:A(new p(118,"wordWrapColumn",80,1,1073741824,{markdownDescription:n.N({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:A(new b(119,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:A(new b(120,"wordWrapOverride2","inherit",["off","on","inherit"])),wrappingIndent:A(new y(121,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],(function(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}),{enumDescriptions:[n.N("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),n.N("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),n.N("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),n.N("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:n.N("wrappingIndent","Controls the indentation of wrapped lines.")})),wrappingStrategy:A(new b(122,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[n.N("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),n.N("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],description:n.N("wrappingStrategy","Controls the algorithm that computes wrapping points.")})),editorClassName:A(new class extends h{constructor(){super(125,[63,31])}compute(e,t,i){const n=["monaco-editor"];return t.get(31)&&n.push(t.get(31)),e.extraEditorClassName&&n.push(e.extraEditorClassName),"default"===t.get(63)?n.push("mouse-default"):"copy"===t.get(63)&&n.push("mouse-copy"),t.get(98)&&n.push("showUnused"),t.get(123)&&n.push("showDeprecated"),n.join(" ")}}),pixelRatio:A(new class extends h{constructor(){super(126)}compute(e,t,i){return e.pixelRatio}}),tabFocusMode:A(new class extends h{constructor(){super(127,[78])}compute(e,t,i){return!!t.get(78)||e.tabFocusMode}}),layoutInfo:A(new x),wrappingInfo:A(new class extends h{constructor(){super(129,[128])}compute(e,t,i){const n=t.get(128);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}})}},2334:(e,t,i)=>{"use strict";i.d(t,{C:()=>o});var n=i(4669);const o=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new n.Q5,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(e){e=Math.min(Math.max(-5,e),20),this._zoomLevel!==e&&(this._zoomLevel=e,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}},7374:(e,t,i)=>{"use strict";i.d(t,{E4:()=>s,pR:()=>a});var n=i(1432),o=i(2334);const r=n.dz?1.5:1.35;class s{constructor(e){this.zoomLevel=e.zoomLevel,this.pixelRatio=e.pixelRatio,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.fontFeatureSettings=e.fontFeatureSettings,this.lineHeight=0|e.lineHeight,this.letterSpacing=e.letterSpacing}static createFromValidatedSettings(e,t,i,n){const o=e.get(39),r=e.get(43),a=e.get(42),l=e.get(41),c=e.get(56),u=e.get(53);return s._create(o,r,a,l,c,u,t,i,n)}static _create(e,t,i,n,a,l,c,u,h){0===a?a=Math.round(r*i):a<8&&(a=8);const d=1+(h?0:.1*o.C.getZoomLevel());return new s({zoomLevel:c,pixelRatio:u,fontFamily:e,fontWeight:t,fontSize:i*=d,fontFeatureSettings:n,lineHeight:a*=d,letterSpacing:l})}getId(){return this.zoomLevel+"-"+this.pixelRatio+"-"+this.fontFamily+"-"+this.fontWeight+"-"+this.fontSize+"-"+this.fontFeatureSettings+"-"+this.lineHeight+"-"+this.letterSpacing}getMassagedFontFamily(){return/[,"']/.test(this.fontFamily)?this.fontFamily:/[+ ]/.test(this.fontFamily)?`"${this.fontFamily}"`:this.fontFamily}}class a extends s{constructor(e,t){super(e),this.version=1,this.isTrusted=t,this.isMonospace=e.isMonospace,this.typicalHalfwidthCharacterWidth=e.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=e.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=e.canUseHalfwidthRightwardsArrow,this.spaceWidth=e.spaceWidth,this.middotWidth=e.middotWidth,this.wsmiddotWidth=e.wsmiddotWidth,this.maxDigitWidth=e.maxDigitWidth}equals(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.fontFeatureSettings===e.fontFeatureSettings&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.maxDigitWidth===e.maxDigitWidth}}},3675:(e,t,i)=>{"use strict";i.d(t,{l:()=>o});var n=i(3181);class o{static whitespaceVisibleColumn(e,t,i){const o=e.length;let r=0,s=-1,a=-1;for(let l=0;l{"use strict";i.d(t,{LM:()=>g,rS:()=>f,zp:()=>p,Vi:()=>v,Tp:()=>b,io:()=>y,LN:()=>w});var n=i(7301),o=i(7295),r=i(187),s=i(4314),a=i(3860),l=i(3411),c=i(3831);const u=()=>!0,h=()=>!1,d=e=>" "===e||"\t"===e;class g{constructor(e,t,i){this._languageIdentifier=e;const n=i.options,o=n.get(128);this.readOnly=n.get(78),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=n.get(102),this.lineHeight=n.get(56),this.pageSize=Math.max(1,Math.floor(o.height/this.lineHeight)-2),this.useTabStops=n.get(113),this.wordSeparators=n.get(114),this.emptySelectionClipboard=n.get(30),this.copyWithSyntaxHighlighting=n.get(19),this.multiCursorMergeOverlapping=n.get(66),this.multiCursorPaste=n.get(68),this.autoClosingBrackets=n.get(5),this.autoClosingQuotes=n.get(8),this.autoClosingDelete=n.get(6),this.autoClosingOvertype=n.get(7),this.autoSurround=n.get(11),this.autoIndent=n.get(9),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:g._getShouldAutoClose(e,this.autoClosingQuotes),bracket:g._getShouldAutoClose(e,this.autoClosingBrackets)},this.autoClosingPairs=c.zu.getAutoClosingPairs(e.id);let r=g._getSurroundingPairs(e);if(r)for(const e of r)this.surroundingPairs[e.open]=e.close}static shouldRecreate(e){return e.hasChanged(128)||e.hasChanged(114)||e.hasChanged(30)||e.hasChanged(66)||e.hasChanged(68)||e.hasChanged(5)||e.hasChanged(8)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(113)||e.hasChanged(56)||e.hasChanged(78)}get electricChars(){if(!this._electricChars){this._electricChars={};let e=g._getElectricCharacters(this._languageIdentifier);if(e)for(const t of e)this._electricChars[t]=!0}return this._electricChars}normalizeIndentation(e){return l.yO.normalizeIndentation(e,this.indentSize,this.insertSpaces)}static _getElectricCharacters(e){try{return c.zu.getElectricCharacters(e.id)}catch(e){return(0,n.dL)(e),null}}static _getShouldAutoClose(e,t){switch(t){case"beforeWhitespace":return d;case"languageDefined":return g._getLanguageDefinedShouldAutoClose(e);case"always":return u;case"never":return h}}static _getLanguageDefinedShouldAutoClose(e){try{const t=c.zu.getAutoCloseBeforeSet(e.id);return e=>-1!==t.indexOf(e)}catch(e){return(0,n.dL)(e),h}}static _getSurroundingPairs(e){try{return c.zu.getSurroundingPairs(e.id)}catch(e){return(0,n.dL)(e),null}}}class f{constructor(e,t,i,n){this.selectionStart=e,this.selectionStartLeftoverVisibleColumns=t,this.position=i,this.leftoverVisibleColumns=n,this.selection=f._computeSelection(this.selectionStart,this.position)}equals(e){return this.selectionStartLeftoverVisibleColumns===e.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===e.leftoverVisibleColumns&&this.position.equals(e.position)&&this.selectionStart.equalsRange(e.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(e,t,i,n){return e?new f(this.selectionStart,this.selectionStartLeftoverVisibleColumns,new r.L(t,i),n):new f(new s.e(t,i,t,i),n,new r.L(t,i),n)}static _computeSelection(e,t){let i,n,o,r;return e.isEmpty()?(i=e.startLineNumber,n=e.startColumn,o=t.lineNumber,r=t.column):t.isBeforeOrEqual(e.getStartPosition())?(i=e.endLineNumber,n=e.endColumn,o=t.lineNumber,r=t.column):(i=e.startLineNumber,n=e.startColumn,o=t.lineNumber,r=t.column),new a.Y(i,n,o,r)}}class p{constructor(e,t,i){this.model=e,this.coordinatesConverter=t,this.cursorConfig=i}}class m{constructor(e){this.modelState=e,this.viewState=null}}class _{constructor(e){this.modelState=null,this.viewState=e}}class v{constructor(e,t){this.modelState=e,this.viewState=t}static fromModelState(e){return new m(e)}static fromViewState(e){return new _(e)}static fromModelSelection(e){const t=e.selectionStartLineNumber,i=e.selectionStartColumn,n=e.positionLineNumber,o=e.positionColumn,a=new f(new s.e(t,i,t,i),0,new r.L(n,o),0);return v.fromModelState(a)}static fromModelSelections(e){let t=[];for(let i=0,n=e.length;i=65536?2:1,9===t)s=y.nextRenderTabStop(s,i);else{let i=o.S6(t);for(;a=65536?2:1,i=n}o.K7(t)||o.C8(t)?s+=2:s+=1}}return s}static visibleColumnsByColumns(e,t){const i=e.length;let n=new Array;n.push(-1);let r=0,s=0;for(;s=65536?2:1,n.push(r),a>=65536&&n.push(r),9===a)r=y.nextRenderTabStop(r,t);else{let t=o.S6(a);for(;s=65536?2:1,n.push(r),a>=65536&&n.push(r),t=c}o.K7(a)||o.C8(a)?r+=2:r+=1}}return n.push(r),n}static visibleColumnFromColumn2(e,t,i){return this.visibleColumnFromColumn(t.getLineContent(i.lineNumber),i.column,e.tabSize)}static columnFromVisibleColumn(e,t,i){if(t<=0)return 1;const n=e.length;let r=0,s=1,a=0;for(;a=65536?2:1,9===l)c=y.nextRenderTabStop(r,i);else{let t=o.S6(l);for(;a=65536?2:1,t=r}c=o.K7(l)||o.C8(l)?r+2:r+1}const u=a+1;if(c>=t)return c-ts?s:o}static nextRenderTabStop(e,t){return e+t-e%t}static nextIndentTabStop(e,t){return e+t-e%t}static prevRenderTabStop(e,t){return Math.max(0,e-1-(e-1)%t)}static prevIndentTabStop(e,t){return Math.max(0,e-1-(e-1)%t)}}function w(e){return"'"===e||'"'===e||"`"===e}},1380:(e,t,i)=>{"use strict";i.d(t,{A:()=>c});var n=i(7295),o=i(1329),r=i(3181),s=i(8784),a=i(4314),l=i(187);class c{static deleteRight(e,t,i,n){let r=[],l=3!==e;for(let e=0,c=n.length;e=h.length+1)return!1;const d=h.charAt(u.column-2),g=n.get(d);if(!g)return!1;if((0,r.LN)(d)){if("never"===i)return!1}else if("never"===t)return!1;const f=h.charAt(u.column-1);let p=!1;for(const e of g)e.open===d&&e.close===f&&(p=!0);if(!p)return!1;if("auto"===e){let e=!1;for(let t=0,i=a.length;t1){const e=t.getLineContent(o.lineNumber),s=n.LC(e),l=-1===s?e.length+1:s+1;if(o.column<=l){const e=r.io.visibleColumnFromColumn2(i,t,o),n=r.io.prevIndentTabStop(e,i.indentSize),s=r.io.columnFromVisibleColumn2(i,t,o.lineNumber,n);return new a.e(o.lineNumber,s,o.lineNumber,o.column)}}return a.e.fromPositions(c.getPositionAfterDeleteLeft(o,t),o)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){const i=n.oH(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,i+1)}if(e.lineNumber>1){const i=e.lineNumber-1;return new l.L(i,t.getLineMaxColumn(i))}return e}static cut(e,t,i){let n=[];for(let r=0,s=i.length;r1?(e=u.lineNumber-1,i=t.getLineMaxColumn(u.lineNumber-1),l=u.lineNumber,c=t.getLineMaxColumn(u.lineNumber)):(e=u.lineNumber,i=1,l=u.lineNumber,c=t.getLineMaxColumn(u.lineNumber));let h=new a.e(e,i,l,c);h.isEmpty()?n[r]=null:n[r]=new o.T4(h,"")}else n[r]=null;else n[r]=new o.T4(s,"")}return new r.Tp(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}},3814:(e,t,i)=>{"use strict";i.d(t,{P:()=>u,N:()=>n});var n,o=i(8401),r=i(3181),s=i(8784),a=i(5795),l=i(187),c=i(4314);class u{static addCursorDown(e,t,i){let n=[],o=0;for(let a=0,l=t.length;at&&(i=t,n=e.model.getLineMaxColumn(i)),r.Vi.fromModelState(new r.rS(new c.e(s.lineNumber,1,i,n),0,new l.L(i,n),0))}const u=t.modelState.selectionStart.getStartPosition().lineNumber;if(s.lineNumberu){const i=e.getLineCount();let n=a.lineNumber+1,o=1;return n>i&&(n=i,o=e.getLineMaxColumn(n)),r.Vi.fromViewState(t.viewState.move(t.modelState.hasSelection(),n,o,0))}{const e=t.modelState.selectionStart.getEndPosition();return r.Vi.fromModelState(t.modelState.move(t.modelState.hasSelection(),e.lineNumber,e.column,0))}}static word(e,t,i,n){const o=e.model.validatePosition(n);return r.Vi.fromModelState(a.w.word(e.cursorConfig,e.model,t.modelState,i,o))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new r.Vi(t.modelState,t.viewState);const i=t.viewState.position.lineNumber,n=t.viewState.position.column;return r.Vi.fromViewState(new r.rS(new c.e(i,n,i,n),0,new l.L(i,n),0))}static moveTo(e,t,i,n,o){const s=e.model.validatePosition(n),a=o?e.coordinatesConverter.validateViewPosition(new l.L(o.lineNumber,o.column),s):e.coordinatesConverter.convertModelPositionToViewPosition(s);return r.Vi.fromViewState(t.viewState.move(i,a.lineNumber,a.column,0))}static simpleMove(e,t,i,n,o,a){switch(i){case 0:return 4===a?this._moveHalfLineLeft(e,t,n):this._moveLeft(e,t,n,o);case 1:return 4===a?this._moveHalfLineRight(e,t,n):this._moveRight(e,t,n,o);case 2:return 2===a?this._moveUpByViewLines(e,t,n,o):this._moveUpByModelLines(e,t,n,o);case 3:return 2===a?this._moveDownByViewLines(e,t,n,o):this._moveDownByModelLines(e,t,n,o);case 4:return 2===a?t.map((t=>r.Vi.fromViewState(s.o.moveToPrevBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>r.Vi.fromModelState(s.o.moveToPrevBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 5:return 2===a?t.map((t=>r.Vi.fromViewState(s.o.moveToNextBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>r.Vi.fromModelState(s.o.moveToNextBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 6:return this._moveToViewMinColumn(e,t,n);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,n);case 8:return this._moveToViewCenterColumn(e,t,n);case 9:return this._moveToViewMaxColumn(e,t,n);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,n);default:return null}}static viewportMove(e,t,i,n,o){const r=e.getCompletelyVisibleViewRange(),s=e.coordinatesConverter.convertViewRangeToModelRange(r);switch(i){case 11:{const i=this._firstLineNumberInRange(e.model,s,o),r=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,r)]}case 13:{const i=this._lastLineNumberInRange(e.model,s,o),r=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,r)]}case 12:{const i=Math.round((s.startLineNumber+s.endLineNumber)/2),o=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,o)]}case 14:{let i=[];for(let o=0,s=t.length;oi.endLineNumber-1&&(o=i.endLineNumber-1),or.Vi.fromViewState(s.o.moveLeft(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineLeft(e,t,i){let n=[];for(let o=0,a=t.length;or.Vi.fromViewState(s.o.moveRight(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineRight(e,t,i){let n=[];for(let o=0,a=t.length;o{"use strict";i.d(t,{o:()=>c});var n=i(3181),o=i(187),r=i(4314),s=i(7295),a=i(3675);class l{constructor(e,t,i){this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=i}}class c{static leftPosition(e,t){if(t.column>e.getLineMinColumn(t.lineNumber))return t.delta(void 0,-s.HO(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const i=t.lineNumber-1;return new o.L(i,e.getLineMaxColumn(i))}return t}static leftPositionAtomicSoftTabs(e,t,i){if(t.column<=e.getLineIndentColumn(t.lineNumber)){const n=e.getLineMinColumn(t.lineNumber),r=e.getLineContent(t.lineNumber),s=a.l.atomicPosition(r,t.column-1,i,0);if(-1!==s&&s+1>=n)return new o.L(t.lineNumber,s+1)}return this.leftPosition(e,t)}static left(e,t,i){const n=e.stickyTabStops?c.leftPositionAtomicSoftTabs(t,i,e.tabSize):c.leftPosition(t,i);return new l(n.lineNumber,n.column,0)}static moveLeft(e,t,i,n,o){let r,s;if(i.hasSelection()&&!n)r=i.selection.startLineNumber,s=i.selection.startColumn;else{const n=i.position.delta(void 0,-(o-1)),a=t.normalizePosition(c.clipPositionColumn(n,t),0),l=c.left(e,t,a);r=l.lineNumber,s=l.column}return i.move(n,r,s,0)}static clipPositionColumn(e,t){return new o.L(e.lineNumber,c.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,i){return ei?i:e}static rightPosition(e,t,i){return iu?(i=u,o=a?t.getLineMaxColumn(i):Math.min(t.getLineMaxColumn(i),o)):o=n.io.columnFromVisibleColumn2(e,t,i,c),r=h?0:c-n.io.visibleColumnFromColumn(t.getLineContent(i),o,e.tabSize),new l(i,o,r)}static moveDown(e,t,i,n,o){let r,s;i.hasSelection()&&!n?(r=i.selection.endLineNumber,s=i.selection.endColumn):(r=i.position.lineNumber,s=i.position.column);let a=c.down(e,t,r,s,i.leftoverVisibleColumns,o,!0);return i.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateDown(e,t,i){let s=i.selection,a=c.down(e,t,s.selectionStartLineNumber,s.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),l=c.down(e,t,s.positionLineNumber,s.positionColumn,i.leftoverVisibleColumns,1,!1);return new n.rS(new r.e(a.lineNumber,a.column,a.lineNumber,a.column),a.leftoverVisibleColumns,new o.L(l.lineNumber,l.column),l.leftoverVisibleColumns)}static up(e,t,i,o,r,s,a){const c=n.io.visibleColumnFromColumn(t.getLineContent(i),o,e.tabSize)+r,u=1===i&&1===o;return(i-=s)<1?(i=1,o=a?t.getLineMinColumn(i):Math.min(t.getLineMaxColumn(i),o)):o=n.io.columnFromVisibleColumn2(e,t,i,c),r=u?0:c-n.io.visibleColumnFromColumn(t.getLineContent(i),o,e.tabSize),new l(i,o,r)}static moveUp(e,t,i,n,o){let r,s;i.hasSelection()&&!n?(r=i.selection.startLineNumber,s=i.selection.startColumn):(r=i.position.lineNumber,s=i.position.column);let a=c.up(e,t,r,s,i.leftoverVisibleColumns,o,!0);return i.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateUp(e,t,i){let s=i.selection,a=c.up(e,t,s.selectionStartLineNumber,s.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),l=c.up(e,t,s.positionLineNumber,s.positionColumn,i.leftoverVisibleColumns,1,!1);return new n.rS(new r.e(a.lineNumber,a.column,a.lineNumber,a.column),a.leftoverVisibleColumns,new o.L(l.lineNumber,l.column),l.leftoverVisibleColumns)}static _isBlankLine(e,t){return 0===e.getLineFirstNonWhitespaceColumn(t)}static moveToPrevBlankLine(e,t,i,n){let o=i.position.lineNumber;for(;o>1&&this._isBlankLine(t,o);)o--;for(;o>1&&!this._isBlankLine(t,o);)o--;return i.move(n,o,t.getLineMinColumn(o),0)}static moveToNextBlankLine(e,t,i,n){const o=t.getLineCount();let r=i.position.lineNumber;for(;r{"use strict";i.d(t,{u:()=>f,g:()=>p});var n=i(7301),o=i(7295),r=i(1329),s=i(291),a=i(4314),l=i(3860);class c{constructor(e,t,i){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=i}getEditOperations(e,t){t.addTrackedEditOperation(new a.e(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new a.e(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(e,t){let i=t.getInverseEditOperations(),n=i[0].range,o=i[1].range;return new l.Y(n.endLineNumber,n.endColumn,o.endLineNumber,o.endColumn-this._charAfterSelection.length)}}var u=i(3181),h=i(9410),d=i(7354),g=i(3831);class f{static indent(e,t,i){if(null===t||null===i)return[];let n=[];for(let t=0,o=i.length;t1){let n;for(n=i-1;n>=1;n--){const e=t.getLineContent(n);if(o.ow(e)>=0)break}if(n<1)return null;const s=t.getLineMaxColumn(n),l=g.zu.getEnterAction(e.autoIndent,t,new a.e(n,s,n,s));l&&(r=l.indentation+l.appendText)}return n&&(n===d.wU.Indent&&(r=f.shiftIndent(e,r)),n===d.wU.Outdent&&(r=f.unshiftIndent(e,r)),r=e.normalizeIndentation(r)),r||null}static _replaceJumpToNextIndent(e,t,i,n){let o="",s=i.getStartPosition();if(e.insertSpaces){let i=u.io.visibleColumnFromColumn2(e,t,s),n=e.indentSize,r=n-i%n;for(let e=0;ethis._compositionType(i,e,o,r,s,a)));return new u.Tp(4,l,{shouldPushStackElementBefore:_(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,o,s){if(!t.isEmpty())return null;const l=t.getPosition(),c=Math.max(1,l.column-n),u=Math.min(e.getLineMaxColumn(l.lineNumber),l.column+o),h=new a.e(l.lineNumber,c,l.lineNumber,u);return e.getValueInRange(h)===i&&0===s?null:new r.Uo(h,i,0,s)}static _typeCommand(e,t,i){return i?new r.Sj(e,t,!0):new r.T4(e,t,!0)}static _enter(e,t,i,n){if(0===e.autoIndent)return f._typeCommand(n,"\n",i);if(!t.isCheapToTokenize(n.getStartPosition().lineNumber)||1===e.autoIndent){let r=t.getLineContent(n.startLineNumber),s=o.V8(r).substring(0,n.startColumn-1);return f._typeCommand(n,"\n"+e.normalizeIndentation(s),i)}const s=g.zu.getEnterAction(e.autoIndent,t,n);if(s){if(s.indentAction===d.wU.None)return f._typeCommand(n,"\n"+e.normalizeIndentation(s.indentation+s.appendText),i);if(s.indentAction===d.wU.Indent)return f._typeCommand(n,"\n"+e.normalizeIndentation(s.indentation+s.appendText),i);if(s.indentAction===d.wU.IndentOutdent){const t=e.normalizeIndentation(s.indentation),o=e.normalizeIndentation(s.indentation+s.appendText),a="\n"+o+"\n"+t;return i?new r.Sj(n,a,!0):new r.Uo(n,a,-1,o.length-t.length,!0)}if(s.indentAction===d.wU.Outdent){const t=f.unshiftIndent(e,s.indentation);return f._typeCommand(n,"\n"+e.normalizeIndentation(t+s.appendText),i)}}const a=t.getLineContent(n.startLineNumber),l=o.V8(a).substring(0,n.startColumn-1);if(e.autoIndent>=4){const s=g.zu.getIndentForEnter(e.autoIndent,t,n,{unshiftIndent:t=>f.unshiftIndent(e,t),shiftIndent:t=>f.shiftIndent(e,t),normalizeIndentation:t=>e.normalizeIndentation(t)});if(s){let a=u.io.visibleColumnFromColumn2(e,t,n.getEndPosition());const l=n.endColumn,c=t.getLineContent(n.endLineNumber),h=o.LC(c);if(n=h>=0?n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,h+1)):n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new r.Sj(n,"\n"+e.normalizeIndentation(s.afterEnter),!0);{let t=0;return l<=h+1&&(e.insertSpaces||(a=Math.ceil(a/e.indentSize)),t=Math.min(a+1-e.normalizeIndentation(s.afterEnter).length-1,0)),new r.Uo(n,"\n"+e.normalizeIndentation(s.afterEnter),0,t,!0)}}}return f._typeCommand(n,"\n"+e.normalizeIndentation(l),i)}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let e=0,n=i.length;ef.shiftIndent(e,t),unshiftIndent:t=>f.unshiftIndent(e,t)});if(null===r)return null;if(r!==e.normalizeIndentation(o)){const o=t.getLineFirstNonWhitespaceColumn(i.startLineNumber);return 0===o?f._typeCommand(new a.e(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(r)+n,!1):f._typeCommand(new a.e(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(r)+t.getLineContent(i.startLineNumber).substring(o-1,i.startColumn-1)+n,!1)}return null}static _isAutoClosingOvertype(e,t,i,n,o){if("never"===e.autoClosingOvertype)return!1;if(!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(o))return!1;for(let r=0,s=i.length;r2?l.charCodeAt(a.column-2):0)&&c)return!1;if("auto"===e.autoClosingOvertype){let e=!1;for(let t=0,i=n.length;tt.startsWith(e.open))),s=o.some((e=>t.startsWith(e.close)));return!r&&s}static _findAutoClosingPairOpen(e,t,i,n){const o=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!o)return null;let r=null;for(const e of o)if(null===r||e.open.length>r.open.length){let o=!0;for(const r of i)if(t.getValueInRange(new a.e(r.lineNumber,r.column-e.open.length+1,r.lineNumber,r.column))+n!==e.open){o=!1;break}o&&(r=e)}return r}static _findSubAutoClosingPairClose(e,t){if(t.open.length<=1)return"";const i=t.close.charAt(t.close.length-1),n=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i)||[];let o=null;for(const e of n)e.open!==t.open&&t.open.includes(e.open)&&t.close.endsWith(e.close)&&(!o||e.open.length>o.open.length)&&(o=e);return o?o.close:""}static _getAutoClosingPairClose(e,t,i,o,r){const s=(0,u.LN)(o),a=s?e.autoClosingQuotes:e.autoClosingBrackets;if("never"===a)return null;const l=this._findAutoClosingPairOpen(e,t,i.map((e=>e.getPosition())),o);if(!l)return null;const c=this._findSubAutoClosingPairClose(e,l);let d=!0;const p=s?e.shouldAutoCloseBefore.quote:e.shouldAutoCloseBefore.bracket;for(let o=0,u=i.length;om.column-1){const t=_.charAt(m.column-1);if(!f._isBeforeClosingBrace(e,v)&&!p(t))return null}if(!t.isCheapToTokenize(m.lineNumber))return null;if(1===l.open.length&&s&&"always"!==a){const t=(0,h.u)(e.wordSeparators);if(r&&m.column>1&&0===t.get(_.charCodeAt(m.column-2)))return null;if(!r&&m.column>2&&0===t.get(_.charCodeAt(m.column-3)))return null}t.forceTokenization(m.lineNumber);const b=t.getLineTokens(m.lineNumber);let y=!1;try{y=g.zu.shouldAutoClosePair(l,b,r?m.column:m.column-1)}catch(e){(0,n.dL)(e)}if(!y)return null}return d?l.close.substring(0,l.close.length-c.length):l.close}static _runAutoClosingOpenCharType(e,t,i,n,o,r,s){let a=[];for(let e=0,t=n.length;enew r.T4(new a.e(e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1)));return new u.Tp(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const h=this._getAutoClosingPairClose(t,i,o,c,!1);return null!==h?this._runAutoClosingOpenCharType(e,t,i,o,c,!1,h):null}static typeWithInterceptors(e,t,i,n,o,s,a){if(!e&&"\n"===a){let e=[];for(let t=0,r=o.length;t{"use strict";i.d(t,{w:()=>c,L:()=>u});var n=i(7295),o=i(3181),r=i(1380),s=i(9410),a=i(187),l=i(4314);class c{static _createWord(e,t,i,n,o){return{start:n,end:o,wordType:t,nextCharClass:i}}static _findPreviousWordOnLine(e,t,i){let n=t.getLineContent(i.lineNumber);return this._doFindPreviousWordOnLine(n,e,i)}static _doFindPreviousWordOnLine(e,t,i){let n=0;for(let o=i.column-2;o>=0;o--){let i=e.charCodeAt(o),r=t.get(i);if(0===r){if(2===n)return this._createWord(e,n,r,o+1,this._findEndOfWord(e,t,n,o+1));n=1}else if(2===r){if(1===n)return this._createWord(e,n,r,o+1,this._findEndOfWord(e,t,n,o+1));n=2}else if(1===r&&0!==n)return this._createWord(e,n,r,o+1,this._findEndOfWord(e,t,n,o+1))}return 0!==n?this._createWord(e,n,1,0,this._findEndOfWord(e,t,n,0)):null}static _findEndOfWord(e,t,i,n){let o=e.length;for(let r=n;r=0;o--){let n=e.charCodeAt(o),r=t.get(n);if(1===r)return o+1;if(1===i&&2===r)return o+1;if(2===i&&0===r)return o+1}return 0}static moveWordLeft(e,t,i,n){let o=i.lineNumber,r=i.column;1===r&&o>1&&(o-=1,r=t.getLineMaxColumn(o));let s=c._findPreviousWordOnLine(e,t,new a.L(o,r));if(0===n)return new a.L(o,s?s.start+1:1);if(1===n)return s&&2===s.wordType&&s.end-s.start==1&&0===s.nextCharClass&&(s=c._findPreviousWordOnLine(e,t,new a.L(o,s.start+1))),new a.L(o,s?s.start+1:1);if(3===n){for(;s&&2===s.wordType;)s=c._findPreviousWordOnLine(e,t,new a.L(o,s.start+1));return new a.L(o,s?s.start+1:1)}return s&&r<=s.end+1&&(s=c._findPreviousWordOnLine(e,t,new a.L(o,s.start+1))),new a.L(o,s?s.end+1:1)}static _moveWordPartLeft(e,t){const i=t.lineNumber,o=e.getLineMaxColumn(i);if(1===t.column)return i>1?new a.L(i-1,e.getLineMaxColumn(i-1)):t;const r=e.getLineContent(i);for(let e=t.column-1;e>1;e--){const t=r.charCodeAt(e-2),s=r.charCodeAt(e-1);if(95===t&&95!==s)return new a.L(i,e);if(n.mK(t)&&n.df(s))return new a.L(i,e);if(n.df(t)&&n.df(s)&&e+1=l.start+1&&(l=c._findNextWordOnLine(e,t,new a.L(o,l.end+1))),r=l?l.start+1:t.getLineMaxColumn(o);return new a.L(o,r)}static _moveWordPartRight(e,t){const i=t.lineNumber,o=e.getLineMaxColumn(i);if(t.column===o)return i1?d=1:(h--,d=n.getLineMaxColumn(h)):(g&&d<=g.end+1&&(g=c._findPreviousWordOnLine(i,n,new a.L(h,g.start+1))),g?d=g.end+1:d>1?d=1:(h--,d=n.getLineMaxColumn(h))),new l.e(h,d,u.lineNumber,u.column)}static deleteInsideWord(e,t,i){if(!i.isEmpty())return i;const n=new a.L(i.positionLineNumber,i.positionColumn);return this._deleteInsideWordWhitespace(t,n)||this._deleteInsideWordDetermineDeleteRange(e,t,n)}static _charAtIsWhitespace(e,t){const i=e.charCodeAt(t);return 32===i||9===i}static _deleteInsideWordWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=i.length;if(0===n)return null;let o=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(i,o))return null;let r=Math.min(t.column-1,n-1);if(!this._charAtIsWhitespace(i,r))return null;for(;o>0&&this._charAtIsWhitespace(i,o-1);)o--;for(;r+11?new l.e(i.lineNumber-1,t.getLineMaxColumn(i.lineNumber-1),i.lineNumber,1):i.lineNumbere.start+1<=i.column&&i.column<=e.end+1,s=(e,t)=>(e=Math.min(e,i.column),t=Math.max(t,i.column),new l.e(i.lineNumber,e,i.lineNumber,t)),a=e=>{let t=e.start+1,i=e.end+1,r=!1;for(;i-11&&this._charAtIsWhitespace(n,t-2);)t--;return s(t,i)},u=c._findPreviousWordOnLine(e,t,i);if(u&&r(u))return a(u);const h=c._findNextWordOnLine(e,t,i);return h&&r(h)?a(h):u&&h?s(u.end+1,h.start+1):u?s(u.start+1,u.end+1):h?s(h.start+1,h.end+1):s(1,o+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=c._moveWordPartLeft(e,i);return new l.e(i.lineNumber,i.column,n.lineNumber,n.column)}static _findFirstNonWhitespaceChar(e,t){let i=e.length;for(let n=t;n=f.start+1&&(f=c._findNextWordOnLine(i,n,new a.L(u,f.end+1))),f?h=f.start+1:hBoolean(e)))}},9410:(e,t,i)=>{"use strict";i.d(t,{u:()=>r});var n=i(4906);class o extends n.N{constructor(e){super(0);for(let t=0,i=e.length;t(t.hasOwnProperty(e)||(t[e]=(e=>new o(e))(e)),t[e])}()},4906:(e,t,i)=>{"use strict";i.d(t,{N:()=>o,q:()=>r});var n=i(5427);class o{constructor(e){let t=(0,n.K)(e);this._defaultValue=t,this._asciiMap=o._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){let t=new Uint8Array(256);for(let i=0;i<256;i++)t[i]=e;return t}set(e,t){let i=(0,n.K)(t);e>=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}}class r{constructor(){this._actual=new o(0)}add(e){this._actual.set(e,1)}has(e){return 1===this._actual.get(e)}}},9386:(e,t,i)=>{"use strict";i.d(t,{h:()=>o});var n=i(4314);class o{static insert(e,t){return{range:new n.e(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}},8411:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var n=i(4101);class o{constructor(e,t){this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t}static createEmpty(e){const t=new Uint32Array(2);return t[0]=e.length,t[1]=16793600,new o(t,e)}equals(e){return e instanceof o&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,i){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;const n=t<<1,o=n+(i<<1);for(let t=n;t0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[1+(e<<1)]}getLanguageId(e){const t=this._tokens[1+(e<<1)];return n.NX.getLanguageId(t)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return n.NX.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return n.NX.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return n.NX.getClassNameFromMetadata(t)}getInlineStyle(e,t){const i=this._tokens[1+(e<<1)];return n.NX.getInlineStyleFromMetadata(i,t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return o.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new r(this,e,t,i)}static convertToEndOffset(e,t){const i=(e.length>>>1)-1;for(let t=0;t>>1)-1;for(;it&&(n=o)}return i}}class r{constructor(e,t,i,n){this._source=e,this._startOffset=t,this._endOffset=i,this._deltaOffset=n,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(let t=this._firstTokenIndex,n=e.getCount();t=i);t++)this._tokensCount++}equals(e){return e instanceof r&&this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount)}getCount(){return this._tokensCount}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}},187:(e,t,i)=>{"use strict";i.d(t,{L:()=>n});class n{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new n(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return n.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return n.isBefore(this,e)}static isBefore(e,t){return e.lineNumber{"use strict";i.d(t,{e:()=>o});var n=i(187);class o{constructor(e,t,i,n){e>i||e===i&&t>n?(this.startLineNumber=i,this.startColumn=n,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=i,this.endColumn=n)}isEmpty(){return o.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return o.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.columne.endColumn)}containsRange(e){return o.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)}strictContainsRange(e){return o.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)}plusRange(e){return o.plusRange(this,e)}static plusRange(e,t){let i,n,r,s;return t.startLineNumbere.endLineNumber?(r=t.endLineNumber,s=t.endColumn):t.endLineNumber===e.endLineNumber?(r=t.endLineNumber,s=Math.max(t.endColumn,e.endColumn)):(r=e.endLineNumber,s=e.endColumn),new o(i,n,r,s)}intersectRanges(e){return o.intersectRanges(this,e)}static intersectRanges(e,t){let i=e.startLineNumber,n=e.startColumn,r=e.endLineNumber,s=e.endColumn,a=t.startLineNumber,l=t.startColumn,c=t.endLineNumber,u=t.endColumn;return ic?(r=c,s=u):r===c&&(s=Math.min(s,u)),i>r||i===r&&n>s?null:new o(i,n,r,s)}equalsRange(e){return o.equalsRange(this,e)}static equalsRange(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return o.getEndPosition(this)}static getEndPosition(e){return new n.L(e.endLineNumber,e.endColumn)}getStartPosition(){return o.getStartPosition(this)}static getStartPosition(e){return new n.L(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new o(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new o(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return o.collapseToStart(this)}static collapseToStart(e){return new o(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}static fromPositions(e,t=e){return new o(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new o(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}}},3860:(e,t,i)=>{"use strict";i.d(t,{Y:()=>r});var n=i(187),o=i(4314);class r extends o.e{constructor(e,t,i,n){super(e,t,i,n),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=i,this.positionColumn=n}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return r.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new r(this.startLineNumber,this.startColumn,e,t):new r(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new n.L(this.positionLineNumber,this.positionColumn)}setStartPosition(e,t){return 0===this.getDirection()?new r(e,t,this.endLineNumber,this.endColumn):new r(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new r(e.lineNumber,e.column,t.lineNumber,t.column)}static liftSelection(e){return new r(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let i=0,n=e.length;i{"use strict";i.d(t,{oe:()=>u,lZ:()=>h,l$:()=>d,kH:()=>g});var n=i(7295),o=i(1432),r=i(3060);let s,a,l;function c(){return s||(s=new TextDecoder("UTF-16LE")),s}function u(){return l||(l=o.r()?c():(a||(a=new TextDecoder("UTF-16BE")),a)),l}const h="undefined"!=typeof TextDecoder;let d,g;function f(e,t,i){let n=[],o=0;for(let s=0;snew p(e),g=function(e,t,i){const n=new Uint16Array(e.buffer,t,i);return i>0&&(65279===n[0]||65534===n[0])?f(e,t,i):c().decode(n)}):(d=e=>new m,g=f);class p{constructor(e){this._capacity=0|e,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return null!==this._completedStrings?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(0===this._bufferLength)return"";const e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return u().decode(e)}_flushBuffer(){const e=this._buildBuffer();this._bufferLength=0,null===this._completedStrings?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}write1(e){const t=this._capacity-this._bufferLength;t<=1&&(0===t||n.ZG(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCII(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIIString(e){const t=e.length;if(this._bufferLength+t>=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(let i=0;i{"use strict";i.d(t,{WU:()=>n,hG:()=>o,Hi:()=>r});class n{constructor(e,t,i){this.offset=0|e,this.type=t,this.language=i}toString(){return"("+this.offset+", "+this.type+")"}}class o{constructor(e,t){this.tokens=e,this.endState=t}}class r{constructor(e,t){this.tokens=e,this.endState=t}}},653:(e,t,i)=>{"use strict";i.d(t,{p:()=>n});class n{constructor(e,t,i,n,o,r){this.id=e,this.label=t,this.alias=i,this._precondition=n,this._run=o,this._contextKeyService=r}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(){return this.isSupported()?this._run():Promise.resolve(void 0)}}},6518:(e,t,i)=>{"use strict";function n(e){return e&&"string"==typeof e.id}i.d(t,{I:()=>n,g:()=>o});const o={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}},9102:(e,t,i)=>{"use strict";i.d(t,{u:()=>n});var n,o=i(3580),r=i(8819);!function(e){e.editorSimpleInput=new r.uy("editorSimpleInput",!1,!0),e.editorTextFocus=new r.uy("editorTextFocus",!1,o.N("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),e.focus=new r.uy("editorFocus",!1,o.N("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),e.textInputFocus=new r.uy("textInputFocus",!1,o.N("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),e.readOnly=new r.uy("editorReadonly",!1,o.N("editorReadonly","Whether the editor is read only")),e.inDiffEditor=new r.uy("inDiffEditor",!1,o.N("inDiffEditor","Whether the context is a diff editor")),e.columnSelection=new r.uy("editorColumnSelection",!1,o.N("editorColumnSelection","Whether `editor.columnSelection` is enabled")),e.writable=e.readOnly.toNegated(),e.hasNonEmptySelection=new r.uy("editorHasSelection",!1,o.N("editorHasSelection","Whether the editor has text selected")),e.hasOnlyEmptySelection=e.hasNonEmptySelection.toNegated(),e.hasMultipleSelections=new r.uy("editorHasMultipleSelections",!1,o.N("editorHasMultipleSelections","Whether the editor has multiple selections")),e.hasSingleSelection=e.hasMultipleSelections.toNegated(),e.tabMovesFocus=new r.uy("editorTabMovesFocus",!1,o.N("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),e.tabDoesNotMoveFocus=e.tabMovesFocus.toNegated(),e.isInWalkThroughSnippet=new r.uy("isInEmbeddedEditor",!1,!0),e.canUndo=new r.uy("canUndo",!1,!0),e.canRedo=new r.uy("canRedo",!1,!0),e.hoverVisible=new r.uy("editorHoverVisible",!1,o.N("editorHoverVisible","Whether the editor hover is visible")),e.inCompositeEditor=new r.uy("inCompositeEditor",void 0,o.N("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),e.notInCompositeEditor=e.inCompositeEditor.toNegated(),e.languageId=new r.uy("editorLangId","",o.N("editorLangId","The language identifier of the editor")),e.hasCompletionItemProvider=new r.uy("editorHasCompletionItemProvider",!1,o.N("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),e.hasCodeActionsProvider=new r.uy("editorHasCodeActionsProvider",!1,o.N("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),e.hasCodeLensProvider=new r.uy("editorHasCodeLensProvider",!1,o.N("editorHasCodeLensProvider","Whether the editor has a code lens provider")),e.hasDefinitionProvider=new r.uy("editorHasDefinitionProvider",!1,o.N("editorHasDefinitionProvider","Whether the editor has a definition provider")),e.hasDeclarationProvider=new r.uy("editorHasDeclarationProvider",!1,o.N("editorHasDeclarationProvider","Whether the editor has a declaration provider")),e.hasImplementationProvider=new r.uy("editorHasImplementationProvider",!1,o.N("editorHasImplementationProvider","Whether the editor has an implementation provider")),e.hasTypeDefinitionProvider=new r.uy("editorHasTypeDefinitionProvider",!1,o.N("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),e.hasHoverProvider=new r.uy("editorHasHoverProvider",!1,o.N("editorHasHoverProvider","Whether the editor has a hover provider")),e.hasDocumentHighlightProvider=new r.uy("editorHasDocumentHighlightProvider",!1,o.N("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),e.hasDocumentSymbolProvider=new r.uy("editorHasDocumentSymbolProvider",!1,o.N("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),e.hasReferenceProvider=new r.uy("editorHasReferenceProvider",!1,o.N("editorHasReferenceProvider","Whether the editor has a reference provider")),e.hasRenameProvider=new r.uy("editorHasRenameProvider",!1,o.N("editorHasRenameProvider","Whether the editor has a rename provider")),e.hasSignatureHelpProvider=new r.uy("editorHasSignatureHelpProvider",!1,o.N("editorHasSignatureHelpProvider","Whether the editor has a signature help provider")),e.hasInlayHintsProvider=new r.uy("editorHasInlayHintsProvider",!1,o.N("editorHasInlayHintsProvider","Whether the editor has an inline hints provider")),e.hasDocumentFormattingProvider=new r.uy("editorHasDocumentFormattingProvider",!1,o.N("editorHasDocumentFormattingProvider","Whether the editor has a document formatting provider")),e.hasDocumentSelectionFormattingProvider=new r.uy("editorHasDocumentSelectionFormattingProvider",!1,o.N("editorHasDocumentSelectionFormattingProvider","Whether the editor has a document selection formatting provider")),e.hasMultipleDocumentFormattingProvider=new r.uy("editorHasMultipleDocumentFormattingProvider",!1,o.N("editorHasMultipleDocumentFormattingProvider","Whether the editor has multiple document formatting providers")),e.hasMultipleDocumentSelectionFormattingProvider=new r.uy("editorHasMultipleDocumentSelectionFormattingProvider",!1,o.N("editorHasMultipleDocumentSelectionFormattingProvider","Whether the editor has multiple document selection formatting providers"))}(n||(n={}))},4973:(e,t,i)=>{"use strict";var n,o;i.d(t,{sh:()=>n,F5:()=>o,dJ:()=>r,tk:()=>s,Qi:()=>a,je:()=>l}),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(n||(n={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(o||(o={}));class r{constructor(e){this.tabSize=Math.max(1,0|e.tabSize),this.indentSize=0|e.tabSize,this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace)}equals(e){return this.tabSize===e.tabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class s{constructor(e,t){this.range=e,this.matches=t}}class a{constructor(e,t,i,n,o,r){this.identifier=e,this.range=t,this.text=i,this.forceMoveMarkers=n,this.isAutoWhitespaceEdit=o,this._isTracked=r}}class l{constructor(e,t,i){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=i}}},5215:(e,t,i)=>{"use strict";i.d(t,{e9:()=>f,NL:()=>p});var n=i(3580),o=i(7301),r=i(3860),s=i(666),a=i(962),l=i(3060),c=i(5935);function u(e){return e.toString()}class h{constructor(e,t,i,n,o,r,s){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=i,this.afterEOL=n,this.beforeCursorState=o,this.afterCursorState=r,this.changes=s}static create(e,t){const i=e.getAlternativeVersionId(),n=g(e);return new h(i,i,n,n,t,t,[])}append(e,t,i,n,o){t.length>0&&(this.changes=(0,a.b)(this.changes,t)),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=o}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,i){if(l.T4(e,t?t.length:0,i),i+=4,t)for(const n of t)l.T4(e,n.selectionStartLineNumber,i),i+=4,l.T4(e,n.selectionStartColumn,i),i+=4,l.T4(e,n.positionLineNumber,i),i+=4,l.T4(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){const n=l.Ag(e,t);t+=4;for(let o=0;oe.toString())).join(", ")}matchesResource(e){return(s.o.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof h}append(e,t,i,n,o){this._data instanceof h&&this._data.append(e,t,i,n,o)}close(){this._data instanceof h&&(this._data=this._data.serialize())}open(){this._data instanceof h||(this._data=h.deserialize(this._data))}undo(){if(s.o.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof h&&(this._data=this._data.serialize());const e=h.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(s.o.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof h&&(this._data=this._data.serialize());const e=h.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof h&&(this._data=this._data.serialize()),this._data.byteLength+168}}function g(e){return"\n"===e.getEOL()?0:1}function f(e){return!!e&&(e instanceof d||e instanceof class{constructor(e,t){this.type=1,this.label=e,this._isOpen=!0,this._editStackElementsArr=t.slice(0),this._editStackElementsMap=new Map;for(const e of this._editStackElementsArr){const t=u(e.resource);this._editStackElementsMap.set(t,e)}this._delegate=null}get resources(){return this._editStackElementsArr.map((e=>e.resource))}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=u(e);return this._editStackElementsMap.has(t)}setModel(e){const t=u(s.o.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=u(e.uri);return!!this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).canAppend(e)}append(e,t,i,n,o){const r=u(e.uri);this._editStackElementsMap.get(r).append(e,t,i,n,o)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=u(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){let e=[];for(const t of this._editStackElementsArr)e.push(`${(0,c.EZ)(t.resource)}: ${t}`);return`{${e.join(", ")}}`}})}class p{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);f(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);f(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e){const t=this._undoRedoService.getLastElement(this._model.uri);if(f(t)&&t.canAppend(this._model))return t;const i=new d(this._model,e);return this._undoRedoService.pushElement(i),i}pushEOL(e){const t=this._getOrCreateEditStackElement(null);this._model.setEOL(e),t.append(this._model,[],g(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i){const n=this._getOrCreateEditStackElement(e),o=this._model.applyEdits(t,!0),r=p._computeCursorState(i,o),s=o.map(((e,t)=>({index:t,textChange:e.textChange})));return s.sort(((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition)),n.append(this._model,s.map((e=>e.textChange)),g(this._model),this._model.getAlternativeVersionId(),r),r}static _computeCursorState(e,t){try{return e?e(t):null}catch(e){return(0,o.dL)(e),null}}}},962:(e,t,i)=>{"use strict";i.d(t,{q:()=>s,b:()=>a});var n=i(3060),o=i(72);function r(e){return e.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class s{constructor(e,t,i,n){this.oldPosition=e,this.oldText=t,this.newPosition=i,this.newText=n}get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}toString(){return 0===this.oldText.length?`(insert@${this.oldPosition} "${r(this.newText)}")`:0===this.newText.length?`(delete@${this.oldPosition} "${r(this.oldText)}")`:`(replace@${this.oldPosition} "${r(this.oldText)}" with "${r(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,i){const o=t.length;n.T4(e,o,i),i+=4;for(let r=0;r{"use strict";i.d(t,{qx:()=>Ke,yO:()=>Ve});var n=i(7301),o=i(4669),r=i(5976),s=i(7295),a=i(666),l=i(4141),c=i(187),u=i(4314),h=i(3860),d=i(4973),g=i(5215);class f{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function p(e,t,i,n,o){let r;for(o.spacesDiff=0,o.looksLikeAlignment=!1,r=0;r0&&a>0)return;if(l>0&&c>0)return;let u=Math.abs(a-c),h=Math.abs(s-l);if(0===u)return o.spacesDiff=h,void(h>0&&0<=l-1&&l-10?o++:m>1&&r++,p(s,a,h,f,u),u.looksLikeAlignment&&(!i||t!==u.spacesDiff))continue;let v=u.spacesDiff;v<=8&&c[v]++,s=h,a=f}let h=i;o!==r&&(h=o{let i=c[t];i>e&&(e=i,d=t)})),4===d&&c[4]>0&&c[2]>0&&c[2]>=c[4]/2&&(d=2)}return{insertSpaces:h,tabSize:d}}function _(e){return(1&e.metadata)>>>0}function v(e,t){e.metadata=254&e.metadata|t<<0}function b(e){return(2&e.metadata)>>>1==1}function y(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function w(e){return(4&e.metadata)>>>2==1}function C(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function S(e){return(8&e.metadata)>>>3==1}function x(e,t){e.metadata=247&e.metadata|(t?1:0)<<3}function k(e,t){e.metadata=207&e.metadata|t<<4}function D(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}class L{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,v(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,C(this,!1),k(this,1),x(this,!1),D(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,y(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;let t=this.options.className;C(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),k(this,this.options.stickiness),x(this,!(!this.options.overviewRuler||!this.options.overviewRuler.color)),D(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const N=new L(null,0,0);N.parent=N,N.left=N,N.right=N,v(N,0);class E{constructor(){this.root=N,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,o){return this.root===N?[]:function(e,t,i,n,o,r){let s=e.root,a=0,l=0,c=0,u=0,h=[],d=0;for(;s!==N;)if(b(s))y(s.left,!1),y(s.right,!1),s===s.parent.right&&(a-=s.parent.delta),s=s.parent;else{if(!b(s.left)){if(l=a+s.maxEnd,li)y(s,!0);else{if(u=a+s.end,u>=t){s.setCachedOffsets(c,u,r);let e=!0;n&&s.ownerId&&s.ownerId!==n&&(e=!1),o&&w(s)&&(e=!1),e&&(h[d++]=s)}y(s,!0),s.right===N||b(s.right)||(a+=s.delta,s=s.right)}}return y(e.root,!1),h}(this,e,t,i,n,o)}search(e,t,i){return this.root===N?[]:function(e,t,i,n){let o=e.root,r=0,s=0,a=0,l=[],c=0;for(;o!==N;){if(b(o)){y(o.left,!1),y(o.right,!1),o===o.parent.right&&(r-=o.parent.delta),o=o.parent;continue}if(o.left!==N&&!b(o.left)){o=o.left;continue}s=r+o.start,a=r+o.end,o.setCachedOffsets(s,a,n);let e=!0;t&&o.ownerId&&o.ownerId!==t&&(e=!1),i&&w(o)&&(e=!1),e&&(l[c++]=o),y(o,!0),o.right===N||b(o.right)||(r+=o.delta,o=o.right)}return y(e.root,!1),l}(this,e,t,i)}collectNodesFromOwner(e){return function(e,t){let i=e.root,n=[],o=0;for(;i!==N;)b(i)?(y(i.left,!1),y(i.right,!1),i=i.parent):i.left===N||b(i.left)?(i.ownerId===t&&(n[o++]=i),y(i,!0),i.right===N||b(i.right)||(i=i.right)):i=i.left;return y(e.root,!1),n}(this,e)}collectNodesPostOrder(){return function(e){let t=e.root,i=[],n=0;for(;t!==N;)b(t)?(y(t.left,!1),y(t.right,!1),t=t.parent):t.left===N||b(t.left)?t.right===N||b(t.right)?(i[n++]=t,y(t,!0)):t=t.right:t=t.left;return y(e.root,!1),i}(this)}insert(e){I(this,e),this._normalizeDeltaIfNecessary()}delete(e){T(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const i=e;let n=0;for(;e!==this.root;)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;const o=i.start+n,r=i.end+n;i.setCachedOffsets(o,r,t)}acceptReplace(e,t,i,n){const o=function(e,t,i){let n=e.root,o=0,r=0,s=0,a=0,l=[],c=0;for(;n!==N;)if(b(n))y(n.left,!1),y(n.right,!1),n===n.parent.right&&(o-=n.parent.delta),n=n.parent;else{if(!b(n.left)){if(r=o+n.maxEnd,ri?y(n,!0):(a=o+n.end,a>=t&&(n.setCachedOffsets(s,a,0),l[c++]=n),y(n,!0),n.right===N||b(n.right)||(o+=n.delta,n=n.right))}return y(e.root,!1),l}(this,e,e+t);for(let e=0,t=o.length;ei?(o.start+=l,o.end+=l,o.delta+=l,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),y(o,!0)):(y(o,!0),o.right===N||b(o.right)||(r+=o.delta,o=o.right))}y(e.root,!1)}(this,e,e+t,i),this._normalizeDeltaIfNecessary();for(let r=0,s=o.length;ri)&&1!==n&&(2===n||t)}function M(e,t,i,n,o){const r=function(e){return(48&e.metadata)>>>4}(e),s=0===r||2===r,a=1===r||2===r,l=i-t,c=n,u=Math.min(l,c),h=e.start;let d=!1;const g=e.end;let f=!1;t<=h&&g<=i&&function(e){return(64&e.metadata)>>>6==1}(e)&&(e.start=t,d=!0,e.end=t,f=!0);{const e=o?1:l>0?2:0;!d&&A(h,s,t,e)&&(d=!0),!f&&A(g,a,t,e)&&(f=!0)}if(u>0&&!o){const e=l>c?2:0;!d&&A(h,s,t+u,e)&&(d=!0),!f&&A(g,a,t+u,e)&&(f=!0)}{const n=o?1:0;!d&&A(h,s,i,n)&&(e.start=t+c,d=!0),!f&&A(g,a,i,n)&&(e.end=t+c,f=!0)}const p=c-l;d||(e.start=Math.max(0,h+p)),f||(e.end=Math.max(0,g+p)),e.start>e.end&&(e.end=e.start)}function I(e,t){if(e.root===N)return t.parent=N,t.left=N,t.right=N,v(t,0),e.root=t,e.root;!function(e,t){let i=0,n=e.root;const o=t.start,r=t.end;for(;;)if(s=o,a=r,l=n.start+i,c=n.end+i,(s===l?a-c:s-l)<0){if(n.left===N){t.start-=i,t.end-=i,t.maxEnd-=i,n.left=t;break}n=n.left}else{if(n.right===N){t.start-=i+n.delta,t.end-=i+n.delta,t.maxEnd-=i+n.delta,n.right=t;break}i+=n.delta,n=n.right}var s,a,l,c;t.parent=n,t.left=N,t.right=N,v(t,1)}(e,t),z(t.parent);let i=t;for(;i!==e.root&&1===_(i.parent);)if(i.parent===i.parent.parent.left){const t=i.parent.parent.right;1===_(t)?(v(i.parent,0),v(t,0),v(i.parent.parent,1),i=i.parent.parent):(i===i.parent.right&&(i=i.parent,O(e,i)),v(i.parent,0),v(i.parent.parent,1),F(e,i.parent.parent))}else{const t=i.parent.parent.left;1===_(t)?(v(i.parent,0),v(t,0),v(i.parent.parent,1),i=i.parent.parent):(i===i.parent.left&&(i=i.parent,F(e,i)),v(i.parent,0),v(i.parent.parent,1),O(e,i.parent.parent))}return v(e.root,0),t}function T(e,t){let i,n;if(t.left===N?(i=t.right,n=t,i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta):t.right===N?(i=t.left,n=t):(n=function(e){for(;e.left!==N;)e=e.left;return e}(t.right),i=n.right,i.start+=n.delta,i.end+=n.delta,i.delta+=n.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,n.delta=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0)),n===e.root)return e.root=i,v(i,0),t.detach(),R(),B(i),void(e.root.parent=N);let o,r=1===_(n);if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?i.parent=n.parent:(n.parent===t?i.parent=n:i.parent=n.parent,n.left=t.left,n.right=t.right,n.parent=t.parent,v(n,_(t)),t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==N&&(n.left.parent=n),n.right!==N&&(n.right.parent=n)),t.detach(),r)return z(i.parent),n!==t&&(z(n),z(n.parent)),void R();for(z(i),z(i.parent),n!==t&&(z(n),z(n.parent));i!==e.root&&0===_(i);)i===i.parent.left?(o=i.parent.right,1===_(o)&&(v(o,0),v(i.parent,1),O(e,i.parent),o=i.parent.right),0===_(o.left)&&0===_(o.right)?(v(o,1),i=i.parent):(0===_(o.right)&&(v(o.left,0),v(o,1),F(e,o),o=i.parent.right),v(o,_(i.parent)),v(i.parent,0),v(o.right,0),O(e,i.parent),i=e.root)):(o=i.parent.left,1===_(o)&&(v(o,0),v(i.parent,1),F(e,i.parent),o=i.parent.left),0===_(o.left)&&0===_(o.right)?(v(o,1),i=i.parent):(0===_(o.left)&&(v(o.right,0),v(o,1),O(e,o),o=i.parent.left),v(o,_(i.parent)),v(i.parent,0),v(o.left,0),F(e,i.parent),i=e.root));v(i,0),R()}function R(){N.parent=N,N.delta=0,N.start=0,N.end=0}function O(e,t){const i=t.right;i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,t.right=i.left,i.left!==N&&(i.left.parent=t),i.parent=t.parent,t.parent===N?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i,B(t),B(i)}function F(e,t){const i=t.left;t.delta-=i.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=i.delta,t.end-=i.delta,t.left=i.right,i.right!==N&&(i.right.parent=t),i.parent=t.parent,t.parent===N?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i,B(t),B(i)}function P(e){let t=e.end;if(e.left!==N){const i=e.left.maxEnd;i>t&&(t=i)}if(e.right!==N){const i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function B(e){e.maxEnd=P(e)}function z(e){for(;e!==N;){const t=P(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}class W{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==V)return H(this.right);let e=this;for(;e.parent!==V&&e.parent.left!==e;)e=e.parent;return e.parent===V?V:e.parent}prev(){if(this.left!==V)return $(this.left);let e=this;for(;e.parent!==V&&e.parent.right!==e;)e=e.parent;return e.parent===V?V:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const V=new W(null,0);function H(e){for(;e.left!==V;)e=e.left;return e}function $(e){for(;e.right!==V;)e=e.right;return e}function U(e){return e===V?0:e.size_left+e.piece.length+U(e.right)}function j(e){return e===V?0:e.lf_left+e.piece.lineFeedCnt+j(e.right)}function q(){V.parent=V}function K(e,t){let i=t.right;i.size_left+=t.size_left+(t.piece?t.piece.length:0),i.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=i.left,i.left!==V&&(i.left.parent=t),i.parent=t.parent,t.parent===V?e.root=i:t.parent.left===t?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i}function G(e,t){let i=t.left;t.left=i.right,i.right!==V&&(i.right.parent=t),i.parent=t.parent,t.size_left-=i.size_left+(i.piece?i.piece.length:0),t.lf_left-=i.lf_left+(i.piece?i.piece.lineFeedCnt:0),t.parent===V?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i}function Y(e,t){let i,n;if(t.left===V?(n=t,i=n.right):t.right===V?(n=t,i=n.left):(n=H(t.right),i=n.right),n===e.root)return e.root=i,i.color=0,t.detach(),q(),void(e.root.parent=V);let o,r=1===n.color;if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?(i.parent=n.parent,Q(e,i)):(n.parent===t?i.parent=n:i.parent=n.parent,Q(e,i),n.left=t.left,n.right=t.right,n.parent=t.parent,n.color=t.color,t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==V&&(n.left.parent=n),n.right!==V&&(n.right.parent=n),n.size_left=t.size_left,n.lf_left=t.lf_left,Q(e,n)),t.detach(),i.parent.left===i){let t=U(i),n=j(i);if(t!==i.parent.size_left||n!==i.parent.lf_left){let o=t-i.parent.size_left,r=n-i.parent.lf_left;i.parent.size_left=t,i.parent.lf_left=n,X(e,i.parent,o,r)}}if(Q(e,i.parent),r)q();else{for(;i!==e.root&&0===i.color;)i===i.parent.left?(o=i.parent.right,1===o.color&&(o.color=0,i.parent.color=1,K(e,i.parent),o=i.parent.right),0===o.left.color&&0===o.right.color?(o.color=1,i=i.parent):(0===o.right.color&&(o.left.color=0,o.color=1,G(e,o),o=i.parent.right),o.color=i.parent.color,i.parent.color=0,o.right.color=0,K(e,i.parent),i=e.root)):(o=i.parent.left,1===o.color&&(o.color=0,i.parent.color=1,G(e,i.parent),o=i.parent.left),0===o.left.color&&0===o.right.color?(o.color=1,i=i.parent):(0===o.left.color&&(o.right.color=0,o.color=1,K(e,o),o=i.parent.left),o.color=i.parent.color,i.parent.color=0,o.left.color=0,G(e,i.parent),i=e.root));i.color=0,q()}}function Z(e,t){for(Q(e,t);t!==e.root&&1===t.parent.color;)if(t.parent===t.parent.parent.left){const i=t.parent.parent.right;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&K(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,G(e,t.parent.parent))}else{const i=t.parent.parent.left;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&G(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,K(e,t.parent.parent))}e.root.color=0}function X(e,t,i,n){for(;t!==e.root&&t!==V;)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}function Q(e,t){let i=0,n=0;if(t!==e.root){if(0===i){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t===e.root)return;i=U((t=t.parent).left)-t.size_left,n=j(t.left)-t.lf_left,t.size_left+=i,t.lf_left+=n}for(;t!==e.root&&(0!==i||0!==n);)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}}V.parent=V,V.left=V,V.right=V,V.color=0;var J=i(7277);const ee=65535;function te(e){let t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}class ie{constructor(e,t,i,n,o){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=o}}function ne(e,t=!0){let i=[0],n=1;for(let t=0,o=e.length;t(e!==V&&this._pieces.push(e.piece),!0)))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class ae{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){let i=this._cache[t];if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){let i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1,i=this._cache;for(let n=0;n=e)&&(i[n]=null,t=!0)}if(t){let e=[];for(const t of i)null!==t&&e.push(t);this._cache=e}}}class le{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new re("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=V,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=i;let n=null;for(let t=0,i=e.length;t0){e[t].lineStarts||(e[t].lineStarts=ne(e[t].buffer));let i=new oe(t+1,{line:0,column:0},{line:e[t].lineStarts.length-1,column:e[t].buffer.length-e[t].lineStarts[e[t].lineStarts.length-1]},e[t].lineStarts.length-1,e[t].buffer.length);this._buffers.push(e[t]),n=this.rbInsertRight(n,i)}this._searchCache=new ae(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){let t=65535-Math.floor(21845),i=2*t,n="",o=0,r=[];if(this.iterate(this.root,(s=>{let a=this.getNodeContent(s),l=a.length;if(o<=t||o+l0){let t=n.replace(/\r\n|\r|\n/g,e);r.push(new re(t,ne(t)))}this.create(r,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new se(this,e)}getOffsetAt(e,t){let i=0,n=this.root;for(;n!==V;)if(n.left!==V&&n.lf_left+1>=e)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt+1>=e)return i+=n.size_left,i+(this.getAccumulatedValue(n,e-n.lf_left-2)+t-1);e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}return i}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,i=0,n=e;for(;t!==V;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){let o=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+o.index,0===o.index){let e=n-this.getOffsetAt(i+1,1);return new c.L(i+1,e+1)}return new c.L(i+1,o.remainder+1)}if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===V){let t=n-e-this.getOffsetAt(i+1,1);return new c.L(i+1,t+1)}t=t.right}return new c.L(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";let i=this.nodeAt2(e.startLineNumber,e.startColumn),n=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(i,n);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o}getValueInRange2(e,t){if(e.node===t.node){let i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n.substring(o+e.remainder,o+t.remainder)}let i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start),r=n.substring(o+e.remainder,o+i.piece.length);for(i=i.next();i!==V;){let e=this._buffers[i.piece.bufferIndex].buffer,n=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){r+=e.substring(n,n+t.remainder);break}r+=e.substr(n,i.piece.length),i=i.next()}return r}getLinesContent(){let e=[],t=0,i="",n=!1;return this.iterate(this.root,(o=>{if(o===V)return!0;const r=o.piece;let s=r.length;if(0===s)return!0;const a=this._buffers[r.bufferIndex].buffer,l=this._buffers[r.bufferIndex].lineStarts,c=r.start.line,u=r.end.line;let h=l[c]+r.start.column;if(n&&(10===a.charCodeAt(h)&&(h++,s--),e[t++]=i,i="",n=!1,0===s))return!0;if(c===u)return this._EOLNormalized||13!==a.charCodeAt(h+s-1)?i+=a.substr(h,s):(n=!0,i+=a.substr(h,s-1)),!0;i+=this._EOLNormalized?a.substring(h,Math.max(h,l[c+1]-this._EOLLength)):a.substring(h,l[c+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let n=c+1;ne+_,t.reset(0)):(g=p.buffer,f=e=>e,t.reset(_));do{if(d=t.next(g),d){if(f(d.index)>=v)return c;this.positionInBuffer(e,f(d.index)-m,b);let t=this.getLineFeedCnt(e.piece.bufferIndex,o,b),r=b.line===o.line?b.column-o.column+n:b.column+1,s=r+d[0].length;if(h[c++]=(0,J.iE)(new u.e(i+t,r,i+t,s),d,a),f(d.index)+d[0].length>=v)return c;if(c>=l)return c}}while(d);return c}findMatchesLineByLine(e,t,i,n){const o=[];let r=0;const s=new J.sz(t.wordSeparators,t.regex);let a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];let l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let c=this.positionInBuffer(a.node,a.remainder),u=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,s,e.startLineNumber,e.startColumn,c,u,t,i,n,r,o),o;let h=e.startLineNumber,d=a.node;for(;d!==l.node;){let l=this.getLineFeedCnt(d.piece.bufferIndex,c,d.piece.end);if(l>=1){let a=this._buffers[d.piece.bufferIndex].lineStarts,u=this.offsetInBuffer(d.piece.bufferIndex,d.piece.start),g=a[c.line+l],f=h===e.startLineNumber?e.startColumn:1;if(r=this.findMatchesInNode(d,s,h,f,c,this.positionInBuffer(d,g-u),t,i,n,r,o),r>=n)return o;h+=l}let u=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){const a=this.getLineContent(h).substring(u,e.endColumn-1);return r=this._findMatchesInLine(t,s,a,e.endLineNumber,u,r,o,i,n),o}if(r=this._findMatchesInLine(t,s,this.getLineContent(h).substr(u),h,u,r,o,i,n),r>=n)return o;h++,a=this.nodeAt2(h,1),d=a.node,c=this.positionInBuffer(a.node,a.remainder)}if(h===e.endLineNumber){let a=h===e.startLineNumber?e.startColumn-1:0;const l=this.getLineContent(h).substring(a,e.endColumn-1);return r=this._findMatchesInLine(t,s,l,e.endLineNumber,a,r,o,i,n),o}let g=h===e.startLineNumber?e.startColumn:1;return r=this.findMatchesInNode(l.node,s,h,g,c,u,t,i,n,r,o),o}_findMatchesInLine(e,t,i,n,o,r,s,a,l){const c=e.wordSeparators;if(!a&&e.simpleSearch){const t=e.simpleSearch,a=t.length,h=i.length;let g=-a;for(;-1!==(g=i.indexOf(t,g+a));)if((!c||(0,J.cM)(c,i,h,g,a))&&(s[r++]=new d.tk(new u.e(n,g+1+o,n,g+1+a+o),null),r>=l))return r;return r}let h;t.reset(0);do{if(h=t.next(i),h&&(s[r++]=(0,J.iE)(new u.e(n,h.index+1+o,n,h.index+1+h[0].length+o),h,a),r>=l))return r}while(h);return r}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==V){let{node:i,remainder:n,nodeStartOffset:o}=this.nodeAt(e),r=i.piece,s=r.bufferIndex,a=this.positionInBuffer(i,n);if(0===i.piece.bufferIndex&&r.end.line===this._lastChangeBufferPos.line&&r.end.column===this._lastChangeBufferPos.column&&o+r.length===e&&t.lengthe){let e=[],o=new oe(r.bufferIndex,a,r.end,this.getLineFeedCnt(r.bufferIndex,a,r.end),this.offsetInBuffer(s,r.end)-this.offsetInBuffer(s,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&10===this.nodeCharCodeAt(i,n)){let e={line:o.start.line+1,column:0};o=new oe(o.bufferIndex,e,o.end,this.getLineFeedCnt(o.bufferIndex,e,o.end),o.length-1),t+="\n"}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(13===this.nodeCharCodeAt(i,n-1)){let o=this.positionInBuffer(i,n-1);this.deleteNodeTail(i,o),t="\r"+t,0===i.piece.length&&e.push(i)}else this.deleteNodeTail(i,a);else this.deleteNodeTail(i,a);let l=this.createNewPieces(t);o.length>0&&this.rbInsertRight(i,o);let c=i;for(let e=0;e=0;e--)o=this.rbInsertLeft(o,n[e]);this.validateCRLFWithPrevNode(o),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");let i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]),o=n;for(let e=1;e=u))break;a=c+1}return i?(i.line=c,i.column=s-h,null):{line:c,column:s-h}}getLineFeedCnt(e,t,i){if(0===i.column)return i.line-t.line;let n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;let o=n[i.line+1],r=n[i.line]+i.column;if(o>r+1)return i.line-t.line;let s=r-1;return 13===this._buffers[e].buffer.charCodeAt(s)?i.line-t.line+1:i.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;tee){let t=[];for(;e.length>ee;){const i=e.charCodeAt(65534);let n;13===i||i>=55296&&i<=56319?(n=e.substring(0,65534),e=e.substring(65534)):(n=e.substring(0,ee),e=e.substring(ee));let o=ne(n);t.push(new oe(this._buffers.length,{line:0,column:0},{line:o.length-1,column:n.length-o[o.length-1]},o.length-1,n.length)),this._buffers.push(new re(n,o))}let i=ne(e);return t.push(new oe(this._buffers.length,{line:0,column:0},{line:i.length-1,column:e.length-i[i.length-1]},i.length-1,e.length)),this._buffers.push(new re(e,i)),t}let t=this._buffers[0].buffer.length;const i=ne(e,!1);let n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&0!==t&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},n=this._lastChangeBufferPos;for(let e=0;e=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){let n=this.getAccumulatedValue(i,e-i.lf_left-2),s=this.getAccumulatedValue(i,e-i.lf_left-1),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return o+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:o,nodeStartLineNumber:r-(e-1-i.lf_left)}),a.substring(l+n,l+s-t)}if(i.lf_left+i.piece.lineFeedCnt===e-1){let t=this.getAccumulatedValue(i,e-i.lf_left-2),o=this._buffers[i.piece.bufferIndex].buffer,r=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=o.substring(r+t,r+i.piece.length);break}e-=i.lf_left+i.piece.lineFeedCnt,o+=i.size_left+i.piece.length,i=i.right}}for(i=i.next();i!==V;){let e=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){let o=this.getAccumulatedValue(i,0),r=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=e.substring(r,r+o-t),n}{let t=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=e.substr(t,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;for(;e!==V;)t+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=i,this._searchCache.validate(this._length)}getIndexOf(e,t){let i=e.piece,n=this.positionInBuffer(e,t),o=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){let t=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(t!==o)return{index:t,remainder:0}}return{index:o,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;let i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,o=i.start.line+t+1;return o>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[o]-n[i.start.line]-i.start.column}deleteNodeTail(e,t){const i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.end),r=t,s=this.offsetInBuffer(i.bufferIndex,r),a=this.getLineFeedCnt(i.bufferIndex,i.start,r),l=a-n,c=s-o,u=i.length+c;e.piece=new oe(i.bufferIndex,i.start,r,a,u),X(this,e,c,l)}deleteNodeHead(e,t){const i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.start),r=t,s=this.getLineFeedCnt(i.bufferIndex,r,i.end),a=s-n,l=o-this.offsetInBuffer(i.bufferIndex,r),c=i.length+l;e.piece=new oe(i.bufferIndex,r,i.end,s,c),X(this,e,l,a)}shrinkNode(e,t,i){const n=e.piece,o=n.start,r=n.end,s=n.length,a=n.lineFeedCnt,l=t,c=this.getLineFeedCnt(n.bufferIndex,n.start,l),u=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,o);e.piece=new oe(n.bufferIndex,n.start,l,c,u),X(this,e,u-s,c-a);let h=new oe(n.bufferIndex,i,r,this.getLineFeedCnt(n.bufferIndex,i,r),this.offsetInBuffer(n.bufferIndex,r)-this.offsetInBuffer(n.bufferIndex,i)),d=this.rbInsertRight(e,h);this.validateCRLFWithPrevNode(d)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");const i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const o=ne(t,!1);for(let e=0;ee)t=t.left;else{if(t.size_left+t.piece.length>=e){n+=t.size_left;let i={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(i),i}e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right}return null}nodeAt2(e,t){let i=this.root,n=0;for(;i!==V;)if(i.left!==V&&i.lf_left>=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){let o=this.getAccumulatedValue(i,e-i.lf_left-2),r=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(o+t-1,r),nodeStartOffset:n}}if(i.lf_left+i.piece.lineFeedCnt===e-1){let o=this.getAccumulatedValue(i,e-i.lf_left-2);if(o+t-1<=i.piece.length)return{node:i,remainder:o+t-1,nodeStartOffset:n};t-=i.piece.length-o;break}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==V;){if(i.piece.lineFeedCnt>0){let e=this.getAccumulatedValue(i,0),n=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,e),nodeStartOffset:n}}if(i.piece.length>=t-1)return{node:i,remainder:t-1,nodeStartOffset:this.offsetOfNode(i)};t-=i.piece.length,i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;let i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return i.buffer.charCodeAt(n)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&"\n"===this._EOL)}startWithLF(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===V||0===e.piece.lineFeedCnt)return!1;let t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,o=i[n]+t.start.column;return n!==i.length-1&&!(i[n+1]>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o)}endWithCR(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==V&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){let t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){let t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){let i,n=[],o=this._buffers[e.piece.bufferIndex].lineStarts;i=0===e.piece.end.column?{line:e.piece.end.line-1,column:o[e.piece.end.line]-o[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};const r=e.piece.length-1,s=e.piece.lineFeedCnt-1;e.piece=new oe(e.piece.bufferIndex,e.piece.start,i,s,r),X(this,e,-1,-1),0===e.piece.length&&n.push(e);let a={line:t.piece.start.line+1,column:0};const l=t.piece.length-1,c=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new oe(t.piece.bufferIndex,a,t.piece.end,c,l),X(this,t,-1,-1),0===t.piece.length&&n.push(t);let u=this.createNewPieces("\r\n");this.rbInsertRight(e,u[0]);for(let e=0;ee.sortIndex-t.sortIndex))}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=o,this._mightContainNonBasicASCII=r;const f=this._doApplyEdits(l);let p=null;if(t&&h.length>0){h.sort(((e,t)=>t.lineNumber-e.lineNumber)),p=[];for(let e=0,t=h.length;e0&&h[e-1].lineNumber===t)continue;let i=h[e].oldContent,n=this.getLineContent(t);0!==n.length&&n!==i&&-1===s.LC(n)&&p.push(t)}}return this._onDidChangeContent.fire(),new d.je(g,f,p)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const i=e[0].range,n=e[e.length-1].range,o=new u.e(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let r=i.startLineNumber,s=i.startColumn;const a=[];for(let i=0,n=e.length;i0&&a.push(n.text),r=o.endLineNumber,s=o.endColumn}const l=a.join(""),[c,h,d]=(0,ce.QZ)(l);return{sortIndex:0,identifier:e[0].identifier,range:o,rangeOffset:this.getOffsetAt(o.startLineNumber,o.startColumn),rangeLength:this.getValueLengthInRange(o,0),text:l,eolCount:c,firstLineLength:h,lastLineLength:d,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(he._sortOpsDescending);let t=[];for(let i=0;i0){const e=c.eolCount+1;l=1===e?new u.e(s,a,s,a+c.firstLineLength):new u.e(s,a,s+e-1,c.lastLineLength+1)}else l=new u.e(s,a,s,a);i=l.endLineNumber,n=l.endColumn,t.push(l),o=c}return t}static _sortOpsAscending(e,t){let i=u.e.compareRangesUsingEnds(e.range,t.range);return 0===i?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){let i=u.e.compareRangesUsingEnds(e.range,t.range);return 0===i?t.sortIndex-e.sortIndex:-i}}class de{constructor(e,t,i,n,o,r,s,a,l){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=o,this._containsRTL=r,this._containsUnusualLineTerminators=s,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":i>t/2?"\r\n":"\n"}create(e){const t=this._getEOL(e);let i=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let e=0,n=i.length;e=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=function(e,t){e.length=0,e[0]=0;let i=1,n=0,o=0,r=0,s=!0;for(let a=0,l=t.length;a126)&&(s=!1)}const a=new ie(te(e),n,o,r,s);return e.length=0,a}(this._tmpLineStarts,e);this.chunks.push(new re(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),this.isBasicASCII||this.containsRTL||(this.containsRTL=s.Ut(e)),this.isBasicASCII||this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=s.ab(e))}finish(e=!0){return this._finish(),new de(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;let e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);let t=ne(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}class fe{constructor(){this.changeType=1}}class pe{constructor(e,t){this.changeType=2,this.lineNumber=e,this.detail=t}}class me{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class _e{constructor(e,t,i){this.changeType=4,this.fromLineNumber=e,this.toLineNumber=t,this.detail=i}}class ve{constructor(){this.changeType=5}}class be{constructor(e,t,i,n){this.changes=e,this.versionId=t,this.isUndoing=i,this.isRedoing=n,this.resultingSelection=null}containsEvent(e){for(let t=0,i=this.changes.length;t=this._len;)this._beginState[this._len]=null,this._valid[this._len]=!1,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._beginState.splice(e,t),this._valid.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;let i=[],n=[];for(let e=0;e=0;t--)this._invalidateLine(e.startLineNumber+t-1);this._acceptDeleteRange(e),this._acceptInsertText(new c.L(e.startLineNumber,e.startColumn),t)}_acceptDeleteRange(e){e.startLineNumber-1>=this._len||this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,t){e.lineNumber-1>=this._len||this._insertLines(e.lineNumber,t)}}class Ne extends r.JT{constructor(e){super(),this._isDisposed=!1,this._textModel=e,this._tokenizationStateStore=new Le,this._tokenizationSupport=null,this._register(Se.RW.onDidChange((e=>{const t=this._textModel.getLanguageIdentifier();-1!==e.changedLanguages.indexOf(t.language)&&(this._resetTokenizationState(),this._textModel.clearTokens())}))),this._register(this._textModel.onDidChangeRawContentFast((e=>{e.containsEvent(1)&&this._resetTokenizationState()}))),this._register(this._textModel.onDidChangeContentFast((e=>{for(let t=0,i=e.changes.length;t{this._beginBackgroundTokenization()}))),this._register(this._textModel.onDidChangeLanguage((()=>{this._resetTokenizationState(),this._textModel.clearTokens()}))),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}_resetTokenizationState(){const[e,t]=function(e){const t=e.getLanguageIdentifier();let i=e.isTooLargeForTokenization()?null:Se.RW.get(t.language),o=null;if(i)try{o=i.getInitialState()}catch(e){(0,n.dL)(e),i=null}return[i,o]}(this._textModel);this._tokenizationSupport=e,this._tokenizationStateStore.flush(t),this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&De.xS((()=>{this._isDisposed||this._revalidateTokensNow()}))}_revalidateTokensNow(e=this._textModel.getLineCount()){const t=new ce.DA,i=ke.G.create(!1);for(;this._hasLinesToTokenize()&&!(i.elapsed()>1)&&!(this._tokenizeOneInvalidLine(t)>=e););this._beginBackgroundTokenization(),this._textModel.setTokens(t.tokens)}tokenizeViewport(e,t){const i=new ce.DA;this._tokenizeViewport(i,e,t),this._textModel.setTokens(i.tokens)}reset(){this._resetTokenizationState(),this._textModel.clearTokens()}forceTokenization(e){const t=new ce.DA;this._updateTokensUntilLine(t,e),this._textModel.setTokens(t.tokens)}isCheapToTokenize(e){if(!this._tokenizationSupport)return!0;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return!(e>t)&&(e0&&e>=1;e--){let t=this._textModel.getLineFirstNonWhitespaceColumn(e);if(0!==t&&t=0;e--)a=Ee(s,this._tokenizationSupport,o[e],!1,a).endState;for(let n=t;n<=i;n++){let t=this._textModel.getLineContent(n),i=Ee(s,this._tokenizationSupport,t,!0,a);e.add(n,i.tokens),this._tokenizationStateStore.setFakeTokens(n-1),a=i.endState}}}function Ee(e,t,i,o,r){let s=null;if(t)try{s=t.tokenize2(i,o,r.clone(),0)}catch(e){(0,n.dL)(e)}return s||(s=(0,xe.mh)(e.id,i,r,0)),Ce.A.convertToEndOffset(s.tokens,i.length),s}var Ae=i(7461),Me=i(3831),Ie=i(764),Te=i(4227),Re=i(1264);function Oe(e,t){return("string"==typeof e?function(e){const t=new ge;return t.acceptChunk(e),t.finish()}(e):e).create(t)}let Fe=0;class Pe{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;let e=[],t=0,i=0;for(;;){let n=this._source.read();if(null===n)return this._eos=!0,0===t?null:e.join("");if(n.length>0&&(e[t++]=n,i+=n.length),i>=65536)return e.join("")}}}const Be=()=>{throw new Error("Invalid change accessor")};class ze{constructor(){this._searchCanceledBrand=void 0}}function We(e){return e instanceof ze?null:e}ze.INSTANCE=new ze;class Ve extends r.JT{constructor(e,t,i,n=null,r){super(),this._onWillDispose=this._register(new o.Q5),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new Ze),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeLanguage=this._register(new o.Q5),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new o.Q5),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new o.Q5),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeOptions=this._register(new o.Q5),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new o.Q5),this.onDidChangeAttached=this._onDidChangeAttached.event,this._eventEmitter=this._register(new Xe),Fe++,this.id="$model"+Fe,this.isForSimpleWidget=t.isForSimpleWidget,this._associatedResource=null==n?a.o.parse("inmemory://model/"+Fe):n,this._undoRedoService=r,this._attachedEditorCount=0;const{textBuffer:l,disposable:c}=Oe(e,t.defaultEOL);this._buffer=l,this._bufferDisposable=c,this._options=Ve.resolveOptions(this._buffer,t);const h=this._buffer.getLineCount(),d=this._buffer.getValueLengthInRange(new u.e(1,1,h,this._buffer.getLineLength(h)+1),0);t.largeFileOptimizations?this._isTooLargeForTokenization=d>Ve.LARGE_FILE_SIZE_THRESHOLD||h>Ve.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=d>Ve.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this._isDisposing=!1,this._languageIdentifier=i||xe.pA,this._languageRegistryListener=Me.zu.onDidChange((e=>{e.languageIdentifier.id===this._languageIdentifier.id&&this._onDidChangeLanguageConfiguration.fire({})})),this._instanceId=s.PJ(Fe),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new He,this._commandManager=new g.NL(this,r),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._tokens=new ce.Rl,this._tokens2=new ce.cx,this._tokenization=new Ne(this)}static resolveOptions(e,t){if(t.detectIndentation){const i=m(e,t.tabSize,t.insertSpaces);return new d.dJ({tabSize:i.tabSize,indentSize:i.tabSize,insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}return new d.dJ({tabSize:t.tabSize,indentSize:t.indentSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}onDidChangeRawContentFast(e){return this._eventEmitter.fastEvent((t=>e(t.rawContentChangedEvent)))}onDidChangeContentFast(e){return this._eventEmitter.fastEvent((t=>e(t.contentChangedEvent)))}onDidChangeContent(e){return this._eventEmitter.slowEvent((t=>e(t.contentChangedEvent)))}dispose(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(),this._tokenization.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this._isDisposing=!1;const e=new he([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this._isDisposing||this._eventEmitter.fire(new ye(e,t))}setValue(e){if(this._assertNotDisposed(),null===e)return;const{textBuffer:t,disposable:i}=Oe(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,o,r,s){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:o,isRedoing:r,isFlush:s}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),r=this.getLineMaxColumn(o);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._tokens.flush(),this._tokens2.flush(),this._decorations=Object.create(null),this._decorationsTree=new He,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new be([new fe],this._versionId,!1,!1),this._createContentChanged2(new u.e(1,1,o,r),0,n,this.getValue(),!1,!1,!0))}setEOL(e){this._assertNotDisposed();const t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),r=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new be([new ve],this._versionId,!1,!1),this._createContentChanged2(new u.e(1,1,o,r),0,n,this.getValue(),!1,!1,!1))}_onBeforeEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.search(0,!1,!1,e);this._ensureNodesHaveRanges(t)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const i=this._buffer.getLineCount();for(let n=1;n<=i;n++){const i=this._buffer.getLineLength(n);i>=1e4?t+=i:e+=i}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();let t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,i=void 0!==e.indentSize?e.indentSize:this._options.indentSize,n=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,o=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,r=new d.dJ({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:o});if(this._options.equals(r))return;let s=this._options.createChangeEvent(r);this._options=r,this._onDidChangeOptions.fire(s)}detectIndentation(e,t){this._assertNotDisposed();let i=m(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}static _normalizeIndentationFromWhitespace(e,t,i){let n=0;for(let i=0;i({range:e.range,text:null}))),(()=>null))}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();let t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();let t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new Pe(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i,e);return t?this._buffer.getBOM().length+n:n}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),"\n"===this._buffer.getEOL()?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),i=e.startLineNumber,n=e.startColumn;let o=Math.floor("number"!=typeof i||isNaN(i)?1:i),r=Math.floor("number"!=typeof n||isNaN(n)?1:n);if(o<1)o=1,r=1;else if(o>t)o=t,r=this.getLineMaxColumn(o);else if(r<=1)r=1;else{const e=this.getLineMaxColumn(o);r>=e&&(r=e)}const s=e.endLineNumber,a=e.endColumn;let l=Math.floor("number"!=typeof s||isNaN(s)?1:s),c=Math.floor("number"!=typeof a||isNaN(a)?1:a);if(l<1)l=1,c=1;else if(l>t)l=t,c=this.getLineMaxColumn(l);else if(c<=1)c=1;else{const e=this.getLineMaxColumn(l);c>=e&&(c=e)}return i===o&&n===r&&s===l&&a===c&&e instanceof u.e&&!(e instanceof h.Y)?e:new u.e(o,r,l,c)}_isValidPosition(e,t,i){if("number"!=typeof e||"number"!=typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;if(e>this._buffer.getLineCount())return!1;if(1===t)return!0;if(t>this.getLineMaxColumn(e))return!1;if(1===i){const i=this._buffer.getLineCharCode(e,t-2);if(s.ZG(i))return!1}return!0}_validatePosition(e,t,i){const n=Math.floor("number"!=typeof e||isNaN(e)?1:e),o=Math.floor("number"!=typeof t||isNaN(t)?1:t),r=this._buffer.getLineCount();if(n<1)return new c.L(1,1);if(n>r)return new c.L(r,this.getLineMaxColumn(r));if(o<=1)return new c.L(n,1);const a=this.getLineMaxColumn(n);if(o>=a)return new c.L(n,a);if(1===i){const e=this._buffer.getLineCharCode(n,o-2);if(s.ZG(e))return new c.L(n,o-1)}return new c.L(n,o)}validatePosition(e){return this._assertNotDisposed(),e instanceof c.L&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){const i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,r=e.endColumn;if(!this._isValidPosition(i,n,0))return!1;if(!this._isValidPosition(o,r,0))return!1;if(1===t){const e=n>1?this._buffer.getLineCharCode(i,n-2):0,t=r>1&&r<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,r-2):0,a=s.ZG(e),l=s.ZG(t);return!a&&!l}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof u.e&&!(e instanceof h.Y)&&this._isValidRange(e,1))return e;const t=this._validatePosition(e.startLineNumber,e.startColumn,0),i=this._validatePosition(e.endLineNumber,e.endColumn,0),n=t.lineNumber,o=t.column,r=i.lineNumber,a=i.column;{const e=o>1?this._buffer.getLineCharCode(n,o-2):0,t=a>1&&a<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,a-2):0,i=s.ZG(e),l=s.ZG(t);return i||l?n===r&&o===a?new u.e(n,o-1,r,a-1):i&&l?new u.e(n,o-1,r,a+1):i?new u.e(n,o-1,r,a):new u.e(n,o,r,a+1):new u.e(n,o,r,a)}}modifyPosition(e,t){this._assertNotDisposed();let i=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,i)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new u.e(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,o,r,s=999){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every((e=>u.e.isIRange(e)))&&(a=t.map((e=>this.validateRange(e))))),null===a&&(a=[this.getFullModelRange()]),a=a.sort(((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn));const l=[];let c;if(l.push(a.reduce(((e,t)=>u.e.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t)))),!i&&e.indexOf("\n")<0){const t=new J.bc(e,i,n,o).parseSearchRequest();if(!t)return[];c=e=>this.findMatchesLineByLine(e,t,r,s)}else c=t=>J.pM.findMatches(this,new J.bc(e,i,n,o),t,r,s);return l.map(c).reduce(((e,t)=>e.concat(t)),[])}findNextMatch(e,t,i,n,o,r){this._assertNotDisposed();const s=this.validatePosition(t);if(!i&&e.indexOf("\n")<0){const t=new J.bc(e,i,n,o).parseSearchRequest();if(!t)return null;const a=this.getLineCount();let l=new u.e(s.lineNumber,s.column,a,this.getLineMaxColumn(a)),c=this.findMatchesLineByLine(l,t,r,1);return J.pM.findNextMatch(this,new J.bc(e,i,n,o),s,r),c.length>0?c[0]:(l=new u.e(1,1,s.lineNumber,this.getLineMaxColumn(s.lineNumber)),c=this.findMatchesLineByLine(l,t,r,1),c.length>0?c[0]:null)}return J.pM.findNextMatch(this,new J.bc(e,i,n,o),s,r)}findPreviousMatch(e,t,i,n,o,r){this._assertNotDisposed();const s=this.validatePosition(t);return J.pM.findPreviousMatch(this,new J.bc(e,i,n,o),s,r)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if(("\n"===this.getEOL()?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof d.Qi?e:new d.Qi(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let i=0,n=e.length;i({range:this.validateRange(e.range),text:e.text}))),n=!0;if(e)for(let t=0,o=e.length;to.endLineNumber,s=o.startLineNumber>t.endLineNumber;if(!n&&!s){r=!0;break}}if(!r){n=!1;break}}if(n)for(let e=0,n=this._trimAutoWhitespaceLines.length;et.endLineNumber||n===t.startLineNumber&&t.startColumn===o&&t.isEmpty()&&s&&s.length>0&&"\n"===s.charAt(0)||n===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&s&&s.length>0&&"\n"===s.charAt(s.length-1))){r=!1;break}}if(r){const e=new u.e(n,1,n,o);t.push(new d.Qi(null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i)}_applyUndo(e,t,i,n){const o=e.map((e=>{const t=this.getPositionAt(e.newPosition),i=this.getPositionAt(e.newEnd);return{range:new u.e(t.lineNumber,t.column,i.lineNumber,i.column),text:e.oldText}}));this._applyUndoRedoEdits(o,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const o=e.map((e=>{const t=this.getPositionAt(e.oldPosition),i=this.getPositionAt(e.oldEnd);return{range:new u.e(t.lineNumber,t.column,i.lineNumber,i.column),text:e.newText}}));this._applyUndoRedoEdits(o,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,o,r){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(o)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(r),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const i=this._validateEditOperations(e);return this._doApplyEdits(i,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const i=this._buffer.getLineCount(),n=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),o=this._buffer.getLineCount(),r=n.changes;if(this._trimAutoWhitespaceLines=n.trimAutoWhitespaceLineNumbers,0!==r.length){let e=[],t=i;for(let i=0,n=r.length;i0?n.text.charCodeAt(0):0),this._onDidChangeDecorations.fire(),this._decorationsTree.acceptReplace(n.rangeOffset,n.rangeLength,n.text.length,n.forceMoveMarkers);const c=n.range.startLineNumber,u=n.range.endLineNumber,h=u-c,d=s,g=Math.min(h,d),f=d-h;for(let i=g;i>=0;i--){const n=c+i,r=o-t-f+n;e.push(new pe(n,this.getLineContent(r)))}if(gthis._deltaDecorationsImpl(e,[],[{range:t,options:i}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,Ye(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,i)=>0===t.length&&0===i.length?[]:this._deltaDecorationsImpl(e,t,i)},o=null;try{o=t(i)}catch(e){(0,n.dL)(e)}return i.addDecoration=Be,i.changeDecoration=Be,i.changeDecorationOptions=Be,i.removeDecoration=Be,i.deltaDecorations=Be,o}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,i){const n=e?this._decorations[e]:null;if(!n)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:Ge[i]}])[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;const o=this._validateRangeRelaxedNoAllocations(t),r=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),s=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),r,s,o),n.setOptions(Ge[i]),this._decorationsTree.insert(n),n.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let e=0,i=t.length;ethis.getLineCount()?[]:this.getLinesDecorations(e,e,t,i)}getLinesDecorations(e,t,i=0,n=!1){let o=this.getLineCount(),r=Math.min(o,Math.max(1,e)),s=Math.min(o,Math.max(1,t)),a=this.getLineMaxColumn(s);return this._getDecorationsInRange(new u.e(r,1,s,a),i,n)}getDecorationsInRange(e,t=0,i=!1){let n=this.validateRange(e);return this._getDecorationsInRange(n,t,i)}getOverviewRulerDecorations(e=0,t=!1){const i=this.getVersionId(),n=this._decorationsTree.search(e,t,!0,i);return this._ensureNodesHaveRanges(n)}getAllDecorations(e=0,t=!1){const i=this.getVersionId(),n=this._decorationsTree.search(e,t,!1,i);return this._ensureNodesHaveRanges(n)}_getDecorationsInRange(e,t,i){const n=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),o=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn),r=this.getVersionId(),s=this._decorationsTree.intervalSearch(n,o,t,i,r);return this._ensureNodesHaveRanges(s)}_ensureNodesHaveRanges(e){for(let t=0,i=e.length;t0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:t})}setSemanticTokens(e,t){this._tokens2.set(e,t),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]})}hasCompleteSemanticTokens(){return this._tokens2.isComplete()}hasSomeSemanticTokens(){return!this._tokens2.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const i=this._tokens2.setPartial(e,t);this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}tokenizeViewport(e,t){e=Math.max(1,e),t=Math.min(this._buffer.getLineCount(),t),this._tokenization.tokenizeViewport(e,t)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._buffer.getLineCount()}]})}_emitModelTokensChangedEvent(e){this._isDisposing||this._onDidChangeTokens.fire(e)}resetTokenization(){this._tokenization.reset()}forceTokenization(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)}isCheapToTokenize(e){return this._tokenization.isCheapToTokenize(e)}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)}_getLineTokens(e){const t=this.getLineContent(e),i=this._tokens.getTokens(this._languageIdentifier.id,e-1,t);return this._tokens2.addSemanticTokens(e,i)}getLanguageIdentifier(){return this._languageIdentifier}getModeId(){return this._languageIdentifier.language}setMode(e){if(this._languageIdentifier.id===e.id)return;let t={oldLanguage:this._languageIdentifier.language,newLanguage:e.language};this._languageIdentifier=e,this._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({})}getLanguageIdAtPosition(e,t){const i=this.validatePosition(new c.L(e,t)),n=this.getLineTokens(i.lineNumber);return n.getLanguageId(n.findTokenIndexAtOffset(i.column-1))}getWordAtPosition(e){this._assertNotDisposed();const t=this.validatePosition(e),i=this.getLineContent(t.lineNumber),n=this._getLineTokens(t.lineNumber),o=n.findTokenIndexAtOffset(t.column-1),[r,s]=Ve._findLanguageBoundaries(n,o),a=(0,Ae.t2)(t.column,Me.zu.getWordDefinition(n.getLanguageId(o)),i.substring(r,s),r);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a;if(o>0&&r===t.column-1){const[r,s]=Ve._findLanguageBoundaries(n,o-1),a=(0,Ae.t2)(t.column,Me.zu.getWordDefinition(n.getLanguageId(o-1)),i.substring(r,s),r);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a}return null}static _findLanguageBoundaries(e,t){const i=e.getLanguageId(t);let n=0;for(let o=t;o>=0&&e.getLanguageId(o)===i;o--)n=e.getStartOffset(o);let o=e.getLineContent().length;for(let n=t,r=e.getCount();n=0;e--){const i=t.getEndOffset(e);if(i<=s)break;if((0,Ie.Bu)(t.getStandardTokenType(e))||t.getLanguageId(e)!==r){s=i;break}}let a=Math.min(t.getLineContent().length,e.column-1+i.maxBracketLength);for(let e=n+1;e=a)break;if((0,Ie.Bu)(t.getStandardTokenType(e))||t.getLanguageId(e)!==r){a=i;break}}return{searchStartOffset:s,searchEndOffset:a}}_matchBracket(e){const t=e.lineNumber,i=this._getLineTokens(t),n=this._buffer.getLineContent(t),o=i.findTokenIndexAtOffset(e.column-1);if(o<0)return null;const r=Me.zu.getBracketsSupport(i.getLanguageId(o));if(r&&!(0,Ie.Bu)(i.getStandardTokenType(o))){let{searchStartOffset:s,searchEndOffset:a}=this._establishBracketSearchOffsets(e,i,r,o),l=null;for(;;){const i=Te.Vr.findNextBracketInRange(r.forwardRegex,t,n,s,a);if(!i)break;if(i.startColumn<=e.column&&e.column<=i.endColumn){const e=n.substring(i.startColumn-1,i.endColumn-1).toLowerCase(),t=this._matchFoundBracket(i,r.textIsBracket[e],r.textIsOpenBracket[e],null);if(t){if(t instanceof ze)return null;l=t}}s=i.endColumn-1}if(l)return l}if(o>0&&i.getStartOffset(o)===e.column-1){const r=o-1,s=Me.zu.getBracketsSupport(i.getLanguageId(r));if(s&&!(0,Ie.Bu)(i.getStandardTokenType(r))){let{searchStartOffset:o,searchEndOffset:a}=this._establishBracketSearchOffsets(e,i,s,r);const l=Te.Vr.findPrevBracketInRange(s.reversedRegex,t,n,o,a);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn){const e=n.substring(l.startColumn-1,l.endColumn-1).toLowerCase(),t=this._matchFoundBracket(l,s.textIsBracket[e],s.textIsOpenBracket[e],null);if(t)return t instanceof ze?null:t}}}return null}_matchFoundBracket(e,t,i,n){if(!t)return null;const o=i?this._findMatchingBracketDown(t,e.getEndPosition(),n):this._findMatchingBracketUp(t,e.getStartPosition(),n);return o?o instanceof ze?o:[e,o]:null}_findMatchingBracketUp(e,t,i){const n=e.languageIdentifier.id,o=e.reversedRegex;let r=-1,s=0;const a=(t,n,a,l)=>{for(;;){if(i&&++s%100==0&&!i())return ze.INSTANCE;const c=Te.Vr.findPrevBracketInRange(o,t,n,a,l);if(!c)break;const u=n.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(u)?r++:e.isClose(u)&&r--,0===r)return c;l=c.startColumn-1}return null};for(let e=t.lineNumber;e>=1;e--){const i=this._getLineTokens(e),o=i.getCount(),r=this._buffer.getLineContent(e);let s=o-1,l=r.length,c=r.length;e===t.lineNumber&&(s=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1);let u=!0;for(;s>=0;s--){const t=i.getLanguageId(s)===n&&!(0,Ie.Bu)(i.getStandardTokenType(s));if(t)u?l=i.getStartOffset(s):(l=i.getStartOffset(s),c=i.getEndOffset(s));else if(u&&l!==c){const t=a(e,r,l,c);if(t)return t}u=t}if(u&&l!==c){const t=a(e,r,l,c);if(t)return t}}return null}_findMatchingBracketDown(e,t,i){const n=e.languageIdentifier.id,o=e.forwardRegex;let r=1,s=0;const a=(t,n,a,l)=>{for(;;){if(i&&++s%100==0&&!i())return ze.INSTANCE;const c=Te.Vr.findNextBracketInRange(o,t,n,a,l);if(!c)break;const u=n.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(u)?r++:e.isClose(u)&&r--,0===r)return c;a=c.endColumn-1}return null},l=this.getLineCount();for(let e=t.lineNumber;e<=l;e++){const i=this._getLineTokens(e),o=i.getCount(),r=this._buffer.getLineContent(e);let s=0,l=0,c=0;e===t.lineNumber&&(s=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1);let u=!0;for(;s=1;e--){const o=this._getLineTokens(e),r=o.getCount(),s=this._buffer.getLineContent(e);let a=r-1,l=s.length,c=s.length;if(e===t.lineNumber){a=o.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1;const e=o.getLanguageId(a);i!==e&&(i=e,n=Me.zu.getBracketsSupport(i))}let u=!0;for(;a>=0;a--){const t=o.getLanguageId(a);if(i!==t){if(n&&u&&l!==c){const t=Te.Vr.findPrevBracketInRange(n.reversedRegex,e,s,l,c);if(t)return this._toFoundBracket(n,t);u=!1}i=t,n=Me.zu.getBracketsSupport(i)}const r=!!n&&!(0,Ie.Bu)(o.getStandardTokenType(a));if(r)u?l=o.getStartOffset(a):(l=o.getStartOffset(a),c=o.getEndOffset(a));else if(n&&u&&l!==c){const t=Te.Vr.findPrevBracketInRange(n.reversedRegex,e,s,l,c);if(t)return this._toFoundBracket(n,t)}u=r}if(n&&u&&l!==c){const t=Te.Vr.findPrevBracketInRange(n.reversedRegex,e,s,l,c);if(t)return this._toFoundBracket(n,t)}}return null}findNextBracket(e){const t=this.validatePosition(e),i=this.getLineCount();let n=-1,o=null;for(let e=t.lineNumber;e<=i;e++){const i=this._getLineTokens(e),r=i.getCount(),s=this._buffer.getLineContent(e);let a=0,l=0,c=0;if(e===t.lineNumber){a=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1;const e=i.getLanguageId(a);n!==e&&(n=e,o=Me.zu.getBracketsSupport(n))}let u=!0;for(;aDate.now()-e<=t}const n=this.validatePosition(e),o=this.getLineCount(),r=new Map;let s=[];const a=(e,t)=>{if(!r.has(e)){let i=[];for(let e=0,n=t?t.brackets.length:0;e{for(;;){if(i&&++l%100==0&&!i())return ze.INSTANCE;const a=Te.Vr.findNextBracketInRange(e.forwardRegex,t,n,o,r);if(!a)break;const c=n.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),u=e.textIsBracket[c];if(u&&(u.isOpen(c)?s[u.index]++:u.isClose(c)&&s[u.index]--,-1===s[u.index]))return this._matchFoundBracket(a,u,!1,i);o=a.endColumn-1}return null};let u=-1,h=null;for(let e=n.lineNumber;e<=o;e++){const t=this._getLineTokens(e),i=t.getCount(),o=this._buffer.getLineContent(e);let r=0,s=0,l=0;if(e===n.lineNumber){r=t.findTokenIndexAtOffset(n.column-1),s=n.column-1,l=n.column-1;const e=t.getLanguageId(r);u!==e&&(u=e,h=Me.zu.getBracketsSupport(u),a(u,h))}let d=!0;for(;rn)throw new Error("Illegal value for lineNumber");const o=Me.zu.getFoldingRules(this._languageIdentifier.id),r=Boolean(o&&o.offSide);let s=-2,a=-1,l=-2,c=-1;const u=e=>{if(-1!==s&&(-2===s||s>e-1)){s=-1,a=-1;for(let t=e-2;t>=0;t--){let e=this._computeIndentLevel(t);if(e>=0){s=t,a=e;break}}}if(-2===l){l=-1,c=-1;for(let t=e;t=0){l=t,c=e;break}}}};let h=-2,d=-1,g=-2,f=-1;const p=e=>{if(-2===h){h=-1,d=-1;for(let t=e-2;t>=0;t--){let e=this._computeIndentLevel(t);if(e>=0){h=t,d=e;break}}}if(-1!==g&&(-2===g||g=0){g=t,f=e;break}}}};let m=0,_=!0,v=0,b=!0,y=0,w=0;for(let o=0;_||b;o++){const s=e-o,g=e+o;o>1&&(s<1||s1&&(g>n||g>i)&&(b=!1),o>5e4&&(_=!1,b=!1);let C=-1;if(_){const e=this._computeIndentLevel(s-1);e>=0?(l=s-1,c=e,C=Math.ceil(e/this._options.indentSize)):(u(s),C=this._getIndentLevelForWhitespaceLine(r,a,c))}let S=-1;if(b){const e=this._computeIndentLevel(g-1);e>=0?(h=g-1,d=e,S=Math.ceil(e/this._options.indentSize)):(p(g),S=this._getIndentLevelForWhitespaceLine(r,d,f))}if(0!==o){if(1===o){if(g<=n&&S>=0&&w+1===S){_=!1,m=g,v=g,y=S;continue}if(s>=1&&C>=0&&C-1===w){b=!1,m=s,v=s,y=C;continue}if(m=e,v=e,y=w,0===y)return{startLineNumber:m,endLineNumber:v,indent:y}}_&&(C>=y?m=s:_=!1),b&&(S>=y?v=g:b=!1)}else w=C}return{startLineNumber:m,endLineNumber:v,indent:y}}getLinesIndentGuides(e,t){this._assertNotDisposed();const i=this.getLineCount();if(e<1||e>i)throw new Error("Illegal value for startLineNumber");if(t<1||t>i)throw new Error("Illegal value for endLineNumber");const n=Me.zu.getFoldingRules(this._languageIdentifier.id),o=Boolean(n&&n.offSide);let r=new Array(t-e+1),s=-2,a=-1,l=-2,c=-1;for(let n=e;n<=t;n++){let t=n-e;const u=this._computeIndentLevel(n-1);if(u>=0)s=n-1,a=u,r[t]=Math.ceil(u/this._options.indentSize);else{if(-2===s){s=-1,a=-1;for(let e=n-2;e>=0;e--){let t=this._computeIndentLevel(e);if(t>=0){s=e,a=t;break}}}if(-1!==l&&(-2===l||l=0){l=e,c=t;break}}}r[t]=this._getIndentLevelForWhitespaceLine(o,a,c)}}return r}_getIndentLevelForWhitespaceLine(e,t,i){return-1===t||-1===i?0:t0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}},7277:(e,t,i)=>{"use strict";i.d(t,{bc:()=>l,iE:()=>u,pM:()=>d,cM:()=>g,sz:()=>f});var n=i(7295),o=i(9410),r=i(187),s=i(4314),a=i(4973);class l{constructor(e,t,i,n){this.searchString=e,this.isRegex=t,this.matchCase=i,this.wordSeparators=n}parseSearchRequest(){if(""===this.searchString)return null;let e;e=this.isRegex?function(e){if(!e||0===e.length)return!1;for(let t=0,i=e.length;t=i)break;const n=e.charCodeAt(t);if(110===n||114===n||87===n||119===n)return!0}return!1}(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=n.GF(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(e){return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new c(t,this.wordSeparators?(0,o.u)(this.wordSeparators):null,i?this.searchString:null)}}class c{constructor(e,t,i){this.regex=e,this.wordSeparators=t,this.simpleSearch=i}}function u(e,t,i){if(!i)return new a.tk(e,null);let n=[];for(let e=0,i=t.length;e>0);t[o]>=e?n=o-1:t[o+1]>=e?(i=o,n=o):i=o+1}return i+1}}class d{static findMatches(e,t,i,n,o){const r=t.parseSearchRequest();return r?r.regex.multiline?this._doFindMatchesMultiline(e,i,new f(r.wordSeparators,r.regex),n,o):this._doFindMatchesLineByLine(e,i,r,n,o):[]}static _getMultilineMatchRange(e,t,i,n,o,r){let a,l,c=0;if(n?(c=n.findLineFeedCountBeforeOffset(o),a=t+o+c):a=t+o,n){let e=n.findLineFeedCountBeforeOffset(o+r.length)-c;l=a+r.length+e}else l=a+r.length;const u=e.getPositionAt(a),h=e.getPositionAt(l);return new s.e(u.lineNumber,u.column,h.lineNumber,h.column)}static _doFindMatchesMultiline(e,t,i,n,o){const r=e.getOffsetAt(t.getStartPosition()),s=e.getValueInRange(t,1),a="\r\n"===e.getEOL()?new h(s):null,l=[];let c,d=0;for(i.reset(0);c=i.next(s);)if(l[d++]=u(this._getMultilineMatchRange(e,r,s,a,c.index,c[0]),c,n),d>=o)return l;return l}static _doFindMatchesLineByLine(e,t,i,n,o){const r=[];let s=0;if(t.startLineNumber===t.endLineNumber){const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return s=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,s,r,n,o),r}const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);s=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,s,r,n,o);for(let a=t.startLineNumber+1;a=c))return o;return o}const d=new f(e.wordSeparators,e.regex);let p;d.reset(0);do{if(p=d.next(t),p&&(r[o++]=u(new s.e(i,p.index+1+n,i,p.index+1+p[0].length+n),p,l),o>=c))return o}while(p);return o}static findNextMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const r=new f(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,i,r,n):this._doFindNextMatchLineByLine(e,i,r,n)}static _doFindNextMatchMultiline(e,t,i,n){const o=new r.L(t.lineNumber,1),a=e.getOffsetAt(o),l=e.getLineCount(),c=e.getValueInRange(new s.e(o.lineNumber,o.column,l,e.getLineMaxColumn(l)),1),d="\r\n"===e.getEOL()?new h(c):null;i.reset(t.column-1);let g=i.next(c);return g?u(this._getMultilineMatchRange(e,a,c,d,g.index,g[0]),g,n):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new r.L(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){const o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r),a=this._findFirstMatchInLine(i,s,r,t.column,n);if(a)return a;for(let t=1;t<=o;t++){const s=(r+t-1)%o,a=e.getLineContent(s+1),l=this._findFirstMatchInLine(i,a,s+1,1,n);if(l)return l}return null}static _findFirstMatchInLine(e,t,i,n,o){e.reset(n-1);const r=e.next(t);return r?u(new s.e(i,r.index+1,i,r.index+1+r[0].length),r,o):null}static findPreviousMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const r=new f(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(e,i,r,n):this._doFindPreviousMatchLineByLine(e,i,r,n)}static _doFindPreviousMatchMultiline(e,t,i,n){const o=this._doFindMatchesMultiline(e,new s.e(1,1,t.lineNumber,t.column),i,n,9990);if(o.length>0)return o[o.length-1];const a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new r.L(a,e.getLineMaxColumn(a)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){const o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r).substring(0,t.column-1),a=this._findLastMatchInLine(i,s,r,n);if(a)return a;for(let t=1;t<=o;t++){const s=(o+r-t-1)%o,a=e.getLineContent(s+1),l=this._findLastMatchInLine(i,a,s+1,n);if(l)return l}return null}static _findLastMatchInLine(e,t,i,n){let o,r=null;for(e.reset(0);o=e.next(t);)r=u(new s.e(i,o.index+1,i,o.index+1+o[0].length),o,n);return r}}function g(e,t,i,n,o){return function(e,t,i,n,o){if(0===n)return!0;const r=t.charCodeAt(n-1);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(o>0){const i=t.charCodeAt(n);if(0!==e.get(i))return!0}return!1}(e,t,0,n,o)&&function(e,t,i,n,o){if(n+o===i)return!0;const r=t.charCodeAt(n+o);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(o>0){const i=t.charCodeAt(n+o-1);if(0!==e.get(i))return!0}return!1}(e,t,i,n,o)}class f{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let i;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(i=this._searchRegex.exec(e),!i)return null;const o=i.index,r=i[0].length;if(o===this._prevMatchStartIndex&&r===this._prevMatchLength){if(0===r){n.ZH(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=o,this._prevMatchLength=r,!this._wordSeparators||g(this._wordSeparators,e,t,o,r))return i}while(i);return null}}},8409:(e,t,i)=>{"use strict";i.d(t,{QZ:()=>l,DA:()=>h,OU:()=>d,Wz:()=>f,cx:()=>_,Rl:()=>v});var n=i(9488),o=i(8411),r=i(187),s=i(4314),a=i(4101);function l(e){let t=0,i=0,n=0,o=0;for(let r=0,s=e.length;r>>0}const u=new Uint32Array(0).buffer;class h{constructor(){this.tokens=[]}add(e,t){if(this.tokens.length>0){const i=this.tokens[this.tokens.length-1];if(i.startLineNumber+i.tokens.length-1+1===e)return void i.tokens.push(t)}this.tokens.push(new p(e,[t]))}}class d{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){let t=[];for(let i=0;ie)){let o=n;for(;o>t&&this._getDeltaLine(o-1)===e;)o--;let r=n;for(;re||u===e&&d>=t)&&(ue||h===e&&g>=t){if(ho?f-=o-i:f=i;else if(d===t&&g===i){if(!(d===n&&f>o)){c=!0;continue}f-=o-i}else if(do)){c=!0;continue}d===t?(g=i,f=g+(f-o)):(g=0,f=g+(f-o))}else if(d>n){if(0===a&&!c){l=s;break}d-=a}else{if(!(d===n&&g>=o))throw new Error("Not possible!");e&&0===d&&(g+=e,f+=e),d-=a,g-=o-i,f-=o-i}const m=4*l;r[m]=d,r[m+1]=g,r[m+2]=f,r[m+3]=p,l++}this._tokenCount=l}acceptInsertText(e,t,i,n,o,r){const s=0===i&&1===n&&(r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122),a=this._tokens,l=this._tokenCount;for(let r=0;r0?t.charCodeAt(0):0)}acceptEdit(e,t,i,n,o){this._acceptDeleteRange(e),this._acceptInsertText(new r.L(e.startLineNumber,e.startColumn),t,i,n,o),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this.startLineNumber,i=e.endLineNumber-this.startLineNumber;if(i<0){const e=i-t;return void(this.startLineNumber-=e)}const n=this.tokens.getMaxDeltaLine();if(!(t>=n+1)){if(t<0&&i>=n+1)return this.startLineNumber=0,void this.tokens.clear();if(t<0){const n=-t;this.startLineNumber-=n,this.tokens.acceptDeleteRange(e.startColumn-1,0,0,i,e.endColumn-1)}else this.tokens.acceptDeleteRange(0,t,e.startColumn-1,i,e.endColumn-1)}}_acceptInsertText(e,t,i,n,o){if(0===t&&0===i)return;const r=e.lineNumber-this.startLineNumber;r<0?this.startLineNumber+=t:r>=this.tokens.getMaxDeltaLine()+1||this.tokens.acceptInsertText(r,e.column-1,t,i,n,o)}}class p{constructor(e,t){this.startLineNumber=e,this.tokens=t}}function m(e){return e instanceof Uint32Array?e:new Uint32Array(e)}class _{constructor(){this._pieces=[],this._isComplete=!1}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return 0===this._pieces.length}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let i=e;if(t.length>0){const n=t[0].getRange(),o=t[t.length-1].getRange();if(!n||!o)return e;i=e.plusRange(n).plusRange(o)}let o=null;for(let e=0,t=this._pieces.length;ei.endLineNumber){o=o||{index:e};break}if(n.removeTokens(i),n.isEmpty()){this._pieces.splice(e,1),e--,t--;continue}if(n.endLineNumberi.endLineNumber){o=o||{index:e};continue}const[r,s]=n.split(i);r.isEmpty()?o=o||{index:e}:s.isEmpty()||(this._pieces.splice(e,1,r,s),e++,t++,o=o||{index:e})}return o=o||{index:this._pieces.length},t.length>0&&(this._pieces=n.Zv(this._pieces,o.index,t)),i}isComplete(){return this._isComplete}addSemanticTokens(e,t){const i=this._pieces;if(0===i.length)return t;const n=i[_._findFirstPieceWithLine(i,e)].getLineTokens(e);if(!n)return t;const r=t.getCount(),s=n.getCount();let a=0,l=[],c=0,u=0;const h=(e,t)=>{e!==u&&(u=e,l[c++]=e,l[c++]=t)};for(let e=0;e>>0,c=~l>>>0;for(;at)){for(;o>i&&e[o-1].startLineNumber<=t&&t<=e[o-1].endLineNumber;)o--;return o}n=o-1}}return i}acceptEdit(e,t,i,n,o){for(const r of this._pieces)r.acceptEdit(e,t,i,n,o)}}class v{constructor(){this._lineTokens=[],this._len=0}flush(){this._lineTokens=[],this._len=0}getTokens(e,t,i){let n=null;if(t1&&(t=a.NX.getLanguageId(n[1])!==e),!t)return u}if(!n||0===n.length){const i=new Uint32Array(2);return i[0]=t,i[1]=c(e),i.buffer}return n[n.length-2]=t,0===n.byteOffset&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;let i=[];for(let e=0;e=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void(this._lineTokens[t]=v._delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=v._deleteEnding(this._lineTokens[t],e.startColumn-1);const i=e.endLineNumber-1;let n=null;i=this._len||(0!==t?(this._lineTokens[n]=v._deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=v._insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)):this._lineTokens[n]=v._insert(this._lineTokens[n],e.column-1,i))}static _deleteBeginning(e,t){return null===e||e===u?e:v._delete(e,0,t)}static _deleteEnding(e,t){if(null===e||e===u)return e;const i=m(e),n=i[i.length-2];return v._delete(e,t,n)}static _delete(e,t,i){if(null===e||e===u||t===i)return e;const n=m(e),r=n.length>>>1;if(0===t&&n[n.length-2]===i)return u;const s=o.A.findIndexInTokensArray(n,t),a=s>0?n[s-1<<1]:0;if(ic&&(n[l++]=t,n[l++]=n[1+(e<<1)],c=t)}if(l===n.length)return e;let d=new Uint32Array(l);return d.set(n.subarray(0,l),0),d.buffer}static _append(e,t){if(t===u)return e;if(e===u)return t;if(null===e)return e;if(null===t)return null;const i=m(e),n=m(t),o=n.length>>>1;let r=new Uint32Array(i.length+n.length);r.set(i,0);let s=i.length;const a=i[i.length-2];for(let e=0;e>>1;let s=o.A.findIndexInTokensArray(n,t);s>0&&n[s-1<<1]===t&&s--;for(let e=s;e{"use strict";i.d(t,{vu:()=>n,Af:()=>o,eq:()=>r,t2:()=>a});const n="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",o=function(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const i of n)e.indexOf(i)>=0||(t+="\\"+i);return t+="\\s]+)",new RegExp(t,"g")}();function r(e){let t=o;if(e&&e instanceof RegExp)if(e.global)t=e;else{let i="g";e.ignoreCase&&(i+="i"),e.multiline&&(i+="m"),e.unicode&&(i+="u"),t=new RegExp(e.source,i)}return t.lastIndex=0,t}const s={maxLen:1e3,windowSize:15,timeBudget:150};function a(e,t,i,n,o=s){if(i.length>o.maxLen){let r=e-o.maxLen/2;return r<0?r=0:n+=r,a(e,t,i=i.substring(r,e+o.maxLen/2),n,o)}const r=Date.now(),c=e-1-n;let u=-1,h=null;for(let e=1;!(Date.now()-r>=o.timeBudget);e++){const n=c-o.windowSize*e;t.lastIndex=Math.max(0,n);const r=l(t,i,c,u);if(!r&&h)break;if(h=r,n<=0)break;u=n}if(h){let e={word:h[0],startColumn:n+1+h.index,endColumn:n+1+h.index+h[0].length};return t.lastIndex=0,e}return null}function l(e,t,i,n){let o;for(;o=e.exec(t);){const t=o.index||0;if(t<=i&&e.lastIndex>=i)return o;if(n>0&&t>n)return null}return null}},4101:(e,t,i)=>{"use strict";i.d(t,{H9:()=>O,He:()=>T,OH:()=>W,KZ:()=>C,RN:()=>A,Ct:()=>E,Az:()=>F,MY:()=>p,vH:()=>L,vN:()=>P,K7:()=>U,wT:()=>$,vJ:()=>D,AD:()=>b,aC:()=>H,xp:()=>k,vI:()=>M,mX:()=>R,bw:()=>g,zu:()=>S,rl:()=>c,pM:()=>z,id:()=>N,ln:()=>B,FL:()=>y,G0:()=>w,AC:()=>V,nD:()=>x,WW:()=>f,uZ:()=>m,NX:()=>u,RW:()=>j,tA:()=>I,jr:()=>d,Sy:()=>h,vx:()=>v});var n=i(666),o=i(4314),r=i(1036),s=i(4669),a=i(5976),l=i(3046);class c{constructor(e,t){this.language=e,this.id=t}}class u{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(1792&e)>>>8}static getFontStyle(e){return(14336&e)>>>11}static getForeground(e){return(8372224&e)>>>14}static getBackground(e){return(4286578688&e)>>>23}static getClassNameFromMetadata(e){let t="mtk"+this.getForeground(e),i=this.getFontStyle(e);return 1&i&&(t+=" mtki"),2&i&&(t+=" mtkb"),4&i&&(t+=" mtku"),t}static getInlineStyleFromMetadata(e,t){const i=this.getForeground(e),n=this.getFontStyle(e);let o=`color: ${t[i]};`;return 1&n&&(o+="font-style: italic;"),2&n&&(o+="font-weight: bold;"),4&n&&(o+="text-decoration: underline;"),o}}const h=function(){let e=Object.create(null);return e[0]="symbol-method",e[1]="symbol-function",e[2]="symbol-constructor",e[3]="symbol-field",e[4]="symbol-variable",e[5]="symbol-class",e[6]="symbol-struct",e[7]="symbol-interface",e[8]="symbol-module",e[9]="symbol-property",e[10]="symbol-event",e[11]="symbol-operator",e[12]="symbol-unit",e[13]="symbol-value",e[14]="symbol-constant",e[15]="symbol-enum",e[16]="symbol-enum-member",e[17]="symbol-keyword",e[27]="symbol-snippet",e[18]="symbol-text",e[19]="symbol-color",e[20]="symbol-file",e[21]="symbol-reference",e[22]="symbol-customcolor",e[23]="symbol-folder",e[24]="symbol-type-parameter",e[25]="account",e[26]="issues",function(t){const i=e[t];let n=i&&l.fK.get(i);return n||(console.info("No codicon found for CompletionItemKind "+t),n=l.lA.symbolProperty),n.classNames}}();let d=function(){let e=Object.create(null);return e.method=0,e.function=1,e.constructor=2,e.field=3,e.variable=4,e.class=5,e.struct=6,e.interface=7,e.module=8,e.property=9,e.event=10,e.operator=11,e.unit=12,e.value=13,e.constant=14,e.enum=15,e["enum-member"]=16,e.enumMember=16,e.keyword=17,e.snippet=27,e.text=18,e.color=19,e.file=20,e.reference=21,e.customcolor=22,e.folder=23,e["type-parameter"]=24,e.typeParameter=24,e.account=25,e.issue=26,function(t,i){let n=e[t];return void 0!==n||i||(n=9),n}}();var g,f,p,m,_;function v(e){return e&&n.o.isUri(e.uri)&&o.e.isIRange(e.range)&&(o.e.isIRange(e.originSelectionRange)||o.e.isIRange(e.targetSelectionRange))}!function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(g||(g={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(f||(f={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(p||(p={})),function(e){const t=new Map;t.set("file",0),t.set("module",1),t.set("namespace",2),t.set("package",3),t.set("class",4),t.set("method",5),t.set("property",6),t.set("field",7),t.set("constructor",8),t.set("enum",9),t.set("interface",10),t.set("function",11),t.set("variable",12),t.set("constant",13),t.set("string",14),t.set("number",15),t.set("boolean",16),t.set("array",17),t.set("object",18),t.set("key",19),t.set("null",20),t.set("enum-member",21),t.set("struct",22),t.set("event",23),t.set("operator",24),t.set("type-parameter",25);const i=new Map;i.set(0,"file"),i.set(1,"module"),i.set(2,"namespace"),i.set(3,"package"),i.set(4,"class"),i.set(5,"method"),i.set(6,"property"),i.set(7,"field"),i.set(8,"constructor"),i.set(9,"enum"),i.set(10,"interface"),i.set(11,"function"),i.set(12,"variable"),i.set(13,"constant"),i.set(14,"string"),i.set(15,"number"),i.set(16,"boolean"),i.set(17,"array"),i.set(18,"object"),i.set(19,"key"),i.set(20,"null"),i.set(21,"enum-member"),i.set(22,"struct"),i.set(23,"event"),i.set(24,"operator"),i.set(25,"type-parameter"),e.fromString=function(e){return t.get(e)},e.toString=function(e){return i.get(e)},e.toCssClassName=function(e,t){const n=i.get(e);let o=n&&l.fK.get("symbol-"+n);return o||(console.info("No codicon found for SymbolKind "+e),o=l.lA.symbolProperty),`${t?"inline":"block"} ${o.classNames}`}}(m||(m={}));class b{constructor(e){this.value=e}}b.Comment=new b("comment"),b.Imports=new b("imports"),b.Region=new b("region"),function(e){e[e.Other=0]="Other",e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(_||(_={}));const y=new r.c,w=new r.c,C=new r.c,S=new r.c,x=new r.c,k=new r.c,D=new r.c,L=new r.c,N=new r.c,E=new r.c,A=new r.c,M=new r.c,I=new r.c,T=new r.c,R=new r.c,O=new r.c,F=new r.c,P=new r.c,B=new r.c,z=new r.c,W=new r.c,V=new r.c,H=new r.c,$=new r.c,U=new r.c,j=new class{constructor(){this._map=new Map,this._promises=new Map,this._onDidChange=new s.Q5,this.onDidChange=this._onDidChange.event,this._colorMap=null}fire(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._map.set(e,t),this.fire([e]),(0,a.OF)((()=>{this._map.get(e)===t&&(this._map.delete(e),this.fire([e]))}))}registerPromise(e,t){let i=null,n=!1;return this._promises.set(e,t.then((t=>{this._promises.delete(e),!n&&t&&(i=this.register(e,t))}))),(0,a.OF)((()=>{n=!0,i&&i.dispose()}))}getPromise(e){const t=this.get(e);if(t)return Promise.resolve(t);const i=this._promises.get(e);return i?i.then((t=>this.get(e))):null}get(e){return this._map.get(e)||null}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._map.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}},7354:(e,t,i)=>{"use strict";var n;i.d(t,{wU:()=>n,V6:()=>o,c$:()=>r}),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(n||(n={}));class o{constructor(e){if(this.open=e.open,this.close=e.close,this._standardTokenMask=0,Array.isArray(e.notIn))for(let t=0,i=e.notIn.length;t{"use strict";i.d(t,{zu:()=>y});var n=i(4669),o=i(5976),r=i(7295),s=i(7461),a=i(7354),l=i(764);class c{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map((e=>new a.V6(e))):e.brackets?this._autoClosingPairs=e.brackets.map((e=>new a.V6({open:e[0],close:e[1]}))):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new a.V6({open:t.open,close:t.close||""}))}this._autoCloseBefore="string"==typeof e.autoCloseBefore?e.autoCloseBefore:c.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(){return this._autoCloseBefore}static shouldAutoClosePair(e,t,i){if(0===t.getTokenCount())return!0;const n=t.findTokenIndexAtOffset(i-2),o=t.getStandardTokenType(n);return e.isOK(o)}getSurroundingPairs(){return this._surroundingPairs}}c.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=";:.,=}])> \n\t";var u=i(4227);class h{constructor(e){this._richEditBrackets=e}getElectricCharacters(){let e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const i of t.close){const t=i.charAt(i.length-1);e.push(t)}return e=e.filter(((e,t,i)=>i.indexOf(e)===t)),e}onElectricCharacter(e,t,i){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const n=t.findTokenIndexAtOffset(i-1);if((0,l.Bu)(t.getStandardTokenType(n)))return null;const o=this._richEditBrackets.reversedRegex,r=t.getLineContent().substring(0,i-1)+e,s=u.Vr.findPrevBracketInRange(o,1,r,0,r.length);if(!s)return null;const a=r.substring(s.startColumn-1,s.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[a])return null;const c=t.getActualLineContentBefore(s.startColumn-1);return/^\s*$/.test(c)?{matchOpenBracket:a}:null}}function d(e){return e.global&&(e.lastIndex=0),!0}class g{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&d(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&d(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&d(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&d(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}var f=i(7301);class p{constructor(e){(e=e||{}).brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach((e=>{const t=p._createOpenBracketRegExp(e[0]),i=p._createCloseBracketRegExp(e[1]);t&&i&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:i})})),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let e=0,o=this._regExpRules.length;e!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text)))))return o.action}if(e>=2&&i.length>0&&n.length>0)for(let e=0,t=this._brackets.length;e=2&&i.length>0)for(let e=0,t=this._brackets.length;e{for(let e=0;e{r.dispose(),this._onDidChange.fire(new _(e))}))}_getRichEditSupport(e){const t=this._entries2.get(e);return t?t.getRichEditSupport():null}getIndentationRules(e){const t=this._getRichEditSupport(e);return t&&t.indentationRules||null}_getElectricCharacterSupport(e){let t=this._getRichEditSupport(e);return t&&t.electricCharacter||null}getElectricCharacters(e){let t=this._getElectricCharacterSupport(e);return t?t.getElectricCharacters():[]}onElectricCharacter(e,t,i){let n=(0,l.wH)(t,i-1),o=this._getElectricCharacterSupport(n.languageId);return o?o.onElectricCharacter(e,n,i-n.firstCharOffset):null}getComments(e){let t=this._getRichEditSupport(e);return t&&t.comments||null}_getCharacterPairSupport(e){let t=this._getRichEditSupport(e);return t&&t.characterPair||null}getAutoClosingPairs(e){const t=this._getCharacterPairSupport(e);return new a.c$(t?t.getAutoClosingPairs():[])}getAutoCloseBeforeSet(e){let t=this._getCharacterPairSupport(e);return t?t.getAutoCloseBeforeSet():c.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED}getSurroundingPairs(e){let t=this._getCharacterPairSupport(e);return t?t.getSurroundingPairs():[]}shouldAutoClosePair(e,t,i){const n=(0,l.wH)(t,i-1);return c.shouldAutoClosePair(e,n,i-n.firstCharOffset)}getWordDefinition(e){let t=this._getRichEditSupport(e);return t?(0,s.eq)(t.wordDefinition||null):(0,s.eq)(null)}getFoldingRules(e){let t=this._getRichEditSupport(e);return t?t.foldingRules:{}}getIndentRulesSupport(e){let t=this._getRichEditSupport(e);return t&&t.indentRulesSupport||null}getPrecedingValidLine(e,t,i){let n=e.getLanguageIdAtPosition(t,0);if(t>1){let o,r=-1;for(o=t-1;o>=1;o--){if(e.getLanguageIdAtPosition(o,0)!==n)return r;let t=e.getLineContent(o);if(!i.shouldIgnore(t)&&!/^\s+$/.test(t)&&""!==t)return o;r=o}}return-1}getInheritIndentForLine(e,t,i,n=!0){if(e<4)return null;const o=this.getIndentRulesSupport(t.getLanguageIdentifier().id);if(!o)return null;if(i<=1)return{indentation:"",action:null};const s=this.getPrecedingValidLine(t,i,o);if(s<0)return null;if(s<1)return{indentation:"",action:null};const l=t.getLineContent(s);if(o.shouldIncrease(l)||o.shouldIndentNextLine(l))return{indentation:r.V8(l),action:a.wU.Indent,line:s};if(o.shouldDecrease(l))return{indentation:r.V8(l),action:null,line:s};{if(1===s)return{indentation:r.V8(t.getLineContent(s)),action:null,line:s};const e=s-1,i=o.getIndentMetadata(t.getLineContent(e));if(!(3&i)&&4&i){let i=0;for(let n=e-1;n>0;n--)if(!o.shouldIndentNextLine(t.getLineContent(n))){i=n;break}return{indentation:r.V8(t.getLineContent(i+1)),action:null,line:i+1}}if(n)return{indentation:r.V8(t.getLineContent(s)),action:null,line:s};for(let e=s;e>0;e--){const i=t.getLineContent(e);if(o.shouldIncrease(i))return{indentation:r.V8(i),action:a.wU.Indent,line:e};if(o.shouldIndentNextLine(i)){let i=0;for(let n=e-1;n>0;n--)if(!o.shouldIndentNextLine(t.getLineContent(e))){i=n;break}return{indentation:r.V8(t.getLineContent(i+1)),action:null,line:i+1}}if(o.shouldDecrease(i))return{indentation:r.V8(i),action:null,line:e}}return{indentation:r.V8(t.getLineContent(1)),action:null,line:1}}}getGoodIndentForLine(e,t,i,n,o){if(e<4)return null;const s=this._getRichEditSupport(i);if(!s)return null;const l=this.getIndentRulesSupport(i);if(!l)return null;const c=this.getInheritIndentForLine(e,t,n),u=t.getLineContent(n);if(c){const i=c.line;if(void 0!==i){const n=s.onEnter(e,"",t.getLineContent(i),"");if(n){let e=r.V8(t.getLineContent(i));return n.removeText&&(e=e.substring(0,e.length-n.removeText)),n.indentAction===a.wU.Indent||n.indentAction===a.wU.IndentOutdent?e=o.shiftIndent(e):n.indentAction===a.wU.Outdent&&(e=o.unshiftIndent(e)),l.shouldDecrease(u)&&(e=o.unshiftIndent(e)),n.appendText&&(e+=n.appendText),r.V8(e)}}return l.shouldDecrease(u)?c.action===a.wU.Indent?c.indentation:o.unshiftIndent(c.indentation):c.action===a.wU.Indent?o.shiftIndent(c.indentation):c.indentation}return null}getIndentForEnter(e,t,i,n){if(e<4)return null;t.forceTokenization(i.startLineNumber);const o=t.getLineTokens(i.startLineNumber),s=(0,l.wH)(o,i.startColumn-1),c=s.getLineContent();let u,h,d=!1;s.firstCharOffset>0&&o.getLanguageId(0)!==s.languageId?(d=!0,u=c.substr(0,i.startColumn-1-s.firstCharOffset)):u=o.getLineContent().substring(0,i.startColumn-1),h=i.isEmpty()?c.substr(i.startColumn-1-s.firstCharOffset):this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-s.firstCharOffset);const g=this.getIndentRulesSupport(s.languageId);if(!g)return null;const f=u,p=r.V8(u),m={getLineTokens:e=>t.getLineTokens(e),getLanguageIdentifier:()=>t.getLanguageIdentifier(),getLanguageIdAtPosition:(e,i)=>t.getLanguageIdAtPosition(e,i),getLineContent:e=>e===i.startLineNumber?f:t.getLineContent(e)},_=r.V8(o.getLineContent()),v=this.getInheritIndentForLine(e,m,i.startLineNumber+1);if(!v){const e=d?_:p;return{beforeEnter:e,afterEnter:e}}let b=d?_:v.indentation;return v.action===a.wU.Indent&&(b=n.shiftIndent(b)),g.shouldDecrease(h)&&(b=n.unshiftIndent(b)),{beforeEnter:d?_:p,afterEnter:b}}getIndentActionForType(e,t,i,n,o){if(e<4)return null;const r=this.getScopedLineTokens(t,i.startLineNumber,i.startColumn);if(r.firstCharOffset)return null;const s=this.getIndentRulesSupport(r.languageId);if(!s)return null;const l=r.getLineContent(),c=l.substr(0,i.startColumn-1-r.firstCharOffset);let u;if(u=i.isEmpty()?l.substr(i.startColumn-1-r.firstCharOffset):this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-r.firstCharOffset),!s.shouldDecrease(c+u)&&s.shouldDecrease(c+n+u)){const n=this.getInheritIndentForLine(e,t,i.startLineNumber,!1);if(!n)return null;let r=n.indentation;return n.action!==a.wU.Indent&&(r=o.unshiftIndent(r)),r}return null}getIndentMetadata(e,t){const i=this.getIndentRulesSupport(e.getLanguageIdentifier().id);return i?t<1||t>e.getLineCount()?null:i.getIndentMetadata(e.getLineContent(t)):null}getEnterAction(e,t,i){const n=this.getScopedLineTokens(t,i.startLineNumber,i.startColumn),o=this._getRichEditSupport(n.languageId);if(!o)return null;const r=n.getLineContent(),s=r.substr(0,i.startColumn-1-n.firstCharOffset);let l;l=i.isEmpty()?r.substr(i.startColumn-1-n.firstCharOffset):this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-n.firstCharOffset);let c="";if(i.startLineNumber>1&&0===n.firstCharOffset){const e=this.getScopedLineTokens(t,i.startLineNumber-1);e.languageId===n.languageId&&(c=e.getLineContent())}const u=o.onEnter(e,c,s,l);if(!u)return null;const h=u.indentAction;let d=u.appendText;const g=u.removeText||0;d?h===a.wU.Indent&&(d="\t"+d):d=h===a.wU.Indent||h===a.wU.IndentOutdent?"\t":"";let f=this.getIndentationAtPosition(t,i.startLineNumber,i.startColumn);return g&&(f=f.substring(0,f.length-g)),{indentAction:h,appendText:d,removeText:g,indentation:f}}getIndentationAtPosition(e,t,i){const n=e.getLineContent(t);let o=r.V8(n);return o.length>i-1&&(o=o.substring(0,i-1)),o}getScopedLineTokens(e,t,i){e.forceTokenization(t);const n=e.getLineTokens(t),o=void 0===i?e.getLineMaxColumn(t)-1:i-1;return(0,l.wH)(n,o)}getBracketsSupport(e){const t=this._getRichEditSupport(e);return t&&t.brackets||null}}},1036:(e,t,i)=>{"use strict";i.d(t,{c:()=>g,Y:()=>f});var n=i(4669),o=i(9954),r=i(5976),s=i(3702),a=i(9870),l=i(4118),c=i(8721);function u(e,t,i,n){if(Array.isArray(e)){let o=0;for(const r of e){const e=u(r,t,i,n);if(10===e)return e;e>o&&(o=e)}return o}if("string"==typeof e)return n?"*"===e?5:e===i?10:0:0;if(e){const{language:o,pattern:r,scheme:s,hasAccessToAllModels:a}=e;if(!n&&!a)return 0;let u=0;if(s)if(s===t.scheme)u=10;else{if("*"!==s)return 0;u=5}if(o)if(o===i)u=10;else{if("*"!==o)return 0;u=Math.max(u,5)}if(r){let e;if(e="string"==typeof r?r:Object.assign(Object.assign({},r),{base:(0,c.Fv)(r.base)}),e!==t.fsPath&&!(0,l.EQ)(e,t.fsPath))return 0;u=10}return u}return 0}var h=i(1200);function d(e){return"string"!=typeof e&&(Array.isArray(e)?e.every(d):!!e.exclusive)}class g{constructor(){this._clock=0,this._entries=[],this._onDidChange=new n.Q5}get onDidChange(){return this._onDidChange.event}register(e,t){let i={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,r.OF)((()=>{if(i){let e=this._entries.indexOf(i);e>=0&&(this._entries.splice(e,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),i=void 0)}}))}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e);const t=[];for(let e of this._entries)e._score>0&&t.push(e.provider);return t}ordered(e){const t=[];return this._orderedForEach(e,(e=>t.push(e.provider))),t}orderedGroups(e){const t=[];let i,n;return this._orderedForEach(e,(e=>{i&&n===e._score?i.push(e.provider):(n=e._score,i=[e.provider],t.push(i))})),t}_orderedForEach(e,t){if(e){this._updateScores(e);for(const e of this._entries)e._score>0&&t(e)}}_updateScores(e){let t={uri:e.uri.toString(),language:e.getLanguageIdentifier().language};if(!this._lastCandidate||this._lastCandidate.language!==t.language||this._lastCandidate.uri!==t.uri){this._lastCandidate=t;for(let t of this._entries)if(t._score=u(t.selector,e.uri,e.getLanguageIdentifier().language,(0,h.p)(e)),d(t.selector)&&t._score>0){for(let e of this._entries)e._score=0;t._score=1e3;break}this._entries.sort(g._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:e._timet._time?-1:0}}class f{constructor(e,t,i=Number.MAX_SAFE_INTEGER){this._registry=e,this.min=t,this.max=i,this._cache=new s.z6(50,.7)}_key(e){return e.id+(0,o.vp)(this._registry.all(e))}_clamp(e){return void 0===e?this.min:Math.min(this.max,Math.max(this.min,Math.floor(1.3*e)))}get(e){const t=this._key(e),i=this._cache.get(t);return this._clamp(null==i?void 0:i.value)}update(e,t){const i=this._key(e);let n=this._cache.get(i);return n||(n=new a.n,this._cache.set(i,n)),n.update(t),this.get(e)}}},1144:(e,t,i)=>{"use strict";i.d(t,{dQ:()=>l,XT:()=>c,Tb:()=>u});var n=i(3580),o=i(4669),r=i(4101),s=i(3831),a=i(9872);const l=new class{constructor(){this._onDidChangeLanguages=new o.Q5,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[],this._dynamicLanguages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,i=this._languages.length;t"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],folding:{offSide:!0}},0)},8111:(e,t,i)=>{"use strict";i.d(t,{nO:()=>r,TG:()=>s,pA:()=>a,Ri:()=>l,mh:()=>c});var n=i(5600),o=i(4101);const r=new class{clone(){return this}equals(e){return this===e}},s="vs.editor.nullMode",a=new o.rl(s,0);function l(e,t,i,o){return new n.hG([new n.WU(o,"",e)],i)}function c(e,t,i,o){let s=new Uint32Array(2);return s[0]=o,s[1]=(16384|e<<0|2<<23)>>>0,new n.Hi(s,null===i?r:i)}},764:(e,t,i)=>{"use strict";function n(e,t){let i=e.getCount(),n=e.findTokenIndexAtOffset(t),r=e.getLanguageId(n),s=n;for(;s+10&&e.getLanguageId(a-1)===r;)a--;return new o(e,r,a,s+1,e.getStartOffset(a),e.getEndOffset(s))}i.d(t,{wH:()=>n,Bu:()=>r});class o{constructor(e,t,i,n,o,r){this._actual=e,this.languageId=t,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=o,this._lastCharOffset=r}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}}function r(e){return 0!=(7&e)}},4227:(e,t,i)=>{"use strict";i.d(t,{EA:()=>a,Vr:()=>f});var n=i(7295),o=i(72),r=i(4314);class s{constructor(e,t,i,n,o,r){this.languageIdentifier=e,this.index=t,this.open=i,this.close=n,this.forwardRegex=o,this.reversedRegex=r,this._openSet=s._toSet(this.open),this._closeSet=s._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){const t=new Set;for(const i of e)t.add(i);return t}}class a{constructor(e,t){const i=function(e){const t=e.length;e=e.map((e=>[e[0].toLowerCase(),e[1].toLowerCase()]));const i=[];for(let e=0;e{const[i,n]=e,[o,r]=t;return i===o||i===r||n===o||n===r},o=(e,n)=>{const o=Math.min(e,n),r=Math.max(e,n);for(let e=0;e0&&r.push({open:o,close:s})}return r}(t);this.brackets=i.map(((t,n)=>new s(e,n,t.open,t.close,function(e,t,i,n){let o=[];o=o.concat(e),o=o.concat(t);for(let e=0,t=o.length;e=0&&n.push(t);for(const t of r.close)t.indexOf(e)>=0&&n.push(t)}}function c(e,t){return e.length-t.length}function u(e){if(e.length<=1)return e;const t=[],i=new Set;for(const n of e)i.has(n)||(t.push(n),i.add(n));return t}function h(e){const t=/^[\w ]+$/.test(e);return e=n.ec(e),t?`\\b${e}\\b`:e}function d(e){let t=`(${e.map(h).join(")|(")})`;return n.GF(t,!0)}const g=function(){let e=null,t=null;return function(i){return e!==i&&(e=i,t=function(e){if(o.lZ){const t=new Uint16Array(e.length);let i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charCodeAt(n);return o.oe().decode(t)}{let t=[],i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charAt(n);return t.join("")}}(e)),t}}();class f{static _findPrevBracketInText(e,t,i,n){let o=i.match(e);if(!o)return null;let s=i.length-(o.index||0),a=o[0].length,l=n+s;return new r.e(t,l-a+1,t,l+1)}static findPrevBracketInRange(e,t,i,n,o){const r=g(i).substring(i.length-o,i.length-n);return this._findPrevBracketInText(e,t,r,n)}static findNextBracketInText(e,t,i,n){let o=i.match(e);if(!o)return null;let s=o.index||0,a=o[0].length;if(0===a)return null;let l=n+s;return new r.e(t,l+1,t,l+1+a)}static findNextBracketInRange(e,t,i,n,o){const r=i.substring(n,o);return this.findNextBracketInText(e,t,r,n)}}},5713:(e,t,i)=>{"use strict";i.d(t,{C:()=>a,F:()=>l});var n=i(7295),o=i(8411),r=i(8111);const s={getInitialState:()=>r.nO,tokenize2:(e,t,i,n)=>(0,r.mh)(0,e,i,n)};function a(e,t=s){return function(e,t){let i='
    ',r=n.uq(e),s=t.getInitialState();for(let e=0,a=r.length;e0&&(i+="
    ");let l=t.tokenize2(a,!0,s,0);o.A.convertToEndOffset(l.tokens,a.length);let c=new o.A(l.tokens,a).inflate(),u=0;for(let e=0,t=c.getCount();e${n.YU(a.substring(u,o))}`,u=o}s=l.endState}return i+="
    ",i}(e,t||s)}function l(e,t,i,n,o,r,s){let a="
    ",l=n,c=0;for(let u=0,h=t.getCount();u0;)d+=s?" ":" ",e--;break;case 60:d+="<";break;case 62:d+=">";break;case 38:d+="&";break;case 0:d+="�";break;case 65279:case 8232:case 8233:case 133:d+="�";break;case 13:d+="​";break;case 32:d+=s?" ":" ";break;default:d+=String.fromCharCode(t)}}if(a+=`${d}`,h>o||l>=o)break}return a+="
    ",a}},469:(e,t,i)=>{"use strict";i.d(t,{p:()=>n});const n=(0,i(2065).yh)("editorWorkerService")},9510:(e,t,i)=>{"use strict";i.d(t,{St:()=>b,ML:()=>_,Vl:()=>p,Vj:()=>m});var n=i(1050),o=i(7301),r=i(666),s=i(4101),a=i(1200),l=i(4565),c=i(8401),u=i(3060),h=i(1432);function d(e){const t=new Uint32Array(function(e){let t=0;if(t+=2,"full"===e.type)t+=1+e.data.length;else{t+=1,t+=3*e.deltas.length;for(const i of e.deltas)i.data&&(t+=i.data.length)}return t}(e));let i=0;if(t[i++]=e.id,"full"===e.type)t[i++]=1,t[i++]=e.data.length,t.set(e.data,i),i+=e.data.length;else{t[i++]=2,t[i++]=e.deltas.length;for(const n of e.deltas)t[i++]=n.start,t[i++]=n.deleteCount,n.data?(t[i++]=n.data.length,t.set(n.data,i),i+=n.data.length):t[i++]=0}return function(e){const t=new Uint8Array(e.buffer,e.byteOffset,4*e.length);return h.r()||function(e){for(let t=0,i=e.length;t0?t[0]:null}function b(e){const t=s.K7.ordered(e);return t.length>0?t[0]:null}l.P.registerCommand("_provideDocumentSemanticTokensLegend",((e,...t)=>f(void 0,void 0,void 0,(function*(){const[i]=t;(0,c.p_)(i instanceof r.o);const n=e.get(a.q).getModel(i);if(!n)return;const o=v(n);return o?o.getLegend():e.get(l.H).executeCommand("_provideDocumentRangeSemanticTokensLegend",i)})))),l.P.registerCommand("_provideDocumentSemanticTokens",((e,...t)=>f(void 0,void 0,void 0,(function*(){const[i]=t;(0,c.p_)(i instanceof r.o);const s=e.get(a.q).getModel(i);if(!s)return;const u=_(s,null,n.T.None);if(!u)return e.get(l.H).executeCommand("_provideDocumentRangeSemanticTokens",i,s.getFullModelRange());const{provider:h,request:g}=u;let f;try{f=yield g}catch(e){return void(0,o.Cp)(e)}if(!f||!p(f))return;const m=d({id:0,type:"full",data:f.data});return f.resultId&&h.releaseDocumentSemanticTokens(f.resultId),m})))),l.P.registerCommand("_provideDocumentRangeSemanticTokensLegend",((e,...t)=>f(void 0,void 0,void 0,(function*(){const[i]=t;(0,c.p_)(i instanceof r.o);const n=e.get(a.q).getModel(i);if(!n)return;const o=b(n);return o?o.getLegend():void 0})))),l.P.registerCommand("_provideDocumentRangeSemanticTokens",((e,...t)=>f(void 0,void 0,void 0,(function*(){const[i,s]=t;(0,c.p_)(i instanceof r.o),(0,c.p_)(g.e.isIRange(s));const l=e.get(a.q).getModel(i);if(!l)return;const u=b(l);if(!u)return;let h;try{h=yield u.provideDocumentRangeSemanticTokens(l,g.e.lift(s),n.T.None)}catch(e){return void(0,o.Cp)(e)}return h&&p(h)?d({id:0,type:"full",data:h.data}):void 0}))))},6479:(e,t,i)=>{"use strict";i.d(t,{i:()=>n});const n=(0,i(2065).yh)("markerDecorationsService")},1531:(e,t,i)=>{"use strict";i.d(t,{h:()=>n});const n=(0,i(2065).yh)("modeService")},1200:(e,t,i)=>{"use strict";i.d(t,{q:()=>n,p:()=>o});const n=(0,i(2065).yh)("modelService");function o(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},7390:(e,t,i)=>{"use strict";i.d(t,{BR:()=>E,e3:()=>A,tw:()=>M});var n=i(4669),o=i(5976),r=i(1432),s=i(7301),a=i(4141),l=i(3411),c=i(4101),u=i(1144),h=i(3187),d=i(3108),g=i(5393),f=i(1050),p=i(7781),m=i(3557),_=i(4862),v=i(9954),b=i(5215),y=i(6663),w=i(5072),C=i(9510),S=function(e,t){return function(i,n){t(i,n,e)}};function x(e){return e.toString()}function k(e){const t=new v.yP,i=e.createSnapshot();let n;for(;n=i.read();)t.update(n);return t.digest()}class D{constructor(e,t,i){this._modelEventListeners=new o.SL,this.model=e,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(e.onWillDispose((()=>t(e)))),this._modelEventListeners.add(e.onDidChangeLanguage((t=>i(e,t))))}_disposeLanguageSelection(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null)}dispose(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}setLanguage(e){this._disposeLanguageSelection(),this._languageSelection=e,this._languageSelectionListener=this._languageSelection.onDidChange((()=>this.model.setMode(e.languageIdentifier))),this.model.setMode(e.languageIdentifier)}}const L=r.IJ||r.dz?1:2;class N{constructor(e,t,i,n,o,r,s,a){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=o,this.sha1=r,this.versionId=s,this.alternativeVersionId=a}}let E=class e extends o.JT{constructor(e,t,i,o,r){super(),this._configurationService=e,this._resourcePropertiesService=t,this._themeService=i,this._logService=o,this._undoRedoService=r,this._onModelAdded=this._register(new n.Q5),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new n.Q5),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new n.Q5),this.onModelModeChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new T(this._themeService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration((()=>this._updateModelOptions()))),this._updateModelOptions(),this._register(new I(this,this._themeService,this._configurationService,this._semanticStyling))}static _readModelOptions(e,t){let i=a.DB.tabSize;if(e.editor&&void 0!==e.editor.tabSize){const t=parseInt(e.editor.tabSize,10);isNaN(t)||(i=t),i<1&&(i=1)}let n=i;if(e.editor&&void 0!==e.editor.indentSize&&"tabSize"!==e.editor.indentSize){const t=parseInt(e.editor.indentSize,10);isNaN(t)||(n=t),n<1&&(n=1)}let o=a.DB.insertSpaces;e.editor&&void 0!==e.editor.insertSpaces&&(o="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let r=L;const s=e.eol;"\r\n"===s?r=2:"\n"===s&&(r=1);let l=a.DB.trimAutoWhitespace;e.editor&&void 0!==e.editor.trimAutoWhitespace&&(l="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let c=a.DB.detectIndentation;e.editor&&void 0!==e.editor.detectIndentation&&(c="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let u=a.DB.largeFileOptimizations;return e.editor&&void 0!==e.editor.largeFileOptimizations&&(u="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations)),{isForSimpleWidget:t,tabSize:i,indentSize:n,insertSpaces:o,detectIndentation:c,defaultEOL:r,trimAutoWhitespace:l,largeFileOptimizations:u}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&"auto"!==i?i:3===r.OS||2===r.OS?"\n":"\r\n"}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!=typeof e||e}getCreationOptions(t,i,n){let o=this._modelCreationOptionsByLanguageAndResource[t+i];if(!o){const r=this._configurationService.getValue("editor",{overrideIdentifier:t,resource:i}),s=this._getEOL(i,t);o=e._readModelOptions({editor:r,eol:s},n),this._modelCreationOptionsByLanguageAndResource[t+i]=o}return o}_updateModelOptions(){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const i=Object.keys(this._models);for(let n=0,o=i.length;ne){const t=[];for(this._disposedModels.forEach((e=>{e.sharesUndoRedoStack||t.push(e)})),t.sort(((e,t)=>e.time-t.time));t.length>0&&this._disposedModelsHeapSize>e;){const e=t.shift();this._removeDisposedModel(e.uri),null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){const o=this.getCreationOptions(t.language,i,n),r=new l.yO(e,o,t,i,this._undoRedoService);if(i&&this._disposedModels.has(x(i))){const e=this._removeDisposedModel(i),t=this._undoRedoService.getElements(i),n=k(r)===e.sha1;if(n||e.sharesUndoRedoStack){for(const e of t.past)(0,b.e9)(e)&&e.matchesResource(i)&&e.setModel(r);for(const e of t.future)(0,b.e9)(e)&&e.matchesResource(i)&&e.setModel(r);this._undoRedoService.setElementsValidFlag(i,!0,(e=>(0,b.e9)(e)&&e.matchesResource(i))),n&&(r._overwriteVersionId(e.versionId),r._overwriteAlternativeVersionId(e.alternativeVersionId),r._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const s=x(r.uri);if(this._models[s])throw new Error("ModelService: Cannot add model because it already exists!");const a=new D(r,(e=>this._onWillDispose(e)),((e,t)=>this._onDidChangeLanguage(e,t)));return this._models[s]=a,a}createModel(e,t,i,n=!1){let o;return t?(o=this._createModelData(e,t.languageIdentifier,i,n),this.setMode(o.model,t)):o=this._createModelData(e,u.Tb,i,n),this._onModelAdded.fire(o.model),o.model}setMode(e,t){if(!t)return;const i=this._models[x(e.uri)];i&&i.setLanguage(t)}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i0||e.future.length>0){for(const i of e.past)(0,b.e9)(i)&&i.matchesResource(t.uri)&&(r=!0,s+=i.heapSize(t.uri),i.setModel(t.uri));for(const i of e.future)(0,b.e9)(i)&&i.matchesResource(t.uri)&&(r=!0,s+=i.heapSize(t.uri),i.setModel(t.uri))}}var a;const l=e.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(r)if(!o&&s>l){const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}else this._ensureDisposedModelsHeapSize(l-s),this._undoRedoService.setElementsValidFlag(t.uri,!1,(e=>(0,b.e9)(e)&&e.matchesResource(t.uri))),this._insertDisposedModel(new N(t.uri,n.model.getInitialUndoRedoSnapshot(),Date.now(),o,s,k(t),t.getVersionId(),t.getAlternativeVersionId()));else if(!o){const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}delete this._models[i],n.dispose(),delete this._modelCreationOptionsByLanguageAndResource[t.getLanguageIdentifier().language+t.uri],this._onModelRemoved.fire(t)}_onDidChangeLanguage(t,i){const n=i.oldLanguage,o=t.getLanguageIdentifier().language,r=this.getCreationOptions(n,t.uri,t.isForSimpleWidget),s=this.getCreationOptions(o,t.uri,t.isForSimpleWidget);e._setModelOptionsForModel(t,s,r),this._onModelModeChanged.fire({model:t,oldModeId:n})}};E.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520,E=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([S(0,d.Ui),S(1,h.y),S(2,p.XE),S(3,m.VZ),S(4,_.tJ)],E);const A="editor.semanticHighlighting";function M(e,t,i){var n;const o=null===(n=i.getValue(A,{overrideIdentifier:e.getLanguageIdentifier().language,resource:e.uri}))||void 0===n?void 0:n.enabled;return"boolean"==typeof o?o:t.getColorTheme().semanticHighlighting}class I extends o.JT{constructor(e,t,i,n){super(),this._watchers=Object.create(null),this._semanticStyling=n;const o=e=>{this._watchers[e.uri.toString()]=new O(e,t,this._semanticStyling)},r=(e,t)=>{t.dispose(),delete this._watchers[e.uri.toString()]},s=()=>{for(let n of e.getModels()){const e=this._watchers[n.uri.toString()];M(n,t,i)?e||o(n):e&&r(n,e)}};this._register(e.onModelAdded((e=>{M(e,t,i)&&o(e)}))),this._register(e.onModelRemoved((e=>{const t=this._watchers[e.uri.toString()];t&&r(e,t)}))),this._register(i.onDidChangeConfiguration((e=>{e.affectsConfiguration(A)&&s()}))),this._register(t.onDidColorThemeChange(s))}}class T extends o.JT{constructor(e,t){super(),this._themeService=e,this._logService=t,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange((()=>{this._caches=new WeakMap})))}get(e){return this._caches.has(e)||this._caches.set(e,new w.$(e.getLegend(),this._themeService,this._logService)),this._caches.get(e)}}class R{constructor(e,t,i){this._provider=e,this.resultId=t,this.data=i}dispose(){this._provider.releaseDocumentSemanticTokens(this.resultId)}}class O extends o.JT{constructor(e,t,i){super(),this._isDisposed=!1,this._model=e,this._semanticStyling=i,this._fetchDocumentSemanticTokens=this._register(new g.pY((()=>this._fetchDocumentSemanticTokensNow()),O.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._register(this._model.onDidChangeContent((()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule()}))),this._register(this._model.onDidChangeLanguage((()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)})));const n=()=>{(0,o.B9)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const t of c.wT.all(e))"function"==typeof t.onDidChange&&this._documentProvidersChangeListeners.push(t.onDidChange((()=>this._fetchDocumentSemanticTokens.schedule(0))))};n(),this._register(c.wT.onDidChange((()=>{n(),this._fetchDocumentSemanticTokens.schedule()}))),this._register(t.onDidColorThemeChange((e=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule()}))),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;const e=new f.A,t=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,i=(0,C.ML)(this._model,t,e.token);if(!i)return void(this._currentDocumentResponse&&this._model.setSemanticTokens(null,!1));const{provider:n,request:o}=i;this._currentDocumentRequestCancellationTokenSource=e;const r=[],a=this._model.onDidChangeContent((e=>{r.push(e)})),l=this._semanticStyling.get(n);o.then((e=>{this._currentDocumentRequestCancellationTokenSource=null,a.dispose(),this._setDocumentSemanticTokens(n,e||null,l,r)}),(e=>{e&&(s.VV(e)||"string"==typeof e.message&&-1!==e.message.indexOf("busy"))||s.dL(e),this._currentDocumentRequestCancellationTokenSource=null,a.dispose(),r.length>0&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule())}))}static _copy(e,t,i,n,o){for(let r=0;r{n.length>0&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule()};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed)e&&t&&e.releaseDocumentSemanticTokens(t.resultId);else if(e&&i){if(!t)return this._model.setSemanticTokens(null,!0),void r();if((0,C.Vj)(t)){if(!o)return void this._model.setSemanticTokens(null,!0);if(0===t.edits.length)t={resultId:t.resultId,data:o.data};else{let e=0;for(const i of t.edits)e+=(i.data?i.data.length:0)-i.deleteCount;const i=o.data,n=new Uint32Array(i.length+e);let r=i.length,s=n.length;for(let e=t.edits.length-1;e>=0;e--){const o=t.edits[e],a=r-(o.start+o.deleteCount);a>0&&(O._copy(i,r-a,n,s-a,a),s-=a),o.data&&(O._copy(o.data,0,n,s-o.data.length,o.data.length),s-=o.data.length),r=o.start}r>0&&O._copy(i,0,n,0,r),t={resultId:t.resultId,data:n}}}if((0,C.Vl)(t)){this._currentDocumentResponse=new R(e,t.resultId,t.data);const o=(0,w.h)(t,i,this._model.getLanguageIdentifier());if(n.length>0)for(const e of n)for(const t of o)for(const i of e.changes)t.applyEdit(i.range,i.text);this._model.setSemanticTokens(o,!0)}else this._model.setSemanticTokens(null,!0);r()}else this._model.setSemanticTokens(null,!1)}}O.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY=300},8216:(e,t,i)=>{"use strict";i.d(t,{S:()=>n});const n=(0,i(2065).yh)("textModelService")},5072:(e,t,i)=>{"use strict";i.d(t,{$:()=>s,h:()=>a});var n=i(4101),o=i(3557),r=i(8409);class s{constructor(e,t,i){this._legend=e,this._themeService=t,this._logService=i,this._hashTable=new c,this._hasWarnedOverlappingTokens=!1}getMetadata(e,t,i){const r=this._hashTable.get(e,t,i.id);let s;if(r)s=r.metadata,this._logService.getLevel()===o.in.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${n.NX.getForeground(s)}, fontStyle ${n.NX.getFontStyle(s).toString(2)}`);else{let r=this._legend.tokenTypes[e];const a=[];if(r){let e=t;for(let t=0;e>0&&t>=1;e>0&&this._logService.getLevel()===o.in.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),a.push("not-in-legend"));const n=this._themeService.getColorTheme().getTokenStyleMetadata(r,a,i.language);void 0===n?s=2147483647:(s=0,void 0!==n.italic&&(s|=1|(n.italic?1:0)<<11),void 0!==n.bold&&(s|=2|(n.bold?2:0)<<11),void 0!==n.underline&&(s|=4|(n.underline?4:0)<<11),n.foreground&&(s|=8|n.foreground<<14),0===s&&(s=2147483647))}else this._logService.getLevel()===o.in.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),s=2147483647,r="not-in-legend";this._hashTable.add(e,t,i.id,s),this._logService.getLevel()===o.in.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${r}) / ${t} (${a.join(" ")}): foreground ${n.NX.getForeground(s)}, fontStyle ${n.NX.getFontStyle(s).toString(2)}`)}return s}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}}function a(e,t,i){const n=e.data,o=e.data.length/5|0,s=Math.max(Math.ceil(o/1024),400),a=[];let l=0,c=1,u=0;for(;le&&0===n[5*t];)t--;if(t-1===e){let e=h;for(;e+1a&&(t.warnOverlappingSemanticTokens(s,a+1),m=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=c._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1{"use strict";i.d(t,{V:()=>o,y:()=>r});var n=i(2065);const o=(0,n.yh)("textResourceConfigurationService"),r=(0,n.yh)("textResourcePropertiesService")},913:(e,t,i)=>{"use strict";i.d(t,{Oe:()=>n,ug:()=>o,qq:()=>r,ld:()=>s,UX:()=>a,aq:()=>l,B8:()=>c,xi:()=>u,UL:()=>h});var n,o,r,s,a,l,c,u,h,d=i(3580);!function(e){e.noSelection=d.N("noSelection","No selection"),e.singleSelectionRange=d.N("singleSelectionRange","Line {0}, Column {1} ({2} selected)"),e.singleSelection=d.N("singleSelection","Line {0}, Column {1}"),e.multiSelectionRange=d.N("multiSelectionRange","{0} selections ({1} characters selected)"),e.multiSelection=d.N("multiSelection","{0} selections"),e.emergencyConfOn=d.N("emergencyConfOn","Now changing the setting `accessibilitySupport` to 'on'."),e.openingDocs=d.N("openingDocs","Now opening the Editor Accessibility documentation page."),e.readonlyDiffEditor=d.N("readonlyDiffEditor"," in a read-only pane of a diff editor."),e.editableDiffEditor=d.N("editableDiffEditor"," in a pane of a diff editor."),e.readonlyEditor=d.N("readonlyEditor"," in a read-only code editor"),e.editableEditor=d.N("editableEditor"," in a code editor"),e.changeConfigToOnMac=d.N("changeConfigToOnMac","To configure the editor to be optimized for usage with a Screen Reader press Command+E now."),e.changeConfigToOnWinLinux=d.N("changeConfigToOnWinLinux","To configure the editor to be optimized for usage with a Screen Reader press Control+E now."),e.auto_on=d.N("auto_on","The editor is configured to be optimized for usage with a Screen Reader."),e.auto_off=d.N("auto_off","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),e.tabFocusModeOnMsg=d.N("tabFocusModeOnMsg","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),e.tabFocusModeOnMsgNoKb=d.N("tabFocusModeOnMsgNoKb","Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."),e.tabFocusModeOffMsg=d.N("tabFocusModeOffMsg","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),e.tabFocusModeOffMsgNoKb=d.N("tabFocusModeOffMsgNoKb","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding."),e.openDocMac=d.N("openDocMac","Press Command+H now to open a browser window with more information related to editor accessibility."),e.openDocWinLinux=d.N("openDocWinLinux","Press Control+H now to open a browser window with more information related to editor accessibility."),e.outroMsg=d.N("outroMsg","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),e.showAccessibilityHelpAction=d.N("showAccessibilityHelpAction","Show Accessibility Help")}(n||(n={})),function(e){e.inspectTokensAction=d.N("inspectTokens","Developer: Inspect Tokens")}(o||(o={})),function(e){e.gotoLineActionLabel=d.N("gotoLineActionLabel","Go to Line/Column...")}(r||(r={})),function(e){e.helpQuickAccessActionLabel=d.N("helpQuickAccess","Show all Quick Access Providers")}(s||(s={})),function(e){e.quickCommandActionLabel=d.N("quickCommandActionLabel","Command Palette"),e.quickCommandHelp=d.N("quickCommandActionHelp","Show And Run Commands")}(a||(a={})),function(e){e.quickOutlineActionLabel=d.N("quickOutlineActionLabel","Go to Symbol..."),e.quickOutlineByCategoryActionLabel=d.N("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")}(l||(l={})),function(e){e.editorViewAccessibleLabel=d.N("editorViewAccessibleLabel","Editor content"),e.accessibilityHelpMessage=d.N("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")}(c||(c={})),function(e){e.toggleHighContrast=d.N("toggleHighContrast","Toggle High Contrast Theme")}(u||(u={})),function(e){e.bulkEditServiceSummary=d.N("bulkEditServiceSummary","Made {0} edits in {1} files")}(h||(h={}))},7869:(e,t,i)=>{"use strict";i.d(t,{Kh:()=>a,Mm:()=>l,n0:()=>g,fY:()=>f,tR:()=>m,Ym:()=>_,hw:()=>v,DD:()=>y,zk:()=>w,Yp:()=>C,TC:()=>S,Dl:()=>x,zw:()=>k,e_:()=>D,kp:()=>N,zu:()=>E,x3:()=>A,N5:()=>M,m9:()=>T,lK:()=>R,Re:()=>O,eS:()=>F});var n=i(3580),o=i(1264),r=i(3910),s=i(7781);const a=(0,r.P6)("editor.lineHighlightBackground",{dark:null,light:null,hc:null},n.N("lineHighlight","Background color for the highlight of line at the cursor position.")),l=(0,r.P6)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},n.N("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),c=(0,r.P6)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},n.N("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),u=(0,r.P6)("editor.rangeHighlightBorder",{dark:null,light:null,hc:r.xL},n.N("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0),h=(0,r.P6)("editor.symbolHighlightBackground",{dark:r.MU,light:r.MU,hc:null},n.N("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),d=(0,r.P6)("editor.symbolHighlightBorder",{dark:null,light:null,hc:r.xL},n.N("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0),g=(0,r.P6)("editorCursor.foreground",{dark:"#AEAFAD",light:o.Il.black,hc:o.Il.white},n.N("caret","Color of the editor cursor.")),f=(0,r.P6)("editorCursor.background",null,n.N("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),p=(0,r.P6)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},n.N("editorWhitespaces","Color of whitespace characters in the editor.")),m=(0,r.P6)("editorIndentGuide.background",{dark:p,light:p,hc:p},n.N("editorIndentGuides","Color of the editor indentation guides.")),_=(0,r.P6)("editorIndentGuide.activeBackground",{dark:p,light:p,hc:p},n.N("editorActiveIndentGuide","Color of the active editor indentation guides.")),v=(0,r.P6)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:o.Il.white},n.N("editorLineNumbers","Color of editor line numbers.")),b=(0,r.P6)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:r.xL},n.N("editorActiveLineNumber","Color of editor active line number"),!1,n.N("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),y=(0,r.P6)("editorLineNumber.activeForeground",{dark:b,light:b,hc:b},n.N("editorActiveLineNumber","Color of editor active line number")),w=(0,r.P6)("editorRuler.foreground",{dark:"#5A5A5A",light:o.Il.lightgrey,hc:o.Il.white},n.N("editorRuler","Color of the editor rulers.")),C=(0,r.P6)("editorCodeLens.foreground",{dark:"#999999",light:"#999999",hc:"#999999"},n.N("editorCodeLensForeground","Foreground color of editor CodeLens")),S=(0,r.P6)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},n.N("editorBracketMatchBackground","Background color behind matching brackets")),x=(0,r.P6)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:r.lR},n.N("editorBracketMatchBorder","Color for matching brackets boxes")),k=(0,r.P6)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},n.N("editorOverviewRulerBorder","Color of the overview ruler border.")),D=(0,r.P6)("editorOverviewRuler.background",null,n.N("editorOverviewRulerBackground","Background color of the editor overview ruler. Only used when the minimap is enabled and placed on the right side of the editor.")),L=(0,r.P6)("editorGutter.background",{dark:r.cv,light:r.cv,hc:r.cv},n.N("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),N=(0,r.P6)("editorUnnecessaryCode.border",{dark:null,light:null,hc:o.Il.fromHex("#fff").transparent(.8)},n.N("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),E=(0,r.P6)("editorUnnecessaryCode.opacity",{dark:o.Il.fromHex("#000a"),light:o.Il.fromHex("#0007"),hc:null},n.N("unnecessaryCodeOpacity","Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.")),A=(0,r.P6)("editorGhostText.border",{dark:null,light:null,hc:o.Il.fromHex("#fff").transparent(.8)},n.N("editorGhostTextBorder","Border color of ghost text in the editor.")),M=(0,r.P6)("editorGhostText.foreground",{dark:o.Il.fromHex("#ffffff56"),light:o.Il.fromHex("#0007"),hc:null},n.N("editorGhostTextForeground","Foreground color of the ghost text in the editor.")),I=new o.Il(new o.VS(0,122,204,.6)),T=(0,r.P6)("editorOverviewRuler.rangeHighlightForeground",{dark:I,light:I,hc:I},n.N("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),R=(0,r.P6)("editorOverviewRuler.errorForeground",{dark:new o.Il(new o.VS(255,18,18,.7)),light:new o.Il(new o.VS(255,18,18,.7)),hc:new o.Il(new o.VS(255,50,50,1))},n.N("overviewRuleError","Overview ruler marker color for errors.")),O=(0,r.P6)("editorOverviewRuler.warningForeground",{dark:r.uo,light:r.uo,hc:r.pW},n.N("overviewRuleWarning","Overview ruler marker color for warnings.")),F=(0,r.P6)("editorOverviewRuler.infoForeground",{dark:r.c6,light:r.c6,hc:r.T8},n.N("overviewRuleInfo","Overview ruler marker color for infos."));(0,s.Ic)(((e,t)=>{const i=e.getColor(r.cv);i&&t.addRule(`.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${i}; }`);const n=e.getColor(r.NO);n&&t.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${n}; }`);const o=e.getColor(L);o&&t.addRule(`.monaco-editor .margin { background-color: ${o}; }`);const s=e.getColor(c);s&&t.addRule(`.monaco-editor .rangeHighlight { background-color: ${s}; }`);const a=e.getColor(u);a&&t.addRule(`.monaco-editor .rangeHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${a}; }`);const l=e.getColor(h);l&&t.addRule(`.monaco-editor .symbolHighlight { background-color: ${l}; }`);const g=e.getColor(d);g&&t.addRule(`.monaco-editor .symbolHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${g}; }`);const f=e.getColor(p);f&&(t.addRule(`.monaco-editor .mtkw { color: ${f} !important; }`),t.addRule(`.monaco-editor .mtkz { color: ${f} !important; }`))}))},2003:(e,t,i)=>{"use strict";i.d(t,{EY:()=>o,Tj:()=>r});class n{constructor(e,t,i){this.from=0|e,this.to=0|t,this.colorId=0|i}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class o{constructor(e,t,i){this.startLineNumber=e,this.endLineNumber=t,this.color=i,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.colori&&(h=i-d);const g=l.color;let f=this._color2Id[g];f||(f=++this._lastAssignedId,this._color2Id[g]=f,this._id2Color[f]=g);const p=new n(h-d,h+d,f);l.setColorZone(p),s.push(p)}return this._colorZonesInvalid=!1,s.sort(n.compare),s}}},2550:(e,t,i)=>{"use strict";i.d(t,{Kp:()=>o,k:()=>a});var n=i(7295);class o{constructor(e,t,i,n){this.startColumn=e,this.endColumn=t,this.className=i,this.type=n}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){const i=e.length;if(i!==t.length)return!1;for(let n=0;n=r||(a[l++]=new o(Math.max(1,t.startColumn-n+1),Math.min(s+1,t.endColumn-n+1),t.className,t.type));return a}static filter(e,t,i,n){if(0===e.length)return[];let r=[],s=0;for(let a=0,l=e.length;at)continue;if(c.isEmpty()&&(0===l.type||3===l.type))continue;const u=c.startLineNumber===t?c.startColumn:i,h=c.endLineNumber===t?c.endColumn:n;r[s++]=new o(u,h,l.inlineClassName,l.type)}return r}static _typeCompare(e,t){const i=[2,0,1,3];return i[e]-i[t]}static compare(e,t){if(e.startColumn===t.startColumn){if(e.endColumn===t.endColumn){const i=o._typeCompare(e.type,t.type);return 0===i?e.classNamet.className?1:0:i}return e.endColumn-t.endColumn}return e.startColumn-t.startColumn}}class r{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.className=i,this.metadata=n}}class s{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(e){let t=0;for(let i=0,n=e.length;i0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}class a{static normalize(e,t){if(0===t.length)return[];let i=[];const o=new s;let r=0;for(let s=0,a=t.length;s1){const t=e.charCodeAt(l-2);n.ZG(t)&&l--}if(c>1){const t=e.charCodeAt(c-2);n.ZG(t)&&c--}const d=l-1,g=c-2;r=o.consumeLowerThan(d,r,i),0===o.count&&(r=d),o.insert(g,u,h)}return o.consumeLowerThan(1073741824,r,i),i}}},7736:(e,t,i)=>{"use strict";i.d(t,{zG:()=>a,IJ:()=>l,fH:()=>c,d1:()=>h,tF:()=>g});var n=i(7295),o=i(72),r=i(2550);class s{constructor(e,t,i){this.endIndex=e,this.type=t,this.metadata=i}isWhitespace(){return!!(1&this.metadata)}isPseudoAfter(){return!!(4&this.metadata)}}class a{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class l{constructor(e,t,i,n,o,s,a,l,c,u,h,d,g,f,p,m,_,v,b){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=o,this.containsRTL=s,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=c.sort(r.Kp.compare),this.tabSize=u,this.startVisibleColumn=h,this.spaceWidth=d,this.stopRenderingLineAfter=p,this.renderWhitespace="all"===m?4:"boundary"===m?1:"selection"===m?2:"trailing"===m?3:0,this.renderControlCharacters=_,this.fontLigatures=v,this.selectionsOnLine=b&&b.sort(((e,t)=>e.startOffset>>16}static getCharIndex(e){return(65535&e)>>>0}setPartData(e,t,i,n){let o=(t<<16|i<<0)>>>0;this._data[e]=o,this._absoluteOffsets[e]=n+i}getAbsoluteOffsets(){return this._absoluteOffsets}charOffsetToPartData(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}partDataToCharOffset(e,t,i){if(0===this.length)return 0;let n=(e<<16|i<<0)>>>0,o=0,r=this.length-1;for(;o+1>>1,t=this._data[e];if(t===n)return e;t>n?r=e:o=e}if(o===r)return o;let s=this._data[o],a=this._data[r];if(s===n)return o;if(a===n)return r;let l,u=c.getPartIndex(s),h=c.getCharIndex(s);return l=u!==c.getPartIndex(a)?t:c.getCharIndex(a),i-h<=l-i?o:r}}class u{constructor(e,t,i){this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}function h(e,t){if(0===e.lineContent.length){if(e.lineDecorations.length>0){t.appendASCIIString("");let i=0,n=0,o=0;for(const r of e.lineDecorations)1!==r.type&&2!==r.type||(t.appendASCIIString(''),1===r.type&&(o|=1,i++),2===r.type&&(o|=2,n++));t.appendASCIIString("");const r=new c(1,i+n);return r.setPartData(0,i,0,0),new u(r,!1,o)}return t.appendASCIIString(""),new u(new c(0,0),!1,0)}return function(e,t){const i=e.fontIsMonospace,o=e.canUseHalfwidthRightwardsArrow,r=e.containsForeignElements,s=e.lineContent,a=e.len,l=e.isOverflowing,h=e.parts,d=e.fauxIndentLength,g=e.tabSize,f=e.startVisibleColumn,p=e.containsRTL,m=e.spaceWidth,_=e.renderSpaceCharCode,v=e.renderWhitespace,b=e.renderControlCharacters,y=new c(a+1,h.length);let w=!1,C=0,S=f,x=0,k=0,D=0,L=0;p?t.appendASCIIString(''):t.appendASCIIString("");for(let e=0,l=h.length;e=d&&(t+=n)}}for(p&&(t.appendASCIIString(' style="width:'),t.appendASCIIString(String(m*i)),t.appendASCIIString('px"')),t.appendASCII(62);C1?t.write1(8594):t.write1(65515);for(let e=2;e<=i;e++)t.write1(160)}else i=1,t.write1(_);x+=i,C>=d&&(S+=i)}D=i}else{let i=0;for(t.appendASCII(62);C=d&&(S+=a)}D=i}N?k++:k=0,C>=a&&!w&&l.isPseudoAfter()&&(w=!0,y.setPartData(C,e,x,L)),t.appendASCIIString("")}return w||y.setPartData(a,h.length-1,x,L),l&&t.appendASCIIString(""),t.appendASCIIString(""),new u(y,p,r)}(function(e){const t=e.lineContent;let i,o;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0&&(n[o++]=new s(t,"",0));for(let r=0,a=e.getCount();r=i){n[o++]=new s(i,l,0);break}n[o++]=new s(a,l,0)}return n}(e.lineTokens,e.fauxIndentLength,o);(4===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine||3===e.renderWhitespace)&&(a=function(e,t,i,o){const r=e.continuesWithWrappedLine,a=e.fauxIndentLength,l=e.tabSize,c=e.startVisibleColumn,u=e.useMonospaceOptimizations,h=e.selectionsOnLine,d=1===e.renderWhitespace,g=3===e.renderWhitespace,f=e.renderSpaceWidth!==e.spaceWidth;let p=[],m=0,_=0,v=o[_].type,b=o[_].endIndex;const y=o.length;let w,C=!1,S=n.LC(t);-1===S?(C=!0,S=i,w=i):w=n.ow(t);let x=!1,k=0,D=h&&h[k],L=c%l;for(let e=a;e=D.endOffset&&(k++,D=h&&h[k]),ew)c=!0;else if(9===r)c=!0;else if(32===r)if(d)if(x)c=!0;else{const n=e+1e),c&&g&&(c=C||e>w),x){if(!c||!u&&L>=l){if(f)for(let t=(m>0?p[m-1].endIndex:a)+1;t<=e;t++)p[m++]=new s(t,"mtkw",1);else p[m++]=new s(e,"mtkw",1);L%=l}}else(e===b||c&&e>a)&&(p[m++]=new s(e,v,0),L%=l);for(9===r?L=l:n.K7(r)?L+=2:L++,x=c;e===b;)_++,_0?t.charCodeAt(i-1):0,n=i>1?t.charCodeAt(i-2):0;32===e&&32!==n&&9!==n||(N=!0)}else N=!0;if(N)if(f)for(let e=(m>0?p[m-1].endIndex:a)+1;e<=i;e++)p[m++]=new s(e,"mtkw",1);else p[m++]=new s(i,"mtkw",1);else p[m++]=new s(i,v,0);return p}(e,t,o,a));let l=0;if(e.lineDecorations.length>0){for(let t=0,i=e.lineDecorations.length;th&&(h=e.startOffset,c[u++]=new s(h,r,d)),!(e.endOffset+1<=n)){h=n,c[u++]=new s(h,r+" "+e.className,d|e.metadata);break}h=e.endOffset+1,c[u++]=new s(h,r+" "+e.className,d|e.metadata),l++}n>h&&(h=n,c[u++]=new s(h,r,d))}const d=i[i.length-1].endIndex;if(l=50&&(o[r++]=new s(c+1,t,i),u=c+1,c=-1);u!==l&&(o[r++]=new s(l,t,i))}else o[r++]=a;n=l}else for(let e=0,i=t.length;e50){const e=i.type,t=i.metadata,c=Math.ceil(l/50);for(let i=1;i{"use strict";i.d(t,{T:()=>o,o:()=>r});var n=i(5427);class o{constructor(e,t){this.index=e,this.remainder=t}}class r{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=(0,n.A)(e);const i=this.values,o=this.prefixSum,r=t.length;return 0!==r&&(this.values=new Uint32Array(i.length+r),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e),e+r),this.values.set(t,e),e-1=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(e,t){return e=(0,n.A)(e),t=(0,n.A)(t),this.values[e]!==t&&(this.values[e]=t,e-1=i.length)return!1;let r=i.length-e;return t>=r&&(t=r),0!==t&&(this.values=new Uint32Array(i.length-t),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalValue(){return 0===this.values.length?0:this._getAccumulatedValue(this.values.length-1)}getAccumulatedValue(e){return e<0?0:(e=(0,n.A)(e),this._getAccumulatedValue(e))}_getAccumulatedValue(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let i=t;i<=e;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalValue();let t=0,i=this.values.length-1,n=0,r=0,s=0;for(;t<=i;)if(n=t+(i-t)/2|0,r=this.prefixSum[n],s=r-this.values[n],e=r))break;t=n+1}return new o(n,e-s)}}},3824:(e,t,i)=>{"use strict";i.d(t,{l_:()=>o,le:()=>s,ud:()=>a,IP:()=>l,wA:()=>c,$t:()=>u,$l:()=>h});var n=i(7295);class o{constructor(e,t,i,n){this.top=0|e,this.left=0|t,this.width=0|i,this.height=0|n}}class r{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}}class s{constructor(e,t,i){this.breakOffsets=e,this.breakOffsetsVisibleColumn=t,this.wrappedTextIndentLength=i}static getInputOffsetOfOutputPosition(e,t,i){return 0===t?i:e[t-1]+i}static getOutputPositionOfInputOffset(e,t){let i=0,n=e.length-1,o=0,s=0;for(;i<=n;){o=i+(n-i)/2|0;const r=e[o];if(s=o>0?e[o-1]:0,t=r))break;i=o+1}}return new r(o,t-s)}}class a{constructor(e,t){this.tabSize=e,this.data=t}}class l{constructor(e,t,i,n,o,r){this.content=e,this.continuesWithWrappedLine=t,this.minColumn=i,this.maxColumn=n,this.startVisibleColumn=o,this.tokens=r}}class c{constructor(e,t,i,n,o,r,s,a,l,u){this.minColumn=e,this.maxColumn=t,this.content=i,this.continuesWithWrappedLine=n,this.isBasicASCII=c.isBasicASCII(i,r),this.containsRTL=c.containsRTL(i,this.isBasicASCII,o),this.tokens=s,this.inlineDecorations=a,this.tabSize=l,this.startVisibleColumn=u}static isBasicASCII(e,t){return!t||n.$i(e)}static containsRTL(e,t,i){return!(t||!i)&&n.Ut(e)}}class u{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class h{constructor(e,t){this.range=e,this.options=t}}},7355:(e,t,i)=>{"use strict";i.r(t),i.d(t,{SelectionAnchorSet:()=>d});var n=i(6830),o=i(3580),r=i(9102),s=i(3860),a=i(2258),l=i(8819),c=i(9365),u=i(5152),h=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const d=new l.uy("selectionAnchorSet",!1);let g=class e{constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=d.bindTo(t),this.modelChangeListener=e.onDidChangeModel((()=>this.selectionAnchorSetContextKey.reset()))}static get(t){return t.getContribution(e.ID)}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition(),t=this.decorationId?[this.decorationId]:[],i=this.editor.deltaDecorations(t,[{range:s.Y.fromPositions(e,e),options:{description:"selection-anchor",stickiness:1,hoverMessage:(new c.W5).appendText((0,o.N)("selectionAnchor","Selection Anchor")),className:"selection-anchor"}}]);this.decorationId=i[0],this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,u.Z9)((0,o.N)("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(s.Y.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){this.decorationId&&(this.editor.deltaDecorations([this.decorationId],[]),this.decorationId=void 0,this.selectionAnchorSetContextKey.set(!1))}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};var f,p;g.ID="editor.contrib.selectionAnchorController",g=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(f=1,p=l.i6,function(e,t){p(e,t,f)})],g);class m extends n.R6{constructor(){super({id:"editor.action.setSelectionAnchor",label:(0,o.N)("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:r.u.editorTextFocus,primary:(0,a.gx)(2089,2080),weight:100}})}run(e,t){return h(this,void 0,void 0,(function*(){g.get(t).setSelectionAnchor()}))}}class _ extends n.R6{constructor(){super({id:"editor.action.goToSelectionAnchor",label:(0,o.N)("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:d})}run(e,t){return h(this,void 0,void 0,(function*(){g.get(t).goToSelectionAnchor()}))}}class v extends n.R6{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:(0,o.N)("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:d,kbOpts:{kbExpr:r.u.editorTextFocus,primary:(0,a.gx)(2089,2089),weight:100}})}run(e,t){return h(this,void 0,void 0,(function*(){g.get(t).selectFromAnchorToCursor()}))}}class b extends n.R6{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:(0,o.N)("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:d,kbOpts:{kbExpr:r.u.editorTextFocus,primary:9,weight:100}})}run(e,t){return h(this,void 0,void 0,(function*(){g.get(t).cancelSelectionAnchor()}))}}(0,n._K)(g.ID,g),(0,n.Qr)(m),(0,n.Qr)(_),(0,n.Qr)(v),(0,n.Qr)(b)},7084:(e,t,i)=>{"use strict";i.r(t),i.d(t,{BracketMatchingController:()=>w});var n=i(3580),o=i(5393),r=i(5976),s=i(6830),a=i(187),l=i(4314),c=i(3860),u=i(9102),h=i(4973),d=i(3411),g=i(7869),f=i(3910),p=i(7781),m=i(4144);const _=(0,f.P6)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hc:"#A0A0A0"},n.N("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class v extends s.R6{constructor(){super({id:"editor.action.jumpToBracket",label:n.N("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:u.u.editorTextFocus,primary:3160,weight:100}})}run(e,t){let i=w.get(t);i&&i.jumpToBracket()}}class b extends s.R6{constructor(){super({id:"editor.action.selectToBracket",label:n.N("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){const n=w.get(t);if(!n)return;let o=!0;i&&!1===i.selectBrackets&&(o=!1),n.selectToBracket(o)}}class y{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class w extends r.JT{constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=[],this._updateBracketsSoon=this._register(new o.pY((()=>this._updateBrackets()),50)),this._matchBrackets=this._editor.getOption(61),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition((e=>{"never"!==this._matchBrackets&&this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelContent((e=>{this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModel((e=>{this._lastBracketsData=[],this._decorations=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelLanguageConfiguration((e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(61)&&(this._matchBrackets=this._editor.getOption(61),this._decorations=this._editor.deltaDecorations(this._decorations,[]),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})))}static get(e){return e.getContribution(w.ID)}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map((t=>{const i=t.getStartPosition(),n=e.matchBracket(i);let o=null;if(n)n[0].containsPosition(i)?o=n[1].getStartPosition():n[1].containsPosition(i)&&(o=n[0].getStartPosition());else{const t=e.findEnclosingBrackets(i);if(t)o=t[0].getStartPosition();else{const t=e.findNextBracket(i);t&&t.range&&(o=t.range.getStartPosition())}}return o?new c.Y(o.lineNumber,o.column,o.lineNumber,o.column):new c.Y(i.lineNumber,i.column,i.lineNumber,i.column)}));this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach((n=>{const o=n.getStartPosition();let r=t.matchBracket(o);if(!r&&(r=t.findEnclosingBrackets(o),!r)){const e=t.findNextBracket(o);e&&e.range&&(r=t.matchBracket(e.range.getStartPosition()))}let s=null,a=null;if(r){r.sort(l.e.compareRangesUsingStarts);const[t,i]=r;s=e?t.getStartPosition():t.getEndPosition(),a=e?i.getEndPosition():i.getStartPosition()}s&&a&&i.push(new c.Y(s.lineNumber,s.column,a.lineNumber,a.column))})),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}_updateBrackets(){if("never"===this._matchBrackets)return;this._recomputeBrackets();let e=[],t=0;for(const i of this._lastBracketsData){let n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations=this._editor.deltaDecorations(this._decorations,e)}_recomputeBrackets(){if(!this._editor.hasModel())return this._lastBracketsData=[],void(this._lastVersionId=0);const e=this._editor.getSelections();if(e.length>100)return this._lastBracketsData=[],void(this._lastVersionId=0);const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);let o=[],r=0;for(let t=0,i=e.length;t1&&o.sort(a.L.compare);let s=[],l=0,c=0,u=n.length;for(let e=0,i=o.length;e{const i=e.getColor(g.TC);i&&t.addRule(`.monaco-editor .bracket-match { background-color: ${i}; }`);const n=e.getColor(g.Dl);n&&t.addRule(`.monaco-editor .bracket-match { border: 1px solid ${n}; }`)})),m.BH.appendMenuItem(m.eH.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:n.N({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2})},4594:(e,t,i)=>{"use strict";i.r(t);var n=i(3580),o=i(6830),r=i(9102),s=i(4314),a=i(3860);class l{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const i=this._selection.startLineNumber,n=this._selection.startColumn,o=this._selection.endColumn;if((!this._isMovingLeft||1!==n)&&(this._isMovingLeft||o!==e.getLineMaxColumn(i)))if(this._isMovingLeft){const r=new s.e(i,n-1,i,n),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new s.e(i,o,i,o),a)}else{const r=new s.e(i,o,i,o+1),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new s.e(i,n,i,n),a)}}computeCursorState(e,t){return this._isMovingLeft?new a.Y(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new a.Y(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class c extends o.R6{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;let i=[],n=t.getSelections();for(const e of n)i.push(new l(e,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}(0,o.Qr)(class extends c{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:n.N("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:r.u.writable})}}),(0,o.Qr)(class extends c{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:n.N("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:r.u.writable})}})},7847:(e,t,i)=>{"use strict";i.r(t);var n=i(3580),o=i(6830),r=i(1329),s=i(4314),a=i(9102),l=i(8784);class c extends o.R6{constructor(){super({id:"editor.action.transposeLetters",label:n.N("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:a.u.writable,kbOpts:{kbExpr:a.u.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let i=t.getModel(),n=[],o=t.getSelections();for(let e of o){if(!e.isEmpty())continue;let t=e.startLineNumber,o=e.startColumn,a=i.getLineMaxColumn(t);if(1===t&&(1===o||2===o&&2===a))continue;let c=o===a?e.getPosition():l.o.rightPosition(i,e.getPosition().lineNumber,e.getPosition().column),u=l.o.leftPosition(i,c),h=l.o.leftPosition(i,u),d=i.getValueInRange(s.e.fromPositions(h,u)),g=i.getValueInRange(s.e.fromPositions(u,c)),f=s.e.fromPositions(h,c);n.push(new r.T4(f,g+d))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}(0,o.Qr)(c)},2015:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CutAction:()=>_,CopyAction:()=>v,PasteAction:()=>b});var n=i(3580),o=i(6268),r=i(1432),s=i(5715),a=i(6830),l=i(1640),c=i(9102),u=i(4144),h=i(4972);const d="9_cutcopypaste",g=r.tY||document.queryCommandSupported("cut"),f=r.tY||document.queryCommandSupported("copy"),p=void 0!==navigator.clipboard&&!o.vU||document.queryCommandSupported("paste");function m(e){return e.register(),e}const _=g?m(new a.AJ({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:r.tY?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:u.eH.MenubarEditMenu,group:"2_ccp",title:n.N({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:u.eH.EditorContext,group:d,title:n.N("actions.clipboard.cutLabel","Cut"),when:c.u.writable,order:1},{menuId:u.eH.CommandPalette,group:"",title:n.N("actions.clipboard.cutLabel","Cut"),order:1},{menuId:u.eH.SimpleEditorContext,group:d,title:n.N("actions.clipboard.cutLabel","Cut"),when:c.u.writable,order:1}]})):void 0,v=f?m(new a.AJ({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:r.tY?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:u.eH.MenubarEditMenu,group:"2_ccp",title:n.N({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:u.eH.EditorContext,group:d,title:n.N("actions.clipboard.copyLabel","Copy"),order:2},{menuId:u.eH.CommandPalette,group:"",title:n.N("actions.clipboard.copyLabel","Copy"),order:1},{menuId:u.eH.SimpleEditorContext,group:d,title:n.N("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;u.BH.appendMenuItem(u.eH.MenubarEditMenu,{submenu:u.eH.MenubarCopy,title:{value:n.N("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3}),u.BH.appendMenuItem(u.eH.EditorContext,{submenu:u.eH.EditorContextCopy,title:{value:n.N("copy as","Copy As"),original:"Copy As"},group:d,order:3});const b=p?m(new a.AJ({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:r.tY?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:u.eH.MenubarEditMenu,group:"2_ccp",title:n.N({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:u.eH.EditorContext,group:d,title:n.N("actions.clipboard.pasteLabel","Paste"),when:c.u.writable,order:4},{menuId:u.eH.CommandPalette,group:"",title:n.N("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:u.eH.SimpleEditorContext,group:d,title:n.N("actions.clipboard.pasteLabel","Paste"),when:c.u.writable,order:4}]})):void 0;class y extends a.R6{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:n.N("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:c.u.textInputFocus,primary:0,weight:100}})}run(e,t){t.hasModel()&&(!t.getOption(30)&&t.getSelection().isEmpty()||(s.RA.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),s.RA.forceCopyWithSyntaxHighlighting=!1))}}function w(e,t){e&&(e.addImplementation(1e4,"code-editor",((e,i)=>{const n=e.get(l.$).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const e=n.getOption(30),i=n.getSelection();return i&&i.isEmpty()&&!e||document.execCommand(t),!0}return!1})),e.addImplementation(0,"generic-dom",((e,i)=>(document.execCommand(t),!0))))}w(_,"cut"),w(v,"copy"),b&&(b.addImplementation(1e4,"code-editor",((e,t)=>{const i=e.get(l.$),n=e.get(h.p),o=i.getFocusedCodeEditor();return!(!o||!o.hasTextFocus())&&!(!document.execCommand("paste")&&r.$L&&(a=void 0,c=void 0,u=void 0,d=function*(){const e=yield n.readText();if(""!==e){const t=s.Nl.INSTANCE.get(e);let i=!1,n=null,r=null;t&&(i=o.getOption(30)&&!!t.isFromEmptySelection,n=void 0!==t.multicursorText?t.multicursorText:null,r=t.mode),o.trigger("keyboard","paste",{text:e,pasteOnNewLine:i,multicursorText:n,mode:r})}},new(u||(u=Promise))((function(e,t){function i(e){try{o(d.next(e))}catch(e){t(e)}}function n(e){try{o(d.throw(e))}catch(e){t(e)}}function o(t){var o;t.done?e(t.value):(o=t.value,o instanceof u?o:new u((function(e){e(o)}))).then(i,n)}o((d=d.apply(a,c||[])).next())})),0));var a,c,u,d})),b.addImplementation(0,"generic-dom",((e,t)=>(document.execCommand("paste"),!0)))),f&&(0,a.Qr)(y)},1907:(e,t,i)=>{"use strict";i.d(t,{RB:()=>_,Bb:()=>v,MN:()=>b,uH:()=>y,TM:()=>w,bA:()=>C,aI:()=>k});var n=i(9488),o=i(1050),r=i(7301),s=i(5976),a=i(666),l=i(9925),c=i(4314),u=i(3860),h=i(4101),d=i(1200),g=i(9532),f=i(535),p=i(4565),m=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const _="editor.action.codeAction",v="editor.action.refactor",b="editor.action.sourceAction",y="editor.action.organizeImports",w="editor.action.fixAll";class C{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return m(this,void 0,void 0,(function*(){if((null===(t=this.provider)||void 0===t?void 0:t.resolveCodeAction)&&!this.action.edit){let t;try{t=yield this.provider.resolveCodeAction(this.action,e)}catch(e){(0,r.Cp)(e)}t&&(this.action.edit=t.edit)}return this}))}}class S extends s.JT{constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(S.codeActionsComparator),this.validActions=this.allActions.filter((({action:e})=>!e.disabled))}static codeActionsComparator({action:e},{action:t}){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:(0,n.Of)(e.diagnostics)?(0,n.Of)(t.diagnostics)?e.diagnostics[0].message.localeCompare(t.diagnostics[0].message):-1:(0,n.Of)(t.diagnostics)?1:0}get hasAutoFix(){return this.validActions.some((({action:e})=>!!e.kind&&g.yN.QuickFix.contains(new g.yN(e.kind))&&!!e.isPreferred))}}const x={actions:[],documentation:void 0};function k(e,t,i,o,a){var c;const u=i.filter||{},d={only:null===(c=u.include)||void 0===c?void 0:c.value,trigger:i.type},f=new l.YQ(e,a),p=function(e,t){return h.H9.all(e).filter((e=>!e.providedCodeActionKinds||e.providedCodeActionKinds.some((e=>(0,g.EU)(t,new g.yN(e))))))}(e,u),_=new s.SL,v=p.map((i=>m(this,void 0,void 0,(function*(){try{o.report(i);const n=yield i.provideCodeActions(e,t,d,f.token);if(n&&_.add(n),f.token.isCancellationRequested)return x;const r=((null==n?void 0:n.actions)||[]).filter((e=>e&&(0,g.Yl)(u,e))),s=function(e,t,i){if(!e.documentation)return;const n=e.documentation.map((e=>({kind:new g.yN(e.kind),command:e.command})));if(i){let e;for(const t of n)t.kind.contains(i)&&(e?e.kind.contains(t.kind)&&(e=t):e=t);if(e)return null==e?void 0:e.command}for(const e of t)if(e.kind)for(const t of n)if(t.kind.contains(new g.yN(e.kind)))return t.command}(i,r,u.include);return{actions:r.map((e=>new C(e,i))),documentation:s}}catch(e){if((0,r.VV)(e))throw e;return(0,r.Cp)(e),x}})))),b=h.H9.onDidChange((()=>{const t=h.H9.all(e);(0,n.fS)(t,p)||f.cancel()}));return Promise.all(v).then((e=>{const t=(0,n.xH)(e.map((e=>e.actions))),i=(0,n.kX)(e.map((e=>e.documentation)));return new S(t,i,_)})).finally((()=>{b.dispose(),f.dispose()}))}p.P.registerCommand("_executeCodeActionProvider",(function(e,t,i,n,s){return m(this,void 0,void 0,(function*(){if(!(t instanceof a.o))throw(0,r.b1)();const l=e.get(d.q).getModel(t);if(!l)throw(0,r.b1)();const h=u.Y.isISelection(i)?u.Y.liftSelection(i):c.e.isIRange(i)?l.validateRange(i):void 0;if(!h)throw(0,r.b1)();const p="string"==typeof n?new g.yN(n):void 0,m=yield k(l,h,{type:1,filter:{includeSourceActions:!0,include:p}},f.E.None,o.T.None),_=[],v=Math.min(m.validActions.length,"number"==typeof s?s:0);for(let e=0;ee.action))}finally{setTimeout((()=>m.dispose()),100)}}))}))},3674:(e,t,i)=>{"use strict";i.d(t,{S5:()=>pe,dW:()=>ue,Hv:()=>fe,o$:()=>ge,E7:()=>ce,pY:()=>se,Eb:()=>he,VQ:()=>de});var n=i(1050);class o{constructor(e){this.executor=e,this._didRun=!1}getValue(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}var r=i(5976),s=i(7295),a=i(6830),l=i(6007),c=i(9102),u=i(1907),h=i(7301),d=i(2276),g=i(2065),f=i(5321),p=i(4741),m=i(187),_=i(4101),v=i(9532),b=i(5606),y=i(1847),w=function(e,t){return function(i,n){t(i,n,e)}};class C extends p.aU{constructor(e,t){super(e.command?e.command.id:e.title,e.title.replace(/\r\n|\r|\n/g," "),void 0,!e.disabled,t),this.action=e}}let S=class extends r.JT{constructor(e,t,i,n){super(),this._editor=e,this._delegate=t,this._contextMenuService=i,this._visible=!1,this._showingActions=this._register(new r.XK),this._keybindingResolver=new x({getKeybindings:()=>n.getKeybindings()})}get isVisible(){return this._visible}show(e,t,i,n){return o=this,r=void 0,a=function*(){const o=n.includeDisabledActions?t.allActions:t.validActions;if(!o.length)return void(this._visible=!1);if(!this._editor.getDomNode())throw this._visible=!1,(0,h.F0)();this._visible=!0,this._showingActions.value=t;const r=this.getMenuActions(e,o,t.documentation),s=m.L.isIPosition(i)?this._toCoords(i):i||{x:0,y:0},a=this._keybindingResolver.getResolver(),l=this._editor.getOption(112);this._contextMenuService.showContextMenu({domForShadowRoot:l?this._editor.getDomNode():void 0,getAnchor:()=>s,getActions:()=>r,onHide:()=>{this._visible=!1,this._editor.focus()},autoSelectFirstItem:!0,getKeyBinding:e=>e instanceof C?a(e.action):void 0})},new((s=void 0)||(s=Promise))((function(e,t){function i(e){try{l(a.next(e))}catch(e){t(e)}}function n(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var o;t.done?e(t.value):(o=t.value,o instanceof s?o:new s((function(e){e(o)}))).then(i,n)}l((a=a.apply(o,r||[])).next())}));var o,r,s,a}getMenuActions(e,t,i){var n,o;const r=e=>new C(e.action,(()=>this._delegate.onSelectCodeAction(e))),s=t.map(r),a=[...i],l=this._editor.getModel();if(l&&s.length)for(const i of _.H9.all(l))i._getAdditionalMenuItems&&a.push(...i._getAdditionalMenuItems({trigger:e.type,only:null===(o=null===(n=e.filter)||void 0===n?void 0:n.include)||void 0===o?void 0:o.value},t.map((e=>e.action))));return a.length&&s.push(new p.Z0,...a.map((e=>r(new u.bA({title:e.title,command:e},void 0))))),s}_toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),i=(0,f.i)(this._editor.getDomNode());return{x:i.left+t.left,y:i.top+t.top+t.height}}};S=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([w(2,b.i),w(3,y.d)],S);class x{constructor(e){this._keybindingProvider=e}getResolver(){const e=new o((()=>this._keybindingProvider.getKeybindings().filter((e=>x.codeActionCommands.indexOf(e.command)>=0)).filter((e=>e.resolvedKeybinding)).map((e=>{let t=e.commandArgs;return e.command===u.uH?t={kind:v.yN.SourceOrganizeImports.value}:e.command===u.TM&&(t={kind:v.yN.SourceFixAll.value}),Object.assign({resolvedKeybinding:e.resolvedKeybinding},v.wZ.fromUser(t,{kind:v.yN.None,apply:"never"}))}))));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.getValue());return null==i?void 0:i.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new v.yN(e.kind);return t.filter((e=>e.kind.contains(i))).filter((t=>!t.preferred||e.isPreferred)).reduceRight(((e,t)=>e?e.kind.contains(t.kind)?t:e:t),void 0)}}x.codeActionCommands=[u.Bb,u.RB,u.MN,u.uH,u.TM];var k,D=i(7974),L=i(4669),N=i(3411),E=i(3580),A=i(7781),M=i(3910),I=i(553),T=i(3046);!function(e){e.Hidden={type:0},e.Showing=class{constructor(e,t,i,n){this.actions=e,this.trigger=t,this.editorPosition=i,this.widgetPosition=n,this.type=1}}}(k||(k={}));let R=class e extends r.JT{constructor(e,t,i,n){super(),this._editor=e,this._quickFixActionId=t,this._preferredFixActionId=i,this._keybindingService=n,this._onClick=this._register(new L.Q5),this.onClick=this._onClick.event,this._state=k.Hidden,this._domNode=document.createElement("div"),this._domNode.className=T.lA.lightBulb.classNames,this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent((e=>{const t=this._editor.getModel();(1!==this.state.type||!t||this.state.editorPosition.lineNumber>=t.getLineCount())&&this.hide()}))),I.o.ignoreTarget(this._domNode),this._register(f.Gw(this._domNode,(e=>{if(1!==this.state.type)return;this._editor.focus(),e.preventDefault();const{top:t,height:i}=f.i(this._domNode),n=this._editor.getOption(56);let o=Math.floor(n/3);null!==this.state.widgetPosition.position&&this.state.widgetPosition.position.lineNumber{if(1!=(1&e.buttons))return;this.hide();const t=new D.Z;t.startMonitoring(e.target,e.buttons,D.e,(()=>{}),(()=>{t.dispose()}))}))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(54)&&!this._editor.getOption(54).enabled&&this.hide()}))),this._updateLightBulbTitleAndIcon(),this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon,this))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return 1===this._state.type?this._state.widgetPosition:null}update(t,i,n){if(t.validActions.length<=0)return this.hide();const o=this._editor.getOptions();if(!o.get(54).enabled)return this.hide();const r=this._editor.getModel();if(!r)return this.hide();const{lineNumber:s,column:a}=r.validatePosition(n),l=r.getOptions().tabSize,c=o.get(40),u=r.getLineContent(s),h=N.yO.computeIndentLevel(u,l),d=e=>e>2&&this._editor.getTopForLineNumber(e)===this._editor.getTopForLineNumber(e-1);let g=s;if(!(c.spaceWidth*h>22))if(s>1&&!d(s-1))g-=1;else if(d(s+1)){if(a*c.spaceWidth<22)return this.hide()}else g+=1;this.state=new k.Showing(t,i,n,{position:{lineNumber:g,column:1},preference:e._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state=k.Hidden,this._editor.layoutContentWidget(this)}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(1===this.state.type&&this.state.actions.hasAutoFix){this._domNode.classList.remove(...T.lA.lightBulb.classNamesArray),this._domNode.classList.add(...T.lA.lightbulbAutofix.classNamesArray);const e=this._keybindingService.lookupKeybinding(this._preferredFixActionId);if(e)return void(this.title=E.N("prefferedQuickFixWithKb","Show Fixes. Preferred Fix Available ({0})",e.getLabel()))}this._domNode.classList.remove(...T.lA.lightbulbAutofix.classNamesArray),this._domNode.classList.add(...T.lA.lightBulb.classNamesArray);const e=this._keybindingService.lookupKeybinding(this._quickFixActionId);this.title=e?E.N("quickFixWithKb","Show Fixes ({0})",e.getLabel()):E.N("quickFix","Show Fixes")}set title(e){this._domNode.title=e}};var O,F;R._posPref=[0],R=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(O=3,F=y.d,function(e,t){F(e,t,O)})],R),(0,A.Ic)(((e,t)=>{var i;const n=null===(i=e.getColor(M.cv))||void 0===i?void 0:i.transparent(.7),o=e.getColor(M.Fu);o&&t.addRule(`\n\t\t.monaco-editor .contentWidgets ${T.lA.lightBulb.cssSelector} {\n\t\t\tcolor: ${o};\n\t\t\tbackground-color: ${n};\n\t\t}`);const r=e.getColor(M.sK);r&&t.addRule(`\n\t\t.monaco-editor .contentWidgets ${T.lA.lightbulbAutofix.cssSelector} {\n\t\t\tcolor: ${r};\n\t\t\tbackground-color: ${n};\n\t\t}`)}));var P,B=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};let z=class extends r.JT{constructor(e,t,i,n,s){super(),this._editor=e,this.delegate=n,this._activeCodeActions=this._register(new r.XK),P.set(this,!1),this._codeActionWidget=new o((()=>this._register(s.createInstance(S,this._editor,{onSelectCodeAction:e=>B(this,void 0,void 0,(function*(){this.delegate.applyCodeAction(e,!0)}))})))),this._lightBulbWidget=new o((()=>{const e=this._register(s.createInstance(R,this._editor,t,i));return this._register(e.onClick((e=>this.showCodeActionList(e.trigger,e.actions,e,{includeDisabledActions:!1})))),e}))}dispose(){(function(e,t,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?o.call(e,i):o?o.value=i:t.set(e,i)})(this,P,!0,"f"),super.dispose()}update(e){var t,i,n;return B(this,void 0,void 0,(function*(){if(1!==e.type)return void(null===(t=this._lightBulbWidget.rawValue)||void 0===t||t.hide());let o;try{o=yield e.actions}catch(e){return void(0,h.dL)(e)}if(!function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)}(this,P,"f"))if(this._lightBulbWidget.getValue().update(o,e.trigger,e.position),1===e.trigger.type){if(null===(i=e.trigger.filter)||void 0===i?void 0:i.include){const t=this.tryGetValidActionToApply(e.trigger,o);if(t){try{yield this.delegate.applyCodeAction(t,!1)}finally{o.dispose()}return}if(e.trigger.context){const t=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,o);if(t&&t.action.disabled)return d.O.get(this._editor).showMessage(t.action.disabled,e.trigger.context.position),void o.dispose()}}const t=!!(null===(n=e.trigger.filter)||void 0===n?void 0:n.include);if(e.trigger.context&&(!o.allActions.length||!t&&!o.validActions.length))return d.O.get(this._editor).showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=o,void o.dispose();this._activeCodeActions.value=o,this._codeActionWidget.getValue().show(e.trigger,o,e.position,{includeDisabledActions:t})}else this._codeActionWidget.getValue().isVisible?o.dispose():this._activeCodeActions.value=o}))}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length)return"first"===e.autoApply&&0===t.validActions.length||"ifSingle"===e.autoApply&&1===t.allActions.length?t.allActions.find((({action:e})=>e.disabled)):void 0}tryGetValidActionToApply(e,t){if(t.validActions.length)return"first"===e.autoApply&&t.validActions.length>0||"ifSingle"===e.autoApply&&1===t.validActions.length?t.validActions[0]:void 0}showCodeActionList(e,t,i,n){return B(this,void 0,void 0,(function*(){this._codeActionWidget.getValue().show(e,t,i,n)}))}};P=new WeakMap,z=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([function(e,t){return function(i,n){t(i,n,e)}}(4,g.TG)],z);var W,V=i(4565),H=i(8819),$=i(8674),U=i(9422),j=i(535),q=i(829),K=i(5393),G=i(5935),Y=i(4314),Z=function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)};const X=new H.uy("supportedCodeAction","");class Q extends r.JT{constructor(e,t,i,n=250){super(),this._editor=e,this._markerService=t,this._signalChange=i,this._delay=n,this._autoTriggerTimer=this._register(new K._F),this._register(this._markerService.onMarkerChanged((e=>this._onMarkerChanges(e)))),this._register(this._editor.onDidChangeCursorPosition((()=>this._onCursorChange())))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);return this._createEventAndSignalChange(e,t)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some((e=>(0,G.Xy)(e,t.uri)))&&this._autoTriggerTimer.cancelAndSet((()=>{this.trigger({type:2})}),this._delay)}_onCursorChange(){this._autoTriggerTimer.cancelAndSet((()=>{this.trigger({type:2})}),this._delay)}_getRangeOfMarker(e){const t=this._editor.getModel();if(t)for(const i of this._markerService.read({resource:t.uri})){const n=t.validateRange(i);if(Y.e.intersectRanges(n,e))return Y.e.lift(n)}}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=this._editor.getSelection();if(i.isEmpty()&&2===e.type){const{lineNumber:e,column:n}=i.getPosition(),o=t.getLineContent(e);if(0===o.length)return;if(1===n){if(/\s/.test(o[0]))return}else if(n===t.getLineMaxColumn(e)){if(/\s/.test(o[o.length-1]))return}else if(/\s/.test(o[n-2])&&/\s/.test(o[n-1]))return}return i}_createEventAndSignalChange(e,t){const i=this._editor.getModel();if(!t||!i)return void this._signalChange(void 0);const n=this._getRangeOfMarker(t),o=n?n.getStartPosition():t.getStartPosition(),r={trigger:e,selection:t,position:o};return this._signalChange(r),r}}var J;!function(e){e.Empty={type:0},e.Triggered=class{constructor(e,t,i,n){this.trigger=e,this.rangeOrSelection=t,this.position=i,this._cancellablePromise=n,this.type=1,this.actions=n.catch((e=>{if((0,h.VV)(e))return ee;throw e}))}cancel(){this._cancellablePromise.cancel()}}}(J||(J={}));const ee={allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1};class te extends r.JT{constructor(e,t,i,n){super(),this._editor=e,this._markerService=t,this._progressService=n,this._codeActionOracle=this._register(new r.XK),this._state=J.Empty,this._onDidChangeState=this._register(new L.Q5),this.onDidChangeState=this._onDidChangeState.event,W.set(this,!1),this._supportedCodeActions=X.bindTo(i),this._register(this._editor.onDidChangeModel((()=>this._update()))),this._register(this._editor.onDidChangeModelLanguage((()=>this._update()))),this._register(_.H9.onDidChange((()=>this._update()))),this._update()}dispose(){Z(this,W,"f")||(function(e,t,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?o.call(e,i):o?o.value=i:t.set(e,i)}(this,W,!0,"f"),super.dispose(),this.setState(J.Empty,!0))}_update(){if(Z(this,W,"f"))return;this._codeActionOracle.value=void 0,this.setState(J.Empty);const e=this._editor.getModel();if(e&&_.H9.has(e)&&!this._editor.getOption(78)){const t=[];for(const i of _.H9.all(e))Array.isArray(i.providedCodeActionKinds)&&t.push(...i.providedCodeActionKinds);this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new Q(this._editor,this._markerService,(t=>{var i;if(!t)return void this.setState(J.Empty);const n=(0,K.PG)((i=>(0,u.aI)(e,t.selection,t.trigger,j.E.None,i)));1===t.trigger.type&&(null===(i=this._progressService)||void 0===i||i.showWhile(n,250)),this.setState(new J.Triggered(t.trigger,t.selection,t.position,n))}),void 0),this._codeActionOracle.value.trigger({type:2})}else this._supportedCodeActions.reset()}trigger(e){this._codeActionOracle.value&&this._codeActionOracle.value.trigger(e)}setState(e,t){e!==this._state&&(1===this._state.type&&this._state.cancel(),this._state=e,t||Z(this,W,"f")||this._onDidChangeState.fire(e))}}W=new WeakMap;var ie=function(e,t){return function(i,n){t(i,n,e)}},ne=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function oe(e){return H.Ao.regex(X.keys()[0],new RegExp("(\\s|^)"+(0,s.ec)(e.value)+"\\b"))}const re={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:E.N("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:E.N("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[E.N("args.schema.apply.first","Always apply the first returned code action."),E.N("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),E.N("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:E.N("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};let se=class e extends r.JT{constructor(e,t,i,n,r){super(),this._instantiationService=r,this._editor=e,this._model=this._register(new te(this._editor,t,i,n)),this._register(this._model.onDidChangeState((e=>this.update(e)))),this._ui=new o((()=>this._register(new z(e,ce.Id,pe.Id,{applyCodeAction:(e,t)=>ne(this,void 0,void 0,(function*(){try{yield this._applyCodeAction(e)}finally{t&&this._trigger({type:2,filter:{}})}}))},this._instantiationService))))}static get(t){return t.getContribution(e.ID)}update(e){this._ui.getValue().update(e)}showCodeActions(e,t,i){return this._ui.getValue().showCodeActionList(e,t,i,{includeDisabledActions:!1})}manualTriggerAtCurrentPosition(e,t,i){if(!this._editor.hasModel())return;d.O.get(this._editor).closeMessage();const n=this._editor.getPosition();this._trigger({type:1,filter:t,autoApply:i,context:{notAvailableMessage:e,position:n}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e){return this._instantiationService.invokeFunction(ae,e,this._editor)}};function ae(e,t,i){return ne(this,void 0,void 0,(function*(){const o=e.get(l.vu),r=e.get(V.H),s=e.get(q.b),a=e.get(U.lT);if(s.publicLog2("codeAction.applyCodeAction",{codeActionTitle:t.action.title,codeActionKind:t.action.kind,codeActionIsPreferred:!!t.action.isPreferred}),yield t.resolve(n.T.None),t.action.edit&&(yield o.apply(l.fo.convert(t.action.edit),{editor:i,label:t.action.title})),t.action.command)try{yield r.executeCommand(t.action.command.id,...t.action.command.arguments||[])}catch(e){const t=function(e){return"string"==typeof e?e:e instanceof Error&&"string"==typeof e.message?e.message:void 0}(e);a.error("string"==typeof t?t:E.N("applyCodeActionFailed","An unknown error occurred while applying the code action"))}}))}function le(e,t,i,n){if(e.hasModel()){const o=se.get(e);o&&o.manualTriggerAtCurrentPosition(t,i,n)}}se.ID="editor.contrib.quickFixController",se=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([ie(1,$.lT),ie(2,H.i6),ie(3,j.e),ie(4,g.TG)],se);class ce extends a.R6{constructor(){super({id:ce.Id,label:E.N("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:H.Ao.and(c.u.writable,c.u.hasCodeActionsProvider),kbOpts:{kbExpr:c.u.editorTextFocus,primary:2132,weight:100}})}run(e,t){return le(t,E.N("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0)}}ce.Id="editor.action.quickFix";class ue extends a._l{constructor(){super({id:u.RB,precondition:H.Ao.and(c.u.writable,c.u.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:re}]}})}runEditorCommand(e,t,i){const n=v.wZ.fromUser(i,{kind:v.yN.Empty,apply:"ifSingle"});return le(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?E.N("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",i.kind):E.N("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",i.kind):n.preferred?E.N("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):E.N("editor.action.codeAction.noneMessage","No code actions available"),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}class he extends a.R6{constructor(){super({id:u.Bb,label:E.N("refactor.label","Refactor..."),alias:"Refactor...",precondition:H.Ao.and(c.u.writable,c.u.hasCodeActionsProvider),kbOpts:{kbExpr:c.u.editorTextFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:H.Ao.and(c.u.writable,oe(v.yN.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:re}]}})}run(e,t,i){const n=v.wZ.fromUser(i,{kind:v.yN.Refactor,apply:"never"});return le(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?E.N("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",i.kind):E.N("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",i.kind):n.preferred?E.N("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):E.N("editor.action.refactor.noneMessage","No refactorings available"),{include:v.yN.Refactor.contains(n.kind)?n.kind:v.yN.None,onlyIncludePreferredActions:n.preferred},n.apply)}}class de extends a.R6{constructor(){super({id:u.MN,label:E.N("source.label","Source Action..."),alias:"Source Action...",precondition:H.Ao.and(c.u.writable,c.u.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:H.Ao.and(c.u.writable,oe(v.yN.Source))},description:{description:"Source Action...",args:[{name:"args",schema:re}]}})}run(e,t,i){const n=v.wZ.fromUser(i,{kind:v.yN.Source,apply:"never"});return le(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?E.N("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",i.kind):E.N("editor.action.source.noneMessage.kind","No source actions for '{0}' available",i.kind):n.preferred?E.N("editor.action.source.noneMessage.preferred","No preferred source actions available"):E.N("editor.action.source.noneMessage","No source actions available"),{include:v.yN.Source.contains(n.kind)?n.kind:v.yN.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}class ge extends a.R6{constructor(){super({id:u.uH,label:E.N("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:H.Ao.and(c.u.writable,oe(v.yN.SourceOrganizeImports)),kbOpts:{kbExpr:c.u.editorTextFocus,primary:1581,weight:100}})}run(e,t){return le(t,E.N("editor.action.organize.noneMessage","No organize imports action available"),{include:v.yN.SourceOrganizeImports,includeSourceActions:!0},"ifSingle")}}class fe extends a.R6{constructor(){super({id:u.TM,label:E.N("fixAll.label","Fix All"),alias:"Fix All",precondition:H.Ao.and(c.u.writable,oe(v.yN.SourceFixAll))})}run(e,t){return le(t,E.N("fixAll.noneMessage","No fix all action available"),{include:v.yN.SourceFixAll,includeSourceActions:!0},"ifSingle")}}class pe extends a.R6{constructor(){super({id:pe.Id,label:E.N("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:H.Ao.and(c.u.writable,oe(v.yN.QuickFix)),kbOpts:{kbExpr:c.u.editorTextFocus,primary:1620,mac:{primary:2644},weight:100}})}run(e,t){return le(t,E.N("editor.action.autoFix.noneMessage","No auto fixes available"),{include:v.yN.QuickFix,onlyIncludePreferredActions:!0},"ifSingle")}}pe.Id="editor.action.autoFix"},9093:(e,t,i)=>{"use strict";i.r(t);var n=i(6830),o=i(3674);(0,n._K)(o.pY.ID,o.pY),(0,n.Qr)(o.E7),(0,n.Qr)(o.Eb),(0,n.Qr)(o.VQ),(0,n.Qr)(o.o$),(0,n.Qr)(o.S5),(0,n.Qr)(o.Hv),(0,n.fK)(new o.dW)},9532:(e,t,i)=>{"use strict";i.d(t,{yN:()=>n,EU:()=>o,Yl:()=>r,wZ:()=>a});class n{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||""===this.value||e.value.startsWith(this.value+n.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new n(this.value+n.sep+e)}}function o(e,t){return!(e.include&&!e.include.intersects(t)||e.excludes&&e.excludes.some((i=>s(t,i,e.include)))||!e.includeSourceActions&&n.Source.contains(t))}function r(e,t){const i=t.kind?new n(t.kind):void 0;return!(!(!e.include||i&&e.include.contains(i))||e.excludes&&i&&e.excludes.some((t=>s(i,t,e.include)))||!e.includeSourceActions&&i&&n.Source.contains(i)||e.onlyIncludePreferredActions&&!t.isPreferred)}function s(e,t,i){return!(!t.contains(e)||i&&t.contains(i))}n.sep=".",n.None=new n("@@none@@"),n.Empty=new n(""),n.QuickFix=new n("quickfix"),n.Refactor=new n("refactor"),n.Source=new n("source"),n.SourceOrganizeImports=n.Source.append("organizeImports"),n.SourceFixAll=n.Source.append("fixAll");class a{constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}static fromUser(e,t){return e&&"object"==typeof e?new a(a.getKindFromUser(e,t.kind),a.getApplyFromUser(e,t.apply),a.getPreferredUser(e)):new a(t.kind,t.apply,!1)}static getApplyFromUser(e,t){switch("string"==typeof e.apply?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return"string"==typeof e.kind?new n(e.kind):t}static getPreferredUser(e){return"boolean"==typeof e.preferred&&e.preferred}}},3832:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CodeLensContribution:()=>j});var n=i(5393),o=i(7301),r=i(5976),s=i(9925),a=i(6830),l=i(4101),c=i(1050),u=i(666),h=i(1200),d=i(4565),g=i(8401),f=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class p{constructor(){this.lenses=[],this._disposables=new r.SL}dispose(){this._disposables.dispose()}add(e,t){this._disposables.add(e);for(const i of e.lenses)this.lenses.push({symbol:i,provider:t})}}function m(e,t){return f(this,void 0,void 0,(function*(){const i=l.He.ordered(e),n=new Map,r=new p,s=i.map(((i,s)=>f(this,void 0,void 0,(function*(){n.set(i,s);try{const n=yield Promise.resolve(i.provideCodeLenses(e,t));n&&r.add(n,i)}catch(e){(0,o.Cp)(e)}}))));return yield Promise.all(s),r.lenses=r.lenses.sort(((e,t)=>e.symbol.range.startLineNumbert.symbol.range.startLineNumber?1:n.get(e.provider)n.get(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn?1:0)),r}))}d.P.registerCommand("_executeCodeLensProvider",(function(e,...t){let[i,n]=t;(0,g.p_)(u.o.isUri(i)),(0,g.p_)("number"==typeof n||!n);const s=e.get(h.q).getModel(i);if(!s)throw(0,o.b1)();const a=[],l=new r.SL;return m(s,c.T.None).then((e=>{l.add(e);let t=[];for(const i of e.lenses)null==n||Boolean(i.symbol.command)?a.push(i.symbol):n-- >0&&i.provider.resolveCodeLens&&t.push(Promise.resolve(i.provider.resolveCodeLens(s,i.symbol,c.T.None)).then((e=>a.push(e||i.symbol))));return Promise.all(t)})).then((()=>a)).finally((()=>{setTimeout((()=>l.dispose()),100)}))}));var _=i(5321),v=i(4314),b=i(3411),y=i(7869),w=i(3910),C=i(7781),S=i(6811);class x{constructor(e,t,i){this.afterLineNumber=e,this.heightInPx=t,this._onHeight=i,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){void 0===this._lastHeight?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}}class k{constructor(e,t,i){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id="codelens.widget-"+k._idPool++,this.updatePosition(i),this._domNode=document.createElement("span"),this._domNode.className=`codelens-decoration ${t}`}withCommands(e,t){this._commands.clear();let i=[],n=!1;for(let t=0;t{e.symbol.command&&l.push(e.symbol),n.addDecoration({range:e.symbol.range,options:b.qx.EMPTY},(e=>this._decorationIds[t]=e)),a=a?v.e.plusRange(a,e.symbol.range):v.e.lift(e.symbol.range)})),this._viewZone=new x(a.startLineNumber-1,r,s),this._viewZoneId=o.addZone(this._viewZone),l.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new k(this._editor,this._className,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t&&t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some(((e,t)=>{const i=this._editor.getModel().getDecorationRange(e),n=this._data[t].symbol;return!(!i||v.e.isEmpty(n.range)!==i.isEmpty())}))}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach(((e,i)=>{t.addDecoration({range:e.symbol.range,options:b.qx.EMPTY},(e=>this._decorationIds[i]=e))}))}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.domNode.hasAttribute("monaco-visible-view-zone"))return null;for(let t=0;t{const i=e.getColor(y.Yp);i&&(t.addRule(`.monaco-editor .codelens-decoration { color: ${i}; }`),t.addRule(`.monaco-editor .codelens-decoration .codicon { color: ${i}; }`));const n=e.getColor(w._Y);n&&(t.addRule(`.monaco-editor .codelens-decoration > a:hover { color: ${n} !important; }`),t.addRule(`.monaco-editor .codelens-decoration > a:hover .codicon { color: ${n} !important; }`))}));var N=i(9422),E=i(2065),A=i(5026),M=i(3702),I=i(6904),T=i(8289);const R=(0,E.yh)("ICodeLensCache");class O{constructor(e,t){this.lineCount=e,this.data=t}}let F=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new M.z6(20,.75),(0,n.To)((()=>e.remove("codelens/cache",1)));const t="codelens/cache2",i=e.get(t,1,"{}");this._deserialize(i),(0,T.I)(e.onWillSaveState)((i=>{i.reason===I.fk.SHUTDOWN&&e.store(t,this._serialize(),1,1)}))}put(e,t){const i=t.lenses.map((e=>{var t;return{range:e.symbol.range,command:e.symbol.command&&{id:"",title:null===(t=e.symbol.command)||void 0===t?void 0:t.title}}})),n=new p;n.add({lenses:i,dispose:()=>{}},this._fakeProvider);const o=new O(e.getLineCount(),n);this._cache.set(e.uri.toString(),o)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,i]of this._cache){const n=new Set;for(const e of i.data.lenses)n.add(e.symbol.range.startLineNumber);e[t]={lineCount:i.lineCount,lines:[...n.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const e in t){const i=t[e],n=[];for(const e of i.lines)n.push({range:new v.e(e,1,e,11)});const o=new p;o.add({lenses:n,dispose(){}},this._fakeProvider),this._cache.set(e,new O(i.lineCount,o))}}catch(e){}}};var P,B;F=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(P=0,B=I.Uy,function(e,t){B(e,t,P)})],F),(0,A.z)(R,F);var z=i(9954),W=i(1157),V=i(3580),H=i(9102),$=i(1036),U=function(e,t){return function(i,n){t(i,n,e)}};let j=class{constructor(e,t,i,o){this._editor=e,this._commandService=t,this._notificationService=i,this._codeLensCache=o,this._disposables=new r.SL,this._localToDispose=new r.SL,this._lenses=[],this._getCodeLensModelDelays=new $.Y(l.He,250,2500),this._oldCodeLensModels=new r.SL,this._resolveCodeLensesDelays=new $.Y(l.He,250,2500),this._resolveCodeLensesScheduler=new n.pY((()=>this._resolveCodeLensesInViewport()),this._resolveCodeLensesDelays.min),this._disposables.add(this._editor.onDidChangeModel((()=>this._onModelChange()))),this._disposables.add(this._editor.onDidChangeModelLanguage((()=>this._onModelChange()))),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(40)||e.hasChanged(14)||e.hasChanged(13))&&this._updateLensStyle(),e.hasChanged(12)&&this._onModelChange()}))),this._disposables.add(l.He.onDidChange(this._onModelChange,this)),this._onModelChange(),this._styleClassName="_"+(0,z.vp)(this._editor.getId()).toString(16),this._styleElement=_.dS(_.OO(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),null===(e=this._currentCodeLensModel)||void 0===e||e.dispose(),this._styleElement.remove()}_getLayoutInfo(){let e,t=this._editor.getOption(14);return!t||t<5?(t=.9*this._editor.getOption(42)|0,e=this._editor.getOption(56)):e=t*Math.max(1.3,this._editor.getOption(56)/this._editor.getOption(42))|0,{codeLensHeight:e,fontSize:t}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(13),n=this._editor.getOption(40),o=`--codelens-font-family${this._styleClassName}`,r=`--codelens-font-features${this._styleClassName}`;let s=`\n\t\t.monaco-editor .codelens-decoration.${this._styleClassName} { line-height: ${e}px; font-size: ${t}px; padding-right: ${Math.round(.5*t)}px; font-feature-settings: var(${r}) }\n\t\t.monaco-editor .codelens-decoration.${this._styleClassName} span.codicon { line-height: ${e}px; font-size: ${t}px; }\n\t\t`;i&&(s+=`.monaco-editor .codelens-decoration.${this._styleClassName} { font-family: var(${o})}`),this._styleElement.textContent=s,this._editor.getContainerDomNode().style.setProperty(o,null!=i?i:"inherit"),this._editor.getContainerDomNode().style.setProperty(r,n.fontFeatureSettings),this._editor.changeViewZones((t=>{for(let i of this._lenses)i.updateHeight(e,t)}))}_localDispose(){var e,t,i;null===(e=this._getCodeLensModelPromise)||void 0===e||e.cancel(),this._getCodeLensModelPromise=void 0,null===(t=this._resolveCodeLensesPromise)||void 0===t||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),null===(i=this._currentCodeLensModel)||void 0===i||i.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e)return;if(!this._editor.getOption(12))return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!l.He.has(e))return void(t&&this._localToDispose.add((0,n.Vg)((()=>{const i=this._codeLensCache.get(e);t===i&&(this._codeLensCache.delete(e),this._onModelChange())}),3e4)));for(const t of l.He.all(e))if("function"==typeof t.onDidChange){let e=t.onDidChange((()=>i.schedule()));this._localToDispose.add(e)}const i=new n.pY((()=>{var t;const r=Date.now();null===(t=this._getCodeLensModelPromise)||void 0===t||t.cancel(),this._getCodeLensModelPromise=(0,n.PG)((t=>m(e,t))),this._getCodeLensModelPromise.then((t=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=t,this._codeLensCache.put(e,t);const n=this._getCodeLensModelDelays.update(e,Date.now()-r);i.delay=n,this._renderCodeLensSymbols(t),this._resolveCodeLensesInViewport()}),o.dL)}),this._getCodeLensModelDelays.get(e));this._localToDispose.add(i),this._localToDispose.add((0,r.OF)((()=>this._resolveCodeLensesScheduler.cancel()))),this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{let i=[],n=-1;this._lenses.forEach((e=>{e.isValid()&&n!==e.getLineNumber()?(e.update(t),n=e.getLineNumber()):i.push(e)}));let o=new D;i.forEach((e=>{e.dispose(o,t),this._lenses.splice(this._lenses.indexOf(e),1)})),o.commit(e)}))})),i.schedule()}))),this._localToDispose.add(this._editor.onDidFocusEditorWidget((()=>{i.schedule()}))),this._localToDispose.add(this._editor.onDidScrollChange((e=>{e.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add(this._editor.onDidLayoutChange((()=>{this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add((0,r.OF)((()=>{if(this._editor.getModel()){const e=s.ZF.capture(this._editor);this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{this._disposeAllLenses(e,t)}))})),e.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)}))),this._localToDispose.add(this._editor.onMouseDown((e=>{if(9!==e.target.type)return;let t=e.target.element;if("SPAN"===(null==t?void 0:t.tagName)&&(t=t.parentElement),"A"===(null==t?void 0:t.tagName))for(const e of this._lenses){let i=e.getCommand(t);if(i){this._commandService.executeCommand(i.id,...i.arguments||[]).catch((e=>this._notificationService.error(e)));break}}}))),i.schedule()}_disposeAllLenses(e,t){const i=new D;for(const e of this._lenses)e.dispose(i,t);e&&i.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;let t,i=this._editor.getModel().getLineCount(),n=[];for(let o of e.lenses){let e=o.symbol.range.startLineNumber;e<1||e>i||(t&&t[t.length-1].symbol.range.startLineNumber===e?t.push(o):(t=[o],n.push(t)))}const o=s.ZF.capture(this._editor),r=this._getLayoutInfo();this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{const i=new D;let o=0,s=0;for(;sthis._resolveCodeLensesInViewportSoon()))),o++,s++)}for(;othis._resolveCodeLensesInViewportSoon()))),s++;i.commit(e)}))})),o.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;null===(e=this._resolveCodeLensesPromise)||void 0===e||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const i=[],r=[];if(this._lenses.forEach((e=>{const n=e.computeIfNecessary(t);n&&(i.push(n),r.push(e))})),0===i.length)return;const s=Date.now(),a=(0,n.PG)((e=>{const n=i.map(((i,n)=>{const s=new Array(i.length),a=i.map(((i,n)=>i.symbol.command||"function"!=typeof i.provider.resolveCodeLens?(s[n]=i.symbol,Promise.resolve(void 0)):Promise.resolve(i.provider.resolveCodeLens(t,i.symbol,e)).then((e=>{s[n]=e}),o.Cp)));return Promise.all(a).then((()=>{e.isCancellationRequested||r[n].isDisposed()||r[n].updateCommands(s)}))}));return Promise.all(n)}));this._resolveCodeLensesPromise=a,this._resolveCodeLensesPromise.then((()=>{const e=this._resolveCodeLensesDelays.update(t,Date.now()-s);this._resolveCodeLensesScheduler.delay=e,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),a===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}),(e=>{(0,o.dL)(e),a===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}))}getLenses(){return this._lenses}};j.ID="css.editor.codeLens",j=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([U(1,d.H),U(2,N.lT),U(3,R)],j),(0,a._K)(j.ID,j),(0,a.Qr)(class extends a.R6{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:H.u.hasCodeLensProvider,label:(0,V.N)("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return i=this,n=void 0,r=function*(){if(!t.hasModel())return;const i=e.get(W.eJ),n=e.get(d.H),o=e.get(N.lT),r=t.getSelection().positionLineNumber,s=t.getContribution(j.ID),a=[];for(let e of s.getLenses())if(e.getLineNumber()===r)for(let t of e.getItems()){const{command:e}=t.symbol;e&&a.push({label:e.title,command:e})}if(0===a.length)return;const l=yield i.pick(a,{canPickMany:!1});if(l)try{yield n.executeCommand(l.command.id,...l.command.arguments||[])}catch(e){o.error(e)}},new((o=void 0)||(o=Promise))((function(e,t){function s(e){try{l(r.next(e))}catch(e){t(e)}}function a(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(s,a)}l((r=r.apply(i,n||[])).next())}));var i,n,o,r}})},3308:(e,t,i)=>{"use strict";i.d(t,{E:()=>u,R:()=>h});var n=i(1050),o=i(7301),r=i(666),s=i(4314),a=i(4101),l=i(1200),c=i(4565);function u(e,t){const i=[],n=a.OH.ordered(e).reverse().map((n=>Promise.resolve(n.provideDocumentColors(e,t)).then((e=>{if(Array.isArray(e))for(let t of e)i.push({colorInfo:t,provider:n})}))));return Promise.all(n).then((()=>i))}function h(e,t,i,n){return Promise.resolve(i.provideColorPresentations(e,t,n))}c.P.registerCommand("_executeDocumentColorProvider",(function(e,...t){const[i]=t;if(!(i instanceof r.o))throw(0,o.b1)();const s=e.get(l.q).getModel(i);if(!s)throw(0,o.b1)();const c=[],u=a.OH.ordered(s).reverse().map((e=>Promise.resolve(e.provideDocumentColors(s,n.T.None)).then((e=>{if(Array.isArray(e))for(let t of e)c.push({range:t.range,color:[t.color.red,t.color.green,t.color.blue,t.color.alpha]})}))));return Promise.all(u).then((()=>c))})),c.P.registerCommand("_executeColorPresentationProvider",(function(e,...t){const[i,c]=t,{uri:u,range:h}=c;if(!(u instanceof r.o&&Array.isArray(i)&&4===i.length&&s.e.isIRange(h)))throw(0,o.b1)();const[d,g,f,p]=i,m=e.get(l.q).getModel(u);if(!m)throw(0,o.b1)();const _={range:h,color:{red:d,green:g,blue:f,alpha:p}},v=[],b=a.OH.ordered(m).reverse().map((e=>Promise.resolve(e.provideColorPresentations(m,_,n.T.None)).then((e=>{Array.isArray(e)&&v.push(...e)}))));return Promise.all(b).then((()=>v))}))},7956:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ColorContribution:()=>a}),i(4494);var n=i(5976),o=i(6830),r=i(7043),s=i(4314);class a extends n.JT{constructor(e){super(),this._editor=e,this._register(e.onMouseDown((e=>this.onMouseDown(e))))}dispose(){super.dispose()}onMouseDown(e){var t;if(6!==e.target.type)return;if(![...(null===(t=e.target.element)||void 0===t?void 0:t.classList.values())||[]].find((e=>e.startsWith("ced-colorBox"))))return;if(!e.target.range)return;const i=this._editor.getContribution(r.ModesHoverController.ID);if(!i.isColorPickerVisible()){const t=new s.e(e.target.range.startLineNumber,e.target.range.startColumn+1,e.target.range.endLineNumber,e.target.range.endColumn+1);i.showContentHover(t,0,!1)}}}a.ID="editor.contrib.colorContribution",(0,o._K)(a.ID,a)},4494:(e,t,i)=>{"use strict";i.d(t,{i:()=>m});var n=i(5393),o=i(1264),r=i(7301),s=i(9954),a=i(5976),l=i(6830),c=i(1640),u=i(4314),h=i(3411),d=i(4101),g=i(3308),f=i(3108),p=function(e,t){return function(i,n){t(i,n,e)}};let m=class e extends a.JT{constructor(e,t,i){super(),this._editor=e,this._codeEditorService=t,this._configurationService=i,this._localToDispose=this._register(new a.SL),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=[],this._decorationsTypes=new Set,this._register(e.onDidChangeModel((()=>{this._isEnabled=this.isEnabled(),this.onModelChanged()}))),this._register(e.onDidChangeModelLanguage((()=>this.onModelChanged()))),this._register(d.OH.onDidChange((()=>this.onModelChanged()))),this._register(e.onDidChangeConfiguration((()=>{let e=this._isEnabled;this._isEnabled=this.isEnabled(),e!==this._isEnabled&&(this._isEnabled?this.onModelChanged():this.removeAllDecorations())}))),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageIdentifier(),i=this._configurationService.getValue(t.language);if(i){const e=i.colorDecorators;if(e&&void 0!==e.enable&&!e.enable)return e.enable}return this._editor.getOption(15)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}onModelChanged(){if(this.stop(),!this._isEnabled)return;const t=this._editor.getModel();t&&d.OH.has(t)&&(this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._timeoutTimer||(this._timeoutTimer=new n._F,this._timeoutTimer.cancelAndSet((()=>{this._timeoutTimer=null,this.beginCompute()}),e.RECOMPUTE_TIME))}))),this.beginCompute())}beginCompute(){this._computePromise=(0,n.PG)((e=>{const t=this._editor.getModel();return t?(0,g.E)(t,e):Promise.resolve([])})),this._computePromise.then((e=>{this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}),r.dL)}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map((e=>({range:{startLineNumber:e.colorInfo.range.startLineNumber,startColumn:e.colorInfo.range.startColumn,endLineNumber:e.colorInfo.range.endLineNumber,endColumn:e.colorInfo.range.endColumn},options:h.qx.EMPTY})));this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach(((t,i)=>this._colorDatas.set(t,e[i])))}updateColorDecorators(e){let t=[],i={};for(let n=0;n{i[e]||this._codeEditorService.removeDecorationType(e)})),this._colorDecoratorIds=this._editor.deltaDecorations(this._colorDecoratorIds,t)}removeAllDecorations(){this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,[]),this._colorDecoratorIds=this._editor.deltaDecorations(this._colorDecoratorIds,[]),this._decorationsTypes.forEach((e=>{this._codeEditorService.removeDecorationType(e)}))}getColorData(e){const t=this._editor.getModel();if(!t)return null;const i=t.getDecorationsInRange(u.e.fromPositions(e,e)).filter((e=>this._colorDatas.has(e.id)));return 0===i.length?null:this._colorDatas.get(i[0].id)}};m.ID="editor.contrib.colorDetector",m.RECOMPUTE_TIME=1e3,m=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([p(1,c.$),p(2,f.Ui)],m),(0,l._K)(m.ID,m)},9098:(e,t,i)=>{"use strict";i.r(t);var n=i(3580),o=i(2258),r=i(6830),s=i(4314),a=i(9102),l=i(9386),c=i(187),u=i(3860),h=i(3831);class d{constructor(e,t){this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,i){if(i<0)return!1;const n=t.length;if(i+n>e.length)return!1;for(let o=0;o=65&&n<=90&&n+32===r||r>=65&&r<=90&&r+32===n))return!1}return!0}_createOperationsForBlockComment(e,t,i,n,o,r){const a=e.startLineNumber,l=e.startColumn,c=e.endLineNumber,u=e.endColumn,h=o.getLineContent(a),g=o.getLineContent(c);let f,p=h.lastIndexOf(t,l-1+t.length),m=g.indexOf(i,u-1-i.length);if(-1!==p&&-1!==m)if(a===c)h.substring(p+t.length,m).indexOf(i)>=0&&(p=-1,m=-1);else{const e=h.substring(p+t.length),n=g.substring(0,m);(e.indexOf(i)>=0||n.indexOf(i)>=0)&&(p=-1,m=-1)}-1!==p&&-1!==m?(n&&p+t.length0&&32===g.charCodeAt(m-1)&&(i=" "+i,m-=1),f=d._createRemoveBlockCommentOperations(new s.e(a,p+t.length+1,c,m+1),t,i)):(f=d._createAddBlockCommentOperations(e,t,i,this._insertSpace),this._usedEndToken=1===f.length?i:null);for(const e of f)r.addTrackedEditOperation(e.range,e.text)}static _createRemoveBlockCommentOperations(e,t,i){let n=[];return s.e.isEmpty(e)?n.push(l.h.delete(new s.e(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+i.length))):(n.push(l.h.delete(new s.e(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),n.push(l.h.delete(new s.e(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),n}static _createAddBlockCommentOperations(e,t,i,n){let o=[];return s.e.isEmpty(e)?o.push(l.h.replace(new s.e(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+i)):(o.push(l.h.insert(new c.L(e.startLineNumber,e.startColumn),t+(n?" ":""))),o.push(l.h.insert(new c.L(e.endLineNumber,e.endColumn),(n?" ":"")+i))),o}getEditOperations(e,t){const i=this._selection.startLineNumber,n=this._selection.startColumn;e.tokenizeIfCheap(i);const o=e.getLanguageIdAtPosition(i,n),r=h.zu.getComments(o);r&&r.blockCommentStartToken&&r.blockCommentEndToken&&this._createOperationsForBlockComment(this._selection,r.blockCommentStartToken,r.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const i=t.getInverseEditOperations();if(2===i.length){const e=i[0],t=i[1];return new u.Y(e.range.endLineNumber,e.range.endColumn,t.range.startLineNumber,t.range.startColumn)}{const e=i[0].range,t=this._usedEndToken?-this._usedEndToken.length-1:0;return new u.Y(e.endLineNumber,e.endColumn+t,e.endLineNumber,e.endColumn+t)}}}var g=i(7295);class f{constructor(e,t,i,n,o,r){this._selection=e,this._tabSize=t,this._type=i,this._insertSpace=n,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=o,this._ignoreFirstLine=r||!1}static _gatherPreflightCommentStrings(e,t,i){e.tokenizeIfCheap(t);const n=e.getLanguageIdAtPosition(t,1),o=h.zu.getComments(n),r=o?o.lineCommentToken:null;if(!r)return null;let s=[];for(let e=0,n=i-t+1;es?o-1:o}}}var p=i(4144);class m extends r.R6{constructor(e,t){super(t),this._type=e}run(e,t){if(!t.hasModel())return;const i=[],n=t.getModel().getOptions(),o=t.getOption(17),r=t.getSelections().map(((e,t)=>({selection:e,index:t,ignoreFirstLine:!1})));r.sort(((e,t)=>s.e.compareRangesUsingStarts(e.selection,t.selection)));let a=r[0];for(let e=1;e{"use strict";i.r(t),i.d(t,{ContextMenuController:()=>m});var n=i(3580),o=i(5321),r=i(4741),s=i(5976),a=i(6830),l=i(9102),c=i(4144),u=i(8819),h=i(5606),d=i(1847),g=i(6033),f=i(1432),p=function(e,t){return function(i,n){t(i,n,e)}};let m=class e{constructor(e,t,i,n,r,a){this._contextMenuService=t,this._contextViewService=i,this._contextKeyService=n,this._keybindingService=r,this._menuService=a,this._toDispose=new s.SL,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu((e=>this._onContextMenu(e)))),this._toDispose.add(this._editor.onMouseWheel((e=>{if(this._contextMenuIsBeingShownCount>0){const t=this._contextViewService.getContextViewElement(),i=e.srcElement;i.shadowRoot&&o.Ay(t)===i.shadowRoot||this._contextViewService.hideContextView()}}))),this._toDispose.add(this._editor.onKeyDown((e=>{58===e.keyCode&&(e.preventDefault(),e.stopPropagation(),this.showContextMenu())})))}static get(t){return t.getContribution(e.ID)}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(18))return this._editor.focus(),void(e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position));if(12===e.target.type)return;if(e.event.preventDefault(),6!==e.target.type&&7!==e.target.type&&1!==e.target.type)return;if(this._editor.focus(),e.target.position){let t=!1;for(const i of this._editor.getSelections())if(i.containsPosition(e.target.position)){t=!0;break}t||this._editor.setPosition(e.target.position)}let t=null;1!==e.target.type&&(t={x:e.event.posx-1,width:2,y:e.event.posy-1,height:2}),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(18))return;if(!this._editor.hasModel())return;if(!this._contextMenuService)return void this._editor.focus();const t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?c.eH.SimpleEditorContext:c.eH.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const i=[],n=this._menuService.createMenu(t,this._contextKeyService),o=n.getActions({arg:e.uri});n.dispose();for(let t of o){const[,n]=t;let o=0;for(const t of n)if(t instanceof c.NZ){const n=this._getMenuActions(e,t.item.submenu);n.length>0&&(i.push(new r.wY(t.id,t.label,n)),o++)}else i.push(t),o++;o&&i.push(new r.Z0)}return i.length&&i.pop(),i}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const i=this._editor.getOption(50);if(this._editor.updateOptions({hover:{enabled:!1}}),!t){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const e=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),i=o.i(this._editor.getDomNode()),n=i.left+e.left,r=i.top+e.top+e.height;t={x:n,y:r}}const n=this._editor.getOption(112)&&!f.gn;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:n?this._editor.getDomNode():void 0,getAnchor:()=>t,getActions:()=>e,getActionViewItem:e=>{const t=this._keybindingFor(e);if(t)return new g.g(e,e,{label:!0,keybinding:t.getLabel(),isMenu:!0});const i=e;return"function"==typeof i.getActionViewItem?i.getActionViewItem():new g.g(e,e,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:e=>this._keybindingFor(e),onHide:e=>{this._contextMenuIsBeingShownCount--,this._editor.focus(),this._editor.updateOptions({hover:i})}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};m.ID="editor.contrib.contextmenu",m=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([p(1,h.i),p(2,h.u),p(3,u.i6),p(4,d.d),p(5,c.co)],m);class _ extends a.R6{constructor(){super({id:"editor.action.showContextMenu",label:n.N("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:l.u.textInputFocus,primary:1092,weight:100}})}run(e,t){m.get(t).showContextMenu()}}(0,a._K)(m.ID,m),(0,a.Qr)(_)},2834:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CursorUndoRedoController:()=>c,CursorUndo:()=>u,CursorRedo:()=>h});var n=i(3580),o=i(5976),r=i(6830),s=i(9102);class a{constructor(e){this.selections=e}equals(e){const t=this.selections.length;if(t!==e.selections.length)return!1;for(let i=0;i{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeModelContent((e=>{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeCursorSelection((t=>{if(this._isCursorUndoRedo)return;if(!t.oldSelections)return;if(t.oldModelVersionId!==t.modelVersionId)return;const i=new a(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new l(i,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())})))}static get(e){return e.getContribution(c.ID)}cursorUndo(){this._editor.hasModel()&&0!==this._undoStack.length&&(this._redoStack.push(new l(new a(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){this._editor.hasModel()&&0!==this._redoStack.length&&(this._undoStack.push(new l(new a(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}}c.ID="editor.contrib.cursorUndoRedoController";class u extends r.R6{constructor(){super({id:"cursorUndo",label:n.N("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:s.u.textInputFocus,primary:2099,weight:100}})}run(e,t,i){c.get(t).cursorUndo()}}class h extends r.R6{constructor(){super({id:"cursorRedo",label:n.N("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,i){c.get(t).cursorRedo()}}(0,r._K)(c.ID,c),(0,r.Qr)(u),(0,r.Qr)(h)},7441:(e,t,i)=>{"use strict";i.r(t),i.d(t,{DragAndDropController:()=>d});var n=i(5976),o=i(1432),r=i(6830),s=i(187),a=i(4314),l=i(3860);class c{constructor(e,t,i){this.selection=e,this.targetPosition=t,this.copy=i,this.targetSelection=null}getEditOperations(e,t){let i=e.getValueInRange(this.selection);this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new a.e(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),i),!this.selection.containsPosition(this.targetPosition)||this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition))?this.copy?this.targetSelection=new l.Y(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber>this.selection.endLineNumber?this.targetSelection=new l.Y(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumberthis._onEditorMouseDown(e)))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(e)))),this._register(this._editor.onMouseDrag((e=>this._onEditorMouseDrag(e)))),this._register(this._editor.onMouseDrop((e=>this._onEditorMouseDrop(e)))),this._register(this._editor.onMouseDropCanceled((()=>this._onEditorMouseDropCanceled()))),this._register(this._editor.onKeyDown((e=>this.onEditorKeyDown(e)))),this._register(this._editor.onKeyUp((e=>this.onEditorKeyUp(e)))),this._register(this._editor.onDidBlurEditorWidget((()=>this.onEditorBlur()))),this._register(this._editor.onDidBlurEditorText((()=>this.onEditorBlur()))),this._dndDecorationIds=[],this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){this._editor.getOption(29)&&!this._editor.getOption(16)&&(h(e)&&(this._modifierPressed=!0),this._mouseDown&&h(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){this._editor.getOption(29)&&!this._editor.getOption(16)&&(h(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===d.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){let t=e.target;if(null===this._dragSelection){let e=(this._editor.getSelections()||[]).filter((e=>t.position&&e.containsPosition(t.position)));if(1!==e.length)return;this._dragSelection=e[0]}h(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){let t=new s.L(e.target.position.lineNumber,e.target.position.column);if(null===this._dragSelection){let i=null;if(e.event.shiftKey){let e=this._editor.getSelection();if(e){const{selectionStartLineNumber:n,selectionStartColumn:o}=e;i=[new l.Y(n,o,t.lineNumber,t.column)]}}else i=(this._editor.getSelections()||[]).map((e=>e.containsPosition(t)?new l.Y(t.lineNumber,t.column,t.lineNumber,t.column):e));this._editor.setSelections(i||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(h(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(d.ID,new c(this._dragSelection,t,h(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){let t=[{range:new a.e(e.lineNumber,e.column,e.lineNumber,e.column),options:d._DECORATION_OPTIONS}];this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,t),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,[])}_hitContent(e){return 6===e.type||7===e.type}_hitMargin(e){return 2===e.type||3===e.type||4===e.type}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}d.ID="editor.contrib.dragAndDrop",d.TRIGGER_KEY_VALUE=o.dz?6:5,d._DECORATION_OPTIONS=u.qx.register({description:"dnd-target",className:"dnd-target"}),(0,r._K)(d.ID,d)},1372:(e,t,i)=>{"use strict";i.r(t),i.d(t,{getDocumentSymbols:()=>h});var n=i(666),o=i(1200),r=i(1050),s=i(8216),a=i(6895),l=i(4565),c=i(8401),u=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function h(e,t,i){return u(this,void 0,void 0,(function*(){const n=yield a.C3.create(e,i);return t?n.asListOfDocumentSymbols():n.getTopLevelSymbols()}))}l.P.registerCommand("_executeDocumentSymbolProvider",(function(e,...t){return u(this,void 0,void 0,(function*(){const[i]=t;(0,c.p_)(n.o.isUri(i));const a=e.get(o.q).getModel(i);if(a)return h(a,!1,r.T.None);const l=yield e.get(s.S).createModelReference(i);try{return yield h(l.object.textEditorModel,!1,r.T.None)}finally{l.dispose()}}))}))},6895:(e,t,i)=>{"use strict";i.d(t,{C3:()=>f});var n=i(9488),o=i(1050),r=i(7301),s=i(3702),a=i(4314),l=i(4101),c=i(3725),u=i(1036);class h{remove(){this.parent&&this.parent.children.delete(this.id)}static findId(e,t){let i;"string"==typeof e?i=`${t.id}/${e}`:(i=`${t.id}/${e.name}`,void 0!==t.children.get(i)&&(i=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let n=i;for(let e=0;void 0!==t.children.get(n);e++)n=`${i}_${e}`;return n}static empty(e){return 0===e.children.size}}class d extends h{constructor(e,t,i){super(),this.id=e,this.parent=t,this.symbol=i,this.children=new Map}}class g extends h{constructor(e,t,i,n){super(),this.id=e,this.parent=t,this.label=i,this.order=n,this.children=new Map}}class f extends h{constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}static create(e,t){let i=this._keys.for(e,!0),n=f._requests.get(i);if(!n){let t=new o.A;n={promiseCnt:0,source:t,promise:f._create(e,t.token),model:void 0},f._requests.set(i,n);const r=Date.now();n.promise.then((()=>{this._requestDurations.update(e,Date.now()-r)}))}return n.model?Promise.resolve(n.model):(n.promiseCnt+=1,t.onCancellationRequested((()=>{0==--n.promiseCnt&&(n.source.cancel(),f._requests.delete(i))})),new Promise(((e,t)=>{n.promise.then((t=>{n.model=t,e(t)}),(e=>{f._requests.delete(i),t(e)}))})))}static _create(e,t){const i=new o.A(t),s=new f(e.uri),a=l.vJ.ordered(e),c=a.map(((t,n)=>{var o;let a=h.findId(`provider_${n}`,s),l=new g(a,s,null!==(o=t.displayName)&&void 0!==o?o:"Unknown Outline Provider",n);return Promise.resolve(t.provideDocumentSymbols(e,i.token)).then((e=>{for(const t of e||[])f._makeOutlineElement(t,l);return l}),(e=>((0,r.Cp)(e),l))).then((e=>{h.empty(e)?e.remove():s._groups.set(a,e)}))})),u=l.vJ.onDidChange((()=>{const t=l.vJ.ordered(e);(0,n.fS)(t,a)||i.cancel()}));return Promise.all(c).then((()=>i.token.isCancellationRequested&&!t.isCancellationRequested?f._create(e,t):s._compact())).finally((()=>{u.dispose()}))}static _makeOutlineElement(e,t){let i=h.findId(e,t),n=new d(i,t,e);if(e.children)for(const t of e.children)f._makeOutlineElement(t,n);t.children.set(n.id,n)}_compact(){let e=0;for(const[t,i]of this._groups)0===i.children.size?this._groups.delete(t):e+=1;if(1!==e)this.children=this._groups;else{let e=c.$.first(this._groups.values());for(let[,t]of e.children)t.parent=this,this.children.set(t.id,t)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof d?e.push(t.symbol):e.push(...c.$.map(t.children.values(),(e=>e.symbol)));return e.sort(((e,t)=>a.e.compareRangesUsingStarts(e.range,t.range)))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return f._flattenDocumentSymbols(t,e,""),t.sort(((e,t)=>a.e.compareRangesUsingStarts(e.range,t.range)))}static _flattenDocumentSymbols(e,t,i){for(const n of t)e.push({kind:n.kind,tags:n.tags,name:n.name,detail:n.detail,containerName:n.containerName||i,range:n.range,selectionRange:n.selectionRange,children:void 0}),n.children&&f._flattenDocumentSymbols(e,n.children,n.name)}}f._requestDurations=new u.Y(l.vJ,350),f._requests=new s.z6(9,.75),f._keys=new class{constructor(){this._counter=1,this._data=new WeakMap}for(e,t){return`${e.id}/${t?e.getVersionId():""}/${this._hash(l.vJ.all(e))}`}_hash(e){let t="";for(const i of e){let e=this._data.get(i);void 0===e&&(e=this._counter++,this._data.set(i,e)),t+=e}return t}}},3391:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CommonFindController:()=>bt,FindController:()=>yt,MatchFindAction:()=>St,NextMatchFindAction:()=>xt,NextSelectionMatchFindAction:()=>Lt,PreviousMatchFindAction:()=>kt,PreviousSelectionMatchFindAction:()=>Nt,SelectionMatchFindAction:()=>Dt,StartFindAction:()=>wt,StartFindReplaceAction:()=>Et,StartFindWithSelectionAction:()=>Ct,getSelectionSearchString:()=>vt});var n=i(3580),o=i(5393),r=i(5976),s=i(7295),a=i(6830),l=i(9102),c=i(1329),u=i(187),h=i(4314),d=i(3860),g=i(7277),f=i(4973),p=i(3411),m=i(3910),_=i(7781);class v{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.deltaDecorations(this._allDecorations(),[]),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map((e=>this._editor.getModel().getDecorationRange(e))).filter((e=>!!e));if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getCurrentMatchesPosition(e){let t=this._editor.getModel().getDecorationsInRange(e);for(const e of t){const t=e.options;if(t===v._FIND_MATCH_DECORATION||t===v._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(e.id)}return 0}setCurrentFindMatch(e){let t=null,i=0;if(e)for(let n=0,o=this._decorations.length;n{if(null!==this._highlightedDecorationId&&(e.changeDecorationOptions(this._highlightedDecorationId,v._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),null!==t&&(this._highlightedDecorationId=t,e.changeDecorationOptions(this._highlightedDecorationId,v._CURRENT_FIND_MATCH_DECORATION)),null!==this._rangeHighlightDecorationId&&(e.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),null!==t){let i=this._editor.getModel().getDecorationRange(t);if(i.startLineNumber!==i.endLineNumber&&1===i.endColumn){let e=i.endLineNumber-1,t=this._editor.getModel().getLineMaxColumn(e);i=new h.e(i.startLineNumber,i.startColumn,e,t)}this._rangeHighlightDecorationId=e.addDecoration(i,v._RANGE_HIGHLIGHT_DECORATION)}})),i}set(e,t){this._editor.changeDecorations((i=>{let n=v._FIND_MATCH_DECORATION,o=[];if(e.length>1e3){n=v._FIND_MATCH_NO_OVERVIEW_DECORATION;const t=this._editor.getModel().getLineCount(),i=this._editor.getLayoutInfo().height/t,r=Math.max(2,Math.ceil(3/i));let s=e[0].range.startLineNumber,a=e[0].range.endLineNumber;for(let t=1,i=e.length;t=i.startLineNumber?i.endLineNumber>a&&(a=i.endLineNumber):(o.push({range:new h.e(s,1,a,1),options:v._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),s=i.startLineNumber,a=i.endLineNumber)}o.push({range:new h.e(s,1,a,1),options:v._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}let r=new Array(e.length);for(let t=0,i=e.length;ti.removeDecoration(e))),this._findScopeDecorationIds=[]),(null==t?void 0:t.length)&&(this._findScopeDecorationIds=t.map((e=>i.addDecoration(e,v._FIND_SCOPE_DECORATION))))}))}matchBeforePosition(e){if(0===this._decorations.length)return null;for(let t=this._decorations.length-1;t>=0;t--){let i=this._decorations[t],n=this._editor.getModel().getDecorationRange(i);if(n&&!(n.endLineNumber>e.lineNumber)){if(n.endLineNumbere.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(0===this._decorations.length)return null;for(let t=0,i=this._decorations.length;te.lineNumber)return n;if(!(n.startColumn0){let e=[];for(let t=0;th.e.compareRangesUsingStarts(e.range,t.range)));let i=[],n=e[0];for(let t=1;t0?t[0].toUpperCase()+t.substr(1):e[0][0].toUpperCase()!==e[0][0]&&t.length>0?t[0].toLowerCase()+t.substr(1):t}return t}function w(e,t,i){return-1!==e[0].indexOf(i)&&-1!==t.indexOf(i)&&e[0].split(i).length===t.split(i).length}function C(e,t,i){const n=t.split(i),o=e[0].split(i);let r="";return n.forEach(((e,t)=>{r+=y([o[t]],e)+i})),r.slice(0,-1)}class S{constructor(e){this.staticValue=e,this.kind=0}}class x{constructor(e){this.pieces=e,this.kind=1}}class k{constructor(e){e&&0!==e.length?1===e.length&&null!==e[0].staticValue?this._state=new S(e[0].staticValue):this._state=new x(e):this._state=new S("")}static fromStaticValue(e){return new k([D.staticValue(e)])}get hasReplacementPatterns(){return 1===this._state.kind}buildReplaceString(e,t){if(0===this._state.kind)return t?y(e,this._state.staticValue):this._state.staticValue;let i="";for(let t=0,n=this._state.pieces.length;t0){let e=[],t=n.caseOps.length,i=0;for(let r=0,s=o.length;r=t){e.push(o.slice(r));break}switch(n.caseOps[i]){case"U":e.push(o[r].toUpperCase());break;case"u":e.push(o[r].toUpperCase()),i++;break;case"L":e.push(o[r].toLowerCase());break;case"l":e.push(o[r].toLowerCase()),i++;break;default:e.push(o[r])}}o=e.join("")}i+=o}return i}static _substitute(e,t){if(null===t)return"";if(0===e)return t[0];let i="";for(;e>0;){if(ethis.research(!1)),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition((e=>{3!==e.reason&&5!==e.reason&&6!==e.reason||this._decorations.setStartPosition(this._editor.getPosition())}))),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent((e=>{this._ignoreModelContentChanged||(e.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())}))),this._toDispose.add(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,(0,r.B9)(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){!this._isDisposed&&this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet((()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)}),240)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let i=null;void 0!==t?null!==t&&(i=Array.isArray(t)?t:[t]):i=this._decorations.getFindScopes(),null!==i&&(i=i.map((e=>{if(e.startLineNumber!==e.endLineNumber){let t=e.endLineNumber;return 1===e.endColumn&&(t-=1),new h.e(e.startLineNumber,1,t,this._editor.getModel().getLineMaxColumn(t))}return e})));let n=this._findMatches(i,!1,G);this._decorations.set(n,i);const o=this._editor.getSelection();let r=this._decorations.getCurrentMatchesPosition(o);if(0===r&&n.length>0){const e=(0,E.lG)(n.map((e=>e.range)),(e=>h.e.compareRangesUsingStarts(e,o)>=0));r=e>0?e-1+1:r}this._state.changeMatchInfo(r,this._decorations.getCount(),void 0),e&&this._editor.getOption(33).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){let e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){let t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){let t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:i,column:n}=e,o=this._editor.getModel();return t||1===n?(1===i?i=o.getLineCount():i--,n=o.getLineMaxColumn(i)):n--,new u.L(i,n)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const t=this._decorations.matchAfterPosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0),{lineNumber:i,column:n}=e,o=this._editor.getModel();return t||n===o.getLineMaxColumn(i)?(i===o.getLineCount()?i=1:i++,n=1):n++,new u.L(i,n)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const t=this._decorations.matchBeforePosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()=o)break;let r=e.charCodeAt(n);if(36===r){i.emitUnchanged(n-1),i.emitStatic("$",n+1);continue}if(48===r||38===r){i.emitUnchanged(n-1),i.emitMatchIndex(0,n+1,t),t.length=0;continue}if(49<=r&&r<=57){let s=r-48;if(n+1=o)break;let r=e.charCodeAt(n);switch(r){case 92:i.emitUnchanged(n-1),i.emitStatic("\\",n+1);break;case 110:i.emitUnchanged(n-1),i.emitStatic("\n",n+1);break;case 116:i.emitUnchanged(n-1),i.emitStatic("\t",n+1);break;case 117:case 85:case 108:case 76:i.emitUnchanged(n-1),i.emitStatic("",n+1),t.push(String.fromCharCode(r))}}}return i.finalize()}(this._state.replaceString):k.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;let e=this._getReplacePattern(),t=this._editor.getSelection(),i=this._getNextMatch(t.getStartPosition(),!0,!1);if(i)if(t.equalsRange(i.range)){let n=e.buildReplaceString(i.matches,this._state.preserveCase),o=new c.T4(t,n);this._executeEditorCommand("replace",o),this._decorations.setStartPosition(new u.L(t.startLineNumber,t.startColumn+n.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(i.range)}_findMatches(e,t,i){const n=(e||[null]).map((e=>Y._getSearchRange(this._editor.getModel(),e)));return this._editor.getModel().findMatches(this._state.searchString,n,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(114):null,t,i)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();null===e&&this._state.matchesCount>=G?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const e=new g.bc(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(114):null).parseSearchRequest();if(!e)return;let t=e.regex;if(!t.multiline){let e="mu";t.ignoreCase&&(e+="i"),t.global&&(e+="g"),t=new RegExp(t.source,e)}const i=this._editor.getModel(),n=i.getValue(1),o=i.getFullModelRange(),r=this._getReplacePattern();let s;const a=this._state.preserveCase;s=r.hasReplacementPatterns||a?n.replace(t,(function(){return r.buildReplaceString(arguments,a)})):n.replace(t,r.buildReplaceString(null,a));let l=new c.hP(o,s,this._editor.getSelection());this._executeEditorCommand("replaceAll",l)}_regularReplaceAll(e){const t=this._getReplacePattern();let i=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),n=[];for(let e=0,o=i.length;ee.range)),n);this._executeEditorCommand("replaceAll",o)}selectAllMatches(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes(),t=this._findMatches(e,!1,1073741824).map((e=>new d.Y(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn))),i=this._editor.getSelection();for(let e=0,n=t.length;e{this.checked=!this._checked,this._onChange.fire(!1),e.preventDefault()})),this.ignoreGesture(this.domNode),this.onkeydown(this.domNode,(e=>{if(10===e.keyCode||3===e.keyCode)return this.checked=!this._checked,this._onChange.fire(!0),void e.preventDefault();this._onKeyDown.fire(e)}))}get enabled(){return"true"!==this.domNode.getAttribute("aria-disabled")}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 22}style(e){e.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=e.inputActiveOptionBorder),e.inputActiveOptionForeground&&(this._opts.inputActiveOptionForeground=e.inputActiveOptionForeground),e.inputActiveOptionBackground&&(this._opts.inputActiveOptionBackground=e.inputActiveOptionBackground),this.applyStyles()}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"transparent",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground?this._opts.inputActiveOptionForeground.toString():"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground?this._opts.inputActiveOptionBackground.toString():"transparent")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}const ne=n.N("caseDescription","Match Case"),oe=n.N("wordsDescription","Match Whole Word"),re=n.N("regexDescription","Use Regular Expression");class se extends ie{constructor(e){super({icon:ee.lA.caseSensitive,title:ne+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class ae extends ie{constructor(e){super({icon:ee.lA.wholeWord,title:oe+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class le extends ie{constructor(e){super({icon:ee.lA.regex,title:re+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class ce extends X.${constructor(e,t,i,n){super(),this._hideSoon=this._register(new o.pY((()=>this._hide()),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=i,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const r=n.getColorTheme().getColor(m.PR),s=n.getColorTheme().getColor(m.Pv),a=n.getColorTheme().getColor(m.XE);this.caseSensitive=this._register(new se({appendTitle:this._keybindingLabelFor(V),isChecked:this._state.matchCase,inputActiveOptionBorder:r,inputActiveOptionForeground:s,inputActiveOptionBackground:a})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange((()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)}))),this.wholeWords=this._register(new ae({appendTitle:this._keybindingLabelFor(H),isChecked:this._state.wholeWord,inputActiveOptionBorder:r,inputActiveOptionForeground:s,inputActiveOptionBackground:a})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange((()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)}))),this.regex=this._register(new le({appendTitle:this._keybindingLabelFor($),isChecked:this._state.isRegex,inputActiveOptionBorder:r,inputActiveOptionForeground:s,inputActiveOptionBackground:a})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange((()=>{this._state.change({isRegex:this.regex.checked},!1)}))),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange((e=>{let t=!1;e.isRegex&&(this.regex.checked=this._state.isRegex,t=!0),e.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,t=!0),e.matchCase&&(this.caseSensitive.checked=this._state.matchCase,t=!0),!this._state.isRevealed&&t&&this._revealTemporarily()}))),this._register(Z.j_(this._domNode,(e=>this._onMouseOut()))),this._register(Z.nm(this._domNode,"mouseover",(e=>this._onMouseOver()))),this._applyTheme(n.getColorTheme()),this._register(n.onDidColorThemeChange(this._applyTheme.bind(this)))}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return ce.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseOut(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}_applyTheme(e){let t={inputActiveOptionBorder:e.getColor(m.PR),inputActiveOptionForeground:e.getColor(m.Pv),inputActiveOptionBackground:e.getColor(m.XE)};this.caseSensitive.style(t),this.wholeWords.style(t),this.regex.style(t)}}function ue(e,t){return 1===e||2!==e&&t}ce.ID="editor.contrib.findOptionsWidget",(0,_.Ic)(((e,t)=>{const i=e.getColor(m.D0);i&&t.addRule(`.monaco-editor .findOptionsWidget { background-color: ${i}; }`);const n=e.getColor(m.Hf);n&&t.addRule(`.monaco-editor .findOptionsWidget { color: ${n}; }`);const o=e.getColor(m.rh);o&&t.addRule(`.monaco-editor .findOptionsWidget { box-shadow: 0 0 8px 2px ${o}; }`);const r=e.getColor(m.lR);r&&t.addRule(`.monaco-editor .findOptionsWidget { border: 2px solid ${r}; }`)}));class he extends r.JT{constructor(){super(),this._onFindReplaceStateChange=this._register(new J.Q5),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0}get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return ue(this._isRegexOverride,this._isRegex)}get wholeWord(){return ue(this._wholeWordOverride,this._wholeWord)}get matchCase(){return ue(this._matchCaseOverride,this._matchCase)}get preserveCase(){return ue(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}changeMatchInfo(e,t,i){let n={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1},o=!1;0===t&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,n.matchesPosition=!0,o=!0),this._matchesCount!==t&&(this._matchesCount=t,n.matchesCount=!0,o=!0),void 0!==i&&(h.e.equalsRange(this._currentMatch,i)||(this._currentMatch=i,n.currentMatch=!0,o=!0)),o&&this._onFindReplaceStateChange.fire(n)}change(e,t,i=!0){var n;let o={moveCursor:t,updateHistory:i,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1},r=!1;const s=this.isRegex,a=this.wholeWord,l=this.matchCase,c=this.preserveCase;void 0!==e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,o.searchString=!0,r=!0),void 0!==e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,o.replaceString=!0,r=!0),void 0!==e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,o.isRevealed=!0,r=!0),void 0!==e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,o.isReplaceRevealed=!0,r=!0),void 0!==e.isRegex&&(this._isRegex=e.isRegex),void 0!==e.wholeWord&&(this._wholeWord=e.wholeWord),void 0!==e.matchCase&&(this._matchCase=e.matchCase),void 0!==e.preserveCase&&(this._preserveCase=e.preserveCase),void 0!==e.searchScope&&((null===(n=e.searchScope)||void 0===n?void 0:n.every((e=>{var t;return null===(t=this._searchScope)||void 0===t?void 0:t.some((t=>!h.e.equalsRange(t,e)))})))||(this._searchScope=e.searchScope,o.searchScope=!0,r=!0)),void 0!==e.loop&&this._loop!==e.loop&&(this._loop=e.loop,o.loop=!0,r=!0),this._isRegexOverride=void 0!==e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride=void 0!==e.wholeWordOverride?e.wholeWordOverride:0,this._matchCaseOverride=void 0!==e.matchCaseOverride?e.matchCaseOverride:0,this._preserveCaseOverride=void 0!==e.preserveCaseOverride?e.preserveCaseOverride:0,s!==this.isRegex&&(r=!0,o.isRegex=!0),a!==this.wholeWord&&(r=!0,o.wholeWord=!0),l!==this.matchCase&&(r=!0,o.matchCase=!0),c!==this.preserveCase&&(r=!0,o.preserveCase=!0),r&&this._onFindReplaceStateChange.fire(o)}canNavigateBack(){return this.canNavigateInLoop()||1!==this.matchesPosition}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=G}}var de=i(5152),ge=i(3098),fe=i(7301),pe=i(1432),me=i(7927);const _e=n.N("defaultLabel","input");class ve extends X.${constructor(e,t,i,n){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this._onDidOptionChange=this._register(new J.Q5),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new J.Q5),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new J.Q5),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new J.Q5),this._onKeyUp=this._register(new J.Q5),this._onCaseSensitiveKeyDown=this._register(new J.Q5),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new J.Q5),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||_e,this.inputActiveOptionBorder=n.inputActiveOptionBorder,this.inputActiveOptionForeground=n.inputActiveOptionForeground,this.inputActiveOptionBackground=n.inputActiveOptionBackground,this.inputBackground=n.inputBackground,this.inputForeground=n.inputForeground,this.inputBorder=n.inputBorder,this.inputValidationInfoBorder=n.inputValidationInfoBorder,this.inputValidationInfoBackground=n.inputValidationInfoBackground,this.inputValidationInfoForeground=n.inputValidationInfoForeground,this.inputValidationWarningBorder=n.inputValidationWarningBorder,this.inputValidationWarningBackground=n.inputValidationWarningBackground,this.inputValidationWarningForeground=n.inputValidationWarningForeground,this.inputValidationErrorBorder=n.inputValidationErrorBorder,this.inputValidationErrorBackground=n.inputValidationErrorBackground,this.inputValidationErrorForeground=n.inputValidationErrorForeground;const o=n.appendCaseSensitiveLabel||"",r=n.appendWholeWordsLabel||"",s=n.appendRegexLabel||"",a=n.history||[],l=!!n.flexibleHeight,c=!!n.flexibleWidth,u=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new me.p(this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:a,flexibleHeight:l,flexibleWidth:c,flexibleMaxHeight:u})),this.regex=this._register(new le({appendTitle:s,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.regex.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.regex.onKeyDown((e=>{this._onRegexKeyDown.fire(e)}))),this.wholeWords=this._register(new ae({appendTitle:r,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.wholeWords.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this.caseSensitive=this._register(new se({appendTitle:o,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.caseSensitive.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.caseSensitive.onKeyDown((e=>{this._onCaseSensitiveKeyDown.fire(e)}))),this._showOptionButtons&&(this.inputBox.paddingRight=this.caseSensitive.width()+this.wholeWords.width()+this.regex.width());let h=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,(e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){let t=h.indexOf(document.activeElement);if(t>=0){let i=-1;e.equals(17)?i=(t+1)%h.length:e.equals(15)&&(i=0===t?h.length-1:t-1),e.equals(9)?(h[t].blur(),this.inputBox.focus()):i>=0&&h[i].focus(),Z.zB.stop(e,!0)}}}));let d=document.createElement("div");d.className="controls",d.style.display=this._showOptionButtons?"block":"none",d.appendChild(this.caseSensitive.domNode),d.appendChild(this.wholeWords.domNode),d.appendChild(this.regex.domNode),this.domNode.appendChild(d),e&&e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e))),this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e))),this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire())),this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.regex.style(e),this.wholeWords.style(e),this.caseSensitive.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive.checked}setCaseSensitive(e){this.caseSensitive.checked=e}getWholeWords(){return this.wholeWords.checked}setWholeWords(e){this.wholeWords.checked=e}getRegex(){return this.regex.checked}setRegex(e){this.regex.checked=e,this.validate()}focusOnCaseSensitive(){this.caseSensitive.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}clearMessage(){this.inputBox.hideMessage()}}var be=i(9989);const ye=n.N("defaultLabel","input"),we=n.N("label.preserveCaseCheckbox","Preserve Case");class Ce extends ie{constructor(e){super({icon:ee.lA.preserveCase,title:we+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class Se extends X.${constructor(e,t,i,n){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new J.Q5),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new J.Q5),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new J.Q5),this._onInput=this._register(new J.Q5),this._onKeyUp=this._register(new J.Q5),this._onPreserveCaseKeyDown=this._register(new J.Q5),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||ye,this.inputActiveOptionBorder=n.inputActiveOptionBorder,this.inputActiveOptionForeground=n.inputActiveOptionForeground,this.inputActiveOptionBackground=n.inputActiveOptionBackground,this.inputBackground=n.inputBackground,this.inputForeground=n.inputForeground,this.inputBorder=n.inputBorder,this.inputValidationInfoBorder=n.inputValidationInfoBorder,this.inputValidationInfoBackground=n.inputValidationInfoBackground,this.inputValidationInfoForeground=n.inputValidationInfoForeground,this.inputValidationWarningBorder=n.inputValidationWarningBorder,this.inputValidationWarningBackground=n.inputValidationWarningBackground,this.inputValidationWarningForeground=n.inputValidationWarningForeground,this.inputValidationErrorBorder=n.inputValidationErrorBorder,this.inputValidationErrorBackground=n.inputValidationErrorBackground,this.inputValidationErrorForeground=n.inputValidationErrorForeground;const o=n.appendPreserveCaseLabel||"",r=n.history||[],s=!!n.flexibleHeight,a=!!n.flexibleWidth,l=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new me.p(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:r,flexibleHeight:s,flexibleWidth:a,flexibleMaxHeight:l})),this.preserveCase=this._register(new Ce({appendTitle:o,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.preserveCase.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.preserveCase.onKeyDown((e=>{this._onPreserveCaseKeyDown.fire(e)}))),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;let c=[this.preserveCase.domNode];this.onkeydown(this.domNode,(e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){let t=c.indexOf(document.activeElement);if(t>=0){let i=-1;e.equals(17)?i=(t+1)%c.length:e.equals(15)&&(i=0===t?c.length-1:t-1),e.equals(9)?(c[t].blur(),this.inputBox.focus()):i>=0&&c[i].focus(),Z.zB.stop(e,!0)}}}));let u=document.createElement("div");u.className="controls",u.style.display=this._showOptionButtons?"block":"none",u.appendChild(this.preserveCase.domNode),this.domNode.appendChild(u),e&&e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e))),this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e))),this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire())),this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.preserveCase.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){this.inputBox&&this.inputBox.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.inputBox.width=e,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var xe=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ke=function(e,t){return function(i,n){t(i,n,e)}};const De="historyNavigationWidget",Le="historyNavigationEnabled";function Ne(e,t){return e.getContext(document.activeElement).getValue(t)}function Ee(e,t){const i=function(e,t){return e.createScoped(t.target)}(e,t);return function(e,t,i){new N.uy("historyNavigationWidget",t).bindTo(e)}(i,t),{scopedContextKeyService:i,historyNavigationEnablement:new N.uy(Le,!0).bindTo(i)}}let Ae=class extends ve{constructor(e,t,i,n,o=!1){super(e,t,o,i),this._register(Ee(n,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};Ae=xe([ke(3,N.i6)],Ae);let Me=class extends Se{constructor(e,t,i,n,o=!1){super(e,t,o,i),this._register(Ee(n,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};Me=xe([ke(3,N.i6)],Me),be.W.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:N.Ao.and(N.Ao.has(De),N.Ao.equals(Le,!0)),primary:16,secondary:[528],handler:(e,t)=>{const i=Ne(e.get(N.i6),De);i&&i.historyNavigator.showPreviousValue()}}),be.W.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:N.Ao.and(N.Ao.has(De),N.Ao.equals(Le,!0)),primary:18,secondary:[530],handler:(e,t)=>{const i=Ne(e.get(N.i6),De);i&&i.historyNavigator.showNextValue()}});var Ie=i(9554);const Te=(0,Ie.q5)("find-selection",ee.lA.selection,n.N("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),Re=(0,Ie.q5)("find-collapsed",ee.lA.chevronRight,n.N("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),Oe=(0,Ie.q5)("find-expanded",ee.lA.chevronDown,n.N("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),Fe=(0,Ie.q5)("find-replace",ee.lA.replace,n.N("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),Pe=(0,Ie.q5)("find-replace-all",ee.lA.replaceAll,n.N("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),Be=(0,Ie.q5)("find-previous-match",ee.lA.arrowUp,n.N("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),ze=(0,Ie.q5)("find-next-match",ee.lA.arrowDown,n.N("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),We=n.N("label.find","Find"),Ve=n.N("placeholder.find","Find"),He=n.N("label.previousMatchButton","Previous match"),$e=n.N("label.nextMatchButton","Next match"),Ue=n.N("label.toggleSelectionFind","Find in selection"),je=n.N("label.closeButton","Close"),qe=n.N("label.replace","Replace"),Ke=n.N("placeholder.replace","Replace"),Ge=n.N("label.replaceButton","Replace"),Ye=n.N("label.replaceAllButton","Replace All"),Ze=n.N("label.toggleReplaceButton","Toggle Replace mode"),Xe=n.N("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",G),Qe=n.N("label.matchesLocation","{0} of {1}"),Je=n.N("label.noResults","No results"),et=419;let tt=69;const it="ctrlEnterReplaceAll.windows.donotask",nt=pe.dz?256:2048;class ot{constructor(e){this.afterLineNumber=e,this.heightInPx=33,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function rt(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionStart>0&&e.stopPropagation()}function st(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionEndthis._updateHistoryDelayer.cancel()))),this._register(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration((e=>{if(e.hasChanged(78)&&(this._codeEditor.getOption(78)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),e.hasChanged(128)&&this._tryUpdateWidgetWidth(),e.hasChanged(2)&&this.updateAccessibilitySupport(),e.hasChanged(33)){const e=this._codeEditor.getOption(33).addExtraSpaceOnTop;e&&!this._viewZone&&(this._viewZone=new ot(0),this._showViewZone()),!e&&this._viewZone&&this._removeViewZone()}}))),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection((()=>{this._isVisible&&this._updateToggleSelectionFindButton()}))),this._register(this._codeEditor.onDidFocusEditorWidget((()=>{return e=this,t=void 0,n=function*(){if(this._isVisible){let e=yield this._controller.getGlobalBufferTerm();e&&e!==this._state.searchString&&(this._state.change({searchString:e},!1),this._findInput.select())}},new((i=void 0)||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}));var e,t,i,n}))),this._findInputFocused=M.bindTo(a),this._findFocusTracker=this._register(Z.go(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus((()=>{this._findInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._findFocusTracker.onDidBlur((()=>{this._findInputFocused.set(!1)}))),this._replaceInputFocused=I.bindTo(a),this._replaceFocusTracker=this._register(Z.go(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus((()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._replaceFocusTracker.onDidBlur((()=>{this._replaceInputFocused.set(!1)}))),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(33).addExtraSpaceOnTop&&(this._viewZone=new ot(0)),this._applyTheme(l.getColorTheme()),this._register(l.onDidColorThemeChange(this._applyTheme.bind(this))),this._register(this._codeEditor.onDidChangeModel((()=>{this._isVisible&&(this._viewZoneId=void 0)}))),this._register(this._codeEditor.onDidScrollChange((e=>{e.scrollTopChanged?this._layoutViewZone():setTimeout((()=>{this._layoutViewZone()}),0)})))}getId(){return at.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?this._codeEditor.getOption(78)||this._isReplaceVisible||(this._isReplaceVisible=!0,this._replaceInput.width=Z.w(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){let e=this._state.searchString.length>0&&0===this._state.matchesCount;this._domNode.classList.toggle("no-results",e),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,fe.dL)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){let e;if(this._matchesCount.style.minWidth=tt+"px",this._state.matchesCount>=G?this._matchesCount.title=Xe:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild),this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=G&&(t+="+");let i=String(this._state.matchesPosition);"0"===i&&(i="?"),e=s.WU(Qe,i,t)}else e=Je;this._matchesCount.appendChild(document.createTextNode(e)),(0,de.Z9)(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),tt=Math.max(tt,this._matchesCount.clientWidth)}_getAriaLabel(e,t,i){if(e===Je)return""===i?n.N("ariaSearchNoResultEmpty","{0} found",e):n.N("ariaSearchNoResult","{0} found for '{1}'",e,i);if(t){const o=n.N("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,i,t.startLineNumber+":"+t.startColumn),r=this._codeEditor.getModel();return r&&t.startLineNumber<=r.getLineCount()&&t.startLineNumber>=1?`${r.getLineContent(t.startLineNumber)}, ${o}`:o}return n.N("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,i)}_updateToggleSelectionFindButton(){let e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),i=this._toggleSelectionFind.checked;this._isVisible&&(i||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);let e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);let i=!this._codeEditor.getOption(78);this._toggleReplaceBtn.setEnabled(this._isVisible&&i)}_reveal(){if(this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(33).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":const t=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=t}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout((()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")}),0)),this._revealTimeouts.push(setTimeout((()=>{this._findInput.validate()}),200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(33).seedSearchStringFromSelection&&e){const i=this._codeEditor.getDomNode();if(i){const n=Z.i(i),o=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),r=n.left+(o?o.left:0),s=o?o.top:0;if(this._viewZone&&se.startLineNumber&&(t=!1);const i=Z.xQ(this._domNode).left;r>i&&(t=!1);const o=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());n.left+(o?o.left:0)>i&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(33).addExtraSpaceOnTop)return void this._removeViewZone();if(!this._isVisible)return;const t=this._viewZone;void 0===this._viewZoneId&&t&&this._codeEditor.changeViewZones((i=>{t.heightInPx=this._getHeight(),this._viewZoneId=i.addZone(t),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+t.heightInPx)}))}_showViewZone(e=!0){if(!this._isVisible)return;if(!this._codeEditor.getOption(33).addExtraSpaceOnTop)return;void 0===this._viewZone&&(this._viewZone=new ot(0));const t=this._viewZone;this._codeEditor.changeViewZones((i=>{if(void 0!==this._viewZoneId){const n=this._getHeight();if(n===t.heightInPx)return;let o=n-t.heightInPx;return t.heightInPx=n,i.layoutZone(this._viewZoneId),void(e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+o))}{let n=this._getHeight();if(n-=this._codeEditor.getOption(72).top,n<=0)return;t.heightInPx=n,this._viewZoneId=i.addZone(t),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+n)}}))}_removeViewZone(){this._codeEditor.changeViewZones((e=>{void 0!==this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))}))}_applyTheme(e){let t={inputActiveOptionBorder:e.getColor(m.PR),inputActiveOptionBackground:e.getColor(m.XE),inputActiveOptionForeground:e.getColor(m.Pv),inputBackground:e.getColor(m.sE),inputForeground:e.getColor(m.zJ),inputBorder:e.getColor(m.dt),inputValidationInfoBackground:e.getColor(m._l),inputValidationInfoForeground:e.getColor(m.YI),inputValidationInfoBorder:e.getColor(m.EP),inputValidationWarningBackground:e.getColor(m.RV),inputValidationWarningForeground:e.getColor(m.SU),inputValidationWarningBorder:e.getColor(m.C3),inputValidationErrorBackground:e.getColor(m.p),inputValidationErrorForeground:e.getColor(m._t),inputValidationErrorBorder:e.getColor(m.OZ)};this._findInput.style(t),this._replaceInput.style(t),this._toggleSelectionFind.style(t)}_tryUpdateWidgetWidth(){if(!this._isVisible)return;if(!Z.Uw(this._domNode))return;const e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0)return void this._domNode.classList.add("hiddenEditor");this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const t=e.width,i=e.minimap.minimapWidth;let n=!1,o=!1,r=!1;if(this._resized&&Z.w(this._domNode)>et)return this._domNode.style.maxWidth=t-28-i-15+"px",void(this._replaceInput.width=Z.w(this._findInput.domNode));if(447+i>=t&&(o=!0),447+i-tt>=t&&(r=!0),447+i-tt>=t+50&&(n=!0),this._domNode.classList.toggle("collapsed-find-widget",n),this._domNode.classList.toggle("narrow-find-widget",r),this._domNode.classList.toggle("reduced-find-widget",o),r||n||(this._domNode.style.maxWidth=t-28-i-15+"px"),this._resized){this._findInput.inputBox.layout();let e=this._findInput.inputBox.element.clientWidth;e>0&&(this._replaceInput.width=e)}else this._isReplaceVisible&&(this._replaceInput.width=Z.w(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){const e=this._getHeight();return(null===this._cachedHeight||this._cachedHeight!==e)&&(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){let e=this._codeEditor.getSelections();e.map((e=>{1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1)));const t=this._state.currentMatch;return e.startLineNumber===e.endLineNumber||h.e.equalsRange(e,t)?null:e})).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){return e.equals(3|nt)?(this._findInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?rt(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):e.equals(18)?st(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):void 0}_onReplaceInputKeyDown(e){return e.equals(3|nt)?(pe.ED&&pe.tY&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(n.N("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(it,!0,0,0)),this._replaceInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?rt(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):e.equals(18)?st(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):void 0}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new Ae(null,this._contextViewProvider,{width:221,label:We,placeholder:Ve,appendCaseSensitiveLabel:this._keybindingLabelFor(V),appendWholeWordsLabel:this._keybindingLabelFor(H),appendRegexLabel:this._keybindingLabelFor($),validation:e=>{if(0===e.length||!this._findInput.getRegex())return null;try{return new RegExp(e,"gu"),null}catch(e){return{content:e.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118},this._contextKeyService,!0)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown((e=>this._onFindInputKeyDown(e)))),this._register(this._findInput.inputBox.onDidChange((()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)}))),this._register(this._findInput.onDidOptionChange((()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)}))),this._register(this._findInput.onCaseSensitiveKeyDown((e=>{e.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),e.preventDefault())}))),this._register(this._findInput.onRegexKeyDown((e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),e.preventDefault())}))),this._register(this._findInput.inputBox.onDidHeightChange((e=>{this._tryUpdateHeight()&&this._showViewZone()}))),pe.IJ&&this._register(this._findInput.onMouseDown((e=>this._onFindInputMouseDown(e)))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new lt({label:He+this._keybindingLabelFor(z),icon:Be,onTrigger:()=>{this._codeEditor.getAction(z).run().then(void 0,fe.dL)}})),this._nextBtn=this._register(new lt({label:$e+this._keybindingLabelFor(B),icon:ze,onTrigger:()=>{this._codeEditor.getAction(B).run().then(void 0,fe.dL)}}));let e=document.createElement("div");e.className="find-part",e.appendChild(this._findInput.domNode);const t=document.createElement("div");t.className="find-actions",e.appendChild(t),t.appendChild(this._matchesCount),t.appendChild(this._prevBtn.domNode),t.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new ie({icon:Te,title:Ue+this._keybindingLabelFor(U),isChecked:!1})),this._register(this._toggleSelectionFind.onChange((()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let e=this._codeEditor.getSelections();e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}else this._state.change({searchScope:null},!0)}))),t.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new lt({label:je+this._keybindingLabelFor(W),icon:Ie.s_,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),e.preventDefault())}})),t.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new Me(null,void 0,{label:qe,placeholder:Ke,appendPreserveCaseLabel:this._keybindingLabelFor(j),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown((e=>this._onReplaceInputKeyDown(e)))),this._register(this._replaceInput.inputBox.onDidChange((()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)}))),this._register(this._replaceInput.inputBox.onDidHeightChange((e=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()}))),this._register(this._replaceInput.onDidOptionChange((()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)}))),this._register(this._replaceInput.onPreserveCaseKeyDown((e=>{e.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),e.preventDefault())}))),this._replaceBtn=this._register(new lt({label:Ge+this._keybindingLabelFor(q),icon:Fe,onTrigger:()=>{this._controller.replace()},onKeyDown:e=>{e.equals(1026)&&(this._closeBtn.focus(),e.preventDefault())}})),this._replaceAllBtn=this._register(new lt({label:Ye+this._keybindingLabelFor(K),icon:Pe,onTrigger:()=>{this._controller.replaceAll()}}));let i=document.createElement("div");i.className="replace-part",i.appendChild(this._replaceInput.domNode);const n=document.createElement("div");n.className="replace-actions",i.appendChild(n),n.appendChild(this._replaceBtn.domNode),n.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new lt({label:Ze,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=Z.w(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.width="419px",this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(e),this._domNode.appendChild(i),this._resizeSash=new ge.g(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let o=et;this._register(this._resizeSash.onDidStart((()=>{o=Z.w(this._domNode)}))),this._register(this._resizeSash.onDidChange((e=>{this._resized=!0;let t=o+e.startX-e.currentX;t(parseFloat(Z.Dx(this._domNode).maxWidth)||0)||(this._domNode.style.width=`${t}px`,this._isReplaceVisible&&(this._replaceInput.width=Z.w(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())}))),this._register(this._resizeSash.onDidReset((()=>{const e=Z.w(this._domNode);if(e{this._opts.onTrigger(),e.preventDefault()})),this.onkeydown(this._domNode,(e=>{if(e.equals(10)||e.equals(3))return this._opts.onTrigger(),void e.preventDefault();this._opts.onKeyDown&&this._opts.onKeyDown(e)}))}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(..._.kS.asClassNameArray(Re)),this._domNode.classList.add(..._.kS.asClassNameArray(Oe))):(this._domNode.classList.remove(..._.kS.asClassNameArray(Oe)),this._domNode.classList.add(..._.kS.asClassNameArray(Re)))}}(0,_.Ic)(((e,t)=>{const i=(e,i)=>{i&&t.addRule(`.monaco-editor ${e} { background-color: ${i}; }`)};i(".findMatch",e.getColor(m.MU)),i(".currentFindMatch",e.getColor(m.ny)),i(".findScope",e.getColor(m.jU)),i(".find-widget",e.getColor(m.D0));const n=e.getColor(m.rh);n&&t.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${n}; }`);const o=e.getColor(m.Ei);o&&t.addRule(`.monaco-editor .findMatch { border: 1px ${"hc"===e.type?"dotted":"solid"} ${o}; box-sizing: border-box; }`);const r=e.getColor(m.pn);r&&t.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${r}; padding: 1px; box-sizing: border-box; }`);const s=e.getColor(m.gk);s&&t.addRule(`.monaco-editor .findScope { border: 1px ${"hc"===e.type?"dashed":"solid"} ${s}; }`);const a=e.getColor(m.lR);a&&t.addRule(`.monaco-editor .find-widget { border: 1px solid ${a}; }`);const l=e.getColor(m.Hf);l&&t.addRule(`.monaco-editor .find-widget { color: ${l}; }`);const c=e.getColor(m.Id);c&&t.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${c}; }`);const u=e.getColor(m.Ng);if(u)t.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${u}; }`);else{const i=e.getColor(m.D1);i&&t.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${i}; }`)}const h=e.getColor(m.R8);h&&t.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${h}; }`)}));var ct=i(4144),ut=i(4972),ht=i(5606),dt=i(1847),gt=i(6904),ft=i(9422),pt=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},mt=function(e,t){return function(i,n){t(i,n,e)}},_t=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function vt(e,t="single"){if(!e.hasModel())return null;const i=e.getSelection();if("single"===t&&i.startLineNumber===i.endLineNumber||"multiple"===t)if(i.isEmpty()){const t=e.getConfiguredWordAtPosition(i.getStartPosition());if(t)return t.word}else if(e.getModel().getValueLengthInRange(i)<524288)return e.getModel().getValueInRange(i);return null}let bt=class e extends r.JT{constructor(e,t,i,n){super(),this._editor=e,this._findWidgetVisible=A.bindTo(t),this._contextKeyService=t,this._storageService=i,this._clipboardService=n,this._updateHistoryDelayer=new o.vp(500),this._state=this._register(new he),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this._model=null,this._register(this._editor.onDidChangeModel((()=>{let e=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),e&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(33).loop})})))}get editor(){return this._editor}static get(t){return t.getContribution(e.ID)}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,0),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,0),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,0),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,0)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!M.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let e=this._editor.getSelections();e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._editor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=s.ec(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}_start(e){return _t(this,void 0,void 0,(function*(){if(this.disposeModel(),!this._editor.hasModel())return;let t={isRevealed:!0};if("single"===e.seedSearchStringFromSelection){let i=vt(this._editor,e.seedSearchStringFromSelection);i&&(this._state.isRegex?t.searchString=s.ec(i):t.searchString=i)}else if("multiple"===e.seedSearchStringFromSelection&&!e.updateSearchScope){let i=vt(this._editor,e.seedSearchStringFromSelection);i&&(t.searchString=i)}if(!t.searchString&&e.seedSearchStringFromGlobalClipboard){let e=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;e&&(t.searchString=e)}if(e.forceRevealReplace?t.isReplaceRevealed=!0:this._findWidgetVisible.get()||(t.isReplaceRevealed=!1),e.updateSearchScope){let e=this._editor.getSelections();e.some((e=>!e.isEmpty()))&&(t.searchScope=e)}t.loop=e.loop,this._state.change(t,!1),this._model||(this._model=new Y(this._editor,this._state))}))}start(e){return this._start(e)}moveToNextMatch(){return!!this._model&&(this._model.moveToNextMatch(),!0)}moveToPrevMatch(){return!!this._model&&(this._model.moveToPrevMatch(),!0)}replace(){return!!this._model&&(this._model.replace(),!0)}replaceAll(){return!!this._model&&(this._model.replaceAll(),!0)}selectAllMatches(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)}getGlobalBufferTerm(){return _t(this,void 0,void 0,(function*(){return this._editor.getOption(33).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}))}setGlobalBufferTerm(e){this._editor.getOption(33).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};bt.ID="editor.contrib.findController",bt=pt([mt(1,N.i6),mt(2,gt.Uy),mt(3,ut.p)],bt);let yt=class extends bt{constructor(e,t,i,n,o,r,s,a){super(e,i,s,a),this._contextViewService=t,this._keybindingService=n,this._themeService=o,this._notificationService=r,this._widget=null,this._findOptionsWidget=null}_start(e){const t=Object.create(null,{_start:{get:()=>super._start}});return _t(this,void 0,void 0,(function*(){this._widget||this._createFindWidget();const i=this._editor.getSelection();let n=!1;switch(this._editor.getOption(33).autoFindInSelection){case"always":n=!0;break;case"never":n=!1;break;case"multiline":n=!!i&&i.startLineNumber!==i.endLineNumber}e.updateSearchScope=n,yield t._start.call(this,e),this._widget&&(2===e.shouldFocus?this._widget.focusReplaceInput():1===e.shouldFocus&&this._widget.focusFindInput())}))}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new at(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new ce(this._editor,this._state,this._keybindingService,this._themeService))}};yt=pt([mt(1,ht.u),mt(2,N.i6),mt(3,dt.d),mt(4,_.XE),mt(5,ft.lT),mt(6,gt.Uy),mt(7,ut.p)],yt);const wt=(0,a.rn)(new a.jY({id:"actions.find",label:n.N("startFindAction","Find"),alias:"Find",precondition:N.Ao.or(l.u.focus,N.Ao.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:ct.eH.MenubarEditMenu,group:"3_find",title:n.N({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));wt.addImplementation(0,((e,t,i)=>{const n=bt.get(t);return!!n&&n.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getOption(33).seedSearchStringFromSelection?"single":"none",seedSearchStringFromGlobalClipboard:t.getOption(33).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(33).loop})}));class Ct extends a.R6{constructor(){super({id:"actions.findWithSelection",label:n.N("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}run(e,t){return _t(this,void 0,void 0,(function*(){let e=bt.get(t);e&&(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(33).loop}),e.setGlobalBufferTerm(e.getState().searchString))}))}}class St extends a.R6{run(e,t){return _t(this,void 0,void 0,(function*(){let e=bt.get(t);e&&!this._run(e)&&(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===e.getState().searchString.length&&t.getOption(33).seedSearchStringFromSelection?"single":"none",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(33).loop}),this._run(e))}))}}class xt extends St{constructor(){super({id:B,label:n.N("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:l.u.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:N.Ao.and(l.u.focus,M),primary:3,weight:100}]})}_run(e){return!!e.moveToNextMatch()&&(e.editor.pushUndoStop(),!0)}}class kt extends St{constructor(){super({id:z,label:n.N("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:l.u.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:N.Ao.and(l.u.focus,M),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}}class Dt extends a.R6{run(e,t){return _t(this,void 0,void 0,(function*(){let e=bt.get(t);if(!e)return;let i=vt(t);i&&e.setSearchString(i),this._run(e)||(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getOption(33).seedSearchStringFromSelection?"single":"none",seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(33).loop}),this._run(e))}))}}class Lt extends Dt{constructor(){super({id:"editor.action.nextSelectionMatchFindAction",label:n.N("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:l.u.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}class Nt extends Dt{constructor(){super({id:"editor.action.previousSelectionMatchFindAction",label:n.N("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:l.u.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}}const Et=(0,a.rn)(new a.jY({id:"editor.action.startFindReplaceAction",label:n.N("startReplace","Replace"),alias:"Replace",precondition:N.Ao.or(l.u.focus,N.Ao.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:ct.eH.MenubarEditMenu,group:"3_find",title:n.N({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));Et.addImplementation(0,((e,t,i)=>{if(!t.hasModel()||t.getOption(78))return!1;const n=bt.get(t);if(!n)return!1;const o=t.getSelection(),r=n.isFindInputFocused(),s=!o.isEmpty()&&o.startLineNumber===o.endLineNumber&&t.getOption(33).seedSearchStringFromSelection&&!r,a=r||s?2:1;return n.start({forceRevealReplace:!0,seedSearchStringFromSelection:s?"single":"none",seedSearchStringFromGlobalClipboard:t.getOption(33).seedSearchStringFromSelection,shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(33).loop})})),(0,a._K)(bt.ID,yt),(0,a.Qr)(Ct),(0,a.Qr)(xt),(0,a.Qr)(kt),(0,a.Qr)(Lt),(0,a.Qr)(Nt);const At=a._l.bindToContribution(bt.get);(0,a.fK)(new At({id:W,precondition:A,handler:e=>e.closeFindWidget(),kbOpts:{weight:105,kbExpr:N.Ao.and(l.u.focus,N.Ao.not("isComposing")),primary:9,secondary:[1033]}})),(0,a.fK)(new At({id:V,precondition:void 0,handler:e=>e.toggleCaseSensitive(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:T.primary,mac:T.mac,win:T.win,linux:T.linux}})),(0,a.fK)(new At({id:H,precondition:void 0,handler:e=>e.toggleWholeWords(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:R.primary,mac:R.mac,win:R.win,linux:R.linux}})),(0,a.fK)(new At({id:$,precondition:void 0,handler:e=>e.toggleRegex(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:O.primary,mac:O.mac,win:O.win,linux:O.linux}})),(0,a.fK)(new At({id:U,precondition:void 0,handler:e=>e.toggleSearchScope(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:F.primary,mac:F.mac,win:F.win,linux:F.linux}})),(0,a.fK)(new At({id:j,precondition:void 0,handler:e=>e.togglePreserveCase(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:P.primary,mac:P.mac,win:P.win,linux:P.linux}})),(0,a.fK)(new At({id:q,precondition:A,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:3094}})),(0,a.fK)(new At({id:q,precondition:A,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:N.Ao.and(l.u.focus,I),primary:3}})),(0,a.fK)(new At({id:K,precondition:A,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:2563}})),(0,a.fK)(new At({id:K,precondition:A,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:N.Ao.and(l.u.focus,I),primary:void 0,mac:{primary:2051}}})),(0,a.fK)(new At({id:"editor.action.selectAllMatches",precondition:A,handler:e=>e.selectAllMatches(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:515}}))},2943:(e,t,i)=>{"use strict";i.r(t),i.d(t,{FoldingController:()=>G,editorFoldForeground:()=>te,foldBackgroundBackground:()=>ee});var n=i(3580),o=i(8401),r=i(7295),s=i(5393),a=i(2258),l=i(5976),c=i(6830),u=i(4669);const h=16777215,d=4278190080;class g{constructor(e,t,i){if(e.length!==t.length||e.length>65535)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new Uint32Array(Math.ceil(e.length/32)),this._types=i,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;let e=[],t=(t,i)=>{let n=e[e.length-1];return this.getStartLineNumber(n)<=t&&this.getEndLineNumber(n)>=i};for(let i=0,n=this._startIndexes.length;ih||o>h)throw new Error("startLineNumber or endLineNumber must not exceed 16777215");for(;e.length>0&&!t(n,o);)e.pop();let r=e.length>0?e[e.length-1]:-1;e.push(i),this._startIndexes[i]=n+((255&r)<<24),this._endIndexes[i]=o+((65280&r)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&h}getEndLineNumber(e){return this._endIndexes[e]&h}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){let t=e/32|0,i=e%32;return 0!=(this._collapseStates[t]&1<>>24)+((this._endIndexes[e]&d)>>>16);return 65535===t?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,i=this._startIndexes.length;if(0===i)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);-1!==t;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){let e=[];for(let t=0;t=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}class p{constructor(e,t){this._updateEventEmitter=new u.Q5,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new g(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[],this._isInitialized=!1}get regions(){return this._regions}get textModel(){return this._textModel}get isInitialized(){return this._isInitialized}toggleCollapseState(e){if(!e.length)return;e=e.sort(((e,t)=>e.regionIndex-t.regionIndex));const t={};this._decorationProvider.changeDecorations((i=>{let n=0,o=-1,r=-1;const s=e=>{for(;nr&&(r=e),n++}};for(let i of e){let e=i.regionIndex,n=this._editorDecorationIds[e];if(n&&!t[n]){t[n]=!0,s(e);let i=!this._regions.isCollapsed(e);this._regions.setCollapsed(e,i),o=Math.max(o,this._regions.getEndLineNumber(e))}}s(this._regions.length)})),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}update(e,t=[]){let i=[],n=-1,o=(o,r)=>{const s=e.getStartLineNumber(o),a=e.getEndLineNumber(o);r&&((e,i)=>{for(let n of t)if(en&&(n=a)},r=0,s=()=>{for(;r=t))break;o(a,i===t),a++}}l=s()}for(;a0)return e}applyMemento(e){if(!Array.isArray(e))return;let t=[];for(let i of e){let e=this.getRegionAtLine(i.startLineNumber);e&&!e.isCollapsed&&t.push(e)}this.toggleCollapseState(t)}dispose(){this._decorationProvider.deltaDecorations(this._editorDecorationIds,[])}getAllRegionsAtLine(e,t){let i=[];if(this._regions){let n=this._regions.findRange(e),o=1;for(;n>=0;){let e=this._regions.toRegion(n);t&&!t(e,o)||i.push(e),o++,n=e.parentIndex}}return i}getRegionAtLine(e){if(this._regions){let t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){let i=[],n=e?e.regionIndex+1:0,o=e?e.endLineNumber:Number.MAX_VALUE;if(t&&2===t.length){const e=[];for(let r=n,s=this._regions.length;r0&&!n.containedBy(e[e.length-1]);)e.pop();e.push(n),t(n,e.length)&&i.push(n)}}else for(let e=n,r=this._regions.length;e0)for(let r of n){let n=e.getRegionAtLine(r);if(n&&(n.isCollapsed!==t&&o.push(n),i>1)){let r=e.getRegionsInside(n,((e,n)=>e.isCollapsed!==t&&ne.isCollapsed!==t&&ne.isCollapsed!==t&&n<=i));o.push(...n)}e.toggleCollapseState(o)}function v(e,t,i){let n=[];for(let t of i)n.push(e.getAllRegionsAtLine(t,void 0)[0]);let o=e.getRegionsInside(null,(e=>n.every((t=>!t.containedBy(e)&&!e.containedBy(t)))&&e.isCollapsed!==t));e.toggleCollapseState(o)}function b(e,t,i){let n=e.textModel,o=e.regions,r=[];for(let e=o.length-1;e>=0;e--)if(i!==o.isCollapsed(e)){let i=o.getStartLineNumber(e);t.test(n.getLineContent(i))&&r.push(o.toRegion(e))}e.toggleCollapseState(r)}function y(e,t,i){let n=e.regions,o=[];for(let e=n.length-1;e>=0;e--)i!==n.isCollapsed(e)&&t===n.getType(e)&&o.push(n.toRegion(e));e.toggleCollapseState(o)}var w=i(3411),C=i(3046),S=i(9554),x=i(7781);const k=(0,S.q5)("folding-expanded",C.lA.chevronDown,(0,n.N)("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),D=(0,S.q5)("folding-collapsed",C.lA.chevronRight,(0,n.N)("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin."));class L{constructor(e){this.editor=e,this.autoHideFoldingControls=!0,this.showFoldingHighlights=!0}getDecorationOption(e,t){return t?L.HIDDEN_RANGE_DECORATION:e?this.showFoldingHighlights?L.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:L.COLLAPSED_VISUAL_DECORATION:this.autoHideFoldingControls?L.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:L.EXPANDED_VISUAL_DECORATION}deltaDecorations(e,t){return this.editor.deltaDecorations(e,t)}changeDecorations(e){return this.editor.changeDecorations(e)}}L.COLLAPSED_VISUAL_DECORATION=w.qx.register({description:"folding-collapsed-visual-decoration",stickiness:1,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:x.kS.asClassName(D)}),L.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=w.qx.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:1,afterContentClassName:"inline-folded",className:"folded-background",isWholeLine:!0,firstLineDecorationClassName:x.kS.asClassName(D)}),L.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=w.qx.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:x.kS.asClassName(k)}),L.EXPANDED_VISUAL_DECORATION=w.qx.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+x.kS.asClassName(k)}),L.HIDDEN_RANGE_DECORATION=w.qx.register({description:"folding-hidden-range-decoration",stickiness:1});var N=i(9102),E=i(4314),A=i(9488);class M{constructor(e){this._updateEventEmitter=new u.Q5,this._foldingModel=e,this._foldingModelListener=e.onDidChange((e=>this.updateHiddenRanges())),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}updateHiddenRanges(){let e=!1,t=[],i=0,n=0,o=Number.MAX_VALUE,r=-1,s=this._foldingModel.regions;for(;i({startLineNumber:e.startLineNumber-1,endLineNumber:e.endLineNumber})))}applyHiddenRanges(e){this._hiddenRanges=e,this._updateEventEmitter.fire(e)}hasRanges(){return this._hiddenRanges.length>0}isHidden(e){return null!==I(this._hiddenRanges,e)}adjustSelections(e){let t=!1,i=this._foldingModel.textModel,n=null,o=e=>(n&&function(e,t){return e>=t.startLineNumber&&e<=t.endLineNumber}(e,n)||(n=I(this._hiddenRanges,e)),n?n.startLineNumber-1:null);for(let n=0,r=e.length;n0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function I(e,t){let i=(0,A.lG)(e,(e=>t=0&&e[i].endLineNumber>=t?e[i]:null}var T=i(3831);class R{constructor(e){this.editorModel=e,this.id="indent"}dispose(){}compute(e){let t=T.zu.getFoldingRules(this.editorModel.getLanguageIdentifier().id),i=t&&!!t.offSide,n=t&&t.markers;return Promise.resolve(function(e,t,i,n=5e3){const o=e.getOptions().tabSize;let r,s=new O(n);i&&(r=new RegExp(`(${i.start.source})|(?:${i.end.source})`));let a=[],l=e.getLineCount()+1;a.push({indent:-1,endAbove:l,line:l});for(let i=e.getLineCount();i>0;i--){let n,l=e.getLineContent(i),c=w.yO.computeIndentLevel(l,o),u=a[a.length-1];if(-1!==c){if(r&&(n=l.match(r))){if(!n[1]){a.push({indent:-2,endAbove:i,line:i});continue}{let e=a.length-1;for(;e>0&&-2!==a[e].indent;)e--;if(e>0){a.length=e+1,u=a[e],s.insertFirst(i,u.line,c),u.line=i,u.indent=c,u.endAbove=i;continue}}}if(u.indent>c){do{a.pop(),u=a[a.length-1]}while(u.indent>c);let e=u.endAbove-1;e-i>=1&&s.insertFirst(i,e,c)}u.indent===c?u.endAbove=i:a.push({indent:c,endAbove:i,line:i})}else t&&(u.endAbove=i)}return s.toIndentRanges(e)}(this.editorModel,i,n))}}class O{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,i){if(e>h||t>h)return;let n=this._length;this._startIndexes[n]=e,this._endIndexes[n]=t,this._length++,i<1e3&&(this._indentOccurrences[i]=(this._indentOccurrences[i]||0)+1)}toIndentRanges(e){if(this._length<=this._foldingRangesLimit){let e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=this._length-1,n=0;i>=0;i--,n++)e[n]=this._startIndexes[i],t[n]=this._endIndexes[i];return new g(e,t)}{let t=0,i=this._indentOccurrences.length;for(let e=0;ethis._foldingRangesLimit){i=e;break}t+=n}}const n=e.getOptions().tabSize;let o=new Uint32Array(this._foldingRangesLimit),r=new Uint32Array(this._foldingRangesLimit);for(let s=this._length-1,a=0;s>=0;s--){let l=this._startIndexes[s],c=e.getLineContent(l),u=w.yO.computeIndentLevel(c,n);(uPromise.resolve(e.provideFoldingRanges(t,B,i)).then((e=>{if(!i.isCancellationRequested&&Array.isArray(e)){Array.isArray(n)||(n=[]);let i=t.getLineCount();for(let t of e)t.start>0&&t.end>t.start&&t.end<=i&&n.push({start:t.start,end:t.end,rank:o,kind:t.kind})}}),P.Cp)));return Promise.all(o).then((e=>n))}(this.providers,this.editorModel,e).then((e=>e?H(e,this.limit):null))}dispose(){var e;null===(e=this.disposables)||void 0===e||e.dispose()}}class V{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,i,n){if(e>h||t>h)return;let o=this._length;this._startIndexes[o]=e,this._endIndexes[o]=t,this._nestingLevels[o]=n,this._types[o]=i,this._length++,n<30&&(this._nestingLevelCounts[n]=(this._nestingLevelCounts[n]||0)+1)}toIndentRanges(){if(this._length<=this._foldingRangesLimit){let e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=0;ithis._foldingRangesLimit){t=i;break}e+=n}}let i=new Uint32Array(this._foldingRangesLimit),n=new Uint32Array(this._foldingRangesLimit),o=[];for(let r=0,s=0;r{let i=e.start-t.start;return 0===i&&(i=e.rank-t.rank),i})),o=new V(t),r=[];for(let e of n)if(i){if(e.start>i.start)if(e.end<=i.end)r.push(i),i=e,o.add(e.start,e.end,e.kind&&e.kind.value,r.length);else{if(e.start>i.end){do{i=r.pop()}while(i&&e.start>i.end);i&&r.push(i),i=e}o.add(e.start,e.end,e.kind&&e.kind.value,r.length)}}else i=e,o.add(e.start,e.end,e.kind&&e.kind.value,r.length);return o.toIndentRanges()}const $="init";class U{constructor(e,t,i,n){if(this.editorModel=e,this.id=$,t.length){let o=t=>({range:{startLineNumber:t.startLineNumber,startColumn:0,endLineNumber:t.endLineNumber,endColumn:e.getLineLength(t.endLineNumber)},options:{description:"folding-initializing-range-provider",stickiness:1}});this.decorationIds=e.deltaDecorations([],t.map(o)),this.timeout=setTimeout(i,n)}}dispose(){this.decorationIds&&(this.editorModel.deltaDecorations(this.decorationIds,[]),this.decorationIds=void 0),"number"==typeof this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0)}compute(e){let t=[];if(this.decorationIds)for(let e of this.decorationIds){let i=this.editorModel.getDecorationRange(e);i&&t.push({start:i.startLineNumber,end:i.endLineNumber,rank:1})}return Promise.resolve(H(t,Number.MAX_VALUE))}}var j=i(8819),q=i(3910);const K=new j.uy("foldingEnabled",!1);let G=class e extends l.JT{constructor(e,t){super(),this.contextKeyService=t,this.localToDispose=this._register(new l.SL),this.editor=e;const i=this.editor.getOptions();this._isEnabled=i.get(35),this._useFoldingProviders="indentation"!==i.get(36),this._unfoldOnClickAfterEndOfLine=i.get(38),this._restoringViewState=!1,this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingStateMemento=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new L(e),this.foldingDecorationProvider.autoHideFoldingControls="mouseover"===i.get(97),this.foldingDecorationProvider.showFoldingHighlights=i.get(37),this.foldingEnabled=K.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel((()=>this.onModelChanged()))),this._register(this.editor.onDidChangeConfiguration((e=>{if(e.hasChanged(35)&&(this._isEnabled=this.editor.getOptions().get(35),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),e.hasChanged(97)||e.hasChanged(37)){const e=this.editor.getOptions();this.foldingDecorationProvider.autoHideFoldingControls="mouseover"===e.get(97),this.foldingDecorationProvider.showFoldingHighlights=e.get(37),this.onModelContentChanged()}e.hasChanged(36)&&(this._useFoldingProviders="indentation"!==this.editor.getOptions().get(36),this.onFoldingStrategyChanged()),e.hasChanged(38)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(38))}))),this.onModelChanged()}static get(t){return t.getContribution(e.ID)}saveViewState(){let e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){let t=this.foldingModel.isInitialized?this.foldingModel.getMemento():this.hiddenRangeModel.getMemento(),i=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:i}}}restoreViewState(e){let t=this.editor.getModel();if(!t||!this._isEnabled||t.isTooLargeForTokenization()||!this.hiddenRangeModel)return;if(!e||!e.collapsedRegions||e.lineCount!==t.getLineCount())return;e.provider!==z&&e.provider!==$||(this.foldingStateMemento=e);const i=e.collapsedRegions;if(this.hiddenRangeModel.applyMemento(i)){const e=this.getFoldingModel();e&&e.then((e=>{if(e){this._restoringViewState=!0;try{e.applyMemento(i)}finally{this._restoringViewState=!1}}})).then(void 0,P.dL)}}onModelChanged(){this.localToDispose.clear();let e=this.editor.getModel();this._isEnabled&&e&&!e.isTooLargeForTokenization()&&(this.foldingModel=new p(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new M(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange((e=>this.onHiddenRangesChanges(e)))),this.updateScheduler=new s.vp(200),this.cursorChangedScheduler=new s.pY((()=>this.revealCursor()),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(F.aC.onDidChange((()=>this.onFoldingStrategyChanged()))),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration((()=>this.onFoldingStrategyChanged()))),this.localToDispose.add(this.editor.onDidChangeModelContent((()=>this.onModelContentChanged()))),this.localToDispose.add(this.editor.onDidChangeCursorPosition((()=>this.onCursorPositionChanged()))),this.localToDispose.add(this.editor.onMouseDown((e=>this.onEditorMouseDown(e)))),this.localToDispose.add(this.editor.onMouseUp((e=>this.onEditorMouseUp(e)))),this.localToDispose.add({dispose:()=>{this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.updateScheduler&&this.updateScheduler.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,this.foldingStateMemento=null,this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null}}),this.onModelContentChanged())}onFoldingStrategyChanged(){this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null,this.onModelContentChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;if(this.rangeProvider=new R(e),this._useFoldingProviders&&this.foldingModel){let t=F.aC.ordered(this.foldingModel.textModel);if(0===t.length&&this.foldingStateMemento&&this.foldingStateMemento.collapsedRegions)return this.rangeProvider=new U(e,this.foldingStateMemento.collapsedRegions,(()=>{this.foldingStateMemento=null,this.onFoldingStrategyChanged()}),3e4);t.length>0&&(this.rangeProvider=new W(e,t,(()=>this.onModelContentChanged())))}return this.foldingStateMemento=null,this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onModelContentChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger((()=>{const e=this.foldingModel;if(!e)return null;let t=this.foldingRegionPromise=(0,s.PG)((t=>this.getRangeProvider(e.textModel).compute(t)));return t.then((i=>{if(i&&t===this.foldingRegionPromise){let t=this.editor.getSelections(),n=t?t.map((e=>e.startLineNumber)):[];e.update(i,n)}return e}))})).then(void 0,(e=>((0,P.dL)(e),null))))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){let e=this.editor.getSelections();e&&this.hiddenRangeModel.adjustSelections(e)&&this.editor.setSelections(e)}this.editor.setHiddenAreas(e)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();e&&e.then((e=>{if(e){let t=this.editor.getSelections();if(t&&t.length>0){let i=[];for(let n of t){let t=n.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(t)&&i.push(...e.getAllRegionsAtLine(t,(e=>e.isCollapsed&&t>e.startLineNumber)))}i.length&&(e.toggleCollapseState(i),this.reveal(t[0].getPosition()))}}})).then(void 0,P.dL)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range)return;if(!e.event.leftButton&&!e.event.middleButton)return;const t=e.target.range;let i=!1;switch(e.target.type){case 4:const n=e.target.detail,o=e.target.element.offsetLeft;if(n.offsetX-o<5)return;i=!0;break;case 7:if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return;case 6:if(this.hiddenRangeModel.hasRanges()){let e=this.editor.getModel();if(e&&t.startColumn===e.getLineMaxColumn(t.startLineNumber))break}return;default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:i}}onEditorMouseUp(e){const t=this.getFoldingModel();if(!t||!this.mouseDownInfo||!e.target)return;let i=this.mouseDownInfo.lineNumber,n=this.mouseDownInfo.iconClicked,o=e.target.range;if(o&&o.startLineNumber===i){if(n){if(4!==e.target.type)return}else{let e=this.editor.getModel();if(!e||o.startColumn!==e.getLineMaxColumn(i))return}t.then((t=>{if(t){let o=t.getRegionAtLine(i);if(o&&o.startLineNumber===i){let r=o.isCollapsed;if(n||r){let n=[];if(e.event.altKey){let e=e=>!e.containedBy(o)&&!o.containedBy(e),i=t.getRegionsInside(null,e);for(const e of i)e.isCollapsed&&n.push(e);0===n.length&&(n=i)}else{let i=e.event.middleButton||e.event.shiftKey;if(i)for(const e of t.getRegionsInside(o))e.isCollapsed===r&&n.push(e);!r&&i&&0!==n.length||n.push(o)}t.toggleCollapseState(n),this.reveal({lineNumber:i,column:1})}}}})).then(void 0,P.dL)}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};var Y,Z;G.ID="editor.contrib.folding",G=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(Y=1,Z=j.i6,function(e,t){Z(e,t,Y)})],G);class X extends c.R6{runEditorCommand(e,t,i){let n=G.get(t);if(!n)return;let o=n.getFoldingModel();return o?(this.reportTelemetry(e,t),o.then((e=>{if(e){this.invoke(n,e,t,i);const o=t.getSelection();o&&n.reveal(o.getStartPosition())}}))):void 0}getSelectedLines(e){let t=e.getSelections();return t?t.map((e=>e.startLineNumber)):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map((e=>e+1)):this.getSelectedLines(t)}run(e,t){}}function Q(e){if(!o.o8(e)){if(!o.Kn(e))return!1;const t=e;if(!o.o8(t.levels)&&!o.hj(t.levels))return!1;if(!o.o8(t.direction)&&!o.HD(t.direction))return!1;if(!(o.o8(t.selectionLines)||o.kJ(t.selectionLines)&&t.selectionLines.every(o.hj)))return!1}return!0}class J extends X{getFoldingLevel(){return parseInt(this.id.substr(J.ID_PREFIX.length))}invoke(e,t,i){!function(e,t,i,n){let o=e.getRegionsInside(null,((e,i)=>i===t&&true!==e.isCollapsed&&!n.some((t=>e.containsLine(t)))));e.toggleCollapseState(o)}(t,this.getFoldingLevel(),0,this.getSelectedLines(i))}}J.ID_PREFIX="editor.foldLevel",J.ID=e=>J.ID_PREFIX+e,(0,c._K)(G.ID,G),(0,c.Qr)(class extends X{constructor(){super({id:"editor.unfold",label:n.N("unfoldAction.label","Unfold"),alias:"Unfold",precondition:K,kbOpts:{kbExpr:N.u.editorTextFocus,primary:3161,mac:{primary:2649},weight:100},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t* 'levels': Number of levels to unfold. If not set, defaults to 1.\n\t\t\t\t\t\t* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.\n\t\t\t\t\t\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t",constraint:Q,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){let o=n&&n.levels||1,r=this.getLineNumbers(n,i);n&&"up"===n.direction?_(t,!1,o,r):m(t,!1,o,r)}}),(0,c.Qr)(class extends X{constructor(){super({id:"editor.unfoldRecursively",label:n.N("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:K,kbOpts:{kbExpr:N.u.editorTextFocus,primary:(0,a.gx)(2089,2137),weight:100}})}invoke(e,t,i,n){m(t,!1,Number.MAX_VALUE,this.getSelectedLines(i))}}),(0,c.Qr)(class extends X{constructor(){super({id:"editor.fold",label:n.N("foldAction.label","Fold"),alias:"Fold",precondition:K,kbOpts:{kbExpr:N.u.editorTextFocus,primary:3159,mac:{primary:2647},weight:100},description:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t\t* 'levels': Number of levels to fold.\n\t\t\t\t\t\t\t* 'direction': If 'up', folds given number of levels up otherwise folds down.\n\t\t\t\t\t\t\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t\tIf no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.\n\t\t\t\t\t\t",constraint:Q,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){let o=this.getLineNumbers(n,i);const r=n&&n.levels,s=n&&n.direction;"number"!=typeof r&&"string"!=typeof s?function(e,t,i){let n=[];for(let t of i){let i=e.getAllRegionsAtLine(t,(e=>true!==e.isCollapsed));i.length>0&&n.push(i[0])}e.toggleCollapseState(n)}(t,0,o):"up"===s?_(t,!0,r||1,o):m(t,!0,r||1,o)}}),(0,c.Qr)(class extends X{constructor(){super({id:"editor.foldRecursively",label:n.N("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:K,kbOpts:{kbExpr:N.u.editorTextFocus,primary:(0,a.gx)(2089,2135),weight:100}})}invoke(e,t,i){let n=this.getSelectedLines(i);m(t,!0,Number.MAX_VALUE,n)}}),(0,c.Qr)(class extends X{constructor(){super({id:"editor.foldAll",label:n.N("foldAllAction.label","Fold All"),alias:"Fold All",precondition:K,kbOpts:{kbExpr:N.u.editorTextFocus,primary:(0,a.gx)(2089,2069),weight:100}})}invoke(e,t,i){m(t,!0)}}),(0,c.Qr)(class extends X{constructor(){super({id:"editor.unfoldAll",label:n.N("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:K,kbOpts:{kbExpr:N.u.editorTextFocus,primary:(0,a.gx)(2089,2088),weight:100}})}invoke(e,t,i){m(t,!1)}}),(0,c.Qr)(class extends X{constructor(){super({id:"editor.foldAllBlockComments",label:n.N("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:K,kbOpts:{kbExpr:N.u.editorTextFocus,primary:(0,a.gx)(2089,2133),weight:100}})}invoke(e,t,i){if(t.regions.hasTypes())y(t,F.AD.Comment.value,!0);else{const e=i.getModel();if(!e)return;let n=T.zu.getComments(e.getLanguageIdentifier().id);n&&n.blockCommentStartToken&&b(t,new RegExp("^\\s*"+(0,r.ec)(n.blockCommentStartToken)),!0)}}}),(0,c.Qr)(class extends X{constructor(){super({id:"editor.foldAllMarkerRegions",label:n.N("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:K,kbOpts:{kbExpr:N.u.editorTextFocus,primary:(0,a.gx)(2089,2077),weight:100}})}invoke(e,t,i){if(t.regions.hasTypes())y(t,F.AD.Region.value,!0);else{const e=i.getModel();if(!e)return;let n=T.zu.getFoldingRules(e.getLanguageIdentifier().id);n&&n.markers&&n.markers.start&&b(t,new RegExp(n.markers.start),!0)}}}),(0,c.Qr)(class extends X{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:n.N("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:K,kbOpts:{kbExpr:N.u.editorTextFocus,primary:(0,a.gx)(2089,2078),weight:100}})}invoke(e,t,i){if(t.regions.hasTypes())y(t,F.AD.Region.value,!1);else{const e=i.getModel();if(!e)return;let n=T.zu.getFoldingRules(e.getLanguageIdentifier().id);n&&n.markers&&n.markers.start&&b(t,new RegExp(n.markers.start),!1)}}}),(0,c.Qr)(class extends X{constructor(){super({id:"editor.foldAllExcept",label:n.N("foldAllExcept.label","Fold All Regions Except Selected"),alias:"Fold All Regions Except Selected",precondition:K,kbOpts:{kbExpr:N.u.editorTextFocus,primary:(0,a.gx)(2089,2131),weight:100}})}invoke(e,t,i){v(t,!0,this.getSelectedLines(i))}}),(0,c.Qr)(class extends X{constructor(){super({id:"editor.unfoldAllExcept",label:n.N("unfoldAllExcept.label","Unfold All Regions Except Selected"),alias:"Unfold All Regions Except Selected",precondition:K,kbOpts:{kbExpr:N.u.editorTextFocus,primary:(0,a.gx)(2089,2129),weight:100}})}invoke(e,t,i){v(t,!1,this.getSelectedLines(i))}}),(0,c.Qr)(class extends X{constructor(){super({id:"editor.toggleFold",label:n.N("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:K,kbOpts:{kbExpr:N.u.editorTextFocus,primary:(0,a.gx)(2089,2090),weight:100}})}invoke(e,t,i){!function(e,t,i){let n=[];for(let t of i){let i=e.getRegionAtLine(t);if(i){i.isCollapsed;n.push(i),0}}e.toggleCollapseState(n)}(t,0,this.getSelectedLines(i))}});for(let e=1;e<=7;e++)(0,c.QG)(new J({id:J.ID(e),label:n.N("foldLevelAction.label","Fold Level {0}",e),alias:`Fold Level ${e}`,precondition:K,kbOpts:{kbExpr:N.u.editorTextFocus,primary:(0,a.gx)(2089,2048|21+e),weight:100}}));const ee=(0,q.P6)("editor.foldBackground",{light:(0,q.Zn)(q.hE,.3),dark:(0,q.Zn)(q.hE,.3),hc:null},n.N("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0),te=(0,q.P6)("editorGutter.foldingControlForeground",{dark:q.XZ,light:q.XZ,hc:q.XZ},n.N("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));(0,x.Ic)(((e,t)=>{const i=e.getColor(ee);i&&t.addRule(`.monaco-editor .folded-background { background-color: ${i}; }`);const n=e.getColor(te);n&&t.addRule(`\n\t\t.monaco-editor .cldr${x.kS.asCSSSelector(k)},\n\t\t.monaco-editor .cldr${x.kS.asCSSSelector(D)} {\n\t\t\tcolor: ${n} !important;\n\t\t}\n\t\t`)}))},3111:(e,t,i)=>{"use strict";i.r(t);var n=i(3580),o=i(6830),r=i(2334);class s extends o.R6{constructor(){super({id:"editor.action.fontZoomIn",label:n.N("EditorFontZoomIn.label","Editor Font Zoom In"),alias:"Editor Font Zoom In",precondition:void 0})}run(e,t){r.C.setZoomLevel(r.C.getZoomLevel()+1)}}class a extends o.R6{constructor(){super({id:"editor.action.fontZoomOut",label:n.N("EditorFontZoomOut.label","Editor Font Zoom Out"),alias:"Editor Font Zoom Out",precondition:void 0})}run(e,t){r.C.setZoomLevel(r.C.getZoomLevel()-1)}}class l extends o.R6{constructor(){super({id:"editor.action.fontZoomReset",label:n.N("EditorFontZoomReset.label","Editor Font Zoom Reset"),alias:"Editor Font Zoom Reset",precondition:void 0})}run(e,t){r.C.setZoomLevel(0)}}(0,o.Qr)(s),(0,o.Qr)(a),(0,o.Qr)(l)},3606:(e,t,i)=>{"use strict";i.d(t,{xC:()=>L,Zg:()=>k,x$:()=>N,Qq:()=>A,Qs:()=>I});var n=i(5152),o=i(9488),r=i(1050),s=i(7301),a=i(666),l=i(9925),c=i(5520),u=i(187),h=i(4314),d=i(3860),g=i(4101),f=i(469),p=i(1200),m=i(9939),_=i(3580);class v{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return"string"==typeof e?e.toLowerCase():e._lower}}var b=i(2065),y=i(1741),w=i(4565),C=i(8401),S=i(3725),x=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function k(e){if(!(e=e.filter((e=>e.range))).length)return;let{range:t}=e[0];for(let i=1;ie.provideDocumentRangeFormattingEdits(t,t.getFullModelRange(),i,n)})}return t}class L{static setFormatterSelector(e){return{dispose:L._selectors.unshift(e)}}static select(e,t,i){return x(this,void 0,void 0,(function*(){if(0===e.length)return;const n=S.$.first(L._selectors);return n?yield n(e,t,i):void 0}))}}function N(e,t,i,n,o,r){return x(this,void 0,void 0,(function*(){const s=e.get(b.TG),a=(0,c.CL)(t)?t.getModel():t,l=g.vN.ordered(a),u=yield L.select(l,a,n);u&&(o.report(u),yield s.invokeFunction(E,u,t,i,r))}))}function E(e,t,i,n,r){return x(this,void 0,void 0,(function*(){const s=e.get(f.p);let a,u;(0,c.CL)(i)?(a=i.getModel(),u=new l.Dl(i,5,void 0,r)):(a=i,u=new l.YQ(i,r));let g=[],p=0;for(let e of(0,o._2)(n).sort(h.e.compareRangesUsingStarts))p>0&&h.e.areIntersectingOrTouching(g[p-1],e)?g[p-1]=h.e.fromPositions(g[p-1].getStartPosition(),e.getEndPosition()):p=g.push(e);const _=[];for(let e of g)try{const i=yield t.provideDocumentRangeFormattingEdits(a,e,a.getFormattingOptions(),u.token),n=yield s.computeMoreMinimalEdits(a.uri,i);if(n&&_.push(...n),u.token.isCancellationRequested)return!0}finally{u.dispose()}if(0===_.length)return!1;if((0,c.CL)(i))m.V.execute(i,_,!0),k(_),i.revealPositionInCenterIfOutsideViewport(i.getPosition(),1);else{const[{range:e}]=_,t=new d.Y(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);a.pushEditOperations([t],_.map((e=>({text:e.text,range:h.e.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(h.e.areIntersectingOrTouching(i,t))return[new d.Y(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return!0}))}function A(e,t,i,n,o){return x(this,void 0,void 0,(function*(){const r=e.get(b.TG),s=(0,c.CL)(t)?t.getModel():t,a=D(s),l=yield L.select(a,s,i);l&&(n.report(l),yield r.invokeFunction(M,l,t,i,o))}))}function M(e,t,i,n,o){return x(this,void 0,void 0,(function*(){const r=e.get(f.p);let s,a,u;(0,c.CL)(i)?(s=i.getModel(),a=new l.Dl(i,5,void 0,o)):(s=i,a=new l.YQ(i,o));try{const e=yield t.provideDocumentFormattingEdits(s,s.getFormattingOptions(),a.token);if(u=yield r.computeMoreMinimalEdits(s.uri,e),a.token.isCancellationRequested)return!0}finally{a.dispose()}if(!u||0===u.length)return!1;if((0,c.CL)(i))m.V.execute(i,u,2!==n),2!==n&&(k(u),i.revealPositionInCenterIfOutsideViewport(i.getPosition(),1));else{const[{range:e}]=u,t=new d.Y(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);s.pushEditOperations([t],u.map((e=>({text:e.text,range:h.e.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(h.e.areIntersectingOrTouching(i,t))return[new d.Y(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return!0}))}function I(e,t,i,n,o){const a=g.ln.ordered(t);return 0===a.length||a[0].autoFormatTriggerCharacters.indexOf(n)<0?Promise.resolve(void 0):Promise.resolve(a[0].provideOnTypeFormattingEdits(t,i,n,o,r.T.None)).catch(s.Cp).then((i=>e.computeMoreMinimalEdits(t.uri,i)))}L._selectors=new y.S,w.P.registerCommand("_executeFormatRangeProvider",(function(e,...t){const[i,n,l]=t;(0,C.p_)(a.o.isUri(i)),(0,C.p_)(h.e.isIRange(n));const c=e.get(p.q).getModel(i);if(!c)throw(0,s.b1)("resource");return function(e,t,i,n,r){return x(this,void 0,void 0,(function*(){const a=g.vN.ordered(t);for(const l of a){let a=yield Promise.resolve(l.provideDocumentRangeFormattingEdits(t,i,n,r)).catch(s.Cp);if((0,o.Of)(a))return yield e.computeMoreMinimalEdits(t.uri,a)}}))}(e.get(f.p),c,h.e.lift(n),l,r.T.None)})),w.P.registerCommand("_executeFormatDocumentProvider",(function(e,...t){const[i,n]=t;(0,C.p_)(a.o.isUri(i));const l=e.get(p.q).getModel(i);if(!l)throw(0,s.b1)("resource");return function(e,t,i,n){return x(this,void 0,void 0,(function*(){const r=D(t);for(const a of r){let r=yield Promise.resolve(a.provideDocumentFormattingEdits(t,i,n)).catch(s.Cp);if((0,o.Of)(r))return yield e.computeMoreMinimalEdits(t.uri,r)}}))}(e.get(f.p),l,n,r.T.None)})),w.P.registerCommand("_executeFormatOnTypeProvider",(function(e,...t){const[i,n,o,r]=t;(0,C.p_)(a.o.isUri(i)),(0,C.p_)(u.L.isIPosition(n)),(0,C.p_)("string"==typeof o);const l=e.get(p.q).getModel(i);if(!l)throw(0,s.b1)("resource");return I(e.get(f.p),l,u.L.lift(n),o,r)}))},4818:(e,t,i)=>{"use strict";i.r(t);var n=i(9488),o=i(1050),r=i(2258),s=i(5976),a=i(6830),l=i(1640),c=i(4906),u=i(4314),h=i(9102),d=i(4101),g=i(469),f=i(3606),p=i(9939),m=i(3580),_=i(4565),v=i(8819),b=i(2065),y=i(7301),w=i(535),C=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},S=function(e,t){return function(i,n){t(i,n,e)}},x=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};let k=class{constructor(e,t){this._workerService=t,this._callOnDispose=new s.SL,this._callOnModel=new s.SL,this._editor=e,this._callOnDispose.add(e.onDidChangeConfiguration((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModel((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModelLanguage((()=>this._update()))),this._callOnDispose.add(d.ln.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){if(this._callOnModel.clear(),!this._editor.getOption(45))return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),[t]=d.ln.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;let i=new c.q;for(let e of t.autoFormatTriggerCharacters)i.add(e.charCodeAt(0));this._callOnModel.add(this._editor.onDidType((e=>{let t=e.charCodeAt(e.length-1);i.has(t)&&this._trigger(String.fromCharCode(t))})))}_trigger(e){if(!this._editor.hasModel())return;if(this._editor.getSelections().length>1)return;const t=this._editor.getModel(),i=this._editor.getPosition();let o=!1;const r=this._editor.onDidChangeModelContent((e=>{if(e.isFlush)return o=!0,void r.dispose();for(let t=0,n=e.changes.length;t{r.dispose(),o||(0,n.Of)(e)&&(p.V.execute(this._editor,e,!0),(0,f.Zg)(e))}),(e=>{throw r.dispose(),e}))}};k.ID="editor.contrib.autoFormat",k=C([S(1,g.p)],k);let D=class{constructor(e,t){this.editor=e,this._instantiationService=t,this._callOnDispose=new s.SL,this._callOnModel=new s.SL,this._callOnDispose.add(e.onDidChangeConfiguration((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModel((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModelLanguage((()=>this._update()))),this._callOnDispose.add(d.vN.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(44)&&this.editor.hasModel()&&d.vN.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste((({range:e})=>this._trigger(e))))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(f.x$,this.editor,e,2,w.E.None,o.T.None).catch(y.dL))}};D.ID="editor.contrib.formatOnPaste",D=C([S(1,b.TG)],D);class L extends a.R6{constructor(){super({id:"editor.action.formatDocument",label:m.N("formatDocument.label","Format Document"),alias:"Format Document",precondition:v.Ao.and(h.u.notInCompositeEditor,h.u.writable,h.u.hasDocumentFormattingProvider),kbOpts:{kbExpr:h.u.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(e,t){return x(this,void 0,void 0,(function*(){if(t.hasModel()){const i=e.get(b.TG),n=e.get(w.e);yield n.showWhile(i.invokeFunction(f.Qq,t,1,w.E.None,o.T.None),250)}}))}}class N extends a.R6{constructor(){super({id:"editor.action.formatSelection",label:m.N("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:v.Ao.and(h.u.writable,h.u.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:h.u.editorTextFocus,primary:(0,r.gx)(2089,2084),weight:100},contextMenuOpts:{when:h.u.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(e,t){return x(this,void 0,void 0,(function*(){if(!t.hasModel())return;const i=e.get(b.TG),n=t.getModel(),r=t.getSelections().map((e=>e.isEmpty()?new u.e(e.startLineNumber,1,e.startLineNumber,n.getLineMaxColumn(e.startLineNumber)):e)),s=e.get(w.e);yield s.showWhile(i.invokeFunction(f.x$,t,r,1,w.E.None,o.T.None),250)}))}}(0,a._K)(k.ID,k),(0,a._K)(D.ID,D),(0,a.Qr)(L),(0,a.Qr)(N),_.P.registerCommand("editor.action.format",(e=>x(void 0,void 0,void 0,(function*(){const t=e.get(l.$).getFocusedCodeEditor();if(!t||!t.hasModel())return;const i=e.get(_.H);t.getSelection().isEmpty()?yield i.executeCommand("editor.action.formatDocument"):yield i.executeCommand("editor.action.formatSelection")}))))},9939:(e,t,i)=>{"use strict";i.d(t,{V:()=>r});var n=i(9386),o=i(4314);class r{static _handleEolEdits(e,t){let i,n=[];for(let e of t)"number"==typeof e.eol&&(i=e.eol),e.range&&"string"==typeof e.text&&n.push(e);return"number"==typeof i&&e.hasModel()&&e.getModel().pushEOL(i),n}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;const i=e.getModel(),n=i.validateRange(t.range);return i.getFullModelRange().equalsRange(n)}static execute(e,t,i){i&&e.pushUndoStop();const s=r._handleEolEdits(e,t);1===s.length&&r._isFullModelReplaceEdit(e,s[0])?e.executeEdits("formatEditsCommand",s.map((e=>n.h.replace(o.e.lift(e.range),e.text)))):e.executeEdits("formatEditsCommand",s.map((e=>n.h.replaceMove(o.e.lift(e.range),e.text)))),i&&e.pushUndoStop()}}},2698:(e,t,i)=>{"use strict";i.r(t),i.d(t,{MarkerController:()=>J,NextMarkerAction:()=>te});var n,o=i(3580),r=i(5976),s=i(8819),a=i(187),l=i(4314),c=i(6830),u=i(9102),h=i(5321),d=i(8674),g=i(3910),f=i(7781),p=i(1264),m=i(9802),_=i(8843),v=i(9488),b=i(4669),y=i(2043),w=i(5935),C=i(4603),S=i(3046);!function(e){e.className=function(e){switch(e){case C.Z.Ignore:return"severity-ignore "+S.lA.info.classNames;case C.Z.Info:return S.lA.info.classNames;case C.Z.Warning:return S.lA.warning.classNames;case C.Z.Error:return S.lA.error.classNames;default:return""}}}(n||(n={})),(0,f.Ic)(((e,t)=>{const i=e.getColor(g.Jp);if(i){const e=S.lA.error.cssSelector;t.addRule(`\n\t\t\t.monaco-editor .zone-widget ${e},\n\t\t\t.markers-panel .marker-icon${e},\n\t\t\t.extensions-viewlet > .extensions ${e} {\n\t\t\t\tcolor: ${i};\n\t\t\t}\n\t\t`)}const n=e.getColor(g.BO);if(n){const e=S.lA.warning.cssSelector;t.addRule(`\n\t\t\t.monaco-editor .zone-widget ${e},\n\t\t\t.markers-panel .marker-icon${e},\n\t\t\t.extensions-viewlet > .extensions ${e},\n\t\t\t.extension-editor ${e} {\n\t\t\t\tcolor: ${n};\n\t\t\t}\n\t\t`)}const o=e.getColor(g.OL);if(o){const e=S.lA.info.cssSelector;t.addRule(`\n\t\t\t.monaco-editor .zone-widget ${e},\n\t\t\t.markers-panel .marker-icon${e},\n\t\t\t.extensions-viewlet > .extensions ${e},\n\t\t\t.extension-editor ${e} {\n\t\t\t\tcolor: ${o};\n\t\t\t}\n\t\t`)}}));var x=i(988),k=i(4144),D=i(8335),L=i(2065),N=i(7295),E=i(4349),A=function(e,t){return function(i,n){t(i,n,e)}};class M{constructor(e,t,i,n,o){this._openerService=n,this._labelService=o,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new r.SL,this._editor=t;const s=document.createElement("div");s.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),s.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),s.appendChild(this._relatedBlock),this._disposables.add(h.mu(this._relatedBlock,"click",(e=>{e.preventDefault();const t=this._relatedDiagnostics.get(e.target);t&&i(t)}))),this._scrollable=new m.NB(s,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:3,verticalScrollbarSize:3}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll((e=>{s.style.left=`-${e.scrollLeft}px`,s.style.top=`-${e.scrollTop}px`}))),this._disposables.add(this._scrollable)}dispose(){(0,r.B9)(this._disposables)}update(e){const{source:t,message:i,relatedInformation:n,code:o}=e;let r=((null==t?void 0:t.length)||0)+"()".length;o&&(r+="string"==typeof o?o.length:o.value.length);const s=(0,N.uq)(i);this._lines=s.length,this._longestLineLength=0;for(const e of s)this._longestLineLength=Math.max(e.length+r,this._longestLineLength);h.PO(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let a=this._messageBlock;for(const e of s)a=document.createElement("div"),a.innerText=e,""===e&&(a.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(a);if(t||o){const e=document.createElement("span");if(e.classList.add("details"),a.appendChild(e),t){const i=document.createElement("span");i.innerText=t,i.classList.add("source"),e.appendChild(i)}if(o)if("string"==typeof o){const t=document.createElement("span");t.innerText=`(${o})`,t.classList.add("code"),e.appendChild(t)}else this._codeLink=h.$("a.code-link"),this._codeLink.setAttribute("href",`${o.target.toString()}`),this._codeLink.onclick=e=>{this._openerService.open(o.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()},h.R3(this._codeLink,h.$("span")).innerText=o.value,e.appendChild(this._codeLink)}if(h.PO(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),(0,v.Of)(n)){const e=this._relatedBlock.appendChild(document.createElement("div"));e.style.paddingTop=`${Math.floor(.66*this._editor.getOption(56))}px`,this._lines+=1;for(const t of n){let i=document.createElement("div"),n=document.createElement("a");n.classList.add("filename"),n.innerText=`${(0,_.p)(t.resource)}(${t.startLineNumber}, ${t.startColumn}): `,n.title=this._labelService.getUriLabel(t.resource),this._relatedDiagnostics.set(n,t);let o=document.createElement("span");o.innerText=t.message,i.appendChild(n),i.appendChild(o),this._lines+=1,e.appendChild(i)}}const l=this._editor.getOption(40),c=Math.ceil(l.typicalFullwidthCharacterWidth*this._longestLineLength*.75),u=l.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:c,scrollHeight:u})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case d.ZL.Error:t=o.N("Error","Error");break;case d.ZL.Warning:t=o.N("Warning","Warning");break;case d.ZL.Info:t=o.N("Info","Info");break;case d.ZL.Hint:t=o.N("Hint","Hint")}let i=o.N("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const n=this._editor.getModel();return n&&e.startLineNumber<=n.getLineCount()&&e.startLineNumber>=1&&(i=`${n.getLineContent(e.startLineNumber)}, ${i}`),i}}let I=class e extends y.vk{constructor(e,t,i,n,o,s,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0},o),this._themeService=t,this._openerService=i,this._menuService=n,this._contextKeyService=s,this._labelService=a,this._callOnDispose=new r.SL,this._onDidSelectRelatedInformation=new b.Q5,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=d.ZL.Warning,this._backgroundColor=p.Il.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(z);let t=F;this._severity===d.ZL.Warning?t=P:this._severity===d.ZL.Info&&(t=B);const i=e.getColor(t);this.style({arrowColor:i,frameColor:i,headerBackgroundColor:this._backgroundColor,primaryHeadingColor:e.getColor(y.IH),secondaryHeadingColor:e.getColor(y.R7)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(t){super._fillHead(t),this._disposables.add(this._actionbarWidget.actionRunner.onBeforeRun((e=>this.editor.focus())));const i=[],n=this._menuService.createMenu(e.TitleMenu,this._contextKeyService);(0,D.vr)(n,void 0,i),this._actionbarWidget.push(i,{label:!1,icon:!0,index:0}),n.dispose()}_fillTitleIcon(e){this._icon=h.R3(e,h.$(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new M(this._container,this.editor,(e=>this._onDidSelectRelatedInformation.fire(e)),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,i){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());let r=l.e.lift(e);const s=this.editor.getPosition();let a=s&&r.containsPosition(s)?s:r.getStartPosition();super.show(a,this.computeRequiredHeight());const c=this.editor.getModel();if(c){const e=i>1?o.N("problems","{0} of {1} problems",t,i):o.N("change","{0} of {1} problem",t,i);this.setTitle((0,w.EZ)(c.uri),e)}this._icon.className=`codicon ${n.className(d.ZL.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(a,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};I.TitleMenu=new k.eH("gotoErrorTitleMenu"),I=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([A(1,f.XE),A(2,x.v4),A(3,k.co),A(4,L.TG),A(5,s.i6),A(6,E.e)],I);let T=(0,g.kw)(g.lX,g.b6),R=(0,g.kw)(g.uo,g.pW),O=(0,g.kw)(g.c6,g.T8);const F=(0,g.P6)("editorMarkerNavigationError.background",{dark:T,light:T,hc:T},o.N("editorMarkerNavigationError","Editor marker navigation widget error color.")),P=(0,g.P6)("editorMarkerNavigationWarning.background",{dark:R,light:R,hc:R},o.N("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),B=(0,g.P6)("editorMarkerNavigationInfo.background",{dark:O,light:O,hc:O},o.N("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),z=(0,g.P6)("editorMarkerNavigation.background",{dark:"#2D2D30",light:p.Il.white,hc:"#0C141F"},o.N("editorMarkerNavigationBackground","Editor marker navigation widget background."));(0,f.Ic)(((e,t)=>{const i=e.getColor(g.ur);i&&(t.addRule(`.monaco-editor .marker-widget a { color: ${i}; }`),t.addRule(`.monaco-editor .marker-widget a.code-link span:hover { color: ${i}; }`))}));var W=i(1640),V=i(666),H=i(5026),$=i(1741),U=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},j=function(e,t){return function(i,n){t(i,n,e)}};class q{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let K=class e{constructor(t,i){this._markerService=i,this._onDidChange=new b.Q5,this.onDidChange=this._onDidChange.event,this._dispoables=new r.SL,this._markers=[],this._nextIdx=-1,V.o.isUri(t)?this._resourceFilter=e=>e.toString()===t.toString():t&&(this._resourceFilter=t);const n=()=>{this._markers=this._markerService.read({resource:V.o.isUri(t)?t:void 0,severities:d.ZL.Error|d.ZL.Warning|d.ZL.Info}),"function"==typeof t&&(this._markers=this._markers.filter((e=>this._resourceFilter(e.resource)))),this._markers.sort(e._compareMarker)};n(),this._dispoables.add(i.onMarkerChanged((e=>{this._resourceFilter&&!e.some((e=>this._resourceFilter(e)))||(n(),this._nextIdx=-1,this._onDidChange.fire())})))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e||!(!this._resourceFilter||!e)&&this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new q(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let n=!1,o=this._markers.findIndex((t=>t.resource.toString()===e.uri.toString()));o<0&&(o=(0,v.ry)(this._markers,{resource:e.uri},((e,t)=>(0,N.qu)(e.resource.toString(),t.resource.toString()))),o<0&&(o=~o));for(let i=o;it.resource.toString()===e.toString()));if(!(i<0))for(;ithis.close()),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition((e=>{var t,i,n;(null===(t=this._model)||void 0===t?void 0:t.selected)&&l.e.containsPosition(null===(i=this._model)||void 0===i?void 0:i.selected.marker,e.position)||null===(n=this._model)||void 0===n||n.resetIndex()}))),this._sessionDispoables.add(this._model.onDidChange((()=>{if(!this._widget||!this._widget.position||!this._model)return;const e=this._model.find(this._editor.getModel().uri,this._widget.position);e?this._widget.updateMarker(e.marker):this._widget.showStale()}))),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation((e=>{this._editorService.openCodeEditor({resource:e.resource,options:{pinned:!0,revealIfOpened:!0,selection:l.e.lift(e).collapseToStart()}},this._editor),this.close(!1)}))),this._sessionDispoables.add(this._editor.onDidChangeModel((()=>this._cleanUp()))),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new a.L(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(t,i){return Q(this,void 0,void 0,(function*(){if(this._editor.hasModel()){const n=this._getOrCreateModel(i?void 0:this._editor.getModel().uri);if(n.move(t,this._editor.getModel(),this._editor.getPosition()),!n.selected)return;if(n.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const o=yield this._editorService.openCodeEditor({resource:n.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:n.selected.marker}},this._editor);o&&(e.get(o).close(),e.get(o).nagivate(t,i))}else this._widget.showAtMarker(n.selected.marker,n.selected.index,n.selected.total)}}))}};J.ID="editor.contrib.markerController",J=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([X(1,G),X(2,s.i6),X(3,W.$),X(4,L.TG)],J);class ee extends c.R6{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}run(e,t){return Q(this,void 0,void 0,(function*(){t.hasModel()&&J.get(t).nagivate(this._next,this._multiFile)}))}}class te extends ee{constructor(){super(!0,!1,{id:te.ID,label:te.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:u.u.focus,primary:578,weight:100},menuOpts:{menuId:I.TitleMenu,title:te.LABEL,icon:(0,Z.q5)("marker-navigation-next",S.lA.chevronDown,o.N("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}te.ID="editor.action.marker.next",te.LABEL=o.N("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class ie extends ee{constructor(){super(!1,!1,{id:ie.ID,label:ie.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:u.u.focus,primary:1602,weight:100},menuOpts:{menuId:I.TitleMenu,title:te.LABEL,icon:(0,Z.q5)("marker-navigation-previous",S.lA.chevronUp,o.N("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}ie.ID="editor.action.marker.prev",ie.LABEL=o.N("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)"),(0,c._K)(J.ID,J),(0,c.Qr)(te),(0,c.Qr)(ie),(0,c.Qr)(class extends ee{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:o.N("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:u.u.focus,primary:66,weight:100},menuOpts:{menuId:k.eH.MenubarGoMenu,title:o.N({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}),(0,c.Qr)(class extends ee{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:o.N("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:u.u.focus,primary:1090,weight:100},menuOpts:{menuId:k.eH.MenubarGoMenu,title:o.N({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}});const ne=new s.uy("markersNavigationVisible",!1),oe=c._l.bindToContribution(J.get);(0,c.fK)(new oe({id:"closeMarkersNavigation",precondition:ne,handler:e=>e.close(),kbOpts:{weight:150,kbExpr:u.u.focus,primary:9,secondary:[1033]}}))},2729:(e,t,i)=>{"use strict";i.r(t),i.d(t,{DefinitionAction:()=>te});var n=i(5152),o=i(5393),r=i(2258),s=i(1432),a=i(5520),l=i(6830),c=i(1640),u=i(187),h=i(4314),d=i(9102),g=i(4101),f=i(2276),p=i(2043),m=i(4318),_=i(1455),v=i(3580),b=i(4144),y=i(8819),w=i(9422),C=i(535),S=i(1691),x=i(4565),k=i(9925),D=i(2065),L=i(5026),N=i(9989),E=i(5976),A=i(4669),M=i(1847),I=i(5935),T=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},R=function(e,t){return function(i,n){t(i,n,e)}};const O=new y.uy("hasSymbols",!1,(0,v.N)("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),F=(0,D.yh)("ISymbolNavigationService");let P=class{constructor(e,t,i,n){this._editorService=t,this._notificationService=i,this._keybindingService=n,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=O.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),null===(e=this._currentState)||void 0===e||e.dispose(),null===(t=this._currentMessage)||void 0===t||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1)return void this.reset();this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new B(this._editorService),n=i.onDidChange((e=>{if(this._ignoreEditorChange)return;const i=this._editorService.getActiveCodeEditor();if(!i)return;const n=i.getModel(),o=i.getPosition();if(!n||!o)return;let r=!1,s=!1;for(const e of t.references)if((0,I.Xy)(e.uri,n.uri))r=!0,s=s||h.e.containsPosition(e.range,o);else if(r)break;r&&s||this.reset()}));this._currentState=(0,E.F8)(i,n)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:h.e.collapseToStart(t.range),selectionRevealType:3}},e).finally((()=>{this._ignoreEditorChange=!1}))}_showMessage(){var e;null===(e=this._currentMessage)||void 0===e||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),i=t?(0,v.N)("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):(0,v.N)("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(i)}};P=T([R(0,y.i6),R(1,c.$),R(2,w.lT),R(3,M.d)],P),(0,L.z)(F,P,!0),(0,l.fK)(new class extends l._l{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:O,kbOpts:{weight:100,primary:70}})}runEditorCommand(e,t){return e.get(F).revealNext(t)}}),N.W.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:O,primary:9,handler(e){e.get(F).reset()}});let B=class{constructor(e){this._listener=new Map,this._disposables=new E.SL,this._onDidChange=new A.Q5,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),(0,E.B9)(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,(0,E.F8)(e.onDidChangeCursorPosition((t=>this._onDidChange.fire({editor:e}))),e.onDidChangeModelContent((t=>this._onDidChange.fire({editor:e})))))}_onDidRemoveEditor(e){var t;null===(t=this._listener.get(e))||void 0===t||t.dispose(),this._listener.delete(e)}};B=T([R(0,c.$)],B);var z,W,V,H,$,U,j,q,K=i(6268),G=i(666),Y=i(8401),Z=i(4527),X=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};b.BH.appendMenuItem(b.eH.EditorContext,{submenu:b.eH.EditorContextPeek,title:v.N("peek.submenu","Peek"),group:"navigation",order:100});const Q=new Set;function J(e){const t=new e;return(0,l.QG)(t),Q.add(t.id),t}class ee extends l.R6{constructor(e,t){super(t),this._configuration=e}run(e,t){if(!t.hasModel())return Promise.resolve(void 0);const i=e.get(w.lT),r=e.get(c.$),s=e.get(C.e),a=e.get(F),l=t.getModel(),u=t.getPosition(),h=new k.Dl(t,5),d=(0,o.eP)(this._getLocationModel(l,u,h.token),h.token).then((e=>X(this,void 0,void 0,(function*(){if(!e||h.token.isCancellationRequested)return;let i;if((0,n.Z9)(e.ariaMessage),e.referenceAt(l.uri,u)){const e=this._getAlternativeCommand(t);e!==this.id&&Q.has(e)&&(i=t.getAction(e))}const o=e.references.length;if(0===o){if(!this._configuration.muteMessage){const e=l.getWordAtPosition(u);f.O.get(t).showMessage(this._getNoResultFoundMessage(e),u)}}else{if(1!==o||!i)return this._onResult(r,a,t,e);i.run()}}))),(e=>{i.error(e)})).finally((()=>{h.dispose()}));return s.showWhile(d,250),d}_onResult(e,t,i,n){return X(this,void 0,void 0,(function*(){const o=this._getGoToPreference(i);if(i instanceof Z.H||!(this._configuration.openInPeek||"peek"===o&&n.references.length>1)){const r=n.firstReference(),s=n.references.length>1&&"gotoAndPeek"===o,a=yield this._openReference(i,e,r,this._configuration.openToSide,!s);s&&a?this._openInPeek(a,n):n.dispose(),"goto"===o&&t.put(r)}else this._openInPeek(i,n)}))}_openReference(e,t,i,n,o){return X(this,void 0,void 0,(function*(){let r;if((0,g.vx)(i)&&(r=i.targetSelectionRange),r||(r=i.range),!r)return;const s=yield t.openCodeEditor({resource:i.uri,options:{selection:h.e.collapseToStart(r),selectionRevealType:3}},e,n);if(s){if(o){const e=s.getModel(),t=s.deltaDecorations([],[{range:r,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout((()=>{s.getModel()===e&&s.deltaDecorations(t,[])}),350)}return s}}))}_openInPeek(e,t){let i=m.J.get(e);i&&e.hasModel()?i.toggleWidget(e.getSelection(),(0,o.PG)((e=>Promise.resolve(t))),this._configuration.openInPeek):t.dispose()}}class te extends ee{_getLocationModel(e,t,i){return X(this,void 0,void 0,(function*(){return new _.oQ(yield(0,S.nD)(e,t,i),v.N("def.title","Definitions"))}))}_getNoResultFoundMessage(e){return e&&e.word?v.N("noResultWord","No definition found for '{0}'",e.word):v.N("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(47).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(47).multipleDefinitions}}const ie=s.$L&&!K.$W?2118:70;J(((z=class e extends te{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.id,label:v.N("actions.goToDecl.label","Go to Definition"),alias:"Go to Definition",precondition:y.Ao.and(d.u.hasDefinitionProvider,d.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:d.u.editorTextFocus,primary:ie,weight:100},contextMenuOpts:{group:"navigation",order:1.1},menuOpts:{menuId:b.eH.MenubarGoMenu,group:"4_symbol_nav",order:2,title:v.N({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")}}),x.P.registerCommandAlias("editor.action.goToDeclaration",e.id)}}).id="editor.action.revealDefinition",z)),J(((W=class e extends te{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:e.id,label:v.N("actions.goToDeclToSide.label","Open Definition to the Side"),alias:"Open Definition to the Side",precondition:y.Ao.and(d.u.hasDefinitionProvider,d.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:d.u.editorTextFocus,primary:(0,r.gx)(2089,ie),weight:100}}),x.P.registerCommandAlias("editor.action.openDeclarationToTheSide",e.id)}}).id="editor.action.revealDefinitionAside",W)),J(((V=class e extends te{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.id,label:v.N("actions.previewDecl.label","Peek Definition"),alias:"Peek Definition",precondition:y.Ao.and(d.u.hasDefinitionProvider,p.Jy.notInPeekEditor,d.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:d.u.editorTextFocus,primary:582,linux:{primary:3140},weight:100},contextMenuOpts:{menuId:b.eH.EditorContextPeek,group:"peek",order:2}}),x.P.registerCommandAlias("editor.action.previewDeclaration",e.id)}}).id="editor.action.peekDefinition",V));class ne extends ee{_getLocationModel(e,t,i){return X(this,void 0,void 0,(function*(){return new _.oQ(yield(0,S.zq)(e,t,i),v.N("decl.title","Declarations"))}))}_getNoResultFoundMessage(e){return e&&e.word?v.N("decl.noResultWord","No declaration found for '{0}'",e.word):v.N("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(47).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(47).multipleDeclarations}}J(((H=class e extends ne{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.id,label:v.N("actions.goToDeclaration.label","Go to Declaration"),alias:"Go to Declaration",precondition:y.Ao.and(d.u.hasDeclarationProvider,d.u.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{group:"navigation",order:1.3},menuOpts:{menuId:b.eH.MenubarGoMenu,group:"4_symbol_nav",order:3,title:v.N({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")}})}_getNoResultFoundMessage(e){return e&&e.word?v.N("decl.noResultWord","No declaration found for '{0}'",e.word):v.N("decl.generic.noResults","No declaration found")}}).id="editor.action.revealDeclaration",H)),J(class extends ne{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",label:v.N("actions.peekDecl.label","Peek Declaration"),alias:"Peek Declaration",precondition:y.Ao.and(d.u.hasDeclarationProvider,p.Jy.notInPeekEditor,d.u.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:b.eH.EditorContextPeek,group:"peek",order:3}})}});class oe extends ee{_getLocationModel(e,t,i){return X(this,void 0,void 0,(function*(){return new _.oQ(yield(0,S.L3)(e,t,i),v.N("typedef.title","Type Definitions"))}))}_getNoResultFoundMessage(e){return e&&e.word?v.N("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):v.N("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(47).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(47).multipleTypeDefinitions}}J((($=class e extends oe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.ID,label:v.N("actions.goToTypeDefinition.label","Go to Type Definition"),alias:"Go to Type Definition",precondition:y.Ao.and(d.u.hasTypeDefinitionProvider,d.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:d.u.editorTextFocus,primary:0,weight:100},contextMenuOpts:{group:"navigation",order:1.4},menuOpts:{menuId:b.eH.MenubarGoMenu,group:"4_symbol_nav",order:3,title:v.N({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")}})}}).ID="editor.action.goToTypeDefinition",$)),J(((U=class e extends oe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.ID,label:v.N("actions.peekTypeDefinition.label","Peek Type Definition"),alias:"Peek Type Definition",precondition:y.Ao.and(d.u.hasTypeDefinitionProvider,p.Jy.notInPeekEditor,d.u.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:b.eH.EditorContextPeek,group:"peek",order:4}})}}).ID="editor.action.peekTypeDefinition",U));class re extends ee{_getLocationModel(e,t,i){return X(this,void 0,void 0,(function*(){return new _.oQ(yield(0,S.f4)(e,t,i),v.N("impl.title","Implementations"))}))}_getNoResultFoundMessage(e){return e&&e.word?v.N("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):v.N("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(47).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(47).multipleImplementations}}J(((j=class e extends re{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.ID,label:v.N("actions.goToImplementation.label","Go to Implementations"),alias:"Go to Implementations",precondition:y.Ao.and(d.u.hasImplementationProvider,d.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:d.u.editorTextFocus,primary:2118,weight:100},menuOpts:{menuId:b.eH.MenubarGoMenu,group:"4_symbol_nav",order:4,title:v.N({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},contextMenuOpts:{group:"navigation",order:1.45}})}}).ID="editor.action.goToImplementation",j)),J(((q=class e extends re{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.ID,label:v.N("actions.peekImplementation.label","Peek Implementations"),alias:"Peek Implementations",precondition:y.Ao.and(d.u.hasImplementationProvider,p.Jy.notInPeekEditor,d.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:d.u.editorTextFocus,primary:3142,weight:100},contextMenuOpts:{menuId:b.eH.EditorContextPeek,group:"peek",order:5}})}}).ID="editor.action.peekImplementation",q));class se extends ee{_getNoResultFoundMessage(e){return e?v.N("references.no","No references found for '{0}'",e.word):v.N("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(47).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(47).multipleReferences}}J(class extends se{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",label:v.N("goToReferences.label","Go to References"),alias:"Go to References",precondition:y.Ao.and(d.u.hasReferenceProvider,p.Jy.notInPeekEditor,d.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:d.u.editorTextFocus,primary:1094,weight:100},contextMenuOpts:{group:"navigation",order:1.45},menuOpts:{menuId:b.eH.MenubarGoMenu,group:"4_symbol_nav",order:5,title:v.N({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")}})}_getLocationModel(e,t,i){return X(this,void 0,void 0,(function*(){return new _.oQ(yield(0,S.aA)(e,t,!0,i),v.N("ref.title","References"))}))}}),J(class extends se{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",label:v.N("references.action.label","Peek References"),alias:"Peek References",precondition:y.Ao.and(d.u.hasReferenceProvider,p.Jy.notInPeekEditor,d.u.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:b.eH.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,i){return X(this,void 0,void 0,(function*(){return new _.oQ(yield(0,S.aA)(e,t,!1,i),v.N("ref.title","References"))}))}});class ae extends ee{constructor(e,t,i){super(e,{id:"editor.action.goToLocation",label:v.N("label.generic","Go To Any Symbol"),alias:"Go To Any Symbol",precondition:y.Ao.and(p.Jy.notInPeekEditor,d.u.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=i}_getLocationModel(e,t,i){return X(this,void 0,void 0,(function*(){return new _.oQ(this._references,v.N("generic.title","Locations"))}))}_getNoResultFoundMessage(e){return e&&v.N("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return null!==(t=this._gotoMultipleBehaviour)&&void 0!==t?t:e.getOption(47).multipleReferences}_getAlternativeCommand(){return""}}x.P.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:G.o},{name:"position",description:"The position at which to start",constraint:u.L.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:(e,t,i,n,o,r,s)=>X(void 0,void 0,void 0,(function*(){(0,Y.p_)(G.o.isUri(t)),(0,Y.p_)(u.L.isIPosition(i)),(0,Y.p_)(Array.isArray(n)),(0,Y.p_)(void 0===o||"string"==typeof o),(0,Y.p_)(void 0===s||"boolean"==typeof s);const l=e.get(c.$),h=yield l.openCodeEditor({resource:t},l.getFocusedCodeEditor());if((0,a.CL)(h))return h.setPosition(i),h.revealPositionInCenterIfOutsideViewport(i,0),h.invokeWithinContext((e=>{const t=new class extends ae{_getNoResultFoundMessage(e){return r||super._getNoResultFoundMessage(e)}}({muteMessage:!Boolean(r),openInPeek:Boolean(s),openToSide:!1},n,o);e.get(D.TG).invokeFunction(t.run.bind(t),h)}))}))}),x.P.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:G.o},{name:"position",description:"The position at which to start",constraint:u.L.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:(e,t,i,n,o)=>X(void 0,void 0,void 0,(function*(){e.get(x.H).executeCommand("editor.action.goToLocations",t,i,n,o,void 0,!0)}))}),x.P.registerCommand({id:"editor.action.findReferences",handler:(e,t,i)=>{(0,Y.p_)(G.o.isUri(t)),(0,Y.p_)(u.L.isIPosition(i));const n=e.get(c.$);return n.openCodeEditor({resource:t},n.getFocusedCodeEditor()).then((e=>{if(!(0,a.CL)(e)||!e.hasModel())return;const t=m.J.get(e);if(!t)return;const n=(0,o.PG)((t=>(0,S.aA)(e.getModel(),u.L.lift(i),!1,t).then((e=>new _.oQ(e,v.N("ref.title","References")))))),r=new h.e(i.lineNumber,i.column,i.lineNumber,i.column);return Promise.resolve(t.toggleWidget(r,n,!1))}))}}),x.P.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")},1691:(e,t,i)=>{"use strict";i.d(t,{nD:()=>u,zq:()=>h,f4:()=>d,L3:()=>g,aA:()=>f});var n=i(1050),o=i(7301),r=i(6830),s=i(4101),a=i(1455),l=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function c(e,t,i,n){const r=i.ordered(e).map((i=>Promise.resolve(n(i,e,t)).then(void 0,(e=>{(0,o.Cp)(e)}))));return Promise.all(r).then((e=>{const t=[];for(let i of e)Array.isArray(i)?t.push(...i):i&&t.push(i);return t}))}function u(e,t,i){return c(e,t,s.Ct,((e,t,n)=>e.provideDefinition(t,n,i)))}function h(e,t,i){return c(e,t,s.RN,((e,t,n)=>e.provideDeclaration(t,n,i)))}function d(e,t,i){return c(e,t,s.vI,((e,t,n)=>e.provideImplementation(t,n,i)))}function g(e,t,i){return c(e,t,s.tA,((e,t,n)=>e.provideTypeDefinition(t,n,i)))}function f(e,t,i,n){return c(e,t,s.FL,((e,t,o)=>l(this,void 0,void 0,(function*(){const r=yield e.provideReferences(t,o,{includeDeclaration:!0},n);if(!i||!r||2!==r.length)return r;const s=yield e.provideReferences(t,o,{includeDeclaration:!1},n);return s&&1===s.length?s:r}))))}function p(e){return l(this,void 0,void 0,(function*(){const t=yield e(),i=new a.oQ(t,""),n=i.references.map((e=>e.link));return i.dispose(),n}))}(0,r.sb)("_executeDefinitionProvider",((e,t)=>p((()=>u(e,t,n.T.None))))),(0,r.sb)("_executeDeclarationProvider",((e,t)=>p((()=>h(e,t,n.T.None))))),(0,r.sb)("_executeImplementationProvider",((e,t)=>p((()=>d(e,t,n.T.None))))),(0,r.sb)("_executeTypeDefinitionProvider",((e,t)=>p((()=>g(e,t,n.T.None))))),(0,r.sb)("_executeReferenceProvider",((e,t)=>p((()=>f(e,t,!1,n.T.None)))))},9241:(e,t,i)=>{"use strict";i.d(t,{yN:()=>h});var n=i(5976),o=i(4669),r=i(1432);function s(e,t){return!!e[t]}class a{constructor(e,t){this.target=e.target,this.hasTriggerModifier=s(e.event,t.triggerModifier),this.hasSideBySideModifier=s(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class l{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=s(e,t.triggerModifier)}}class c{constructor(e,t,i,n){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=i,this.triggerSideBySideModifier=n}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function u(e){return"altKey"===e?r.dz?new c(57,"metaKey",6,"altKey"):new c(5,"ctrlKey",6,"altKey"):r.dz?new c(6,"altKey",57,"metaKey"):new c(6,"altKey",5,"ctrlKey")}class h extends n.JT{constructor(e){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new o.Q5),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new o.Q5),this.onExecute=this._onExecute.event,this._onCancel=this._register(new o.Q5),this.onCancel=this._onCancel.event,this._editor=e,this._opts=u(this._editor.getOption(67)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration((e=>{if(e.hasChanged(67)){const e=u(this._editor.getOption(67));if(this._opts.equals(e))return;this._opts=e,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}}))),this._register(this._editor.onMouseMove((e=>this._onEditorMouseMove(new a(e,this._opts))))),this._register(this._editor.onMouseDown((e=>this._onEditorMouseDown(new a(e,this._opts))))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(new a(e,this._opts))))),this._register(this._editor.onKeyDown((e=>this._onEditorKeyDown(new l(e,this._opts))))),this._register(this._editor.onKeyUp((e=>this._onEditorKeyUp(new l(e,this._opts))))),this._register(this._editor.onMouseDrag((()=>this._resetHandler()))),this._register(this._editor.onDidChangeCursorSelection((e=>this._onDidChangeCursorSelection(e)))),this._register(this._editor.onDidChangeModel((e=>this._resetHandler()))),this._register(this._editor.onDidChangeModelContent((()=>this._resetHandler()))),this._register(this._editor.onDidScrollChange((e=>{(e.scrollTopChanged||e.scrollLeftChanged)&&this._resetHandler()})))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=e.target.position?e.target.position.lineNumber:0}_onEditorMouseUp(e){const t=e.target.position?e.target.position.lineNumber:0;this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}},365:(e,t,i)=>{"use strict";i.r(t),i.d(t,{GotoDefinitionAtPositionEditorContribution:()=>x});var n=i(3580),o=i(5393),r=i(7301),s=i(9365),a=i(1531),l=i(4314),c=i(4101),u=i(6830),h=i(1691),d=i(5976),g=i(8216),f=i(7781),p=i(3910),m=i(9925),_=i(2729),v=i(9241),b=i(187),y=i(8401),w=i(2043),C=i(8819),S=function(e,t){return function(i,n){t(i,n,e)}};let x=class e{constructor(e,t,i){this.textModelResolverService=t,this.modeService=i,this.toUnhook=new d.SL,this.toUnhookForKeyboard=new d.SL,this.linkDecorations=[],this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e;let n=new v.yN(e);this.toUnhook.add(n),this.toUnhook.add(n.onMouseMoveOrRelevantKeyDown((([e,t])=>{this.startFindDefinitionFromMouse(e,(0,y.f6)(t))}))),this.toUnhook.add(n.onExecute((e=>{this.isEnabled(e)&&this.gotoDefinition(e.target.position,e.hasSideBySideModifier).then((()=>{this.removeLinkDecorations()}),(e=>{this.removeLinkDecorations(),(0,r.dL)(e)}))}))),this.toUnhook.add(n.onCancel((()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null})))}static get(t){return t.getContribution(e.ID)}startFindDefinitionFromCursor(e){return this.startFindDefinition(e).then((()=>{this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition((()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()}))),this.toUnhookForKeyboard.add(this.editor.onKeyDown((e=>{e&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())})))}))}startFindDefinitionFromMouse(e,t){if(9===e.target.type&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t))return this.currentWordAtPosition=null,void this.removeLinkDecorations();const i=e.target.position;this.startFindDefinition(i)}startFindDefinition(e){var t;this.toUnhookForKeyboard.clear();const i=e?null===(t=this.editor.getModel())||void 0===t?void 0:t.getWordAtPosition(e):null;if(!i)return this.currentWordAtPosition=null,this.removeLinkDecorations(),Promise.resolve(0);if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===i.startColumn&&this.currentWordAtPosition.endColumn===i.endColumn&&this.currentWordAtPosition.word===i.word)return Promise.resolve(0);this.currentWordAtPosition=i;let a=new m.yy(this.editor,15);return this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=(0,o.PG)((t=>this.findDefinition(e,t))),this.previousPromise.then((t=>{if(t&&t.length&&a.validate(this.editor))if(t.length>1)this.addDecoration(new l.e(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn),(new s.W5).appendText(n.N("multipleResults","Click to show {0} definitions.",t.length)));else{let n=t[0];if(!n.uri)return;this.textModelResolverService.createModelReference(n.uri).then((t=>{if(!t.object||!t.object.textEditorModel)return void t.dispose();const{object:{textEditorModel:o}}=t,{startLineNumber:r}=n.range;if(r<1||r>o.getLineCount())return void t.dispose();const a=this.getPreviewValue(o,r,n);let c;c=n.originSelectionRange?l.e.lift(n.originSelectionRange):new l.e(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn);const u=this.modeService.getModeIdByFilepathOrFirstLine(o.uri);this.addDecoration(c,(new s.W5).appendCodeblock(u||"",a)),t.dispose()}))}else this.removeLinkDecorations()})).then(void 0,r.dL)}getPreviewValue(t,i,n){let o=n.targetSelectionRange?n.range:this.getPreviewRangeBasedOnBrackets(t,i);return o.endLineNumber-o.startLineNumber>=e.MAX_SOURCE_PREVIEW_LINES&&(o=this.getPreviewRangeBasedOnIndentation(t,i)),this.stripIndentationFromPreviewRange(t,i,o)}stripIndentationFromPreviewRange(e,t,i){let n=e.getLineFirstNonWhitespaceColumn(t);for(let o=t+1;on)return new l.e(i,1,n+1,1);s=t.findNextBracket(new b.L(a,c))}return new l.e(i,1,n+1,1)}addDecoration(e,t){const i={range:e,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:t}};this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[i])}removeLinkDecorations(){this.linkDecorations.length>0&&(this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[]))}isEnabled(e,t){return this.editor.hasModel()&&e.isNoneOrSingleMouseDown&&6===e.target.type&&(e.hasTriggerModifier||!!t&&t.keyCodeIsTriggerKey)&&c.Ct.has(this.editor.getModel())}findDefinition(e,t){const i=this.editor.getModel();return i?(0,h.nD)(i,e,t):Promise.resolve(null)}gotoDefinition(e,t){return this.editor.setPosition(e),this.editor.invokeWithinContext((e=>{const i=!t&&this.editor.getOption(75)&&!this.isInPeekEditor(e);return new _.DefinitionAction({openToSide:t,openInPeek:i,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(e,this.editor)}))}isInPeekEditor(e){const t=e.get(C.i6);return w.Jy.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose()}};x.ID="editor.contrib.gotodefinitionatposition",x.MAX_SOURCE_PREVIEW_LINES=8,x=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([S(1,g.S),S(2,a.h)],x),(0,u._K)(x.ID,x),(0,f.Ic)(((e,t)=>{const i=e.getColor(p._Y);i&&t.addRule(`.monaco-editor .goto-definition-link { color: ${i} !important; }`)}))},4318:(e,t,i)=>{"use strict";i.d(t,{J:()=>se});var n=i(3580),o=i(7301),r=i(5976),s=i(1640),a=i(2065),l=i(8819),c=i(3108),u=i(6904),h=i(1455),d=i(5321),g=i(1264),f=i(4669),p=i(6663),m=i(5935),_=i(4527),v=i(4314),b=i(3411),y=i(8216),w=i(8801),C=i(7488),S=i(4349),x=i(7781),k=i(8810),D=i(8843),L=i(1847),N=i(5392),E=i(4650),A=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},M=function(e,t){return function(i,n){t(i,n,e)}};let I=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof h.oQ||e instanceof h.F2}getChildren(e){if(e instanceof h.oQ)return e.groups;if(e instanceof h.F2)return e.resolve(this._resolverService).then((e=>e.children));throw new Error("bad tree")}};I=A([M(0,y.S)],I);class T{getHeight(){return 23}getTemplateId(e){return e instanceof h.F2?P.id:z.id}}let R=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof h.WX){const i=null===(t=e.parent.getPreview(e))||void 0===t?void 0:t.preview(e.range);if(i)return i.value}return(0,m.EZ)(e.uri)}};R=A([M(0,L.d)],R);class O{getId(e){return e instanceof h.WX?e.id:e.uri}}let F=class extends r.JT{constructor(e,t,i){super(),this._uriLabel=t;const n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new w.g(n,{supportHighlights:!0})),this.badge=new C.Z(d.R3(n,d.$(".count"))),this._register((0,k.WZ)(this.badge,i)),e.appendChild(n)}set(e,t){let i=(0,m.XX)(e.uri);this.file.setLabel((0,D.p)(e.uri),this._uriLabel.getUriLabel(i,{relative:!0}),{title:this._uriLabel.getUriLabel(e.uri),matches:t});const o=e.children.length;this.badge.setCount(o),o>1?this.badge.setTitleFormat((0,n.N)("referencesCount","{0} references",o)):this.badge.setTitleFormat((0,n.N)("referenceCount","{0} reference",o))}};F=A([M(1,S.e),M(2,x.XE)],F);let P=class e{constructor(t){this._instantiationService=t,this.templateId=e.id}renderTemplate(e){return this._instantiationService.createInstance(F,e)}renderElement(e,t,i){i.set(e.element,(0,N.mB)(e.filterData))}disposeTemplate(e){e.dispose()}};P.id="FileReferencesRenderer",P=A([M(0,a.TG)],P);class B{constructor(e){this.label=new E.q(e,!1)}set(e,t){var i;const n=null===(i=e.parent.getPreview(e))||void 0===i?void 0:i.preview(e.range);if(n&&n.value){const{value:e,highlight:i}=n;t&&!N.CL.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(e,(0,N.mB)(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(e,[i]))}else this.label.set(`${(0,m.EZ)(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`)}}class z{constructor(){this.templateId=z.id}renderTemplate(e){return new B(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(){}}z.id="OneReferenceRenderer";class W{getWidgetAriaLabel(){return(0,n.N)("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var V=i(343),H=i(3910),$=i(2043),U=i(3937),j=i(4862),q=function(e,t){return function(i,n){t(i,n,e)}},K=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class G{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new r.SL,this._callOnModelChange=new r.SL,this._callOnDispose.add(this._editor.onDidChangeModel((()=>this._onModelChanged()))),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e)for(let t of this._model.references)if(t.uri.toString()===e.uri.toString())return void this._addDecorations(t.parent)}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations((()=>this._onDecorationChanged())));const t=[],i=[];for(let n=0,o=e.children.length;n{e.equals(9)&&(this._keybindingService.dispatchEvent(e,e.target),e.stopPropagation())}),!0)),this._tree=this._instantiationService.createInstance(Y,"ReferencesWidget",this._treeContainer,new T,[this._instantiationService.createInstance(P),this._instantiationService.createInstance(z)],this._instantiationService.createInstance(I),t),this._splitView.addView({onDidChange:f.ju.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:e=>{this._preview.layout({height:this._dim.height,width:e})}},U.M.Distribute),this._splitView.addView({onDidChange:f.ju.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:e=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${e}px`,this._tree.layout(this._dim.height,e)}},U.M.Distribute),this._disposables.add(this._splitView.onDidSashChange((()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)}),void 0));let i=(e,t)=>{e instanceof h.WX&&("show"===t&&this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:t,source:"tree"}))};this._tree.onDidOpen((e=>{e.sideBySide?i(e.element,"side"):e.editorOptions.pinned?i(e.element,"goto"):i(e.element,"show")})),d.Cp(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new d.Ro(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then((()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))}))}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=n.N("noResults","No results"),d.$Z(this._messageContainer),Promise.resolve(void 0)):(d.Cp(this._messageContainer),this._decorationsManager=new G(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange((e=>this._tree.rerender(e)))),this._disposeOnNewModel.add(this._preview.onMouseDown((e=>{const{event:t,target:i}=e;if(2!==t.detail)return;const n=this._getFocusedReference();n&&this._onDidSelectReference.fire({element:{uri:n.uri,range:i.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})}))),this.container.classList.add("results-loaded"),d.$Z(this._treeContainer),d.$Z(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(1===this._model.groups.length?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();return e instanceof h.WX?e:e instanceof h.F2&&e.children.length>0?e.children[0]:void 0}revealReference(e){return K(this,void 0,void 0,(function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}))}_revealReference(e,t){return K(this,void 0,void 0,(function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==p.lg.inMemory?this.setTitle((0,m.Hx)(e.uri),this._uriLabel.getUriLabel((0,m.XX)(e.uri))):this.setTitle(n.N("peekView.alternateTitle","References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent||(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent)),this._tree.reveal(e);const o=yield i;if(!this._model)return void o.dispose();(0,r.B9)(this._previewModelReference);const s=o.object;if(s){const t=this._preview.getModel()===s.textEditorModel?0:1,i=v.e.lift(e.range).collapseToStart();this._previewModelReference=o,this._preview.setModel(s.textEditorModel),this._preview.setSelection(i),this._preview.revealRangeInCenter(i,t)}else this._preview.setModel(this._previewNotAvailableMessage),o.dispose()}))}};Z=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([q(3,x.XE),q(4,y.S),q(5,a.TG),q(6,$.Fw),q(7,S.e),q(8,j.tJ),q(9,L.d)],Z),(0,x.Ic)(((e,t)=>{const i=e.getColor($.F8);i&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { background-color: ${i}; }`);const n=e.getColor($.WL);n&&t.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: ${n}; }`);const o=e.getColor($.xH);o&&t.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid ${o}; box-sizing: border-box; }`);const r=e.getColor(H.xL);r&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { border: 1px dotted ${r}; box-sizing: border-box; }`);const s=e.getColor($.M8);s&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree { background-color: ${s}; }`);const a=e.getColor($.xk);a&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree { color: ${a}; }`);const l=e.getColor($.a7);l&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .reference-file { color: ${l}; }`);const c=e.getColor($.Zj);c&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { background-color: ${c}; }`);const u=e.getColor($.IY);u&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { color: ${u} !important; }`);const h=e.getColor($.RX);h&&t.addRule(`.monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {\tbackground-color: ${h};}`);const d=e.getColor($.sH);d&&t.addRule(`.monaco-editor .reference-zone-widget .preview .monaco-editor .margin {\tbackground-color: ${d};}`)}));var X=i(187),Q=i(9422),J=i(5393),ee=i(9989),te=i(2258),ie=i(4565),ne=function(e,t){return function(i,n){t(i,n,e)}},oe=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const re=new l.uy("referenceSearchVisible",!1,n.N("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let se=class e{constructor(e,t,i,n,o,s,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=o,this._instantiationService=s,this._storageService=a,this._configurationService=l,this._disposables=new r.SL,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=re.bindTo(i)}static get(t){return t.getContribution(e.ID)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),null===(e=this._widget)||void 0===e||e.dispose(),null===(t=this._model)||void 0===t||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,i){let o;if(this._widget&&(o=this._widget.position),this.closeWidget(),o&&e.containsPosition(o))return;this._peekMode=i,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage((()=>{this.closeWidget()}))),this._disposables.add(this._editor.onDidChangeModel((()=>{this._ignoreModelChangeEvent||this.closeWidget()})));const r="peekViewLayout",s=class{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(e){let t,i;try{const n=JSON.parse(e);t=n.ratio,i=n.heightInLines}catch(e){}return{ratio:t||.7,heightInLines:i||18}}}.fromJSON(this._storageService.get(r,0,"{}"));this._widget=this._instantiationService.createInstance(Z,this._editor,this._defaultTreeKeyboardSupport,s),this._widget.setTitle(n.N("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose((()=>{t.cancel(),this._widget&&(this._storageService.store(r,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()}))),this._disposables.add(this._widget.onDidSelectReference((e=>{let{element:t,kind:n}=e;if(t)switch(n){case"open":"editor"===e.source&&this._configurationService.getValue("editor.stablePeek")||this.openReference(t,!1,!1);break;case"side":this.openReference(t,!0,!1);break;case"goto":i?this._gotoReference(t):this.openReference(t,!1,!0)}})));const a=++this._requestIdPool;t.then((t=>{var i;if(a===this._requestIdPool&&this._widget)return null===(i=this._model)||void 0===i||i.dispose(),this._model=t,this._widget.setModel(this._model).then((()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(n.N("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));let t=this._editor.getModel().uri,i=new X.L(e.startLineNumber,e.startColumn),o=this._model.nearestReference(t,i);if(o)return this._widget.setSelection(o).then((()=>{this._widget&&"editor"===this._editor.getOption(74)&&this._widget.focusOnPreviewEditor()}))}}));t.dispose()}),(e=>{this._notificationService.error(e)}))}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return oe(this,void 0,void 0,(function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const i=this._model.nearestReference(this._editor.getModel().uri,t);if(!i)return;const n=this._model.nextOrPreviousReference(i,e),o=this._editor.hasTextFocus(),r=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(n),yield this._gotoReference(n),o?this._editor.focus():this._widget&&r&&this._widget.focusOnPreviewEditor()}))}revealReference(e){return oe(this,void 0,void 0,(function*(){this._editor.hasModel()&&this._model&&this._widget&&(yield this._widget.revealReference(e))}))}closeWidget(e=!0){var t,i;null===(t=this._widget)||void 0===t||t.dispose(),null===(i=this._model)||void 0===i||i.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(t){this._widget&&this._widget.hide(),this._ignoreModelChangeEvent=!0;const i=v.e.lift(t.range).collapseToStart();return this._editorService.openCodeEditor({resource:t.uri,options:{selection:i}},this._editor).then((t=>{var n;if(this._ignoreModelChangeEvent=!1,t&&this._widget)if(this._editor===t)this._widget.show(i),this._widget.focusOnReferenceTree();else{const o=e.get(t),r=this._model.clone();this.closeWidget(),t.focus(),o.toggleWidget(i,(0,J.PG)((e=>Promise.resolve(r))),null!==(n=this._peekMode)&&void 0!==n&&n)}else this.closeWidget()}),(e=>{this._ignoreModelChangeEvent=!1,(0,o.dL)(e)}))}openReference(e,t,i){t||this.closeWidget();const{uri:n,range:o}=e;this._editorService.openCodeEditor({resource:n,options:{selection:o,pinned:i}},this._editor,t)}};function ae(e,t){const i=(0,$.rc)(e);if(!i)return;let n=se.get(i);n&&t(n)}se.ID="editor.contrib.referencesController",se=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([ne(2,l.i6),ne(3,s.$),ne(4,Q.lT),ne(5,a.TG),ne(6,u.Uy),ne(7,c.Ui)],se),ee.W.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:(0,te.gx)(2089,60),when:l.Ao.or(re,$.Jy.inPeekEditor),handler(e){ae(e,(e=>{e.changeFocusBetweenPreviewAndReferences()}))}}),ee.W.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:l.Ao.or(re,$.Jy.inPeekEditor),handler(e){ae(e,(e=>{e.goToNextOrPreviousReference(!0)}))}}),ee.W.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:l.Ao.or(re,$.Jy.inPeekEditor),handler(e){ae(e,(e=>{e.goToNextOrPreviousReference(!1)}))}}),ie.P.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),ie.P.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),ie.P.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),ie.P.registerCommand("closeReferenceSearch",(e=>ae(e,(e=>e.closeWidget())))),ee.W.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:l.Ao.and($.Jy.inPeekEditor,l.Ao.not("config.editor.stablePeek"))}),ee.W.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:l.Ao.and(re,l.Ao.not("config.editor.stablePeek"))}),ee.W.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:l.Ao.and(re,V.CQ),handler(e){var t;const i=null===(t=e.get(V.Lw).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof h.WX&&ae(e,(e=>e.revealReference(i[0])))}}),ee.W.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:l.Ao.and(re,V.CQ),handler(e){var t;const i=null===(t=e.get(V.Lw).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof h.WX&&ae(e,(e=>e.openReference(i[0],!0,!0)))}}),ie.P.registerCommand("openReference",(e=>{var t;const i=null===(t=e.get(V.Lw).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof h.WX&&ae(e,(e=>e.openReference(i[0],!1,!0)))}))},1455:(e,t,i)=>{"use strict";i.d(t,{WX:()=>d,F2:()=>f,oQ:()=>p});var n=i(3580),o=i(4669),r=i(5935),s=i(5976),a=i(7295),l=i(4742),c=i(4314),u=i(3702),h=i(7301);class d{constructor(e,t,i,n){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=n,this.id=l.a.nextId()}get uri(){return this.link.uri}get range(){var e,t;return null!==(t=null!==(e=this._range)&&void 0!==e?e:this.link.targetSelectionRange)&&void 0!==t?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=null===(e=this.parent.getPreview(this))||void 0===e?void 0:e.preview(this.range);return t?(0,n.N)({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"symbol in {0} on line {1} at column {2}, {3}",(0,r.EZ)(this.uri),this.range.startLineNumber,this.range.startColumn,t.value):(0,n.N)("aria.oneReference","symbol in {0} on line {1} at column {2}",(0,r.EZ)(this.uri),this.range.startLineNumber,this.range.startColumn)}}class g{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const i=this._modelReference.object.textEditorModel;if(!i)return;const{startLineNumber:n,startColumn:o,endLineNumber:r,endColumn:s}=e,a=i.getWordUntilPosition({lineNumber:n,column:o-t}),l=new c.e(n,a.startColumn,n,o),u=new c.e(r,s,r,1073741824),h=i.getValueInRange(l).replace(/^\s+/,""),d=i.getValueInRange(e);return{value:h+d+i.getValueInRange(u).replace(/\s+$/,""),highlight:{start:h.length,end:h.length+d.length}}}}class f{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new u.Y9}dispose(){(0,s.B9)(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return 1===e?(0,n.N)("aria.fileReferences.1","1 symbol in {0}, full path {1}",(0,r.EZ)(this.uri),this.uri.fsPath):(0,n.N)("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,(0,r.EZ)(this.uri),this.uri.fsPath)}resolve(e){return t=this,i=void 0,o=function*(){if(0!==this._previews.size)return this;for(let t of this.children)if(!this._previews.has(t.uri))try{const i=yield e.createModelReference(t.uri);this._previews.set(t.uri,new g(i))}catch(e){(0,h.dL)(e)}return this},new((n=void 0)||(n=Promise))((function(e,r){function s(e){try{l(o.next(e))}catch(e){r(e)}}function a(e){try{l(o.throw(e))}catch(e){r(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n((function(e){e(i)}))).then(s,a)}l((o=o.apply(t,i||[])).next())}));var t,i,n,o}}class p{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new o.Q5,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;let n;e.sort(p._compareReferences);for(let t of e)if(n&&r.SF.isEqual(n.uri,t.uri,!0)||(n=new f(this,t.uri),this.groups.push(n)),0===n.children.length||0!==p._compareReferences(t,n.children[n.children.length-1])){const e=new d(i===t,n,t,(e=>this._onDidChangeReferenceRange.fire(e)));this.references.push(e),n.children.push(e)}}dispose(){(0,s.B9)(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new p(this._links,this._title)}get title(){return this._title}get isEmpty(){return 0===this.groups.length}get ariaMessage(){return this.isEmpty?(0,n.N)("aria.result.0","No results found"):1===this.references.length?(0,n.N)("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):1===this.groups.length?(0,n.N)("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):(0,n.N)("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){let{parent:i}=e,n=i.children.indexOf(e),o=i.children.length,r=i.parent.groups.length;return 1===r||t&&n+10?(n=t?(n+1)%o:(n+o-1)%o,i.children[n]):(n=i.parent.groups.indexOf(i),t?(n=(n+1)%r,i.parent.groups[n].children[0]):(n=(n+r-1)%r,i.parent.groups[n].children[i.parent.groups[n].children.length-1]))}nearestReference(e,t){const i=this.references.map(((i,n)=>({idx:n,prefixLen:a.Mh(i.uri.toString(),e.toString()),offsetDist:100*Math.abs(i.range.startLineNumber-t.lineNumber)+Math.abs(i.range.startColumn-t.column)}))).sort(((e,t)=>e.prefixLen>t.prefixLen?-1:e.prefixLent.offsetDist?1:0))[0];if(i)return this.references[i.idx]}referenceAt(e,t){for(const i of this.references)if(i.uri.toString()===e.toString()&&c.e.containsPosition(i.range,t))return i}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return r.SF.compare(e.uri,t.uri)||c.e.compareRangesUsingStarts(e.range,t.range)}}},7043:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ModesHoverController:()=>Oe});var n=i(3580),o=i(2258),r=i(5976),s=i(6830),a=i(4314),l=i(9102),c=i(1531),u=i(5321),h=i(187),d=i(3411),g=i(4101),f=i(5393),p=i(7301);class m{constructor(e,t,i,n,o){this._computer=e,this._state=0,this._hoverTime=o,this._firstWaitScheduler=new f.pY((()=>this._triggerAsyncComputation()),0),this._secondWaitScheduler=new f.pY((()=>this._triggerSyncComputation()),0),this._loadingMessageScheduler=new f.pY((()=>this._showLoadingMessage()),0),this._asyncComputationPromise=null,this._asyncComputationPromiseDone=!1,this._completeCallback=t,this._errorCallback=i,this._progressCallback=n}setHoverTime(e){this._hoverTime=e}_firstWaitTime(){return this._hoverTime/2}_secondWaitTime(){return this._hoverTime/2}_loadingMessageTime(){return 3*this._hoverTime}_triggerAsyncComputation(){this._state=2,this._secondWaitScheduler.schedule(this._secondWaitTime()),this._computer.computeAsync?(this._asyncComputationPromiseDone=!1,this._asyncComputationPromise=(0,f.PG)((e=>this._computer.computeAsync(e))),this._asyncComputationPromise.then((e=>{this._asyncComputationPromiseDone=!0,this._withAsyncResult(e)}),(e=>this._onError(e)))):this._asyncComputationPromiseDone=!0}_triggerSyncComputation(){this._computer.computeSync&&this._computer.onResult(this._computer.computeSync(),!0),this._asyncComputationPromiseDone?(this._state=0,this._onComplete(this._computer.getResult())):(this._state=3,this._onProgress(this._computer.getResult()))}_showLoadingMessage(){3===this._state&&this._onProgress(this._computer.getResultWithLoadingMessage())}_withAsyncResult(e){e&&this._computer.onResult(e,!1),3===this._state&&(this._state=0,this._onComplete(this._computer.getResult()))}_onComplete(e){this._completeCallback(e)}_onError(e){this._errorCallback?this._errorCallback(e):(0,p.dL)(e)}_onProgress(e){this._progressCallback(e)}start(e){if(0===e)0===this._state&&(this._state=1,this._firstWaitScheduler.schedule(this._firstWaitTime()),this._loadingMessageScheduler.schedule(this._loadingMessageTime()));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation()}}cancel(){this._loadingMessageScheduler.cancel(),1===this._state&&this._firstWaitScheduler.cancel(),2===this._state&&(this._secondWaitScheduler.cancel(),this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null)),3===this._state&&this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null),this._state=0}}var _=i(7781),v=i(9488),b=i(3910),y=i(3794),w=i(9802);const C=u.$;class S extends r.JT{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this._scrollbar=this._register(new w.s$(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this._scrollbar.getDomNode())}onContentsChanged(){this._scrollbar.scanDomNode()}}var x=i(8674),k=i(5935),D=i(6479),L=i(988),N=i(2698),E=i(1907),A=i(3674),M=i(9532),I=i(535),T=function(e,t){return function(i,n){t(i,n,e)}};const R=u.$;class O{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const F={type:1,filter:{include:M.yN.QuickFix}};let P=class{constructor(e,t,i,n){this._editor=e,this._hover=t,this._markerDecorationsService=i,this._openerService=n,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,o=i.getLineMaxColumn(n),r=[];for(const s of t){const t=s.range.startLineNumber===n?s.range.startColumn:1,l=s.range.endLineNumber===n?s.range.endColumn:o,c=this._markerDecorationsService.getMarker(i.uri,s);if(!c)continue;const u=new a.e(e.range.startLineNumber,t,e.range.startLineNumber,l);r.push(new O(this,u,c))}return r}renderHoverParts(e,t,i){if(!e.length)return r.JT.None;const n=new r.SL;e.forEach((e=>t.appendChild(this.renderMarkerHover(e,n))));const o=1===e.length?e[0]:e.sort(((e,t)=>x.ZL.compare(e.marker.severity,t.marker.severity)))[0];return this.renderMarkerStatusbar(o,i,n),n}renderMarkerHover(e,t){const i=R("div.hover-row"),n=u.R3(i,R("div.marker.hover-contents")),{source:o,message:r,code:s,relatedInformation:a}=e.marker;this._editor.applyFontInfo(n);const l=u.R3(n,R("span"));if(l.style.whiteSpace="pre-wrap",l.innerText=r,o||s)if(s&&"string"!=typeof s){const e=R("span");o&&(u.R3(e,R("span")).innerText=o);const i=u.R3(e,R("a.code-link"));i.setAttribute("href",s.target.toString()),t.add(u.nm(i,"click",(e=>{this._openerService.open(s.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()}))),u.R3(i,R("span")).innerText=s.value;const r=u.R3(n,e);r.style.opacity="0.6",r.style.paddingLeft="6px"}else{const e=u.R3(n,R("span"));e.style.opacity="0.6",e.style.paddingLeft="6px",e.innerText=o&&s?`${o}(${s})`:o||`(${s})`}if((0,v.Of)(a))for(const{message:e,resource:i,startLineNumber:o,startColumn:r}of a){const s=u.R3(n,R("div"));s.style.marginTop="8px";const a=u.R3(s,R("a"));a.innerText=`${(0,k.EZ)(i)}(${o}, ${r}): `,a.style.cursor="pointer",t.add(u.nm(a,"click",(e=>{e.stopPropagation(),e.preventDefault(),this._openerService&&this._openerService.open(i,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:o,startColumn:r}}}).catch(p.dL)})));const l=u.R3(s,R("span"));l.innerText=e,this._editor.applyFontInfo(l)}return i}renderMarkerStatusbar(e,t,i){if(e.marker.severity!==x.ZL.Error&&e.marker.severity!==x.ZL.Warning&&e.marker.severity!==x.ZL.Info||t.addAction({label:n.N("view problem","View Problem"),commandId:N.NextMarkerAction.ID,run:()=>{this._hover.hide(),N.MarkerController.get(this._editor).showAtMarker(e.marker),this._editor.focus()}}),!this._editor.getOption(78)){const o=t.append(R("div"));this.recentMarkerCodeActionsInfo&&(x.H0.makeKey(this.recentMarkerCodeActionsInfo.marker)===x.H0.makeKey(e.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(o.textContent=n.N("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const s=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?r.JT.None:i.add((0,f.Vg)((()=>o.textContent=n.N("checkingForQuickFixes","Checking for quick fixes...")),200));o.textContent||(o.textContent=String.fromCharCode(160));const a=this.getCodeActions(e.marker);i.add((0,r.OF)((()=>a.cancel()))),a.then((a=>{if(s.dispose(),this.recentMarkerCodeActionsInfo={marker:e.marker,hasCodeActions:a.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions)return a.dispose(),void(o.textContent=n.N("noQuickFixes","No quick fixes available"));o.style.display="none";let l=!1;i.add((0,r.OF)((()=>{l||a.dispose()}))),t.addAction({label:n.N("quick fixes","Quick Fix..."),commandId:A.E7.Id,run:e=>{l=!0;const t=A.pY.get(this._editor),i=u.i(e);this._hover.hide(),t.showCodeActions(F,a,{x:i.left+6,y:i.top+i.height+6})}})}))}}getCodeActions(e){return(0,f.PG)((t=>(0,E.aI)(this._editor.getModel(),new a.e(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),F,I.E.None,t)))}};P=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([T(2,D.i),T(3,L.v4)],P);var B=i(2065),z=i(9365),W=i(3947),V=i(1050);function H(e,t,i){const n=g.xp.ordered(e).map((n=>Promise.resolve(n.provideHover(e,t,i)).then((e=>e&&function(e){const t=void 0!==e.range,i=void 0!==e.contents&&e.contents&&e.contents.length>0;return t&&i}(e)?e:void 0),(e=>{(0,p.Cp)(e)}))));return Promise.all(n).then(v.kX)}(0,s.sb)("_executeHoverProvider",((e,t)=>H(e,t,V.T.None)));var $=function(e,t){return function(i,n){t(i,n,e)}};const U=u.$;class j{constructor(e,t,i){this.owner=e,this.range=t,this.contents=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let q=class{constructor(e,t,i,n){this._editor=e,this._hover=t,this._modeService=i,this._openerService=n}createLoadingMessage(e){return 1!==e.type?null:new j(this,e.range,[(new z.W5).appendText(n.N("modesContentHover.loading","Loading..."))])}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,o=i.getLineMaxColumn(n),r=[];for(const i of t){const t=i.range.startLineNumber===n?i.range.startColumn:1,s=i.range.endLineNumber===n?i.range.endColumn:o,l=i.options.hoverMessage;if(!l||(0,z.CP)(l))continue;const c=new a.e(e.range.startLineNumber,t,e.range.startLineNumber,s);r.push(new j(this,c,(0,v._2)(l)))}return r}computeAsync(e,t,i){return n=this,o=void 0,s=function*(){if(!this._editor.hasModel()||1!==e.type)return Promise.resolve([]);const t=this._editor.getModel();if(!g.xp.has(t))return Promise.resolve([]);const n=yield H(t,new h.L(e.range.startLineNumber,e.range.startColumn),i),o=[];for(const t of n){if((0,z.CP)(t.contents))continue;const i=t.range?a.e.lift(t.range):e.range;o.push(new j(this,i,t.contents))}return o},new((r=void 0)||(r=Promise))((function(e,t){function i(e){try{l(s.next(e))}catch(e){t(e)}}function a(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(i,a)}l((s=s.apply(n,o||[])).next())}));var n,o,r,s}renderHoverParts(e,t,i){const n=new r.SL;for(const i of e)for(const e of i.contents){if((0,z.CP)(e))continue;const i=U("div.hover-row.markdown-hover"),o=u.R3(i,U("div.hover-contents")),r=n.add(new W.$({editor:this._editor},this._modeService,this._openerService));n.add(r.onDidRenderAsync((()=>{o.className="hover-contents code-hover-contents",this._hover.onContentsChanged()})));const s=n.add(r.render(e));o.appendChild(s.element),t.appendChild(i)}return n}};q=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([$(2,c.h),$(3,L.v4)],q);class K{constructor(e,t){this.priority=e,this.range=t,this.type=1}equals(e){return 1===e.type&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return 1===e.type&&t.lineNumber===this.range.startLineNumber}}class G{constructor(e,t,i){this.priority=e,this.owner=t,this.range=i,this.type=2}equals(e){return 2===e.type&&this.owner===e.owner}canAdoptVisibleHover(e,t){return 2===e.type&&this.owner===e.owner}}var Y=i(7586),Z=i(4565),X=i(4144),Q=i(8819),J=function(e,t){return function(i,n){t(i,n,e)}};class ee{constructor(e,t){this.owner=e,this.range=t}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let te=class{constructor(e,t,i,n,o){this._editor=e,this._commandService=i,this._menuService=n,this._contextKeyService=o}suggestHoverAnchor(e){const t=Y.GhostTextController.get(this._editor);if(!t)return null;if(8===e.target.type){const i=e.target.detail;if(t.shouldShowHoverAtViewZone(i.viewZoneId))return new G(1e3,this,a.e.fromPositions(i.positionBefore||i.position,i.positionBefore||i.position))}return 7===e.target.type&&e.target.range&&t.shouldShowHoverAt(e.target.range)||6===e.target.type&&e.target.range&&e.target.detail&&e.target.detail.mightBeForeignElement&&t.shouldShowHoverAt(e.target.range)?new G(1e3,this,e.target.range):null}computeSync(e,t){const i=Y.GhostTextController.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new ee(this,e.range)]:[]}renderHoverParts(e,t,i){const o=this._menuService.createMenu(X.eH.InlineCompletionsActions,this._contextKeyService);i.addAction({label:n.N("showNextInlineSuggestion","Next"),commandId:Y.ShowNextInlineSuggestionAction.ID,run:()=>this._commandService.executeCommand(Y.ShowNextInlineSuggestionAction.ID)}),i.addAction({label:n.N("showPreviousInlineSuggestion","Previous"),commandId:Y.ShowPreviousInlineSuggestionAction.ID,run:()=>this._commandService.executeCommand(Y.ShowPreviousInlineSuggestionAction.ID)}),i.addAction({label:n.N("acceptInlineSuggestion","Accept"),commandId:Y.commitInlineSuggestionAction.id,run:()=>this._commandService.executeCommand(Y.commitInlineSuggestionAction.id)});for(const[e,t]of o.getActions())for(const e of t)e instanceof X.U8&&i.addAction({label:e.label,commandId:e.item.id,run:()=>this._commandService.executeCommand(e.item.id)});return r.JT.None}};te=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([J(2,Z.H),J(3,X.co),J(4,Q.i6)],te);var ie=i(3308),ne=i(4494),oe=i(1264),re=i(4669);class se{constructor(e,t,i){this.presentationIndex=i,this._onColorFlushed=new re.Q5,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new re.Q5,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new re.Q5,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){for(let e=0;e{this.backgroundColor=e.getColor(b.yJ)||oe.Il.white}))),this._register(u.nm(this.pickedColorNode,u.tw.CLICK,(()=>this.model.selectNextColorPresentation()))),this._register(u.nm(n,u.tw.CLICK,(()=>{this.model.color=this.model.originalColor,this.model.flushColor()}))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this.pickedColorNode.style.backgroundColor=oe.Il.Format.CSS.format(t.color)||"",this.pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter())}onDidChangeColor(e){this.pickedColorNode.style.backgroundColor=oe.Il.Format.CSS.format(e)||"",this.pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this.pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:""}}class he extends r.JT{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this.domNode=ce(".colorpicker-body"),u.R3(e,this.domNode),this.saturationBox=new de(this.domNode,this.model,this.pixelRatio),this._register(this.saturationBox),this._register(this.saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this.saturationBox.onColorFlushed(this.flushColor,this)),this.opacityStrip=new fe(this.domNode,this.model),this._register(this.opacityStrip),this._register(this.opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this.opacityStrip.onColorFlushed(this.flushColor,this)),this.hueStrip=new pe(this.domNode,this.model),this._register(this.hueStrip),this._register(this.hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this.hueStrip.onColorFlushed(this.flushColor,this))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const i=this.model.color.hsva;this.model.color=new oe.Il(new oe.tx(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new oe.Il(new oe.tx(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=360*(1-e);this.model.color=new oe.Il(new oe.tx(360===i?0:i,t.s,t.v,t.a))}layout(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()}}class de extends r.JT{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this._onDidChange=new re.Q5,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new re.Q5,this.onColorFlushed=this._onColorFlushed.event,this.domNode=ce(".saturation-wrap"),u.R3(e,this.domNode),this.canvas=document.createElement("canvas"),this.canvas.className="saturation-box",u.R3(this.domNode,this.canvas),this.selection=ce(".saturation-selection"),u.R3(this.domNode,this.selection),this.layout(),this._register(u.Lo(this.domNode,(e=>this.onMouseDown(e)))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}onMouseDown(e){this.monitor=this._register(new le.Z);const t=u.i(this.domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.buttons,le.e,(e=>this.onDidChangePosition(e.posx-t.left,e.posy-t.top)),(()=>null));const i=u.qV(document,(()=>{this._onColorFlushed.fire(),i.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)}),!0)}onDidChangePosition(e,t){const i=Math.max(0,Math.min(1,e/this.width)),n=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(i,n),this._onDidChange.fire({s:i,v:n})}layout(){this.width=this.domNode.offsetWidth,this.height=this.domNode.offsetHeight,this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,t=new oe.Il(new oe.tx(e.h,1,1,1)),i=this.canvas.getContext("2d"),n=i.createLinearGradient(0,0,this.canvas.width,0);n.addColorStop(0,"rgba(255, 255, 255, 1)"),n.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),n.addColorStop(1,"rgba(255, 255, 255, 0)");const o=i.createLinearGradient(0,0,0,this.canvas.height);o.addColorStop(0,"rgba(0, 0, 0, 0)"),o.addColorStop(1,"rgba(0, 0, 0, 1)"),i.rect(0,0,this.canvas.width,this.canvas.height),i.fillStyle=oe.Il.Format.CSS.format(t),i.fill(),i.fillStyle=n,i.fill(),i.fillStyle=o,i.fill()}paintSelection(e,t){this.selection.style.left=e*this.width+"px",this.selection.style.top=this.height-t*this.height+"px"}onDidChangeColor(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class ge extends r.JT{constructor(e,t){super(),this.model=t,this._onDidChange=new re.Q5,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new re.Q5,this.onColorFlushed=this._onColorFlushed.event,this.domNode=u.R3(e,ce(".strip")),this.overlay=u.R3(this.domNode,ce(".overlay")),this.slider=u.R3(this.domNode,ce(".slider")),this.slider.style.top="0px",this._register(u.Lo(this.domNode,(e=>this.onMouseDown(e)))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onMouseDown(e){const t=this._register(new le.Z),i=u.i(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.buttons,le.e,(e=>this.onDidChangeTop(e.posy-i.top)),(()=>null));const n=u.qV(document,(()=>{this._onColorFlushed.fire(),n.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")}),!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=(1-e)*this.height+"px"}}class fe extends ge{constructor(e,t){super(e,t),this.domNode.classList.add("opacity-strip"),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){const{r:t,g:i,b:n}=e.rgba,o=new oe.Il(new oe.VS(t,i,n,1)),r=new oe.Il(new oe.VS(t,i,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${o} 0%, ${r} 100%)`}getValue(e){return e.hsva.a}}class pe extends ge{constructor(e,t){super(e,t),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class me extends y.${constructor(e,t,i,n){super(),this.model=t,this.pixelRatio=i,this._register((0,ae.fX)((()=>this.layout())));const o=ce(".colorpicker-widget");e.appendChild(o);const r=new ue(o,this.model,n);this.body=new he(o,this.model,this.pixelRatio),this._register(r),this._register(this.body)}layout(){this.body.layout()}}var _e=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class ve{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let be=class{constructor(e,t,i){this._editor=e,this._hover=t,this._themeService=i}computeSync(e,t){return[]}computeAsync(e,t,i){return _e(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return[];const e=ne.i.get(this._editor);for(const i of t){const t=e.getColorData(i.range.getStartPosition());if(t)return[yield this._createColorHover(this._editor.getModel(),t.colorInfo,t.provider)]}return[]}))}_createColorHover(e,t,i){return _e(this,void 0,void 0,(function*(){const n=e.getValueInRange(t.range),{red:o,green:r,blue:s,alpha:l}=t.color,c=new oe.VS(Math.round(255*o),Math.round(255*r),Math.round(255*s),l),u=new oe.Il(c),h=yield(0,ie.R)(e,t,i,V.T.None),d=new se(u,[],0);return d.colorPresentations=h||[],d.guessColorPresentation(u,n),new ve(this,a.e.lift(t.range),d,i)}))}renderHoverParts(e,t,i){if(0===e.length||!this._editor.hasModel())return r.JT.None;const n=new r.SL,o=e[0],s=this._editor.getModel(),l=o.model,c=n.add(new me(t,l,this._editor.getOption(126),this._themeService));let u=new a.e(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn);const h=()=>{let e,t;if(l.presentation.textEdit){e=[l.presentation.textEdit],t=new a.e(l.presentation.textEdit.range.startLineNumber,l.presentation.textEdit.range.startColumn,l.presentation.textEdit.range.endLineNumber,l.presentation.textEdit.range.endColumn);const i=this._editor.getModel()._setTrackedRange(null,t,3);this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",e),t=this._editor.getModel()._getTrackedRange(i)||t}else e=[{identifier:null,range:u,text:l.presentation.label,forceMoveMarkers:!1}],t=u.setEndPosition(u.endLineNumber,u.startColumn+l.presentation.label.length),this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",e);l.presentation.additionalTextEdits&&(e=[...l.presentation.additionalTextEdits],this._editor.executeEdits("colorpicker",e),this._hover.hide()),this._editor.pushUndoStop(),u=t},d=e=>(0,ie.R)(s,{range:u,color:{red:e.rgba.r/255,green:e.rgba.g/255,blue:e.rgba.b/255,alpha:e.rgba.a}},o.provider,V.T.None).then((e=>{l.colorPresentations=e||[]}));return n.add(l.onColorFlushed((e=>{d(e).then(h)}))),n.add(l.onDidChangeColor(d)),this._hover.setColorPicker(c),n}};var ye,we;be=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(ye=2,we=_.XE,function(e,t){we(e,t,ye)})],be);var Ce=i(1847),Se=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},xe=function(e,t){return function(i,n){t(i,n,e)}},ke=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const De=u.$;let Le=class extends r.JT{constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=De("div.hover-row.status-bar"),this.actionsElement=u.R3(this.hoverElement,De("div.actions"))}get hasContent(){return this._hasContent}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;this._register(function(e,t,i){const n=u.R3(e,C("div.action-container")),o=u.R3(n,C("a.action"));return o.setAttribute("href","#"),o.setAttribute("role","button"),t.iconClass&&u.R3(o,C(`span.icon.${t.iconClass}`)),u.R3(o,C("span")).textContent=i?`${t.label} (${i})`:t.label,u.nm(n,u.tw.CLICK,(e=>{e.stopPropagation(),e.preventDefault(),t.run(n)}))}(this.actionsElement,e,i)),this._hasContent=!0}append(e){const t=u.R3(this.actionsElement,e);return this._hasContent=!0,t}};Le=Se([xe(0,Ce.d)],Le);class Ne{constructor(e,t){this._participants=t,this._editor=e,this._result=[],this._anchor=null}setAnchor(e){this._anchor=e,this._result=[]}clearResult(){this._result=[]}static _getLineDecorations(e,t){if(1!==t.type)return[];const i=e.getModel(),n=t.range.startLineNumber,o=i.getLineMaxColumn(n);return e.getLineDecorations(n).filter((e=>{if(e.options.isWholeLine)return!0;const i=e.range.startLineNumber===n?e.range.startColumn:1,r=e.range.endLineNumber===n?e.range.endColumn:o;return!(i>t.range.startColumn||t.range.endColumn>r)}))}computeAsync(e){return ke(this,void 0,void 0,(function*(){const t=this._anchor;if(!this._editor.hasModel()||!t)return Promise.resolve([]);const i=Ne._getLineDecorations(this._editor,t),n=yield Promise.all(this._participants.map((n=>this._computeAsync(n,i,t,e))));return(0,v.xH)(n)}))}_computeAsync(e,t,i,n){return ke(this,void 0,void 0,(function*(){return e.computeAsync?e.computeAsync(i,t,n):[]}))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=Ne._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return(0,v.kX)(t)}onResult(e,t){this._result=t?e.concat(this._result):this._result.concat(e)}getResult(){return this._result.slice(0)}getResultWithLoadingMessage(){if(this._anchor)for(const e of this._participants)if(e.createLoadingMessage){const t=e.createLoadingMessage(this._anchor);if(t)return this._result.slice(0).concat([t])}return this._result.slice(0)}}let Ee=class e extends y.${constructor(t,i,n,o){super(),this._hoverVisibleKey=i,this._keybindingService=o,this.allowEditorOverflow=!0,this._participants=[n.createInstance(be,t,this),n.createInstance(q,t,this),n.createInstance(te,t,this),n.createInstance(P,t,this)],this._hover=this._register(new S),this._id=e.ID,this._editor=t,this._isVisible=!1,this._stoleFocus=!1,this._renderDisposable=null,this.onkeydown(this._hover.containerDomNode,(e=>{e.equals(9)&&this.hide()})),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(40)&&this._updateFont()}))),this._editor.onDidLayoutChange((()=>this.layout())),this.layout(),this._editor.addContentWidget(this),this._showAtPosition=null,this._showAtRange=null,this._stoleFocus=!1,this._messages=[],this._lastAnchor=null,this._computer=new Ne(this._editor,this._participants),this._highlightDecorations=[],this._isChangingDecorations=!1,this._shouldFocus=!1,this._colorPicker=null,this._hoverOperation=new m(this._computer,(e=>this._withResult(e,!0)),null,(e=>this._withResult(e,!1)),this._editor.getOption(50).delay),this._register(u.mu(this.getDomNode(),u.tw.FOCUS,(()=>{this._colorPicker&&this.getDomNode().classList.add("colorpicker-hover")}))),this._register(u.mu(this.getDomNode(),u.tw.BLUR,(()=>{this.getDomNode().classList.remove("colorpicker-hover")}))),this._register(t.onDidChangeConfiguration((()=>{this._hoverOperation.setHoverTime(this._editor.getOption(50).delay)}))),this._register(g.RW.onDidChange((()=>{this._isVisible&&this._lastAnchor&&this._messages.length>0&&(this._hover.contentsDomNode.textContent="",this._renderMessages(this._lastAnchor,this._messages))})))}dispose(){this._hoverOperation.cancel(),this._editor.removeContentWidget(this),super.dispose()}getId(){return this._id}getDomNode(){return this._hover.containerDomNode}_shouldShowAt(e){const t=e.target.type;if(6===t)return!0;if(7===t){const t=this._editor.getOption(40).typicalHalfwidthCharacterWidth/2,i=e.target.detail;if(i&&!i.isAfterLines&&"number"==typeof i.horizontalDistanceToText&&i.horizontalDistanceToTexte.startsWith("ced-colorBox")))&&e.target.range.endColumn-e.target.range.startColumn==1?new a.e(e.target.range.startLineNumber,e.target.range.startColumn+1,e.target.range.endLineNumber,e.target.range.endColumn+1):e.target.range;i.push(new K(0,n))}return 0!==i.length&&(i.sort(((e,t)=>t.priority-e.priority)),this._startShowingAt(i[0],0,!1),!0)}_showAt(e,t,i){this._showAtPosition=e,this._showAtRange=t,this._hoverVisibleKey.set(!0),this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._editor.layoutContentWidget(this),this._editor.render(),this._stoleFocus=i,i&&this._hover.containerDomNode.focus()}getPosition(){return this._isVisible?{position:this._showAtPosition,range:this._showAtRange,preference:[1,2]}:null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e=>this._editor.applyFontInfo(e)))}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont(),this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}layout(){const e=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:t,lineHeight:i}=this._editor.getOption(40);this._hover.contentsDomNode.style.fontSize=`${t}px`,this._hover.contentsDomNode.style.lineHeight=`${i}px`,this._hover.contentsDomNode.style.maxHeight=`${e}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(.66*this._editor.getLayoutInfo().width,500)}px`}onModelDecorationsChanged(){this._isChangingDecorations||this._isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._colorPicker||this._hoverOperation.start(0))}startShowingAtRange(e,t,i){this._startShowingAt(new K(0,e),t,i)}_startShowingAt(e,t,i){if(!this._lastAnchor||!this._lastAnchor.equals(e)){if(this._hoverOperation.cancel(),this._isVisible)if(this._showAtPosition&&this._lastAnchor&&e.canAdoptVisibleHover(this._lastAnchor,this._showAtPosition)){const t=this._messages.filter((t=>t.isValidForHoverAnchor(e)));if(0===t.length)this.hide();else{if(t.length===this._messages.length)return;this._renderMessages(e,t)}}else this.hide();this._lastAnchor=e,this._computer.setAnchor(e),this._shouldFocus=i,this._hoverOperation.start(t)}}hide(){this._lastAnchor=null,this._hoverOperation.cancel(),this._isVisible&&(setTimeout((()=>{this._isVisible||this._hoverVisibleKey.set(!1)}),0),this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._editor.layoutContentWidget(this),this._stoleFocus&&this._editor.focus()),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,[]),this._isChangingDecorations=!1,this._renderDisposable&&(this._renderDisposable.dispose(),this._renderDisposable=null),this._colorPicker=null}isColorPickerVisible(){return!!this._colorPicker}setColorPicker(e){this._colorPicker=e}onContentsChanged(){this._hover.onContentsChanged()}_withResult(e,t){this._messages=e,this._lastAnchor&&this._messages.length>0?this._renderMessages(this._lastAnchor,this._messages):t&&this.hide()}_renderMessages(t,i){this._renderDisposable&&(this._renderDisposable.dispose(),this._renderDisposable=null),this._colorPicker=null;let n=1073741824,o=i[0].range,s=null,l=document.createDocumentFragment();const c=new r.SL,u=new Map;for(const e of i)n=Math.min(n,e.range.startColumn),o=a.e.plusRange(o,e.range),e.forceShowAtRange&&(s=e.range),u.has(e.owner)||u.set(e.owner,[]),u.get(e.owner).push(e);const d=c.add(new Le(this._keybindingService));for(const[e,t]of u)c.add(e.renderHoverParts(t,l,d));d.hasContent&&l.appendChild(d.hoverElement),this._renderDisposable=c,l.hasChildNodes()&&(s?this._showAt(s.getStartPosition(),s,this._shouldFocus):this._showAt(new h.L(t.range.startLineNumber,n),o,this._shouldFocus),this._updateContents(l)),this._colorPicker&&this._colorPicker.layout(),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,o?[{range:o,options:e._DECORATION_OPTIONS}]:[]),this._isChangingDecorations=!1}};Ee.ID="editor.contrib.modesContentHoverWidget",Ee._DECORATION_OPTIONS=d.qx.register({description:"content-hover-highlight",className:"hoverHighlight"}),Ee=Se([xe(2,B.TG),xe(3,Ce.d)],Ee),(0,_.Ic)(((e,t)=>{const i=e.getColor(b.ur);i&&t.addRule(`.monaco-hover .hover-contents a.code-link span:hover { color: ${i}; }`)}));class Ae extends y.${constructor(e,t){super(),this._id=e,this._editor=t,this._isVisible=!1,this._domNode=document.createElement("div"),this._domNode.className="monaco-hover hidden",this._domNode.setAttribute("aria-hidden","true"),this._domNode.setAttribute("role","tooltip"),this._showAtLineNumber=-1,this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(40)&&this.updateFont()}))),this._editor.addOverlayWidget(this)}get isVisible(){return this._isVisible}set isVisible(e){this._isVisible=e,this._domNode.classList.toggle("hidden",!this._isVisible)}getId(){return this._id}getDomNode(){return this._domNode}showAt(e){this._showAtLineNumber=e,this.isVisible||(this.isVisible=!0);const t=this._editor.getLayoutInfo(),i=this._editor.getTopForLineNumber(this._showAtLineNumber),n=this._editor.getScrollTop(),o=this._editor.getOption(56),r=i-n-(this._domNode.clientHeight-o)/2;this._domNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._domNode.style.top=`${Math.max(Math.round(r),0)}px`}hide(){this.isVisible&&(this.isVisible=!1)}getPosition(){return null}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}updateFont(){[...Array.prototype.slice.call(this._domNode.getElementsByTagName("code")),...Array.prototype.slice.call(this._domNode.getElementsByClassName("code"))].forEach((e=>this._editor.applyFontInfo(e)))}updateContents(e){this._domNode.textContent="",this._domNode.appendChild(e),this.updateFont()}}class Me{constructor(e){this._editor=e,this._lineNumber=-1,this._result=[]}setLineNumber(e){this._lineNumber=e,this._result=[]}clearResult(){this._result=[]}computeSync(){const e=e=>({value:e}),t=this._editor.getLineDecorations(this._lineNumber),i=[];if(!t)return i;for(const n of t){if(!n.options.glyphMarginClassName)continue;const t=n.options.glyphMarginHoverMessage;t&&!(0,z.CP)(t)&&i.push(...(0,v._2)(t).map(e))}return i}onResult(e,t){this._result=this._result.concat(e)}getResult(){return this._result}getResultWithLoadingMessage(){return this.getResult()}}class Ie extends Ae{constructor(e,t,i=L.SW){super(Ie.ID,e),this._renderDisposeables=this._register(new r.SL),this._messages=[],this._lastLineNumber=-1,this._markdownRenderer=this._register(new W.$({editor:this._editor},t,i)),this._computer=new Me(this._editor),this._hoverOperation=new m(this._computer,(e=>this._withResult(e)),void 0,(e=>this._withResult(e)),300)}dispose(){this._hoverOperation.cancel(),super.dispose()}onModelDecorationsChanged(){this.isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._hoverOperation.start(0))}startShowingAt(e){this._lastLineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._lastLineNumber=e,this._computer.setLineNumber(e),this._hoverOperation.start(0))}hide(){this._lastLineNumber=-1,this._hoverOperation.cancel(),super.hide()}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._lastLineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const i=document.createDocumentFragment();for(const e of t){const t=this._markdownRenderer.render(e.value);this._renderDisposeables.add(t),i.appendChild((0,u.$)("div.hover-row",void 0,t.element))}this.updateContents(i),this.showAt(e)}}Ie.ID="editor.contrib.modesGlyphHoverWidget";var Te=i(365),Re=function(e,t){return function(i,n){t(i,n,e)}};let Oe=class e{constructor(e,t,i,n,o){this._editor=e,this._instantiationService=t,this._openerService=i,this._modeService=n,this._toUnhook=new r.SL,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&(this._unhookEvents(),this._hookEvents())})),this._hoverVisibleKey=l.u.hoverVisible.bindTo(o)}static get(t){return t.getContribution(e.ID)}_hookEvents(){const e=()=>this._hideWidgets(),t=this._editor.getOption(50);this._isHoverEnabled=t.enabled,this._isHoverSticky=t.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown((e=>this._onEditorMouseDown(e)))),this._toUnhook.add(this._editor.onMouseUp((e=>this._onEditorMouseUp(e)))),this._toUnhook.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._toUnhook.add(this._editor.onKeyDown((e=>this._onKeyDown(e)))),this._toUnhook.add(this._editor.onDidChangeModelDecorations((()=>this._onModelDecorationsChanged())))):(this._toUnhook.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._toUnhook.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))),this._toUnhook.add(this._editor.onMouseLeave(e)),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange((e=>this._onEditorScrollChanged(e))))}_unhookEvents(){this._toUnhook.clear()}_onModelDecorationsChanged(){var e,t;null===(e=this._contentWidget)||void 0===e||e.onModelDecorationsChanged(),null===(t=this._glyphWidget)||void 0===t||t.onModelDecorationsChanged()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._isMouseDown=!0;const t=e.target.type;9!==t||e.target.detail!==Ee.ID?12===t&&e.target.detail===Ie.ID||(12!==t&&e.target.detail!==Ie.ID&&(this._hoverClicked=!1),this._hideWidgets()):this._hoverClicked=!0}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseMove(e){var t,i,n,o,r;let s=e.target.type;if((!this._isMouseDown||!this._hoverClicked)&&(!this._isHoverSticky||9!==s||e.target.detail!==Ee.ID)&&(!this._isHoverSticky||(null===(i=null===(t=e.event.browserEvent.view)||void 0===t?void 0:t.getSelection())||void 0===i?void 0:i.isCollapsed))&&(this._isHoverSticky||9!==s||e.target.detail!==Ee.ID||!(null===(n=this._contentWidget)||void 0===n?void 0:n.isColorPickerVisible()))&&(!this._isHoverSticky||12!==s||e.target.detail!==Ie.ID)){if(this._isHoverEnabled)return this._getOrCreateContentWidget().maybeShowAt(e)?void(null===(o=this._glyphWidget)||void 0===o||o.hide()):2===s&&e.target.position?(null===(r=this._contentWidget)||void 0===r||r.hide(),this._glyphWidget||(this._glyphWidget=new Ie(this._editor,this._modeService,this._openerService)),void this._glyphWidget.startShowingAt(e.target.position.lineNumber)):void this._hideWidgets();this._hideWidgets()}}_onKeyDown(e){5!==e.keyCode&&6!==e.keyCode&&57!==e.keyCode&&4!==e.keyCode&&this._hideWidgets()}_hideWidgets(){var e,t,i;this._isMouseDown&&this._hoverClicked&&(null===(e=this._contentWidget)||void 0===e?void 0:e.isColorPickerVisible())||(this._hoverClicked=!1,null===(t=this._glyphWidget)||void 0===t||t.hide(),null===(i=this._contentWidget)||void 0===i||i.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(Ee,this._editor,this._hoverVisibleKey)),this._contentWidget}isColorPickerVisible(){var e;return(null===(e=this._contentWidget)||void 0===e?void 0:e.isColorPickerVisible())||!1}showContentHover(e,t,i){this._getOrCreateContentWidget().startShowingAtRange(e,t,i)}dispose(){var e,t;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),null===(e=this._glyphWidget)||void 0===e||e.dispose(),null===(t=this._contentWidget)||void 0===t||t.dispose()}};Oe.ID="editor.contrib.hover",Oe=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([Re(1,B.TG),Re(2,L.v4),Re(3,c.h),Re(4,Q.i6)],Oe);class Fe extends s.R6{constructor(){super({id:"editor.action.showHover",label:n.N({key:"showHover",comment:["Label for action that will trigger the showing of a hover in the editor.","This allows for users to show the hover without using the mouse."]},"Show Hover"),alias:"Show Hover",precondition:void 0,kbOpts:{kbExpr:l.u.editorTextFocus,primary:(0,o.gx)(2089,2087),weight:100}})}run(e,t){if(!t.hasModel())return;let i=Oe.get(t);if(!i)return;const n=t.getPosition(),o=new a.e(n.lineNumber,n.column,n.lineNumber,n.column),r=2===t.getOption(2);i.showContentHover(o,1,r)}}class Pe extends s.R6{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:n.N({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){let i=Oe.get(t);if(!i)return;const n=t.getPosition();if(!n)return;const o=new a.e(n.lineNumber,n.column,n.lineNumber,n.column);Te.GotoDefinitionAtPositionEditorContribution.get(t).startFindDefinitionFromCursor(n).then((()=>{i.showContentHover(o,1,!0)}))}}(0,s._K)(Oe.ID,Oe),(0,s.Qr)(Fe),(0,s.Qr)(Pe),(0,_.Ic)(((e,t)=>{const i=e.getColor(b.pt);i&&t.addRule(`.monaco-editor .hoverHighlight { background-color: ${i}; }`);const n=e.getColor(b.yJ);n&&t.addRule(`.monaco-editor .monaco-hover { background-color: ${n}; }`);const o=e.getColor(b.CN);o&&(t.addRule(`.monaco-editor .monaco-hover { border: 1px solid ${o}; }`),t.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${o.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${o.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${o.transparent(.5)}; }`));const r=e.getColor(b.ur);r&&t.addRule(`.monaco-editor .monaco-hover a { color: ${r}; }`);const s=e.getColor(b.Sb);s&&t.addRule(`.monaco-editor .monaco-hover { color: ${s}; }`);const a=e.getColor(b.Lo);a&&t.addRule(`.monaco-editor .monaco-hover .hover-row .actions { background-color: ${a}; }`);const l=e.getColor(b.Sw);l&&t.addRule(`.monaco-editor .monaco-hover code { background-color: ${l}; }`)}))},3554:(e,t,i)=>{"use strict";i.r(t);var n=i(3580),o=i(4314),r=i(3860),s=i(9102),a=i(6830),l=i(469);class c{constructor(e,t,i){this._editRange=e,this._originalSelection=t,this._text=i}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new r.Y(i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn),i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn)):new r.Y(i.endLineNumber,i.endColumn-this._text.length,i.endLineNumber,i.endColumn)}}var u=i(9925),h=i(7781),d=i(7869),g=i(3411),f=i(5393),p=i(7301);let m=class e{constructor(e,t){this.decorationIds=[],this.editor=e,this.editorWorkerService=t}static get(t){return t.getContribution(e.ID)}dispose(){}run(t,i){this.currentRequest&&this.currentRequest.cancel();const n=this.editor.getSelection(),s=this.editor.getModel();if(!s||!n)return;let a=n;if(a.startLineNumber!==a.endLineNumber)return;const l=new u.yy(this.editor,5),h=s.uri;return this.editorWorkerService.canNavigateValueSet(h)?(this.currentRequest=(0,f.PG)((e=>this.editorWorkerService.navigateValueSet(h,a,i))),this.currentRequest.then((i=>{if(!i||!i.range||!i.value)return;if(!l.validate(this.editor))return;let n=o.e.lift(i.range),s=i.range,u=i.value.length-(a.endColumn-a.startColumn);s={startLineNumber:s.startLineNumber,startColumn:s.startColumn,endLineNumber:s.endLineNumber,endColumn:s.startColumn+i.value.length},u>1&&(a=new r.Y(a.startLineNumber,a.startColumn,a.endLineNumber,a.endColumn+u-1));const h=new c(n,a,i.value);this.editor.pushUndoStop(),this.editor.executeCommand(t,h),this.editor.pushUndoStop(),this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[{range:s,options:e.DECORATION}]),this.decorationRemover&&this.decorationRemover.cancel(),this.decorationRemover=(0,f.Vs)(350),this.decorationRemover.then((()=>this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[]))).catch(p.dL)})).catch(p.dL)):Promise.resolve(void 0)}};var _,v;m.ID="editor.contrib.inPlaceReplaceController",m.DECORATION=g.qx.register({description:"in-place-replace",className:"valueSetReplacement"}),m=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(_=1,v=l.p,function(e,t){v(e,t,_)})],m);class b extends a.R6{constructor(){super({id:"editor.action.inPlaceReplace.up",label:n.N("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:s.u.writable,kbOpts:{kbExpr:s.u.editorTextFocus,primary:3154,weight:100}})}run(e,t){const i=m.get(t);return i?i.run(this.id,!0):Promise.resolve(void 0)}}class y extends a.R6{constructor(){super({id:"editor.action.inPlaceReplace.down",label:n.N("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:s.u.writable,kbOpts:{kbExpr:s.u.editorTextFocus,primary:3156,weight:100}})}run(e,t){const i=m.get(t);return i?i.run(this.id,!1):Promise.resolve(void 0)}}(0,a._K)(m.ID,m),(0,a.Qr)(b),(0,a.Qr)(y),(0,h.Ic)(((e,t)=>{const i=e.getColor(d.Dl);i&&t.addRule(`.monaco-editor.vs .valueSetReplacement { outline: solid 2px ${i}; }`)}))},1491:(e,t,i)=>{"use strict";function n(e,t){let i=0;for(let n=0;nn,J:()=>o})},638:(e,t,i)=>{"use strict";i.r(t),i.d(t,{getReindentEditOperations:()=>_,IndentationToSpacesAction:()=>v,IndentationToTabsAction:()=>b,ChangeIndentationSizeAction:()=>y,IndentUsingTabs:()=>w,IndentUsingSpaces:()=>C,DetectIndentation:()=>S,ReindentLinesAction:()=>x,ReindentSelectedLinesAction:()=>k,AutoIndentOnPasteCommand:()=>D,AutoIndentOnPaste:()=>L,IndentationToSpacesCommand:()=>E,IndentationToTabsCommand:()=>A});var n=i(3580),o=i(5976),r=i(7295),s=i(6830),a=i(291),l=i(9386),c=i(4314),u=i(3860),h=i(9102),d=i(3411),g=i(3831),f=i(1200),p=i(1491),m=i(1157);function _(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return[];let o=g.zu.getIndentationRules(e.getLanguageIdentifier().id);if(!o)return[];for(i=Math.min(i,e.getLineCount());t<=i&&o.unIndentedLinePattern;){let i=e.getLineContent(t);if(!o.unIndentedLinePattern.test(i))break;t++}if(t>i-1)return[];const{tabSize:s,indentSize:c,insertSpaces:h}=e.getOptions(),f=(e,t)=>(t=t||1,a.U.shiftIndent(e,e.length+t,s,c,h)),p=(e,t)=>(t=t||1,a.U.unshiftIndent(e,e.length+t,s,c,h));let m,_=[],v=e.getLineContent(t),b=v;if(null!=n){m=n;let e=r.V8(v);b=m+v.substring(e.length),o.decreaseIndentPattern&&o.decreaseIndentPattern.test(b)&&(m=p(m),b=m+v.substring(e.length)),v!==b&&_.push(l.h.replaceMove(new u.Y(t,1,t,e.length+1),d.yO.normalizeIndentation(m,c,h)))}else m=r.V8(v);let y=m;o.increaseIndentPattern&&o.increaseIndentPattern.test(b)?(y=f(y),m=f(m)):o.indentNextLinePattern&&o.indentNextLinePattern.test(b)&&(y=f(y));for(let n=++t;n<=i;n++){let t=e.getLineContent(n),i=r.V8(t),s=y+t.substring(i.length);o.decreaseIndentPattern&&o.decreaseIndentPattern.test(s)&&(y=p(y),m=p(m)),i!==y&&_.push(l.h.replaceMove(new u.Y(n,1,n,i.length+1),d.yO.normalizeIndentation(y,c,h))),o.unIndentedLinePattern&&o.unIndentedLinePattern.test(t)||(o.increaseIndentPattern&&o.increaseIndentPattern.test(s)?(m=f(m),y=m):y=o.indentNextLinePattern&&o.indentNextLinePattern.test(s)?f(y):m)}return _}class v extends s.R6{constructor(){super({id:v.ID,label:n.N("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:h.u.writable})}run(e,t){let i=t.getModel();if(!i)return;let n=i.getOptions(),o=t.getSelection();if(!o)return;const r=new E(o,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop(),i.updateOptions({insertSpaces:!0})}}v.ID="editor.action.indentationToSpaces";class b extends s.R6{constructor(){super({id:b.ID,label:n.N("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:h.u.writable})}run(e,t){let i=t.getModel();if(!i)return;let n=i.getOptions(),o=t.getSelection();if(!o)return;const r=new A(o,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop(),i.updateOptions({insertSpaces:!1})}}b.ID="editor.action.indentationToTabs";class y extends s.R6{constructor(e,t){super(t),this.insertSpaces=e}run(e,t){const i=e.get(m.eJ),o=e.get(f.q);let r=t.getModel();if(!r)return;let s=o.getCreationOptions(r.getLanguageIdentifier().language,r.uri,r.isForSimpleWidget);const a=[1,2,3,4,5,6,7,8].map((e=>({id:e.toString(),label:e.toString(),description:e===s.tabSize?n.N("configuredTabSize","Configured Tab Size"):void 0}))),l=Math.min(r.getOptions().tabSize-1,7);setTimeout((()=>{i.pick(a,{placeHolder:n.N({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:a[l]}).then((e=>{e&&r&&!r.isDisposed()&&r.updateOptions({tabSize:parseInt(e.label,10),insertSpaces:this.insertSpaces})}))}),50)}}class w extends y{constructor(){super(!1,{id:w.ID,label:n.N("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}}w.ID="editor.action.indentUsingTabs";class C extends y{constructor(){super(!0,{id:C.ID,label:n.N("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}}C.ID="editor.action.indentUsingSpaces";class S extends s.R6{constructor(){super({id:S.ID,label:n.N("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){const i=e.get(f.q);let n=t.getModel();if(!n)return;let o=i.getCreationOptions(n.getLanguageIdentifier().language,n.uri,n.isForSimpleWidget);n.detectIndentation(o.insertSpaces,o.tabSize)}}S.ID="editor.action.detectIndentation";class x extends s.R6{constructor(){super({id:"editor.action.reindentlines",label:n.N("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:h.u.writable})}run(e,t){let i=t.getModel();if(!i)return;let n=_(i,1,i.getLineCount());n.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,n),t.pushUndoStop())}}class k extends s.R6{constructor(){super({id:"editor.action.reindentselectedlines",label:n.N("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:h.u.writable})}run(e,t){let i=t.getModel();if(!i)return;let n=t.getSelections();if(null===n)return;let o=[];for(let e of n){let t=e.startLineNumber,n=e.endLineNumber;if(t!==n&&1===e.endColumn&&n--,1===t){if(t===n)continue}else t--;let r=_(i,t,n);o.push(...r)}o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}}class D{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(let t of e)t.range&&"string"==typeof t.text&&this._edits.push(t)}getEditOperations(e,t){for(let e of this._edits)t.addEditOperation(c.e.lift(e.range),e.text);let i=!1;Array.isArray(this._edits)&&1===this._edits.length&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),i||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}class L{constructor(e){this.callOnDispose=new o.SL,this.callOnModel=new o.SL,this.editor=e,this.callOnDispose.add(e.onDidChangeConfiguration((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModel((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModelLanguage((()=>this.update())))}update(){this.callOnModel.clear(),this.editor.getOption(9)<4||this.editor.getOption(44)||this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste((({range:e})=>{this.trigger(e)})))}trigger(e){let t=this.editor.getSelections();if(null===t||t.length>1)return;const i=this.editor.getModel();if(!i)return;if(!i.isCheapToTokenize(e.getStartPosition().lineNumber))return;const n=this.editor.getOption(9),{tabSize:o,indentSize:s,insertSpaces:l}=i.getOptions();let u=[],h={shiftIndent:e=>a.U.shiftIndent(e,e.length+1,o,s,l),unshiftIndent:e=>a.U.unshiftIndent(e,e.length+1,o,s,l)},d=e.startLineNumber;for(;d<=e.endLineNumber&&this.shouldIgnoreLine(i,d);)d++;if(d>e.endLineNumber)return;let f=i.getLineContent(d);if(!/\S/.test(f.substring(0,e.startColumn-1))){let e=g.zu.getGoodIndentForLine(n,i,i.getLanguageIdentifier().id,d,h);if(null!==e){let t=r.V8(f),n=p.Y(e,o);if(n!==p.Y(t,o)){let e=p.J(n,o,l);u.push({range:new c.e(d,1,d,t.length+1),text:e}),f=e+f.substr(t.length)}else{let e=g.zu.getIndentMetadata(i,d);if(0===e||8===e)return}}}const m=d;for(;di.getLineTokens(e),getLanguageIdentifier:()=>i.getLanguageIdentifier(),getLanguageIdAtPosition:(e,t)=>i.getLanguageIdAtPosition(e,t),getLineContent:e=>e===m?f:i.getLineContent(e)},s=g.zu.getGoodIndentForLine(n,t,i.getLanguageIdentifier().id,d+1,h);if(null!==s){let t=p.Y(s,o),n=p.Y(r.V8(i.getLineContent(d+1)),o);if(t!==n){let s=t-n;for(let t=d+1;t<=e.endLineNumber;t++){let e=i.getLineContent(t),n=r.V8(e),a=p.Y(n,o)+s,h=p.J(a,o,l);h!==n&&u.push({range:new c.e(t,1,t,n.length+1),text:h})}}}}if(u.length>0){this.editor.pushUndoStop();let e=new D(u,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",e),this.editor.pushUndoStop()}}shouldIgnoreLine(e,t){e.forceTokenization(t);let i=e.getLineFirstNonWhitespaceColumn(t);if(0===i)return!0;let n=e.getLineTokens(t);if(n.getCount()>0){let e=n.findTokenIndexAtOffset(i);if(e>=0&&1===n.getStandardTokenType(e))return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}}function N(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return;let o="";for(let e=0;e{"use strict";i.r(t),i.d(t,{getInlayHints:()=>S,InlayHintsController:()=>x});var n=i(5393),o=i(7301),r=i(9954),s=i(5976),a=i(6830),l=i(1640),c=i(4101),u=i(9488),h=i(3910),d=i(1050),g=i(7781),f=i(4314),p=i(1036),m=i(4565),_=i(666),v=i(8401),b=i(8216),y=i(187),w=function(e,t){return function(i,n){t(i,n,e)}},C=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function S(e,t,i){return C(this,void 0,void 0,(function*(){const n=[],r=c.mX.ordered(e).reverse(),s=(0,u.xH)(r.map((r=>t.map((t=>Promise.resolve(r.provideInlayHints(e,t,i)).then((e=>{e&&n.push({list:e,provider:r})}),(e=>{(0,o.Cp)(e)})))))));return yield Promise.all(s),n}))}let x=class{constructor(e,t,i){this._editor=e,this._codeEditorService=t,this._themeService=i,this._disposables=new s.SL,this._sessionDisposables=new s.SL,this._getInlayHintsDelays=new p.Y(c.mX,250,2500),this._decorationsTypeIds=[],this._decorationIds=[],this._disposables.add(c.mX.onDidChange((()=>this._update()))),this._disposables.add(i.onDidColorThemeChange((()=>this._update()))),this._disposables.add(e.onDidChangeModel((()=>this._update()))),this._disposables.add(e.onDidChangeModelLanguage((()=>this._update()))),this._disposables.add(e.onDidChangeConfiguration((e=>{e.hasChanged(124)&&this._update()}))),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(124).enabled)return void this._removeAllDecorations();const e=this._editor.getModel();if(!e||!c.mX.has(e))return void this._removeAllDecorations();const t=new n.pY((()=>C(this,void 0,void 0,(function*(){const i=Date.now(),n=new d.A;this._sessionDisposables.add((0,s.OF)((()=>n.dispose(!0))));const o=this._editor.getVisibleRangesPlusViewportAboveBelow(),r=yield S(e,o,n.token),a=this._getInlayHintsDelays.update(e,Date.now()-i);t.delay=a,this._updateHintsDecorators(r)}))),this._getInlayHintsDelays.get(e));this._sessionDisposables.add(t),this._sessionDisposables.add(this._editor.onDidChangeModelContent((()=>t.schedule()))),this._disposables.add(this._editor.onDidScrollChange((()=>t.schedule()))),t.schedule();const i=new s.SL;this._sessionDisposables.add(i);for(const n of c.mX.all(e))"function"==typeof n.onDidChangeInlayHints&&i.add(n.onDidChangeInlayHints((()=>t.schedule())))}_updateHintsDecorators(e){const{fontSize:t,fontFamily:i}=this._getLayoutInfo(),n=this._themeService.getColorTheme().getColor(h.Pp),o=this._themeService.getColorTheme().getColor(h.VV),s=[],a=[],l="--inlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(l,i);for(const{list:i}of e)for(let e=0;et)&&(i=.9*t|0),{fontSize:i,fontFamily:e.fontFamily}}_removeAllDecorations(){this._decorationIds=this._editor.deltaDecorations(this._decorationIds,[]),this._decorationsTypeIds.forEach(this._codeEditorService.removeDecorationType,this._codeEditorService),this._decorationsTypeIds=[]}};x.ID="editor.contrib.InlayHints",x=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([w(1,l.$),w(2,g.XE)],x),(0,a._K)(x.ID,x),m.P.registerCommand("_executeInlayHintProvider",((e,...t)=>C(void 0,void 0,void 0,(function*(){const[i,n]=t;(0,v.p_)(_.o.isUri(i)),(0,v.p_)(f.e.isIRange(n));const o=yield e.get(b.S).createModelReference(i);try{const e=yield S(o.object.textEditorModel,[f.e.lift(n)],d.T.None);return(0,u.xH)(e.map((e=>e.list))).sort(((e,t)=>y.L.compare(e.position,t.position)))}finally{o.dispose()}}))))},7586:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ActiveGhostTextController:()=>te,GhostTextController:()=>J,ShowNextInlineSuggestionAction:()=>oe,ShowPreviousInlineSuggestionAction:()=>re,TriggerInlineSuggestionAction:()=>se,commitInlineSuggestionAction:()=>ne});var n,o=i(5976),r=i(6830),s=i(9102),a=i(5321),l=i(4314),c=i(1640),u=i(7295),h=i(7736),d=i(4141),g=i(72),f=i(9052),p=i(8411),m=i(187),_=i(4669),v=i(7781),b=i(7869),y=i(1264),w=i(3181),C=function(e,t){return function(i,n){t(i,n,e)}};const S=null===(n=window.trustedTypes)||void 0===n?void 0:n.createPolicy("editorGhostText",{createHTML:e=>e});class x extends o.JT{constructor(e){super(),this.editor=e,this._expanded=void 0,this.onDidChangeEmitter=new _.Q5,this.onDidChange=this.onDidChangeEmitter.event,this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(104)&&void 0===this._expanded&&this.onDidChangeEmitter.fire()})))}get expanded(){return void 0===this._expanded||this._expanded}setExpanded(e){this._expanded=!0,this.onDidChangeEmitter.fire()}}let k=class e extends o.JT{constructor(e,t,i){super(),this.editor=e,this._codeEditorService=t,this._themeService=i,this.codeEditorDecorationTypeKey=null,this.modelRef=this._register(new o.XK),this.decorationIds=[],this.viewZoneId=null,this.viewMoreContentWidget=null,this._register(this.editor.onDidChangeConfiguration((e=>{(e.hasChanged(27)||e.hasChanged(103)||e.hasChanged(86)||e.hasChanged(80)||e.hasChanged(41)||e.hasChanged(40)||e.hasChanged(56))&&this.render()}))),this._register((0,o.OF)((()=>{this.setModel(void 0)})))}get model(){var e;return null===(e=this.modelRef.value)||void 0===e?void 0:e.object}shouldShowHoverAtViewZone(e){return this.viewZoneId===e}setModel(e){var t,i;e!==this.model&&(this.modelRef.value=e?(t=e,i=e.onDidChange((()=>this.render())),{object:t,dispose:()=>i.dispose()}):void 0,this.render())}getRenderData(){var e;if(!this.editor.hasModel()||!(null===(e=this.model)||void 0===e?void 0:e.ghostText))return;const{minReservedLineCount:t,expanded:i}=this.model;let{position:n,lines:o}=this.model.ghostText;const r=this.editor.getModel(),s=r.getLineMaxColumn(n.lineNumber),{tabSize:a}=r.getOptions();return o.length>1&&n.column!==s&&(console.warn("Can only show multiline ghost text at the end of a line"),o=[],n=new m.L(n.lineNumber,s)),{tabSize:a,position:n,lines:o,minReservedLineCount:t,expanded:i}}render(){var t;const i=this.getRenderData();if(this.codeEditorDecorationTypeKey&&(this._codeEditorService.removeDecorationType(this.codeEditorDecorationTypeKey),this.codeEditorDecorationTypeKey=null),i&&i.lines.length>0){const n=this._themeService.getColorTheme().getColor(b.N5);let o,r;n&&(o=String(n.rgba.a),r=y.Il.Format.CSS.format(function(e){const{r:t,b:i,g:n}=e.rgba;return new y.Il(new y.VS(t,n,i,255))}(n)));const s=this._themeService.getColorTheme().getColor(b.x3);let a;s&&(a=`2px dashed ${s}`),this.codeEditorDecorationTypeKey="0-ghost-text-"+ ++e.decorationTypeCount;const l=((null===(t=this.editor.getModel())||void 0===t?void 0:t.getLineContent(i.position.lineNumber))||"").substr(0,i.position.column-1),c=function(e,t,i,n){const o=t+e,r=w.io.visibleColumnsByColumns(o,i);let s="",a=t.length+1;for(const t of e){if("\t"===t){const e=r[a+1]-r[a];for(let t=0;t{if(this.viewZoneId&&(e.removeZone(this.viewZoneId),this.viewZoneId=null),i){const t=i.lines.slice(1),n=Math.max(t.length,i.minReservedLineCount);if(n>0)if(i.expanded){const o=document.createElement("div");this.renderLines(o,i.tabSize,t),this.viewZoneId=e.addZone({afterLineNumber:i.position.lineNumber,afterColumn:i.position.column,heightInLines:n,domNode:o})}else t.length>0&&(this.viewMoreContentWidget=this.renderViewMoreLines(i.position,i.lines[0],t.length))}}))}renderViewMoreLines(e,t,i){const n=this.editor.getOption(40),r=document.createElement("div");r.className="suggest-preview-additional-widget",f.V.applyFontInfoSlow(r,n);const s=document.createElement("span");s.className="content-spacer",s.append(t),r.append(s);const l=document.createElement("span");l.className="content-newline suggest-preview-text",l.append("⏎ "),r.append(l);const c=new o.SL,u=document.createElement("div");return u.className="button suggest-preview-text",u.append(`+${i} lines…`),c.add(a.mu(u,"mousedown",(e=>{var t;null===(t=this.model)||void 0===t||t.setExpanded(!0),e.preventDefault(),this.editor.focus()}))),r.append(u),new D(this.editor,e,r,c)}renderLines(e,t,i){const n=this.editor.getOptions(),o=n.get(27),r=n.get(103),s=n.get(80),a=n.get(41),l=n.get(40),c=n.get(56),m=(0,g.l$)(1e4);m.appendASCIIString('
    ');for(let e=0,n=i.length;e');const g=u.$i(n),f=u.Ut(n),_=p.A.createEmpty(n);(0,h.d1)(new h.IJ(l.isMonospace&&!o,l.canUseHalfwidthRightwardsArrow,n,!1,g,f,0,_,[],t,0,l.spaceWidth,l.middotWidth,l.wsmiddotWidth,r,"none",s,a!==d.n0.OFF,null),m),m.appendASCIIString("
    ")}m.appendASCIIString(""),f.V.applyFontInfoSlow(e,l);const _=m.build(),v=S?S.createHTML(_):_;e.innerHTML=v}};k.decorationTypeCount=0,k=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([C(1,c.$),C(2,v.XE)],k);class D extends o.JT{constructor(e,t,i,n){super(),this.editor=e,this.position=t,this.domNode=i,this.allowEditorOverflow=!1,this.suppressMouseDown=!1,this._register(n),this._register((0,o.OF)((()=>{this.editor.removeContentWidget(this)}))),this.editor.addContentWidget(this)}getId(){return"editor.widget.viewMoreLinesWidget"}getDomNode(){return this.domNode}getPosition(){return{position:this.position,preference:[0]}}}(0,v.Ic)(((e,t)=>{const i=e.getColor(b.N5);if(i){const e=String(i.rgba.a),n=y.Il.Format.CSS.format(function(e){const{r:t,b:i,g:n}=e.rgba;return new y.Il(new y.VS(t,n,i,255))}(i));t.addRule(`.monaco-editor .suggest-preview-text .mtk1 { opacity: ${e}; color: ${n}; }`)}const n=e.getColor(b.x3);n&&t.addRule(`.monaco-editor .suggest-preview-text .mtk1 { border: 2px dashed ${n}; }`)}));var L=i(5393),N=i(1050),E=i(7301),A=i(4101),M=i(9386);class I{constructor(){this._isDisposed=!1,(0,o.wi)(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||(null===(t=this._value)||void 0===t||t.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,null===(e=this._value)||void 0===e||e.dispose(),this._value=void 0}replace(e){const t=this._value;return this._value=e,t}}var T=i(8728),R=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class O extends o.JT{constructor(e,t){super(),this.editor=e,this.commandService=t,this.onDidChangeEmitter=new _.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.completionSession=this._register(new I),this.active=!1,this._register(t.onDidExecuteCommand((t=>{new Set([r.n_.id,r.kz.id,T.CoreEditingCommands.Tab.id,T.CoreEditingCommands.DeleteLeft.id,T.CoreEditingCommands.DeleteRight.id]).has(t.commandId)&&e.hasTextFocus()&&this.handleUserInput()}))),this._register(this.editor.onDidType((e=>{this.handleUserInput()}))),this._register(this.editor.onDidChangeCursorPosition((e=>{this.session&&!this.session.isValid&&this.hide()})))}handleUserInput(){this.session&&!this.session.isValid&&this.hide(),setTimeout((()=>{this.startSessionIfTriggered()}),0)}get session(){return this.completionSession.value}get ghostText(){var e;return null===(e=this.session)||void 0===e?void 0:e.ghostText}get minReservedLineCount(){return this.session?this.session.minReservedLineCount:0}get expanded(){return!!this.session&&this.session.expanded}setExpanded(e){var t;null===(t=this.session)||void 0===t||t.setExpanded(e)}setActive(e){var t;this.active=e,e&&(null===(t=this.session)||void 0===t||t.scheduleAutomaticUpdate())}startSessionIfTriggered(){this.editor.getOption(52).enabled&&(this.session&&this.session.isValid||this.startSession())}startSession(){this.completionSession.value||(this.completionSession.value=new F(this.editor,this.editor.getPosition(),(()=>this.active),this.commandService),this.completionSession.value.takeOwnership(this.completionSession.value.onDidChange((()=>{this.onDidChangeEmitter.fire()}))))}hide(){this.completionSession.clear(),this.onDidChangeEmitter.fire()}commitCurrentSuggestion(){var e;null===(e=this.session)||void 0===e||e.commitCurrentCompletion()}showNext(){var e;null===(e=this.session)||void 0===e||e.showNextInlineCompletion()}showPrevious(){var e;null===(e=this.session)||void 0===e||e.showPreviousInlineCompletion()}}class F extends x{constructor(e,t,i,n){let o;super(e),this.triggerPosition=t,this.shouldUpdate=i,this.commandService=n,this.minReservedLineCount=0,this.updateOperation=this._register(new I),this.cache=this._register(new I),this.updateSoon=this._register(new L.pY((()=>this.update(A.bw.Automatic)),50)),this.textModel=this.editor.getModel(),this.currentlySelectedCompletionId=void 0,this._register(this.onDidChange((()=>{const e=this.currentCompletion;if(e&&e.sourceInlineCompletion!==o){o=e.sourceInlineCompletion;const t=e.sourceProvider;t.handleItemDidShow&&t.handleItemDidShow(e.sourceInlineCompletions,o)}}))),this._register(this.editor.onDidChangeModelContent((e=>{if(this.cache.value){let e=!1;for(const t of this.cache.value.completions){const i=this.textModel.getDecorationRange(t.decorationId);i?t.synchronizedRange.equalsRange(i)||(e=!0,t.synchronizedRange=i):(0,E.dL)(new Error("Decoration has no range"))}e&&this.onDidChangeEmitter.fire()}this.scheduleAutomaticUpdate()}))),this.scheduleAutomaticUpdate()}fixAndGetIndexOfCurrentSelection(){if(!this.currentlySelectedCompletionId||!this.cache.value)return 0;if(0===this.cache.value.completions.length)return 0;const e=this.cache.value.completions.findIndex((e=>e.semanticId===this.currentlySelectedCompletionId));return-1===e?(this.currentlySelectedCompletionId=void 0,0):e}get currentCachedCompletion(){if(this.cache.value)return this.cache.value.completions[this.fixAndGetIndexOfCurrentSelection()]}showNextInlineCompletion(){var e;return R(this,void 0,void 0,(function*(){yield this.ensureUpdateWithExplicitContext();const t=(null===(e=this.cache.value)||void 0===e?void 0:e.completions)||[];if(t.length>0){const e=(this.fixAndGetIndexOfCurrentSelection()+1)%t.length;this.currentlySelectedCompletionId=t[e].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()}))}showPreviousInlineCompletion(){var e;return R(this,void 0,void 0,(function*(){yield this.ensureUpdateWithExplicitContext();const t=(null===(e=this.cache.value)||void 0===e?void 0:e.completions)||[];if(t.length>0){const e=(this.fixAndGetIndexOfCurrentSelection()+t.length-1)%t.length;this.currentlySelectedCompletionId=t[e].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()}))}ensureUpdateWithExplicitContext(){var e;return R(this,void 0,void 0,(function*(){this.updateOperation.value?this.updateOperation.value.triggerKind===A.bw.Explicit?yield this.updateOperation.value.promise:yield this.update(A.bw.Explicit):(null===(e=this.cache.value)||void 0===e?void 0:e.triggerKind)!==A.bw.Explicit&&(yield this.update(A.bw.Explicit))}))}get ghostText(){const e=this.currentCompletion;return e?V(e,this.editor.getModel()):void 0}get currentCompletion(){const e=this.currentCachedCompletion;if(e)return{text:e.inlineCompletion.text,range:e.synchronizedRange,command:e.inlineCompletion.command,sourceProvider:e.inlineCompletion.sourceProvider,sourceInlineCompletions:e.inlineCompletion.sourceInlineCompletions,sourceInlineCompletion:e.inlineCompletion.sourceInlineCompletion}}get isValid(){return this.editor.getPosition().lineNumber===this.triggerPosition.lineNumber}scheduleAutomaticUpdate(){this.updateOperation.clear(),this.updateSoon.schedule()}update(e){return R(this,void 0,void 0,(function*(){if(!this.shouldUpdate())return;const t=this.editor.getPosition(),i=(0,L.PG)((i=>R(this,void 0,void 0,(function*(){let n;try{n=yield function(e,t,i,n=N.T.None){return R(this,void 0,void 0,(function*(){const o=function(e,t){const i=t.getWordAtPosition(e),n=t.getLineMaxColumn(e.lineNumber);return i?new l.e(e.lineNumber,i.startColumn,e.lineNumber,n):l.e.fromPositions(e,e.with(void 0,n))}(e,t),r=A.zu.all(t),s=yield Promise.all(r.map((o=>R(this,void 0,void 0,(function*(){const r=yield o.provideInlineCompletions(t,e,i,n);return{completions:r,provider:o,dispose:()=>{r&&o.freeInlineCompletions(r)}}}))))),a=new Map;for(const e of s){const t=e.completions;if(t)for(const i of t.items.map((i=>({text:i.text,range:i.range?l.e.lift(i.range):o,command:i.command,sourceProvider:e.provider,sourceInlineCompletions:t,sourceInlineCompletion:i}))))i.range.startLineNumber===i.range.endLineNumber&&a.set(JSON.stringify({text:i.text,range:i.range}),i)}return{items:[...a.values()],dispose:()=>{for(const e of s)e.dispose()}}}))}(t,this.editor.getModel(),{triggerKind:e},i)}catch(e){return void(0,E.dL)(e)}i.isCancellationRequested||(this.cache.value=new B(this.editor,n,(()=>this.onDidChangeEmitter.fire()),e),this.onDidChangeEmitter.fire())})))),n=new P(i,e);this.updateOperation.value=n,yield i,this.updateOperation.value===n&&this.updateOperation.clear()}))}takeOwnership(e){this._register(e)}commitCurrentCompletion(){const e=this.currentCompletion;e&&this.commit(e)}commit(e){const t=this.cache.replace(void 0);this.editor.executeEdits("inlineSuggestion.accept",[M.h.replaceMove(e.range,e.text)]),e.command?this.commandService.executeCommand(e.command.id,...e.command.arguments||[]).finally((()=>{null==t||t.dispose()})).then(void 0,E.Cp):null==t||t.dispose(),this.onDidChangeEmitter.fire()}}class P{constructor(e,t){this.promise=e,this.triggerKind=t}dispose(){this.promise.cancel()}}class B extends o.JT{constructor(e,t,i,n){super(),this.triggerKind=n;const r=e.deltaDecorations([],t.items.map((e=>({range:e.range,options:{description:"inline-completion-tracking-range"}}))));this._register((0,o.OF)((()=>{e.deltaDecorations(r,[])}))),this.completions=t.items.map(((e,t)=>new z(e,r[t]))),this._register(e.onDidChangeModelContent((()=>{let t=!1;const n=e.getModel();for(const e of this.completions){const i=n.getDecorationRange(e.decorationId);i?e.synchronizedRange.equalsRange(i)||(t=!0,e.synchronizedRange=i):(0,E.dL)(new Error("Decoration has no range"))}t&&i()}))),this._register(t)}}class z{constructor(e,t){this.inlineCompletion=e,this.decorationId=t,this.semanticId=JSON.stringify({text:this.inlineCompletion.text,startLine:this.inlineCompletion.range.startLineNumber,startColumn:this.inlineCompletion.range.startColumn,command:this.inlineCompletion.command}),this.synchronizedRange=e.range}}function W(e){return e.replace(/^\s+/,"")}function V(e,t){const i=t.getValueInRange(e.range);let n;const o=t.getLineFirstNonWhitespaceColumn(e.range.startLineNumber);if(e.text.startsWith(i))n=e.text.substr(i.length);else{if(!(0===o||e.range.startColumn1&&t.getLineMaxColumn(r.lineNumber)!==r.column))return{lines:s,position:r}}var H=i(3472),$=i(7548),U=i(8250);class j extends x{constructor(e){super(e),this.isSuggestWidgetVisible=!1,this.currentGhostText=void 0,this._isActive=!1,this.minReservedLineCount=0,this.setInactiveDelayed=this._register(new L.pY((()=>{this.isSuggestWidgetVisible||this.isActive&&(this._isActive=!1,this.onDidChangeEmitter.fire())}),100));const t=U.SuggestController.get(this.editor);if(t){let e=!1;const i=()=>{e||(e=!0,this._register(t.widget.value.onDidShow((()=>{this.isSuggestWidgetVisible=!0,this._isActive=!0,this.updateFromSuggestion()}))),this._register(t.widget.value.onDidHide((()=>{this.isSuggestWidgetVisible=!1,this.setInactiveDelayed.schedule(),this.minReservedLineCount=0,this.updateFromSuggestion()}))),this._register(t.widget.value.onDidFocus((()=>{this.isSuggestWidgetVisible=!0,this._isActive=!0,this.updateFromSuggestion()}))))};this._register(_.ju.once(t.model.onDidTrigger)((e=>{i()})))}this.updateFromSuggestion(),this._register((0,o.OF)((()=>{const e=U.SuggestController.get(this.editor);e&&e.stopForceRenderingAbove()})))}get isActive(){return this._isActive}setExpanded(e){super.setExpanded(e),this.updateFromSuggestion()}isSuggestionPreviewEnabled(){return this.editor.getOption(104).preview}updateFromSuggestion(){const e=U.SuggestController.get(this.editor);if(!e)return void this.setCurrentInlineCompletion(void 0);if(!this.isSuggestWidgetVisible)return void this.setCurrentInlineCompletion(void 0);const t=e.widget.value.getFocusedItem();t?this.setCurrentInlineCompletion(function(e,t,i){const n=i.item;if(Array.isArray(n.completion.additionalTextEdits))return{text:"",range:l.e.fromPositions(t,t)};let{insertText:o}=n.completion;if(4&n.completion.insertTextRules){const i=(new H.Yj).parse(o),n=e.editor.getModel();$.l.adjustWhitespace(n,t,i,!0,!0),o=i.toString()}const r=e.getOverwriteInfo(n,!1);return{text:o,range:l.e.fromPositions(t.delta(0,-r.overwriteBefore),t.delta(0,Math.max(r.overwriteAfter,0)))}}(e,this.editor.getPosition(),t)):this.setCurrentInlineCompletion(void 0)}setCurrentInlineCompletion(e){this.currentGhostText=e?V(e,this.editor.getModel())||{lines:[],position:e.range.getEndPosition()}:void 0,this.currentGhostText&&this.expanded&&(this.minReservedLineCount=Math.max(this.minReservedLineCount,this.currentGhostText.lines.length-1));const t=U.SuggestController.get(this.editor);t&&(this.minReservedLineCount>=1&&this.isSuggestionPreviewEnabled()?t.forceRenderingAbove():t.stopForceRenderingAbove()),this.onDidChangeEmitter.fire()}get ghostText(){return this.isSuggestionPreviewEnabled()?this.currentGhostText:void 0}}var q=i(3580),K=i(4565),G=i(8819),Y=i(2065),Z=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},X=function(e,t){return function(i,n){t(i,n,e)}},Q=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};let J=class e extends o.JT{constructor(e,t,i){super(),this.editor=e,this.instantiationService=t,this.activeController=this._register(new o.XK),this.triggeredExplicitly=!1,this.contextKeys=new ee(i),this.widget=this._register(t.createInstance(k,this.editor)),this._register(this.editor.onDidChangeModel((()=>{this.updateModelController()}))),this._register(this.editor.onDidChangeConfiguration((e=>{e.hasChanged(104)&&this.updateModelController()}))),this.updateModelController()}static get(t){return t.getContribution(e.ID)}updateModelController(){const e=this.editor.getOption(104),t=this.editor.getOption(52);this.activeController.value=void 0,this.activeController.value=this.editor.hasModel()&&(e.preview||t.enabled||this.triggeredExplicitly)?this.instantiationService.createInstance(te,this.editor,this.widget,this.contextKeys):void 0}shouldShowHoverAt(e){var t;return(null===(t=this.activeController.value)||void 0===t?void 0:t.shouldShowHoverAt(e))||!1}shouldShowHoverAtViewZone(e){return this.widget.shouldShowHoverAtViewZone(e)}trigger(){var e;this.triggeredExplicitly=!0,this.activeController.value||this.updateModelController(),null===(e=this.activeController.value)||void 0===e||e.triggerInlineCompletion()}commit(){var e;null===(e=this.activeController.value)||void 0===e||e.commitInlineCompletion()}hide(){var e;null===(e=this.activeController.value)||void 0===e||e.hideInlineCompletion()}showNextInlineCompletion(){var e;null===(e=this.activeController.value)||void 0===e||e.showNextInlineCompletion()}showPreviousInlineCompletion(){var e;null===(e=this.activeController.value)||void 0===e||e.showPreviousInlineCompletion()}};J.inlineSuggestionVisible=new G.uy("inlineSuggestionVisible ",!1,q.N("inlineSuggestionVisible","Whether an inline suggestion is visible")),J.inlineSuggestionHasIndentation=new G.uy("inlineSuggestionHasIndentation",!1,q.N("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace")),J.ID="editor.contrib.ghostTextController",J=Z([X(1,Y.TG),X(2,G.i6)],J);class ee{constructor(e){this.contextKeyService=e,this.lastInlineCompletionVisibleValue=!1,this.inlineCompletionVisible=J.inlineSuggestionVisible.bindTo(this.contextKeyService),this.lastInlineCompletionSuggestsIndentationValue=!1,this.inlineCompletionSuggestsIndentation=J.inlineSuggestionHasIndentation.bindTo(this.contextKeyService)}setInlineCompletionVisible(e){e!==this.lastInlineCompletionVisibleValue&&(this.inlineCompletionVisible.set(e),this.lastInlineCompletionVisibleValue=e)}setInlineCompletionSuggestsIndentation(e){e!==this.lastInlineCompletionSuggestsIndentationValue&&(this.inlineCompletionSuggestsIndentation.set(e),this.lastInlineCompletionSuggestsIndentationValue=e)}}let te=class extends o.JT{constructor(e,t,i,n){super(),this.editor=e,this.widget=t,this.contextKeys=i,this.commandService=n,this.suggestWidgetAdapterModel=this._register(new j(this.editor)),this.inlineCompletionsModel=this._register(new O(this.editor,this.commandService)),this._register(this.suggestWidgetAdapterModel.onDidChange((()=>{this.updateModel(),this.updateContextKeys()}))),this.updateModel(),this._register((0,o.OF)((()=>{t.model!==this.suggestWidgetAdapterModel&&t.model!==this.inlineCompletionsModel||t.setModel(void 0),this.contextKeys.setInlineCompletionVisible(!1),this.contextKeys.setInlineCompletionSuggestsIndentation(!1)}))),this.inlineCompletionsModel&&this._register(this.inlineCompletionsModel.onDidChange((()=>{this.updateContextKeys()})))}get activeInlineCompletionsModel(){if(this.widget.model===this.inlineCompletionsModel)return this.inlineCompletionsModel}updateContextKeys(){var e,t;if(this.contextKeys.setInlineCompletionVisible(void 0!==(null===(e=this.activeInlineCompletionsModel)||void 0===e?void 0:e.ghostText)),null===(t=this.inlineCompletionsModel)||void 0===t?void 0:t.ghostText){const e=this.inlineCompletionsModel.ghostText.lines[0]||"",t=e.startsWith(" ")||e.startsWith("\t"),i=this.inlineCompletionsModel.ghostText.position,n=this.editor.getModel().getLineIndentColumn(i.lineNumber),o=i.column<=n;this.contextKeys.setInlineCompletionSuggestsIndentation(this.widget.model===this.inlineCompletionsModel&&t&&o)}else this.contextKeys.setInlineCompletionSuggestsIndentation(!1)}shouldShowHoverAt(e){var t;const i=null===(t=this.activeInlineCompletionsModel)||void 0===t?void 0:t.ghostText;return!!i&&e.containsPosition(i.position)}triggerInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.startSession()}commitInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.commitCurrentSuggestion()}hideInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.hide()}showNextInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.showNext()}showPreviousInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.showPrevious()}updateModel(){var e;this.widget.setModel(this.suggestWidgetAdapterModel.isActive?this.suggestWidgetAdapterModel:this.inlineCompletionsModel),null===(e=this.inlineCompletionsModel)||void 0===e||e.setActive(this.widget.model===this.inlineCompletionsModel)}};te=Z([X(3,K.H)],te);const ie=r._l.bindToContribution(J.get),ne=new ie({id:"editor.action.inlineSuggest.commit",precondition:G.Ao.and(J.inlineSuggestionVisible,J.inlineSuggestionHasIndentation.toNegated(),s.u.tabMovesFocus.toNegated()),kbOpts:{weight:100,primary:2},handler(e){e.commit(),e.editor.focus()}});(0,r.fK)(ne),(0,r.fK)(new ie({id:"editor.action.inlineSuggest.hide",precondition:J.inlineSuggestionVisible,kbOpts:{weight:100,primary:9},handler(e){e.hide()}}));class oe extends r.R6{constructor(){super({id:oe.ID,label:q.N("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:G.Ao.and(s.u.writable,J.inlineSuggestionVisible),kbOpts:{weight:100,primary:601}})}run(e,t){return Q(this,void 0,void 0,(function*(){const e=J.get(t);e&&(e.showNextInlineCompletion(),t.focus())}))}}oe.ID="editor.action.inlineSuggest.showNext";class re extends r.R6{constructor(){super({id:re.ID,label:q.N("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:G.Ao.and(s.u.writable,J.inlineSuggestionVisible),kbOpts:{weight:100,primary:599}})}run(e,t){return Q(this,void 0,void 0,(function*(){const e=J.get(t);e&&(e.showPreviousInlineCompletion(),t.focus())}))}}re.ID="editor.action.inlineSuggest.showPrevious";class se extends r.R6{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:q.N("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:s.u.writable})}run(e,t){return Q(this,void 0,void 0,(function*(){const e=J.get(t);e&&e.trigger()}))}}(0,r._K)(J.ID,J),(0,r.Qr)(se),(0,r.Qr)(oe),(0,r.Qr)(re)},2408:(e,t,i)=>{"use strict";i.r(t),i.d(t,{AbstractCaseAction:()=>H,AbstractDeleteAllToBoundaryAction:()=>P,AbstractSortLinesAction:()=>N,DeleteAllLeftAction:()=>B,DeleteAllRightAction:()=>z,DeleteLinesAction:()=>I,DuplicateSelectionAction:()=>D,IndentLinesAction:()=>T,InsertLineAfterAction:()=>F,InsertLineBeforeAction:()=>O,JoinLinesAction:()=>W,LowerCaseAction:()=>U,SnakeCaseAction:()=>K,SortLinesAscendingAction:()=>E,SortLinesDescendingAction:()=>A,TitleCaseAction:()=>j,TransposeAction:()=>V,TrimTrailingWhitespaceAction:()=>M,UpperCaseAction:()=>$});var n=i(3580),o=i(2258),r=i(8728),s=i(6830),a=i(1329),l=i(7295),c=i(9386),u=i(4314);class h{constructor(e,t){this._selection=e,this._cursors=t,this._selectionId=null}getEditOperations(e,t){let i=function(e,t){t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber));for(let e=t.length-2;e>=0;e--)t[e].lineNumber===t[e+1].lineNumber&&t.splice(e,1);let i=[],n=0,o=0,r=t.length;for(let s=1,a=e.getLineCount();s<=a;s++){let a=e.getLineContent(s),h=a.length+1,d=0;if(oe.getLineTokens(t),getLanguageIdentifier:()=>e.getLanguageIdentifier(),getLanguageIdAtPosition:(t,i)=>e.getLanguageIdAtPosition(t,i),getLineContent:null};if(n.startLineNumber===n.endLineNumber&&1===e.getLineMaxColumn(n.startLineNumber)){let i=n.startLineNumber,o=this._isMovingDown?i+1:i-1;1===e.getLineMaxColumn(o)?t.addEditOperation(new u.e(1,1,1,1),null):(t.addEditOperation(new u.e(i,1,i,1),e.getLineContent(o)),t.addEditOperation(new u.e(o,1,o,e.getLineMaxColumn(o)),null)),n=new f.Y(o,1,o,1)}else{let i,r;if(this._isMovingDown){i=n.endLineNumber+1,r=e.getLineContent(i),t.addEditOperation(new u.e(i-1,e.getLineMaxColumn(i-1),i,e.getLineMaxColumn(i)),null);let h=r;if(this.shouldAutoIndent(e,n)){let d=this.matchEnterRule(e,a,o,i,n.startLineNumber-1);if(null!==d){let t=l.V8(e.getLineContent(i)),n=d+y.Y(t,o),a=y.J(n,o,s);h=a+this.trimLeft(r)}else{c.getLineContent=t=>t===n.startLineNumber?e.getLineContent(i):e.getLineContent(t);let t=b.zu.getGoodIndentForLine(this._autoIndent,c,e.getLanguageIdAtPosition(i,1),n.startLineNumber,a);if(null!==t){let n=l.V8(e.getLineContent(i)),a=y.Y(t,o);if(a!==y.Y(n,o)){let e=y.J(a,o,s);h=e+this.trimLeft(r)}}}t.addEditOperation(new u.e(n.startLineNumber,1,n.startLineNumber,1),h+"\n");let g=this.matchEnterRuleMovingDown(e,a,o,n.startLineNumber,i,h);if(null!==g)0!==g&&this.getIndentEditsOfMovingBlock(e,t,n,o,s,g);else{c.getLineContent=t=>t===n.startLineNumber?h:t>=n.startLineNumber+1&&t<=n.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t);let r=b.zu.getGoodIndentForLine(this._autoIndent,c,e.getLanguageIdAtPosition(i,1),n.startLineNumber+1,a);if(null!==r){const i=l.V8(e.getLineContent(n.startLineNumber)),a=y.Y(r,o),c=y.Y(i,o);if(a!==c){const i=a-c;this.getIndentEditsOfMovingBlock(e,t,n,o,s,i)}}}}else t.addEditOperation(new u.e(n.startLineNumber,1,n.startLineNumber,1),h+"\n")}else if(i=n.startLineNumber-1,r=e.getLineContent(i),t.addEditOperation(new u.e(i,1,i+1,1),null),t.addEditOperation(new u.e(n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),"\n"+r),this.shouldAutoIndent(e,n)){c.getLineContent=t=>t===i?e.getLineContent(n.startLineNumber):e.getLineContent(t);let r=this.matchEnterRule(e,a,o,n.startLineNumber,n.startLineNumber-2);if(null!==r)0!==r&&this.getIndentEditsOfMovingBlock(e,t,n,o,s,r);else{let r=b.zu.getGoodIndentForLine(this._autoIndent,c,e.getLanguageIdAtPosition(n.startLineNumber,1),i,a);if(null!==r){let i=l.V8(e.getLineContent(n.startLineNumber)),a=y.Y(r,o),c=y.Y(i,o);if(a!==c){let i=a-c;this.getIndentEditsOfMovingBlock(e,t,n,o,s,i)}}}}}this._selectionId=t.trackSelection(n)}buildIndentConverter(e,t,i){return{shiftIndent:n=>_.U.shiftIndent(n,n.length+1,e,t,i),unshiftIndent:n=>_.U.unshiftIndent(n,n.length+1,e,t,i)}}parseEnterResult(e,t,i,n,o){if(o){let r=o.indentation;o.indentAction===v.wU.None||o.indentAction===v.wU.Indent?r=o.indentation+o.appendText:o.indentAction===v.wU.IndentOutdent?r=o.indentation:o.indentAction===v.wU.Outdent&&(r=t.unshiftIndent(o.indentation)+o.appendText);let s=e.getLineContent(n);if(this.trimLeft(s).indexOf(this.trimLeft(r))>=0){let o=l.V8(e.getLineContent(n)),s=l.V8(r),a=b.zu.getIndentMetadata(e,n);return null!==a&&2&a&&(s=t.unshiftIndent(s)),y.Y(s,i)-y.Y(o,i)}}return null}matchEnterRuleMovingDown(e,t,i,n,o,r){if(l.ow(r)>=0){let r=e.getLineMaxColumn(o),s=b.zu.getEnterAction(this._autoIndent,e,new u.e(o,r,o,r));return this.parseEnterResult(e,t,i,n,s)}{let o=n-1;for(;o>=1;){let t=e.getLineContent(o);if(l.ow(t)>=0)break;o--}if(o<1||n>e.getLineCount())return null;let r=e.getLineMaxColumn(o),s=b.zu.getEnterAction(this._autoIndent,e,new u.e(o,r,o,r));return this.parseEnterResult(e,t,i,n,s)}}matchEnterRule(e,t,i,n,o,r){let s=o;for(;s>=1;){let t;if(t=s===o&&void 0!==r?r:e.getLineContent(s),l.ow(t)>=0)break;s--}if(s<1||n>e.getLineCount())return null;let a=e.getLineMaxColumn(s),c=b.zu.getEnterAction(this._autoIndent,e,new u.e(s,a,s,a));return this.parseEnterResult(e,t,i,n,c)}trimLeft(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4)return!1;if(!e.isCheapToTokenize(t.startLineNumber))return!1;let i=e.getLanguageIdAtPosition(t.startLineNumber,1);return i===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==b.zu.getIndentRulesSupport(i)}getIndentEditsOfMovingBlock(e,t,i,n,o,r){for(let s=i.startLineNumber;s<=i.endLineNumber;s++){let a=e.getLineContent(s),c=l.V8(a),h=y.Y(c,n)+r,d=y.J(h,n,o);d!==c&&(t.addEditOperation(new u.e(s,1,s,c.length+1),d),s===i.endLineNumber&&i.endColumn<=c.length+1&&""===d&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&i.startLineNumber=o)return null;let r=[];for(let t=n;t<=o;t++)r.push(e.getLineContent(t));let s=r.slice(0);return s.sort(C.getCollator().compare),!0===i&&(s=s.reverse()),{startLineNumber:n,endLineNumber:o,before:r,after:s}}C._COLLATOR=null;var x=i(4144);class k extends s.R6{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;const i=t.getSelections().map(((e,t)=>({selection:e,index:t,ignore:!1})));i.sort(((e,t)=>u.e.compareRangesUsingStarts(e.selection,t.selection)));let n=i[0];for(let e=1;enew g.L(e.positionLineNumber,e.positionColumn))));let o=t.getSelection();if(null===o)return;let r=new h(o,n);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop()}}M.ID="editor.action.trimTrailingWhitespace";class I extends s.R6{constructor(){super({id:"editor.action.deleteLines",label:n.N("lines.delete","Delete Line"),alias:"Delete Line",precondition:p.u.writable,kbOpts:{kbExpr:p.u.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;let i=this._getLinesToRemove(t),n=t.getModel();if(1===n.getLineCount()&&1===n.getLineMaxColumn(1))return;let o=0,r=[],s=[];for(let e=0,t=i.length;e1&&(a-=1,u=n.getLineMaxColumn(a)),r.push(c.h.replace(new f.Y(a,u,l,h),"")),s.push(new f.Y(a-o,t.positionColumn,a-o,t.positionColumn)),o+=t.endLineNumber-t.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,r,s),t.pushUndoStop()}_getLinesToRemove(e){let t=e.getSelections().map((e=>{let t=e.endLineNumber;return e.startLineNumbere.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber));let i=[],n=t[0];for(let e=1;e=t[e].startLineNumber?n.endLineNumber=t[e].endLineNumber:(i.push(n),n=t[e]);return i.push(n),i}}class T extends s.R6{constructor(){super({id:"editor.action.indentLines",label:n.N("lines.indent","Indent Line"),alias:"Indent Line",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:2137,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,d.u.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class R extends s.R6{constructor(){super({id:"editor.action.outdentLines",label:n.N("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:2135,weight:100}})}run(e,t){r.CoreEditingCommands.Outdent.runEditorCommand(e,t,null)}}class O extends s.R6{constructor(){super({id:"editor.action.insertLineBefore",label:n.N("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:3075,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,d.u.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}class F extends s.R6{constructor(){super({id:"editor.action.insertLineAfter",label:n.N("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:2051,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,d.u.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}class P extends s.R6{run(e,t){if(!t.hasModel())return;const i=t.getSelection();let n=this._getRangesToDelete(t),o=[];for(let e=0,t=n.length-1;ec.h.replace(e,"")));t.pushUndoStop(),t.executeEdits(this.id,s,r),t.pushUndoStop()}}class B extends P{constructor(){super({id:"deleteAllLeft",label:n.N("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:p.u.writable,kbOpts:{kbExpr:p.u.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let i=null,n=[],o=0;return t.forEach((t=>{let r;if(1===t.endColumn&&o>0){let e=t.startLineNumber-o;r=new f.Y(e,t.startColumn,e,t.startColumn)}else r=new f.Y(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);o+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?i=r:n.push(r)})),i&&n.unshift(i),n}_getRangesToDelete(e){let t=e.getSelections();if(null===t)return[];let i=t,n=e.getModel();return null===n?[]:(i.sort(u.e.compareRangesUsingStarts),i=i.map((e=>{if(e.isEmpty()){if(1===e.startColumn){let t=Math.max(1,e.startLineNumber-1),i=1===e.startLineNumber?1:n.getLineContent(t).length+1;return new u.e(t,i,e.startLineNumber,1)}return new u.e(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return new u.e(e.startLineNumber,1,e.endLineNumber,e.endColumn)})),i)}}class z extends P{constructor(){super({id:"deleteAllRight",label:n.N("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:p.u.writable,kbOpts:{kbExpr:p.u.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let i=null,n=[];for(let o=0,r=t.length,s=0;o{if(e.isEmpty()){const i=t.getLineMaxColumn(e.startLineNumber);return e.startColumn===i?new u.e(e.startLineNumber,e.startColumn,e.startLineNumber+1,1):new u.e(e.startLineNumber,e.startColumn,e.startLineNumber,i)}return e}));return n.sort(u.e.compareRangesUsingStarts),n}}class W extends s.R6{constructor(){super({id:"editor.action.joinLines",label:n.N("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){let i=t.getSelections();if(null===i)return;let n=t.getSelection();if(null===n)return;i.sort(u.e.compareRangesUsingStarts);let o=[],r=i.reduce(((e,t)=>e.isEmpty()?e.endLineNumber===t.startLineNumber?(n.equalsSelection(e)&&(n=t),t):t.startLineNumber>e.endLineNumber+1?(o.push(e),t):new f.Y(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(o.push(e),t):new f.Y(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn)));o.push(r);let s=t.getModel();if(null===s)return;let a=[],l=[],h=n,d=0;for(let e=0,t=o.length;e=1){let e=!0;""===v&&(e=!1),!e||" "!==v.charAt(v.length-1)&&"\t"!==v.charAt(v.length-1)||(e=!1,v=v.replace(/[\s\uFEFF\xA0]+$/g," "));let n=t.substr(i-1);v+=(e?" ":"")+n,m=e?n.length+1:n.length}else m=0}let b=new u.e(g,p,t,i);if(!b.isEmpty()){let e;r.isEmpty()?(a.push(c.h.replace(b,v)),e=new f.Y(b.startLineNumber-d,v.length-m+1,g-d,v.length-m+1)):r.startLineNumber===r.endLineNumber?(a.push(c.h.replace(b,v)),e=new f.Y(r.startLineNumber-d,r.startColumn,r.endLineNumber-d,r.endColumn)):(a.push(c.h.replace(b,v)),e=new f.Y(r.startLineNumber-d,r.startColumn,r.startLineNumber-d,v.length-_)),null!==u.e.intersectRanges(b,n)?h=e:l.push(e)}d+=b.endLineNumber-b.startLineNumber}l.unshift(h),t.pushUndoStop(),t.executeEdits(this.id,a,l),t.pushUndoStop()}}class V extends s.R6{constructor(){super({id:"editor.action.transpose",label:n.N("editor.transpose","Transpose characters around the cursor"),alias:"Transpose characters around the cursor",precondition:p.u.writable})}run(e,t){let i=t.getSelections();if(null===i)return;let n=t.getModel();if(null===n)return;let o=[];for(let e=0,t=i.length;e=s){if(r.lineNumber===n.getLineCount())continue;let e=new u.e(r.lineNumber,Math.max(1,r.column-1),r.lineNumber+1,1),t=n.getValueInRange(e).split("").reverse().join("");o.push(new a.T4(new f.Y(r.lineNumber,Math.max(1,r.column-1),r.lineNumber+1,1),t))}else{let e=new u.e(r.lineNumber,Math.max(1,r.column-1),r.lineNumber,r.column+1),t=n.getValueInRange(e).split("").reverse().join("");o.push(new a.hP(e,t,new f.Y(r.lineNumber,r.column+1,r.lineNumber,r.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}class H extends s.R6{run(e,t){const i=t.getSelections();if(null===i)return;const n=t.getModel();if(null===n)return;const o=t.getOption(114),r=[];for(const e of i)if(e.isEmpty()){const i=e.getStartPosition(),s=t.getConfiguredWordAtPosition(i);if(!s)continue;const a=new u.e(i.lineNumber,s.startColumn,i.lineNumber,s.endColumn),l=n.getValueInRange(a);r.push(c.h.replace(a,this._modifyText(l,o)))}else{const t=n.getValueInRange(e);r.push(c.h.replace(e,this._modifyText(t,o)))}t.pushUndoStop(),t.executeEdits(this.id,r),t.pushUndoStop()}}class $ extends H{constructor(){super({id:"editor.action.transformToUppercase",label:n.N("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:p.u.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}}class U extends H{constructor(){super({id:"editor.action.transformToLowercase",label:n.N("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:p.u.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}}class j extends H{constructor(){super({id:"editor.action.transformToTitlecase",label:n.N("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:p.u.writable})}_modifyText(e,t){const i=("\r\n\t "+t).split("");let n="",o=!0;for(let t=0;t=0?(o=!0,n+=r):o?(o=!1,n+=r.toLocaleUpperCase()):n+=r.toLocaleLowerCase()}return n}}class q{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch(e){}}return this._actual}isSupported(){return null!==this.get()}}class K extends H{constructor(){super({id:"editor.action.transformToSnakecase",label:n.N("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:p.u.writable})}_modifyText(e,t){const i=K.regExp1.get(),n=K.regExp2.get();return i&&n?e.replace(i,"$1_$2").replace(n,"$1_$2$3").toLocaleLowerCase():e}}K.regExp1=new q("(\\p{Ll})(\\p{Lu})","gmu"),K.regExp2=new q("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu"),(0,s.Qr)(class extends k{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:n.N("lines.copyUp","Copy Line Up"),alias:"Copy Line Up",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:x.eH.MenubarSelectionMenu,group:"2_line",title:n.N({key:"miCopyLinesUp",comment:["&& denotes a mnemonic"]},"&&Copy Line Up"),order:1}})}}),(0,s.Qr)(class extends k{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:n.N("lines.copyDown","Copy Line Down"),alias:"Copy Line Down",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:x.eH.MenubarSelectionMenu,group:"2_line",title:n.N({key:"miCopyLinesDown",comment:["&& denotes a mnemonic"]},"Co&&py Line Down"),order:2}})}}),(0,s.Qr)(D),(0,s.Qr)(class extends L{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:n.N("lines.moveUp","Move Line Up"),alias:"Move Line Up",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:x.eH.MenubarSelectionMenu,group:"2_line",title:n.N({key:"miMoveLinesUp",comment:["&& denotes a mnemonic"]},"Mo&&ve Line Up"),order:3}})}}),(0,s.Qr)(class extends L{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:n.N("lines.moveDown","Move Line Down"),alias:"Move Line Down",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:x.eH.MenubarSelectionMenu,group:"2_line",title:n.N({key:"miMoveLinesDown",comment:["&& denotes a mnemonic"]},"Move &&Line Down"),order:4}})}}),(0,s.Qr)(E),(0,s.Qr)(A),(0,s.Qr)(M),(0,s.Qr)(I),(0,s.Qr)(T),(0,s.Qr)(R),(0,s.Qr)(O),(0,s.Qr)(F),(0,s.Qr)(B),(0,s.Qr)(z),(0,s.Qr)(W),(0,s.Qr)(V),(0,s.Qr)($),(0,s.Qr)(U),(0,s.Qr)(j),K.regExp1.isSupported()&&K.regExp2.isSupported()&&(0,s.Qr)(K)},674:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE:()=>x,LinkedEditingContribution:()=>D,LinkedEditingAction:()=>E,editorLinkedEditingBackground:()=>I});var n=i(3580),o=i(6830),r=i(9488),s=i(5976),a=i(187),l=i(1050),c=i(4314),u=i(4101),h=i(5393),d=i(3411),g=i(8819),f=i(9102),p=i(666),m=i(1640),_=i(7301),v=i(7295),b=i(3910),y=i(7781),w=i(1264),C=i(3831),S=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const x=new g.uy("LinkedEditingInputVisible",!1),k="linked-editing-decoration";let D=class e extends s.JT{constructor(e,t){super(),this._debounceDuration=200,this._localToDispose=this._register(new s.SL),this._editor=e,this._enabled=!1,this._visibleContextKey=x.bindTo(t),this._currentDecorations=[],this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new s.SL),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel((()=>this.reinitialize()))),this._register(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(59)||e.hasChanged(79))&&this.reinitialize()}))),this._register(u.id.onDidChange((()=>this.reinitialize()))),this._register(this._editor.onDidChangeModelLanguage((()=>this.reinitialize()))),this.reinitialize()}static get(t){return t.getContribution(e.ID)}reinitialize(){const e=this._editor.getModel(),t=null!==e&&(this._editor.getOption(59)||this._editor.getOption(79))&&u.id.has(e);if(t===this._enabled)return;if(this._enabled=t,this.clearRanges(),this._localToDispose.clear(),!t||null===e)return;this._languageWordPattern=C.zu.getWordDefinition(e.getLanguageIdentifier().id),this._localToDispose.add(e.onDidChangeLanguageConfiguration((()=>{this._languageWordPattern=C.zu.getWordDefinition(e.getLanguageIdentifier().id)})));const i=new h.vp(this._debounceDuration),n=()=>{this._rangeUpdateTriggerPromise=i.trigger((()=>this.updateRanges()),this._debounceDuration)},o=new h.vp(0),r=e=>{this._rangeSyncTriggerPromise=o.trigger((()=>this._syncRanges(e)))};this._localToDispose.add(this._editor.onDidChangeCursorPosition((()=>{n()}))),this._localToDispose.add(this._editor.onDidChangeModelContent((t=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const i=e.getDecorationRange(this._currentDecorations[0]);if(i&&t.changes.every((e=>i.intersectRanges(e.range))))return void r(this._currentDecorations)}n()}))),this._localToDispose.add({dispose:()=>{i.cancel(),o.cancel()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._currentDecorations||0===e.length)return;const t=this._editor.getModel(),i=t.getDecorationRange(e[0]);if(!i||i.startLineNumber!==i.endLineNumber)return this.clearRanges();const n=t.getValueInRange(i);if(this._currentWordPattern){const e=n.match(this._currentWordPattern);if((e?e[0].length:0)!==n.length)return this.clearRanges()}let o=[];for(let i=1,r=e.length;i1)return void this.clearRanges();const n=this._editor.getModel(),o=n.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===o){if(i.equals(this._currentRequestPosition))return;if(this._currentDecorations&&this._currentDecorations.length>0){const e=n.getDecorationRange(this._currentDecorations[0]);if(e&&e.containsPosition(i))return}}this._currentRequestPosition=i,this._currentRequestModelVersion=o;const r=(0,h.PG)((t=>S(this,void 0,void 0,(function*(){try{const s=yield M(n,i,t);if(r!==this._currentRequest)return;if(this._currentRequest=null,o!==n.getVersionId())return;let a=[];(null==s?void 0:s.ranges)&&(a=s.ranges),this._currentWordPattern=(null==s?void 0:s.wordPattern)||this._languageWordPattern;let l=!1;for(let e=0,t=a.length;e({range:t,options:e.DECORATION})));this._visibleContextKey.set(!0),this._currentDecorations=this._editor.deltaDecorations(this._currentDecorations,u)}catch(e){(0,_.VV)(e)||(0,_.dL)(e),this._currentRequest!==r&&this._currentRequest||this.clearRanges()}}))));return this._currentRequest=r,r}))}};var L,N;D.ID="editor.contrib.linkedEditing",D.DECORATION=d.qx.register({description:"linked-editing",stickiness:0,className:k}),D=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(L=1,N=g.i6,function(e,t){N(e,t,L)})],D);class E extends o.R6{constructor(){super({id:"editor.action.linkedEditing",label:n.N("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:g.Ao.and(f.u.writable,f.u.hasRenameProvider),kbOpts:{kbExpr:f.u.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){const i=e.get(m.$),[n,o]=Array.isArray(t)&&t||[void 0,void 0];return p.o.isUri(n)&&a.L.isIPosition(o)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(o),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),_.dL):super.runCommand(e,t)}run(e,t){const i=D.get(t);return i?Promise.resolve(i.updateRanges(!0)):Promise.resolve()}}const A=o._l.bindToContribution(D.get);function M(e,t,i){const n=u.id.ordered(e);return(0,h.Ps)(n.map((n=>()=>S(this,void 0,void 0,(function*(){try{return yield n.provideLinkedEditingRanges(e,t,i)}catch(e){return void(0,_.Cp)(e)}})))),(e=>!!e&&r.Of(null==e?void 0:e.ranges)))}(0,o.fK)(new A({id:"cancelLinkedEditingInput",precondition:x,handler:e=>e.clearRanges(),kbOpts:{kbExpr:f.u.editorTextFocus,weight:199,primary:9,secondary:[1033]}}));const I=(0,b.P6)("editor.linkedEditingBackground",{dark:w.Il.fromHex("#f00").transparent(.3),light:w.Il.fromHex("#f00").transparent(.3),hc:w.Il.fromHex("#f00").transparent(.3)},n.N("editorLinkedEditingBackground","Background color when the editor auto renames on type."));(0,y.Ic)(((e,t)=>{const i=e.getColor(I);i&&t.addRule(`.monaco-editor .${k} { background: ${i}; border-left-color: ${i}; }`)})),(0,o.sb)("_executeLinkedEditingProvider",((e,t)=>M(e,t,l.T.None))),(0,o._K)(D.ID,D),(0,o.Qr)(E)},4800:(e,t,i)=>{"use strict";i.r(t),i.d(t,{LinkDetector:()=>T});var n=i(3580),o=i(5393),r=i(1050),s=i(7301),a=i(9365),l=i(5976),c=i(1432),u=i(6830),h=i(3411),d=i(4101),g=i(9241),f=i(666),p=i(4314),m=i(1200),_=i(4565),v=i(9488),b=i(8401),y=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class w{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}resolve(e){return y(this,void 0,void 0,(function*(){return this._link.url?this._link.url:"function"==typeof this._provider.resolveLink?Promise.resolve(this._provider.resolveLink(this._link,e)).then((t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing"))))):Promise.reject(new Error("missing"))}))}}class C{constructor(e){this._disposables=new l.SL;let t=[];for(const[i,n]of e){const e=i.links.map((e=>new w(e,n)));t=C._union(t,e),(0,l.Wf)(i)&&this._disposables.add(i)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){let i,n,o,r,s=[];for(i=0,o=0,n=e.length,r=t.length;iPromise.resolve(n.provideLinks(e,t)).then((e=>{e&&(i[o]=[e,n])}),s.Cp)));return Promise.all(n).then((()=>{const e=new C((0,v.kX)(i));return t.isCancellationRequested?(e.dispose(),new C([])):e}))}_.P.registerCommand("_executeLinkProvider",((e,...t)=>y(void 0,void 0,void 0,(function*(){let[i,n]=t;(0,b.p_)(i instanceof f.o),"number"!=typeof n&&(n=0);const o=e.get(m.q).getModel(i);if(!o)return[];const s=yield S(o,r.T.None);if(!s)return[];for(let e=0;e{this._onEditorMouseMove(e,t)}))),this.listenersToRemove.add(n.onExecute((e=>{this.onEditorMouseUp(e)}))),this.listenersToRemove.add(n.onCancel((e=>{this.cleanUpActiveLinkDecoration()}))),this.enabled=e.getOption(60),this.listenersToRemove.add(e.onDidChangeConfiguration((t=>{const i=e.getOption(60);this.enabled!==i&&(this.enabled=i,this.updateDecorations([]),this.stop(),this.beginCompute())}))),this.listenersToRemove.add(e.onDidChangeModelContent((e=>this.onChange()))),this.listenersToRemove.add(e.onDidChangeModel((e=>this.onModelChanged()))),this.listenersToRemove.add(e.onDidChangeModelLanguage((e=>this.onModelModeChanged()))),this.listenersToRemove.add(d.pM.onDidChange((e=>this.onModelModeChanged()))),this.timeout=new o._F,this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null,this.beginCompute()}static get(t){return t.getContribution(e.ID)}onModelChanged(){this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.beginCompute()}onModelModeChanged(){this.stop(),this.beginCompute()}onChange(){this.timeout.setIfNotSet((()=>this.beginCompute()),e.RECOMPUTE_TIME)}beginCompute(){return e=this,t=void 0,n=function*(){if(!this.editor.hasModel()||!this.enabled)return;const e=this.editor.getModel();if(d.pM.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=o.PG((t=>S(e,t)));try{this.activeLinksList=yield this.computePromise,this.updateDecorations(this.activeLinksList.links)}catch(e){(0,s.dL)(e)}finally{this.computePromise=null}}},new((i=void 0)||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}));var e,t,i,n}updateDecorations(e){const t="altKey"===this.editor.getOption(67);let i=[],n=Object.keys(this.currentOccurrences);for(let e=0,t=n.length;e{t.activate(e,i),this.activeLinkDecorationId=t.decorationId}))}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e="altKey"===this.editor.getOption(67);if(this.activeLinkDecorationId){const t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations((i=>{t.deactivate(i,e)})),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;const t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,i=!1){if(!this.openerService)return;const{link:o}=e;o.resolve(r.T.None).then((e=>{if("string"==typeof e&&this.editor.hasModel()){const t=this.editor.getModel().uri;if(t.scheme===N.lg.file&&e.startsWith(`${N.lg.file}:`)){const i=f.o.parse(e);if(i.scheme===N.lg.file){const n=E.z_(i);let o=null;n.startsWith("/./")?o=`.${n.substr(1)}`:n.startsWith("//./")&&(o=`.${n.substr(2)}`),o&&(e=E.Vo(t,o))}}}return this.openerService.open(e,{openToSide:t,fromUserGesture:i,allowContributedOpeners:!0,allowCommands:!0})}),(e=>{const t=e instanceof Error?e.message:e;"invalid"===t?this.notificationService.warn(n.N("invalid.url","Failed to open this link because it is not well-formed: {0}",o.url.toString())):"missing"===t?this.notificationService.warn(n.N("missing.url","Failed to open this link because its target is missing.")):(0,s.dL)(e)}))}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;const t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(const e of t){const t=this.currentOccurrences[e.id];if(t)return t}return null}isEnabled(e,t){return Boolean(6===e.target.type&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){var e;this.timeout.cancel(),this.activeLinksList&&(null===(e=this.activeLinksList)||void 0===e||e.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){this.listenersToRemove.dispose(),this.stop(),this.timeout.dispose()}};T.ID="editor.linkDetector",T.RECOMPUTE_TIME=1e3,T=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([A(1,k.v4),A(2,x.lT)],T);class R extends u.R6{constructor(){super({id:"editor.action.openLink",label:n.N("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){let i=T.get(t);if(!i)return;if(!t.hasModel())return;let n=t.getSelections();for(let e of n){let t=i.getLinkOccurrence(e.getEndPosition());t&&i.openLinkOccurrence(t,!1)}}}(0,u._K)(T.ID,T),(0,u.Qr)(R),(0,L.Ic)(((e,t)=>{const i=e.getColor(D._Y);i&&t.addRule(`.monaco-editor .detected-link-active { color: ${i} !important; }`)}))},2276:(e,t,i)=>{"use strict";i.d(t,{O:()=>g});var n=i(3580),o=i(5393),r=i(5976),s=i(5152),a=i(4314),l=i(6830),c=i(8819),u=i(7781),h=i(3910),d=i(2321);let g=class e{constructor(t,i){this._messageWidget=new r.XK,this._messageListeners=new r.SL,this._editor=t,this._visible=e.MESSAGE_VISIBLE.bindTo(i),this._editorListener=this._editor.onDidAttemptReadOnlyEdit((()=>this._onDidAttemptReadOnlyEdit()))}static get(t){return t.getContribution(e.ID)}dispose(){this._editorListener.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){let i;(0,s.Z9)(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new _(this._editor,t,e),this._messageListeners.add(this._editor.onDidBlurEditorText((()=>this.closeMessage()))),this._messageListeners.add(this._editor.onDidChangeCursorPosition((()=>this.closeMessage()))),this._messageListeners.add(this._editor.onDidDispose((()=>this.closeMessage()))),this._messageListeners.add(this._editor.onDidChangeModel((()=>this.closeMessage()))),this._messageListeners.add(new o._F((()=>this.closeMessage()),3e3)),this._messageListeners.add(this._editor.onMouseMove((e=>{e.target.position&&(i?i.containsPosition(e.target.position)||this.closeMessage():i=new a.e(t.lineNumber-3,1,e.target.position.lineNumber+3,1))})))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(_.fadeOut(this._messageWidget.value))}_onDidAttemptReadOnlyEdit(){this._editor.hasModel()&&this.showMessage(n.N("editor.readonly","Cannot edit in read-only editor"),this._editor.getPosition())}};var f,p;g.ID="editor.contrib.messageController",g.MESSAGE_VISIBLE=new c.uy("messageVisible",!1,n.N("messageVisible","Whether the editor is currently showing an inline message")),g=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(f=1,p=c.i6,function(e,t){p(e,t,f)})],g);const m=l._l.bindToContribution(g.get);(0,l.fK)(new m({id:"leaveEditorMessage",precondition:g.MESSAGE_VISIBLE,handler:e=>e.closeMessage(),kbOpts:{weight:130,primary:9}}));class _{constructor(e,{lineNumber:t,column:i},n){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:i-1},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage");const o=document.createElement("div");o.classList.add("anchor","top"),this._domNode.appendChild(o);const r=document.createElement("div");r.classList.add("message"),r.textContent=n,this._domNode.appendChild(r);const s=document.createElement("div");s.classList.add("anchor","below"),this._domNode.appendChild(s),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}static fadeOut(e){let t;const i=()=>{e.dispose(),clearTimeout(t),e.getDomNode().removeEventListener("animationend",i)};return t=setTimeout(i,110),e.getDomNode().addEventListener("animationend",i),e.getDomNode().classList.add("fadeOut"),{dispose:i}}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2]}}afterRender(e){this._domNode.classList.toggle("below",2===e)}}(0,l._K)(g.ID,g),(0,u.Ic)(((e,t)=>{const i=e.getColor(h.EP);if(i){let n=e.type===d.e.HIGH_CONTRAST?2:1;t.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor.below { border-top-color: ${i}; }`),t.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor.top { border-bottom-color: ${i}; }`),t.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { border: ${n}px solid ${i}; }`)}const n=e.getColor(h._l);n&&t.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { background-color: ${n}; }`);const o=e.getColor(h.YI);o&&t.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { color: ${o}; }`)}))},8486:(e,t,i)=>{"use strict";i.r(t),i.d(t,{InsertCursorAbove:()=>C,InsertCursorBelow:()=>S,MultiCursorSessionResult:()=>L,MultiCursorSession:()=>N,MultiCursorSelectionController:()=>E,MultiCursorSelectionControllerAction:()=>A,AddSelectionToNextFindMatchAction:()=>M,AddSelectionToPreviousFindMatchAction:()=>I,MoveSelectionToNextFindMatchAction:()=>T,MoveSelectionToPreviousFindMatchAction:()=>R,SelectHighlightsAction:()=>O,CompatChangeAll:()=>F,SelectionHighlighter:()=>B});var n=i(3580),o=i(5393),r=i(2258),s=i(5976),a=i(5152),l=i(6830),c=i(3814),u=i(4314),h=i(3860),d=i(9102),g=i(4973),f=i(3411),p=i(4101),m=i(3391),_=i(4144),v=i(3910),b=i(7781),y=i(8819);function w(e,t){const i=t.filter((t=>!e.find((e=>e.equals(t)))));if(i.length>=1){const e=i.map((e=>`line ${e.viewState.position.lineNumber} column ${e.viewState.position.column}`)).join(", "),t=1===i.length?n.N("cursorAdded","Cursor added: {0}",e):n.N("cursorsAdded","Cursors added: {0}",e);(0,a.i7)(t)}}class C extends l.R6{constructor(){super({id:"editor.action.insertCursorAbove",label:n.N("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:d.u.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:_.eH.MenubarSelectionMenu,group:"3_multi",title:n.N({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(e,t,i){if(!t.hasModel())return;const n=i&&!0===i.logicalLine,o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.pushStackElement();const r=o.getCursorStates();o.setCursorStates(i.source,3,c.P.addCursorUp(o,r,n)),o.revealTopMostCursor(i.source),w(r,o.getCursorStates())}}class S extends l.R6{constructor(){super({id:"editor.action.insertCursorBelow",label:n.N("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:d.u.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:_.eH.MenubarSelectionMenu,group:"3_multi",title:n.N({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(e,t,i){if(!t.hasModel())return;const n=i&&!0===i.logicalLine,o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.pushStackElement();const r=o.getCursorStates();o.setCursorStates(i.source,3,c.P.addCursorDown(o,r,n)),o.revealBottomMostCursor(i.source),w(r,o.getCursorStates())}}class x extends l.R6{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:n.N("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:d.u.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:_.eH.MenubarSelectionMenu,group:"3_multi",title:n.N({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,i){if(!e.isEmpty()){for(let n=e.startLineNumber;n1&&i.push(new h.Y(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=t.getSelections(),o=t._getViewModel(),r=o.getCursorStates();let s=[];n.forEach((e=>this.getCursorsForSelection(e,i,s))),s.length>0&&t.setSelections(s),w(r,o.getCursorStates())}}class k extends l.R6{constructor(){super({id:"editor.action.addCursorsToBottom",label:n.N("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=t.getModel().getLineCount();let o=[];for(let e=i[0].startLineNumber;e<=n;e++)o.push(new h.Y(e,i[0].startColumn,e,i[0].endColumn));const r=t._getViewModel(),s=r.getCursorStates();o.length>0&&t.setSelections(o),w(s,r.getCursorStates())}}class D extends l.R6{constructor(){super({id:"editor.action.addCursorsToTop",label:n.N("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections();let n=[];for(let e=i[0].startLineNumber;e>=1;e--)n.push(new h.Y(e,i[0].startColumn,e,i[0].endColumn));const o=t._getViewModel(),r=o.getCursorStates();n.length>0&&t.setSelections(n),w(r,o.getCursorStates())}}class L{constructor(e,t,i){this.selections=e,this.revealRange=t,this.revealScrollType=i}}class N{constructor(e,t,i,n,o,r,s){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=i,this.searchText=n,this.wholeWord=o,this.matchCase=r,this.currentMatch=s}static create(e,t){if(!e.hasModel())return null;const i=t.getState();if(!e.hasTextFocus()&&i.isRevealed&&i.searchString.length>0)return new N(e,t,!1,i.searchString,i.wholeWord,i.matchCase,null);let n,o,r=!1;const s=e.getSelections();1===s.length&&s[0].isEmpty()?(r=!0,n=!0,o=!0):(n=i.wholeWord,o=i.matchCase);const a=e.getSelection();let l,c=null;if(a.isEmpty()){const t=e.getConfiguredWordAtPosition(a.getStartPosition());if(!t)return null;l=t.word,c=new h.Y(a.startLineNumber,t.startColumn,a.startLineNumber,t.endColumn)}else l=e.getModel().getValueInRange(a).replace(/\r\n/g,"\n");return new N(e,t,r,l,n,o,c)}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new L(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new L(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(114):null,!1);return i?new h.Y(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new L(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new L(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(114):null,!1);return i?new h.Y(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}selectAll(){return this._editor.hasModel()?(this.findController.highlightFindOptions(),this._editor.getModel().findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(114):null,!1,1073741824)):[]}}class E extends s.JT{constructor(e){super(),this._sessionDispose=this._register(new s.SL),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}static get(e){return e.getContribution(E.ID)}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=N.create(this._editor,e);if(!t)return;this._session=t;const i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection((e=>{this._ignoreSelectionChange||this._endSession()}))),this._sessionDispose.add(this._editor.onDidBlurEditorText((()=>{this._endSession()}))),this._sessionDispose.add(e.getState().onFindReplaceStateChange((e=>{(e.matchCase||e.wholeWord)&&this._endSession()})))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;const i=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return i?new h.Y(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){const t=this._editor.getSelections();if(t.length>1){const i=e.getState().matchCase;if(!z(this._editor.getModel(),t,i)){const e=this._editor.getModel();let i=[];for(let n=0,o=t.length;n0&&i.isRegex)t=this._editor.getModel().findMatches(i.searchString,!0,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(114):null,!1,1073741824);else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll()}if(i.searchScope){const e=i.searchScope;let n=[];t.forEach((t=>{e.forEach((e=>{t.range.endLineNumber<=e.endLineNumber&&t.range.startLineNumber>=e.startLineNumber&&n.push(t)}))})),t=n}if(t.length>0){const e=this._editor.getSelection();for(let i=0,n=t.length;inew h.Y(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn))))}}}E.ID="editor.contrib.multiCursorController";class A extends l.R6{run(e,t){const i=E.get(t);if(!i)return;const n=m.CommonFindController.get(t);if(!n)return;const o=t._getViewModel();if(o){const e=o.getCursorStates();this._run(i,n),w(e,o.getCursorStates())}}}class M extends A{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:n.N("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:d.u.focus,primary:2082,weight:100},menuOpts:{menuId:_.eH.MenubarSelectionMenu,group:"3_multi",title:n.N({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}class I extends A{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:n.N("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:_.eH.MenubarSelectionMenu,group:"3_multi",title:n.N({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}class T extends A{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:n.N("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:d.u.focus,primary:(0,r.gx)(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}class R extends A{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:n.N("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}class O extends A{constructor(){super({id:"editor.action.selectHighlights",label:n.N("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:d.u.focus,primary:3114,weight:100},menuOpts:{menuId:_.eH.MenubarSelectionMenu,group:"3_multi",title:n.N({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}}class F extends A{constructor(){super({id:"editor.action.changeAll",label:n.N("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:y.Ao.and(d.u.writable,d.u.editorTextFocus),kbOpts:{kbExpr:d.u.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}class P{constructor(e,t,i,n){this.searchText=e,this.matchCase=t,this.wordSeparators=i,this.modelVersionId=n}static softEquals(e,t){return!e&&!t||!(!e||!t)&&e.searchText===t.searchText&&e.matchCase===t.matchCase&&e.wordSeparators===t.wordSeparators&&e.modelVersionId===t.modelVersionId}}class B extends s.JT{constructor(e){super(),this.editor=e,this._isEnabled=e.getOption(95),this.decorations=[],this.updateSoon=this._register(new o.pY((()=>this._update()),300)),this.state=null,this._register(e.onDidChangeConfiguration((t=>{this._isEnabled=e.getOption(95)}))),this._register(e.onDidChangeCursorSelection((e=>{this._isEnabled&&(e.selection.isEmpty()?3===e.reason?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())}))),this._register(e.onDidChangeModel((e=>{this._setState(null)}))),this._register(e.onDidChangeModelContent((e=>{this._isEnabled&&this.updateSoon.schedule()}))),this._register(m.CommonFindController.get(e).getState().onFindReplaceStateChange((e=>{this._update()})))}_update(){this._setState(B._createState(this._isEnabled,this.editor))}static _createState(e,t){if(!e)return null;if(!t.hasModel())return null;const i=t.getSelection();if(i.startLineNumber!==i.endLineNumber)return null;const n=E.get(t);if(!n)return null;const o=m.CommonFindController.get(t);if(!o)return null;let r=n.getSession(o);if(!r){const e=t.getSelections();if(e.length>1){const i=o.getState().matchCase;if(!z(t.getModel(),e,i))return null}r=N.create(t,o)}if(!r)return null;if(r.currentMatch)return null;if(/^[ \t]+$/.test(r.searchText))return null;if(r.searchText.length>200)return null;const s=o.getState(),a=s.matchCase;if(s.isRevealed){let e=s.searchString;a||(e=e.toLowerCase());let t=r.searchText;if(a||(t=t.toLowerCase()),e===t&&r.matchCase===s.matchCase&&r.wholeWord===s.wholeWord&&!s.isRegex)return null}return new P(r.searchText,r.matchCase,r.wholeWord?t.getOption(114):null,t.getModel().getVersionId())}_setState(e){if(P.softEquals(this.state,e))return void(this.state=e);if(this.state=e,!this.state)return void(this.decorations=this.editor.deltaDecorations(this.decorations,[]));if(!this.editor.hasModel())return;const t=this.editor.getModel();if(t.isTooLargeForTokenization())return;const i=p.vH.has(t)&&this.editor.getOption(69);let n=t.findMatches(this.state.searchText,!0,!1,this.state.matchCase,this.state.wordSeparators,!1).map((e=>e.range));n.sort(u.e.compareRangesUsingStarts);let o=this.editor.getSelections();o.sort(u.e.compareRangesUsingStarts);let r=[];for(let e=0,t=0,i=n.length,s=o.length;e=s)r.push(i),e++;else{const n=u.e.compareRangesUsingStarts(i,o[t]);n<0?(!o[t].isEmpty()&&u.e.areIntersecting(i,o[t])||r.push(i),e++):(n>0||e++,t++)}}const s=r.map((e=>({range:e,options:i?B._SELECTION_HIGHLIGHT:B._SELECTION_HIGHLIGHT_OVERVIEW})));this.decorations=this.editor.deltaDecorations(this.decorations,s)}dispose(){this._setState(null),super.dispose()}}function z(e,t,i){const n=W(e,t[0],!i);for(let o=1,r=t.length;o{"use strict";i.r(t),i.d(t,{TriggerParameterHintsAction:()=>K});var n=i(3580),o=i(5976),r=i(2065),s=i(9102),a=i(8819),l=i(6830),c=i(5321),u=i(4850),h=i(5152),d=i(9802),g=i(4669),f=i(1531),p=i(3947),m=i(7301),_=i(187),v=i(4101),b=i(1050),y=i(4565),w=i(666),C=i(8401),S=i(8216),x=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const k={Visible:new a.uy("parameterHintsVisible",!1),MultipleSignatures:new a.uy("parameterHintsMultipleSignatures",!1)};function D(e,t,i,n){return x(this,void 0,void 0,(function*(){const o=v.nD.ordered(e);for(const r of o)try{const o=yield r.provideSignatureHelp(e,t,n,i);if(o)return o}catch(e){(0,m.Cp)(e)}}))}y.P.registerCommand("_executeSignatureHelpProvider",((e,...t)=>x(void 0,void 0,void 0,(function*(){const[i,n,o]=t;(0,C.p_)(w.o.isUri(i)),(0,C.p_)(_.L.isIPosition(n)),(0,C.p_)("string"==typeof o||!o);const r=yield e.get(S.S).createModelReference(i);try{const e=yield D(r.object.textEditorModel,_.L.lift(n),{triggerKind:v.WW.Invoke,isRetrigger:!1,triggerCharacter:o},b.T.None);if(!e)return;return setTimeout((()=>e.dispose()),0),e.value}finally{r.dispose()}}))));var L,N=i(988),E=i(3910),A=i(7781),M=i(5393),I=i(4906);!function(e){e.Default={type:0},e.Pending=class{constructor(e,t){this.request=e,this.previouslyActiveHints=t,this.type=2}},e.Active=class{constructor(e){this.hints=e,this.type=1}}}(L||(L={}));class T extends o.JT{constructor(e,t=T.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new g.Q5),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=L.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new o.XK),this.triggerChars=new I.q,this.retriggerChars=new I.q,this.triggerId=0,this.editor=e,this.throttledDelayer=new M.vp(t),this._register(this.editor.onDidBlurEditorWidget((()=>this.cancel()))),this._register(this.editor.onDidChangeConfiguration((()=>this.onEditorConfigurationChange()))),this._register(this.editor.onDidChangeModel((e=>this.onModelChanged()))),this._register(this.editor.onDidChangeModelLanguage((e=>this.onModelChanged()))),this._register(this.editor.onDidChangeCursorSelection((e=>this.onCursorChange(e)))),this._register(this.editor.onDidChangeModelContent((e=>this.onModelContentChange()))),this._register(v.nD.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType((e=>this.onDidType(e)))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){2===this._state.type&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=L.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){const i=this.editor.getModel();if(!i||!v.nD.has(i))return;const n=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger((()=>this.doTrigger(n)),t).catch(m.dL)}next(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t%e==e-1,n=this.editor.getOption(73).cycle;!(e<2||i)||n?this.updateActiveSignature(i&&n?0:t+1):this.cancel()}previous(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=0===t,n=this.editor.getOption(73).cycle;!(e<2||i)||n?this.updateActiveSignature(i&&n?e-1:t-1):this.cancel()}updateActiveSignature(e){1===this.state.type&&(this.state=new L.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:e})),this._onChangedHints.fire(this.state.hints))}doTrigger(e){return t=this,i=void 0,o=function*(){const t=1===this.state.type||2===this.state.type,i=this.getLastActiveHints();if(this.cancel(!0),0===this._pendingTriggers.length)return!1;const n=this._pendingTriggers.reduce(R);this._pendingTriggers=[];const o={triggerKind:n.triggerKind,triggerCharacter:n.triggerCharacter,isRetrigger:t,activeSignatureHelp:i};if(!this.editor.hasModel())return!1;const r=this.editor.getModel(),s=this.editor.getPosition();this.state=new L.Pending((0,M.PG)((e=>D(r,s,o,e))),i);try{const t=yield this.state.request;return e!==this.triggerId?(null==t||t.dispose(),!1):t&&t.value.signatures&&0!==t.value.signatures.length?(this.state=new L.Active(t.value),this._lastSignatureHelpResult.value=t,this._onChangedHints.fire(this.state.hints),!0):(null==t||t.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1)}catch(t){return e===this.triggerId&&(this.state=L.Default),(0,m.dL)(t),!1}},new((n=void 0)||(n=Promise))((function(e,r){function s(e){try{l(o.next(e))}catch(e){r(e)}}function a(e){try{l(o.throw(e))}catch(e){r(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n((function(e){e(i)}))).then(s,a)}l((o=o.apply(t,i||[])).next())}));var t,i,n,o}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return 1===this.state.type||2===this.state.type||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars=new I.q,this.retriggerChars=new I.q;const e=this.editor.getModel();if(e)for(const t of v.nD.ordered(e)){for(const e of t.signatureHelpTriggerCharacters||[])this.triggerChars.add(e.charCodeAt(0)),this.retriggerChars.add(e.charCodeAt(0));for(const e of t.signatureHelpRetriggerCharacters||[])this.retriggerChars.add(e.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;const t=e.length-1,i=e.charCodeAt(t);(this.triggerChars.has(i)||this.isTriggered&&this.retriggerChars.has(i))&&this.trigger({triggerKind:v.WW.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){"mouse"===e.source?this.cancel():this.isTriggered&&this.trigger({triggerKind:v.WW.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:v.WW.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(73).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}function R(e,t){switch(t.triggerKind){case v.WW.Invoke:return t;case v.WW.ContentChange:return e;case v.WW.TriggerCharacter:default:return t}}T.DEFAULT_DELAY=120;var O=i(7295),F=i(3046),P=i(2321),B=i(9554),z=function(e,t){return function(i,n){t(i,n,e)}};const W=c.$,V=(0,B.q5)("parameter-hints-next",F.lA.chevronDown,n.N("parameterHintsNextIcon","Icon for show next parameter hint.")),H=(0,B.q5)("parameter-hints-previous",F.lA.chevronUp,n.N("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let $=class e extends o.JT{constructor(e,t,i,n){super(),this.editor=e,this.renderDisposeables=this._register(new o.SL),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new p.$({editor:e},n,i)),this.model=this._register(new T(e)),this.keyVisible=k.Visible.bindTo(t),this.keyMultipleSignatures=k.MultipleSignatures.bindTo(t),this._register(this.model.onChangedHints((e=>{e?(this.show(),this.render(e)):this.hide()})))}createParamaterHintDOMNodes(){const e=W(".editor-widget.parameter-hints-widget"),t=c.R3(e,W(".phwrapper"));t.tabIndex=-1;const i=c.R3(t,W(".controls")),n=c.R3(i,W(".button"+A.kS.asCSSSelector(H))),o=c.R3(i,W(".overloads")),r=c.R3(i,W(".button"+A.kS.asCSSSelector(V))),s=(0,u.sT)((0,u.jt)(n,"click"));this._register(s(this.previous,this));const a=(0,u.sT)((0,u.jt)(r,"click"));this._register(a(this.next,this));const l=W(".body"),h=new d.s$(l,{});this._register(h),t.appendChild(h.getDomNode());const f=c.R3(l,W(".signature")),p=c.R3(l,W(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:f,overloads:o,docs:p,scrollbar:h},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection((e=>{this.visible&&this.editor.layoutContentWidget(this)})));const m=()=>{if(!this.domNodes)return;const e=this.editor.getOption(40);this.domNodes.element.style.fontSize=`${e.fontSize}px`};m(),this._register(g.ju.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter((e=>e.hasChanged(40))).on(m,null)),this._register(this.editor.onDidLayoutChange((e=>this.updateMaxHeight()))),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParamaterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout((()=>{this.domNodes&&this.domNodes.element.classList.add("visible")}),100),this.editor.layoutContentWidget(this))}hide(){this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,this.domNodes&&this.domNodes.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){var t;if(this.renderDisposeables.clear(),!this.domNodes)return;const i=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",i),this.keyMultipleSignatures.set(i),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const o=e.signatures[e.activeSignature];if(!o)return;const r=c.R3(this.domNodes.signature,W(".code")),s=this.editor.getOption(40);r.style.fontSize=`${s.fontSize}px`,r.style.fontFamily=s.fontFamily;const a=o.parameters.length>0,l=null!==(t=o.activeParameter)&&void 0!==t?t:e.activeParameter;a?this.renderParameters(r,o,l):c.R3(r,W("span")).textContent=o.label;const u=o.parameters[l];if(null==u?void 0:u.documentation){const e=W("span.documentation");if("string"==typeof u.documentation)e.textContent=u.documentation;else{const t=this.renderMarkdownDocs(u.documentation);e.appendChild(t.element)}c.R3(this.domNodes.docs,W("p",{},e))}if(void 0===o.documentation);else if("string"==typeof o.documentation)c.R3(this.domNodes.docs,W("p",{},o.documentation));else{const e=this.renderMarkdownDocs(o.documentation);c.R3(this.domNodes.docs,e.element)}const d=this.hasDocs(o,u);if(this.domNodes.signature.classList.toggle("has-docs",d),this.domNodes.docs.classList.toggle("empty",!d),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,u){const e=this.getParameterLabel(o,l);this.announcedLabel!==e&&(h.Z9(n.N("hint","{0}, hint",e)),this.announcedLabel=e)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const t=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{var e;null===(e=this.domNodes)||void 0===e||e.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!(t&&"string"==typeof t.documentation&&(0,C.cW)(t.documentation).length>0||t&&"object"==typeof t.documentation&&(0,C.cW)(t.documentation).value.length>0||e.documentation&&"string"==typeof e.documentation&&(0,C.cW)(e.documentation).length>0||e.documentation&&"object"==typeof e.documentation&&(0,C.cW)(e.documentation.value).length>0)}renderParameters(e,t,i){const[n,o]=this.getParameterLabelOffsets(t,i),r=document.createElement("span");r.textContent=t.label.substring(0,n);const s=document.createElement("span");s.textContent=t.label.substring(n,o),s.className="parameter active";const a=document.createElement("span");a.textContent=t.label.substring(o),c.R3(e,r,s,a)}getParameterLabel(e,t){const i=e.parameters[t];return Array.isArray(i.label)?e.label.substring(i.label[0],i.label[1]):i.label}getParameterLabelOffsets(e,t){const i=e.parameters[t];if(i){if(Array.isArray(i.label))return i.label;if(i.label.length){const t=new RegExp(`(\\W|^)${(0,O.ec)(i.label)}(?=\\W|$)`,"g");t.test(e.label);const n=t.lastIndex-i.label.length;return n>=0?[n,t.lastIndex]:[0,0]}return[0,0]}return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}cancel(){this.model.cancel()}getDomNode(){return this.domNodes||this.createParamaterHintDOMNodes(),this.domNodes.element}getId(){return e.ID}trigger(e){this.model.trigger(e,0)}updateMaxHeight(){if(!this.domNodes)return;const e=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=e;const t=this.domNodes.element.getElementsByClassName("phwrapper");t.length&&(t[0].style.maxHeight=e)}};$.ID="editor.widget.parameterHintsWidget",$=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([z(1,a.i6),z(2,N.v4),z(3,f.h)],$),(0,A.Ic)(((e,t)=>{const i=e.getColor(E.CN);if(i){const n=e.type===P.e.HIGH_CONTRAST?2:1;t.addRule(`.monaco-editor .parameter-hints-widget { border: ${n}px solid ${i}; }`),t.addRule(`.monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid ${i.transparent(.5)}; }`)}const n=e.getColor(E.yJ);n&&t.addRule(`.monaco-editor .parameter-hints-widget { background-color: ${n}; }`);const o=e.getColor(E.ur);o&&t.addRule(`.monaco-editor .parameter-hints-widget a { color: ${o}; }`);const r=e.getColor(E.Sb);r&&t.addRule(`.monaco-editor .parameter-hints-widget { color: ${r}; }`);const s=e.getColor(E.Sw);s&&t.addRule(`.monaco-editor .parameter-hints-widget code { background-color: ${s}; }`)}));let U=class e extends o.JT{constructor(e,t){super(),this.editor=e,this.widget=this._register(t.createInstance($,this.editor))}static get(t){return t.getContribution(e.ID)}cancel(){this.widget.cancel()}previous(){this.widget.previous()}next(){this.widget.next()}trigger(e){this.widget.trigger(e)}};var j,q;U.ID="editor.controller.parameterHints",U=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(j=1,q=r.TG,function(e,t){q(e,t,j)})],U);class K extends l.R6{constructor(){super({id:"editor.action.triggerParameterHints",label:n.N("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:s.u.hasSignatureHelpProvider,kbOpts:{kbExpr:s.u.editorTextFocus,primary:3082,weight:100}})}run(e,t){const i=U.get(t);i&&i.trigger({triggerKind:v.WW.Invoke})}}(0,l._K)(U.ID,U),(0,l.Qr)(K);const G=l._l.bindToContribution(U.get);(0,l.fK)(new G({id:"closeParameterHints",precondition:k.Visible,handler:e=>e.cancel(),kbOpts:{weight:175,kbExpr:s.u.focus,primary:9,secondary:[1033]}})),(0,l.fK)(new G({id:"showPrevParameterHint",precondition:a.Ao.and(k.Visible,k.MultipleSignatures),handler:e=>e.previous(),kbOpts:{weight:175,kbExpr:s.u.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),(0,l.fK)(new G({id:"showNextParameterHint",precondition:a.Ao.and(k.Visible,k.MultipleSignatures),handler:e=>e.next(),kbOpts:{weight:175,kbExpr:s.u.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))},2043:(e,t,i)=>{"use strict";i.d(t,{Fw:()=>M,Jy:()=>I,vk:()=>F,rc:()=>R,SC:()=>W,RX:()=>q,sH:()=>K,WL:()=>Y,xH:()=>Z,M8:()=>V,a7:()=>$,xk:()=>H,F8:()=>G,Zj:()=>U,IY:()=>j,KY:()=>P,IH:()=>B,R7:()=>z});var n=i(5321),o=i(317),r=i(4741),s=i(1264),a=i(4669),l=i(6248),c=i(1640),u=i(4527),h=i(3098),d=i(4742),g=i(5976),f=i(4314),p=i(3411);const m=new s.Il(new s.VS(0,122,204)),_={showArrow:!0,showFrame:!0,className:"",frameColor:m,arrowColor:m,keepEditorSelection:!1};class v{constructor(e,t,i,n,o,r){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=i,this.heightInLines=n,this._onDomNodeTop=o,this._onComputedHeight=r}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class b{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class y{constructor(e){this._editor=e,this._ruleName=y._IdGenerator.nextId(),this._decorations=[],this._color=null,this._height=-1}dispose(){this.hide(),n.uN(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){n.uN(this._ruleName),n.fk(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(e){this._decorations=this._editor.deltaDecorations(this._decorations,[{range:f.e.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._editor.deltaDecorations(this._decorations,[])}}y._IdGenerator=new d.R(".arrow-decoration-");var w=i(3580),C=i(8819),S=i(2065),x=i(5026),k=i(6830),D=i(3910),L=i(3046),N=i(8335),E=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},A=function(e,t){return function(i,n){t(i,n,e)}};const M=(0,S.yh)("IPeekViewService");var I;(0,x.z)(M,class{constructor(){this._widgets=new Map}addExclusiveWidget(e,t){const i=this._widgets.get(e);i&&(i.listener.dispose(),i.widget.dispose()),this._widgets.set(e,{widget:t,listener:t.onDidClose((()=>{const i=this._widgets.get(e);i&&i.widget===t&&(i.listener.dispose(),this._widgets.delete(e))}))})}}),function(e){e.inPeekEditor=new C.uy("inReferenceSearchEditor",!0,w.N("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),e.notInPeekEditor=e.inPeekEditor.toNegated()}(I||(I={}));let T=class{constructor(e,t){e instanceof u.H&&I.inPeekEditor.bindTo(t)}dispose(){}};function R(e){let t=e.get(c.$).getFocusedCodeEditor();return t instanceof u.H?t.getParentEditor():t}T.ID="editor.contrib.referenceController",T=E([A(1,C.i6)],T),(0,k._K)(T.ID,T);const O={headerBackgroundColor:s.Il.white,primaryHeadingColor:s.Il.fromHex("#333333"),secondaryHeadingColor:s.Il.fromHex("#6c6c6cb3")};let F=class extends class{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._positionMarkerId=[],this._viewZone=null,this._disposables=new g.SL,this.container=null,this._isShowing=!1,this.editor=e,this.options=l.I8(t),l.jB(this.options,_,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange((e=>{const t=this._getWidth(e);this.domNode.style.width=t+"px",this.domNode.style.left=this._getLeft(e)+"px",this._onWidth(t)})))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null})),this.editor.deltaDecorations(this._positionMarkerId,[]),this._positionMarkerId=[],this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new y(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){let e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){let e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){if(this.domNode.style.height=`${e}px`,this.container){let t=e-this._decoratingElementsHeight();this.container.style.height=`${t}px`;const i=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(i))}this._resizeSash&&this._resizeSash.layout()}get position(){const[e]=this._positionMarkerId;if(!e)return;const t=this.editor.getModel();if(!t)return;const i=t.getDecorationRange(e);return i?i.getStartPosition():void 0}show(e,t){const i=f.e.isIRange(e)?f.e.lift(e):f.e.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:i,options:p.qx.EMPTY}])}hide(){this._viewZone&&(this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id)})),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow&&this._arrow.hide()}_decoratingElementsHeight(){let e=this.editor.getOption(56),t=0;return this.options.showArrow&&(t+=2*Math.round(e/3)),this.options.showFrame&&(t+=2*Math.round(e/9)),t}_showImpl(e,t){const i=e.getStartPosition(),n=this.editor.getLayoutInfo(),o=this._getWidth(n);this.domNode.style.width=`${o}px`,this.domNode.style.left=this._getLeft(n)+"px";const r=document.createElement("div");r.style.overflow="hidden";const s=this.editor.getOption(56),a=Math.max(12,this.editor.getLayoutInfo().height/s*.8);t=Math.min(t,a);let l=0,c=0;if(this._arrow&&this.options.showArrow&&(l=Math.round(s/3),this._arrow.height=l,this._arrow.show(i)),this.options.showFrame&&(c=Math.round(s/9)),this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new v(r,i.lineNumber,i.column,t,(e=>this._onViewZoneTop(e)),(e=>this._onViewZoneHeight(e))),this._viewZone.id=e.addZone(this._viewZone),this._overlayWidget=new b("vs.editor.contrib.zoneWidget"+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)})),this.container&&this.options.showFrame){const e=this.options.frameWidth?this.options.frameWidth:c;this.container.style.borderTopWidth=e+"px",this.container.style.borderBottomWidth=e+"px"}let u=t*s-this._decoratingElementsHeight();this.container&&(this.container.style.top=l+"px",this.container.style.height=u+"px",this.container.style.overflow="hidden"),this._doLayout(u,o),this.options.keepEditorSelection||this.editor.setSelection(e);const h=this.editor.getModel();if(h){const t=e.endLineNumber+1;t<=h.getLineCount()?this.revealLine(t,!1):this.revealLine(h.getLineCount(),!0)}}revealLine(e,t){t?this.editor.revealLineInCenter(e,0):this.editor.revealLine(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones((t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))}))}_initSash(){if(this._resizeSash)return;let e;this._resizeSash=this._disposables.add(new h.g(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.hide(),this._resizeSash.state=0),this._disposables.add(this._resizeSash.onDidStart((t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})}))),this._disposables.add(this._resizeSash.onDidEnd((()=>{e=void 0}))),this._disposables.add(this._resizeSash.onDidChange((t=>{if(e){let i=(t.currentY-e.startY)/this.editor.getOption(56),n=i<0?Math.ceil(i):Math.floor(i),o=e.heightInLines+n;o>5&&o<35&&this._relayout(o)}})))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(null===this.domNode.style.height?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}{constructor(e,t,i){super(e,t),this.instantiationService=i,this._onDidClose=new a.Q5,this.onDidClose=this._onDidClose.event,l.jB(this.options,O,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){let t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();let e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=n.$(".head"),this._bodyElement=n.$(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){const i=n.$(".peekview-title");n.R3(this._headElement,i),n.mu(i,"click",(e=>this._onTitleClick(e))),this._fillTitleIcon(i),this._primaryHeading=n.$("span.filename"),this._secondaryHeading=n.$("span.dirname"),this._metaHeading=n.$("span.meta"),n.R3(i,this._primaryHeading,this._secondaryHeading,this._metaHeading);const s=n.$(".peekview-actions");n.R3(this._headElement,s);const a=this._getActionBarOptions();this._actionbarWidget=new o.o(s,a),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new r.aU("peekview.close",w.N("label.close","Close"),L.lA.close.classNames,!0,(()=>(this.dispose(),Promise.resolve()))),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:N.Id.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:n.PO(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,n.$Z(this._metaHeading)):n.Cp(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0)return void this.dispose();const i=Math.ceil(1.2*this.editor.getOption(56)),n=Math.round(e-(i+2));this._doLayoutHead(i,t),this._doLayoutBody(n,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};F=E([A(2,S.TG)],F);const P=(0,D.P6)("peekViewTitle.background",{dark:"#1E1E1E",light:"#FFFFFF",hc:"#0C141F"},w.N("peekViewTitleBackground","Background color of the peek view title area.")),B=(0,D.P6)("peekViewTitleLabel.foreground",{dark:"#FFFFFF",light:"#333333",hc:"#FFFFFF"},w.N("peekViewTitleForeground","Color of the peek view title.")),z=(0,D.P6)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161e6",hc:"#FFFFFF99"},w.N("peekViewTitleInfoForeground","Color of the peek view title info.")),W=(0,D.P6)("peekView.border",{dark:"#007acc",light:"#007acc",hc:D.lR},w.N("peekViewBorder","Color of the peek view borders and arrow.")),V=(0,D.P6)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hc:s.Il.black},w.N("peekViewResultsBackground","Background color of the peek view result list.")),H=(0,D.P6)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hc:s.Il.white},w.N("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),$=(0,D.P6)("peekViewResult.fileForeground",{dark:s.Il.white,light:"#1E1E1E",hc:s.Il.white},w.N("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),U=(0,D.P6)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hc:null},w.N("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),j=(0,D.P6)("peekViewResult.selectionForeground",{dark:s.Il.white,light:"#6C6C6C",hc:s.Il.white},w.N("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),q=(0,D.P6)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hc:s.Il.black},w.N("peekViewEditorBackground","Background color of the peek view editor.")),K=(0,D.P6)("peekViewEditorGutter.background",{dark:q,light:q,hc:q},w.N("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),G=(0,D.P6)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hc:null},w.N("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),Y=(0,D.P6)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hc:null},w.N("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),Z=(0,D.P6)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hc:D.xL},w.N("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."))},8275:(e,t,i)=>{"use strict";i.d(t,{X:()=>u});var n=i(4973),o=i(7781),r=i(7869),s=i(5976),a=i(5520),l=i(8401),c=i(8289);class u{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var i;const n=new s.SL;e.canAcceptInBackground=!!(null===(i=this.options)||void 0===i?void 0:i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const o=n.add(new s.XK);return o.value=this.doProvide(e,t),n.add(this.onDidActiveTextEditorControlChange((()=>{o.value=void 0,o.value=this.doProvide(e,t)}))),n}doProvide(e,t){const i=new s.SL,n=this.activeTextEditorControl;if(n&&this.canProvideWithTextEditor(n)){const o={editor:n},r=(0,a.Pi)(n);if(r){let e=(0,l.f6)(n.saveViewState());i.add(r.onDidChangeCursorPosition((()=>{e=(0,l.f6)(n.saveViewState())}))),o.restoreViewState=()=>{e&&n===this.activeTextEditorControl&&n.restoreViewState(e)},i.add((0,c.I)(t.onCancellationRequested)((()=>{var e;return null===(e=o.restoreViewState)||void 0===e?void 0:e.call(o)})))}i.add((0,s.OF)((()=>this.clearDecorations(n)))),i.add(this.provideWithTextEditor(o,e,t))}else i.add(this.provideWithoutTextEditor(e,t));return i}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus()}getModel(e){var t;return(0,a.QI)(e)?null===(t=e.getModel())||void 0===t?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations((e=>{const i=[];this.rangeHighlightDecorationId&&(i.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),i.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const s=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:(0,o.EN)(r.m9),position:n.sh.Full}}}],[a,l]=e.deltaDecorations(i,s);this.rangeHighlightDecorationId={rangeHighlightId:a,overviewRulerDecorationId:l}}))}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations((e=>{e.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])})),this.rangeHighlightDecorationId=void 0)}}},4454:(e,t,i)=>{"use strict";i.r(t),i.d(t,{RenameAction:()=>z,rename:()=>P});var n=i(3580),o=i(7301),r=i(8819),s=i(535),a=i(6830),l=i(9102),c=i(5976),u=i(187),h=i(3910),d=i(7781),g=i(1847),f=function(e,t){return function(i,n){t(i,n,e)}};const p=new r.uy("renameInputVisible",!1,(0,n.N)("renameInputVisible","Whether the rename input widget is visible"));let m=class{constructor(e,t,i,n,o){this._editor=e,this._acceptKeybindings=t,this._themeService=i,this._keybindingService=n,this._disposables=new c.SL,this.allowEditorOverflow=!0,this._visibleContextKey=p.bindTo(o),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(40)&&this._updateFont()}))),this._disposables.add(i.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){if(!this._domNode){this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",(0,n.N)("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label);const e=()=>{var e,t;const[i,o]=this._acceptKeybindings;this._keybindingService.lookupKeybinding(i),this._label.innerText=(0,n.N)({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",null===(e=this._keybindingService.lookupKeybinding(i))||void 0===e?void 0:e.getLabel(),null===(t=this._keybindingService.lookupKeybinding(o))||void 0===t?void 0:t.getLabel())};e(),this._disposables.add(this._keybindingService.onDidUpdateKeybindings(e)),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())}return this._domNode}_updateStyles(e){var t,i,n,o;if(!this._input||!this._domNode)return;const r=e.getColor(h.rh);this._domNode.style.backgroundColor=String(null!==(t=e.getColor(h.D0))&&void 0!==t?t:""),this._domNode.style.boxShadow=r?` 0 0 8px 2px ${r}`:"",this._domNode.style.color=String(null!==(i=e.getColor(h.zJ))&&void 0!==i?i:""),this._input.style.backgroundColor=String(null!==(n=e.getColor(h.sE))&&void 0!==n?n:"");const s=e.getColor(h.dt);this._input.style.borderWidth=s?"1px":"0px",this._input.style.borderStyle=s?"solid":"none",this._input.style.borderColor=null!==(o=null==s?void 0:s.toString())&&void 0!==o?o:"none"}_updateFont(){if(!this._input||!this._label)return;const e=this._editor.getOption(40);this._input.style.fontFamily=e.fontFamily,this._input.style.fontWeight=e.fontWeight,this._input.style.fontSize=`${e.fontSize}px`,this._label.style.fontSize=.8*e.fontSize+"px"}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}afterRender(e){e||this.cancelInput(!0)}acceptInput(e){this._currentAcceptInput&&this._currentAcceptInput(e)}cancelInput(e){this._currentCancelInput&&this._currentCancelInput(e)}getInput(e,t,i,n,o,r){this._domNode.classList.toggle("preview",o),this._position=new u.L(e.startLineNumber,e.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",i.toString()),this._input.setAttribute("selectionEnd",n.toString()),this._input.size=Math.max(1.1*(e.endColumn-e.startColumn),20);const s=new c.SL;return new Promise((e=>{this._currentCancelInput=t=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,e(t),!0),this._currentAcceptInput=i=>{0!==this._input.value.trim().length&&this._input.value!==t?(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,e({newName:this._input.value,wantsPreview:o&&i})):this.cancelInput(!0)},r.onCancellationRequested((()=>this.cancelInput(!0))),s.add(this._editor.onDidBlurEditorWidget((()=>this.cancelInput(!1)))),this._show()})).finally((()=>{s.dispose(),this._hide()}))}_show(){this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout((()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))}),100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};m=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([f(2,d.XE),f(3,g.d),f(4,r.i6)],m);var _=i(4101),v=i(5152),b=i(4314),y=i(2276),w=i(9925),C=i(9422),S=i(6007),x=i(666),k=i(1640),D=i(1050),L=i(5393),N=i(3557),E=i(2065),A=i(9872),M=i(3193),I=i(3187),T=i(8401),R=function(e,t){return function(i,n){t(i,n,e)}},O=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class F{constructor(e,t){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=_.G0.ordered(e)}hasProvider(){return this._providers.length>0}resolveRenameLocation(e){return O(this,void 0,void 0,(function*(){const t=[];for(this._providerRenameIdx=0;this._providerRenameIdx0?t.join("\n"):void 0}:{range:b.e.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join("\n"):void 0}}))}provideRenameEdits(e,t){return O(this,void 0,void 0,(function*(){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)}))}_provideRenameEdits(e,t,i,o){return O(this,void 0,void 0,(function*(){const r=this._providers[t];if(!r)return{edits:[],rejectReason:i.join("\n")};const s=yield r.provideRenameEdits(this.model,this.position,e,o);return s?s.rejectReason?this._provideRenameEdits(e,t+1,i.concat(s.rejectReason),o):s:this._provideRenameEdits(e,t+1,i.concat(n.N("no result","No result.")),o)}))}}function P(e,t,i){return O(this,void 0,void 0,(function*(){const n=new F(e,t),o=yield n.resolveRenameLocation(D.T.None);return(null==o?void 0:o.rejectReason)?{edits:[],rejectReason:o.rejectReason}:n.provideRenameEdits(i,D.T.None)}))}let B=class e{constructor(e,t,i,n,o,r,s){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=o,this._logService=r,this._configService=s,this._dispoableStore=new c.SL,this._cts=new D.A,this._renameInputField=this._dispoableStore.add(new L.Ue((()=>this._dispoableStore.add(this._instaService.createInstance(m,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"])))))}static get(t){return t.getContribution(e.ID)}dispose(){this._dispoableStore.dispose(),this._cts.dispose(!0)}run(){return O(this,void 0,void 0,(function*(){if(this._cts.dispose(!0),!this.editor.hasModel())return;const e=this.editor.getPosition(),t=new F(this.editor.getModel(),e);if(!t.hasProvider())return;let i;this._cts=new w.Dl(this.editor,5);try{const e=t.resolveRenameLocation(this._cts.token);this._progressService.showWhile(e,250),i=yield e}catch(t){return void y.O.get(this.editor).showMessage(t||n.N("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),e)}if(!i)return;if(i.rejectReason)return void y.O.get(this.editor).showMessage(i.rejectReason,e);if(this._cts.token.isCancellationRequested)return;this._cts.dispose(),this._cts=new w.Dl(this.editor,5,i.range);let o=this.editor.getSelection(),r=0,s=i.text.length;b.e.isEmpty(o)||b.e.spansMultipleLines(o)||!b.e.containsRange(i.range,o)||(r=Math.max(0,o.startColumn-i.range.startColumn),s=Math.min(i.range.endColumn,o.endColumn)-i.range.startColumn);const a=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),l=yield this._renameInputField.value.getInput(i.range,i.text,r,s,a,this._cts.token);if("boolean"==typeof l)return void(l&&this.editor.focus());this.editor.focus();const c=(0,L.eP)(t.provideRenameEdits(l.newName,this._cts.token),this._cts.token).then((e=>O(this,void 0,void 0,(function*(){e&&this.editor.hasModel()&&(e.rejectReason?this._notificationService.info(e.rejectReason):this._bulkEditService.apply(S.fo.convert(e),{editor:this.editor,showPreview:l.wantsPreview,label:n.N("label","Renaming '{0}'",null==i?void 0:i.text),quotableLabel:n.N("quotableLabel","Renaming {0}",null==i?void 0:i.text)}).then((e=>{e.ariaSummary&&(0,v.Z9)(n.N("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",i.text,l.newName,e.ariaSummary))})).catch((e=>{this._notificationService.error(n.N("rename.failedApply","Rename failed to apply edits")),this._logService.error(e)})))}))),(e=>{this._notificationService.error(n.N("rename.failed","Rename failed to compute edits")),this._logService.error(e)}));return this._progressService.showWhile(c,250),c}))}acceptRenameInput(e){this._renameInputField.value.acceptInput(e)}cancelRenameInput(){this._renameInputField.value.cancelInput(!0)}};B.ID="editor.contrib.renameController",B=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([R(1,E.TG),R(2,C.lT),R(3,S.vu),R(4,s.e),R(5,N.VZ),R(6,I.V)],B);class z extends a.R6{constructor(){super({id:"editor.action.rename",label:n.N("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:r.Ao.and(l.u.writable,l.u.hasRenameProvider),kbOpts:{kbExpr:l.u.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const i=e.get(k.$),[n,r]=Array.isArray(t)&&t||[void 0,void 0];return x.o.isUri(n)&&u.L.isIPosition(r)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(r),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),o.dL):super.runCommand(e,t)}run(e,t){const i=B.get(t);return i?i.run():Promise.resolve()}}(0,a._K)(B.ID,B),(0,a.Qr)(z);const W=a._l.bindToContribution(B.get);(0,a.fK)(new W({id:"acceptRenameInput",precondition:p,handler:e=>e.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:l.u.focus,primary:3}})),(0,a.fK)(new W({id:"acceptRenameInputWithPreview",precondition:r.Ao.and(p,r.Ao.has("config.editor.rename.enablePreview")),handler:e=>e.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:l.u.focus,primary:1027}})),(0,a.fK)(new W({id:"cancelRenameInput",precondition:p,handler:e=>e.cancelRenameInput(),kbOpts:{weight:199,kbExpr:l.u.focus,primary:9,secondary:[1033]}})),(0,a.sb)("_executeDocumentRenameProvider",(function(e,t,...i){const[n]=i;return(0,T.p_)("string"==typeof n),P(e,t,n)})),A.B.as(M.IP.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:n.N("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}})},689:(e,t,i)=>{"use strict";i.d(t,{x:()=>s});var n=i(187),o=i(4314),r=i(1741);class s{provideSelectionRanges(e,t){return i=this,n=void 0,r=function*(){const i=[];for(const n of t){const t=[];i.push(t);const o=new Map;yield new Promise((t=>s._bracketsRightYield(t,0,e,n,o))),yield new Promise((i=>s._bracketsLeftYield(i,0,e,n,o,t)))}return i},new((o=void 0)||(o=Promise))((function(e,t){function s(e){try{l(r.next(e))}catch(e){t(e)}}function a(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(s,a)}l((r=r.apply(i,n||[])).next())}));var i,n,o,r}static _bracketsRightYield(e,t,i,n,o){const a=new Map,l=Date.now();for(;;){if(t>=s._maxRounds){e();break}if(!n){e();break}let c=i.findNextBracket(n);if(!c){e();break}if(Date.now()-l>s._maxDuration){setTimeout((()=>s._bracketsRightYield(e,t+1,i,n,o)));break}const u=c.close[0];if(c.isOpen){let e=a.has(u)?a.get(u):0;a.set(u,e+1)}else{let e=a.has(u)?a.get(u):0;if(e-=1,a.set(u,Math.max(0,e)),e<0){let e=o.get(u);e||(e=new r.S,o.set(u,e)),e.push(c.range)}}n=c.range.getEndPosition()}}static _bracketsLeftYield(e,t,i,n,r,a){const l=new Map,c=Date.now();for(;;){if(t>=s._maxRounds&&0===r.size){e();break}if(!n){e();break}let u=i.findPrevBracket(n);if(!u){e();break}if(Date.now()-c>s._maxDuration){setTimeout((()=>s._bracketsLeftYield(e,t+1,i,n,r,a)));break}const h=u.close[0];if(u.isOpen){let e=l.has(h)?l.get(h):0;if(e-=1,l.set(h,Math.max(0,e)),e<0){let e=r.get(h);if(e){let t=e.shift();0===e.size&&r.delete(h);const n=o.e.fromPositions(u.range.getEndPosition(),t.getStartPosition()),l=o.e.fromPositions(u.range.getStartPosition(),t.getEndPosition());a.push({range:n}),a.push({range:l}),s._addBracketLeading(i,l,a)}}}else{let e=l.has(h)?l.get(h):0;l.set(h,e+1)}n=u.range.getStartPosition()}}static _addBracketLeading(e,t,i){if(t.startLineNumber===t.endLineNumber)return;const r=t.startLineNumber,s=e.getLineFirstNonWhitespaceColumn(r);0!==s&&s!==t.startColumn&&(i.push({range:o.e.fromPositions(new n.L(r,s),t.getEndPosition())}),i.push({range:o.e.fromPositions(new n.L(r,1),t.getEndPosition())}));const a=r-1;if(a>0){const r=e.getLineFirstNonWhitespaceColumn(a);r===t.startColumn&&r!==e.getLineLastNonWhitespaceColumn(a)&&(i.push({range:o.e.fromPositions(new n.L(a,r),t.getEndPosition())}),i.push({range:o.e.fromPositions(new n.L(a,1),t.getEndPosition())}))}}}s._maxDuration=30,s._maxRounds=2},1955:(e,t,i)=>{"use strict";i.r(t),i.d(t,{provideSelectionRanges:()=>w});var n=i(9488),o=i(1050),r=i(6830),s=i(187),a=i(4314),l=i(3860),c=i(9102),u=i(4101),h=i(3580),d=i(4144),g=i(7295),f=i(689),p=i(4565),m=i(7301),_=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class v{constructor(e,t){this.index=e,this.ranges=t}mov(e){let t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const i=new v(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}class b{constructor(e){this._editor=e,this._ignoreSelection=!1}static get(e){return e.getContribution(b.ID)}dispose(){var e;null===(e=this._selectionListener)||void 0===e||e.dispose()}run(e){return _(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),i=this._editor.getModel();if(!u.AC.has(i))return;if(this._state||(yield w(i,t.map((e=>e.getPosition())),this._editor.getOption(100),o.T.None).then((e=>{var i;if(n.Of(e)&&e.length===t.length&&this._editor.hasModel()&&n.fS(this._editor.getSelections(),t,((e,t)=>e.equalsSelection(t)))){for(let i=0;ie.containsPosition(t[i].getStartPosition())&&e.containsPosition(t[i].getEndPosition()))),e[i].unshift(t[i]);this._state=e.map((e=>new v(0,e))),null===(i=this._selectionListener)||void 0===i||i.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition((()=>{var e;this._ignoreSelection||(null===(e=this._selectionListener)||void 0===e||e.dispose(),this._state=void 0)}))}}))),!this._state)return;this._state=this._state.map((t=>t.mov(e)));const r=this._state.map((e=>l.Y.fromPositions(e.ranges[e.index].getStartPosition(),e.ranges[e.index].getEndPosition())));this._ignoreSelection=!0;try{this._editor.setSelections(r)}finally{this._ignoreSelection=!1}}))}}b.ID="editor.contrib.smartSelectController";class y extends r.R6{constructor(e,t){super(t),this._forward=e}run(e,t){return _(this,void 0,void 0,(function*(){let e=b.get(t);e&&(yield e.run(this._forward))}))}}function w(e,t,i,o){return _(this,void 0,void 0,(function*(){const r=u.AC.all(e);1===r.length&&r.unshift(new f.x);let l=[],c=[];for(const i of r)l.push(Promise.resolve(i.provideSelectionRanges(e,t,o)).then((e=>{if(n.Of(e)&&e.length===t.length)for(let i=0;i{if(0===t.length)return[];t.sort(((e,t)=>s.L.isBefore(e.getStartPosition(),t.getStartPosition())?1:s.L.isBefore(t.getStartPosition(),e.getStartPosition())||s.L.isBefore(e.getEndPosition(),t.getEndPosition())?-1:s.L.isBefore(t.getEndPosition(),e.getEndPosition())?1:0));let n,o=[];for(const e of t)(!n||a.e.containsRange(e,n)&&!a.e.equalsRange(e,n))&&(o.push(e),n=e);if(!i.selectLeadingAndTrailingWhitespace)return o;let r=[o[0]];for(let t=1;t=0;l--){let e=o.charCodeAt(l);if(l!==s&&(95===e||45===e))break;if((0,g.mK)(e)&&(0,g.df)(u))break;u=e}for(l+=1;c0&&0===t.getLineFirstNonWhitespaceColumn(i.lineNumber)&&0===t.getLineLastNonWhitespaceColumn(i.lineNumber)&&e.push({range:new a.e(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})}}),(0,r.f)("_executeSelectionRangeProvider",(function(e,...t){const[i]=t;return w(e,i,{selectLeadingAndTrailingWhitespace:!0},o.T.None)}))},3379:(e,t,i)=>{"use strict";i.r(t),i.d(t,{SnippetController2:()=>p});var n=i(5976),o=i(6830),r=i(4314),s=i(3860),a=i(9102),l=i(9599),c=i(8819),u=i(3557),h=i(7548),d=i(3580),g=function(e,t){return function(i,n){t(i,n,e)}};const f={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let p=class e{constructor(t,i,o){this._editor=t,this._logService=i,this._snippetListener=new n.SL,this._modelVersionId=-1,this._inSnippet=e.InSnippetMode.bindTo(o),this._hasNextTabstop=e.HasNextTabstop.bindTo(o),this._hasPrevTabstop=e.HasPrevTabstop.bindTo(o)}static get(t){return t.getContribution(e.ID)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),null===(e=this._session)||void 0===e||e.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,void 0===t?f:Object.assign(Object.assign({},f),t))}catch(t){this.cancel(),this._logService.error(t),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}}_doInsert(e,t){this._editor.hasModel()&&(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session?this._session.merge(e,t):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new h.l(this._editor,e,t),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent((e=>e.isFlush&&this.cancel()))),this._snippetListener.add(this._editor.onDidChangeModel((()=>this.cancel()))),this._snippetListener.add(this._editor.onDidChangeCursorSelection((()=>this._updateState()))))}_updateState(){if(this._session&&this._editor.hasModel()){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){if(!this._session||!this._editor.hasModel())return void(this._currentChoice=void 0);const{choice:e}=this._session;if(e){if(this._currentChoice!==e){this._currentChoice=e,this._editor.setSelections(this._editor.getSelections().map((e=>s.Y.fromPositions(e.getStartPosition()))));const[t]=e.options;(0,l.i5)(this._editor,e.options.map(((e,i)=>({kind:13,label:e.value,insertText:e.value,sortText:"a".repeat(i+1),range:r.e.fromPositions(this._editor.getPosition(),this._editor.getPosition().delta(0,t.value.length))}))))}}else this._currentChoice=void 0}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var t;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),null===(t=this._session)||void 0===t||t.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){this._session&&this._session.prev(),this._updateState()}next(){this._session&&this._session.next(),this._updateState()}isInSnippet(){return Boolean(this._inSnippet.get())}};p.ID="snippetController2",p.InSnippetMode=new c.uy("inSnippetMode",!1,(0,d.N)("inSnippetMode","Whether the editor in current in snippet mode")),p.HasNextTabstop=new c.uy("hasNextTabstop",!1,(0,d.N)("hasNextTabstop","Whether there is a next tab stop when in snippet mode")),p.HasPrevTabstop=new c.uy("hasPrevTabstop",!1,(0,d.N)("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode")),p=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([g(1,u.VZ),g(2,c.i6)],p),(0,o._K)(p.ID,p);const m=o._l.bindToContribution(p.get);(0,o.fK)(new m({id:"jumpToNextSnippetPlaceholder",precondition:c.Ao.and(p.InSnippetMode,p.HasNextTabstop),handler:e=>e.next(),kbOpts:{weight:130,kbExpr:a.u.editorTextFocus,primary:2}})),(0,o.fK)(new m({id:"jumpToPrevSnippetPlaceholder",precondition:c.Ao.and(p.InSnippetMode,p.HasPrevTabstop),handler:e=>e.prev(),kbOpts:{weight:130,kbExpr:a.u.editorTextFocus,primary:1026}})),(0,o.fK)(new m({id:"leaveSnippet",precondition:p.InSnippetMode,handler:e=>e.cancel(!0),kbOpts:{weight:130,kbExpr:a.u.editorTextFocus,primary:9,secondary:[1033]}})),(0,o.fK)(new m({id:"acceptSnippet",precondition:p.InSnippetMode,handler:e=>e.finish()}))},3472:(e,t,i)=>{"use strict";i.d(t,{xv:()=>r,Vm:()=>a,Lv:()=>l,Yj:()=>f});class n{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return 95===e||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};let e,t=this.pos,i=0,o=this.value.charCodeAt(t);if(e=n._table[o],"number"==typeof e)return this.pos+=1,{type:e,pos:t,len:1};if(n.isDigitCharacter(o)){e=8;do{i+=1,o=this.value.charCodeAt(t+i)}while(n.isDigitCharacter(o));return this.pos+=i,{type:e,pos:t,len:i}}if(n.isVariableCharacter(o)){e=9;do{o=this.value.charCodeAt(t+ ++i)}while(n.isVariableCharacter(o)||n.isDigitCharacter(o));return this.pos+=i,{type:e,pos:t,len:i}}e=10;do{i+=1,o=this.value.charCodeAt(t+i)}while(!isNaN(o)&&void 0===n._table[o]&&!n.isDigitCharacter(o)&&!n.isVariableCharacter(o));return this.pos+=i,{type:e,pos:t,len:i}}}n._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};class o{constructor(){this._children=[]}appendChild(e){return e instanceof r&&this._children[this._children.length-1]instanceof r?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:i}=e,n=i.children.indexOf(e),o=i.children.slice(0);o.splice(n,1,...t),i._children=o,function e(t,i){for(const n of t)n.parent=i,e(n.children,n)}(t,i)}get children(){return this._children}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof g)return e;e=e.parent}}toString(){return this.children.reduce(((e,t)=>e+t.toString()),"")}len(){return 0}}class r extends o{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new r(this.value)}}class s extends o{}class a extends s{constructor(e){super(),this.index=e}static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index?1:0}get isFinalTabstop(){return 0===this.index}get choice(){return 1===this._children.length&&this._children[0]instanceof l?this._children[0]:void 0}clone(){let e=new a(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}class l extends o{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof r&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){let e=new l;return this.options.forEach(e.appendChild,e),e}}class c extends o{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,n=e.replace(this.regexp,(function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))}));return!i&&this._children.some((e=>e instanceof u&&Boolean(e.elseValue)))&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof u){let n=e[i.index]||"";n=i.resolve(n),t+=n}else t+=i.toString();return t}toString(){return""}clone(){let e=new c;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map((e=>e.clone())),e}}class u extends o{constructor(e,t,i,n){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=n}resolve(e){return"upcase"===this.shorthandName?e?e.toLocaleUpperCase():"":"downcase"===this.shorthandName?e?e.toLocaleLowerCase():"":"capitalize"===this.shorthandName?e?e[0].toLocaleUpperCase()+e.substr(1):"":"pascalcase"===this.shorthandName?e?this._toPascalCase(e):"":Boolean(e)&&"string"==typeof this.ifValue?this.ifValue:Boolean(e)||"string"!=typeof this.elseValue?e||"":this.elseValue}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase())).join(""):e}clone(){return new u(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class h extends s{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),void 0!==t&&(this._children=[new r(t)],!0)}clone(){const e=new h(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}function d(e,t){const i=[...e];for(;i.length>0;){const e=i.shift();if(!t(e))break;i.unshift(...e.children)}}class g extends o{get placeholderInfo(){if(!this._placeholders){let e,t=[];this.walk((function(i){return i instanceof a&&(t.push(i),e=!e||e.indexn===e?(i=!0,!1):(t+=n.len(),!0))),i?t:-1}fullLen(e){let t=0;return d([e],(e=>(t+=e.len(),!0))),t}enclosingPlaceholders(e){let t=[],{parent:i}=e;for(;i;)i instanceof a&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk((t=>(t instanceof h&&t.resolve(e)&&(this._placeholders=void 0),!0))),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){let e=new g;return this._children=this.children.map((e=>e.clone())),e}walk(e){d(this.children,e)}}class f{constructor(){this._scanner=new n,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,i){this._scanner.text(e),this._token=this._scanner.next();const n=new g;for(;this._parse(n););const o=new Map,r=[];let s=0;n.walk((e=>(e instanceof a&&(s+=1,e.isFinalTabstop?o.set(0,void 0):!o.has(e.index)&&e.children.length>0?o.set(e.index,e.children):r.push(e)),!0)));for(const e of r){const t=o.get(e.index);if(t){const i=new a(e.index);i.transform=e.transform;for(const e of t)i.appendChild(e.clone());n.replace(e,[i])}}return i||(i=s>0&&t),!o.has(0)&&i&&n.appendChild(new a(0)),n}_accept(e,t){if(void 0===e||this._token.type===e){let e=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),e}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;for(;this._token.type!==e;){if(14===this._token.type)return!1;if(5===this._token.type){const e=this._scanner.next();if(0!==e.type&&4!==e.type&&5!==e.type)return!1}this._token=this._scanner.next()}const i=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return!!(t=this._accept(5,!0))&&(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new r(t)),!0)}_parseTabstopOrVariableName(e){let t;const i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new a(Number(t)):new h(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);const n=new a(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new r("${"+t+":")),n.children.forEach(e.appendChild,e),!0}else{if(!(n.index>0&&this._accept(7)))return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i);{const t=new l;for(;;){if(this._parseChoiceElement(t)){if(this._accept(2))continue;if(this._accept(7)&&(n.appendChild(t),this._accept(4)))return e.appendChild(n),!0}return this._backTo(i),!1}}}}_parseChoiceElement(e){const t=this._token,i=[];for(;2!==this._token.type&&7!==this._token.type;){let e;if(e=(e=this._accept(5,!0))?this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||e:this._accept(void 0,!0),!e)return this._backTo(t),!1;i.push(e)}return 0===i.length?(this._backTo(t),!1):(e.appendChild(new r(i.join(""))),!0)}_parseComplexVariable(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);const n=new h(t);if(!this._accept(1))return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i);for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new r("${"+t+":")),n.children.forEach(e.appendChild,e),!0}}_parseTransform(e){let t=new c,i="",n="";for(;!this._accept(6);){let e;if(e=this._accept(5,!0))e=this._accept(6,!0)||e,i+=e;else{if(14===this._token.type)return!1;i+=this._accept(void 0,!0)}}for(;!this._accept(6);){let e;if(e=this._accept(5,!0))e=this._accept(5,!0)||this._accept(6,!0)||e,t.appendChild(new r(e));else if(!this._parseFormatString(t)&&!this._parseAnything(t))return!1}for(;!this._accept(4);){if(14===this._token.type)return!1;n+=this._accept(void 0,!0)}try{t.regexp=new RegExp(i,n)}catch(e){return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);let n=this._accept(8,!0);if(!n)return this._backTo(t),!1;if(!i)return e.appendChild(new u(Number(n))),!0;if(this._accept(4))return e.appendChild(new u(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){let i=this._accept(9,!0);return i&&this._accept(4)?(e.appendChild(new u(Number(n),i)),!0):(this._backTo(t),!1)}if(this._accept(11)){let t=this._until(4);if(t)return e.appendChild(new u(Number(n),void 0,t,void 0)),!0}else if(this._accept(12)){let t=this._until(4);if(t)return e.appendChild(new u(Number(n),void 0,void 0,t)),!0}else if(this._accept(13)){let t=this._until(1);if(t){let i=this._until(4);if(i)return e.appendChild(new u(Number(n),void 0,t,i)),!0}}else{let t=this._until(4);if(t)return e.appendChild(new u(Number(n),void 0,void 0,t)),!0}return this._backTo(t),!1}_parseAnything(e){return 14!==this._token.type&&(e.appendChild(new r(this._scanner.tokenText(this._token))),this._accept(void 0),!0)}}},7548:(e,t,i)=>{"use strict";i.d(t,{l:()=>P});var n=i(9488),o=i(5976),r=i(7295),s=i(9386),a=i(4314),l=i(3860),c=i(3411),u=i(382),h=i(2065),d=i(3472),g=i(3580),f=i(8721),p=i(5935),m=i(3831),_=i(666);const v="code-workspace";function b(e){const t=e;return"string"==typeof(null==t?void 0:t.id)&&_.o.isUri(t.uri)}var y=i(8843);const w=new Uint8Array(16),C=[];for(let e=0;e<256;e++)C.push(e.toString(16).padStart(2,"0"));let S;S="object"==typeof crypto&&"function"==typeof crypto.getRandomValues?crypto.getRandomValues.bind(crypto):function(e){for(let t=0;tt!==e&&(t instanceof d.xv&&(o=(0,r.V8)((0,r.uq)(t.value).pop())),!0)));const s=(0,r.Mh)(o,n);t=t.replace(/(\r\n|\r|\n)(.*)/g,((e,t,i)=>`${t}${o.substr(s)}${i}`))}return t}if("TM_CURRENT_LINE"===t)return this._model.getLineContent(this._selection.positionLineNumber);if("TM_CURRENT_WORD"===t){const e=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return e&&e.word||void 0}return"TM_LINE_INDEX"===t?String(this._selection.positionLineNumber-1):"TM_LINE_NUMBER"===t?String(this._selection.positionLineNumber):void 0}}class D{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if("TM_FILENAME"===t)return f.EZ(this._model.uri.fsPath);if("TM_FILENAME_BASE"===t){const e=f.EZ(this._model.uri.fsPath),t=e.lastIndexOf(".");return t<=0?e:e.slice(0,t)}return"TM_DIRECTORY"===t&&this._labelService?"."===f.XX(this._model.uri.fsPath)?"":this._labelService.getUriLabel((0,p.XX)(this._model.uri)):"TM_FILEPATH"===t&&this._labelService?this._labelService.getUriLabel(this._model.uri):"RELATIVE_FILEPATH"===t&&this._labelService?this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0}):void 0}}class L{constructor(e,t,i,n){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=i,this._spread=n}resolve(e){if("CLIPBOARD"!==e.name)return;const t=this._readClipboardText();if(t){if(this._spread){const e=t.split(/\r\n|\n|\r/).filter((e=>!(0,r.m5)(e)));if(e.length===this._selectionCount)return e[this._selectionIdx]}return t}}}class N{constructor(e,t){this._model=e,this._selection=t}resolve(e){const{name:t}=e,i=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),n=m.zu.getComments(i);if(n)return"LINE_COMMENT"===t?n.lineCommentToken||void 0:"BLOCK_COMMENT_START"===t?n.blockCommentStartToken||void 0:"BLOCK_COMMENT_END"===t&&n.blockCommentEndToken||void 0}}class E{resolve(e){const{name:t}=e;return"CURRENT_YEAR"===t?String((new Date).getFullYear()):"CURRENT_YEAR_SHORT"===t?String((new Date).getFullYear()).slice(-2):"CURRENT_MONTH"===t?String((new Date).getMonth().valueOf()+1).padStart(2,"0"):"CURRENT_DATE"===t?String((new Date).getDate().valueOf()).padStart(2,"0"):"CURRENT_HOUR"===t?String((new Date).getHours().valueOf()).padStart(2,"0"):"CURRENT_MINUTE"===t?String((new Date).getMinutes().valueOf()).padStart(2,"0"):"CURRENT_SECOND"===t?String((new Date).getSeconds().valueOf()).padStart(2,"0"):"CURRENT_DAY_NAME"===t?E.dayNames[(new Date).getDay()]:"CURRENT_DAY_NAME_SHORT"===t?E.dayNamesShort[(new Date).getDay()]:"CURRENT_MONTH_NAME"===t?E.monthNames[(new Date).getMonth()]:"CURRENT_MONTH_NAME_SHORT"===t?E.monthNamesShort[(new Date).getMonth()]:"CURRENT_SECONDS_UNIX"===t?String(Math.floor(Date.now()/1e3)):void 0}}E.dayNames=[g.N("Sunday","Sunday"),g.N("Monday","Monday"),g.N("Tuesday","Tuesday"),g.N("Wednesday","Wednesday"),g.N("Thursday","Thursday"),g.N("Friday","Friday"),g.N("Saturday","Saturday")],E.dayNamesShort=[g.N("SundayShort","Sun"),g.N("MondayShort","Mon"),g.N("TuesdayShort","Tue"),g.N("WednesdayShort","Wed"),g.N("ThursdayShort","Thu"),g.N("FridayShort","Fri"),g.N("SaturdayShort","Sat")],E.monthNames=[g.N("January","January"),g.N("February","February"),g.N("March","March"),g.N("April","April"),g.N("May","May"),g.N("June","June"),g.N("July","July"),g.N("August","August"),g.N("September","September"),g.N("October","October"),g.N("November","November"),g.N("December","December")],E.monthNamesShort=[g.N("JanuaryShort","Jan"),g.N("FebruaryShort","Feb"),g.N("MarchShort","Mar"),g.N("AprilShort","Apr"),g.N("MayShort","May"),g.N("JuneShort","Jun"),g.N("JulyShort","Jul"),g.N("AugustShort","Aug"),g.N("SeptemberShort","Sep"),g.N("OctoberShort","Oct"),g.N("NovemberShort","Nov"),g.N("DecemberShort","Dec")];class A{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const t=function(e){return e.configuration?{id:e.id,configPath:e.configuration}:1===e.folders.length?{id:e.id,uri:e.folders[0].uri}:void 0}(this._workspaceService.getWorkspace());return t?"WORKSPACE_NAME"===e.name?this._resolveWorkspaceName(t):"WORKSPACE_FOLDER"===e.name?this._resoveWorkspacePath(t):void 0:void 0}_resolveWorkspaceName(e){if(b(e))return f.EZ(e.uri.path);let t=f.EZ(e.configPath.path);return t.endsWith(v)&&(t=t.substr(0,t.length-v.length-1)),t}_resoveWorkspacePath(e){if(b(e))return(0,y.D)(e.uri.fsPath);let t=f.EZ(e.configPath.path),i=e.configPath.fsPath;return i.endsWith(t)&&(i=i.substr(0,i.length-t.length-1)),i?(0,y.D)(i):"/"}}class M{resolve(e){const{name:t}=e;return"RANDOM"===t?Math.random().toString().slice(-6):"RANDOM_HEX"===t?Math.random().toString(16).slice(-6):"UUID"===t?function(){S(w),w[6]=15&w[6]|64,w[8]=63&w[8]|128;let e=0,t="";return t+=C[w[e++]],t+=C[w[e++]],t+=C[w[e++]],t+=C[w[e++]],t+="-",t+=C[w[e++]],t+=C[w[e++]],t+="-",t+=C[w[e++]],t+=C[w[e++]],t+="-",t+=C[w[e++]],t+=C[w[e++]],t+="-",t+=C[w[e++]],t+=C[w[e++]],t+=C[w[e++]],t+=C[w[e++]],t+=C[w[e++]],t+=C[w[e++]],t}():void 0}}var I=i(7781),T=i(3910),R=i(4349);(0,I.Ic)(((e,t)=>{function i(t){const i=e.getColor(t);return i?i.toString():"transparent"}t.addRule(`.monaco-editor .snippet-placeholder { background-color: ${i(T.u2)}; outline-color: ${i(T.Pk)}; }`),t.addRule(`.monaco-editor .finish-snippet-placeholder { background-color: ${i(T.I1)}; outline-color: ${i(T.U6)}; }`)}));class O{constructor(e,t,i,o){this._editor=e,this._snippet=t,this._offset=i,this._snippetLineLeadingWhitespace=o,this._nestingLevel=1,this._placeholderGroups=(0,n.vM)(t.placeholders,d.Vm.compareByIndex),this._placeholderGroupsIdx=-1}dispose(){this._placeholderDecorations&&this._editor.deltaDecorations([...this._placeholderDecorations.values()],[]),this._placeholderGroups.length=0}_initDecorations(){if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const e=this._editor.getModel();this._editor.changeDecorations((t=>{for(const i of this._snippet.placeholders){const n=this._snippet.offset(i),o=this._snippet.fullLen(i),r=a.e.fromPositions(e.getPositionAt(this._offset+n),e.getPositionAt(this._offset+n+o)),s=i.isFinalTabstop?O._decor.inactiveFinal:O._decor.inactive,l=t.addDecoration(r,s);this._placeholderDecorations.set(i,l)}}))}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){let e=[];for(const t of this._placeholderGroups[this._placeholderGroupsIdx])if(t.transform){const i=this._placeholderDecorations.get(t),n=this._editor.getModel().getDecorationRange(i),o=this._editor.getModel().getValueInRange(n),r=t.transform.resolve(o).split(/\r\n|\r|\n/);for(let e=1;e0&&this._editor.executeEdits("snippet.placeholderTransform",e)}let t=!1;!0===e&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,t=!0);const i=this._editor.getModel().changeDecorations((e=>{const i=new Set,n=[];for(const o of this._placeholderGroups[this._placeholderGroupsIdx]){const r=this._placeholderDecorations.get(o),s=this._editor.getModel().getDecorationRange(r);n.push(new l.Y(s.startLineNumber,s.startColumn,s.endLineNumber,s.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(o),e.changeDecorationOptions(r,o.isFinalTabstop?O._decor.activeFinal:O._decor.active),i.add(o);for(const t of this._snippet.enclosingPlaceholders(o)){const n=this._placeholderDecorations.get(t);e.changeDecorationOptions(n,t.isFinalTabstop?O._decor.activeFinal:O._decor.active),i.add(t)}}for(const[t,n]of this._placeholderDecorations)i.has(t)||e.changeDecorationOptions(n,t.isFinalTabstop?O._decor.inactiveFinal:O._decor.inactive);return n}));return t?this.move(e):null!=i?i:[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof d.Vm){const e=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(e).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||0===this._placeholderGroups.length}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}computePossibleSelections(){const e=new Map;for(const t of this._placeholderGroups){let i;for(const n of t){if(n.isFinalTabstop)break;i||(i=[],e.set(n.index,i));const t=this._placeholderDecorations.get(n),o=this._editor.getModel().getDecorationRange(t);if(!o){e.delete(n.index);break}i.push(o)}}return e}get choice(){return this._placeholderGroups[this._placeholderGroupsIdx][0].choice}merge(e){const t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations((i=>{for(const n of this._placeholderGroups[this._placeholderGroupsIdx]){const o=e.shift();console.assert(!o._placeholderDecorations);const r=o._snippet.placeholderInfo.last.index;for(const e of o._snippet.placeholderInfo.all)e.isFinalTabstop?e.index=n.index+(r+1)/this._nestingLevel:e.index=n.index+e.index/this._nestingLevel;this._snippet.replace(n,o._snippet.children);const s=this._placeholderDecorations.get(n);i.removeDecoration(s),this._placeholderDecorations.delete(n);for(const e of o._snippet.placeholders){const n=o._snippet.offset(e),r=o._snippet.fullLen(e),s=a.e.fromPositions(t.getPositionAt(o._offset+n),t.getPositionAt(o._offset+n+r)),l=i.addDecoration(s,O._decor.inactive);this._placeholderDecorations.set(e,l)}}this._placeholderGroups=(0,n.vM)(this._snippet.placeholders,d.Vm.compareByIndex)}))}}O._decor={active:c.qx.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:c.qx.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:c.qx.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:c.qx.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};const F={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};class P{constructor(e,t,i=F){this._templateMerges=[],this._snippets=[],this._editor=e,this._template=t,this._options=i}static adjustWhitespace(e,t,i,n,o){const s=e.getLineContent(t.lineNumber),a=(0,r.V8)(s,0,t.column-1);let l;return i.walk((t=>{if(!(t instanceof d.xv)||t.parent instanceof d.Lv)return!0;const o=t.value.split(/\r\n|\r|\n/);if(n){const n=i.offset(t);if(0===n)o[0]=e.normalizeIndentation(o[0]);else{l=null!=l?l:i.toString();let t=l.charCodeAt(n-1);10!==t&&13!==t||(o[0]=e.normalizeIndentation(a+o[0]))}for(let t=1;te.get(u.ec,h.jt))),_=e.invokeWithinContext((e=>new D(e.get(R.e,h.jt),p))),v=()=>l;let b=0,y=p.getValueInRange(P.adjustSelection(p,e.getSelection(),i,0)),w=p.getValueInRange(P.adjustSelection(p,e.getSelection(),0,n)),C=p.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber);const S=e.getSelections().map(((e,t)=>({selection:e,idx:t}))).sort(((e,t)=>a.e.compareRangesUsingStarts(e.selection,t.selection)));for(const{selection:a,idx:l}of S){let u=P.adjustSelection(p,a,i,0),h=P.adjustSelection(p,a,0,n);y!==p.getValueInRange(u)&&(u=a),w!==p.getValueInRange(h)&&(h=a);const D=a.setStartPosition(u.startLineNumber,u.startColumn).setEndPosition(h.endLineNumber,h.endColumn),I=(new d.Yj).parse(t,!0,o),T=D.getStartPosition(),R=P.adjustWhitespace(p,T,I,r||l>0&&C!==p.getLineFirstNonWhitespaceColumn(a.positionLineNumber),!0);I.resolveVariables(new x([_,new L(v,l,S.length,"spread"===e.getOption(68)),new k(p,a,l,c),new N(p,a),new E,new A(m),new M]));const F=p.getOffsetAt(T)+b;b+=I.toString().length-p.getValueLengthInRange(D),g[l]=s.h.replace(D,I.toString()),g[l].identifier={major:l,minor:0},f[l]=new O(e,I,F,R)}return{edits:g,snippets:f}}dispose(){(0,o.B9)(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:e,snippets:t}=P.createEditsAndSnippets(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer);this._snippets=t,this._editor.executeEdits("snippet",e,(e=>this._snippets[0].hasPlaceholder?this._move(!0):e.filter((e=>!!e.identifier)).map((e=>l.Y.fromPositions(e.range.getEndPosition()))))),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=F){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:i,snippets:n}=P.createEditsAndSnippets(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer);this._editor.executeEdits("snippet",i,(e=>{for(const e of this._snippets)e.merge(n);return console.assert(0===n.length),this._snippets[0].hasPlaceholder?this._move(void 0):e.filter((e=>!!e.identifier)).map((e=>l.Y.fromPositions(e.range.getEndPosition())))}))}next(){const e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){const e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){const t=[];for(const i of this._snippets){const n=i.move(e);t.push(...n)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get choice(){return this._snippets[0].choice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const e=this._editor.getSelections();if(e.length{e.push(...n.get(t))}))}e.sort(a.e.compareRangesUsingStarts);for(let[i,n]of t)if(n.length===e.length){n.sort(a.e.compareRangesUsingStarts);for(let o=0;o0}}},9599:(e,t,i)=>{"use strict";i.d(t,{_y:()=>y,GI:()=>w,A9:()=>S,ZJ:()=>x,kL:()=>D,wg:()=>E,i5:()=>M});var n=i(7301),o=i(4101),r=i(187),s=i(8819),a=i(1050),l=i(4314),c=i(5392),u=i(5976),h=i(4144),d=i(3472),g=i(4013),f=i(4565),p=i(8401),m=i(666),_=i(8216),v=i(3580),b=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const y={Visible:new s.uy("suggestWidgetVisible",!1,(0,v.N)("suggestWidgetVisible","Whether suggestion are visible")),DetailsVisible:new s.uy("suggestWidgetDetailsVisible",!1,(0,v.N)("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new s.uy("suggestWidgetMultipleSuggestions",!1,(0,v.N)("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new s.uy("suggestionMakesTextEdit",!0,(0,v.N)("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new s.uy("acceptSuggestionOnEnter",!0,(0,v.N)("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new s.uy("suggestionHasInsertAndReplaceRange",!1,(0,v.N)("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new s.uy("suggestionInsertMode",void 0,{type:"string",description:(0,v.N)("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new s.uy("suggestionCanResolve",!1,(0,v.N)("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},w=new h.eH("suggestWidgetStatusBar");class C{constructor(e,t,i,n){this.position=e,this.completion=t,this.container=i,this.provider=n,this.isInvalid=!1,this.score=c.CL.Default,this.distance=0,this.textLabel="string"==typeof t.label?t.label:t.label.name,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),l.e.isIRange(t.range)?(this.editStart=new r.L(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new r.L(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new r.L(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||l.e.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new r.L(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new r.L(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new r.L(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||l.e.spansMultipleLines(t.range.insert)||l.e.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),"function"!=typeof n.resolveCompletionItem&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(e){return b(this,void 0,void 0,(function*(){if(!this._resolveCache){const t=e.onCancellationRequested((()=>{this._resolveCache=void 0,this._isResolved=!1}));this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then((e=>{Object.assign(this.completion,e),this._isResolved=!0,t.dispose()}),(e=>{(0,n.VV)(e)&&(this._resolveCache=void 0,this._isResolved=!1)}))}return this._resolveCache}))}}class S{constructor(e=2,t=new Set,i=new Set,n=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=i,this.showDeprecated=n}}function x(){}S.default=new S;class k{constructor(e,t,i,n){this.items=e,this.needsClipboard=t,this.durations=i,this.disposable=n}}function D(e,t,i=S.default,r={triggerKind:0},s=a.T.None){return b(this,void 0,void 0,(function*(){const a=new g.G(!0);t=t.clone();const c=e.getWordAtPosition(t),h=c?new l.e(t.lineNumber,c.startColumn,t.lineNumber,c.endColumn):l.e.fromPositions(t),f={replace:h,insert:h.setEndPosition(t.lineNumber,t.column)},p=[],m=new u.SL,_=[];let v=!1;const y=(e,n,o)=>{var r,s,a;if(n){for(let o of n.suggestions)if(!i.kindFilter.has(o.kind)){if(!i.showDeprecated&&(null===(r=null==o?void 0:o.tags)||void 0===r?void 0:r.includes(1)))continue;o.range||(o.range=f),o.sortText||(o.sortText="string"==typeof o.label?o.label:o.label.name),!v&&o.insertTextRules&&4&o.insertTextRules&&(v=d.Yj.guessNeedsClipboard(o.insertText)),p.push(new C(t,o,n,e))}(0,u.Wf)(n)&&m.add(n),_.push({providerName:null!==(s=e._debugDisplayName)&&void 0!==s?s:"unkown_provider",elapsedProvider:null!==(a=n.duration)&&void 0!==a?a:-1,elapsedOverall:o.elapsed()})}},w=(()=>b(this,void 0,void 0,(function*(){})))();for(let a of o.KZ.orderedGroups(e)){let o=p.length;if(yield Promise.all(a.map((o=>b(this,void 0,void 0,(function*(){if(!(i.providerFilter.size>0)||i.providerFilter.has(o))try{const i=new g.G(!0),n=yield o.provideCompletionItems(e,t,r,s);y(o,n,i)}catch(e){(0,n.Cp)(e)}}))))),o!==p.length||s.isCancellationRequested)break}return yield w,s.isCancellationRequested?(m.dispose(),Promise.reject((0,n.F0)())):new k(p.sort(E(i.snippetSortOrder)),v,{entries:_,elapsed:a.elapsed()},m)}))}function L(e,t){if(e.sortTextLow&&t.sortTextLow){if(e.sortTextLowt.sortTextLow)return 1}return e.completion.labelt.completion.label?1:e.completion.kind-t.completion.kind}const N=new Map;function E(e){return N.get(e)}N.set(0,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return L(e,t)})),N.set(2,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return L(e,t)})),N.set(1,L),f.P.registerCommand("_executeCompletionItemProvider",((e,...t)=>b(void 0,void 0,void 0,(function*(){const[i,n,o,s]=t;(0,p.p_)(m.o.isUri(i)),(0,p.p_)(r.L.isIPosition(n)),(0,p.p_)("string"==typeof o||!o),(0,p.p_)("number"==typeof s||!s);const l=yield e.get(_.S).createModelReference(i);try{const e={incomplete:!1,suggestions:[]},t=[],i=yield D(l.object.textEditorModel,r.L.lift(n),void 0,{triggerCharacter:o,triggerKind:o?1:0});for(const n of i.items)t.length<(null!=s?s:0)&&t.push(n.resolve(a.T.None)),e.incomplete=e.incomplete||n.container.incomplete,e.suggestions.push(n.completion);try{return yield Promise.all(t),e}finally{setTimeout((()=>i.disposable.dispose()),100)}}finally{l.dispose()}}))));const A=new class{constructor(){this.onlyOnceSuggestions=[]}provideCompletionItems(){let e={suggestions:this.onlyOnceSuggestions.slice(0)};return this.onlyOnceSuggestions.length=0,e}};function M(e,t){setTimeout((()=>{A.onlyOnceSuggestions.push(...t),e.getContribution("editor.contrib.suggestController").triggerSuggest((new Set).add(A))}),0)}o.KZ.register("*",A)},8250:(e,t,i)=>{"use strict";i.r(t),i.d(t,{SuggestController:()=>it,TriggerSuggestAction:()=>nt});var n=i(5152),o=i(9488),r=i(7301),s=i(2258),a=i(5976),l=i(9925),c=i(6830),u=i(9386),h=i(4314),d=i(9102),g=i(3379),f=i(3472),p=i(3702),m=i(6904),_=i(4101),v=i(5393),b=i(2065),y=i(3108),w=i(5026),C=i(1531),S=function(e,t){return function(i,n){t(i,n,e)}};class x{constructor(e){this.name=e}select(e,t,i){if(0===i.length)return 0;let n=i[0].score[0];for(let e=0;ethis._saveState()),500),this._disposables.add(e.onWillSaveState((e=>{e.reason===m.fk.SHUTDOWN&&this._saveState()})))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,i){this._withStrategy(e,t).memorize(e,t,i),this._persistSoon.schedule()}select(e,t,i){return this._withStrategy(e,t).select(e,t,i)}_withStrategy(t,i){var n,o;const r=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:null===(n=this._modeService.getLanguageIdentifier(t.getLanguageIdAtPosition(i.lineNumber,i.column)))||void 0===n?void 0:n.language,resource:t.uri});if((null===(o=this._strategy)||void 0===o?void 0:o.name)!==r){this._saveState();const t=e._strategyCtors.get(r)||k;this._strategy=new t;try{const t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,i=this._storageService.get(`${e._storagePrefix}/${r}`,t);i&&this._strategy.fromJSON(JSON.parse(i))}catch(e){}}return this._strategy}_saveState(){if(this._strategy){const t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,i=JSON.stringify(this._strategy);this._storageService.store(`${e._storagePrefix}/${this._strategy.name}`,i,t,1)}}};D._strategyCtors=new Map([["recentlyUsedByPrefix",class extends x{constructor(){super("recentlyUsedByPrefix"),this._trie=p.Id.forStrings(),this._seq=0}memorize(e,t,i){const{word:n}=e.getWordUntilPosition(t),o=`${e.getLanguageIdentifier().language}/${n}`;this._trie.set(o,{type:i.completion.kind,insertText:i.completion.insertText,touch:this._seq++})}select(e,t,i){let{word:n}=e.getWordUntilPosition(t);if(!n)return super.select(e,t,i);let o=`${e.getLanguageIdentifier().language}/${n}`,r=this._trie.get(o);if(r||(r=this._trie.findSubstr(o)),r)for(let e=0;ee.push([i,t]))),e.sort(((e,t)=>-(e[1].touch-t[1].touch))).forEach(((e,t)=>e[1].touch=t)),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(const[t,i]of e)i.type="number"==typeof i.type?i.type:(0,_.jr)(i.type),this._trie.set(t,i)}}}],["recentlyUsed",class extends x{constructor(){super("recentlyUsed"),this._cache=new p.z6(300,.66),this._seq=0}memorize(e,t,i){const n=`${e.getLanguageIdentifier().language}/${i.textLabel}`;this._cache.set(n,{touch:this._seq++,type:i.completion.kind,insertText:i.completion.insertText})}select(e,t,i){if(0===i.length)return 0;const n=e.getLineContent(t.lineNumber).substr(t.column-10,t.column-1);if(/\s$/.test(n))return super.select(e,t,i);let o=i[0].score[0],r=-1,s=-1;for(let t=0;ts&&o.type===i[t].completion.kind&&o.insertText===i[t].completion.insertText&&(s=o.touch,r=t),i[t].completion.preselect)return t}return-1!==r?r:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();for(const[t,i]of e)i.touch=0,i.type="number"==typeof i.type?i.type:(0,_.jr)(i.type),this._cache.set(t,i);this._seq=this._cache.size}}],["first",k]]),D._storagePrefix="suggest/memories",D=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([S(0,m.Uy),S(1,C.h),S(2,y.Ui)],D);const L=(0,b.yh)("ISuggestMemories");(0,w.z)(L,D,!0);var N=i(3580),E=i(4565),A=i(8819),M=i(9989),I=i(9599);let T=class e{constructor(t,i){this._editor=t,this._index=0,this._ckOtherSuggestions=e.OtherSuggestions.bindTo(i)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),null===(e=this._listener)||void 0===e||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:t,index:i},n){0!==t.items.length&&e._moveIndex(!0,t,i)!==i?(this._acceptNext=n,this._model=t,this._index=i,this._listener=this._editor.onDidChangeCursorPosition((()=>{this._ignore||this.reset()})),this._ckOtherSuggestions.set(!0)):this.reset()}static _moveIndex(e,t,i){let n=i;for(;n=(n+t.items.length+(e?1:-1))%t.items.length,n!==i&&t.items[n].completion.additionalTextEdits;);return n}next(){this._move(!0)}prev(){this._move(!1)}_move(t){if(this._model)try{this._ignore=!0,this._index=e._moveIndex(t,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};var R,O;T.OtherSuggestions=new A.uy("hasOtherSuggestions",!1),T=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(R=1,O=A.i6,function(e,t){O(e,t,R)})],T);var F=i(4669),P=i(3860),B=i(5392),z=i(7295);class W{constructor(e,t,i,n,o,r,s){this.clipboardText=s,this._snippetCompareFn=W._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=n,this._options=o,this._refilterKind=1,this._lineContext=i,"top"===r?this._snippetCompareFn=W._compareCompletionItemsSnippetsUp:"bottom"===r&&(this._snippetCompareFn=W._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){this._lineContext.leadingLineContent===e.leadingLineContent&&this._lineContext.characterCountDelta===e.characterCountDelta||(this._refilterKind=this._lineContext.characterCountDelta2e3?B.EW:B.l7;for(let o=0;o=h)c.score=B.CL.Default;else if("string"==typeof c.completion.filterText){let t=l(n,r,e,c.completion.filterText,c.filterTextLow,0,!1);if(!t)continue;0===(0,z.zY)(c.completion.filterText,c.textLabel)?c.score=t:(c.score=(0,B.jB)(n,r,e,c.textLabel,c.labelLow,0),c.score[0]=t[0])}else{let t=l(n,r,e,c.textLabel,c.labelLow,0,!1);if(!t)continue;c.score=t}}c.idx=o,c.distance=this._wordDistance.distance(c.position,c.completion),a.push(c),e.push(c.textLabel.length)}this._filteredItems=a.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?(0,o.HW)(e.length-.85,e,((e,t)=>e-t)):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]t.distance?1:e.idxt.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return W._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return W._compareCompletionItems(e,t)}}var V=i(1050),H=i(469),$=i(689);class U{static create(e,t){return i=this,n=void 0,s=function*(){if(!t.getOption(104).localityBonus)return U.None;if(!t.hasModel())return U.None;const i=t.getModel(),n=t.getPosition();if(!e.canComputeWordRanges(i.uri))return U.None;const[r]=yield(new $.x).provideSelectionRanges(i,[n]);if(0===r.length)return U.None;const s=yield e.computeWordRanges(i.uri,r[0].range);if(!s)return U.None;const a=i.getWordUntilPosition(n);return delete s[a.word],new class extends U{distance(e,i){if(!n.equals(t.getPosition()))return 0;if(17===i.kind)return 2<<20;let a="string"==typeof i.label?i.label:i.label.name,l=s[a];if((0,o.XY)(l))return 2<<20;let c=(0,o.ry)(l,h.e.fromPositions(e),h.e.compareRangesUsingStarts),u=c>=0?l[c]:l[Math.max(0,~c-1)],d=r.length;for(const e of r){if(!h.e.containsRange(e.range,u))break;d-=1}return d}}},new((r=void 0)||(r=Promise))((function(e,t){function o(e){try{l(s.next(e))}catch(e){t(e)}}function a(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof r?i:new r((function(e){e(i)}))).then(o,a)}l((s=s.apply(i,n||[])).next())}));var i,n,r,s}}U.None=new class extends U{distance(){return 0}};var j=i(4972),q=i(829),K=i(3557),G=function(e,t){return function(i,n){t(i,n,e)}};class Y{constructor(e,t,i,n){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.auto=i,this.shy=n}static shouldAutoTrigger(e){if(!e.hasModel())return!1;const t=e.getModel(),i=e.getPosition();t.tokenizeIfCheap(i.lineNumber);const n=t.getWordAtPosition(i);return!!n&&n.endColumn===i.column&&!!isNaN(Number(n.word))}}let Z=class e{constructor(e,t,i,n,o){this._editor=e,this._editorWorkerService=t,this._clipboardService=i,this._telemetryService=n,this._logService=o,this._toDispose=new a.SL,this._quickSuggestDelay=10,this._triggerCharacterListener=new a.SL,this._triggerQuickSuggest=new v._F,this._state=0,this._completionDisposables=new a.SL,this._onDidCancel=new F.Q5,this._onDidTrigger=new F.Q5,this._onDidSuggest=new F.Q5,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new P.Y(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel((()=>{this._updateTriggerCharacters(),this.cancel()}))),this._toDispose.add(this._editor.onDidChangeModelLanguage((()=>{this._updateTriggerCharacters(),this.cancel()}))),this._toDispose.add(this._editor.onDidChangeConfiguration((()=>{this._updateTriggerCharacters(),this._updateQuickSuggest()}))),this._toDispose.add(_.KZ.onDidChange((()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()}))),this._toDispose.add(this._editor.onDidChangeCursorSelection((e=>{this._onCursorChange(e)})));let r=!1;this._toDispose.add(this._editor.onDidCompositionStart((()=>{r=!0}))),this._toDispose.add(this._editor.onDidCompositionEnd((()=>{r=!1,this._refilterCompletionItems()}))),this._toDispose.add(this._editor.onDidChangeModelContent((()=>{r||this._refilterCompletionItems()}))),this._updateTriggerCharacters(),this._updateQuickSuggest()}dispose(){(0,a.B9)(this._triggerCharacterListener),(0,a.B9)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateQuickSuggest(){this._quickSuggestDelay=this._editor.getOption(77),(isNaN(this._quickSuggestDelay)||!this._quickSuggestDelay&&0!==this._quickSuggestDelay||this._quickSuggestDelay<0)&&(this._quickSuggestDelay=10)}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(78)||!this._editor.hasModel()||!this._editor.getOption(107))return;const e=new Map;for(const t of _.KZ.all(this._editor.getModel()))for(const i of t.triggerCharacters||[]){let n=e.get(i);n||(n=new Set,n.add((0,I.ZJ)()),e.set(i,n)),n.add(t)}const t=t=>{if(!t){const e=this._editor.getPosition();t=this._editor.getModel().getLineContent(e.lineNumber).substr(0,e.column-1)}let i="";(0,z.YK)(t.charCodeAt(t.length-1))?(0,z.ZG)(t.charCodeAt(t.length-2))&&(i=t.substr(t.length-2)):i=t.charAt(t.length-1);const n=e.get(i);if(n){const e=this._completionModel?{items:this._completionModel.adopt(n),clipboardText:this._completionModel.clipboardText}:void 0;this.trigger({auto:!0,shy:!1,triggerCharacter:i},Boolean(this._completionModel),n,e)}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(t))}get state(){return this._state}cancel(e=!1){var t;0!==this._state&&(this._triggerQuickSuggest.cancel(),null===(t=this._requestToken)||void 0===t||t.cancel(),this._requestToken=void 0,this._state=0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){0!==this._state&&(this._editor.hasModel()&&_.KZ.has(this._editor.getModel())?this.trigger({auto:2===this._state,shy:!1},!0):this.cancel())}_onCursorChange(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||0!==e.reason&&3!==e.reason||"keyboard"!==e.source&&"deleteLeft"!==e.source)this.cancel();else if(_.KZ.has(t))if(0===this._state&&0===e.reason){if(!1===this._editor.getOption(76))return;if(!i.containsRange(this._currentSelection)&&!i.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))return;if(this._editor.getOption(104).snippetsPreventQuickSuggestions&&g.SnippetController2.get(this._editor).isInSnippet())return;this.cancel(),this._triggerQuickSuggest.cancelAndSet((()=>{if(0!==this._state)return;if(!Y.shouldAutoTrigger(this._editor))return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getPosition(),i=this._editor.getOption(76);if(!1!==i){if(!0===i);else{e.tokenizeIfCheap(t.lineNumber);const n=e.getLineTokens(t.lineNumber),o=n.getStandardTokenType(n.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(!(i.other&&0===o||i.comments&&1===o||i.strings&&2===o))return}this.trigger({auto:!0,shy:!1})}}),this._quickSuggestDelay)}else 0!==this._state&&3===e.reason&&this._refilterCompletionItems()}_refilterCompletionItems(){Promise.resolve().then((()=>{if(0===this._state)return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getPosition(),i=new Y(e,t,2===this._state,!1);this._onNewContext(i)}))}trigger(t,i=!1,n,o){var s;if(!this._editor.hasModel())return;const a=this._editor.getModel(),l=t.auto,c=new Y(a,this._editor.getPosition(),l,t.shy);this.cancel(i),this._state=l?2:1,this._onDidTrigger.fire({auto:l,shy:t.shy,position:this._editor.getPosition()}),this._context=c;let u={triggerKind:null!==(s=t.triggerKind)&&void 0!==s?s:0};t.triggerCharacter&&(u={triggerKind:1,triggerCharacter:t.triggerCharacter}),this._requestToken=new V.A;const h=this._editor.getOption(99);let d=1;switch(h){case"top":d=0;break;case"bottom":d=2}const{itemKind:g,showDeprecated:f}=e._createSuggestFilter(this._editor),p=U.create(this._editorWorkerService,this._editor),m=(0,I.kL)(a,this._editor.getPosition(),new I.A9(d,g,n,f),u,this._requestToken.token);Promise.all([m,p]).then((([e,i])=>{return n=this,r=void 0,a=function*(){var n;if(null===(n=this._requestToken)||void 0===n||n.dispose(),!this._editor.hasModel())return;let r=null==o?void 0:o.clipboardText;if(!r&&e.needsClipboard&&(r=yield this._clipboardService.readText()),0===this._state)return;const s=this._editor.getModel();let a=e.items;if(o){const e=(0,I.wg)(d);a=a.concat(o.items).sort(e)}const c=new Y(s,this._editor.getPosition(),l,t.shy);this._completionModel=new W(a,this._context.column,{leadingLineContent:c.leadingLineContent,characterCountDelta:c.column-this._context.column},i,this._editor.getOption(104),this._editor.getOption(99),r),this._completionDisposables.add(e.disposable),this._onNewContext(c),this._reportDurationsTelemetry(e.durations)},new((s=void 0)||(s=Promise))((function(e,t){function i(e){try{l(a.next(e))}catch(e){t(e)}}function o(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof s?n:new s((function(e){e(n)}))).then(i,o)}l((a=a.apply(n,r||[])).next())}));var n,r,s,a})).catch(r.dL)}_reportDurationsTelemetry(e){this._telemetryGate++%230==0&&setTimeout((()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)}))}static _createSuggestFilter(e){const t=new Set;"none"===e.getOption(99)&&t.add(27);const i=e.getOption(104);return i.showMethods||t.add(0),i.showFunctions||t.add(1),i.showConstructors||t.add(2),i.showFields||t.add(3),i.showVariables||t.add(4),i.showClasses||t.add(5),i.showStructs||t.add(6),i.showInterfaces||t.add(7),i.showModules||t.add(8),i.showProperties||t.add(9),i.showEvents||t.add(10),i.showOperators||t.add(11),i.showUnits||t.add(12),i.showValues||t.add(13),i.showConstants||t.add(14),i.showEnums||t.add(15),i.showEnumMembers||t.add(16),i.showKeywords||t.add(17),i.showWords||t.add(18),i.showColors||t.add(19),i.showFiles||t.add(20),i.showReferences||t.add(21),i.showColors||t.add(22),i.showFolders||t.add(23),i.showTypeParameters||t.add(24),i.showSnippets||t.add(27),i.showUsers||t.add(25),i.showIssues||t.add(26),{itemKind:t,showDeprecated:i.showDeprecated}}_onNewContext(e){if(this._context)if(e.lineNumber===this._context.lineNumber)if((0,z.V8)(e.leadingLineContent)===(0,z.V8)(this._context.leadingLineContent)){if(e.columnthis._context.leadingWord.startColumn){const e=new Set(_.KZ.all(this._editor.getModel()));for(let t of this._completionModel.allProvider)e.delete(t);const t=this._completionModel.adopt(new Set);this.trigger({auto:this._context.auto,shy:!1},!0,e,{items:t,clipboardText:this._completionModel.clipboardText})}else if(e.column>this._context.column&&this._completionModel.incomplete.size>0&&0!==e.leadingWord.word.length){const{incomplete:e}=this._completionModel,t=this._completionModel.adopt(e);this.trigger({auto:2===this._state,shy:!1,triggerKind:2},!0,e,{items:t,clipboardText:this._completionModel.clipboardText})}else{let t=this._completionModel.lineContext,i=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},0===this._completionModel.items.length){if(Y.shouldAutoTrigger(this._editor)&&this._context.leadingWord.endColumn0,i&&0===e.leadingWord.word.length)return void this.cancel()}this._onDidSuggest.fire({completionModel:this._completionModel,auto:this._context.auto,shy:this._context.shy,isFrozen:i})}}else this.cancel();else this.cancel()}};Z=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([G(1,H.p),G(2,j.p),G(3,q.b),G(4,K.VZ)],Z),i(8609),i(4954);var X=i(5321),Q=i(3799),J=i(8810),ee=i(7781),te=i(3910),ie=i(9802),ne=i(3947),oe=i(9365),re=i(3046),se=i(3098);class ae{constructor(){let e;this._onDidWillResize=new F.Q5,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new F.Q5,this.onDidResize=this._onDidResize.event,this._sashListener=new a.SL,this._size=new X.Ro(0,0),this._minSize=new X.Ro(0,0),this._maxSize=new X.Ro(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new se.g(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new se.g(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new se.g(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:se.l.North}),this._southSash=new se.g(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:se.l.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let t=0,i=0;this._sashListener.add(F.ju.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)((()=>{void 0===e&&(this._onDidWillResize.fire(),e=this._size,t=0,i=0)}))),this._sashListener.add(F.ju.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)((()=>{void 0!==e&&(e=void 0,t=0,i=0,this._onDidResize.fire({dimension:this._size,done:!0}))}))),this._sashListener.add(this._eastSash.onDidChange((n=>{e&&(i=n.currentX-n.startX,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))}))),this._sashListener.add(this._westSash.onDidChange((n=>{e&&(i=-(n.currentX-n.startX),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))}))),this._sashListener.add(this._northSash.onDidChange((n=>{e&&(t=-(n.currentY-n.startY),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))}))),this._sashListener.add(this._southSash.onDidChange((n=>{e&&(t=n.currentY-n.startY,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))}))),this._sashListener.add(F.ju.any(this._eastSash.onDidReset,this._westSash.onDidReset)((e=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))),this._sashListener.add(F.ju.any(this._northSash.onDidReset,this._southSash.onDidReset)((e=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))})))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,i,n){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=i?3:0,this._westSash.state=n?3:0}layout(e=this.size.height,t=this.size.width){const{height:i,width:n}=this._minSize,{height:o,width:r}=this._maxSize;e=Math.max(i,Math.min(o,e)),t=Math.max(n,Math.min(r,t));const s=new X.Ro(t,e);X.Ro.equals(s,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=s,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}function le(e){return!!e&&Boolean(e.completion.documentation||e.completion.detail&&e.completion.detail!==e.completion.label)}let ce=class{constructor(e,t){this._editor=e,this._onDidClose=new F.Q5,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new F.Q5,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new a.SL,this._renderDisposeable=new a.SL,this._borderWidth=1,this._size=new X.Ro(330,0),this.domNode=X.$(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(ne.$,{editor:e}),this._body=X.$(".body"),this._scrollbar=new ie.s$(this._body,{}),X.R3(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=X.R3(this._body,X.$(".header")),this._close=X.R3(this._header,X.$("span"+re.lA.close.cssSelector)),this._close.title=N.N("details.close","Close"),this._type=X.R3(this._header,X.$("p.type")),this._docs=X.R3(this._body,X.$("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(40)&&this._configureFont()})))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const e=this._editor.getOptions(),t=e.get(40),i=t.fontFamily,n=e.get(105)||t.fontSize,o=e.get(106)||t.lineHeight,r=t.fontWeight,s=`${n}px`,a=`${o}px`;this.domNode.style.fontSize=s,this.domNode.style.lineHeight=a,this.domNode.style.fontWeight=r,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=i,this._close.style.height=a,this._close.style.width=a}getLayoutInfo(){const e=this._editor.getOption(106)||this._editor.getOption(40).lineHeight,t=this._borderWidth;return{lineHeight:e,borderWidth:t,borderHeight:2*t,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=N.N("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,2*this.getLayoutInfo().lineHeight),this._onDidChangeContents.fire(this)}renderItem(e,t){var i,n;this._renderDisposeable.clear();let{detail:o,documentation:r}=e.completion;if(t){let t="";t+=`score: ${e.score[0]}\n`,t+=`prefix: ${null!==(i=e.word)&&void 0!==i?i:"(no prefix)"}\n`,t+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel}\n`,t+=`distance: ${e.distance} (localityBonus-setting)\n`,t+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"}\n`,t+=`commit_chars: ${null===(n=e.completion.commitCharacters)||void 0===n?void 0:n.join("")}\n`,r=(new oe.W5).appendCodeblock("empty",t),o=`Provider: ${e.provider._debugDisplayName}`}if(t||le(e)){if(this.domNode.classList.remove("no-docs","no-type"),o){const e=o.length>1e5?`${o.substr(0,1e5)}…`:o;this._type.textContent=e,this._type.title=e,X.$Z(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gim.test(e))}else X.PO(this._type),this._type.title="",X.Cp(this._type),this.domNode.classList.add("no-type");if(X.PO(this._docs),"string"==typeof r)this._docs.classList.remove("markdown-docs"),this._docs.textContent=r;else if(r){this._docs.classList.add("markdown-docs"),X.PO(this._docs);const e=this._markdownRenderer.render(r);this._docs.appendChild(e.element),this._renderDisposeable.add(e),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync((()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)})))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=e=>{e.preventDefault(),e.stopPropagation()},this._close.onclick=e=>{e.preventDefault(),e.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}else this.clearContents()}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(e,t){const i=new X.Ro(e,t);X.Ro.equals(i,this._size)||(this._size=i,X.dp(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};ce=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([function(e,t){return function(i,n){t(i,n,e)}}(1,b.TG)],ce);class ue{constructor(e,t){let i,n;this.widget=e,this._editor=t,this._disposables=new a.SL,this._added=!1,this._resizable=new ae,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let o=0,r=0;this._disposables.add(this._resizable.onDidWillResize((()=>{i=this._topLeft,n=this._resizable.size}))),this._disposables.add(this._resizable.onDidResize((e=>{if(i&&n){this.widget.layout(e.dimension.width,e.dimension.height);let t=!1;e.west&&(r=n.width-e.dimension.width,t=!0),e.north&&(o=n.height-e.dimension.height,t=!0),t&&this._applyTopLeft({top:i.top+o,left:i.left+r})}e.done&&(i=void 0,n=void 0,o=0,r=0,this._userSize=e.dimension)}))),this._disposables.add(this.widget.onDidChangeContents((()=>{var e;this._anchorBox&&this._placeAtAnchor(this._anchorBox,null!==(e=this._userSize)&&void 0!==e?e:this.widget.size)})))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e){var t;const i=X.i(e);this._anchorBox=i,this._placeAtAnchor(this._anchorBox,null!==(t=this._userSize)&&void 0!==t?t:this.widget.size)}_placeAtAnchor(e,t){const i=X.D6(document.body),n=this.widget.getLayoutInfo();let o,r,s,a,l=new X.Ro(220,2*n.lineHeight),c=0,u=e.top,h=e.top+e.height-n.borderHeight,d=i.width-(e.left+e.width+n.borderWidth+n.horizontalPadding);c=-n.borderWidth+e.left+e.width,a=!0,o=new X.Ro(d,i.height-e.top-n.borderHeight-n.verticalPadding),r=o.with(void 0,e.top+e.height-n.borderHeight-n.verticalPadding),t.width>d&&(e.left>d&&(d=e.left-n.borderWidth-n.horizontalPadding,a=!1,c=Math.max(n.horizontalPadding,e.left-t.width-n.borderWidth),o=o.with(d),r=o.with(void 0,r.height)),e.width>1.3*d&&i.height-(e.top+e.height)>e.height&&(d=e.width,c=e.left,u=-n.borderWidth+e.top+e.height,o=new X.Ro(e.width-n.borderHeight,i.height-e.top-e.height-n.verticalPadding),r=o.with(void 0,e.top-n.verticalPadding),l=l.with(o.width)));let g,f=t.height,p=Math.max(o.height,r.height);f>p&&(f=p),f<=o.height?(s=!0,g=o):(s=!1,g=r),this._applyTopLeft({left:c,top:s?u:h-f}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!s,a,s,!a),this._resizable.minSize=l,this._resizable.maxSize=g,this._resizable.layout(f,Math.min(g.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}var he=i(317),de=i(8335),ge=i(4144),fe=function(e,t){return function(i,n){t(i,n,e)}};class pe extends de.Mm{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id);if(!e)return super.updateLabel();this.label&&(this.label.textContent=(0,N.N)("ddd","{0} ({1})",this._action.label,pe.symbolPrintEnter(e)))}static symbolPrintEnter(e){var t;return null===(t=e.getLabel())||void 0===t?void 0:t.replace(/\benter\b/gi,"⏎")}}let me=class{constructor(e,t,i,n){this._menuService=i,this._contextKeyService=n,this._menuDisposables=new a.SL,this.element=X.R3(e,X.$(".suggest-status-bar"));const o=e=>e instanceof ge.U8?t.createInstance(pe,e):void 0;this._leftActions=new he.o(this.element,{actionViewItemProvider:o}),this._rightActions=new he.o(this.element,{actionViewItemProvider:o}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this.element.remove()}show(){const e=this._menuService.createMenu(I.GI,this._contextKeyService),t=()=>{const t=[],i=[];for(let[n,o]of e.getActions())"left"===n?t.push(...o):i.push(...o);this._leftActions.clear(),this._leftActions.push(t),this._rightActions.clear(),this._rightActions.push(i)};this._menuDisposables.add(e.onDidChange((()=>t()))),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};me=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([fe(1,b.TG),fe(2,ge.co),fe(3,A.i6)],me);var _e,ve=i(8801),be=i(6663),ye=i(5935),we=i(1144);function Ce(e,t,i,n){const o=n===_e.ROOT_FOLDER?["rootfolder-icon"]:n===_e.FOLDER?["folder-icon"]:["file-icon"];if(i){let r;if(r=i.scheme===be.lg.data?ye.Vb.parseMetaData(i).get(ye.Vb.META_DATA_LABEL):Se((0,ye.Hx)(i).toLowerCase()),n===_e.FOLDER)o.push(`${r}-name-folder-icon`);else{if(r){if(o.push(`${r}-name-file-icon`),r.length<=255){const e=r.split(".");for(let t=1;t{const e=this._editor.getOptions(),i=e.get(40),o=i.fontFamily,r=i.fontFeatureSettings,s=e.get(105)||i.fontSize,a=e.get(106)||i.lineHeight,l=i.fontWeight,c=`${s}px`,u=`${a}px`;t.root.style.fontSize=c,t.root.style.fontWeight=l,n.style.fontFamily=o,n.style.fontFeatureSettings=r,n.style.lineHeight=u,t.icon.style.height=u,t.icon.style.width=u,t.readMore.style.height=u,t.readMore.style.width=u};return o(),t.disposables.add(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(40)||e.hasChanged(105)||e.hasChanged(106))&&o()}))),t}renderElement(e,t,i){var n,r,s;const{completion:a}=e;i.root.id=Ne(t),i.colorspan.style.backgroundColor="";const l={labelEscapeNewLines:!0,matches:(0,B.mB)(e.score)};let c=[];if(19===a.kind&&Ae.extract(e,c))i.icon.className="icon customcolor",i.iconContainer.className="icon hide",i.colorspan.style.backgroundColor=c[0];else if(20===a.kind&&this._themeService.getFileIconTheme().hasFileIcons){i.icon.className="icon hide",i.iconContainer.className="icon hide";const t=Ce(this._modelService,this._modeService,De.o.from({scheme:"fake",path:e.textLabel}),_e.FILE),n=Ce(this._modelService,this._modeService,De.o.from({scheme:"fake",path:a.detail}),_e.FILE);l.extraClasses=t.length>n.length?t:n}else 23===a.kind&&this._themeService.getFileIconTheme().hasFolderIcons?(i.icon.className="icon hide",i.iconContainer.className="icon hide",l.extraClasses=(0,o.xH)([Ce(this._modelService,this._modeService,De.o.from({scheme:"fake",path:e.textLabel}),_e.FOLDER),Ce(this._modelService,this._modeService,De.o.from({scheme:"fake",path:a.detail}),_e.FOLDER)])):(i.icon.className="icon hide",i.iconContainer.className="",i.iconContainer.classList.add("suggest-icon",...(0,_.Sy)(a.kind).split(" ")));a.tags&&a.tags.indexOf(1)>=0&&(l.extraClasses=(l.extraClasses||[]).concat(["deprecated"]),l.matches=[]),i.iconLabel.setLabel(e.textLabel,void 0,l),"string"==typeof a.label?(i.parametersLabel.textContent="",i.qualifierLabel.textContent="",i.detailsLabel.textContent=Ie(a.detail||""),i.root.classList.add("string-label"),i.root.title=""):(i.parametersLabel.textContent=Ie(a.label.parameters||""),i.qualifierLabel.textContent=Ie(a.label.qualifier||""),i.detailsLabel.textContent=Ie(a.label.type||""),i.root.classList.remove("string-label"),i.root.title=`${e.textLabel}${null!==(n=a.label.parameters)&&void 0!==n?n:""} ${null!==(r=a.label.qualifier)&&void 0!==r?r:""} ${null!==(s=a.label.type)&&void 0!==s?s:""}`),this._editor.getOption(104).showInlineDetails?(0,X.$Z)(i.detailsLabel):(0,X.Cp)(i.detailsLabel),le(e)?(i.right.classList.add("can-expand-details"),(0,X.$Z)(i.readMore),i.readMore.onmousedown=e=>{e.stopPropagation(),e.preventDefault()},i.readMore.onclick=e=>{e.stopPropagation(),e.preventDefault(),this._onDidToggleDetails.fire()}):(i.right.classList.remove("can-expand-details"),(0,X.Cp)(i.readMore),i.readMore.onmousedown=null,i.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};function Ie(e){return e.replace(/\r\n|\r|\n/g,"")}Me=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([Le(1,ke.q),Le(2,C.h),Le(3,ee.XE)],Me);var Te=i(4527),Re=i(9870),Oe=function(e,t){return function(i,n){t(i,n,e)}};const Fe=(0,te.P6)("editorSuggestWidget.background",{dark:te.D0,light:te.D0,hc:te.D0},N.N("editorSuggestWidgetBackground","Background color of the suggest widget.")),Pe=(0,te.P6)("editorSuggestWidget.border",{dark:te.D1,light:te.D1,hc:te.D1},N.N("editorSuggestWidgetBorder","Border color of the suggest widget.")),Be=(0,te.P6)("editorSuggestWidget.foreground",{dark:te.NO,light:te.NO,hc:te.NO},N.N("editorSuggestWidgetForeground","Foreground color of the suggest widget.")),ze=(0,te.P6)("editorSuggestWidget.selectedForeground",{dark:te.NP,light:te.NP,hc:te.NP},N.N("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget.")),We=(0,te.P6)("editorSuggestWidget.selectedBackground",{dark:te.Vq,light:te.Vq,hc:te.Vq},N.N("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget.")),Ve=(0,te.P6)("editorSuggestWidget.highlightForeground",{dark:te.Gw,light:te.Gw,hc:te.Gw},N.N("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget.")),He=(0,te.P6)("editorSuggestWidget.focusHighlightForeground",{dark:te.PX,light:te.PX,hc:te.PX},N.N("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused."));class $e{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof Te.H}`}restore(){var e;const t=null!==(e=this._service.get(this._key,0))&&void 0!==e?e:"";try{const e=JSON.parse(t);if(X.Ro.is(e))return X.Ro.lift(e)}catch(e){}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}let Ue=class e{constructor(e,t,i,n,o){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new v._F,this._disposables=new a.SL,this._onDidSelect=new F.Q5,this._onDidFocus=new F.Q5,this._onDidHide=new F.Q5,this._onDidShow=new F.Q5,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new F.Q5,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new ae,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new je(this,e),this._persistedSize=new $e(t,e);class r{constructor(e,t,i=!1,n=!1){this.persistedSize=e,this.currentSize=t,this.persistHeight=i,this.persistWidth=n}}let s;this._disposables.add(this.element.onDidWillResize((()=>{this._contentWidget.lockPreference(),s=new r(this._persistedSize.restore(),this.element.size)}))),this._disposables.add(this.element.onDidResize((e=>{var t,i,n,o;if(this._resize(e.dimension.width,e.dimension.height),s&&(s.persistHeight=s.persistHeight||!!e.north||!!e.south,s.persistWidth=s.persistWidth||!!e.east||!!e.west),e.done){if(s){const{itemHeight:e,defaultSize:r}=this.getLayoutInfo(),a=Math.round(e/2);let{width:l,height:c}=this.element.size;(!s.persistHeight||Math.abs(s.currentSize.height-c)<=a)&&(c=null!==(i=null===(t=s.persistedSize)||void 0===t?void 0:t.height)&&void 0!==i?i:r.height),(!s.persistWidth||Math.abs(s.currentSize.width-l)<=a)&&(l=null!==(o=null===(n=s.persistedSize)||void 0===n?void 0:n.width)&&void 0!==o?o:r.width),this._persistedSize.store(new X.Ro(l,c))}this._contentWidget.unlockPreference(),s=void 0}}))),this._messageElement=X.R3(this.element.domNode,X.$(".message")),this._listElement=X.R3(this.element.domNode,X.$(".tree"));const l=o.createInstance(ce,this.editor);l.onDidClose(this.toggleDetails,this,this._disposables),this._details=new ue(l,this.editor);const c=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(104).showIcons);c();const u=o.createInstance(Me,this.editor);this._disposables.add(u),this._disposables.add(u.onDidToggleDetails((()=>this.toggleDetails()))),this._list=new Q.aV("SuggestWidget",this._listElement,{getHeight:e=>this.getLayoutInfo().itemHeight,getTemplateId:e=>"suggestion"},[u],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,accessibilityProvider:{getRole:()=>"option",getAriaLabel:e=>{if(e.isResolved&&this._isDetailsVisible()){const{documentation:t,detail:i}=e.completion,n=z.WU("{0}{1}",i||"",t?"string"==typeof t?t:t.value:"");return N.N("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",e.textLabel,n)}return e.textLabel},getWidgetAriaLabel:()=>N.N("suggest","Suggest"),getWidgetRole:()=>"listbox"}}),this._status=o.createInstance(me,this.element.domNode);const h=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(104).showStatusBar);h(),this._disposables.add((0,J.Jl)(this._list,n,{listInactiveFocusBackground:We,listInactiveFocusOutline:te.xL})),this._disposables.add(n.onDidColorThemeChange((e=>this._onThemeChange(e)))),this._onThemeChange(n.getColorTheme()),this._disposables.add(this._list.onMouseDown((e=>this._onListMouseDownOrTap(e)))),this._disposables.add(this._list.onTap((e=>this._onListMouseDownOrTap(e)))),this._disposables.add(this._list.onDidChangeSelection((e=>this._onListSelection(e)))),this._disposables.add(this._list.onDidChangeFocus((e=>this._onListFocus(e)))),this._disposables.add(this.editor.onDidChangeCursorSelection((()=>this._onCursorSelectionChanged()))),this._disposables.add(this.editor.onDidChangeConfiguration((e=>{e.hasChanged(104)&&(h(),c())}))),this._ctxSuggestWidgetVisible=I._y.Visible.bindTo(i),this._ctxSuggestWidgetDetailsVisible=I._y.DetailsVisible.bindTo(i),this._ctxSuggestWidgetMultipleSuggestions=I._y.MultipleSuggestions.bindTo(i),this._disposables.add(X.mu(this._details.widget.domNode,"keydown",(e=>{this._onDetailsKeydown.fire(e)}))),this._disposables.add(this.editor.onMouseDown((e=>this._onEditorMouseDown(e))))}dispose(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),null===(e=this._loadingTimeout)||void 0===e||e.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){0!==this._state&&this._contentWidget.layout()}_onListMouseDownOrTap(e){void 0!==e.element&&void 0!==e.index&&(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,t){const i=this._completionModel;i&&(this._onDidSelect.fire({item:e,index:t,model:i}),this.editor.focus())}_onThemeChange(e){const t=e.getColor(Fe);t&&(this.element.domNode.style.backgroundColor=t.toString(),this._messageElement.style.backgroundColor=t.toString(),this._details.widget.domNode.style.backgroundColor=t.toString());const i=e.getColor(Pe);i&&(this.element.domNode.style.borderColor=i.toString(),this._messageElement.style.borderColor=i.toString(),this._status.element.style.borderTopColor=i.toString(),this._details.widget.domNode.style.borderColor=i.toString(),this._detailsBorderColor=i.toString());const n=e.getColor(te.R8);n&&(this._detailsFocusBorderColor=n.toString()),this._details.widget.borderWidth="hc"===e.type?2:1}_onListFocus(e){var t;if(this._ignoreFocusEvents)return;if(!e.elements.length)return this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),void this.editor.setAriaOptions({activeDescendant:void 0});if(!this._completionModel)return;const i=e.elements[0],n=e.indexes[0];i!==this._focusedItem&&(null===(t=this._currentSuggestionDetails)||void 0===t||t.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=i,this._list.reveal(n),this._currentSuggestionDetails=(0,v.PG)((e=>{return t=this,n=void 0,r=function*(){const t=(0,v.Vg)((()=>{this._isDetailsVisible()&&this.showDetails(!0)}),250);e.onCancellationRequested((()=>t.dispose()));const n=yield i.resolve(e);return t.dispose(),n},new((o=void 0)||(o=Promise))((function(e,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(s,a)}l((r=r.apply(t,n||[])).next())}));var t,n,o,r})),this._currentSuggestionDetails.then((()=>{n>=this._list.length||i!==this._list.element(n)||(this._ignoreFocusEvents=!0,this._list.splice(n,1,[i]),this._list.setFocus([n]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:Ne(n)}))})).catch(r.dL)),this._onDidFocus.fire({item:i,index:n,model:this._completionModel})}_setState(t){if(this._state!==t)switch(this._state=t,this.element.domNode.classList.toggle("frozen",4===t),this.element.domNode.classList.remove("message"),t){case 0:X.Cp(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=e.LOADING_MESSAGE,X.Cp(this._listElement,this._status.element),X.$Z(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=e.NO_SUGGESTIONS_MESSAGE,X.Cp(this._listElement,this._status.element),X.$Z(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 3:case 4:X.Cp(this._messageElement),X.$Z(this._listElement,this._status.element),this._show();break;case 5:X.Cp(this._messageElement),X.$Z(this._listElement,this._status.element),this._details.show(),this._show()}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet((()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)}),100)}showTriggered(e,t){0===this._state&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=(0,v.Vg)((()=>this._setState(1)),t)))}showSuggestions(e,t,i,n){var o,r;if(this._contentWidget.setPosition(this.editor.getPosition()),null===(o=this._loadingTimeout)||void 0===o||o.dispose(),null===(r=this._currentSuggestionDetails)||void 0===r||r.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),i&&2!==this._state&&0!==this._state)return void this._setState(4);const s=this._completionModel.items.length,a=0===s;if(this._ctxSuggestWidgetMultipleSuggestions.set(s>1),a)return this._setState(n?0:2),void(this._completionModel=void 0);this._focusedItem=void 0,this._list.splice(0,this._list.length,this._completionModel.items),this._setState(i?4:3),this._list.reveal(t,0),this._list.setFocus([t]),this._layout(this.element.size),this._detailsBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsBorderColor)}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(0!==this._state&&2!==this._state&&1!==this._state&&this._completionModel)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){5===this._state?(this._setState(3),this._detailsBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsBorderColor)):3===this._state&&this._isDetailsVisible()&&(this._setState(5),this._detailsFocusBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsFocusBorderColor))}toggleDetails(){this._isDetailsVisible()?(this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):!le(this._list.getFocusedElements()[0])&&!this._explainMode||3!==this._state&&5!==this._state&&4!==this._state||(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var e;null===(e=this._loadingTimeout)||void 0===e||e.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const t=this._persistedSize.restore(),i=Math.ceil(4.3*this.getLayoutInfo().itemHeight);t&&t.heightl&&(a=l);const c=this._completionModel?this._completionModel.stats.pLabelLen*r.typicalHalfwidthCharacterWidth:a,u=r.statusBarHeight+this._list.contentHeight+r.borderHeight,h=r.itemHeight+r.statusBarHeight,d=X.i(this.editor.getDomNode()),g=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),f=d.top+g.top+g.height,p=Math.min(o.height-f-r.verticalPadding,u),m=Math.min(d.top+g.top-r.verticalPadding,u);let _=Math.min(Math.max(m,p)+r.borderHeight,u);s===(null===(t=this._cappedHeight)||void 0===t?void 0:t.capped)&&(s=this._cappedHeight.wanted),s_&&(s=_),s>p||this._forceRenderingAbove?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),_=m):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),_=p),this.element.preferredSize=new X.Ro(c,r.defaultSize.height),this.element.maxSize=new X.Ro(l,_),this.element.minSize=new X.Ro(220,h),this._cappedHeight=s===u?{wanted:null!==(n=null===(i=this._cappedHeight)||void 0===i?void 0:i.wanted)&&void 0!==n?n:e.height,capped:s}:void 0}this._resize(a,s)}_resize(e,t){const{width:i,height:n}=this.element.maxSize;e=Math.min(i,e),t=Math.min(n,t);const{statusBarHeight:o}=this.getLayoutInfo();this._list.layout(t-o,e),this._listElement.style.height=t-o+"px",this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode)}getLayoutInfo(){const e=this.editor.getOption(40),t=(0,Re.u)(this.editor.getOption(106)||e.lineHeight,8,1e3),i=this.editor.getOption(104).showStatusBar&&2!==this._state&&1!==this._state?t:0,n=this._details.widget.borderWidth,o=2*n;return{itemHeight:t,statusBarHeight:i,borderWidth:n,borderHeight:o,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new X.Ro(430,i+12*t+o)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};Ue.LOADING_MESSAGE=N.N("suggestWidget.loading","Loading..."),Ue.NO_SUGGESTIONS_MESSAGE=N.N("suggestWidget.noSuggestions","No suggestions."),Ue=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([Oe(1,m.Uy),Oe(2,A.i6),Oe(3,ee.XE),Oe(4,b.TG)],Ue);class je{constructor(e,t){this._widget=e,this._editor=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return!this._hidden&&this._position&&this._preference?{position:this._position,preference:[this._preference]}:null}beforeRender(){const{height:e,width:t}=this._widget.element.size,{borderWidth:i,horizontalPadding:n}=this._widget.getLayoutInfo();return new X.Ro(t+2*i+n,e+2*i)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}(0,ee.Ic)(((e,t)=>{const i=e.getColor(Ve);i&&t.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { color: ${i}; }`);const n=e.getColor(He);i&&t.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .monaco-highlighted-label .highlight { color: ${n}; }`);const o=e.getColor(Be);o&&t.addRule(`.monaco-editor .suggest-widget, .monaco-editor .suggest-details { color: ${o}; }`);const r=e.getColor(ze);r&&t.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused { color: ${r}; }`);const s=e.getColor(te.ur);s&&t.addRule(`.monaco-editor .suggest-details a { color: ${s}; }`);const a=e.getColor(te.Sw);a&&t.addRule(`.monaco-editor .suggest-details code { background-color: ${a}; }`)}));let qe=class e{constructor(t,i){this._editor=t,this._enabled=!1,this._ckAtEnd=e.AtEnd.bindTo(i),this._configListener=this._editor.onDidChangeConfiguration((e=>e.hasChanged(109)&&this._update())),this._update()}dispose(){var e;this._configListener.dispose(),null===(e=this._selectionListener)||void 0===e||e.dispose(),this._ckAtEnd.reset()}_update(){const e="on"===this._editor.getOption(109);if(this._enabled!==e)if(this._enabled=e,this._enabled){const e=()=>{if(!this._editor.hasModel())return void this._ckAtEnd.set(!1);const e=this._editor.getModel(),t=this._editor.getSelection(),i=e.getWordAtPosition(t.getStartPosition());i?this._ckAtEnd.set(i.endColumn===t.getStartPosition().column):this._ckAtEnd.set(!1)};this._selectionListener=this._editor.onDidChangeCursorSelection(e),e()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};qe.AtEnd=new A.uy("atEndOfWord",!1),qe=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([function(e,t){return function(i,n){t(i,n,e)}}(1,A.i6)],qe);var Ke=i(8401),Ge=i(4906);class Ye{constructor(e,t,i){this._disposables=new a.SL,this._disposables.add(t.onDidShow((()=>this._onItem(t.getFocusedItem())))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType((n=>{if(this._active&&!t.isFrozen()){const t=n.charCodeAt(n.length-1);this._active.acceptCharacters.has(t)&&e.getOption(0)&&i(this._active.item)}})))}_onItem(e){if(!e||!(0,o.Of)(e.item.completion.commitCharacters))return void this.reset();if(this._active&&this._active.item.item===e.item)return;const t=new Ge.q;for(const i of e.item.completion.commitCharacters)i.length>0&&t.add(i.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}class Ze{constructor(e,t){this._disposables=new a.SL,this._lastOvertyped=[],this._empty=!0,this._disposables.add(e.onWillType((()=>{if(!this._empty)return;if(!e.hasModel())return;const t=e.getSelections(),i=t.length;let n=!1;for(let e=0;eZe._maxSelectionLength)return;this._lastOvertyped[e]={value:o.getValueInRange(i),multiline:i.startLineNumber!==i.endLineNumber}}this._empty=!1}))),this._disposables.add(t.onDidCancel((e=>{this._empty||e.retrigger||(this._empty=!0)})))}getLastOvertypedInfo(e){if(!this._empty&&e>=0&&el.set(e.getOption(104).insertMode))),this.widget=this._toDispose.add(new v.Ue((()=>{const e=this._instantiationService.createInstance(Ue,this.editor);this._toDispose.add(e),this._toDispose.add(e.onDidSelect((e=>this._insertSuggestion(e,0)),this));const t=new Ye(this.editor,e,(e=>this._insertSuggestion(e,2)));this._toDispose.add(t),this._toDispose.add(this.model.onDidSuggest((e=>{0===e.completionModel.items.length&&t.reset()})));const i=I._y.MakesTextEdit.bindTo(this._contextKeyService),n=I._y.HasInsertAndReplaceRange.bindTo(this._contextKeyService),o=I._y.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add((0,a.OF)((()=>{i.reset(),n.reset(),o.reset()}))),this._toDispose.add(e.onDidFocus((({item:e})=>{const t=this.editor.getPosition(),r=e.editStart.column,s=t.column;let a=!0;"smart"!==this.editor.getOption(1)||2!==this.model.state||e.completion.command||e.completion.additionalTextEdits||4&e.completion.insertTextRules||s-r!==e.completion.insertText.length||(a=this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:r,endLineNumber:t.lineNumber,endColumn:s})!==e.completion.insertText),i.set(a),n.set(!Xe.L.equals(e.editInsertEnd,e.editReplaceEnd)),o.set(Boolean(e.provider.resolveCompletionItem)||Boolean(e.completion.documentation)||e.completion.detail!==e.completion.label)}))),this._toDispose.add(e.onDetailsKeyDown((e=>{e.toKeybinding().equals(new s.QC(!0,!1,!1,!1,33))||Qe.dz&&e.toKeybinding().equals(new s.QC(!1,!1,!1,!0,33))?e.stopPropagation():e.toKeybinding().isModifierKey()||this.editor.focus()}))),e}))),this._overtypingCapturer=this._toDispose.add(new v.Ue((()=>this._toDispose.add(new Ze(this.editor,this.model))))),this._alternatives=this._toDispose.add(new v.Ue((()=>this._toDispose.add(new T(this.editor,this._contextKeyService))))),this._toDispose.add(o.createInstance(qe,e)),this._toDispose.add(this.model.onDidTrigger((e=>{this.widget.value.showTriggered(e.auto,e.shy?250:50),this._lineSuffix.value=new tt(this.editor.getModel(),e.position)}))),this._toDispose.add(this.model.onDidSuggest((e=>{if(!e.shy){let t=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),e.completionModel.items);this.widget.value.showSuggestions(e.completionModel,t,e.isFrozen,e.auto)}}))),this._toDispose.add(this.model.onDidCancel((e=>{e.retrigger||this.widget.value.hideWidget()}))),this._toDispose.add(this.editor.onDidBlurEditorWidget((()=>{this.model.cancel(),this.model.clear()})));let c=I._y.AcceptSuggestionsOnEnter.bindTo(n),u=()=>{const e=this.editor.getOption(1);c.set("on"===e||"smart"===e)};this._toDispose.add(this.editor.onDidChangeConfiguration((()=>u()))),u()}static get(t){return t.getContribution(e.ID)}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose()}_insertSuggestion(e,t){if(!e||!e.item)return this._alternatives.value.reset(),this.model.cancel(),void this.model.clear();if(!this.editor.hasModel())return;const i=this.editor.getModel(),n=i.getAlternativeVersionId(),{item:o}=e,s=[],a=new V.A;1&t||this.editor.pushUndoStop();const c=this.getOverwriteInfo(o,Boolean(8&t));if(this._memoryService.memorize(i,this.editor.getPosition(),o),Array.isArray(o.completion.additionalTextEdits)){const e=l.ZF.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",o.completion.additionalTextEdits.map((e=>u.h.replace(h.e.lift(e.range),e.text)))),e.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!o.isResolved){const e=new Je.G(!0);let n;const r=i.onDidChangeContent((e=>{if(e.isFlush)return a.cancel(),void r.dispose();for(let t of e.changes){const e=h.e.getEndPosition(t.range);n&&!Xe.L.isBefore(e,n)||(n=e)}}));let c=t;t|=2;let d=!1,g=this.editor.onWillType((()=>{g.dispose(),d=!0,2&c||this.editor.pushUndoStop()}));s.push(o.resolve(a.token).then((()=>{if(!o.completion.additionalTextEdits||a.token.isCancellationRequested)return!1;if(n&&o.completion.additionalTextEdits.some((e=>Xe.L.isBefore(n,h.e.getStartPosition(e.range)))))return!1;d&&this.editor.pushUndoStop();const e=l.ZF.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",o.completion.additionalTextEdits.map((e=>u.h.replace(h.e.lift(e.range),e.text)))),e.restoreRelativeVerticalPositionOfCursor(this.editor),!d&&2&c||this.editor.pushUndoStop(),!0})).then((t=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",e.elapsed(),t),r.dispose(),g.dispose()})))}let{insertText:d}=o.completion;4&o.completion.insertTextRules||(d=f.Yj.escape(d)),g.SnippetController2.get(this.editor).insert(d,{overwriteBefore:c.overwriteBefore,overwriteAfter:c.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(1&o.completion.insertTextRules),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),2&t||this.editor.pushUndoStop(),o.completion.command?o.completion.command.id===nt.id?this.model.trigger({auto:!0,shy:!1},!0):(s.push(this._commandService.executeCommand(o.completion.command.id,...o.completion.command.arguments?[...o.completion.command.arguments]:[]).catch(r.dL)),this.model.cancel()):this.model.cancel(),4&t&&this._alternatives.value.set(e,(e=>{for(a.cancel();i.canUndo();){n!==i.getAlternativeVersionId()&&i.undo(),this._insertSuggestion(e,3|(8&t?8:0));break}})),this._alertCompletionItem(o),Promise.all(s).finally((()=>{this.model.clear(),a.dispose()}))}getOverwriteInfo(e,t){(0,Ke.p_)(this.editor.hasModel());let i="replace"===this.editor.getOption(104).insertMode;t&&(i=!i);const n=e.position.column-e.editStart.column,o=(i?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column;return{overwriteBefore:n+(this.editor.getPosition().column-e.position.column),overwriteAfter:o+(this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0)}}_alertCompletionItem(e){if((0,o.Of)(e.completion.additionalTextEdits)){let t=N.N("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);(0,n.Z9)(t)}}triggerSuggest(e){this.editor.hasModel()&&(this.model.trigger({auto:!1,shy:!1},!1,e),this.editor.revealLine(this.editor.getPosition().lineNumber,0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;const t=this.editor.getPosition(),i=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},n=e=>{if(4&e.completion.insertTextRules||e.completion.additionalTextEdits)return!0;const t=this.editor.getPosition(),i=e.editStart.column,n=t.column;return n-i!==e.completion.insertText.length||this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:i,endLineNumber:t.lineNumber,endColumn:n})!==e.completion.insertText};F.ju.once(this.model.onDidTrigger)((e=>{let t=[];F.ju.any(this.model.onDidTrigger,this.model.onDidCancel)((()=>{(0,a.B9)(t),i()}),void 0,t),this.model.onDidSuggest((({completionModel:e})=>{if((0,a.B9)(t),0===e.items.length)return void i();const o=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),e.items),r=e.items[o];n(r)?(this.editor.pushUndoStop(),this._insertSuggestion({index:o,item:r,model:e},7)):i()}),void 0,t)})),this.model.trigger({auto:!1,shy:!0}),this.editor.revealLine(t.lineNumber,0),this.editor.focus()}acceptSelectedSuggestion(e,t){const i=this.widget.value.getFocusedItem();let n=0;e&&(n|=4),t&&(n|=8),this._insertSuggestion(i,n)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.value.stopForceRenderingAbove()}};it.ID="editor.contrib.suggestController",it=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([et(1,L),et(2,E.H),et(3,A.i6),et(4,b.TG),et(5,K.VZ)],it);class nt extends c.R6{constructor(){super({id:nt.id,label:N.N("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:A.Ao.and(d.u.writable,d.u.hasCompletionItemProvider),kbOpts:{kbExpr:d.u.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t){const i=it.get(t);i&&i.triggerSuggest()}}nt.id="editor.action.triggerSuggest",(0,c._K)(it.ID,it),(0,c.Qr)(nt);const ot=190,rt=c._l.bindToContribution(it.get);(0,c.fK)(new rt({id:"acceptSelectedSuggestion",precondition:I._y.Visible,handler(e){e.acceptSelectedSuggestion(!0,!1)}})),M.W.registerKeybindingRule({id:"acceptSelectedSuggestion",when:A.Ao.and(I._y.Visible,d.u.textInputFocus),primary:2,weight:ot}),M.W.registerKeybindingRule({id:"acceptSelectedSuggestion",when:A.Ao.and(I._y.Visible,d.u.textInputFocus,I._y.AcceptSuggestionsOnEnter,I._y.MakesTextEdit),primary:3,weight:ot}),ge.BH.appendMenuItem(I.GI,{command:{id:"acceptSelectedSuggestion",title:N.N("accept.insert","Insert")},group:"left",order:1,when:I._y.HasInsertAndReplaceRange.toNegated()}),ge.BH.appendMenuItem(I.GI,{command:{id:"acceptSelectedSuggestion",title:N.N("accept.insert","Insert")},group:"left",order:1,when:A.Ao.and(I._y.HasInsertAndReplaceRange,I._y.InsertMode.isEqualTo("insert"))}),ge.BH.appendMenuItem(I.GI,{command:{id:"acceptSelectedSuggestion",title:N.N("accept.replace","Replace")},group:"left",order:1,when:A.Ao.and(I._y.HasInsertAndReplaceRange,I._y.InsertMode.isEqualTo("replace"))}),(0,c.fK)(new rt({id:"acceptAlternativeSelectedSuggestion",precondition:A.Ao.and(I._y.Visible,d.u.textInputFocus),kbOpts:{weight:ot,kbExpr:d.u.textInputFocus,primary:1027,secondary:[1026]},handler(e){e.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:I.GI,group:"left",order:2,when:A.Ao.and(I._y.HasInsertAndReplaceRange,I._y.InsertMode.isEqualTo("insert")),title:N.N("accept.replace","Replace")},{menuId:I.GI,group:"left",order:2,when:A.Ao.and(I._y.HasInsertAndReplaceRange,I._y.InsertMode.isEqualTo("replace")),title:N.N("accept.insert","Insert")}]})),E.P.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),(0,c.fK)(new rt({id:"hideSuggestWidget",precondition:I._y.Visible,handler:e=>e.cancelSuggestWidget(),kbOpts:{weight:ot,kbExpr:d.u.textInputFocus,primary:9,secondary:[1033]}})),(0,c.fK)(new rt({id:"selectNextSuggestion",precondition:A.Ao.and(I._y.Visible,I._y.MultipleSuggestions),handler:e=>e.selectNextSuggestion(),kbOpts:{weight:ot,kbExpr:d.u.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),(0,c.fK)(new rt({id:"selectNextPageSuggestion",precondition:A.Ao.and(I._y.Visible,I._y.MultipleSuggestions),handler:e=>e.selectNextPageSuggestion(),kbOpts:{weight:ot,kbExpr:d.u.textInputFocus,primary:12,secondary:[2060]}})),(0,c.fK)(new rt({id:"selectLastSuggestion",precondition:A.Ao.and(I._y.Visible,I._y.MultipleSuggestions),handler:e=>e.selectLastSuggestion()})),(0,c.fK)(new rt({id:"selectPrevSuggestion",precondition:A.Ao.and(I._y.Visible,I._y.MultipleSuggestions),handler:e=>e.selectPrevSuggestion(),kbOpts:{weight:ot,kbExpr:d.u.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),(0,c.fK)(new rt({id:"selectPrevPageSuggestion",precondition:A.Ao.and(I._y.Visible,I._y.MultipleSuggestions),handler:e=>e.selectPrevPageSuggestion(),kbOpts:{weight:ot,kbExpr:d.u.textInputFocus,primary:11,secondary:[2059]}})),(0,c.fK)(new rt({id:"selectFirstSuggestion",precondition:A.Ao.and(I._y.Visible,I._y.MultipleSuggestions),handler:e=>e.selectFirstSuggestion()})),(0,c.fK)(new rt({id:"toggleSuggestionDetails",precondition:I._y.Visible,handler:e=>e.toggleSuggestionDetails(),kbOpts:{weight:ot,kbExpr:d.u.textInputFocus,primary:2058,mac:{primary:266}},menuOpts:[{menuId:I.GI,group:"right",order:1,when:A.Ao.and(I._y.DetailsVisible,I._y.CanResolve),title:N.N("detail.more","show less")},{menuId:I.GI,group:"right",order:1,when:A.Ao.and(I._y.DetailsVisible.toNegated(),I._y.CanResolve),title:N.N("detail.less","show more")}]})),(0,c.fK)(new rt({id:"toggleExplainMode",precondition:I._y.Visible,handler:e=>e.toggleExplainMode(),kbOpts:{weight:100,primary:2133}})),(0,c.fK)(new rt({id:"toggleSuggestionFocus",precondition:I._y.Visible,handler:e=>e.toggleSuggestionFocus(),kbOpts:{weight:ot,kbExpr:d.u.textInputFocus,primary:2570,mac:{primary:778}}})),(0,c.fK)(new rt({id:"insertBestCompletion",precondition:A.Ao.and(d.u.textInputFocus,A.Ao.equals("config.editor.tabCompletion","on"),qe.AtEnd,I._y.Visible.toNegated(),T.OtherSuggestions.toNegated(),g.SnippetController2.InSnippetMode.toNegated()),handler:(e,t)=>{e.triggerSuggestAndAcceptBest((0,Ke.Kn)(t)?Object.assign({fallback:"tab"},t):{fallback:"tab"})},kbOpts:{weight:ot,primary:2}})),(0,c.fK)(new rt({id:"insertNextSuggestion",precondition:A.Ao.and(d.u.textInputFocus,A.Ao.equals("config.editor.tabCompletion","on"),T.OtherSuggestions,I._y.Visible.toNegated(),g.SnippetController2.InSnippetMode.toNegated()),handler:e=>e.acceptNextSuggestion(),kbOpts:{weight:ot,kbExpr:d.u.textInputFocus,primary:2}})),(0,c.fK)(new rt({id:"insertPrevSuggestion",precondition:A.Ao.and(d.u.textInputFocus,A.Ao.equals("config.editor.tabCompletion","on"),T.OtherSuggestions,I._y.Visible.toNegated(),g.SnippetController2.InSnippetMode.toNegated()),handler:e=>e.acceptPrevSuggestion(),kbOpts:{weight:ot,kbExpr:d.u.textInputFocus,primary:1026}})),(0,c.Qr)(class extends c.R6{constructor(){super({id:"editor.action.resetSuggestSize",label:N.N("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(e,t){it.get(t).resetWidgetSize()}})},4954:(e,t,i)=>{"use strict";var n=i(3580),o=i(7781),r=i(3910),s=i(3046);const a=(0,r.P6)("symbolIcon.arrayForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),l=(0,r.P6)("symbolIcon.booleanForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),c=(0,r.P6)("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},(0,n.N)("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),u=(0,r.P6)("symbolIcon.colorForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),h=(0,r.P6)("symbolIcon.constantForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),d=(0,r.P6)("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},(0,n.N)("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),g=(0,r.P6)("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},(0,n.N)("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),f=(0,r.P6)("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},(0,n.N)("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),p=(0,r.P6)("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},(0,n.N)("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),m=(0,r.P6)("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},(0,n.N)("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),_=(0,r.P6)("symbolIcon.fileForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),v=(0,r.P6)("symbolIcon.folderForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),b=(0,r.P6)("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},(0,n.N)("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),y=(0,r.P6)("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},(0,n.N)("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),w=(0,r.P6)("symbolIcon.keyForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),C=(0,r.P6)("symbolIcon.keywordForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),S=(0,r.P6)("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},(0,n.N)("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),x=(0,r.P6)("symbolIcon.moduleForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),k=(0,r.P6)("symbolIcon.namespaceForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),D=(0,r.P6)("symbolIcon.nullForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),L=(0,r.P6)("symbolIcon.numberForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),N=(0,r.P6)("symbolIcon.objectForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),E=(0,r.P6)("symbolIcon.operatorForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),A=(0,r.P6)("symbolIcon.packageForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),M=(0,r.P6)("symbolIcon.propertyForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),I=(0,r.P6)("symbolIcon.referenceForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),T=(0,r.P6)("symbolIcon.snippetForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),R=(0,r.P6)("symbolIcon.stringForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),O=(0,r.P6)("symbolIcon.structForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),F=(0,r.P6)("symbolIcon.textForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),P=(0,r.P6)("symbolIcon.typeParameterForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),B=(0,r.P6)("symbolIcon.unitForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),z=(0,r.P6)("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},(0,n.N)("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));(0,o.Ic)(((e,t)=>{const i=e.getColor(a);i&&t.addRule(`${s.lA.symbolArray.cssSelector} { color: ${i}; }`);const n=e.getColor(l);n&&t.addRule(`${s.lA.symbolBoolean.cssSelector} { color: ${n}; }`);const o=e.getColor(c);o&&t.addRule(`${s.lA.symbolClass.cssSelector} { color: ${o}; }`);const r=e.getColor(S);r&&t.addRule(`${s.lA.symbolMethod.cssSelector} { color: ${r}; }`);const W=e.getColor(u);W&&t.addRule(`${s.lA.symbolColor.cssSelector} { color: ${W}; }`);const V=e.getColor(h);V&&t.addRule(`${s.lA.symbolConstant.cssSelector} { color: ${V}; }`);const H=e.getColor(d);H&&t.addRule(`${s.lA.symbolConstructor.cssSelector} { color: ${H}; }`);const $=e.getColor(g);$&&t.addRule(`\n\t\t\t${s.lA.symbolValue.cssSelector},${s.lA.symbolEnum.cssSelector} { color: ${$}; }`);const U=e.getColor(f);U&&t.addRule(`${s.lA.symbolEnumMember.cssSelector} { color: ${U}; }`);const j=e.getColor(p);j&&t.addRule(`${s.lA.symbolEvent.cssSelector} { color: ${j}; }`);const q=e.getColor(m);q&&t.addRule(`${s.lA.symbolField.cssSelector} { color: ${q}; }`);const K=e.getColor(_);K&&t.addRule(`${s.lA.symbolFile.cssSelector} { color: ${K}; }`);const G=e.getColor(v);G&&t.addRule(`${s.lA.symbolFolder.cssSelector} { color: ${G}; }`);const Y=e.getColor(b);Y&&t.addRule(`${s.lA.symbolFunction.cssSelector} { color: ${Y}; }`);const Z=e.getColor(y);Z&&t.addRule(`${s.lA.symbolInterface.cssSelector} { color: ${Z}; }`);const X=e.getColor(w);X&&t.addRule(`${s.lA.symbolKey.cssSelector} { color: ${X}; }`);const Q=e.getColor(C);Q&&t.addRule(`${s.lA.symbolKeyword.cssSelector} { color: ${Q}; }`);const J=e.getColor(x);J&&t.addRule(`${s.lA.symbolModule.cssSelector} { color: ${J}; }`);const ee=e.getColor(k);ee&&t.addRule(`${s.lA.symbolNamespace.cssSelector} { color: ${ee}; }`);const te=e.getColor(D);te&&t.addRule(`${s.lA.symbolNull.cssSelector} { color: ${te}; }`);const ie=e.getColor(L);ie&&t.addRule(`${s.lA.symbolNumber.cssSelector} { color: ${ie}; }`);const ne=e.getColor(N);ne&&t.addRule(`${s.lA.symbolObject.cssSelector} { color: ${ne}; }`);const oe=e.getColor(E);oe&&t.addRule(`${s.lA.symbolOperator.cssSelector} { color: ${oe}; }`);const re=e.getColor(A);re&&t.addRule(`${s.lA.symbolPackage.cssSelector} { color: ${re}; }`);const se=e.getColor(M);se&&t.addRule(`${s.lA.symbolProperty.cssSelector} { color: ${se}; }`);const ae=e.getColor(I);ae&&t.addRule(`${s.lA.symbolReference.cssSelector} { color: ${ae}; }`);const le=e.getColor(T);le&&t.addRule(`${s.lA.symbolSnippet.cssSelector} { color: ${le}; }`);const ce=e.getColor(R);ce&&t.addRule(`${s.lA.symbolString.cssSelector} { color: ${ce}; }`);const ue=e.getColor(O);ue&&t.addRule(`${s.lA.symbolStruct.cssSelector} { color: ${ue}; }`);const he=e.getColor(F);he&&t.addRule(`${s.lA.symbolText.cssSelector} { color: ${he}; }`);const de=e.getColor(P);de&&t.addRule(`${s.lA.symbolTypeParameter.cssSelector} { color: ${de}; }`);const ge=e.getColor(B);ge&&t.addRule(`${s.lA.symbolUnit.cssSelector} { color: ${ge}; }`);const fe=e.getColor(z);fe&&t.addRule(`${s.lA.symbolVariable.cssSelector} { color: ${fe}; }`)}))},9720:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ToggleTabFocusModeAction:()=>a});var n=i(3580),o=i(5152),r=i(6830),s=i(6345);class a extends r.R6{constructor(){super({id:a.ID,label:n.N({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),alias:"Toggle Tab Key Moves Focus",precondition:void 0,kbOpts:{kbExpr:null,primary:2091,mac:{primary:1323},weight:100}})}run(e,t){const i=!s.nG.getTabFocusMode();s.nG.setTabFocusMode(i),i?(0,o.Z9)(n.N("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):(0,o.Z9)(n.N("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}a.ID="editor.action.toggleTabFocusMode",(0,r.Qr)(a)},1725:(e,t,i)=>{"use strict";i.r(t);var n=i(3580),o=i(5976),r=i(6830),s=i(1640),a=i(8820),l=function(e,t){return function(i,n){t(i,n,e)}};const c="ignoreUnusualLineTerminators";let u=class extends o.JT{constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._config=this._editor.getOption(111),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(111)&&(this._config=this._editor.getOption(111),this._checkForUnusualLineTerminators())}))),this._register(this._editor.onDidChangeModel((()=>{this._checkForUnusualLineTerminators()}))),this._register(this._editor.onDidChangeModelContent((e=>{e.isUndoing||this._checkForUnusualLineTerminators()})))}_checkForUnusualLineTerminators(){return e=this,t=void 0,o=function*(){if("off"===this._config)return;if(!this._editor.hasModel())return;const e=this._editor.getModel();e.mightContainUnusualLineTerminators()&&!0!==function(e,t){return e.getModelProperty(t.uri,c)}(this._codeEditorService,e)&&(this._editor.getOption(78)||("auto"!==this._config?(yield this._dialogService.confirm({title:n.N("unusualLineTerminators.title","Unusual Line Terminators"),message:n.N("unusualLineTerminators.message","Detected unusual line terminators"),detail:n.N("unusualLineTerminators.detail","This file contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`."),primaryButton:n.N("unusualLineTerminators.fix","Fix this file"),secondaryButton:n.N("unusualLineTerminators.ignore","Ignore problem for this file")})).confirmed?e.removeUnusualLineTerminators(this._editor.getSelections()):function(e,t,i){e.setModelProperty(t.uri,c,!0)}(this._codeEditorService,e):e.removeUnusualLineTerminators(this._editor.getSelections())))},new((i=void 0)||(i=Promise))((function(n,r){function s(e){try{l(o.next(e))}catch(e){r(e)}}function a(e){try{l(o.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((o=o.apply(e,t||[])).next())}));var e,t,i,o}};u.ID="editor.contrib.unusualLineTerminatorsDetector",u=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([l(1,a.S),l(2,s.$)],u),(0,r._K)(u.ID,u)},185:(e,t,i)=>{"use strict";i.r(t);var n=i(5393),o=i(5976),r=i(6830),s=i(4101),a=i(1200),l=i(5072),c=i(7781),u=i(3108),h=i(7390),d=i(9510),g=function(e,t){return function(i,n){t(i,n,e)}};let f=class extends o.JT{constructor(e,t,i,o){super(),this._modelService=t,this._themeService=i,this._configurationService=o,this._editor=e,this._tokenizeViewport=new n.pY((()=>this._tokenizeViewportNow()),100),this._outstandingRequests=[],this._register(this._editor.onDidScrollChange((()=>{this._tokenizeViewport.schedule()}))),this._register(this._editor.onDidChangeModel((()=>{this._cancelAll(),this._tokenizeViewport.schedule()}))),this._register(this._editor.onDidChangeModelContent((e=>{this._cancelAll(),this._tokenizeViewport.schedule()}))),this._register(s.K7.onDidChange((()=>{this._cancelAll(),this._tokenizeViewport.schedule()}))),this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(h.e3)&&(this._cancelAll(),this._tokenizeViewport.schedule())}))),this._register(this._themeService.onDidColorThemeChange((()=>{this._cancelAll(),this._tokenizeViewport.schedule()})))}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,i=this._outstandingRequests.length;tthis._requestRange(e,n,t,i))))}_requestRange(e,t,i,o){const r=e.getVersionId(),s=(0,n.PG)((n=>Promise.resolve(i.provideDocumentRangeSemanticTokens(e,t,n))));return s.then((i=>{i&&!e.isDisposed()&&e.getVersionId()===r&&e.setPartialSemanticTokens(t,(0,l.h)(i,o,e.getLanguageIdentifier()))})).then((()=>this._removeOutstandingRequest(s)),(()=>this._removeOutstandingRequest(s))),s}};f.ID="editor.contrib.viewportSemanticTokens",f=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([g(1,a.q),g(2,c.XE),g(3,u.Ui)],f),(0,r._K)(f.ID,f)},3497:(e,t,i)=>{"use strict";i.r(t),i.d(t,{getOccurrencesAtPosition:()=>D});var n=i(3580),o=i(9488),r=i(5393),s=i(1050),a=i(7301),l=i(5976),c=i(6830),u=i(4314),h=i(9102),d=i(4973),g=i(3411),f=i(4101),p=i(8819),m=i(3910),_=i(7781),v=i(5152);const b=(0,m.P6)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hc:null},n.N("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0),y=(0,m.P6)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hc:null},n.N("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0),w=(0,m.P6)("editor.wordHighlightBorder",{light:null,dark:null,hc:m.xL},n.N("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable.")),C=(0,m.P6)("editor.wordHighlightStrongBorder",{light:null,dark:null,hc:m.xL},n.N("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable.")),S=(0,m.P6)("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},n.N("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),x=(0,m.P6)("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hc:"#C0A0C0CC"},n.N("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),k=new p.uy("hasWordHighlights",!1);function D(e,t,i){const n=f.vH.ordered(e);return(0,r.Ps)(n.map((n=>()=>Promise.resolve(n.provideDocumentHighlights(e,t,i)).then(void 0,a.Cp))),o.Of)}class L{constructor(e,t,i){this._wordRange=this._getCurrentWordRange(e,t),this.result=(0,r.PG)((n=>this._compute(e,t,i,n)))}_getCurrentWordRange(e,t){const i=e.getWordAtPosition(t.getPosition());return i?new u.e(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}isValid(e,t,i){const n=t.startLineNumber,o=t.startColumn,r=t.endColumn,s=this._getCurrentWordRange(e,t);let a=Boolean(this._wordRange&&this._wordRange.equalsRange(s));for(let t=0,s=i.length;!a&&t=r&&(a=!0)}return a}cancel(){this.result.cancel()}}class N extends L{_compute(e,t,i,n){return D(e,t.getPosition(),n).then((e=>e||[]))}}class E extends L{constructor(e,t,i){super(e,t,i),this._selectionIsEmpty=t.isEmpty()}_compute(e,t,i,n){return(0,r.Vs)(250,n).then((()=>{if(!t.isEmpty())return[];const n=e.getWordAtPosition(t.getPosition());return!n||n.word.length>1e3?[]:e.findMatches(n.word,!0,!1,!0,i,!1).map((e=>({range:e.range,kind:f.MY.Text})))}))}isValid(e,t,i){const n=t.isEmpty();return this._selectionIsEmpty===n&&super.isValid(e,t,i)}}(0,c.sb)("_executeDocumentHighlights",((e,t)=>D(e,t,s.T.None)));class A{constructor(e,t){this.toUnhook=new l.SL,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this._hasWordHighlights=k.bindTo(t),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(69),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition((e=>{this._ignorePositionChangeEvent||this.occurrencesHighlight&&this._onPositionChanged(e)}))),this.toUnhook.add(e.onDidChangeModelContent((e=>{this._stopAll()}))),this.toUnhook.add(e.onDidChangeConfiguration((e=>{let t=this.editor.getOption(69);this.occurrencesHighlight!==t&&(this.occurrencesHighlight=t,this._stopAll())}))),this._decorationIds=[],this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this._decorationIds.length>0}restore(){this.occurrencesHighlight&&this._run()}_getSortedHighlights(){return o.kX(this._decorationIds.map((e=>this.model.getDecorationRange(e))).sort(u.e.compareRangesUsingStarts))}moveNext(){let e=this._getSortedHighlights(),t=(e.findIndex((e=>e.containsPosition(this.editor.getPosition())))+1)%e.length,i=e[t];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(i.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(i);const n=this._getWord();if(n){const o=this.editor.getModel().getLineContent(i.startLineNumber);(0,v.Z9)(`${o}, ${t+1} of ${e.length} for '${n.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let e=this._getSortedHighlights(),t=(e.findIndex((e=>e.containsPosition(this.editor.getPosition())))-1+e.length)%e.length,i=e[t];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(i.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(i);const n=this._getWord();if(n){const o=this.editor.getModel().getLineContent(i.startLineNumber);(0,v.Z9)(`${o}, ${t+1} of ${e.length} for '${n.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this._decorationIds.length>0&&(this._decorationIds=this.editor.deltaDecorations(this._decorationIds,[]),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){this.occurrencesHighlight&&3===e.reason?this._run():this._stopAll()}_getWord(){let e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.getWordAtPosition({lineNumber:t,column:i})}_run(){let e=this.editor.getSelection();if(e.startLineNumber!==e.endLineNumber)return void this._stopAll();let t=e.startColumn,i=e.endColumn;const n=this._getWord();if(!n||n.startColumn>t||n.endColumn{e===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=t||[],this._beginRenderDecorations())}),a.dL)}var r,s,l}_beginRenderDecorations(){let e=(new Date).getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout((()=>{this.renderDecorations()}),t-e)}renderDecorations(){this.renderDecorationsTimer=-1;let e=[];for(const t of this.workerRequestValue)t.range&&e.push({range:t.range,options:A._getDecorationOptions(t.kind)});this._decorationIds=this.editor.deltaDecorations(this._decorationIds,e),this._hasWordHighlights.set(this.hasDecorations())}static _getDecorationOptions(e){return e===f.MY.Write?this._WRITE_OPTIONS:e===f.MY.Text?this._TEXT_OPTIONS:this._REGULAR_OPTIONS}dispose(){this._stopAll(),this.toUnhook.dispose()}}A._WRITE_OPTIONS=g.qx.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:(0,_.EN)(x),position:d.sh.Center}}),A._TEXT_OPTIONS=g.qx.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight",overviewRuler:{color:(0,_.EN)(m.SP),position:d.sh.Center}}),A._REGULAR_OPTIONS=g.qx.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:(0,_.EN)(S),position:d.sh.Center}});let M=class e extends l.JT{constructor(e,t){super(),this.wordHighlighter=null;const i=()=>{e.hasModel()&&(this.wordHighlighter=new A(e,t))};this._register(e.onDidChangeModel((e=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),i()}))),i()}static get(t){return t.getContribution(e.ID)}saveViewState(){return!(!this.wordHighlighter||!this.wordHighlighter.hasDecorations())}moveNext(){this.wordHighlighter&&this.wordHighlighter.moveNext()}moveBack(){this.wordHighlighter&&this.wordHighlighter.moveBack()}restoreViewState(e){this.wordHighlighter&&e&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};var I,T;M.ID="editor.contrib.wordHighlighter",M=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(I=1,T=p.i6,function(e,t){T(e,t,I)})],M);class R extends c.R6{constructor(e,t){super(t),this._isNext=e}run(e,t){const i=M.get(t);i&&(this._isNext?i.moveNext():i.moveBack())}}class O extends c.R6{constructor(){super({id:"editor.action.wordHighlight.trigger",label:n.N("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:k.toNegated(),kbOpts:{kbExpr:h.u.editorTextFocus,primary:0,weight:100}})}run(e,t,i){const n=M.get(t);n&&n.restoreViewState(!0)}}(0,c._K)(M.ID,M),(0,c.Qr)(class extends R{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:n.N("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:k,kbOpts:{kbExpr:h.u.editorTextFocus,primary:65,weight:100}})}}),(0,c.Qr)(class extends R{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:n.N("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:k,kbOpts:{kbExpr:h.u.editorTextFocus,primary:1089,weight:100}})}}),(0,c.Qr)(O),(0,_.Ic)(((e,t)=>{const i=e.getColor(m.Rz);i&&(t.addRule(`.monaco-editor .focused .selectionHighlight { background-color: ${i}; }`),t.addRule(`.monaco-editor .selectionHighlight { background-color: ${i.transparent(.5)}; }`));const n=e.getColor(b);n&&t.addRule(`.monaco-editor .wordHighlight { background-color: ${n}; }`);const o=e.getColor(y);o&&t.addRule(`.monaco-editor .wordHighlightStrong { background-color: ${o}; }`);const r=e.getColor(m.g_);r&&t.addRule(`.monaco-editor .selectionHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${r}; box-sizing: border-box; }`);const s=e.getColor(w);s&&t.addRule(`.monaco-editor .wordHighlight { border: 1px ${"hc"===e.type?"dashed":"solid"} ${s}; box-sizing: border-box; }`);const a=e.getColor(C);a&&t.addRule(`.monaco-editor .wordHighlightStrong { border: 1px ${"hc"===e.type?"dashed":"solid"} ${a}; box-sizing: border-box; }`)}))},9453:(e,t,i)=>{"use strict";i.r(t),i.d(t,{MoveWordCommand:()=>v,WordLeftCommand:()=>b,WordRightCommand:()=>y,CursorWordStartLeft:()=>w,CursorWordEndLeft:()=>C,CursorWordLeft:()=>S,CursorWordStartLeftSelect:()=>x,CursorWordEndLeftSelect:()=>k,CursorWordLeftSelect:()=>D,CursorWordAccessibilityLeft:()=>L,CursorWordAccessibilityLeftSelect:()=>N,CursorWordStartRight:()=>E,CursorWordEndRight:()=>A,CursorWordRight:()=>M,CursorWordStartRightSelect:()=>I,CursorWordEndRightSelect:()=>T,CursorWordRightSelect:()=>R,CursorWordAccessibilityRight:()=>O,CursorWordAccessibilityRightSelect:()=>F,DeleteWordCommand:()=>P,DeleteWordLeftCommand:()=>B,DeleteWordRightCommand:()=>z,DeleteWordStartLeft:()=>W,DeleteWordEndLeft:()=>V,DeleteWordLeft:()=>H,DeleteWordStartRight:()=>$,DeleteWordEndRight:()=>U,DeleteWordRight:()=>j,DeleteInsideWord:()=>q});var n=i(3580),o=i(6830),r=i(1329),s=i(3181),a=i(5795),l=i(9410),c=i(187),u=i(4314),h=i(3860),d=i(9102),g=i(1106),f=i(8819),p=i(4141),m=i(3831),_=i(9282);class v extends o._l{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=(0,l.u)(t.getOption(114)),o=t.getModel(),r=t.getSelections().map((e=>{const t=new c.L(e.positionLineNumber,e.positionColumn),i=this._move(n,o,t,this._wordNavigationType);return this._moveTo(e,i,this._inSelectionMode)}));if(o.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,r.map((e=>s.Vi.fromModelSelection(e)))),1===r.length){const e=new c.L(r[0].positionLineNumber,r[0].positionColumn);t.revealPosition(e,0)}}_moveTo(e,t,i){return i?new h.Y(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new h.Y(t.lineNumber,t.column,t.lineNumber,t.column)}}class b extends v{_move(e,t,i,n){return a.w.moveWordLeft(e,t,i,n)}}class y extends v{_move(e,t,i,n){return a.w.moveWordRight(e,t,i,n)}}class w extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class C extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class S extends b{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:f.Ao.and(d.u.textInputFocus,null===(e=f.Ao.and(g.U,_.c))||void 0===e?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}}class x extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class k extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class D extends b{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:f.Ao.and(d.u.textInputFocus,null===(e=f.Ao.and(g.U,_.c))||void 0===e?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class L extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n){return super._move((0,l.u)(p.BH.wordSeparators.defaultValue),t,i,n)}}class N extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n){return super._move((0,l.u)(p.BH.wordSeparators.defaultValue),t,i,n)}}class E extends y{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class A extends y{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:f.Ao.and(d.u.textInputFocus,null===(e=f.Ao.and(g.U,_.c))||void 0===e?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}}class M extends y{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class I extends y{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class T extends y{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:f.Ao.and(d.u.textInputFocus,null===(e=f.Ao.and(g.U,_.c))||void 0===e?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class R extends y{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class O extends y{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n){return super._move((0,l.u)(p.BH.wordSeparators.defaultValue),t,i,n)}}class F extends y{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n){return super._move((0,l.u)(p.BH.wordSeparators.defaultValue),t,i,n)}}class P extends o._l{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=(0,l.u)(t.getOption(114)),o=t.getModel(),s=t.getSelections(),a=t.getOption(5),c=t.getOption(8),u=m.zu.getAutoClosingPairs(o.getLanguageIdentifier().id),h=t._getViewModel(),d=s.map((e=>{const i=this._delete({wordSeparators:n,model:o,selection:e,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(6),autoClosingBrackets:a,autoClosingQuotes:c,autoClosingPairs:u,autoClosedCharacters:h.getCursorAutoClosedCharacters()},this._wordNavigationType);return new r.T4(i,"")}));t.pushUndoStop(),t.executeCommands(this.id,d),t.pushUndoStop()}}class B extends P{_delete(e,t){return a.w.deleteWordLeft(e,t)||new u.e(1,1,1,1)}}class z extends P{_delete(e,t){let i=a.w.deleteWordRight(e,t);if(i)return i;const n=e.model.getLineCount(),o=e.model.getLineMaxColumn(n);return new u.e(n,o,n,o)}}class W extends B{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:d.u.writable})}}class V extends B{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:d.u.writable})}}class H extends B{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:d.u.writable,kbOpts:{kbExpr:d.u.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class $ extends z{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:d.u.writable})}}class U extends z{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:d.u.writable})}}class j extends z{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:d.u.writable,kbOpts:{kbExpr:d.u.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class q extends o.R6{constructor(){super({id:"deleteInsideWord",precondition:d.u.writable,label:n.N("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,i){if(!t.hasModel())return;const n=(0,l.u)(t.getOption(114)),o=t.getModel(),s=t.getSelections().map((e=>{const t=a.w.deleteInsideWord(n,o,e);return new r.T4(t,"")}));t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}(0,o.fK)(new w),(0,o.fK)(new C),(0,o.fK)(new S),(0,o.fK)(new x),(0,o.fK)(new k),(0,o.fK)(new D),(0,o.fK)(new E),(0,o.fK)(new A),(0,o.fK)(new M),(0,o.fK)(new I),(0,o.fK)(new T),(0,o.fK)(new R),(0,o.fK)(new L),(0,o.fK)(new N),(0,o.fK)(new O),(0,o.fK)(new F),(0,o.fK)(new W),(0,o.fK)(new V),(0,o.fK)(new H),(0,o.fK)(new $),(0,o.fK)(new U),(0,o.fK)(new j),(0,o.Qr)(q)},661:(e,t,i)=>{"use strict";i.r(t),i.d(t,{DeleteWordPartLeft:()=>c,DeleteWordPartRight:()=>u,WordPartLeftCommand:()=>h,CursorWordPartLeft:()=>d,CursorWordPartLeftSelect:()=>g,WordPartRightCommand:()=>f,CursorWordPartRight:()=>p,CursorWordPartRightSelect:()=>m});var n=i(6830),o=i(5795),r=i(4314),s=i(9102),a=i(9453),l=i(4565);class c extends a.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:s.u.writable,kbOpts:{kbExpr:s.u.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){return o.L.deleteWordPartLeft(e)||new r.e(1,1,1,1)}}class u extends a.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:s.u.writable,kbOpts:{kbExpr:s.u.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){let i=o.L.deleteWordPartRight(e);if(i)return i;const n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new r.e(n,s,n,s)}}class h extends a.MoveWordCommand{_move(e,t,i,n){return o.L.moveWordPartLeft(e,t,i)}}class d extends h{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:s.u.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}l.P.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class g extends h{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:s.u.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}l.P.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class f extends a.MoveWordCommand{_move(e,t,i,n){return o.L.moveWordPartRight(e,t,i)}}class p extends f{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:s.u.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class m extends f{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:s.u.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}(0,n.fK)(new c),(0,n.fK)(new u),(0,n.fK)(new d),(0,n.fK)(new g),(0,n.fK)(new p),(0,n.fK)(new m)},513:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CancellationTokenSource:()=>Ya,Emitter:()=>Za,KeyCode:()=>Xa,KeyMod:()=>Qa,MarkerSeverity:()=>nl,MarkerTag:()=>ol,Position:()=>Ja,Range:()=>el,Selection:()=>tl,SelectionDirection:()=>il,Token:()=>sl,Uri:()=>rl,editor:()=>al,languages:()=>ll});var n,o,r,s,a,l,c,u,h,d,g,f,p,m,_,v,b,y,w,C,S,x,k,D,L,N,E,A,M,I,T,R,O,F,P,B=i(4141),z=i(1050),W=i(4669),V=i(2258),H=i(666),$=i(187),U=i(4314),j=i(3860),q=i(5600);!function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"}(n||(n={})),function(e){e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"}(o||(o={})),function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"}(r||(r={})),function(e){e[e.Deprecated=1]="Deprecated"}(s||(s={})),function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(a||(a={})),function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"}(l||(l={})),function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"}(c||(c={})),function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(u||(u={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(h||(h={})),function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"}(d||(d={})),function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.autoClosingBrackets=5]="autoClosingBrackets",e[e.autoClosingDelete=6]="autoClosingDelete",e[e.autoClosingOvertype=7]="autoClosingOvertype",e[e.autoClosingQuotes=8]="autoClosingQuotes",e[e.autoIndent=9]="autoIndent",e[e.automaticLayout=10]="automaticLayout",e[e.autoSurround=11]="autoSurround",e[e.codeLens=12]="codeLens",e[e.codeLensFontFamily=13]="codeLensFontFamily",e[e.codeLensFontSize=14]="codeLensFontSize",e[e.colorDecorators=15]="colorDecorators",e[e.columnSelection=16]="columnSelection",e[e.comments=17]="comments",e[e.contextmenu=18]="contextmenu",e[e.copyWithSyntaxHighlighting=19]="copyWithSyntaxHighlighting",e[e.cursorBlinking=20]="cursorBlinking",e[e.cursorSmoothCaretAnimation=21]="cursorSmoothCaretAnimation",e[e.cursorStyle=22]="cursorStyle",e[e.cursorSurroundingLines=23]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=24]="cursorSurroundingLinesStyle",e[e.cursorWidth=25]="cursorWidth",e[e.disableLayerHinting=26]="disableLayerHinting",e[e.disableMonospaceOptimizations=27]="disableMonospaceOptimizations",e[e.domReadOnly=28]="domReadOnly",e[e.dragAndDrop=29]="dragAndDrop",e[e.emptySelectionClipboard=30]="emptySelectionClipboard",e[e.extraEditorClassName=31]="extraEditorClassName",e[e.fastScrollSensitivity=32]="fastScrollSensitivity",e[e.find=33]="find",e[e.fixedOverflowWidgets=34]="fixedOverflowWidgets",e[e.folding=35]="folding",e[e.foldingStrategy=36]="foldingStrategy",e[e.foldingHighlight=37]="foldingHighlight",e[e.unfoldOnClickAfterEndOfLine=38]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=39]="fontFamily",e[e.fontInfo=40]="fontInfo",e[e.fontLigatures=41]="fontLigatures",e[e.fontSize=42]="fontSize",e[e.fontWeight=43]="fontWeight",e[e.formatOnPaste=44]="formatOnPaste",e[e.formatOnType=45]="formatOnType",e[e.glyphMargin=46]="glyphMargin",e[e.gotoLocation=47]="gotoLocation",e[e.hideCursorInOverviewRuler=48]="hideCursorInOverviewRuler",e[e.highlightActiveIndentGuide=49]="highlightActiveIndentGuide",e[e.hover=50]="hover",e[e.inDiffEditor=51]="inDiffEditor",e[e.inlineSuggest=52]="inlineSuggest",e[e.letterSpacing=53]="letterSpacing",e[e.lightbulb=54]="lightbulb",e[e.lineDecorationsWidth=55]="lineDecorationsWidth",e[e.lineHeight=56]="lineHeight",e[e.lineNumbers=57]="lineNumbers",e[e.lineNumbersMinChars=58]="lineNumbersMinChars",e[e.linkedEditing=59]="linkedEditing",e[e.links=60]="links",e[e.matchBrackets=61]="matchBrackets",e[e.minimap=62]="minimap",e[e.mouseStyle=63]="mouseStyle",e[e.mouseWheelScrollSensitivity=64]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=65]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=66]="multiCursorMergeOverlapping",e[e.multiCursorModifier=67]="multiCursorModifier",e[e.multiCursorPaste=68]="multiCursorPaste",e[e.occurrencesHighlight=69]="occurrencesHighlight",e[e.overviewRulerBorder=70]="overviewRulerBorder",e[e.overviewRulerLanes=71]="overviewRulerLanes",e[e.padding=72]="padding",e[e.parameterHints=73]="parameterHints",e[e.peekWidgetDefaultFocus=74]="peekWidgetDefaultFocus",e[e.definitionLinkOpensInPeek=75]="definitionLinkOpensInPeek",e[e.quickSuggestions=76]="quickSuggestions",e[e.quickSuggestionsDelay=77]="quickSuggestionsDelay",e[e.readOnly=78]="readOnly",e[e.renameOnType=79]="renameOnType",e[e.renderControlCharacters=80]="renderControlCharacters",e[e.renderIndentGuides=81]="renderIndentGuides",e[e.renderFinalNewline=82]="renderFinalNewline",e[e.renderLineHighlight=83]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=84]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=85]="renderValidationDecorations",e[e.renderWhitespace=86]="renderWhitespace",e[e.revealHorizontalRightPadding=87]="revealHorizontalRightPadding",e[e.roundedSelection=88]="roundedSelection",e[e.rulers=89]="rulers",e[e.scrollbar=90]="scrollbar",e[e.scrollBeyondLastColumn=91]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=92]="scrollBeyondLastLine",e[e.scrollPredominantAxis=93]="scrollPredominantAxis",e[e.selectionClipboard=94]="selectionClipboard",e[e.selectionHighlight=95]="selectionHighlight",e[e.selectOnLineNumbers=96]="selectOnLineNumbers",e[e.showFoldingControls=97]="showFoldingControls",e[e.showUnused=98]="showUnused",e[e.snippetSuggestions=99]="snippetSuggestions",e[e.smartSelect=100]="smartSelect",e[e.smoothScrolling=101]="smoothScrolling",e[e.stickyTabStops=102]="stickyTabStops",e[e.stopRenderingLineAfter=103]="stopRenderingLineAfter",e[e.suggest=104]="suggest",e[e.suggestFontSize=105]="suggestFontSize",e[e.suggestLineHeight=106]="suggestLineHeight",e[e.suggestOnTriggerCharacters=107]="suggestOnTriggerCharacters",e[e.suggestSelection=108]="suggestSelection",e[e.tabCompletion=109]="tabCompletion",e[e.tabIndex=110]="tabIndex",e[e.unusualLineTerminators=111]="unusualLineTerminators",e[e.useShadowDOM=112]="useShadowDOM",e[e.useTabStops=113]="useTabStops",e[e.wordSeparators=114]="wordSeparators",e[e.wordWrap=115]="wordWrap",e[e.wordWrapBreakAfterCharacters=116]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=117]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=118]="wordWrapColumn",e[e.wordWrapOverride1=119]="wordWrapOverride1",e[e.wordWrapOverride2=120]="wordWrapOverride2",e[e.wrappingIndent=121]="wrappingIndent",e[e.wrappingStrategy=122]="wrappingStrategy",e[e.showDeprecated=123]="showDeprecated",e[e.inlayHints=124]="inlayHints",e[e.editorClassName=125]="editorClassName",e[e.pixelRatio=126]="pixelRatio",e[e.tabFocusMode=127]="tabFocusMode",e[e.layoutInfo=128]="layoutInfo",e[e.wrappingInfo=129]="wrappingInfo"}(g||(g={})),function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(f||(f={})),function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"}(p||(p={})),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(m||(m={})),function(e){e[e.Other=0]="Other",e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(_||(_={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(v||(v={})),function(e){e[e.DependsOnKbLayout=-1]="DependsOnKbLayout",e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.KEY_0=21]="KEY_0",e[e.KEY_1=22]="KEY_1",e[e.KEY_2=23]="KEY_2",e[e.KEY_3=24]="KEY_3",e[e.KEY_4=25]="KEY_4",e[e.KEY_5=26]="KEY_5",e[e.KEY_6=27]="KEY_6",e[e.KEY_7=28]="KEY_7",e[e.KEY_8=29]="KEY_8",e[e.KEY_9=30]="KEY_9",e[e.KEY_A=31]="KEY_A",e[e.KEY_B=32]="KEY_B",e[e.KEY_C=33]="KEY_C",e[e.KEY_D=34]="KEY_D",e[e.KEY_E=35]="KEY_E",e[e.KEY_F=36]="KEY_F",e[e.KEY_G=37]="KEY_G",e[e.KEY_H=38]="KEY_H",e[e.KEY_I=39]="KEY_I",e[e.KEY_J=40]="KEY_J",e[e.KEY_K=41]="KEY_K",e[e.KEY_L=42]="KEY_L",e[e.KEY_M=43]="KEY_M",e[e.KEY_N=44]="KEY_N",e[e.KEY_O=45]="KEY_O",e[e.KEY_P=46]="KEY_P",e[e.KEY_Q=47]="KEY_Q",e[e.KEY_R=48]="KEY_R",e[e.KEY_S=49]="KEY_S",e[e.KEY_T=50]="KEY_T",e[e.KEY_U=51]="KEY_U",e[e.KEY_V=52]="KEY_V",e[e.KEY_W=53]="KEY_W",e[e.KEY_X=54]="KEY_X",e[e.KEY_Y=55]="KEY_Y",e[e.KEY_Z=56]="KEY_Z",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.NumLock=78]="NumLock",e[e.ScrollLock=79]="ScrollLock",e[e.US_SEMICOLON=80]="US_SEMICOLON",e[e.US_EQUAL=81]="US_EQUAL",e[e.US_COMMA=82]="US_COMMA",e[e.US_MINUS=83]="US_MINUS",e[e.US_DOT=84]="US_DOT",e[e.US_SLASH=85]="US_SLASH",e[e.US_BACKTICK=86]="US_BACKTICK",e[e.US_OPEN_SQUARE_BRACKET=87]="US_OPEN_SQUARE_BRACKET",e[e.US_BACKSLASH=88]="US_BACKSLASH",e[e.US_CLOSE_SQUARE_BRACKET=89]="US_CLOSE_SQUARE_BRACKET",e[e.US_QUOTE=90]="US_QUOTE",e[e.OEM_8=91]="OEM_8",e[e.OEM_102=92]="OEM_102",e[e.NUMPAD_0=93]="NUMPAD_0",e[e.NUMPAD_1=94]="NUMPAD_1",e[e.NUMPAD_2=95]="NUMPAD_2",e[e.NUMPAD_3=96]="NUMPAD_3",e[e.NUMPAD_4=97]="NUMPAD_4",e[e.NUMPAD_5=98]="NUMPAD_5",e[e.NUMPAD_6=99]="NUMPAD_6",e[e.NUMPAD_7=100]="NUMPAD_7",e[e.NUMPAD_8=101]="NUMPAD_8",e[e.NUMPAD_9=102]="NUMPAD_9",e[e.NUMPAD_MULTIPLY=103]="NUMPAD_MULTIPLY",e[e.NUMPAD_ADD=104]="NUMPAD_ADD",e[e.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",e[e.NUMPAD_SUBTRACT=106]="NUMPAD_SUBTRACT",e[e.NUMPAD_DECIMAL=107]="NUMPAD_DECIMAL",e[e.NUMPAD_DIVIDE=108]="NUMPAD_DIVIDE",e[e.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",e[e.ABNT_C1=110]="ABNT_C1",e[e.ABNT_C2=111]="ABNT_C2",e[e.MAX_VALUE=112]="MAX_VALUE"}(b||(b={})),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(y||(y={})),function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"}(w||(w={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(C||(C={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"}(S||(S={})),function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"}(x||(x={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(k||(k={})),function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"}(D||(D={})),function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"}(L||(L={})),function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"}(N||(N={})),function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"}(E||(E={})),function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(A||(A={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(M||(M={})),function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"}(I||(I={})),function(e){e[e.Deprecated=1]="Deprecated"}(T||(T={})),function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"}(R||(R={})),function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(O||(O={})),function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"}(F||(F={})),function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"}(P||(P={}));class K{static chord(e,t){return(0,V.gx)(e,t)}}function G(){return{editor:void 0,languages:void 0,CancellationTokenSource:z.A,Emitter:W.Q5,KeyCode:b,KeyMod:K,Position:$.L,Range:U.e,Selection:j.Y,SelectionDirection:A,MarkerSeverity:y,MarkerTag:w,Uri:H.o,Token:q.WU}}K.CtrlCmd=2048,K.Shift=1024,K.Alt=512,K.WinCtrl=256;var Y,Z=i(1640),X=i(5321),Q=i(1741),J=i(3702),ee=i(3897),te=i(6663),ie=i(5935),ne=i(4565);!function(e){e[e.API=0]="API",e[e.USER=1]="USER"}(Y||(Y={}));var oe=i(988),re=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},se=function(e,t){return function(i,n){t(i,n,e)}},ae=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};let le=class{constructor(e){this._commandService=e}open(e,t){return ae(this,void 0,void 0,(function*(){if(!(0,oe.xn)(e,te.lg.command))return!1;if(!(null==t?void 0:t.allowCommands))return!0;"string"==typeof e&&(e=H.o.parse(e));let i=[];try{i=(0,ee.Q)(decodeURIComponent(e.query))}catch(t){try{i=(0,ee.Q)(e.query)}catch(e){}}return Array.isArray(i)||(i=[i]),yield this._commandService.executeCommand(e.path,...i),!0}))}};le=re([se(0,ne.H)],le);let ce=class{constructor(e){this._editorService=e}open(e,t){return ae(this,void 0,void 0,(function*(){let i;"string"==typeof e&&(e=H.o.parse(e));const n=/^L?(\d+)(?:,(\d+))?/.exec(e.fragment);return n&&(i={startLineNumber:parseInt(n[1]),startColumn:n[2]?parseInt(n[2]):1},e=e.with({fragment:""})),e.scheme===te.lg.file&&(e=(0,ie.AH)(e)),yield this._editorService.openCodeEditor({resource:e,options:Object.assign({selection:i,context:(null==t?void 0:t.fromUserGesture)?Y.USER:Y.API},null==t?void 0:t.editorOptions)},this._editorService.getFocusedCodeEditor(),null==t?void 0:t.openToSide),!0}))}};ce=re([se(0,Z.$)],ce);let ue=class{constructor(e,t){this._openers=new Q.S,this._validators=new Q.S,this._resolvers=new Q.S,this._resolvedUriTargets=new J.Y9((e=>e.with({path:null,fragment:null,query:null}).toString())),this._externalOpeners=new Q.S,this._defaultExternalOpener={openExternal:e=>ae(this,void 0,void 0,(function*(){return(0,oe.xn)(e,te.lg.http)||(0,oe.xn)(e,te.lg.https)?X.V3(e):window.location.href=e,!0}))},this._openers.push({open:(e,t)=>ae(this,void 0,void 0,(function*(){return!!((null==t?void 0:t.openExternal)||(0,oe.xn)(e,te.lg.mailto)||(0,oe.xn)(e,te.lg.http)||(0,oe.xn)(e,te.lg.https))&&(yield this._doOpenExternal(e,t),!0)}))}),this._openers.push(new le(t)),this._openers.push(new ce(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}registerValidator(e){return{dispose:this._validators.push(e)}}registerExternalUriResolver(e){return{dispose:this._resolvers.push(e)}}setDefaultExternalOpener(e){this._defaultExternalOpener=e}registerExternalOpener(e){return{dispose:this._externalOpeners.push(e)}}open(e,t){var i;return ae(this,void 0,void 0,(function*(){const n="string"==typeof e?H.o.parse(e):e,o=null!==(i=this._resolvedUriTargets.get(n))&&void 0!==i?i:e;for(const e of this._validators)if(!(yield e.shouldOpen(o)))return!1;for(const i of this._openers)if(yield i.open(e,t))return!0;return!1}))}resolveExternalUri(e,t){return ae(this,void 0,void 0,(function*(){for(const i of this._resolvers)try{const n=yield i.resolveExternalUri(e,t);if(n)return this._resolvedUriTargets.has(n.resolved)||this._resolvedUriTargets.set(n.resolved,e),n}catch(e){}throw new Error("Could not resolve external URI: "+e.toString())}))}_doOpenExternal(e,t){return ae(this,void 0,void 0,(function*(){const i="string"==typeof e?H.o.parse(e):e;let n,o;try{n=(yield this.resolveExternalUri(i,t)).resolved}catch(e){n=i}if(o="string"==typeof e&&i.toString()===n.toString()?e:encodeURI(n.toString(!0)),null==t?void 0:t.allowContributedOpeners){const e="string"==typeof(null==t?void 0:t.allowContributedOpeners)?null==t?void 0:t.allowContributedOpeners:void 0;for(const t of this._externalOpeners)if(yield t.openExternal(o,{sourceUri:i,preferredOpenerId:e},z.T.None))return!0}return this._defaultExternalOpener.openExternal(o,{sourceUri:i},z.T.None)}))}dispose(){this._validators.clear()}};ue=re([se(0,Z.$),se(1,ne.H)],ue);var he=i(5146),de=i(5976),ge=i(6248);const fe={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0};class pe extends de.JT{constructor(e,t={}){super(),this._onDidUpdate=this._register(new W.Q5),this._editor=e,this._options=ge.jB(t,fe,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=Boolean(this._options.alwaysRevealFirst),this._register(this._editor.onDidDispose((()=>this.dispose()))),this._register(this._editor.onDidUpdateDiff((()=>this._onDiffUpdated()))),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition((e=>{this.ignoreSelectionChange||(this.nextIdx=-1)}))),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel((e=>{this.revealFirst=!0}))),this._init()}_init(){this._editor.getLineChanges()}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(e){this.ranges=[],e&&e.forEach((e=>{!this._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach((e=>{this.ranges.push({rhs:!0,range:new U.e(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})})):this.ranges.push({rhs:!0,range:new U.e(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber,1)})})),this.ranges.sort(((e,t)=>e.range.getStartPosition().isBeforeOrEqual(t.range.getStartPosition())?-1:t.range.getStartPosition().isBeforeOrEqual(e.range.getStartPosition())?1:0)),this._onDidUpdate.fire(this)}_initIdx(e){let t=!1,i=this._editor.getPosition();if(i){for(let n=0,o=this.ranges.length;n=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));let i=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{let e=i.range.getStartPosition();this._editor.setPosition(e),this._editor.revealPositionInCenter(e,t)}finally{this.ignoreSelectionChange=!1}}canNavigate(){return this.ranges&&this.ranges.length>0}next(e=0){this._move(!0,e)}previous(e=0){this._move(!1,e)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}}var me=i(7374),_e=i(6518),ve=i(4973),be=i(4101),ye=i(8111),we=i(469),Ce=i(1531),Se=i(8216),xe=i(5393),ke=i(7301),De=i(1432),Le=i(8401);let Ne=!1;function Ee(e){De.$L&&(Ne||(Ne=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(e.message))}class Ae{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null)}setWorkerId(e){this._workerId=e}sendMessage(e,t){let i=String(++this._lastSentReq);return new Promise(((n,o)=>{this._pendingReplies[i]={resolve:n,reject:o},this._send({vsWorker:this._workerId,req:i,method:e,args:t})}))}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}_handleMessage(e){if(e.seq){let t=e;if(!this._pendingReplies[t.seq])return void console.warn("Got reply to unknown seq");let i=this._pendingReplies[t.seq];if(delete this._pendingReplies[t.seq],t.err){let e=t.err;return t.err.$isError&&(e=new Error,e.name=t.err.name,e.message=t.err.message,e.stack=t.err.stack),void i.reject(e)}return void i.resolve(t.res)}let t=e,i=t.req;this._handler.handleMessage(t.method,t.args).then((e=>{this._send({vsWorker:this._workerId,seq:i,res:e,err:void 0})}),(e=>{e.detail instanceof Error&&(e.detail=(0,ke.ri)(e.detail)),this._send({vsWorker:this._workerId,seq:i,res:void 0,err:(0,ke.ri)(e)})}))}_send(e){let t=[];if(e.req){const i=e;for(let e=0;e{this._protocol.handleMessage(e)}),(e=>{n&&n(e)}))),this._protocol=new Ae({sendMessage:(e,t)=>{this._worker.postMessage(e,t)},handleMessage:(e,t)=>{if("function"!=typeof i[e])return Promise.reject(new Error("Missing method "+e+" on main thread host."));try{return Promise.resolve(i[e].apply(i,t))}catch(e){return Promise.reject(e)}}}),this._protocol.setWorkerId(this._worker.getId());let o=null;void 0!==self.require&&"function"==typeof self.require.getConfig?o=self.require.getConfig():void 0!==self.requirejs&&(o=self.requirejs.s.contexts._.config);const r=Le.$E(i);this._onModuleLoaded=this._protocol.sendMessage("$initialize",[this._worker.getId(),JSON.parse(JSON.stringify(o)),t,r]);const s=(e,t)=>this._request(e,t);this._lazyProxy=new Promise(((e,i)=>{n=i,this._onModuleLoaded.then((t=>{e(Le.IU(t,s))}),(e=>{i(e),this._onError("Worker failed to load "+t,e)}))}))}getProxyObject(){return this._lazyProxy}_request(e,t){return new Promise(((i,n)=>{this._onModuleLoaded.then((()=>{this._protocol.sendMessage(e,t).then(i,n)}),n)}))}_onError(e,t){console.error(e),console.info(t)}}var Ie;const Te=null===(Ie=window.trustedTypes)||void 0===Ie?void 0:Ie.createPolicy("defaultWorkerFactory",{createScriptURL:e=>e});class Re{constructor(e,t,i,n,o){this.id=t;const r=function(e,t){if(De.li.MonacoEnvironment){if("function"==typeof De.li.MonacoEnvironment.getWorker)return De.li.MonacoEnvironment.getWorker(e,t);if("function"==typeof De.li.MonacoEnvironment.getWorkerUrl){const i=De.li.MonacoEnvironment.getWorkerUrl(e,t);return new Worker(Te?Te.createScriptURL(i):i,{name:t})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}("workerMain.js",i);"function"==typeof r.then?this.worker=r:this.worker=Promise.resolve(r),this.postMessage(e,[]),this.worker.then((e=>{e.onmessage=function(e){n(e.data)},e.onmessageerror=o,"function"==typeof e.addEventListener&&e.addEventListener("error",o)}))}getId(){return this.id}postMessage(e,t){this.worker&&this.worker.then((i=>i.postMessage(e,t)))}dispose(){this.worker&&this.worker.then((e=>e.terminate())),this.worker=null}}class Oe{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,t,i){let n=++Oe.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new Re(e,n,this._label||"anonymous"+n,t,(e=>{Ee(e),this._webWorkerFailedBeforeError=e,i(e)}))}}Oe.LAST_WORKER_ID=0;var Fe=i(3831),Pe=i(2484),Be=i(7295);function ze(e,t,i,n){return new Pe.Hs(e,t,i).ComputeDiff(n)}class We{constructor(e){const t=[],i=[];for(let n=0,o=e.length;n0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&o()){const r=i.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=n.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);let l=ze(r,a,o,!0).changes;s&&(l=function(e){if(e.length<=1)return e;const t=[e[0]];let i=t[0];for(let n=1,o=e.length;n1&&s>1&&e.charCodeAt(i-2)===t.charCodeAt(s-2);)i--,s--;(i>1||s>1)&&this._pushTrimWhitespaceCharChange(n,o+1,1,i,r+1,1,s)}{let i=qe(e,1),s=qe(t,1);const a=e.length+1,l=t.length+1;for(;i!0;const t=Date.now();return()=>Date.now()-tt&&(t=r),o>i&&(i=o),s>i&&(i=s)}t++,i++;let n=new Xe(i,t,0);for(let t=0,i=e.length;t=this._maxCharCode?0:this._states.get(e,t)}}let Je=null,et=null;class tt{static _createLink(e,t,i,n,o){let r=o-1;do{const i=t.charCodeAt(r);if(2!==e.get(i))break;r--}while(r>n);if(n>0){const e=t.charCodeAt(n-1),i=t.charCodeAt(r);(40===e&&41===i||91===e&&93===i||123===e&&125===i)&&r--}return{range:{startLineNumber:i,startColumn:n+1,endLineNumber:i,endColumn:r+2},url:t.substring(n,r+1)}}static computeLinks(e,t=function(){return null===Je&&(Je=new Qe([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),Je}()){const i=function(){if(null===et){et=new Ze.N(0);const e=" \t<>'\"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…";for(let t=0;t=0?(n+=i?1:-1,n<0?n=e.length-1:n%=e.length,e[n]):null}}it.INSTANCE=new it;var nt=i(4013),ot=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class rt extends class{constructor(e,t,i,n){this._uri=e,this._lines=t,this._eol=i,this._versionId=n,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return null===this._cachedTextValue&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const e of t)this._acceptDeleteRange(e.range),this._acceptInsertText(new $.L(e.range.startLineNumber,e.range.startColumn),e.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,i=new Uint32Array(t);for(let n=0;nthis._lines.length)t=this._lines.length,i=this._lines[t-1].length+1,n=!0;else{let e=this._lines[t-1].length+1;i<1?(i=1,n=!0):i>e&&(i=e,n=!0)}return n?{lineNumber:t,column:i}:e}}class st{constructor(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){let e=[];return Object.keys(this._models).forEach((t=>e.push(this._models[t]))),e}acceptNewModel(e){this._models[e.url]=new rt(H.o.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,t){this._models[e]&&this._models[e].onEvents(t)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}computeDiff(e,t,i,n){return ot(this,void 0,void 0,(function*(){const o=this._getModel(e),r=this._getModel(t);if(!o||!r)return null;const s=o.getLinesContent(),a=r.getLinesContent(),l=new Ue(s,a,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:i,shouldMakePrettyDiff:!0,maxComputationTime:n}).computeDiff(),c=!(l.changes.length>0)&&this._modelsAreIdentical(o,r);return{quitEarly:l.quitEarly,identical:c,changes:l.changes}}))}_modelsAreIdentical(e,t){const i=e.getLineCount();if(i!==t.getLineCount())return!1;for(let n=1;n<=i;n++)if(e.getLineContent(n)!==t.getLineContent(n))return!1;return!0}computeMoreMinimalEdits(e,t){return ot(this,void 0,void 0,(function*(){const i=this._getModel(e);if(!i)return t;const n=[];let o;t=t.slice(0).sort(((e,t)=>e.range&&t.range?U.e.compareRangesUsingStarts(e.range,t.range):(e.range?0:1)-(t.range?0:1)));for(let{range:e,text:r,eol:s}of t){if("number"==typeof s&&(o=s),U.e.isEmpty(e)&&!r)continue;const t=i.getValueInRange(e);if(r=r.replace(/\r\n|\n|\r/g,i.eol),t===r)continue;if(Math.max(r.length,t.length)>st._diffLimit){n.push({range:e,text:r});continue}const a=(0,Pe.a$)(t,r,!1),l=i.offsetAt(U.e.lift(e).getStartPosition());for(const e of a){const t=i.positionAt(l+e.originalStart),o=i.positionAt(l+e.originalStart+e.originalLength),s={text:r.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:o.lineNumber,endColumn:o.column}};i.getValueInRange(s.range)!==s.text&&n.push(s)}}return"number"==typeof o&&n.push({eol:o,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),n}))}computeLinks(e){return ot(this,void 0,void 0,(function*(){let t=this._getModel(e);return t?function(e){return e&&"function"==typeof e.getLineCount&&"function"==typeof e.getLineContent?tt.computeLinks(e):[]}(t):null}))}textualSuggest(e,t,i,n){return ot(this,void 0,void 0,(function*(){const o=new nt.G(!0),r=new RegExp(i,n),s=new Set;e:for(let i of e){const e=this._getModel(i);if(e)for(let i of e.words(r))if(i!==t&&isNaN(Number(i))&&(s.add(i),s.size>st._suggestionsLimit))break e}return{words:Array.from(s),duration:o.elapsed()}}))}computeWordRanges(e,t,i,n){return ot(this,void 0,void 0,(function*(){let o=this._getModel(e);if(!o)return Object.create(null);const r=new RegExp(i,n),s=Object.create(null);for(let e=t.startLineNumber;ethis._host.fhr(e,t))),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(n,t),Promise.resolve(Le.$E(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,t){if(!this._foreignModule||"function"!=typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){return Promise.reject(e)}}}st._diffLimit=1e5,st._suggestionsLimit=1e4,"function"==typeof importScripts&&(De.li.monaco=G());var at=i(1200),lt=i(3187),ct=i(9488),ut=i(3557),ht=function(e,t){return function(i,n){t(i,n,e)}},dt=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function gt(e,t){let i=e.getModel(t);return!!i&&!i.isTooLargeForSyncing()}let ft=class extends de.JT{constructor(e,t,i){super(),this._modelService=e,this._workerManager=this._register(new mt(this._modelService)),this._logService=i,this._register(be.pM.register("*",{provideLinks:(e,t)=>gt(this._modelService,e.uri)?this._workerManager.withWorker().then((t=>t.computeLinks(e.uri))).then((e=>e&&{links:e})):Promise.resolve({links:[]})})),this._register(be.KZ.register("*",new pt(this._workerManager,t,this._modelService)))}dispose(){super.dispose()}canComputeDiff(e,t){return gt(this._modelService,e)&>(this._modelService,t)}computeDiff(e,t,i,n){return this._workerManager.withWorker().then((o=>o.computeDiff(e,t,i,n)))}computeMoreMinimalEdits(e,t){if((0,ct.Of)(t)){if(!gt(this._modelService,e))return Promise.resolve(t);const i=nt.G.create(!0),n=this._workerManager.withWorker().then((i=>i.computeMoreMinimalEdits(e,t)));return n.finally((()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),i.elapsed()))),Promise.race([n,(0,xe.Vs)(1e3).then((()=>t))])}return Promise.resolve(void 0)}canNavigateValueSet(e){return gt(this._modelService,e)}navigateValueSet(e,t,i){return this._workerManager.withWorker().then((n=>n.navigateValueSet(e,t,i)))}canComputeWordRanges(e){return gt(this._modelService,e)}computeWordRanges(e,t){return this._workerManager.withWorker().then((i=>i.computeWordRanges(e,t)))}};ft=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([ht(0,at.q),ht(1,lt.V),ht(2,ut.VZ)],ft);class pt{constructor(e,t,i){this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=i}provideCompletionItems(e,t){return dt(this,void 0,void 0,(function*(){const i=this._configurationService.getValue(e.uri,t,"editor");if(!i.wordBasedSuggestions)return;const n=[];if("currentDocument"===i.wordBasedSuggestionsMode)gt(this._modelService,e.uri)&&n.push(e.uri);else for(const t of this._modelService.getModels())gt(this._modelService,t.uri)&&(t===e?n.unshift(t.uri):"allDocuments"!==i.wordBasedSuggestionsMode&&t.getLanguageIdentifier().id!==e.getLanguageIdentifier().id||n.push(t.uri));if(0===n.length)return;const o=Fe.zu.getWordDefinition(e.getLanguageIdentifier().id),r=e.getWordAtPosition(t),s=r?new U.e(t.lineNumber,r.startColumn,t.lineNumber,r.endColumn):U.e.fromPositions(t),a=s.setEndPosition(t.lineNumber,t.column),l=yield this._workerManager.withWorker(),c=yield l.textualSuggest(n,null==r?void 0:r.word,o);return c?{duration:c.duration,suggestions:c.words.map((e=>({kind:18,label:e,insertText:e,range:{insert:a,replace:s}})))}:void 0}))}}class mt extends de.JT{constructor(e){super(),this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=(new Date).getTime(),this._register(new xe.zh).cancelAndSet((()=>this._checkStopIdleWorker()),Math.round(15e4)),this._register(this._modelService.onModelRemoved((e=>this._checkStopEmptyWorker())))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){this._editorWorkerClient&&0===this._modelService.getModels().length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){this._editorWorkerClient&&(new Date).getTime()-this._lastWorkerUsedTime>3e5&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=(new Date).getTime(),this._editorWorkerClient||(this._editorWorkerClient=new yt(this._modelService,!1,"editorWorkerService")),Promise.resolve(this._editorWorkerClient)}}class _t extends de.JT{constructor(e,t,i){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!i){let e=new xe.zh;e.cancelAndSet((()=>this._checkStopModelSync()),Math.round(3e4)),this._register(e)}}dispose(){for(let e in this._syncedModels)(0,de.B9)(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e){for(const t of e){let e=t.toString();this._syncedModels[e]||this._beginModelSync(t),this._syncedModels[e]&&(this._syncedModelsLastUsedTime[e]=(new Date).getTime())}}_checkStopModelSync(){let e=(new Date).getTime(),t=[];for(let i in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[i]>6e4&&t.push(i);for(const e of t)this._stopModelSync(e)}_beginModelSync(e){let t=this._modelService.getModel(e);if(!t)return;if(t.isTooLargeForSyncing())return;let i=e.toString();this._proxy.acceptNewModel({url:t.uri.toString(),lines:t.getLinesContent(),EOL:t.getEOL(),versionId:t.getVersionId()});const n=new de.SL;n.add(t.onDidChangeContent((e=>{this._proxy.acceptModelChanged(i.toString(),e)}))),n.add(t.onWillDispose((()=>{this._stopModelSync(i)}))),n.add((0,de.OF)((()=>{this._proxy.acceptRemovedModel(i)}))),this._syncedModels[i]=n}_stopModelSync(e){let t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],(0,de.B9)(t)}}class vt{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class bt{constructor(e){this._workerClient=e}fhr(e,t){return this._workerClient.fhr(e,t)}}class yt extends de.JT{constructor(e,t,i){super(),this._disposed=!1,this._modelService=e,this._keepIdleModels=t,this._workerFactory=new Oe(i),this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new Me(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new bt(this)))}catch(e){Ee(e),this._worker=new vt(new st(new bt(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,(e=>(Ee(e),this._worker=new vt(new st(new bt(this),null)),this._getOrCreateWorker().getProxyObject())))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new _t(e,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(e){return this._disposed?Promise.reject((0,ke.F0)()):this._getProxy().then((t=>(this._getOrCreateModelManager(t).ensureSyncedResources(e),t)))}computeDiff(e,t,i,n){return this._withSyncedResources([e,t]).then((o=>o.computeDiff(e.toString(),t.toString(),i,n)))}computeMoreMinimalEdits(e,t){return this._withSyncedResources([e]).then((i=>i.computeMoreMinimalEdits(e.toString(),t)))}computeLinks(e){return this._withSyncedResources([e]).then((t=>t.computeLinks(e.toString())))}textualSuggest(e,t,i){return dt(this,void 0,void 0,(function*(){const n=yield this._withSyncedResources(e),o=i.source,r=(0,Be.mr)(i);return n.textualSuggest(e.map((e=>e.toString())),t,o,r)}))}computeWordRanges(e,t){return this._withSyncedResources([e]).then((i=>{let n=this._modelService.getModel(e);if(!n)return Promise.resolve(null);let o=Fe.zu.getWordDefinition(n.getLanguageIdentifier().id),r=o.source,s=(0,Be.mr)(o);return i.computeWordRanges(e.toString(),t,r,s)}))}navigateValueSet(e,t,i){return this._withSyncedResources([e]).then((n=>{let o=this._modelService.getModel(e);if(!o)return null;let r=Fe.zu.getWordDefinition(o.getLanguageIdentifier().id),s=r.source,a=(0,Be.mr)(r);return n.navigateValueSet(e.toString(),t,i,s,a)}))}dispose(){super.dispose(),this._disposed=!0}}class wt extends yt{constructor(e,t){super(e,t.keepIdleModels||!1,t.label),this._foreignModuleId=t.moduleId,this._foreignModuleCreateData=t.createData||null,this._foreignModuleHost=t.host||null,this._foreignProxy=null}fhr(e,t){if(!this._foreignModuleHost||"function"!=typeof this._foreignModuleHost[e])return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(e){return Promise.reject(e)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then((e=>{const t=this._foreignModuleHost?Le.$E(this._foreignModuleHost):[];return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then((t=>{this._foreignModuleCreateData=null;const i=(t,i)=>e.fmr(t,i),n=(e,t)=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)};let o={};for(const e of t)o[e]=n(e,i);return o}))}))),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then((e=>this.getProxy()))}}var Ct,St=i(8411),xt=i(7736),kt=i(3824);function Dt(e){return"string"==typeof e}function Lt(e){return!Dt(e)}function Nt(e){return!e}function Et(e,t){return e.ignoreCase&&t?t.toLowerCase():t}function At(e){return e.replace(/[&<>'"_]/g,"-")}function Mt(e,t){return new Error(`${e.languageId}: ${t}`)}function It(e,t,i,n,o){let r=null;return t.replace(/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,(function(t,s,a,l,c,u,h,d,g){return Nt(a)?Nt(l)?!Nt(c)&&c0;){const t=e.tokenizer[i];if(t)return t;const n=i.lastIndexOf(".");i=n<0?null:i.substr(0,n)}return null}class Rt{constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}static create(e,t){return this._INSTANCE.create(e,t)}create(e,t){if(null!==e&&e.depth>=this._maxCacheDepth)return new Ot(e,t);let i=Ot.getStackElementId(e);i.length>0&&(i+="|"),i+=t;let n=this._entries[i];return n||(n=new Ot(e,t),this._entries[i]=n,n)}}Rt._INSTANCE=new Rt(5);class Ot{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";for(;null!==e;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){for(;null!==e&&null!==t;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return null===e&&null===t}equals(e){return Ot._equals(this,e)}push(e){return Rt.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return Rt.create(this.parent,e)}}class Ft{constructor(e,t){this.modeId=e,this.state=t}equals(e){return this.modeId===e.modeId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new Ft(this.modeId,this.state)}}class Pt{constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}static create(e,t){return this._INSTANCE.create(e,t)}create(e,t){if(null!==t)return new Bt(e,t);if(null!==e&&e.depth>=this._maxCacheDepth)return new Bt(e,t);let i=Ot.getStackElementId(e),n=this._entries[i];return n||(n=new Bt(e,null),this._entries[i]=n,n)}}Pt._INSTANCE=new Pt(5);class Bt{constructor(e,t){this.stack=e,this.embeddedModeData=t}clone(){return(this.embeddedModeData?this.embeddedModeData.clone():null)===this.embeddedModeData?this:Pt.create(this.stack,this.embeddedModeData)}equals(e){return e instanceof Bt&&!!this.stack.equals(e.stack)&&(null===this.embeddedModeData&&null===e.embeddedModeData||null!==this.embeddedModeData&&null!==e.embeddedModeData&&this.embeddedModeData.equals(e.embeddedModeData))}}class zt{constructor(){this._tokens=[],this._language=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterMode(e,t){this._language=t}emit(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._language||(this._lastTokenType=t,this._lastTokenLanguage=this._language,this._tokens.push(new q.WU(e,t,this._language)))}nestedModeTokenize(e,t,i,n){const o=i.modeId,r=i.state,s=be.RW.get(o);if(!s)return this.enterMode(n,o),this.emit(n,""),r;let a=s.tokenize(e,t,r,n);return this._tokens=this._tokens.concat(a.tokens),this._lastTokenType=null,this._lastTokenLanguage=null,this._language=null,a.endState}finalize(e){return new q.hG(this._tokens,e)}}class Wt{constructor(e,t){this._modeService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterMode(e,t){this._currentLanguageId=this._modeService.getLanguageIdentifier(t).id}emit(e,t){let i=this._theme.match(this._currentLanguageId,t);this._lastTokenMetadata!==i&&(this._lastTokenMetadata=i,this._tokens.push(e),this._tokens.push(i))}static _merge(e,t,i){let n=null!==e?e.length:0,o=t.length,r=null!==i?i.length:0;if(0===n&&0===o&&0===r)return new Uint32Array(0);if(0===n&&0===o)return i;if(0===o&&0===r)return e;let s=new Uint32Array(n+o+r);null!==e&&s.set(e);for(let e=0;e{if(o)return;let t=!1;for(let i=0,n=e.changedLanguages.length;i{}))}}getInitialState(){let e=Rt.create(null,this._lexer.start);return Pt.create(e,null)}tokenize(e,t,i,n){let o=new zt,r=this._tokenize(e,t,i,n,o);return o.finalize(r)}tokenize2(e,t,i,n){let o=new Wt(this._modeService,this._standaloneThemeService.getColorTheme().tokenTheme),r=this._tokenize(e,t,i,n,o);return o.finalize(r)}_tokenize(e,t,i,n,o){return i.embeddedModeData?this._nestedTokenize(e,t,i,n,o):this._myTokenize(e,t,i,n,o)}_findLeavingNestedModeOffset(e,t){let i=this._lexer.tokenizer[t.stack.state];if(!i&&(i=Tt(this._lexer,t.stack.state),!i))throw Mt(this._lexer,"tokenizer state is not defined: "+t.stack.state);let n=-1,o=!1;for(const t of i){if(!Lt(t.action)||"@pop"!==t.action.nextEmbedded)continue;o=!0;let i=t.regex,r=t.regex.source;if("^(?:"===r.substr(0,4)&&")"===r.substr(r.length-1,1)){let e=(i.ignoreCase?"i":"")+(i.unicode?"u":"");i=new RegExp(r.substr(4,r.length-5),e)}let s=e.search(i);-1===s||0!==s&&t.matchOnlyAtLineStart||(-1===n||s0&&o.nestedModeTokenize(s,!1,i.embeddedModeData,n);let a=e.substring(r);return this._myTokenize(a,t,i,n+r,o)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,i,n,o){o.enterMode(n,this._modeId);const r=e.length,s=t&&this._lexer.includeLF?e+"\n":e,a=s.length;let l=i.embeddedModeData,c=i.stack,u=0,h=null,d=!0;for(;d||u=a)break;d=!1;let e=this._lexer.tokenizer[_];if(!e&&(e=Tt(this._lexer,_),!e))throw Mt(this._lexer,"tokenizer state is not defined: "+_);let t=s.substr(u);for(const i of e)if((0===u||!i.matchOnlyAtLineStart)&&(v=t.match(i.regex),v)){b=v[0],y=i.action;break}}if(v||(v=[""],b=""),y||(u=this._lexer.maxStack)throw Mt(this._lexer,"maximum tokenizer stack size reached: ["+c.state+","+c.parent.state+",...]");c=c.push(_)}else if("@pop"===y.next){if(c.depth<=1)throw Mt(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(w));c=c.pop()}else if("@popall"===y.next)c=c.popall();else{let e=It(this._lexer,y.next,b,v,_);if("@"===e[0]&&(e=e.substr(1)),!Tt(this._lexer,e))throw Mt(this._lexer,"trying to set a next state '"+e+"' that is undefined in rule: "+this._safeRuleName(w));c=c.push(e)}}y.log&&"string"==typeof y.log&&(g=this._lexer,f=this._lexer.languageId+": "+It(this._lexer,y.log,b,v,_),console.log(`${g.languageId}: ${f}`))}if(null===S)throw Mt(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(w));const x=i=>{let r=this._modeService.getModeIdForLanguageName(i);r&&(i=r);const s=this._getNestedEmbeddedModeData(i);if(u0)throw Mt(this._lexer,"groups cannot be nested: "+this._safeRuleName(w));if(v.length!==S.length+1)throw Mt(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(w));let e=0;for(let t=1;te});class Ut{static colorizeElement(e,t,i,n){let o=(n=n||{}).theme||"vs",r=n.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!r)return console.error("Mode not detected"),Promise.resolve();e.setTheme(o);let s=i.firstChild?i.firstChild.nodeValue:"";return i.className+=" "+o,this.colorize(t,s||"",r,n).then((e=>{var t;const n=null!==(t=null==$t?void 0:$t.createHTML(e))&&void 0!==t?t:e;i.innerHTML=n}),(e=>console.error(e)))}static colorize(e,t,i,n){let o=4;n&&"number"==typeof n.tabSize&&(o=n.tabSize),Be.uS(t)&&(t=t.substr(1));let r=Be.uq(t),s=e.getModeId(i);if(!s)return Promise.resolve(qt(r,o));e.triggerMode(s);const a=be.RW.get(s);if(a)return jt(r,o,a);const l=be.RW.getPromise(s);return new Promise(l?(e,t)=>{l.then((i=>{jt(r,o,i).then(e,t)}),t)}:(e,t)=>{let i=null,n=null;const a=()=>{i&&(i.dispose(),i=null),n&&(n.dispose(),n=null);const a=be.RW.get(s);a?jt(r,o,a).then(e,t):e(qt(r,o))};n=new xe._F,n.cancelAndSet(a,500),i=be.RW.onDidChange((e=>{e.changedLanguages.indexOf(s)>=0&&a()}))})}static colorizeLine(e,t,i,n,o=4){const r=kt.wA.isBasicASCII(e,t),s=kt.wA.containsRTL(e,r,i);return(0,xt.tF)(new xt.IJ(!1,!0,e,!1,r,s,0,n,[],o,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,t,i=4){let n=e.getLineContent(t);e.forceTokenization(t);let o=e.getLineTokens(t).inflate();return this.colorizeLine(n,e.mightContainNonBasicASCII(),e.mightContainRTL(),o,i)}}function jt(e,t,i){return new Promise(((n,o)=>{const r=()=>{const s=function(e,t,i){let n=[],o=i.getInitialState();for(let r=0,s=e.length;r"),o=a.endState}return n.join("")}(e,t,i);if(i instanceof Vt){const e=i.getLoadStatus();if(!1===e.loaded)return void e.promise.then(r,o)}n(s)};r()}))}function qt(e,t){let i=[];const n=new Uint32Array(2);n[0]=0,n[1]=16793600;for(let o=0,r=e.length;o")}return i.join("")}var Kt=i(9069),Gt=i(4603),Yt=i(5520),Zt=i(6007),Xt=i(6345),Qt=i(9386),Jt=i(3108),ei=i(3193);class ti{constructor(e={},t=[],i=[]){this._contents=e,this._keys=t,this._overrides=i,this.isFrozen=!1}get contents(){return this.checkAndFreeze(this._contents)}get overrides(){return this.checkAndFreeze(this._overrides)}get keys(){return this.checkAndFreeze(this._keys)}isEmpty(){return 0===this._keys.length&&0===Object.keys(this._contents).length&&0===this._overrides.length}getValue(e){return e?(0,Jt.Mt)(this.contents,e):this.contents}override(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||"object"!=typeof t||!Object.keys(t).length)return this;let i={};for(const e of ct.EB([...Object.keys(this.contents),...Object.keys(t)])){let n=this.contents[e],o=t[e];o&&("object"==typeof n&&"object"==typeof o?(n=ge.I8(n),this.mergeContents(n,o)):n=o),i[e]=n}return new ti(i,this.keys,this.overrides)}merge(...e){const t=ge.I8(this.contents),i=ge.I8(this.overrides),n=[...this.keys];for(const o of e){this.mergeContents(t,o.contents);for(const e of o.overrides){const[t]=i.filter((t=>ct.fS(t.identifiers,e.identifiers)));t?this.mergeContents(t.contents,e.contents):i.push(ge.I8(e))}for(const e of o.keys)-1===n.indexOf(e)&&n.push(e)}return new ti(t,n,i)}freeze(){return this.isFrozen=!0,this}mergeContents(e,t){for(const i of Object.keys(t))i in e&&Le.Kn(e[i])&&Le.Kn(t[i])?this.mergeContents(e[i],t[i]):e[i]=ge.I8(t[i])}checkAndFreeze(e){return this.isFrozen&&!Object.isFrozen(e)?ge._A(e):e}getContentsForOverrideIdentifer(e){for(const t of this.overrides)if(-1!==t.identifiers.indexOf(e))return t.contents;return null}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,t){this.addKey(e),(0,Jt.KV)(this.contents,e,t,(e=>{throw new Error(e)}))}removeValue(e){this.removeKey(e)&&(0,Jt.xL)(this.contents,e)}addKey(e){let t=this.keys.length;for(let i=0;iconsole.error(`Conflict in default settings file: ${e}`)))});super(e,t,i)}}class ni{constructor(e,t,i=new ti,n=new ti,o=new J.Y9,r=new ti,s=new J.Y9,a=!0){this._defaultConfiguration=e,this._localUserConfiguration=t,this._remoteUserConfiguration=i,this._workspaceConfiguration=n,this._folderConfigurations=o,this._memoryConfiguration=r,this._memoryConfigurationByResource=s,this._freeze=a,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new J.Y9,this._userConfiguration=null}getValue(e,t,i){return this.getConsolidateConfigurationModel(t,i).getValue(e)}updateValue(e,t,i={}){let n;i.resource?(n=this._memoryConfigurationByResource.get(i.resource),n||(n=new ti,this._memoryConfigurationByResource.set(i.resource,n))):n=this._memoryConfiguration,void 0===t?n.removeValue(e):n.setValue(e,t),i.resource||(this._workspaceConsolidatedConfiguration=null)}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration}getConsolidateConfigurationModel(e,t){let i=this.getConsolidatedConfigurationModelForResource(e,t);return e.overrideIdentifier?i.override(e.overrideIdentifier):i}getConsolidatedConfigurationModelForResource({resource:e},t){let i=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const n=t.getFolder(e);n&&(i=this.getFolderConsolidatedConfiguration(n.uri)||i);const o=this._memoryConfigurationByResource.get(e);o&&(i=i.merge(o))}return i}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const i=this.getWorkspaceConsolidatedConfiguration(),n=this._folderConfigurations.get(e);n?(t=i.merge(n),this._freeze&&(t=t.freeze()),this._foldersConsolidatedConfigurations.set(e,t)):t=i}return t}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce(((e,t)=>{const{contents:i,overrides:n,keys:o}=this._folderConfigurations.get(t);return e.push([t,{contents:i,overrides:n,keys:o}]),e}),[])}}static parse(e){const t=this.parseConfigurationModel(e.defaults),i=this.parseConfigurationModel(e.user),n=this.parseConfigurationModel(e.workspace),o=e.folders.reduce(((e,t)=>(e.set(H.o.revive(t[0]),this.parseConfigurationModel(t[1])),e)),new J.Y9);return new ni(t,i,new ti,n,o,new ti,new J.Y9,!1)}static parseConfigurationModel(e){return new ti(e.contents,e.keys,e.overrides).freeze()}}class oi{constructor(e,t,i,n){this.change=e,this.previous=t,this.currentConfiguraiton=i,this.currentWorkspace=n,this._previousConfiguration=void 0;const o=new Set;e.keys.forEach((e=>o.add(e))),e.overrides.forEach((([,e])=>e.forEach((e=>o.add(e))))),this.affectedKeys=[...o.values()];const r=new ti;this.affectedKeys.forEach((e=>r.setValue(e,{}))),this.affectedKeysTree=r.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=ni.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,t){var i;if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,e)){if(t){const n=this.previousConfiguration?this.previousConfiguration.getValue(e,t,null===(i=this.previous)||void 0===i?void 0:i.workspace):void 0,o=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!ge.fS(n,o)}return!0}return!1}doesAffectedKeysTreeContains(e,t){let i,n=(0,Jt.Od)({[t]:!0},(()=>{}));for(;"object"==typeof n&&(i=Object.keys(n)[0]);){if(!(e=e[i]))return!1;n=n[i]}return!0}}var ri=i(3580);class si extends de.JT{constructor(e,t,i,n,o){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=i,this._notificationService=n,this._logService=o,this._onDidUpdateKeybindings=this._register(new W.Q5),this._currentChord=null,this._currentChordChecker=new xe.zh,this._currentChordStatusMessage=null,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new xe._F,this._logging=!1}get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:W.ju.None}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t){const i=this._getResolver().lookupPrimaryKeybinding(e,t);if(i)return i.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){const i=this.resolveKeyboardEvent(e);if(i.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;const[n]=i.getDispatchParts();if(null===n)return null;const o=this._contextKeyService.getContext(t),r=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(o,r,n)}_enterChordMode(e,t){this._currentChord={keypress:e,label:t},this._currentChordStatusMessage=this._notificationService.status(ri.N("first.chord","({0}) was pressed. Waiting for second key of chord...",t));const i=Date.now();this._currentChordChecker.cancelAndSet((()=>{this._documentHasFocus()?Date.now()-i>5e3&&this._leaveChordMode():this._leaveChordMode()}),500)}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const i=this.resolveKeyboardEvent(e),[n]=i.getSingleModifierDispatchParts();return null!==n&&null===this._currentSingleModifier?(this._log(`+ Storing single modifier for possible chord ${n}.`),this._currentSingleModifier=n,this._currentSingleModifierClearTimeout.cancelAndSet((()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null}),300),!1):null!==n&&n===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${n} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(i,t,!0)):(this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1)}_doDispatch(e,t,i=!1){let n=!1;if(e.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),!1;let o=null,r=null;if(i){const[t]=e.getSingleModifierDispatchParts();o=t,r=t}else[o]=e.getDispatchParts(),r=this._currentChord?this._currentChord.keypress:null;if(null===o)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),n;const s=this._contextKeyService.getContext(t),a=e.getLabel(),l=this._getResolver().resolve(s,r,o);return this._logService.trace("KeybindingService#dispatch",a,null==l?void 0:l.commandId),l&&l.enterChord?(n=!0,this._enterChordMode(o,a),n):(this._currentChord&&(l&&l.commandId||(this._notificationService.status(ri.N("missing.chord","The key combination ({0}, {1}) is not a command.",this._currentChord.label,a),{hideAfter:1e4}),n=!0)),this._leaveChordMode(),l&&l.commandId&&(l.bubble||(n=!0),void 0===l.commandArgs?this._commandService.executeCommand(l.commandId).then(void 0,(e=>this._notificationService.warn(e))):this._commandService.executeCommand(l.commandId,l.commandArgs).then(void 0,(e=>this._notificationService.warn(e))),this._telemetryService.publicLog2("workbenchActionExecuted",{id:l.commandId,from:"keybinding"})),n)}mightProducePrintableCharacter(e){return!e.ctrlKey&&!e.metaKey&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30)}}class ai{constructor(e,t,i){this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(let t=0,i=e.length;t=0;i--)this._isTargetedForRemoval(e[i],o,r,t,s)&&e.splice(i,1)}return e.concat(i)}_addKeyPress(e,t){const i=this._map.get(e);if(void 0===i)return this._map.set(e,[t]),void this._addToLookupMap(t);for(let e=i.length-1;e>=0;e--){let n=i[e];if(n.command===t.command)continue;const o=n.keypressParts.length>1,r=t.keypressParts.length>1;o&&r&&n.keypressParts[1]!==t.keypressParts[1]||ai.whenIsEntirelyIncluded(n.when,t.when)&&this._removeFromLookupMap(n)}i.push(t),this._addToLookupMap(t)}_addToLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);void 0===t?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);if(void 0!==t)for(let i=0,n=t.length;i9===e.type?e.expr:[e];let n=i(e.negate()).concat(i(t));for(let e=0;et.contextMatchesRules(e.when)));return null!=n?n:i[i.length-1]}resolve(e,t,i){this._log(`| Resolving ${i}${t?` chorded from ${t}`:""}`);let n=null;if(null!==t){const e=this._map.get(t);if(void 0===e)return this._log("\\ No keybinding entries."),null;n=[];for(let t=0,o=e.length;t1&&null!==o.keypressParts[1]?(this._log(`\\ From ${n.length} keybinding entries, matched chord, when: ${li(o.when)}, source: ${ci(o)}.`),{enterChord:!0,leaveChord:!1,commandId:null,commandArgs:null,bubble:!1}):(this._log(`\\ From ${n.length} keybinding entries, matched ${o.command}, when: ${li(o.when)}, source: ${ci(o)}.`),{enterChord:!1,leaveChord:o.keypressParts.length>1,commandId:o.command,commandArgs:o.commandArgs,bubble:o.bubble}):(this._log(`\\ From ${n.length} keybinding entries, no when clauses matched the context.`),null)}_findCommand(e,t){for(let i=t.length-1;i>=0;i--){let n=t[i];if(ai.contextMatchesRules(e,n.when))return n}return null}static contextMatchesRules(e,t){return!t||t.evaluate(e)}}function li(e){return e?`${e.serialize()}`:"no when condition"}function ci(e){return e.extensionId?e.isBuiltinExtension?`built-in extension ${e.extensionId}`:`user extension ${e.extensionId}`:e.isDefault?"built-in":"user"}var ui=i(9989);class hi{constructor(e,t,i,n,o,r,s){this.resolvedKeybinding=e,this.keypressParts=e?di(e.getDispatchParts()):[],e&&0===this.keypressParts.length&&(this.keypressParts=di(e.getSingleModifierDispatchParts())),this.bubble=!!t&&94===t.charCodeAt(0),this.command=this.bubble?t.substr(1):t,this.commandArgs=i,this.when=n,this.isDefault=o,this.extensionId=r,this.isBuiltinExtension=s}}function di(e){let t=[];for(let i=0,n=e.length;ithis._getLabel(e)))}getAriaLabel(){return gi.X4.toLabel(this._os,this._parts,(e=>this._getAriaLabel(e)))}isChord(){return this._parts.length>1}getParts(){return this._parts.map((e=>this._getPart(e)))}_getPart(e){return new V.BQ(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchParts(){return this._parts.map((e=>this._getDispatchPart(e)))}getSingleModifierDispatchParts(){return this._parts.map((e=>this._getSingleModifierDispatchPart(e)))}}class pi extends fi{constructor(e,t){super(t,e.parts)}_keyCodeToUILabel(e){if(2===this._os)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return V.kL.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":V.kL.toString(e.keyCode)}_getDispatchPart(e){return pi.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=V.kL.toString(e.keyCode),t}_getSingleModifierDispatchPart(e){return 5!==e.keyCode||e.shiftKey||e.altKey||e.metaKey?4!==e.keyCode||e.ctrlKey||e.altKey||e.metaKey?6!==e.keyCode||e.ctrlKey||e.shiftKey||e.metaKey?57!==e.keyCode||e.ctrlKey||e.shiftKey||e.altKey?null:"meta":"alt":"shift":"ctrl"}}var mi=i(9422),_i=i(382),vi=i(913),bi=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},yi=function(e,t){return function(i,n){t(i,n,e)}},wi=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class Ci{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new W.Q5}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let Si=class{constructor(e){this.modelService=e}setEditor(e){this.editor=e}createModelReference(e){let t=null;var i,n,o;return this.editor&&(i=this.editor,n=t=>this.findModel(t,e),o=t=>this.findModel(t.getOriginalEditor(),e)||this.findModel(t.getModifiedEditor(),e),t=(0,Yt.CL)(i)?n(i):o(i)),t?Promise.resolve(new de.Jz(new Ci(t))):Promise.reject(new Error("Model not found"))}findModel(e,t){let i=this.modelService.getModel(t);return i&&i.uri.toString()!==t.toString()?null:i}};Si=bi([yi(0,at.q)],Si);class xi{show(){return xi.NULL_PROGRESS_RUNNER}showWhile(e,t){return wi(this,void 0,void 0,(function*(){yield e}))}}xi.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class ki{confirm(e){return this.doConfirm(e).then((e=>({confirmed:e,checkboxChecked:!1})))}doConfirm(e){let t=e.message;return e.detail&&(t=t+"\n\n"+e.detail),Promise.resolve(window.confirm(t))}show(e,t,i,n){return Promise.resolve({choice:0})}}class Di{info(e){return this.notify({severity:Gt.Z.Info,message:e})}warn(e){return this.notify({severity:Gt.Z.Warning,message:e})}error(e){return this.notify({severity:Gt.Z.Error,message:e})}notify(e){switch(e.severity){case Gt.Z.Error:console.error(e.message);break;case Gt.Z.Warning:console.warn(e.message);break;default:console.log(e.message)}return Di.NO_OP}status(e,t){return de.JT.None}}Di.NO_OP=new mi.EO;class Li{constructor(e){this._onWillExecuteCommand=new W.Q5,this._onDidExecuteCommand=new W.Q5,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const i=ne.P.getCommand(e);if(!i)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const n=this._instantiationService.invokeFunction.apply(this._instantiationService,[i.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(e){return Promise.reject(e)}}}class Ni extends si{constructor(e,t,i,n,o,r){super(e,t,i,n,o),this._cachedResolver=null,this._dynamicKeybindings=[],this._register(X.nm(r,X.tw.KEY_DOWN,(e=>{const t=new Kt.y(e);this._dispatch(t,t.target)&&(t.preventDefault(),t.stopPropagation())}))),this._register(X.nm(window,X.tw.KEY_UP,(e=>{const t=new Kt.y(e);this._singleModifierDispatch(t,t.target)&&t.preventDefault()})))}addDynamicKeybinding(e,t,i,n){const o=(0,V.gm)(t,De.OS),r=new de.SL;return o&&(this._dynamicKeybindings.push({keybinding:o,command:e,when:n,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}),r.add((0,de.OF)((()=>{for(let t=0;tthis._log(e)))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(e,t){let i=[],n=0;for(const o of e){const e=o.when||void 0,r=o.keybinding;if(r){const s=this.resolveKeybinding(r);for(const r of s)i[n++]=new hi(r,o.command,o.commandArgs,e,t,null,!1)}else i[n++]=new hi(void 0,o.command,o.commandArgs,e,t,null,!1)}return i}resolveKeybinding(e){return[new pi(e,De.OS)]}resolveKeyboardEvent(e){let t=new V.QC(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode).toChord();return new pi(t,De.OS)}}function Ei(e){return e&&"object"==typeof e&&(!e.overrideIdentifier||"string"==typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof H.o)}class Ai{constructor(){this._onDidChangeConfiguration=new W.Q5,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configuration=new ni(new ii,new ti)}getValue(e,t){const i="string"==typeof e?e:void 0,n=Ei(e)?e:Ei(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){const t={data:this._configuration.toData()};let i=[];for(const t of e){const[e,n]=t;this.getValue(e)!==n&&(this._configuration.updateValue(e,n),i.push(e))}if(i.length>0){const e=new oi({keys:i,overrides:[]},t,this._configuration);e.source=7,e.sourceConfig=null,this._onDidChangeConfiguration.fire(e)}return Promise.resolve()}}class Mi{constructor(e){this.configurationService=e,this._onDidChangeConfiguration=new W.Q5,this.configurationService.onDidChangeConfiguration((e=>{this._onDidChangeConfiguration.fire({affectedKeys:e.affectedKeys,affectsConfiguration:(t,i)=>e.affectsConfiguration(i)})}))}getValue(e,t,i){const n=$.L.isIPosition(t)&&t?"string"==typeof i?i:void 0:"string"==typeof t?t:void 0;return void 0===n?this.configurationService.getValue():this.configurationService.getValue(n)}}let Ii=class{constructor(e){this.configurationService=e}getEOL(e,t){const i=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return i&&"auto"!==i?i:De.IJ||De.dz?"\n":"\r\n"}};Ii=bi([yi(0,Jt.Ui)],Ii);class Ti{publicLog(e,t){return Promise.resolve(void 0)}publicLog2(e,t){return this.publicLog(e,t)}}class Ri{constructor(){const e=H.o.from({scheme:Ri.SCHEME,authority:"model",path:"/"});this.workspace={id:"4064f6ec-cb38-4ad0-af64-ee6467e63c82",folders:[new _i.md({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}}function Oi(e,t,i){if(!t)return;if(!(e instanceof Ai))return;let n=[];Object.keys(t).forEach((e=>{(0,Xt.ei)(e)&&n.push([`editor.${e}`,t[e]]),i&&(0,Xt.Pe)(e)&&n.push([`diffEditor.${e}`,t[e]])})),n.length>0&&e.updateValues(n)}Ri.SCHEME="inmemory";class Fi{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}apply(e,t){return wi(this,void 0,void 0,(function*(){const t=new Map;for(let i of e){if(!(i instanceof Zt.Gl))throw new Error("bad edit - only text edits are supported");const e=this._modelService.getModel(i.resource);if(!e)throw new Error("bad edit - model not found");if("number"==typeof i.versionId&&e.getVersionId()!==i.versionId)throw new Error("bad state - model changed in the meantime");let n=t.get(e);n||(n=[],t.set(e,n)),n.push(Qt.h.replaceMove(U.e.lift(i.textEdit.range),i.textEdit.text))}let i=0,n=0;for(const[e,o]of t)e.pushStackElement(),e.pushEditOperations([],o,(()=>[])),e.pushStackElement(),n+=1,i+=o.length;return{ariaSummary:Be.WU(vi.UL.bulkEditServiceSummary,i,n)}}))}}class Pi{getUriLabel(e,t){return"file"===e.scheme?e.fsPath:e.path}}class Bi{constructor(e,t){this._codeEditorService=e,this._container=t,this.onDidLayout=W.ju.None}get dimension(){return this._dimension||(this._dimension=X.D6(window.document.body)),this._dimension}get container(){return this._container}focus(){var e;null===(e=this._codeEditorService.getFocusedCodeEditor())||void 0===e||e.focus()}}var zi,Wi=i(5152),Vi=i(2073),Hi=i(8626),$i=i(3098),Ui=i(9052),ji=i(9925),qi=i(317),Ki=i(9802),Gi=i(4741),Yi=i(6830),Zi=i(7869),Xi=i(8819),Qi=i(3910),Ji=i(7781),en=i(3046),tn=i(9554);class nn{constructor(e,t,i,n){this.originalLineStart=e,this.originalLineEnd=t,this.modifiedLineStart=i,this.modifiedLineEnd=n}getType(){return 0===this.originalLineStart?1:0===this.modifiedLineStart?2:0}}class on{constructor(e){this.entries=e}}const rn=(0,tn.q5)("diff-review-insert",en.lA.add,ri.N("diffReviewInsertIcon","Icon for 'Insert' in diff review.")),sn=(0,tn.q5)("diff-review-remove",en.lA.remove,ri.N("diffReviewRemoveIcon","Icon for 'Remove' in diff review.")),an=(0,tn.q5)("diff-review-close",en.lA.close,ri.N("diffReviewCloseIcon","Icon for 'Close' in diff review."));class ln extends de.JT{constructor(e){super(),this._width=0,this._diffEditor=e,this._isVisible=!1,this.shadow=(0,Hi.X)(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=(0,Hi.X)(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new qi.o(this.actionBarContainer.domNode)),this._actionBar.push(new Gi.aU("diffreview.close",ri.N("label.close","Close"),"close-diff-review "+Ji.kS.asClassName(an),!0,(()=>{return e=this,t=void 0,n=function*(){return this.hide()},new((i=void 0)||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}));var e,t,i,n})),{label:!1,icon:!0}),this.domNode=(0,Hi.X)(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=(0,Hi.X)(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new Ki.s$(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(e.onDidUpdateDiff((()=>{this._isVisible&&(this._diffs=this._compute(),this._render())}))),this._register(e.getModifiedEditor().onDidChangeCursorPosition((()=>{this._isVisible&&this._render()}))),this._register(X.mu(this.domNode.domNode,"click",(e=>{e.preventDefault();let t=X.Fx(e.target,"diff-review-row");t&&this._goToRow(t)}))),this._register(X.mu(this.domNode.domNode,"keydown",(e=>{(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),this._goToRow(this._getNextRow())),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),this._goToRow(this._getPrevRow())),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033))&&(e.preventDefault(),this.hide()),(e.equals(10)||e.equals(3))&&(e.preventDefault(),this.accept())}))),this._diffs=[],this._currentDiff=null}prev(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let t=-1;for(let e=0,i=this._diffs.length;e0){const t=e[r-1];n=0===t.originalEndLineNumber?t.originalStartLineNumber+1:t.originalEndLineNumber+1,o=0===t.modifiedEndLineNumber?t.modifiedStartLineNumber+1:t.modifiedEndLineNumber+1}let s=t-3+1,a=i-3+1;if(sa){const e=a-p;p+=e,m+=e}if(m>f){const e=f-m;p+=e,m+=e}d[g++]=new nn(n,p,o,m)}n[o++]=new on(d)}let r=n[0].entries,s=[],a=0;for(let e=1,t=n.length;eu)&&(u=n),0!==o&&(0===h||od)&&(d=r)}let g=document.createElement("div");g.className="diff-review-row";let f=document.createElement("div");f.className="diff-review-cell diff-review-summary";const p=u-c+1,m=d-h+1;f.appendChild(document.createTextNode(`${s+1}/${this._diffs.length}: @@ -${c},${p} +${h},${m} @@`)),g.setAttribute("data-line",String(h));const _=e=>0===e?ri.N("no_lines_changed","no lines changed"):1===e?ri.N("one_line_changed","1 line changed"):ri.N("more_lines_changed","{0} lines changed",e),v=_(p),b=_(m);g.setAttribute("aria-label",ri.N({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",s+1,this._diffs.length,c,v,h,b)),g.appendChild(f),g.setAttribute("role","listitem"),l.appendChild(g);const y=t.get(56);let w=h;for(let s=0,c=a.length;se}),(0,Ji.Ic)(((e,t)=>{const i=e.getColor(Zi.hw);i&&t.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${i}; }`);const n=e.getColor(Qi._w);n&&t.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${n} 0 -6px 6px -6px inset; }`)}));class cn extends Yi.R6{constructor(){super({id:"editor.action.diffReview.next",label:ri.N("editor.action.diffReview.next","Go to Next Difference"),alias:"Go to Next Difference",precondition:Xi.Ao.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(e,t){const i=hn(e);i&&i.diffReviewNext()}}class un extends Yi.R6{constructor(){super({id:"editor.action.diffReview.prev",label:ri.N("editor.action.diffReview.prev","Go to Previous Difference"),alias:"Go to Previous Difference",precondition:Xi.Ao.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1089,weight:100}})}run(e,t){const i=hn(e);i&&i.diffReviewPrev()}}function hn(e){const t=e.get(Z.$),i=t.listDiffEditors(),n=t.getActiveCodeEditor();if(!n)return null;for(let e=0,t=i.length;en.modifiedStartLineNumber?ri.N("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):ri.N("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"),void 0,!0,(()=>bn(this,void 0,void 0,(function*(){const e=new U.e(n.originalStartLineNumber,1,n.originalEndLineNumber+1,1),t=n.originalModel.getValueInRange(e);yield this._clipboardService.writeText(t)})))));let c,u=0;n.originalEndLineNumber>n.modifiedStartLineNumber&&(c=new Gi.aU("diff.clipboard.copyDeletedLineContent",ri.N("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber),void 0,!0,(()=>bn(this,void 0,void 0,(function*(){const e=n.originalModel.getLineContent(n.originalStartLineNumber+u);yield this._clipboardService.writeText(e)})))),l.push(c)),i.getOption(78)||l.push(new Gi.aU("diff.inline.revertChange",ri.N("diff.inline.revertChange.label","Revert this change"),void 0,!0,(()=>bn(this,void 0,void 0,(function*(){const e=new U.e(n.originalStartLineNumber,1,n.originalEndLineNumber,n.originalModel.getLineMaxColumn(n.originalEndLineNumber)),t=n.originalModel.getValueInRange(e);if(0===n.modifiedEndLineNumber){const e=i.getModel().getLineMaxColumn(n.modifiedStartLineNumber);i.executeEdits("diffEditor",[{range:new U.e(n.modifiedStartLineNumber,e,n.modifiedStartLineNumber,e),text:a+t}])}else{const e=i.getModel().getLineMaxColumn(n.modifiedEndLineNumber);i.executeEdits("diffEditor",[{range:new U.e(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,e),text:t}])}})))));const h=(e,t)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:e,y:t}),getActions:()=>(c&&(c.label=ri.N("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber+u)),l),autoSelectFirstItem:!0})};this._register(X.mu(this._diffActions,"mousedown",(e=>{const{top:t,height:i}=X.i(this._diffActions);let n=Math.floor(s/3);e.preventDefault(),h(e.posx,t+i+n)}))),this._register(i.onMouseMove((e=>{(8===e.target.type||5===e.target.type)&&e.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,u=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,s)):this.visibility=!1}))),this._register(i.onMouseDown((e=>{!e.event.rightButton||8!==e.target.type&&5!==e.target.type||e.target.detail.viewZoneId===this._viewZoneId&&(e.event.preventDefault(),u=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,s),h(e.event.posx,e.event.posy+s))})))}get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,this._diffActions.style.visibility=e?"visible":"hidden")}_updateLightBulbPosition(e,t,i){const{top:n}=X.i(e),o=t-n,r=Math.floor(o/i),s=r*i;if(this._diffActions.style.top=`${s}px`,this.diff.viewLineCounts){let e=0;for(let t=0;t!this._zonesMap[String(e.id)]))}clean(e){this._zones.length>0&&e.changeViewZones((e=>{for(const t of this._zones)e.removeZone(t)})),this._zones=[],this._zonesMap={},this._decorations=e.deltaDecorations(this._decorations,[])}apply(e,t,i,n){const o=n?ji.ZF.capture(e):null;e.changeViewZones((t=>{for(const e of this._zones)t.removeZone(e);for(const e of this._inlineDiffMargins)e.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let n=0,o=i.zones.length;ne});let In=class e extends de.JT{constructor(t,i,n,o,r,s,a,l,c,u,h,d){super(),this._editorProgressService=d,this._onDidDispose=this._register(new W.Q5),this.onDidDispose=this._onDidDispose.event,this._onDidUpdateDiff=this._register(new W.Q5),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new W.Q5),this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._editorWorkerService=r,this._codeEditorService=l,this._contextKeyService=this._register(s.createScoped(t)),this._instantiationService=a.createChild(new _n.y([Xi.i6,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=c,this._notificationService=u,this._id=++Nn,this._state=0,this._updatingDiffProgress=null,this._domElement=t,i=i||{},this._renderSideBySide=!0,void 0!==i.renderSideBySide&&(this._renderSideBySide=i.renderSideBySide),this._maxComputationTime=5e3,void 0!==i.maxComputationTime&&(this._maxComputationTime=i.maxComputationTime),this._ignoreTrimWhitespace=!0,void 0!==i.ignoreTrimWhitespace&&(this._ignoreTrimWhitespace=i.ignoreTrimWhitespace),this._renderIndicators=!0,void 0!==i.renderIndicators&&(this._renderIndicators=i.renderIndicators),this._originalIsEditable=(0,B.O7)(i.originalEditable,!1),this._diffCodeLens=(0,B.O7)(i.diffCodeLens,!1),this._diffWordWrap=Hn(i.diffWordWrap,"inherit"),void 0!==i.isInEmbeddedEditor?this._contextKeyService.createKey("isInEmbeddedDiffEditor",i.isInEmbeddedEditor):this._contextKeyService.createKey("isInEmbeddedDiffEditor",!1),this._renderOverviewRuler=!0,void 0!==i.renderOverviewRuler&&(this._renderOverviewRuler=Boolean(i.renderOverviewRuler)),this._updateDecorationsRunner=this._register(new xe.pY((()=>this._updateDecorations()),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=(0,Hi.X)(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewDomElement=document.createElement("div"),this._overviewDomElement.className="diffOverview",this._overviewDomElement.style.position="absolute",this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode),this._register(X.mu(this._overviewDomElement,"mousedown",(e=>{this._modifiedEditor.delegateVerticalScrollbarMouseDown(e)}))),this._renderOverviewRuler&&this._containerDomElement.appendChild(this._overviewDomElement),this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode),this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode),this._beginUpdateDecorationsTimeout=-1,this._currentlyChangingViewZones=!1,this._diffComputationToken=0,this._originalEditorState=new Ln(h,o),this._modifiedEditorState=new Ln(h,o),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new xn.I(this._containerDomElement,i.dimension,(()=>this._onDidContainerSizeChanged()))),i.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(i,n.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(i,n.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=new ln(this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._enableSplitViewResizing=!0,void 0!==i.enableSplitViewResizing&&(this._enableSplitViewResizing=i.enableSplitViewResizing),this._renderSideBySide?this._setStrategy(new Bn(this._createDataSource(),this._enableSplitViewResizing)):this._setStrategy(new Wn(this._createDataSource(),this._enableSplitViewResizing)),this._register(c.onDidColorThemeChange((t=>{this._strategy&&this._strategy.applyColors(t)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._renderSideBySide)})));const g=Yi.Uc.getDiffEditorContributions();for(const e of g)try{this._register(a.createInstance(e.ctor,this))}catch(e){(0,ke.dL)(e)}this._codeEditorService.addDiffEditor(this)}_setState(e){this._state!==e&&(this._state=e,this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),1===this._state&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3)))}diffReviewNext(){this._reviewPane.next()}diffReviewPrev(){this._reviewPane.prev()}static _getClassName(e,t){let i="monaco-diff-editor monaco-editor-background ";return t&&(i+="side-by-side "),i+=(0,Ji.m6)(e.type),i}_recreateOverviewRulers(){this._renderOverviewRuler&&(this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._originalEditor.hasModel()&&(this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers())}_createLeftHandSideEditor(t,i){const n=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(t),i);this._register(n.onDidScrollChange((e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())}))),this._register(n.onDidChangeViewZones((()=>{this._onViewZonesChanged()}))),this._register(n.onDidChangeConfiguration((e=>{n.getModel()&&(e.hasChanged(40)&&this._updateDecorationsRunner.schedule(),e.hasChanged(129)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))}))),this._register(n.onDidChangeModelContent((()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})));const o=this._contextKeyService.createKey("isInDiffLeftEditor",n.hasWidgetFocus());return this._register(n.onDidFocusEditorWidget((()=>o.set(!0)))),this._register(n.onDidBlurEditorWidget((()=>o.set(!1)))),this._register(n.onDidContentSizeChange((t=>{const i=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,n=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:n,contentWidth:i,contentHeightChanged:t.contentHeightChanged,contentWidthChanged:t.contentWidthChanged})}))),n}_createRightHandSideEditor(t,i){const n=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(t),i);this._register(n.onDidScrollChange((e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())}))),this._register(n.onDidChangeViewZones((()=>{this._onViewZonesChanged()}))),this._register(n.onDidChangeConfiguration((e=>{n.getModel()&&(e.hasChanged(40)&&this._updateDecorationsRunner.schedule(),e.hasChanged(129)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))}))),this._register(n.onDidChangeModelContent((()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}))),this._register(n.onDidChangeModelOptions((e=>{e.tabSize&&this._updateDecorationsRunner.schedule()})));const o=this._contextKeyService.createKey("isInDiffRightEditor",n.hasWidgetFocus());return this._register(n.onDidFocusEditorWidget((()=>o.set(!0)))),this._register(n.onDidBlurEditorWidget((()=>o.set(!1)))),this._register(n.onDidContentSizeChange((t=>{const i=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,n=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:n,contentWidth:i,contentHeightChanged:t.contentHeightChanged,contentWidthChanged:t.contentWidthChanged})}))),n}_createInnerEditor(e,t,i,n){return e.createInstance(Vi.Gm,t,i,n)}dispose(){this._codeEditorService.removeDiffEditor(this),-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._cleanViewZonesAndDecorations(),this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode),this._renderOverviewRuler&&this._containerDomElement.removeChild(this._overviewDomElement),this._containerDomElement.removeChild(this._originalDomNode),this._originalEditor.dispose(),this._containerDomElement.removeChild(this._modifiedDomNode),this._modifiedEditor.dispose(),this._strategy.dispose(),this._containerDomElement.removeChild(this._reviewPane.domNode.domNode),this._containerDomElement.removeChild(this._reviewPane.shadow.domNode),this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode),this._reviewPane.dispose(),this._domElement.removeChild(this._containerDomElement),this._onDidDispose.fire(),super.dispose()}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return _e.g.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(t){let i=!1;void 0!==t.renderSideBySide&&this._renderSideBySide!==t.renderSideBySide&&(this._renderSideBySide=t.renderSideBySide,i=!0),void 0!==t.maxComputationTime&&(this._maxComputationTime=t.maxComputationTime,this._isVisible&&this._beginUpdateDecorationsSoon());let n=!1;void 0!==t.ignoreTrimWhitespace&&this._ignoreTrimWhitespace!==t.ignoreTrimWhitespace&&(this._ignoreTrimWhitespace=t.ignoreTrimWhitespace,n=!0),void 0!==t.renderIndicators&&this._renderIndicators!==t.renderIndicators&&(this._renderIndicators=t.renderIndicators,n=!0),n&&this._beginUpdateDecorations(),this._originalIsEditable=(0,B.O7)(t.originalEditable,this._originalIsEditable),this._diffCodeLens=(0,B.O7)(t.diffCodeLens,this._diffCodeLens),this._diffWordWrap=Hn(t.diffWordWrap,this._diffWordWrap),this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(t)),this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(t)),void 0!==t.enableSplitViewResizing&&(this._enableSplitViewResizing=t.enableSplitViewResizing),this._strategy.setEnableSplitViewResizing(this._enableSplitViewResizing),i&&(this._renderSideBySide?this._setStrategy(new Bn(this._createDataSource(),this._enableSplitViewResizing)):this._setStrategy(new Wn(this._createDataSource(),this._enableSplitViewResizing)),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._renderSideBySide)),void 0!==t.renderOverviewRuler&&this._renderOverviewRuler!==t.renderOverviewRuler&&(this._renderOverviewRuler=t.renderOverviewRuler,this._renderOverviewRuler?this._containerDomElement.appendChild(this._overviewDomElement):this._containerDomElement.removeChild(this._overviewDomElement))}getModel(){return{original:this._originalEditor.getModel(),modified:this._modifiedEditor.getModel()}}setModel(e){if(e&&(!e.original||!e.modified))throw new Error(e.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this._originalEditor.setModel(e?e.original:null),this._modifiedEditor.setModel(e?e.modified:null),this._updateDecorationsRunner.cancel(),e&&(this._originalEditor.setScrollTop(0),this._modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),e&&(this._recreateOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport()}getDomNode(){return this._domElement}getVisibleColumnFromPosition(e){return this._modifiedEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._modifiedEditor.getPosition()}setPosition(e){this._modifiedEditor.setPosition(e)}revealLine(e,t=0){this._modifiedEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._modifiedEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._modifiedEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._modifiedEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._modifiedEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._modifiedEditor.revealPositionNearTop(e,t)}getSelection(){return this._modifiedEditor.getSelection()}getSelections(){return this._modifiedEditor.getSelections()}setSelection(e){this._modifiedEditor.setSelection(e)}setSelections(e){this._modifiedEditor.setSelections(e)}revealLines(e,t,i=0){this._modifiedEditor.revealLines(e,t,i)}revealLinesInCenter(e,t,i=0){this._modifiedEditor.revealLinesInCenter(e,t,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._modifiedEditor.revealLinesInCenterIfOutsideViewport(e,t,i)}revealLinesNearTop(e,t,i=0){this._modifiedEditor.revealLinesNearTop(e,t,i)}revealRange(e,t=0,i=!1,n=!0){this._modifiedEditor.revealRange(e,t,i,n)}revealRangeInCenter(e,t=0){this._modifiedEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._modifiedEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._modifiedEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._modifiedEditor.getSupportedActions()}saveViewState(){return{original:this._originalEditor.saveViewState(),modified:this._modifiedEditor.saveViewState()}}restoreViewState(e){if(e&&e.original&&e.modified){const t=e;this._originalEditor.restoreViewState(t.original),this._modifiedEditor.restoreViewState(t.modified)}}layout(e){this._elementSizeObserver.observe(e)}focus(){this._modifiedEditor.focus()}hasTextFocus(){return this._originalEditor.hasTextFocus()||this._modifiedEditor.hasTextFocus()}trigger(e,t,i){this._modifiedEditor.trigger(e,t,i)}changeDecorations(e){return this._modifiedEditor.changeDecorations(e)}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._renderOverviewRuler)return;if(!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const t=this._elementSizeObserver.getHeight(),i=this._getReviewHeight(),n=e.ENTIRE_DIFF_OVERVIEW_WIDTH-2*e.ONE_OVERVIEW_WIDTH;this._modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:e.ONE_OVERVIEW_WIDTH,right:n+e.ONE_OVERVIEW_WIDTH,height:t-i}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:e.ONE_OVERVIEW_WIDTH,height:t-i}))}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout((()=>this._beginUpdateDecorations()),e.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(e,t){return!e&&!t||!(!e||!t)&&e.toString()===t.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout=-1;const t=this._originalEditor.getModel(),i=this._modifiedEditor.getModel();if(!t||!i)return;this._diffComputationToken++;const n=this._diffComputationToken;this._setState(1),this._editorWorkerService.canComputeDiff(t.uri,i.uri)?this._editorWorkerService.computeDiff(t.uri,i.uri,this._ignoreTrimWhitespace,this._maxComputationTime).then((e=>{n===this._diffComputationToken&&t===this._originalEditor.getModel()&&i===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=e,this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())}),(e=>{n===this._diffComputationToken&&t===this._originalEditor.getModel()&&i===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=null,this._updateDecorationsRunner.schedule())})):e._equals(t.uri,this._lastOriginalWarning)&&e._equals(i.uri,this._lastModifiedWarning)||(this._lastOriginalWarning=t.uri,this._lastModifiedWarning=i.uri,this._notificationService.warn(ri.N("diff.tooLarge","Cannot compare files because one file is too large.")))}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this._originalEditor),this._modifiedEditorState.clean(this._modifiedEditor)}_updateDecorations(){if(!this._originalEditor.getModel()||!this._modifiedEditor.getModel())return;const e=this._diffComputationResult?this._diffComputationResult.changes:[],t=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),i=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),n=this._strategy.getEditorsDiffDecorations(e,this._ignoreTrimWhitespace,this._renderIndicators,t,i);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,n.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,n.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(e){const t=Object.assign({},e);return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar=Object.assign({},t.scrollbar||{}),t.scrollbar.vertical="visible",t.folding=!1,t.codeLens=this._diffCodeLens,t.fixedOverflowWidgets=!0,t.minimap=Object.assign({},t.minimap||{}),t.minimap.enabled=!1,t}_adjustOptionsForLeftHandSide(e){const t=this._adjustOptionsForSubEditor(e);return this._renderSideBySide?t.wordWrapOverride1=this._diffWordWrap:t.wordWrapOverride1="off",e.originalAriaLabel&&(t.ariaLabel=e.originalAriaLabel),t.readOnly=!this._originalIsEditable,t.extraEditorClassName="original-in-monaco-diff-editor",Object.assign(Object.assign({},t),{dimension:{height:0,width:0}})}_adjustOptionsForRightHandSide(t){const i=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(i.ariaLabel=t.modifiedAriaLabel),i.wordWrapOverride1=this._diffWordWrap,i.revealHorizontalRightPadding=B.BH.revealHorizontalRightPadding.defaultValue+e.ENTIRE_DIFF_OVERVIEW_WIDTH,i.scrollbar.verticalHasArrows=!1,i.extraEditorClassName="modified-in-monaco-diff-editor",Object.assign(Object.assign({},i),{dimension:{height:0,width:0}})}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const t=this._elementSizeObserver.getWidth(),i=this._elementSizeObserver.getHeight(),n=this._getReviewHeight(),o=this._strategy.layout();this._originalDomNode.style.width=o+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=t-o+"px",this._modifiedDomNode.style.left=o+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=i-n+"px",this._overviewDomElement.style.width=e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=t-e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(e.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:o,height:i-n}),this._modifiedEditor.layout({width:t-o-(this._renderOverviewRuler?e.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:i-n}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(i-n,t,n),this._layoutOverviewViewport()}_layoutOverviewViewport(){const e=this._computeOverviewViewport();e?(this._overviewViewportDomElement.setTop(e.top),this._overviewViewportDomElement.setHeight(e.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const e=this._modifiedEditor.getLayoutInfo();if(!e)return null;const t=this._modifiedEditor.getScrollTop(),i=this._modifiedEditor.getScrollHeight(),n=Math.max(0,e.height),o=Math.max(0,n-0),r=i>0?o/i:0;return{height:Math.max(0,Math.floor(e.height*r)),top:Math.floor(t*r)}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getOptions:()=>({renderOverviewRuler:this._renderOverviewRuler}),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this._originalEditor,getModifiedEditor:()=>this._modifiedEditor}}_setStrategy(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(e,t){const i=this._diffComputationResult?this._diffComputationResult.changes:[];if(0===i.length||e=a?n=r+1:(n=r,o=r)}return i[n]}_getEquivalentLineForOriginalLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,(e=>e.originalStartLineNumber));if(!t)return e;const i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-i;return s<=o?n+Math.min(s,r):n+r-o+s}_getEquivalentLineForModifiedLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,(e=>e.modifiedStartLineNumber));if(!t)return e;const i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-n;return s<=r?i+Math.min(s,o):i+o-r+s}getDiffLineInformationForOriginal(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null}getDiffLineInformationForModified(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null}};In.ONE_OVERVIEW_WIDTH=15,In.ENTIRE_DIFF_OVERVIEW_WIDTH=30,In.UPDATE_DIFF_DECORATIONS_DELAY=200,In=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([Dn(3,Cn.p),Dn(4,we.p),Dn(5,Xi.i6),Dn(6,mn.TG),Dn(7,Z.$),Dn(8,Ji.XE),Dn(9,mi.lT),Dn(10,vn.i),Dn(11,Sn.e)],In);class Tn extends de.JT{constructor(e){super(),this._dataSource=e,this._insertColor=null,this._removeColor=null}applyColors(e){const t=(e.getColor(Qi.yp)||Qi.Cz).transparent(2),i=(e.getColor(Qi.P4)||Qi.ke).transparent(2),n=!t.equals(this._insertColor)||!i.equals(this._removeColor);return this._insertColor=t,this._removeColor=i,n}getEditorsDiffDecorations(e,t,i,n,o){o=o.sort(((e,t)=>e.afterLineNumber-t.afterLineNumber)),n=n.sort(((e,t)=>e.afterLineNumber-t.afterLineNumber));const r=this._getViewZones(e,n,o,i),s=this._getOriginalEditorDecorations(e,t,i),a=this._getModifiedEditorDecorations(e,t,i);return{original:{decorations:s.decorations,overviewZones:s.overviewZones,zones:r.original},modified:{decorations:a.decorations,overviewZones:a.overviewZones,zones:r.modified}}}}class Rn{constructor(e){this._source=e,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._indexe.afterLineNumber-t.afterLineNumber,_=(e,t)=>{if(null===t.domNode&&e.length>0){const i=e[e.length-1];if(i.afterLineNumber===t.afterLineNumber&&null===i.domNode)return void(i.heightInLines+=t.heightInLines)}e.push(t)},v=new Rn(this._modifiedForeignVZ),b=new Rn(this._originalForeignVZ);let y=1,w=1;for(let i=0,n=this._lineChanges.length;i<=n;i++){const C=i0?-1:0),g=C.modifiedStartLineNumber+(C.modifiedEndLineNumber>0?-1:0),h=C.originalEndLineNumber>0?On._getViewLineCount(this._originalEditor,C.originalStartLineNumber,C.originalEndLineNumber):0,u=C.modifiedEndLineNumber>0?On._getViewLineCount(this._modifiedEditor,C.modifiedStartLineNumber,C.modifiedEndLineNumber):0,f=Math.max(C.originalStartLineNumber,C.originalEndLineNumber),p=Math.max(C.modifiedStartLineNumber,C.modifiedEndLineNumber)):(d+=1e7+h,g+=1e7+u,f=d,p=g);let S=[],x=[];if(o){let e;e=C?C.originalEndLineNumber>0?C.originalStartLineNumber-y:C.modifiedStartLineNumber-w:r.getLineCount()-y;for(let t=0;to&&x.push({afterLineNumber:i,heightInLines:n-o,domNode:null,marginDomNode:null})}C&&(y=(C.originalEndLineNumber>0?C.originalEndLineNumber:C.originalStartLineNumber)+1,w=(C.modifiedEndLineNumber>0?C.modifiedEndLineNumber:C.modifiedStartLineNumber)+1)}for(;v.current&&v.current.afterLineNumber<=p;){let e;e=v.current.afterLineNumber<=g?d-g+v.current.afterLineNumber:f;let i=null;C&&C.modifiedStartLineNumber<=v.current.afterLineNumber&&v.current.afterLineNumber<=C.modifiedEndLineNumber&&(i=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),S.push({afterLineNumber:e,heightInLines:v.current.height/t,domNode:null,marginDomNode:i}),v.advance()}for(;b.current&&b.current.afterLineNumber<=f;){let t;t=b.current.afterLineNumber<=d?g-d+b.current.afterLineNumber:p,x.push({afterLineNumber:t,heightInLines:b.current.height/e,domNode:null}),b.advance()}if(null!==C&&$n(C)){const e=this._produceOriginalFromDiff(C,h,u);e&&S.push(e)}if(null!==C&&Un(C)){const e=this._produceModifiedFromDiff(C,h,u);e&&x.push(e)}let k=0,D=0;for(S=S.sort(m),x=x.sort(m);k=t.heightInLines?(e.heightInLines-=t.heightInLines,D++):(t.heightInLines-=e.heightInLines,k++)}for(;k(e.domNode||(e.domNode=jn()),e)))}}function Fn(e,t,i,n,o){return{range:new U.e(e,t,i,n),options:o}}const Pn={charDelete:gn.qx.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:gn.qx.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:gn.qx.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:gn.qx.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:gn.qx.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"line-insert",isWholeLine:!0}),lineInsertWithSign:gn.qx.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+Ji.kS.asClassName(En),marginClassName:"line-insert",isWholeLine:!0}),lineDelete:gn.qx.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"line-delete",isWholeLine:!0}),lineDeleteWithSign:gn.qx.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+Ji.kS.asClassName(An),marginClassName:"line-delete",isWholeLine:!0}),lineDeleteMargin:gn.qx.register({description:"diff-editor-line-delete-margin",marginClassName:"line-delete"})};class Bn extends Tn{constructor(e,t){super(e),this._disableSash=!1===t,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new $i.g(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart((()=>this._onSashDragStart())),this._sash.onDidChange((e=>this._onSashDrag(e))),this._sash.onDidEnd((()=>this._onSashDragEnd())),this._sash.onDidReset((()=>this._onSashReset()))}setEnableSplitViewResizing(e){const t=!1===e;this._disableSash!==t&&(this._disableSash=t,this._sash.state=this._disableSash?0:3)}layout(e=this._sashRatio){const t=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?In.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let i=Math.floor((e||.5)*t);const n=Math.floor(.5*t);return i=this._disableSash?n:i||n,t>2*Bn.MINIMUM_EDITOR_WIDTH?(it-Bn.MINIMUM_EDITOR_WIDTH&&(i=t-Bn.MINIMUM_EDITOR_WIDTH)):i=n,this._sashPosition!==i&&(this._sashPosition=i,this._sash.layout()),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(e){const t=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?In.ENTIRE_DIFF_OVERVIEW_WIDTH:0),i=this.layout((this._startSashPosition+(e.currentX-e.startX))/t);this._sashRatio=i/t,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(e){return 0}getVerticalSashLeft(e){return this._sashPosition}getVerticalSashHeight(e){return this._dataSource.getHeight()}_getViewZones(e,t,i){const n=this._dataSource.getOriginalEditor(),o=this._dataSource.getModifiedEditor();return new zn(e,t,i,n,o).getViewZones()}_getOriginalEditorDecorations(e,t,i){const n=this._dataSource.getOriginalEditor(),o=String(this._removeColor),r={decorations:[],overviewZones:[]},s=n.getModel(),a=n._getViewModel();for(const n of e)if(Un(n)){r.decorations.push({range:new U.e(n.originalStartLineNumber,1,n.originalEndLineNumber,1073741824),options:i?Pn.lineDeleteWithSign:Pn.lineDelete}),$n(n)&&n.charChanges||r.decorations.push(Fn(n.originalStartLineNumber,1,n.originalEndLineNumber,1073741824,Pn.charDeleteWholeLine));const e=qn(s,a,n.originalStartLineNumber,n.originalEndLineNumber);if(r.overviewZones.push(new fn.EY(e.startLineNumber,e.endLineNumber,o)),n.charChanges)for(const e of n.charChanges)if(Un(e))if(t)for(let t=e.originalStartLineNumber;t<=e.originalEndLineNumber;t++){let i,n;i=t===e.originalStartLineNumber?e.originalStartColumn:s.getLineFirstNonWhitespaceColumn(t),n=t===e.originalEndLineNumber?e.originalEndColumn:s.getLineLastNonWhitespaceColumn(t),r.decorations.push(Fn(t,i,t,n,Pn.charDelete))}else r.decorations.push(Fn(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn,Pn.charDelete))}return r}_getModifiedEditorDecorations(e,t,i){const n=this._dataSource.getModifiedEditor(),o=String(this._insertColor),r={decorations:[],overviewZones:[]},s=n.getModel(),a=n._getViewModel();for(const n of e)if($n(n)){r.decorations.push({range:new U.e(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,1073741824),options:i?Pn.lineInsertWithSign:Pn.lineInsert}),Un(n)&&n.charChanges||r.decorations.push(Fn(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,1073741824,Pn.charInsertWholeLine));const e=qn(s,a,n.modifiedStartLineNumber,n.modifiedEndLineNumber);if(r.overviewZones.push(new fn.EY(e.startLineNumber,e.endLineNumber,o)),n.charChanges)for(const e of n.charChanges)if($n(e))if(t)for(let t=e.modifiedStartLineNumber;t<=e.modifiedEndLineNumber;t++){let i,n;i=t===e.modifiedStartLineNumber?e.modifiedStartColumn:s.getLineFirstNonWhitespaceColumn(t),n=t===e.modifiedEndLineNumber?e.modifiedEndColumn:s.getLineLastNonWhitespaceColumn(t),r.decorations.push(Fn(t,i,t,n,Pn.charInsert))}else r.decorations.push(Fn(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn,Pn.charInsert))}return r}}Bn.MINIMUM_EDITOR_WIDTH=100;class zn extends On{constructor(e,t,i,n,o){super(e,t,i,n,o)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(e,t,i){return i>t?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:i-t,domNode:null}:null}_produceModifiedFromDiff(e,t,i){return t>i?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-i,domNode:null}:null}}class Wn extends Tn{constructor(e,t){super(e),this._decorationsLeft=e.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(e.getOriginalEditor().onDidLayoutChange((t=>{this._decorationsLeft!==t.decorationsLeft&&(this._decorationsLeft=t.decorationsLeft,e.relayoutEditors())})))}setEnableSplitViewResizing(e){}_getViewZones(e,t,i,n){const o=this._dataSource.getOriginalEditor(),r=this._dataSource.getModifiedEditor();return new Vn(e,t,i,o,r,n).getViewZones()}_getOriginalEditorDecorations(e,t,i){const n=String(this._removeColor),o={decorations:[],overviewZones:[]},r=this._dataSource.getOriginalEditor(),s=r.getModel(),a=r._getViewModel();for(const t of e)if(Un(t)){o.decorations.push({range:new U.e(t.originalStartLineNumber,1,t.originalEndLineNumber,1073741824),options:Pn.lineDeleteMargin});const e=qn(s,a,t.originalStartLineNumber,t.originalEndLineNumber);o.overviewZones.push(new fn.EY(e.startLineNumber,e.endLineNumber,n))}return o}_getModifiedEditorDecorations(e,t,i){const n=this._dataSource.getModifiedEditor(),o=String(this._insertColor),r={decorations:[],overviewZones:[]},s=n.getModel(),a=n._getViewModel();for(const n of e)if($n(n)){r.decorations.push({range:new U.e(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,1073741824),options:i?Pn.lineInsertWithSign:Pn.lineInsert});const e=qn(s,a,n.modifiedStartLineNumber,n.modifiedEndLineNumber);if(r.overviewZones.push(new fn.EY(e.startLineNumber,e.endLineNumber,o)),n.charChanges){for(const e of n.charChanges)if($n(e))if(t)for(let t=e.modifiedStartLineNumber;t<=e.modifiedEndLineNumber;t++){let i,n;i=t===e.modifiedStartLineNumber?e.modifiedStartColumn:s.getLineFirstNonWhitespaceColumn(t),n=t===e.modifiedEndLineNumber?e.modifiedEndColumn:s.getLineLastNonWhitespaceColumn(t),r.decorations.push(Fn(t,i,t,n,Pn.charInsert))}else r.decorations.push(Fn(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn,Pn.charInsert))}else r.decorations.push(Fn(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,1073741824,Pn.charInsertWholeLine))}return r}layout(){return Math.max(5,this._decorationsLeft)}}class Vn extends On{constructor(e,t,i,n,o,r){super(e,t,i,n,o),this._originalModel=n.getModel(),this._renderIndicators=r,this._pendingLineChange=[],this._pendingViewZones=[],this._lineBreaksComputer=this._modifiedEditor._getViewModel().createLineBreaksComputer()}getViewZones(){const e=super.getViewZones();return this._finalize(e),e}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){const e=document.createElement("div");return e.className="inline-added-margin-view-zone",e}_produceOriginalFromDiff(e,t,i){const n=document.createElement("div");return n.className="inline-added-margin-view-zone",{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:i,domNode:document.createElement("div"),marginDomNode:n}}_produceModifiedFromDiff(e,t,i){const n=document.createElement("div");n.className=`view-lines line-delete ${kn.S}`;const o=document.createElement("div");o.className="inline-deleted-margin-view-zone";const r={shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,minWidthInPx:0,domNode:n,marginDomNode:o,diff:{originalStartLineNumber:e.originalStartLineNumber,originalEndLineNumber:e.originalEndLineNumber,modifiedStartLineNumber:e.modifiedStartLineNumber,modifiedEndLineNumber:e.modifiedEndLineNumber,originalModel:this._originalModel,viewLineCounts:null}};for(let t=e.originalStartLineNumber;t<=e.originalEndLineNumber;t++)this._lineBreaksComputer.addRequest(this._originalModel.getLineContent(t),null);return this._pendingLineChange.push(e),this._pendingViewZones.push(r),r}_finalize(e){const t=this._modifiedEditor.getOptions(),i=this._modifiedEditor.getModel().getOptions().tabSize,n=t.get(40),o=t.get(27),r=n.typicalHalfwidthCharacterWidth,s=t.get(91),a=this._originalModel.mightContainNonBasicASCII(),l=this._originalModel.mightContainRTL(),c=t.get(56),u=t.get(128).decorationsWidth,h=t.get(103),d=t.get(86),g=t.get(80),f=t.get(41),p=this._lineBreaksComputer.finalize();let m=0;for(let t=0;t0,S=(0,dn.l$)(1e4);let x=0,k=0,D=null;for(let t=_.originalStartLineNumber;t<=_.originalEndLineNumber;t++){const r=t-_.originalStartLineNumber,s=this._originalModel.getLineTokens(t),b=s.getLineContent(),L=p[m++],N=pn.Kp.filter(w,t,1,b.length+1);if(L){let p=0;for(const e of L.breakOffsets){const t=s.sliceAndInflate(p,e,0),r=b.substring(p,e);x=Math.max(x,this._renderOriginalLine(k++,r,t,pn.Kp.extractWrapped(N,p,e),C,a,l,n,o,c,u,h,d,g,f,i,S,y)),p=e}for(D||(D=[]);D.lengthe.afterLineNumber-t.afterLineNumber))}_renderOriginalLine(e,t,i,n,o,r,s,a,l,c,u,h,d,g,f,p,m,_){m.appendASCIIString('
    ');const v=kt.wA.isBasicASCII(t,r),b=kt.wA.containsRTL(t,v,s),y=(0,xt.d1)(new xt.IJ(a.isMonospace&&!l,a.canUseHalfwidthRightwardsArrow,t,!1,v,b,0,i,n,p,0,a.spaceWidth,a.middotWidth,a.wsmiddotWidth,h,d,g,f!==B.n0.OFF,null),m);if(m.appendASCIIString("
    "),this._renderIndicators){const t=document.createElement("div");t.className=`delete-sign ${Ji.kS.asClassName(An)}`,t.setAttribute("style",`position:absolute;top:${e*c}px;width:${u}px;height:${c}px;right:0;`),_.appendChild(t)}const w=y.characterMapping.getAbsoluteOffsets();return w.length>0?w[w.length-1]:0}}function Hn(e,t){return(0,B.NY)(e,t,["off","on","inherit"])}function $n(e){return e.modifiedEndLineNumber>0}function Un(e){return e.originalEndLineNumber>0}function jn(){const e=document.createElement("div");return e.className="diagonal-fill",e}function qn(e,t,i,n){const o=e.getLineCount();return i=Math.min(o,Math.max(1,i)),n=Math.min(o,Math.max(1,n)),t.coordinatesConverter.convertModelRangeToViewRange(new U.e(i,e.getLineMinColumn(i),n,e.getLineMaxColumn(n)))}(0,Ji.Ic)(((e,t)=>{const i=e.getColor(Qi.yp);i&&(t.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { background-color: ${i}; }`),t.addRule(`.monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: ${i}; }`),t.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${i}; }`));const n=e.getColor(Qi.P4);n&&(t.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { background-color: ${n}; }`),t.addRule(`.monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: ${n}; }`),t.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${n}; }`));const o=e.getColor(Qi.XL);o&&t.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${"hc"===e.type?"dashed":"solid"} ${o}; }`);const r=e.getColor(Qi.mH);r&&t.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${"hc"===e.type?"dashed":"solid"} ${r}; }`);const s=e.getColor(Qi._w);s&&t.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${s}; }`);const a=e.getColor(Qi.LL);a&&t.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${a}; }`);const l=e.getColor(Qi.et);l&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport {\n\t\t\t\tbackground: ${l};\n\t\t\t}\n\t\t`);const c=e.getColor(Qi.AB);c&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:hover {\n\t\t\t\tbackground: ${c};\n\t\t\t}\n\t\t`);const u=e.getColor(Qi.yn);u&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:active {\n\t\t\t\tbackground: ${u};\n\t\t\t}\n\t\t`);const h=e.getColor(Qi.L_);t.addRule(`\n\t.monaco-editor .diagonal-fill {\n\t\tbackground-image: linear-gradient(\n\t\t\t-45deg,\n\t\t\t${h} 12.5%,\n\t\t\t#0000 12.5%, #0000 50%,\n\t\t\t${h} 50%, ${h} 62.5%,\n\t\t\t#0000 62.5%, #0000 100%\n\t\t);\n\t\tbackground-size: 8px 8px;\n\t}\n\t`)}));var Kn=i(653),Gn=i(2095),Yn=i(4144),Zn=i(1847),Xn=i(1106);class Qn extends de.JT{constructor(){super(),this._onCodeEditorAdd=this._register(new W.Q5),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new W.Q5),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onDiffEditorAdd=this._register(new W.Q5),this._onDiffEditorRemove=this._register(new W.Q5),this._onDecorationTypeRegistered=this._register(new W.Q5),this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null)}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map((e=>this._codeEditors[e]))}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}removeDiffEditor(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map((e=>this._diffEditors[e]))}getFocusedCodeEditor(){let e=null;const t=this.listCodeEditors();for(const i of t){if(i.hasTextFocus())return i;i.hasWidgetFocus()&&(e=i)}return e}setModelProperty(e,t,i){const n=e.toString();let o;this._modelProperties.has(n)?o=this._modelProperties.get(n):(o=new Map,this._modelProperties.set(n,o)),o.set(t,i)}getModelProperty(e,t){const i=e.toString();if(this._modelProperties.has(i))return this._modelProperties.get(i).get(t)}}class Jn{constructor(e,t,i){this._parent=e,this._editorId=t,this._styleSheet=i,this._refCount=0}ref(){this._refCount++}unref(){var e;this._refCount--,0===this._refCount&&(null===(e=this._styleSheet.parentNode)||void 0===e||e.removeChild(this._styleSheet),this._parent._removeEditorStyleSheets(this._editorId))}insertRule(e,t){this._styleSheet.sheet.insertRule(e,t)}removeRulesContainingSelector(e){X.uN(e,this._styleSheet)}}class eo{constructor(e){this._styleSheet=e}ref(){}unref(){}insertRule(e,t){this._styleSheet.sheet.insertRule(e,t)}removeRulesContainingSelector(e){X.uN(e,this._styleSheet)}}let to=class extends Qn{constructor(e,t){super(),this._decorationOptionProviders=new Map,this._editorStyleSheets=new Map,this._globalStyleSheet=e||null,this._themeService=t}_getOrCreateGlobalStyleSheet(){return this._globalStyleSheet||(this._globalStyleSheet=new eo(X.dS())),this._globalStyleSheet}_getOrCreateStyleSheet(e){if(!e)return this._getOrCreateGlobalStyleSheet();const t=e.getContainerDomNode();if(!X.OO(t))return this._getOrCreateGlobalStyleSheet();const i=e.getId();if(!this._editorStyleSheets.has(i)){const e=new Jn(this,i,X.dS(t));this._editorStyleSheets.set(i,e)}return this._editorStyleSheets.get(i)}_removeEditorStyleSheets(e){this._editorStyleSheets.delete(e)}registerDecorationType(e,t,i,n,o){let r=this._decorationOptionProviders.get(t);if(!r){const s=this._getOrCreateStyleSheet(o),a={styleSheet:s,key:t,parentTypeKey:n,options:i||Object.create(null)};r=n?new oo(this._themeService,s,a):new ro(e,this._themeService,s,a),this._decorationOptionProviders.set(t,r),this._onDecorationTypeRegistered.fire(t)}r.refCount++}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach((t=>t.removeDecorations(e)))))}resolveDecorationOptions(e,t){const i=this._decorationOptionProviders.get(e);if(!i)throw new Error("Unknown decoration type key: "+e);return i.getOptions(this,t)}};var io,no;to=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(io=1,no=Ji.XE,function(e,t){no(e,t,io)})],to);class oo{constructor(e,t,i){this._styleSheet=t,this._styleSheet.ref(),this._parentTypeKey=i.parentTypeKey,this.refCount=0,this._beforeContentRules=new ao(3,i,e),this._afterContentRules=new ao(4,i,e)}getOptions(e,t){const i=e.resolveDecorationOptions(this._parentTypeKey,!0);return this._beforeContentRules&&(i.beforeContentClassName=this._beforeContentRules.className),this._afterContentRules&&(i.afterContentClassName=this._afterContentRules.className),i}dispose(){this._beforeContentRules&&(this._beforeContentRules.dispose(),this._beforeContentRules=null),this._afterContentRules&&(this._afterContentRules.dispose(),this._afterContentRules=null),this._styleSheet.unref()}}class ro{constructor(e,t,i,n){this._disposables=new de.SL,this.description=e,this._styleSheet=i,this._styleSheet.ref(),this.refCount=0;const o=e=>{const i=new ao(e,n,t);if(this._disposables.add(i),i.hasContent)return i.className};this.className=o(0);const r=(e=>{const i=new ao(1,n,t);return this._disposables.add(i),i.hasContent?{className:i.className,hasLetterSpacing:i.hasLetterSpacing}:null})();r&&(this.inlineClassName=r.className,this.inlineClassNameAffectsLetterSpacing=r.hasLetterSpacing),this.beforeContentClassName=o(3),this.afterContentClassName=o(4),this.glyphMarginClassName=o(2);const s=n.options;this.isWholeLine=Boolean(s.isWholeLine),this.stickiness=s.rangeBehavior;const a=s.light&&s.light.overviewRulerColor||s.overviewRulerColor,l=s.dark&&s.dark.overviewRulerColor||s.overviewRulerColor;void 0===a&&void 0===l||(this.overviewRuler={color:a||l,darkColor:l||a,position:s.overviewRulerLane||ve.sh.Center})}getOptions(e,t){return t?{description:this.description,inlineClassName:this.inlineClassName,beforeContentClassName:this.beforeContentClassName,afterContentClassName:this.afterContentClassName,className:this.className,glyphMarginClassName:this.glyphMarginClassName,isWholeLine:this.isWholeLine,overviewRuler:this.overviewRuler,stickiness:this.stickiness}:this}dispose(){this._disposables.dispose(),this._styleSheet.unref()}}const so={color:"color:{0} !important;",opacity:"opacity:{0};",backgroundColor:"background-color:{0};",outline:"outline:{0};",outlineColor:"outline-color:{0};",outlineStyle:"outline-style:{0};",outlineWidth:"outline-width:{0};",border:"border:{0};",borderColor:"border-color:{0};",borderRadius:"border-radius:{0};",borderSpacing:"border-spacing:{0};",borderStyle:"border-style:{0};",borderWidth:"border-width:{0};",fontStyle:"font-style:{0};",fontWeight:"font-weight:{0};",fontSize:"font-size:{0};",fontFamily:"font-family:{0};",textDecoration:"text-decoration:{0};",cursor:"cursor:{0};",letterSpacing:"letter-spacing:{0};",gutterIconPath:"background:{0} center center no-repeat;",gutterIconSize:"background-size:{0};",contentText:"content:'{0}';",contentIconPath:"content:{0};",margin:"margin:{0};",padding:"padding:{0};",width:"width:{0};",height:"height:{0};"};class ao{constructor(e,t,i){this._theme=i.getColorTheme(),this._ruleType=e,this._providerArgs=t,this._usesThemeColors=!1,this._hasContent=!1,this._hasLetterSpacing=!1;let n=lo.getClassName(this._providerArgs.key,e);this._providerArgs.parentTypeKey&&(n=n+" "+lo.getClassName(this._providerArgs.parentTypeKey,e)),this._className=n,this._unThemedSelector=lo.getSelector(this._providerArgs.key,this._providerArgs.parentTypeKey,e),this._buildCSS(),this._usesThemeColors?this._themeListener=i.onDidColorThemeChange((e=>{this._theme=i.getColorTheme(),this._removeCSS(),this._buildCSS()})):this._themeListener=null}dispose(){this._hasContent&&(this._removeCSS(),this._hasContent=!1),this._themeListener&&(this._themeListener.dispose(),this._themeListener=null)}get hasContent(){return this._hasContent}get hasLetterSpacing(){return this._hasLetterSpacing}get className(){return this._className}_buildCSS(){const e=this._providerArgs.options;let t,i,n;switch(this._ruleType){case 0:t=this.getCSSTextForModelDecorationClassName(e),i=this.getCSSTextForModelDecorationClassName(e.light),n=this.getCSSTextForModelDecorationClassName(e.dark);break;case 1:t=this.getCSSTextForModelDecorationInlineClassName(e),i=this.getCSSTextForModelDecorationInlineClassName(e.light),n=this.getCSSTextForModelDecorationInlineClassName(e.dark);break;case 2:t=this.getCSSTextForModelDecorationGlyphMarginClassName(e),i=this.getCSSTextForModelDecorationGlyphMarginClassName(e.light),n=this.getCSSTextForModelDecorationGlyphMarginClassName(e.dark);break;case 3:t=this.getCSSTextForModelDecorationContentClassName(e.before),i=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.before),n=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.before);break;case 4:t=this.getCSSTextForModelDecorationContentClassName(e.after),i=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.after),n=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.after);break;default:throw new Error("Unknown rule type: "+this._ruleType)}const o=this._providerArgs.styleSheet;let r=!1;t.length>0&&(o.insertRule(`${this._unThemedSelector} {${t}}`,0),r=!0),i.length>0&&(o.insertRule(`.vs${this._unThemedSelector} {${i}}`,0),r=!0),n.length>0&&(o.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${n}}`,0),r=!0),this._hasContent=r}_removeCSS(){this._providerArgs.styleSheet.removeRulesContainingSelector(this._unThemedSelector)}getCSSTextForModelDecorationClassName(e){if(!e)return"";const t=[];return this.collectCSSText(e,["backgroundColor"],t),this.collectCSSText(e,["outline","outlineColor","outlineStyle","outlineWidth"],t),this.collectBorderSettingsCSSText(e,t),t.join("")}getCSSTextForModelDecorationInlineClassName(e){if(!e)return"";const t=[];return this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","cursor","color","opacity","letterSpacing"],t),e.letterSpacing&&(this._hasLetterSpacing=!0),t.join("")}getCSSTextForModelDecorationContentClassName(e){if(!e)return"";const t=[];if(void 0!==e){if(this.collectBorderSettingsCSSText(e,t),void 0!==e.contentIconPath&&t.push(Be.WU(so.contentIconPath,X.wY(H.o.revive(e.contentIconPath)))),"string"==typeof e.contentText){const i=e.contentText.match(/^.*$/m)[0].replace(/['\\]/g,"\\$&");t.push(Be.WU(so.contentText,i))}this.collectCSSText(e,["fontStyle","fontWeight","fontSize","fontFamily","textDecoration","color","opacity","backgroundColor","margin","padding"],t),this.collectCSSText(e,["width","height"],t)&&t.push("display:inline-block;")}return t.join("")}getCSSTextForModelDecorationGlyphMarginClassName(e){if(!e)return"";const t=[];return void 0!==e.gutterIconPath&&(t.push(Be.WU(so.gutterIconPath,X.wY(H.o.revive(e.gutterIconPath)))),void 0!==e.gutterIconSize&&t.push(Be.WU(so.gutterIconSize,e.gutterIconSize))),t.join("")}collectBorderSettingsCSSText(e,t){return!!this.collectCSSText(e,["border","borderColor","borderRadius","borderSpacing","borderStyle","borderWidth"],t)&&(t.push(Be.WU("box-sizing: border-box;")),!0)}collectCSSText(e,t,i){const n=i.length;for(let n of t){const t=this.resolveValue(e[n]);"string"==typeof t&&i.push(Be.WU(so[n],t))}return i.length!==n}resolveValue(e){if((0,_e.I)(e)){this._usesThemeColors=!0;const t=this._theme.getColor(e.id);return t?t.toString():"transparent"}return e}}class lo{static getClassName(e,t){return"ced-"+e+"-"+t}static getSelector(e,t,i){let n=".monaco-editor ."+this.getClassName(e,i);return t&&(n=n+"."+this.getClassName(t,i)),3===i?n+="::before":4===i&&(n+="::after"),n}}var co=function(e,t){return function(i,n){t(i,n,e)}};let uo=class extends to{constructor(e,t,i){super(e,i),this.onCodeEditorAdd((()=>this._checkContextKey())),this.onCodeEditorRemove((()=>this._checkContextKey())),this._editorIsOpen=t.createKey("editorIsOpen",!1),this._activeCodeEditor=null}_checkContextKey(){let e=!1;for(const t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}openCodeEditor(e,t,i){return t?Promise.resolve(this.doOpenEditor(t,e)):Promise.resolve(null)}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){const i=t.resource.scheme;if(i===te.lg.http||i===te.lg.https)return(0,X.V3)(t.resource.toString()),e}return null}const i=t.options?t.options.selection:null;if(i)if("number"==typeof i.endLineNumber&&"number"==typeof i.endColumn)e.setSelection(i),e.revealRangeInCenter(i,1);else{const t={lineNumber:i.startLineNumber,column:i.startColumn};e.setPosition(t),e.revealPositionInCenter(t,1)}return e}findModel(e,t){const i=e.getModel();return i&&i.uri.toString()!==t.toString()?null:i}};uo=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([co(1,Xi.i6),co(2,Ji.XE)],uo);var ho=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},go=function(e,t){return function(i,n){t(i,n,e)}};let fo=0,po=!1,mo=class extends Vi.Gm{constructor(e,t,i,n,o,r,s,a,l,c){const u=Object.assign({},t);u.ariaLabel=u.ariaLabel||vi.B8.editorViewAccessibleLabel,u.ariaLabel=u.ariaLabel+";"+vi.B8.accessibilityHelpMessage,super(e,u,{},i,n,o,r,a,l,c),this._standaloneKeybindingService=s instanceof Ni?s:null,po||(po=!0,Wi.wW(document.body))}addCommand(e,t,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;let n="DYNAMIC_"+ ++fo,o=Xi.Ao.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,o),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if("string"!=typeof e.id||"string"!=typeof e.label||"function"!=typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),de.JT.None;const t=e.id,i=e.label,n=Xi.Ao.and(Xi.Ao.equals("editorId",this.getId()),Xi.Ao.deserialize(e.precondition)),o=e.keybindings,r=Xi.Ao.and(n,Xi.Ao.deserialize(e.keybindingContext)),s=e.contextMenuGroupId||null,a=e.contextMenuOrder||0,l=(t,...i)=>Promise.resolve(e.run(this,...i)),c=new de.SL,u=this.getId()+":"+t;if(c.add(ne.P.registerCommand(u,l)),s){let e={command:{id:u,title:i},when:n,group:s,order:a};c.add(Yn.BH.appendMenuItem(Yn.eH.EditorContext,e))}if(Array.isArray(o))for(const e of o)c.add(this._standaloneKeybindingService.addDynamicKeybinding(u,e,l,r));let h=new Kn.p(u,i,i,n,l,this._contextKeyService);return this._actions[t]=h,c.add((0,de.OF)((()=>{delete this._actions[t]}))),c}_triggerCommand(e,t){if(this._codeEditorService instanceof uo)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};mo=ho([go(2,mn.TG),go(3,Z.$),go(4,ne.H),go(5,Xi.i6),go(6,Zn.d),go(7,Ji.XE),go(8,mi.lT),go(9,Xn.F)],mo);let _o=class extends mo{constructor(e,t,i,n,o,r,s,a,l,c,u,h,d,g,f){const p=Object.assign({},t);Oi(h,p,!1);const m=c.registerEditorContainer(e);"string"==typeof p.theme&&c.setTheme(p.theme),void 0!==p.autoDetectHighContrast&&c.setAutoDetectHighContrast(Boolean(p.autoDetectHighContrast));let _,v=p.model;if(delete p.model,super(e,p,n,o,r,s,a,c,u,d),this._contextViewService=l,this._configurationService=h,this._standaloneThemeService=c,this._register(i),this._register(m),void 0===v?(_=bo(g,f,p.value||"",p.language||"text/plain",void 0),this._ownsModel=!0):(_=v,this._ownsModel=!1),this._attachModel(_),_){let e={oldModelUrl:null,newModelUrl:_.uri};this._onDidChangeModel.fire(e)}}dispose(){super.dispose()}updateOptions(e){Oi(this._configurationService,e,!1),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_attachModel(e){super._attachModel(e),this._modelData&&this._contextViewService.setContainer(this._modelData.view.domNode.domNode)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};_o=ho([go(3,mn.TG),go(4,Z.$),go(5,ne.H),go(6,Xi.i6),go(7,Zn.d),go(8,vn.u),go(9,Gn.Z),go(10,mi.lT),go(11,Jt.Ui),go(12,Xn.F),go(13,at.q),go(14,Ce.h)],_o);let vo=class extends In{constructor(e,t,i,n,o,r,s,a,l,c,u,h,d,g,f){const p=Object.assign({},t);Oi(h,p,!0);const m=c.registerEditorContainer(e);"string"==typeof p.theme&&c.setTheme(p.theme),void 0!==p.autoDetectHighContrast&&c.setAutoDetectHighContrast(Boolean(p.autoDetectHighContrast)),super(e,p,{},f,a,o,n,l,c,u,d,g),this._contextViewService=s,this._configurationService=h,this._standaloneThemeService=c,this._register(i),this._register(m),this._contextViewService.setContainer(this._containerDomElement)}dispose(){super.dispose()}updateOptions(e){Oi(this._configurationService,e,!0),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(mo,t,i)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,i){return this.getModifiedEditor().addCommand(e,t,i)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};function bo(e,t,i,n,o){if(i=i||"",!n){const n=i.indexOf("\n");let r=i;return-1!==n&&(r=i.substring(0,n)),yo(e,i,t.createByFilepathOrFirstLine(o||null,r),o)}return yo(e,i,t.create(n),o)}function yo(e,t,i,n){return e.createModel(t,i,n)}vo=ho([go(3,mn.TG),go(4,Xi.i6),go(5,Zn.d),go(6,vn.u),go(7,we.p),go(8,Z.$),go(9,Gn.Z),go(10,mi.lT),go(11,Jt.Ui),go(12,vn.i),go(13,Sn.e),go(14,Cn.p)],vo);class wo{constructor(e){this._languageIdentifier=e}getId(){return this._languageIdentifier.language}}var Co=i(8721),So=i(4118);const xo="text/plain",ko="application/unknown";let Do=[],Lo=[],No=[];function Eo(e,t=!1){const i=function(e){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:e.userConfigured,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?e.filepattern.toLowerCase():void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(Co.KR.sep)>=0}}(e);Do.push(i),i.userConfigured?No.push(i):Lo.push(i),t&&!i.userConfigured&&Do.forEach((e=>{e.mime===i.mime||e.userConfigured||(i.extension&&e.extension===i.extension&&console.warn(`Overwriting extension <<${i.extension}>> to now point to mime <<${i.mime}>>`),i.filename&&e.filename===i.filename&&console.warn(`Overwriting filename <<${i.filename}>> to now point to mime <<${i.mime}>>`),i.filepattern&&e.filepattern===i.filepattern&&console.warn(`Overwriting filepattern <<${i.filepattern}>> to now point to mime <<${i.mime}>>`),i.firstline&&e.firstline===i.firstline&&console.warn(`Overwriting firstline <<${i.firstline}>> to now point to mime <<${i.mime}>>`))}))}function Ao(e,t,i){let n=null,o=null,r=null;for(let s=i.length-1;s>=0;s--){const a=i[s];if(t===a.filenameLowercase){n=a;break}if(a.filepattern&&(!o||a.filepattern.length>o.filepattern.length)){const i=a.filepatternOnPath?e:t;(0,So.EQ)(a.filepatternLowercase,i)&&(o=a)}a.extension&&(!r||a.extension.length>r.extension.length)&&t.endsWith(a.extensionLowercase)&&(r=a)}return n?n.mime:o?o.mime:r?r.mime:null}var Mo=i(1144),Io=i(9872);const To=Object.prototype.hasOwnProperty;class Ro extends de.JT{constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new W.Q5),this.onDidChange=this._onDidChange.event,this._warnOnOverwrite=t,this._nextLanguageId2=1,this._languageIdToLanguage=[],this._languageToLanguageId=Object.create(null),this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(Mo.dQ.onDidChangeLanguages((e=>this._initializeFromRegistry()))))}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={};const e=Mo.dQ.getLanguages();this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach((e=>{let t=this._languages[e];t.name&&(this._nameMap[t.name]=t.identifier),t.aliases.forEach((e=>{this._lowercaseNameMap[e.toLowerCase()]=t.identifier})),t.mimetypes.forEach((e=>{this._mimeTypesMap[e]=t.identifier}))})),Io.B.as(ei.IP.Configuration).registerOverrideIdentifiers(Mo.dQ.getLanguages().map((e=>e.id))),this._onDidChange.fire()}_getLanguageId(e){if(this._languageToLanguageId[e])return this._languageToLanguageId[e];const t=this._nextLanguageId2++;return this._languageIdToLanguage[t]=e,this._languageToLanguageId[e]=t,t}_registerLanguage(e){const t=e.id;let i;if(To.call(this._languages,t))i=this._languages[t];else{const e=this._getLanguageId(t);i={identifier:new be.rl(t,e),name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[]},this._languages[t]=i}this._mergeLanguage(i,e)}_mergeLanguage(e,t){const i=t.id;let n=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),n=t.mimetypes[0]),n||(n=`text/x-${i}`,e.mimetypes.push(n)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(let e of t.extensions)Eo({id:i,mime:n,extension:e},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(let o of t.filenames)Eo({id:i,mime:n,filename:o},this._warnOnOverwrite),e.filenames.push(o);if(Array.isArray(t.filenamePatterns))for(let e of t.filenamePatterns)Eo({id:i,mime:n,filepattern:e},this._warnOnOverwrite);if("string"==typeof t.firstLine&&t.firstLine.length>0){let e=t.firstLine;"^"!==e.charAt(0)&&(e="^"+e);try{let t=new RegExp(e);Be.IO(t)||Eo({id:i,mime:n,firstline:t},this._warnOnOverwrite)}catch(e){(0,ke.dL)(e)}}e.aliases.push(i);let o=null;if(void 0!==t.aliases&&Array.isArray(t.aliases)&&(o=0===t.aliases.length?[null]:t.aliases),null!==o)for(const t of o)t&&0!==t.length&&e.aliases.push(t);let r=null!==o&&o.length>0;if(r&&null===o[0]);else{let t=(r?o[0]:null)||i;!r&&e.name||(e.name=t)}t.configuration&&e.configurationFiles.push(t.configuration)}isRegisteredMode(e){return!!To.call(this._mimeTypesMap,e)||To.call(this._languages,e)}getModeIdForLanguageNameLowercase(e){return To.call(this._lowercaseNameMap,e)?this._lowercaseNameMap[e].language:null}extractModeIds(e){return e?e.split(",").map((e=>e.trim())).map((e=>To.call(this._mimeTypesMap,e)?this._mimeTypesMap[e].language:e)).filter((e=>To.call(this._languages,e))):[]}getLanguageIdentifier(e){if(e===ye.TG||0===e)return ye.pA;let t;if("string"==typeof e)t=e;else if(t=this._languageIdToLanguage[e],!t)return null;return To.call(this._languages,t)?this._languages[t].identifier:null}getModeIdsFromFilepathOrFirstLine(e,t){if(!e&&!t)return[];let i=function(e,t){let i;if(e)switch(e.scheme){case te.lg.file:i=e.fsPath;break;case te.lg.data:i=ie.Vb.parseMetaData(e).get(ie.Vb.META_DATA_LABEL);break;default:i=e.path}if(!i)return[ko];i=i.toLowerCase();const n=(0,Co.EZ)(i),o=Ao(i,n,No);if(o)return[o,xo];const r=Ao(i,n,Lo);if(r)return[r,xo];if(t){const e=function(e){if((0,Be.uS)(e)&&(e=e.substr(1)),e.length>0)for(let t=Do.length-1;t>=0;t--){const i=Do[t];if(!i.firstline)continue;const n=e.match(i.firstline);if(n&&n.length>0)return i.mime}return null}(t);if(e)return[e,xo]}return[ko]}(e,t);return this.extractModeIds(i.join(","))}}class Oo{constructor(e,t){let i;this._selector=t,this.languageIdentifier=this._selector(),this._onDidChange=new W.Q5({onFirstListenerAdd:()=>{i=e((()=>this._evaluate()))},onLastListenerRemove:()=>{i.dispose()}}),this.onDidChange=this._onDidChange.event}_evaluate(){let e=this._selector();e.id!==this.languageIdentifier.id&&(this.languageIdentifier=e,this._onDidChange.fire(this.languageIdentifier))}}class Fo extends de.JT{constructor(e=!1){super(),this._onDidCreateMode=this._register(new W.Q5),this.onDidCreateMode=this._onDidCreateMode.event,this._onLanguagesMaybeChanged=this._register(new W.Q5({leakWarningThreshold:200})),this.onLanguagesMaybeChanged=this._onLanguagesMaybeChanged.event,this._instantiatedModes={},this._registry=this._register(new Ro(!0,e)),this._register(this._registry.onDidChange((()=>this._onLanguagesMaybeChanged.fire())))}isRegisteredMode(e){return this._registry.isRegisteredMode(e)}getModeIdForLanguageName(e){return this._registry.getModeIdForLanguageNameLowercase(e)}getModeIdByFilepathOrFirstLine(e,t){const i=this._registry.getModeIdsFromFilepathOrFirstLine(e,t);return(0,ct.Xh)(i,null)}getModeId(e){const t=this._registry.extractModeIds(e);return(0,ct.Xh)(t,null)}getLanguageIdentifier(e){return this._registry.getLanguageIdentifier(e)}create(e){return new Oo(this.onLanguagesMaybeChanged,(()=>{const t=this.getModeId(e);return this._createModeAndGetLanguageIdentifier(t)}))}createByFilepathOrFirstLine(e,t){return new Oo(this.onLanguagesMaybeChanged,(()=>{const i=this.getModeIdByFilepathOrFirstLine(e,t);return this._createModeAndGetLanguageIdentifier(i)}))}_createModeAndGetLanguageIdentifier(e){const t=this.getLanguageIdentifier(e||"plaintext")||ye.pA;return this._getOrCreateMode(t.language),t}triggerMode(e){const t=this.getModeId(e);this._getOrCreateMode(t||"plaintext")}_getOrCreateMode(e){if(!this._instantiatedModes.hasOwnProperty(e)){let t=this.getLanguageIdentifier(e)||ye.pA;this._instantiatedModes[e]=new wo(t),this._onDidCreateMode.fire(this._instantiatedModes[e])}return this._instantiatedModes[e]}}var Po=i(7390),Bo=i(1264);class zo{constructor(e,t,i,n,o){this.token=e,this.index=t,this.fontStyle=i,this.foreground=n,this.background=o}}const Wo=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class Vo{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(null===e)return 0;const t=e.match(Wo);if(!t)throw new Error("Illegal value for token color: "+e);e=t[1].toUpperCase();let i=this._color2id.get(e);return i||(i=++this._lastColorId,this._color2id.set(e,i),this._id2color[i]=Bo.Il.fromHex("#"+e),i)}getColorMap(){return this._id2color.slice(0)}}class Ho{constructor(e,t){this._colorMap=e,this._root=t,this._cache=new Map}static createFromRawTokenTheme(e,t){return this.createFromParsedTokenTheme(function(e){if(!e||!Array.isArray(e))return[];let t=[],i=0;for(let n=0,o=e.length;n{let i=function(e,t){return et?1:0}(e.token,t.token);return 0!==i?i:e.index-t.index}));let i=0,n="000000",o="ffffff";for(;e.length>=1&&""===e[0].token;){let t=e.shift();-1!==t.fontStyle&&(i=t.fontStyle),null!==t.foreground&&(n=t.foreground),null!==t.background&&(o=t.background)}let r=new Vo;for(let e of t)r.getId(e);let s=r.getId(n),a=r.getId(o),l=new Uo(i,s,a),c=new jo(l);for(let t=0,i=e.length;t>>0,this._cache.set(t,i)}return(i|e<<0)>>>0}}const $o=/\b(comment|string|regex|regexp)\b/;class Uo{constructor(e,t,i){this._fontStyle=e,this._foreground=t,this._background=i,this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}clone(){return new Uo(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,i){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==i&&(this._background=i),this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}}class jo{constructor(e){this._mainRule=e,this._children=new Map}match(e){if(""===e)return this._mainRule;let t,i,n=e.indexOf(".");-1===n?(t=e,i=""):(t=e.substring(0,n),i=e.substring(n+1));let o=this._children.get(t);return void 0!==o?o.match(i):this._mainRule}insert(e,t,i,n){if(""===e)return void this._mainRule.acceptOverwrite(t,i,n);let o,r,s=e.indexOf(".");-1===s?(o=e,r=""):(o=e.substring(0,s),r=e.substring(s+1));let a=this._children.get(o);void 0===a&&(a=new jo(this._mainRule.clone()),this._children.set(o,a)),a.insert(r,t,i,n)}}const qo={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[Qi.cv]:"#FFFFFE",[Qi.NO]:"#000000",[Qi.ES]:"#E5EBF1",[Zi.tR]:"#D3D3D3",[Zi.Ym]:"#939393",[Qi.Rz]:"#ADD6FF4D",[Qi.PX]:"#9DDDFF"}},Ko={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[Qi.cv]:"#1E1E1E",[Qi.NO]:"#D4D4D4",[Qi.ES]:"#3A3D41",[Zi.tR]:"#404040",[Zi.Ym]:"#707070",[Qi.Rz]:"#ADD6FF26"}},Go={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[Qi.cv]:"#000000",[Qi.NO]:"#FFFFFF",[Zi.tR]:"#FFFFFF",[Zi.Ym]:"#FFFFFF"}};var Yo=i(2321);const Zo="vs",Xo="vs-dark",Qo="hc-black",Jo=Io.B.as(Qi.IP.ColorContribution),er=Io.B.as(Ji.IP.ThemingContribution);class tr{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;let i=t.base;e.length>0?(ir(e)?this.id=e:this.id=i+" "+e,this.themeName=e):(this.id=i,this.themeName=i),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(let t in this.themeData.colors)e.set(t,Bo.Il.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){let t=nr(this.themeData.base);for(let i in t.colors)e.has(i)||e.set(i,Bo.Il.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){return this.getColors().get(e)||(!1!==t?this.getDefault(e):void 0)}getDefault(e){let t=this.defaultColors[e];return t||(t=Jo.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return Object.prototype.hasOwnProperty.call(this.getColors(),e)}get type(){switch(this.base){case Zo:return Yo.e.LIGHT;case Qo:return Yo.e.HIGH_CONTRAST;default:return Yo.e.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){let i=nr(this.themeData.base);e=i.rules,i.encodedTokensColors&&(t=i.encodedTokensColors)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=Ho.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const n=this.tokenTheme._match([e].concat(t).join(".")).metadata,o=be.NX.getForeground(n),r=be.NX.getFontStyle(n);return{foreground:o,italic:Boolean(1&r),bold:Boolean(2&r),underline:Boolean(4&r)}}}function ir(e){return e===Zo||e===Xo||e===Qo}function nr(e){switch(e){case Zo:return qo;case Xo:return Ko;case Qo:return Go}}function or(e){let t=nr(e);return new tr(e,t)}class rr extends de.JT{constructor(){super(),this._onColorThemeChange=this._register(new W.Q5),this.onDidColorThemeChange=this._onColorThemeChange.event,this._environment=Object.create(null),this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(Zo,or(Zo)),this._knownThemes.set(Xo,or(Xo)),this._knownThemes.set(Qo,or(Qo));const e=function(){const e=new W.Q5,t=(0,tn.Ks)();return t.onDidChange((()=>e.fire())),{onDidChange:e.event,getCSS(){const e={},i=i=>{let n=i.defaults;for(;Ji.kS.isThemeIcon(n);){const e=t.getIcon(n.id);if(!e)return;n=e.defaults}const o=n.fontId;if(o){const r=t.getIconFont(o);if(r)return e[o]=r,`.codicon-${i.id}:before { content: '${n.fontCharacter}'; font-family: ${(0,X._h)(o)}; }`}return`.codicon-${i.id}:before { content: '${n.fontCharacter}'; }`},n=[];for(let e of t.getIcons()){const t=i(e);t&&n.push(t)}for(let t in e){const i=e[t].definition.src.map((e=>`${(0,X.wY)(e.location)} format('${e.format}')`)).join(", ");n.push(`@font-face { src: ${i}; font-family: ${(0,X._h)(t)}; }`)}return n.join("\n")}}}();this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(Zo),e.onDidChange((()=>{this._codiconCSS=e.getCSS(),this._updateCSS()})),X.uB("(forced-colors: active)",(()=>{this._updateActualTheme()}))}registerEditorContainer(e){return X.OO(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=X.dS(),this._globalStyleElement.className="monaco-colors",this._globalStyleElement.textContent=this._allCSS,this._styleElements.push(this._globalStyleElement)),de.JT.None}_registerShadowDomContainer(e){const t=X.dS(e);return t.className="monaco-colors",t.textContent=this._allCSS,this._styleElements.push(t),{dispose:()=>{for(let e=0;e{t.base===e&&t.notifyBaseUpdated()})),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;t=this._knownThemes.has(e)?this._knownThemes.get(e):this._knownThemes.get(Zo),this._desiredTheme=t,this._updateActualTheme()}_updateActualTheme(){const e=this._autoDetectHighContrast&&window.matchMedia("(forced-colors: active)").matches?this._knownThemes.get(Qo):this._desiredTheme;this._theme!==e&&(this._theme=e,this._updateThemeOrColorMap())}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._updateActualTheme()}_updateThemeOrColorMap(){let e=[],t={},i={addRule:i=>{t[i]||(e.push(i),t[i]=!0)}};er.getThemingParticipants().forEach((e=>e(this._theme,i,this._environment)));const n=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(function(e){let t=[];for(let i=1,n=e.length;ie.textContent=this._allCSS))}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}}var sr=i(3725);const ar="data-keybinding-context";class lr{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}setValue(e,t){return this._value[e]!==t&&(this._value[e]=t,!0)}removeValue(e){return e in this._value&&(delete this._value[e],!0)}getValue(e){const t=this._value[e];return void 0===t&&this._parent?this._parent.getValue(e):t}}class cr extends lr{constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}}cr.INSTANCE=new cr;class ur extends lr{constructor(e,t,i){super(e,null),this._configurationService=t,this._values=J.Id.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration((e=>{if(6===e.source){const e=Array.from(sr.$.map(this._values,(([e])=>e)));this._values.clear(),i.fire(new gr(e))}else{const t=[];for(const i of e.affectedKeys){const e=`config.${i}`,n=this._values.findSuperstr(e);void 0!==n&&(t.push(...sr.$.map(n,(([e])=>e))),this._values.deleteSuperstr(e)),this._values.has(e)&&(t.push(e),this._values.delete(e))}i.fire(new gr(t))}}))}dispose(){this._listener.dispose()}getValue(e){if(0!==e.indexOf(ur._keyPrefix))return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(ur._keyPrefix.length),i=this._configurationService.getValue(t);let n;switch(typeof i){case"number":case"boolean":case"string":n=i;break;default:n=Array.isArray(i)?JSON.stringify(i):i}return this._values.set(e,n),n}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}}ur._keyPrefix="config.";class hr{constructor(e,t,i){this._service=e,this._key=t,this._defaultValue=i,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){void 0===this._defaultValue?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class dr{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}}class gr{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}}class fr{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}}class pr{constructor(e){this._onDidChangeContext=new W.K3({merge:e=>new fr(e)}),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new hr(this,e,t)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new _r(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const t=this.getContextValuesContainer(this._myContextId);return ai.contextMatchesRules(t,e)}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;const i=this.getContextValuesContainer(this._myContextId);i&&i.setValue(e,t)&&this._onDidChangeContext.fire(new dr(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new dr(e))}getContext(e){return this._isDisposed?cr.INSTANCE:this.getContextValuesContainer(function(e){for(;e;){if(e.hasAttribute(ar)){const t=e.getAttribute(ar);return t?parseInt(t,10):NaN}e=e.parentElement}return 0}(e))}}let mr=class extends pr{constructor(e){super(0),this._contexts=new Map,this._toDispose=new de.SL,this._lastContextId=0;const t=new ur(this._myContextId,e,this._onDidChangeContext);this._contexts.set(this._myContextId,t),this._toDispose.add(t)}dispose(){this._onDidChangeContext.dispose(),this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(e){return this._isDisposed?cr.INSTANCE:this._contexts.get(e)||cr.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");let t=++this._lastContextId;return this._contexts.set(t,new lr(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};mr=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([function(e,t){return function(i,n){t(i,n,e)}}(0,Jt.Ui)],mr);class _r extends pr{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=new de.XK,this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(ar)){let e="";this._domNode.classList&&(e=Array.from(this._domNode.classList.values()).join(", ")),console.error("Element already has context attribute"+(e?": "+e:""))}this._domNode.setAttribute(ar,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(this._onDidChangeContext.fire,this._onDidChangeContext)}dispose(){this._isDisposed||(this._onDidChangeContext.dispose(),this._parent.disposeContext(this._myContextId),this._parentChangeListener.dispose(),this._domNode.removeAttribute(ar),this._isDisposed=!0)}getContextValuesContainer(e){return this._isDisposed?cr.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}}ne.P.registerCommand(Xi.Eq,(function(e,t,i){e.get(Xi.i6).createKey(String(t),i)})),ne.P.registerCommand({id:"getContextKeyInfo",handler:()=>[...Xi.uy.all()].sort(((e,t)=>e.key.localeCompare(t.key))),description:{description:(0,ri.N)("getContextKeyInfo","A command that returns information about context keys"),args:[]}}),ne.P.registerCommand("_generateContextKeyInfo",(function(){const e=[],t=new Set;for(let i of Xi.uy.all())t.has(i.key)||(t.add(i.key),e.push(i));e.sort(((e,t)=>e.key.localeCompare(t.key))),console.log(JSON.stringify(e,void 0,2))}));var vr,br=i(1134),yr=i(161);function wr(e,t,i){const n=i.mode===vr.ALIGN?i.offset:i.offset+i.size,o=i.mode===vr.ALIGN?i.offset+i.size:i.offset;return 0===i.position?t<=e-n?n:t<=o?o-t:Math.max(e-t,0):t<=o?o-t:t<=e-n?n:0}!function(e){e[e.AVOID=0]="AVOID",e[e.ALIGN=1]="ALIGN"}(vr||(vr={}));class Cr extends de.JT{constructor(e,t){super(),this.container=null,this.delegate=null,this.toDisposeOnClean=de.JT.None,this.toDisposeOnSetContainer=de.JT.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=X.$(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,X.Cp(this.view),this.setContainer(e,t),this._register((0,de.OF)((()=>this.setContainer(null,1))))}setContainer(e,t){var i;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,null===(i=this.shadowRootHostElement)||void 0===i||i.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e){if(this.container=e,this.useFixedPosition=1!==t,this.useShadowDOM=3===t,this.useShadowDOM){this.shadowRootHostElement=X.$(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const e=document.createElement("style");e.textContent=Sr,this.shadowRoot.appendChild(e),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(X.$("slot"))}else this.container.appendChild(this.view);const i=new de.SL;Cr.BUBBLE_UP_EVENTS.forEach((e=>{i.add(X.mu(this.container,e,(e=>{this.onDOMEvent(e,!1)})))})),Cr.BUBBLE_DOWN_EVENTS.forEach((e=>{i.add(X.mu(this.container,e,(e=>{this.onDOMEvent(e,!0)}),!0))})),this.toDisposeOnSetContainer=i}}show(e){this.isVisible()&&this.hide(),X.PO(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2500",this.view.style.position=this.useFixedPosition?"fixed":"absolute",X.$Z(this.view),this.toDisposeOnClean=e.render(this.view)||de.JT.None,this.delegate=e,this.doLayout(),this.delegate.focus&&this.delegate.focus()}getViewElement(){return this.view}layout(){this.isVisible()&&(!1!==this.delegate.canRelayout||De.gn&&yr.D.pointerEvents?(this.delegate.layout&&this.delegate.layout(),this.doLayout()):this.hide())}doLayout(){if(!this.isVisible())return;let e,t=this.delegate.getAnchor();if(X.Re(t)){let i=X.i(t);e={top:i.top,left:i.left,width:i.width,height:i.height}}else e={top:t.y,left:t.x,width:t.width||1,height:t.height||2};const i=X.w(this.view),n=X.wn(this.view),o=this.delegate.anchorPosition||0,r=this.delegate.anchorAlignment||0;let s,a;if(0===(this.delegate.anchorAxisAlignment||0)){const t={offset:e.top-window.pageYOffset,size:e.height,position:0===o?0:1},l={offset:e.left,size:e.width,position:0===r?0:1,mode:vr.ALIGN};s=wr(window.innerHeight,n,t)+window.pageYOffset,br.e.intersects({start:s,end:s+n},{start:t.offset,end:t.offset+t.size})&&(l.mode=vr.AVOID),a=wr(window.innerWidth,i,l)}else{const t={offset:e.left,size:e.width,position:0===r?0:1},l={offset:e.top,size:e.height,position:0===o?0:1,mode:vr.ALIGN};a=wr(window.innerWidth,i,t),br.e.intersects({start:a,end:a+i},{start:t.offset,end:t.offset+t.size})&&(l.mode=vr.AVOID),s=wr(window.innerHeight,n,l)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(0===o?"bottom":"top"),this.view.classList.add(0===r?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const l=X.i(this.container);this.view.style.top=s-(this.useFixedPosition?X.i(this.view).top:l.top)+"px",this.view.style.left=a-(this.useFixedPosition?X.i(this.view).left:l.left)+"px",this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,(null==t?void 0:t.onHide)&&t.onHide(e),this.toDisposeOnClean.dispose(),X.Cp(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):t&&!X.jg(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}Cr.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],Cr.BUBBLE_DOWN_EVENTS=["click"];let Sr='\n\t:host {\n\t\tall: initial; /* 1st rule so subsequent properties are reset. */\n\t}\n\n\t@font-face {\n\t\tfont-family: "codicon";\n\t\tsrc: url("./codicon.ttf?5d4d76ab2ce5108968ad644d591a16a6") format("truetype");\n\t}\n\n\t.codicon[class*=\'codicon-\'] {\n\t\tfont: normal normal normal 16px/1 codicon;\n\t\tdisplay: inline-block;\n\t\ttext-decoration: none;\n\t\ttext-rendering: auto;\n\t\ttext-align: center;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\tuser-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t}\n\n\t:host {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\n\t}\n\n\t:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }\n\t:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }\n\t:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }\n\t:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }\n\t:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }\n\n\t:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }\n\t:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }\n\t:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }\n\t:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }\n\t:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }\n\n\t:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }\n';var xr=i(6033),kr=i(8609),Dr=i(6268),Lr=i(3938),Nr=i(1212);const Er=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,Ar=/(&)?(&)([^\s&])/g,Mr=(0,en.CM)("menu-selection",en.lA.check),Ir=(0,en.CM)("menu-submenu",en.lA.chevronRight);var Tr;!function(e){e[e.Right=0]="Right",e[e.Left=1]="Left"}(Tr||(Tr={}));class Rr extends qi.o{constructor(e,t,i={}){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const n=document.createElement("div");n.classList.add("monaco-menu"),n.setAttribute("role","presentation"),super(n,{orientation:1,actionViewItemProvider:e=>this.doGetActionViewItem(e,i,o),context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...De.dz||De.IJ?[10]:[]],keyDown:!0}}),this.menuElement=n,this.actionsList.setAttribute("role","menu"),this.actionsList.tabIndex=0,this.menuDisposables=this._register(new de.SL),this.initializeStyleSheet(e),(0,X.nm)(n,X.tw.KEY_DOWN,(e=>{new Kt.y(e).equals(2)&&e.preventDefault()})),i.enableMnemonics&&this.menuDisposables.add((0,X.nm)(n,X.tw.KEY_DOWN,(e=>{const t=e.key.toLocaleLowerCase();if(this.mnemonics.has(t)){X.zB.stop(e,!0);const i=this.mnemonics.get(t);if(1===i.length&&(i[0]instanceof Fr&&i[0].container&&this.focusItemByElement(i[0].container),i[0].onClick(e)),i.length>1){const e=i.shift();e&&e.container&&(this.focusItemByElement(e.container),i.push(e)),this.mnemonics.set(t,i)}}}))),De.IJ&&this._register((0,X.nm)(n,X.tw.KEY_DOWN,(e=>{const t=new Kt.y(e);t.equals(14)||t.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),X.zB.stop(e,!0)):(t.equals(13)||t.equals(12))&&(this.focusedItem=0,this.focusPrevious(),X.zB.stop(e,!0))}))),this._register((0,X.nm)(this.domNode,X.tw.MOUSE_OUT,(e=>{let t=e.relatedTarget;(0,X.jg)(t,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),e.stopPropagation())}))),this._register((0,X.nm)(this.actionsList,X.tw.MOUSE_OVER,(e=>{let t=e.target;if(t&&(0,X.jg)(t,this.actionsList)&&t!==this.actionsList){for(;t.parentElement!==this.actionsList&&null!==t.parentElement;)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}})));let o={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new Ki.s$(n,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const r=this.scrollableElement.getDomNode();r.style.position="",this._register((0,X.nm)(r,X.tw.MOUSE_UP,(e=>{e.preventDefault()}))),n.style.maxHeight=`${Math.max(10,window.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter((e=>{var t;return!(null===(t=i.submenuIds)||void 0===t?void 0:t.has(e.id))||(console.warn(`Found submenu cycle: ${e.id}`),!1)})),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter((e=>!(e instanceof Pr))).forEach(((e,t,i)=>{e.updatePositionInSet(t+1,i.length)}))}initializeStyleSheet(e){(0,X.OO)(e)?(this.styleSheet=(0,X.dS)(e),this.styleSheet.textContent=Br):(Rr.globalStyleSheet||(Rr.globalStyleSheet=(0,X.dS)(),Rr.globalStyleSheet.textContent=Br),this.styleSheet=Rr.globalStyleSheet)}style(e){const t=this.getContainer(),i=e.foregroundColor?`${e.foregroundColor}`:"",n=e.backgroundColor?`${e.backgroundColor}`:"",o=e.borderColor?`1px solid ${e.borderColor}`:"",r=e.shadowColor?`0 2px 4px ${e.shadowColor}`:"";t.style.border=o,this.domNode.style.color=i,this.domNode.style.backgroundColor=n,t.style.boxShadow=r,this.viewItems&&this.viewItems.forEach((t=>{(t instanceof Or||t instanceof Pr)&&t.style(e)}))}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t{this.element&&(this._register((0,X.nm)(this.element,X.tw.MOUSE_UP,(e=>{if(X.zB.stop(e,!0),Dr.vU){if(new Lr.n(e).rightButton)return;this.onClick(e)}else setTimeout((()=>{this.onClick(e)}),0)}))),this._register((0,X.nm)(this.element,X.tw.CONTEXT_MENU,(e=>{X.zB.stop(e,!0)}))))}),100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=(0,X.R3)(this.element,(0,X.$)("a.action-menu-item")),this._action.id===Gi.Z0.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=(0,X.R3)(this.item,(0,X.$)("span.menu-item-check"+Mr.cssSelector)),this.check.setAttribute("role","none"),this.label=(0,X.R3)(this.item,(0,X.$)("span.action-label")),this.options.label&&this.options.keybinding&&((0,X.R3)(this.item,(0,X.$)("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item&&this.item.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){if(this.label&&this.options.label){(0,X.PO)(this.label);let e=(0,Nr.x$)(this.getAction().label);if(e){const t=function(e){const t=Er,i=t.exec(e);if(!i)return e;const n=!i[1];return e.replace(t,n?"$2$3":"").trim()}(e);this.options.enableMnemonics||(e=t),this.label.setAttribute("aria-label",t.replace(/&&/g,"&"));const i=Er.exec(e);if(i){e=Be.YU(e),Ar.lastIndex=0;let t=Ar.exec(e);for(;t&&t[1];)t=Ar.exec(e);const n=e=>e.replace(/&&/g,"&");t?this.label.append(Be.j3(n(e.substr(0,t.index))," "),(0,X.$)("u",{"aria-hidden":"true"},t[3]),Be.oL(n(e.substr(t.index+t[0].length))," ")):this.label.innerText=n(e).trim(),this.item&&this.item.setAttribute("aria-keyshortcuts",(i[1]?i[1]:i[3]).toLocaleLowerCase())}else this.label.innerText=e.replace(/&&/g,"&").trim()}}}updateTooltip(){let e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=ri.N({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.item&&(this.item.title=e)}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.getAction().class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.getAction().enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){this.item&&(this.getAction().checked?(this.item.classList.add("checked"),this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked","true")):(this.item.classList.remove("checked"),this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked","false")))}getMnemonic(){return this.mnemonic}applyStyle(){if(!this.menuStyle)return;const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,i=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,n=e&&this.menuStyle.selectionBorderColor?`thin solid ${this.menuStyle.selectionBorderColor}`:"";this.item&&(this.item.style.color=t?t.toString():"",this.item.style.backgroundColor=i?i.toString():""),this.check&&(this.check.style.color=t?t.toString():""),this.container&&(this.container.style.border=n)}style(e){this.menuStyle=e,this.applyStyle()}}class Fr extends Or{constructor(e,t,i,n){super(e,e,n),this.submenuActions=t,this.parentData=i,this.submenuOptions=n,this.mysubmenu=null,this.submenuDisposables=this._register(new de.SL),this.mouseOver=!1,this.expandDirection=n&&void 0!==n.expandDirection?n.expandDirection:Tr.Right,this.showScheduler=new xe.pY((()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))}),250),this.hideScheduler=new xe.pY((()=>{this.element&&!(0,X.jg)((0,X.vY)(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))}),750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=(0,X.R3)(this.item,(0,X.$)("span.submenu-indicator"+Ir.cssSelector)),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register((0,X.nm)(this.element,X.tw.KEY_UP,(e=>{let t=new Kt.y(e);(t.equals(17)||t.equals(3))&&(X.zB.stop(e,!0),this.createSubmenu(!0))}))),this._register((0,X.nm)(this.element,X.tw.KEY_DOWN,(e=>{let t=new Kt.y(e);(0,X.vY)()===this.item&&(t.equals(17)||t.equals(3))&&X.zB.stop(e,!0)}))),this._register((0,X.nm)(this.element,X.tw.MOUSE_OVER,(e=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())}))),this._register((0,X.nm)(this.element,X.tw.MOUSE_LEAVE,(e=>{this.mouseOver=!1}))),this._register((0,X.nm)(this.element,X.tw.FOCUS_OUT,(e=>{this.element&&!(0,X.jg)((0,X.vY)(),this.element)&&this.hideScheduler.schedule()}))),this._register(this.parentData.parent.onScroll((()=>{this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!1)}))))}updateEnabled(){}onClick(e){X.zB.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch(e){}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,i,n){const o={top:0,left:0};return o.left=wr(e.width,t.width,{position:n===Tr.Right?0:1,offset:i.left,size:i.width}),o.left>=i.left&&o.left{new Kt.y(e).equals(15)&&(X.zB.stop(e,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))}))),this.submenuDisposables.add((0,X.nm)(this.submenuContainer,X.tw.KEY_DOWN,(e=>{new Kt.y(e).equals(15)&&X.zB.stop(e,!0)}))),this.submenuDisposables.add(this.parentData.submenu.onDidCancel((()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)}))),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){var t;this.item&&(null===(t=this.item)||void 0===t||t.setAttribute("aria-expanded",e))}applyStyle(){if(super.applyStyle(),!this.menuStyle)return;const e=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=e?`${e}`:""),this.parentData.submenu&&this.parentData.submenu.style(this.menuStyle)}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class Pr extends xr.g{style(e){this.label&&(this.label.style.borderBottomColor=e.separatorColor?`${e.separatorColor}`:"")}}let Br=`\n.monaco-menu {\n\tfont-size: 13px;\n\n}\n\n${(0,kr.a)(Mr)}\n${(0,kr.a)(Ir)}\n\n.monaco-menu .monaco-action-bar {\n\ttext-align: right;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.monaco-menu .monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\twidth: 100%;\n\tjustify-content: flex-end;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar.reverse .actions-container {\n\tflex-direction: row-reverse;\n}\n\n.monaco-menu .monaco-action-bar .action-item {\n\tcursor: pointer;\n\tdisplay: inline-block;\n\ttransition: transform 50ms ease;\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-menu .monaco-action-bar.animated .action-item.active {\n\ttransform: scale(1.272019649, 1.272019649); /* 1.272019649 = √φ */\n}\n\n.monaco-menu .monaco-action-bar .action-item .icon,\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar .action-label {\n\tfont-size: 11px;\n\tmargin-right: 4px;\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label,\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {\n\topacity: 0.4;\n}\n\n/* Vertical actions */\n\n.monaco-menu .monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid #bbb;\n\tpadding-top: 1px;\n\tmargin-left: .8em;\n\tmargin-right: .8em;\n}\n\n.monaco-menu .secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-menu .monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-right: 10px;\n}\n\n.monaco-menu .monaco-action-bar.vertical {\n\tmargin-left: 0;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tpadding: 0;\n\ttransform: none;\n\tdisplay: flex;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.active {\n\ttransform: none;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\theight: 2em;\n\talign-items: center;\n\tposition: relative;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label {\n\tflex: 1 1 auto;\n\ttext-decoration: none;\n\tpadding: 0 1em;\n\tbackground: none;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .keybinding,\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tdisplay: inline-block;\n\tflex: 2 1 auto;\n\tpadding: 0 1em;\n\ttext-align: right;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {\n\tfont-size: 16px !important;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {\n\tmargin-left: auto;\n\tmargin-right: -20px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {\n\topacity: 0.4;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\tmargin: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tposition: static;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {\n\tposition: absolute;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tpadding: 0.5em 0 0 0;\n\tmargin-bottom: 0.5em;\n\twidth: 100%;\n\theight: 0px !important;\n\tmargin-left: .8em !important;\n\tmargin-right: .8em !important;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {\n\tpadding: 0.7em 1em 0.1em 1em;\n\tfont-weight: bold;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:hover {\n\tcolor: inherit;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tposition: absolute;\n\tvisibility: hidden;\n\twidth: 1em;\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {\n\tvisibility: visible;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Context Menu */\n\n.context-view.monaco-menu-container {\n\toutline: 0;\n\tborder: none;\n\tanimation: fadeIn 0.083s linear;\n\t-webkit-app-region: no-drag;\n}\n\n.context-view.monaco-menu-container :focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {\n\toutline: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tborder: thin solid transparent; /* prevents jumping behaviour on hover or focus */\n}\n\n\n/* High Contrast Theming */\n:host-context(.hc-black) .context-view.monaco-menu-container {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground: none;\n}\n\n/* Vertical Action Bar Styles */\n\n.monaco-menu .monaco-action-bar.vertical {\n\tpadding: .5em 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\theight: 1.8em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),\n.monaco-menu .monaco-action-bar.vertical .keybinding {\n\tfont-size: inherit;\n\tpadding: 0 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tfont-size: inherit;\n\twidth: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tfont-size: inherit;\n\tpadding: 0.2em 0 0 0;\n\tmargin-bottom: 0.2em;\n}\n\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tfont-size: 60%;\n\tpadding: 0 1.8em;\n}\n\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n\tmask-size: 10px 10px;\n\t-webkit-mask-size: 10px 10px;\n}\n\n.monaco-menu .action-item {\n\tcursor: default;\n}\n\n/* Arrows */\n.monaco-scrollable-element > .scrollbar > .scra {\n\tcursor: pointer;\n\tfont-size: 11px !important;\n}\n\n.monaco-scrollable-element > .visible {\n\topacity: 1;\n\n\t/* Background rule added for IE9 - to allow clicks on dom node */\n\tbackground:rgba(0,0,0,0);\n\n\ttransition: opacity 100ms linear;\n}\n.monaco-scrollable-element > .invisible {\n\topacity: 0;\n\tpointer-events: none;\n}\n.monaco-scrollable-element > .invisible.fade {\n\ttransition: opacity 800ms linear;\n}\n\n/* Scrollable Content Inset Shadow */\n.monaco-scrollable-element > .shadow {\n\tposition: absolute;\n\tdisplay: none;\n}\n.monaco-scrollable-element > .shadow.top {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 3px;\n\theight: 3px;\n\twidth: 100%;\n\tbox-shadow: #DDD 0 6px 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.left {\n\tdisplay: block;\n\ttop: 3px;\n\tleft: 0;\n\theight: 100%;\n\twidth: 3px;\n\tbox-shadow: #DDD 6px 0 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.top-left-corner {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 0;\n\theight: 3px;\n\twidth: 3px;\n}\n.monaco-scrollable-element > .shadow.top.left {\n\tbox-shadow: #DDD 6px 6px 6px -6px inset;\n}\n\n/* ---------- Default Style ---------- */\n\n:host-context(.vs) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(100, 100, 100, .4);\n}\n:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(121, 121, 121, .4);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(111, 195, 223, .6);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: rgba(100, 100, 100, .7);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: rgba(111, 195, 223, .8);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(0, 0, 0, .6);\n}\n:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(191, 191, 191, .4);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(111, 195, 223, 1);\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.top {\n\tbox-shadow: none;\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.left {\n\tbox-shadow: #000 6px 0 6px -6px inset;\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.top.left {\n\tbox-shadow: #000 6px 6px 6px -6px inset;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.top {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.left {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.top.left {\n\tbox-shadow: none;\n}\n`;var zr=i(8810),Wr=i(4850);class Vr{constructor(e,t,i,n,o){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.themeService=o,this.focusToReturn=null,this.block=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;let i;this.focusToReturn=document.activeElement;let n=(0,X.Re)(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:n=>{let o=e.getMenuClassName?e.getMenuClassName():"";o&&(n.className+=" "+o),this.options.blockMouse&&(this.block=n.appendChild((0,X.$)(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",(0,Wr.jt)(this.block,X.tw.MOUSE_DOWN)((e=>e.stopPropagation())));const r=new de.SL,s=e.actionRunner||new Gi.Wi;return s.onBeforeRun(this.onActionRun,this,r),s.onDidRun(this.onDidActionRun,this,r),i=new Rr(n,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:s,getKeyBinding:e.getKeyBinding?e.getKeyBinding:e=>this.keybindingService.lookupKeybinding(e.id)}),r.add((0,zr.tj)(i,this.themeService)),i.onDidCancel((()=>this.contextViewService.hideContextView(!0)),null,r),i.onDidBlur((()=>this.contextViewService.hideContextView(!0)),null,r),(0,Wr.jt)(window,X.tw.BLUR)((()=>{this.contextViewService.hideContextView(!0)}),null,r),(0,Wr.jt)(window,X.tw.MOUSE_DOWN)((e=>{if(e.defaultPrevented)return;let t=new Lr.n(e),i=t.target;if(!t.rightButton){for(;i;){if(i===n)return;i=i.parentElement}this.contextViewService.hideContextView(!0)}}),null,r),(0,de.F8)(r,i)},focus:()=>{i&&i.focus(!!e.autoSelectFirstItem)},onHide:t=>{e.onHide&&e.onHide(!!t),this.block&&(this.block.remove(),this.block=null),this.focusToReturn&&this.focusToReturn.focus()}},n,!!n)}onActionRun(e){this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1),this.focusToReturn&&this.focusToReturn.focus()}onDidActionRun(e){e.error&&!(0,ke.VV)(e.error)&&this.notificationService.error(e.error)}}var Hr=i(829),$r=function(e,t){return function(i,n){t(i,n,e)}};let Ur=class extends de.JT{constructor(e,t,i,n,o){super(),this.contextMenuHandler=new Vr(i,e,t,n,o)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){this.contextMenuHandler.showContextMenu(e),X._q.getInstance().resetKeyStatus()}};Ur=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([$r(0,Hr.b),$r(1,mi.lT),$r(2,vn.u),$r(3,Zn.d),$r(4,Ji.XE)],Ur);const jr=(0,mn.yh)("layoutService");let qr=class extends de.JT{constructor(e){super(),this.layoutService=e,this.currentViewDisposable=de.JT.None,this.container=e.container,this.contextView=this._register(new Cr(this.container,1)),this.layout(),this._register(e.onDidLayout((()=>this.layout())))}setContainer(e,t){this.contextView.setContainer(e,t||1)}showContextView(e,t,i){t?t!==this.container&&(this.container=t,this.setContainer(t,i?3:2)):this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.contextView.show(e);const n=(0,de.OF)((()=>{this.currentViewDisposable===n&&this.hideContextView()}));return this.currentViewDisposable=n,n}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e)}};qr=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([function(e,t){return function(i,n){t(i,n,e)}}(0,jr)],qr);var Kr=i(8820);class Gr{constructor(e){this.incoming=new Map,this.outgoing=new Map,this.data=e}}class Yr{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(let t of this._nodes.values())0===t.outgoing.size&&e.push(t);return e}insertEdge(e,t){const i=this.lookupOrInsertNode(e),n=this.lookupOrInsertNode(t);i.outgoing.set(this._hashFn(t),n),n.incoming.set(this._hashFn(e),i)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(let e of this._nodes.values())e.outgoing.delete(t),e.incoming.delete(t)}lookupOrInsertNode(e){const t=this._hashFn(e);let i=this._nodes.get(t);return i||(i=new Gr(e),this._nodes.set(t,i)),i}isEmpty(){return 0===this._nodes.size}toString(){let e=[];for(let[t,i]of this._nodes)e.push(`${t}, (incoming)[${[...i.incoming.keys()].join(", ")}], (outgoing)[${[...i.outgoing.keys()].join(",")}]`);return e.join("\n")}findCycleSlow(){for(let[e,t]of this._nodes){const i=new Set([e]),n=this._findCycle(t,i);if(n)return n}}_findCycle(e,t){for(let[i,n]of e.outgoing){if(t.has(i))return[...t,i].join(" -> ");t.add(i);const e=this._findCycle(n,t);if(e)return e;t.delete(i)}}}var Zr=i(7108);class Xr extends Error{constructor(e){var t;super("cyclic dependency between services"),this.message=null!==(t=e.findCycleSlow())&&void 0!==t?t:`UNABLE to detect cycle, dumping graph: \n${e.toString()}`}}class Qr{constructor(e=new _n.y,t=!1,i){this._activeInstantiations=new Set,this._services=e,this._strict=t,this._parent=i,this._services.set(mn.TG,this)}createChild(e){return new Qr(e,this._strict,this)}invokeFunction(e,...t){let i=Jr.traceInvocation(e),n=!1;try{return e({get:(e,t)=>{if(n)throw(0,ke.L6)("service accessor is only valid during the invocation of its target method");const o=this._getOrCreateServiceInstance(e,i);if(!o&&t!==mn.jt)throw new Error(`[invokeFunction] unknown service '${e}'`);return o}},...t)}finally{n=!0,i.stop()}}createInstance(e,...t){let i,n;return e instanceof Zr.M?(i=Jr.traceCreation(e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=Jr.traceCreation(e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){let n=mn.I8.getServiceDependencies(e).sort(((e,t)=>e.index-t.index)),o=[];for(const t of n){let n=this._getOrCreateServiceInstance(t.id,i);if(!n&&this._strict&&!t.optional)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${t.id}.`);o.push(n)}let r=n.length>0?n[0].index:t.length;if(t.length!==r){console.warn(`[createInstance] First service dependency of ${e.name} at position ${r+1} conflicts with ${t.length} static arguments`);let i=r-t.length;t=i>0?t.concat(new Array(i)):t.slice(0,r)}return new e(...[...t,...o])}_setServiceInstance(e,t){if(this._services.get(e)instanceof Zr.M)this._services.set(e,t);else{if(!this._parent)throw new Error("illegalState - setting UNKNOWN service instance");this._parent._setServiceInstance(e,t)}}_getServiceInstanceOrDescriptor(e){let t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){let i=this._getServiceInstanceOrDescriptor(e);return i instanceof Zr.M?this._safeCreateAndCacheServiceInstance(e,i,t.branch(e,!0)):(t.branch(e,!1),i)}_safeCreateAndCacheServiceInstance(e,t,i){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,i)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,i){const n=new Yr((e=>e.id.toString()));let o=0;const r=[{id:e,desc:t,_trace:i}];for(;r.length;){const t=r.pop();if(n.lookupOrInsertNode(t),o++>1e3)throw new Xr(n);for(let i of mn.I8.getServiceDependencies(t.desc.ctor)){let o=this._getServiceInstanceOrDescriptor(i.id);if(o||i.optional||console.warn(`[createInstance] ${e} depends on ${i.id} which is NOT registered.`),o instanceof Zr.M){const e={id:i.id,desc:o,_trace:t._trace.branch(i.id,!0)};n.insertEdge(t,e),r.push(e)}}}for(;;){const e=n.roots();if(0===e.length){if(!n.isEmpty())throw new Xr(n);break}for(const{data:t}of e){if(this._getServiceInstanceOrDescriptor(t.id)instanceof Zr.M){const e=this._createServiceInstanceWithOwner(t.id,t.desc.ctor,t.desc.staticArguments,t.desc.supportsDelayedInstantiation,t._trace);this._setServiceInstance(t.id,e)}n.removeNode(t)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,o){if(this._services.get(e)instanceof Zr.M)return this._createServiceInstance(t,i,n,o);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,i,n,o);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t=[],i,n){if(i){const i=new xe.Ue((()=>this._createInstance(e,t,n)));return new Proxy(Object.create(null),{get(e,t){if(t in e)return e[t];let n=i.value,o=n[t];return"function"!=typeof o||(o=o.bind(n),e[t]=o),o},set:(e,t,n)=>(i.value[t]=n,!0)})}return this._createInstance(e,t,n)}}class Jr{constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}static traceInvocation(e){return Jr._None}static traceCreation(e){return Jr._None}branch(e,t){let i=new Jr(2,e.toString());return this._dep.push([e,t,i]),i}stop(){let e=Date.now()-this._start;Jr._totals+=e;let t=!1,i=[`${0===this.type?"CREATE":"CALL"} ${this.name}`,`${function e(i,n){let o=[],r=new Array(i+1).join("\t");for(const[s,a,l]of n._dep)if(a&&l){t=!0,o.push(`${r}CREATES -> ${s}`);let n=e(i+1,l);n&&o.push(n)}else o.push(`${r}uses -> ${s}`);return o.join("\n")}(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${Jr._totals.toFixed(2)}ms)`];(e>2||t)&&console.log(i.join("\n"))}}Jr._None=new class extends Jr{constructor(){super(-1,null)}stop(){}branch(){return this}},Jr._totals=0;var es=i(4349),ts=i(343),is=i(8674);class ns{constructor(){this._byResource=new J.Y9,this._byOwner=new Map}set(e,t,i){let n=this._byResource.get(e);n||(n=new Map,this._byResource.set(e,n)),n.set(t,i);let o=this._byOwner.get(t);o||(o=new J.Y9,this._byOwner.set(t,o)),o.set(e,i)}get(e,t){let i=this._byResource.get(e);return null==i?void 0:i.get(t)}delete(e,t){let i=!1,n=!1,o=this._byResource.get(e);o&&(i=o.delete(t));let r=this._byOwner.get(t);if(r&&(n=r.delete(e)),i!==n)throw new Error("illegal state");return i&&n}values(e){var t,i,n,o;return"string"==typeof e?null!==(i=null===(t=this._byOwner.get(e))||void 0===t?void 0:t.values())&&void 0!==i?i:sr.$.empty():H.o.isUri(e)?null!==(o=null===(n=this._byResource.get(e))||void 0===n?void 0:n.values())&&void 0!==o?o:sr.$.empty():sr.$.map(sr.$.concat(...this._byOwner.values()),(e=>e[1]))}}class os{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new J.Y9,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const e=this._data.get(t);e&&this._substract(e);const i=this._resourceStats(t);this._add(i),this._data.set(t,i)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(e.scheme===te.lg.inMemory||e.scheme===te.lg.walkThrough||e.scheme===te.lg.walkThroughSnippet)return t;for(const{severity:i}of this._service.read({resource:e}))i===is.ZL.Error?t.errors+=1:i===is.ZL.Warning?t.warnings+=1:i===is.ZL.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class rs{constructor(){this._onMarkerChanged=new W.Q5,this.onMarkerChanged=W.ju.debounce(this._onMarkerChanged.event,rs._debouncer,0),this._data=new ns,this._stats=new os(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(const i of t||[])this.changeOne(e,i,[])}changeOne(e,t,i){if((0,ct.XY)(i))this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);else{const n=[];for(const o of i){const i=rs._toMarker(e,t,o);i&&n.push(i)}this._data.set(t,e,n),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,i){let{code:n,severity:o,message:r,source:s,startLineNumber:a,startColumn:l,endLineNumber:c,endColumn:u,relatedInformation:h,tags:d}=i;if(r)return a=a>0?a:1,l=l>0?l:1,c=c>=a?c:a,u=u>0?u:l,{resource:t,owner:e,code:n,severity:o,message:r,source:s,startLineNumber:a,startColumn:l,endLineNumber:c,endColumn:u,relatedInformation:h,tags:d}}read(e=Object.create(null)){let{owner:t,resource:i,severities:n,take:o}=e;if((!o||o<0)&&(o=-1),t&&i){const e=this._data.get(i,t);if(e){const t=[];for(const i of e)if(rs._accept(i,n)){const e=t.push(i);if(o>0&&e===o)break}return t}return[]}if(t||i){const e=this._data.values(null!=i?i:t),r=[];for(const t of e)for(const e of t)if(rs._accept(e,n)){const t=r.push(e);if(o>0&&t===o)return r}return r}{const e=[];for(let t of this._data.values())for(let i of t)if(rs._accept(i,n)){const t=e.push(i);if(o>0&&t===o)return e}return e}}static _accept(e,t){return void 0===t||(t&e.severity)===e.severity}static _debouncer(e,t){e||(rs._dedupeMap=new J.Y9,e=[]);for(const i of t)rs._dedupeMap.has(i)||(rs._dedupeMap.set(i,!0),e.push(i));return e}}var ss=i(6904),as=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ls=function(e,t){return function(i,n){t(i,n,e)}};let cs=class{constructor(e){this._commandService=e}createMenu(e,t,i=!1){return new us(e,i,this._commandService,t,this)}};cs=as([ls(0,ne.H)],cs);let us=class e{constructor(e,t,i,n,o){this._id=e,this._fireEventsForSubmenuChanges=t,this._commandService=i,this._contextKeyService=n,this._menuService=o,this._dispoables=new de.SL,this._onDidChange=new W.Q5,this.onDidChange=this._onDidChange.event,this._menuGroups=[],this._contextKeys=new Set,this._build();const r=new xe.pY((()=>this._build()),50);this._dispoables.add(r),this._dispoables.add(Yn.BH.onDidChangeMenu((t=>{t.has(e)&&r.schedule()})));const s=new xe.pY((()=>this._onDidChange.fire(this)),50);this._dispoables.add(s),this._dispoables.add(n.onDidChangeContext((e=>{e.affectsSome(this._contextKeys)&&s.schedule()})))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}_build(){this._menuGroups.length=0,this._contextKeys.clear();const t=Yn.BH.getMenuItems(this._id);let i;t.sort(e._compareMenuItems);for(let e of t){const t=e.group||"";i&&i[0]===t||(i=[t,[]],this._menuGroups.push(i)),i[1].push(e),this._collectContextKeys(e)}this._onDidChange.fire(this)}_collectContextKeys(t){if(e._fillInKbExprKeys(t.when,this._contextKeys),(0,Yn.vr)(t)){if(t.command.precondition&&e._fillInKbExprKeys(t.command.precondition,this._contextKeys),t.command.toggled){const i=t.command.toggled.condition||t.command.toggled;e._fillInKbExprKeys(i,this._contextKeys)}}else this._fireEventsForSubmenuChanges&&Yn.BH.getMenuItems(t.submenu).forEach(this._collectContextKeys,this)}getActions(e){const t=[];for(let i of this._menuGroups){const[n,o]=i,r=[];for(const t of o)if(this._contextKeyService.contextMatchesRules(t.when)){const i=(0,Yn.vr)(t)?new Yn.U8(t.command,t.alt,e,this._contextKeyService,this._commandService):new Yn.NZ(t,this._menuService,this._contextKeyService,e);r.push(i)}r.length>0&&t.push([n,r])}return t}static _fillInKbExprKeys(e,t){if(e)for(let i of e.keys())t.add(i)}static _compareMenuItems(t,i){let n=t.group,o=i.group;if(n!==o){if(!n)return 1;if(!o)return-1;if("navigation"===n)return-1;if("navigation"===o)return 1;let e=n.localeCompare(o);if(0!==e)return e}let r=t.order||0,s=i.order||0;return rs?1:e._compareTitles((0,Yn.vr)(t)?t.command.title:t.title,(0,Yn.vr)(i)?i.command.title:i.title)}static _compareTitles(e,t){const i="string"==typeof e?e:e.original,n="string"==typeof t?t:t.original;return i.localeCompare(n)}};us=as([ls(2,ne.H),ls(3,Xi.i6),ls(4,Yn.co)],us);var hs=i(6479),ds=function(e,t){return function(i,n){t(i,n,e)}};function gs(e){return e.toString()}class fs extends de.JT{constructor(e){super(),this.model=e,this._markersData=new Map,this._register((0,de.OF)((()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()})))}update(e,t){const i=[...this._markersData.keys()];this._markersData.clear();const n=this.model.deltaDecorations(i,t);for(let t=0;tthis._onModelAdded(e))),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach((e=>e.dispose())),this._markerDecorations.clear()}getMarker(e,t){const i=this._markerDecorations.get(gs(e));return i&&i.getMarker(t)||null}_handleMarkerChange(e){e.forEach((e=>{const t=this._markerDecorations.get(gs(e));t&&this._updateDecorations(t)}))}_onModelAdded(e){const t=new fs(e);this._markerDecorations.set(gs(e.uri),t),this._updateDecorations(t)}_onModelRemoved(e){const t=this._markerDecorations.get(gs(e.uri));t&&(t.dispose(),this._markerDecorations.delete(gs(e.uri))),e.uri.scheme!==te.lg.inMemory&&e.uri.scheme!==te.lg.internal&&e.uri.scheme!==te.lg.vscode||this._markerService&&this._markerService.read({resource:e.uri}).map((e=>e.owner)).forEach((t=>this._markerService.remove(t,[e.uri])))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});let i=t.map((t=>({range:this._createDecorationRange(e.model,t),options:this._createDecorationOption(t)})));e.update(t,i)&&this._onDidChangeMarker.fire(e.model)}_createDecorationRange(e,t){let i=U.e.lift(t);if(t.severity!==is.ZL.Hint||this._hasMarkerTag(t,1)||this._hasMarkerTag(t,2)||(i=i.setEndPosition(i.startLineNumber,i.startColumn+2)),i=e.validateRange(i),i.isEmpty()){let t=e.getWordAtPosition(i.getStartPosition());if(t)i=new U.e(i.startLineNumber,t.startColumn,i.endLineNumber,t.endColumn);else{let t=e.getLineLastNonWhitespaceColumn(i.startLineNumber)||e.getLineMaxColumn(i.startLineNumber);1===t||(i=i.endColumn>=t?new U.e(i.startLineNumber,t-1,i.endLineNumber,t):new U.e(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn+1))}}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&i.startLineNumber===i.endLineNumber){let n=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);n=0}};ps=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([ds(0,at.q),ds(1,is.lT)],ps);var ms=i(5026),_s=function(e,t){return function(i,n){t(i,n,e)}};let vs=class extends de.JT{constructor(e,t){super(),this._contextKeyService=e,this._configurationService=t,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new W.Q5,this._accessibilityModeEnabledContext=Xn.U.bindTo(this._contextKeyService);const i=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("editor.accessibilitySupport")&&(i(),this._onDidChangeScreenReaderOptimized.fire())}))),i(),this.onDidChangeScreenReaderOptimized((()=>i()))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return"on"===e||"auto"===e&&2===this._accessibilitySupport}getAccessibilitySupport(){return this._accessibilitySupport}};vs=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([_s(0,Xi.i6),_s(1,Jt.Ui)],vs);var bs=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class ys{constructor(){this.mapTextToType=new Map,this.findText=""}writeText(e,t){return bs(this,void 0,void 0,(function*(){if(t)return void this.mapTextToType.set(t,e);try{return yield navigator.clipboard.writeText(e)}catch(e){console.error(e)}const i=document.activeElement,n=document.body.appendChild((0,X.$)("textarea",{"aria-hidden":!0}));n.style.height="1px",n.style.width="1px",n.style.position="absolute",n.value=e,n.focus(),n.select(),document.execCommand("copy"),i instanceof HTMLElement&&i.focus(),document.body.removeChild(n)}))}readText(e){return bs(this,void 0,void 0,(function*(){if(e)return this.mapTextToType.get(e)||"";try{return yield navigator.clipboard.readText()}catch(e){return console.error(e),""}}))}readFindText(){return bs(this,void 0,void 0,(function*(){return this.findText}))}writeFindText(e){return bs(this,void 0,void 0,(function*(){this.findText=e}))}}var ws=i(4862),Cs=function(e,t){return function(i,n){t(i,n,e)}},Ss=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function xs(e){return e.scheme===te.lg.file?e.fsPath:e.path}let ks=0;class Ds{constructor(e,t,i,n,o,r,s){this.id=++ks,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=i,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=n,this.groupOrder=o,this.sourceId=r,this.sourceOrder=s,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class Ls{constructor(e,t){this.resourceLabel=e,this.reason=t}}class Ns{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,i]of this.elements)(0===i.reason?e:t).push(i.resourceLabel);let i=[];return e.length>0&&i.push(ri.N({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&i.push(ri.N({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",t.join(", "))),i.join("\n")}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class Es{constructor(e,t,i,n,o,r,s){this.id=++ks,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=i,this.groupId=n,this.groupOrder=o,this.sourceId=r,this.sourceOrder=s,this.removedResources=null,this.invalidatedResources=null}canSplit(){return"function"==typeof this.actual.split}removeResource(e,t,i){this.removedResources||(this.removedResources=new Ns),this.removedResources.has(t)||this.removedResources.set(t,new Ls(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t),0===this.invalidatedResources.size&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new Ns),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new Ls(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class As{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){let e=[];e.push(`* ${this.strResource}:`);for(let t=0;t=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join("\n")}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){1===e.type?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const i of this._past)t(i.actual)&&this._setElementValidFlag(i,e);for(const i of this._future)t(i.actual)&&this._setElementValidFlag(i,e)}pushElement(e){for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let e=0,i=this._past.length;e=0;e--)t.push(this._future[e].id);return new ws.YO(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,o=-1;for(let r=0,s=this._past.length;r=t||s.id!==e.elements[n])&&(i=!1,o=0),i||1!==s.type||s.removeResource(this.resourceLabel,this.strResource,0)}let r=-1;for(let o=this._future.length-1;o>=0;o--,n++){const s=this._future[o];i&&(n>=t||s.id!==e.elements[n])&&(i=!1,r=o),i||1!==s.type||s.removeResource(this.resourceLabel,this.strResource,0)}-1!==o&&(this._past=this._past.slice(0,o)),-1!==r&&(this._future=this._future.slice(r+1)),this.versionId++}getElements(){const e=[],t=[];for(const t of this._past)e.push(t.actual);for(const e of this._future)t.push(e.actual);return{past:e,future:t}}getClosestPastElement(){return 0===this._past.length?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return 0===this._future.length?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let i=this._past.length-1;i>=0;i--)if(this._past[i]===e){t.has(this.strResource)?this._past[i]=t.get(this.strResource):this._past.splice(i,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let i=this._future.length-1;i>=0;i--)if(this._future[i]===e){t.has(this.strResource)?this._future[i]=t.get(this.strResource):this._future.splice(i,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class Ms{constructor(e){this.editStacks=e,this._versionIds=[];for(let e=0,t=this.editStacks.length;et.sourceOrder)&&(t=r,i=n)}return[t,i]}canUndo(e){if(e instanceof ws.gJ){const[,t]=this._findClosestUndoElementWithSource(e.id);return!!t}const t=this.getUriComparisonKey(e);return!!this._editStacks.has(t)&&this._editStacks.get(t).hasPastElements()}_onError(e,t){(0,ke.dL)(e);for(const e of t.strResources)this.removeElements(e);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,i,n,o){const r=this._acquireLocks(i);let s;try{s=t()}catch(t){return r(),n.dispose(),this._onError(t,e)}return s?s.then((()=>(r(),n.dispose(),o())),(t=>(r(),n.dispose(),this._onError(t,e)))):(r(),n.dispose(),o())}_invokeWorkspacePrepare(e){return Ss(this,void 0,void 0,(function*(){if(void 0===e.actual.prepareUndoRedo)return de.JT.None;const t=e.actual.prepareUndoRedo();return void 0===t?de.JT.None:t}))}_invokeResourcePrepare(e,t){if(1!==e.actual.type||void 0===e.actual.prepareUndoRedo)return t(de.JT.None);const i=e.actual.prepareUndoRedo();return i?(0,de.Wf)(i)?t(i):i.then((e=>t(e))):t(de.JT.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||Is);return new Ms(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new Rs(this._undo(e,0,!0));for(const e of t.strResources)this.removeElements(e);return this._notificationService.warn(n),new Rs}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,ri.N({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,ri.N({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const o=[];for(const e of i.editStacks)e.getClosestPastElement()!==t&&o.push(e.resourceLabel);if(o.length>0)return this._tryToSplitAndUndo(e,t,null,ri.N({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",t.label,o.join(", ")));const r=[];for(const e of i.editStacks)e.locked&&r.push(e.resourceLabel);return r.length>0?this._tryToSplitAndUndo(e,t,null,ri.N({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,r.join(", "))):i.isValid()?null:this._tryToSplitAndUndo(e,t,null,ri.N({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t,i){const n=this._getAffectedEditStacks(t),o=this._checkWorkspaceUndo(e,t,n,!1);return o?o.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,n,i)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,t]of this._editStacks){const i=t.getClosestPastElement();if(i){if(i===e){const i=t.getSecondClosestPastElement();if(i&&i.groupId===e.groupId)return!0}if(i.groupId===e.groupId)return!0}}return!1}_confirmAndExecuteWorkspaceUndo(e,t,i,n){return Ss(this,void 0,void 0,(function*(){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){const o=yield this._dialogService.show(Gt.Z.Info,ri.N("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),[ri.N({key:"ok",comment:["{0} denotes a number that is > 1"]},"Undo in {0} Files",i.editStacks.length),ri.N("nok","Undo this File"),ri.N("cancel","Cancel")],{cancelId:2});if(2===o.choice)return;if(1===o.choice)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const r=this._checkWorkspaceUndo(e,t,i,!1);if(r)return r.returnValue;n=!0}let o;try{o=yield this._invokeWorkspacePrepare(t)}catch(e){return this._onError(e,t)}const r=this._checkWorkspaceUndo(e,t,i,!0);if(r)return o.dispose(),r.returnValue;for(const e of i.editStacks)e.moveBackward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.undo()),i,o,(()=>this._continueUndoInGroup(t.groupId,n)))}))}_resourceUndo(e,t,i){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(n=>(e.moveBackward(t),this._safeInvokeWithLocks(t,(()=>t.actual.undo()),new Ms([e]),n,(()=>this._continueUndoInGroup(t.groupId,i))))));{const e=ri.N({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const r=o.getClosestPastElement();r&&r.groupId===e&&(!t||r.groupOrder>t.groupOrder)&&(t=r,i=n)}return[t,i]}_continueUndoInGroup(e,t){if(!e)return;const[,i]=this._findClosestUndoElementInGroup(e);return i?this._undo(i,0,t):void 0}undo(e){if(e instanceof ws.gJ){const[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return"string"==typeof e?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,i){if(!this._editStacks.has(e))return;const n=this._editStacks.get(e),o=n.getClosestPastElement();if(o){if(o.groupId){const[e,n]=this._findClosestUndoElementInGroup(o.groupId);if(o!==e&&n)return this._undo(n,t,i)}if((o.sourceId!==t||o.confirmBeforeUndo)&&!i)return this._confirmAndContinueUndo(e,t,o);try{return 1===o.type?this._workspaceUndo(e,o,i):this._resourceUndo(n,o,i)}finally{}}}_confirmAndContinueUndo(e,t,i){return Ss(this,void 0,void 0,(function*(){if(1!==(yield this._dialogService.show(Gt.Z.Info,ri.N("confirmDifferentSource","Would you like to undo '{0}'?",i.label),[ri.N("confirmDifferentSource.ok","Undo"),ri.N("cancel","Cancel")],{cancelId:1})).choice)return this._undo(e,t,!0)}))}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const r=o.getClosestFutureElement();r&&r.sourceId===e&&(!t||r.sourceOrder0)return this._tryToSplitAndRedo(e,t,null,ri.N({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",t.label,o.join(", ")));const r=[];for(const e of i.editStacks)e.locked&&r.push(e.resourceLabel);return r.length>0?this._tryToSplitAndRedo(e,t,null,ri.N({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,r.join(", "))):i.isValid()?null:this._tryToSplitAndRedo(e,t,null,ri.N({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){const i=this._getAffectedEditStacks(t),n=this._checkWorkspaceRedo(e,t,i,!1);return n?n.returnValue:this._executeWorkspaceRedo(e,t,i)}_executeWorkspaceRedo(e,t,i){return Ss(this,void 0,void 0,(function*(){let n;try{n=yield this._invokeWorkspacePrepare(t)}catch(e){return this._onError(e,t)}const o=this._checkWorkspaceRedo(e,t,i,!0);if(o)return n.dispose(),o.returnValue;for(const e of i.editStacks)e.moveForward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.redo()),i,n,(()=>this._continueRedoInGroup(t.groupId)))}))}_resourceRedo(e,t){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(i=>(e.moveForward(t),this._safeInvokeWithLocks(t,(()=>t.actual.redo()),new Ms([e]),i,(()=>this._continueRedoInGroup(t.groupId))))));{const e=ri.N({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const r=o.getClosestFutureElement();r&&r.groupId===e&&(!t||r.groupOrder=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([Cs(0,Kr.S),Cs(1,mi.lT)],Ts);class Rs{constructor(e){this.returnValue=e}}(0,ms.z)(ws.tJ,Ts);var Os=i(7746);const Fs=new xe.Ue((()=>{const e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:e,collatorIsNumeric:e.resolvedOptions().numeric}}));var Ps=i(8801),Bs=i(4650),zs=i(9898),Ws=i(4742);const Vs={},Hs=new Ws.R("quick-input-button-icon-");function $s(e){if(!e)return;let t;const i=e.dark.toString();return Vs[i]?t=Vs[i]:(t=Hs.nextId(),X.fk(`.${t}`,`background-image: ${X.wY(e.light||e.dark)}`),X.fk(`.vs-dark .${t}, .hc-black .${t}`,`background-image: ${X.wY(e.dark)}`),Vs[i]=t),t}const Us=X.$;class js{constructor(e,t,i){this.os=t,this.keyElements=new Set,this.options=i||Object.create(null),this.labelBackground=this.options.keybindingLabelBackground,this.labelForeground=this.options.keybindingLabelForeground,this.labelBorder=this.options.keybindingLabelBorder,this.labelBottomBorder=this.options.keybindingLabelBottomBorder,this.labelShadow=this.options.keybindingLabelShadow,this.domNode=X.R3(e,Us(".monaco-keybinding")),this.didEverRender=!1,e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t){this.didEverRender&&this.keybinding===e&&js.areSame(this.matches,t)||(this.keybinding=e,this.matches=t,this.render())}render(){if(this.clear(),this.keybinding){let[e,t]=this.keybinding.getParts();e&&this.renderPart(this.domNode,e,this.matches?this.matches.firstPart:null),t&&(X.R3(this.domNode,Us("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderPart(this.domNode,t,this.matches?this.matches.chordPart:null)),this.domNode.title=this.keybinding.getAriaLabel()||""}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.applyStyles(),this.didEverRender=!0}clear(){X.PO(this.domNode),this.keyElements.clear()}renderPart(e,t,i){const n=gi.xo.modifierLabels[this.os];t.ctrlKey&&this.renderKey(e,n.ctrlKey,Boolean(null==i?void 0:i.ctrlKey),n.separator),t.shiftKey&&this.renderKey(e,n.shiftKey,Boolean(null==i?void 0:i.shiftKey),n.separator),t.altKey&&this.renderKey(e,n.altKey,Boolean(null==i?void 0:i.altKey),n.separator),t.metaKey&&this.renderKey(e,n.metaKey,Boolean(null==i?void 0:i.metaKey),n.separator);const o=t.keyLabel;o&&this.renderKey(e,o,Boolean(null==i?void 0:i.keyCode),"")}renderKey(e,t,i,n){X.R3(e,this.createKeyElement(t,i?".highlight":"")),n&&X.R3(e,Us("span.monaco-keybinding-key-separator",void 0,n))}renderUnbound(e){X.R3(e,this.createKeyElement((0,ri.N)("unbound","Unbound")))}createKeyElement(e,t=""){const i=Us("span.monaco-keybinding-key"+t,void 0,e);return this.keyElements.add(i),i}style(e){this.labelBackground=e.keybindingLabelBackground,this.labelForeground=e.keybindingLabelForeground,this.labelBorder=e.keybindingLabelBorder,this.labelBottomBorder=e.keybindingLabelBottomBorder,this.labelShadow=e.keybindingLabelShadow,this.applyStyles()}applyStyles(){var e;if(this.element){for(const t of this.keyElements)this.labelBackground&&(t.style.backgroundColor=null===(e=this.labelBackground)||void 0===e?void 0:e.toString()),this.labelBorder&&(t.style.borderColor=this.labelBorder.toString()),this.labelBottomBorder&&(t.style.borderBottomColor=this.labelBottomBorder.toString()),this.labelShadow&&(t.style.boxShadow=`inset 0 -1px 0 ${this.labelShadow}`);this.labelForeground&&(this.element.style.color=this.labelForeground.toString())}}static areSame(e,t){return e===t||!e&&!t||!!e&&!!t&&(0,ge.fS)(e.firstPart,t.firstPart)&&(0,ge.fS)(e.chordPart,t.chordPart)}}var qs=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const Ks=X.$;class Gs{constructor(e){this.hidden=!1,this._onChecked=new W.Q5,this.onChecked=this._onChecked.event,Object.assign(this,e)}get checked(){return!!this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire(e))}dispose(){this._onChecked.dispose()}}class Ys{get templateId(){return Ys.ID}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=X.R3(e,Ks(".quick-input-list-entry"));const i=X.R3(t.entry,Ks("label.quick-input-list-label"));t.toDisposeTemplate.push(X.mu(i,X.tw.CLICK,(e=>{t.checkbox.offsetParent||e.preventDefault()}))),t.checkbox=X.R3(i,Ks("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(X.mu(t.checkbox,X.tw.CHANGE,(e=>{t.element.checked=t.checkbox.checked})));const n=X.R3(i,Ks(".quick-input-list-rows")),o=X.R3(n,Ks(".quick-input-list-row")),r=X.R3(n,Ks(".quick-input-list-row"));t.label=new Ps.g(o,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const s=X.R3(o,Ks(".quick-input-list-entry-keybinding"));t.keybinding=new js(s,De.OS);const a=X.R3(r,Ks(".quick-input-list-label-meta"));return t.detail=new Bs.q(a,!0),t.separator=X.R3(t.entry,Ks(".quick-input-list-separator")),t.actionBar=new qi.o(t.entry),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,i){i.toDisposeElement=(0,de.B9)(i.toDisposeElement),i.element=e,i.checkbox.checked=e.checked,i.toDisposeElement.push(e.onChecked((e=>i.checkbox.checked=e)));const{labelHighlights:n,descriptionHighlights:o,detailHighlights:r}=e,s=Object.create(null);s.matches=n||[],s.descriptionTitle=e.saneDescription,s.descriptionMatches=o||[],s.extraClasses=e.item.iconClasses,s.italic=e.item.italic,s.strikethrough=e.item.strikethrough,i.label.setLabel(e.saneLabel,e.saneDescription,s),i.keybinding.set(e.item.keybinding),i.detail.set(e.saneDetail,r),e.separator&&e.separator.label?(i.separator.textContent=e.separator.label,i.separator.style.display=""):i.separator.style.display="none",i.entry.classList.toggle("quick-input-list-separator-border",!!e.separator),i.actionBar.clear();const a=e.item.buttons;a&&a.length?(i.actionBar.push(a.map(((t,i)=>{let n=t.iconClass||(t.iconPath?$s(t.iconPath):void 0);t.alwaysVisible&&(n=n?`${n} always-visible`:"always-visible");const o=new Gi.aU(`id-${i}`,"",n,!0,(()=>{return i=this,n=void 0,r=function*(){e.fireButtonTriggered({button:t,item:e.item})},new((o=void 0)||(o=Promise))((function(e,t){function s(e){try{l(r.next(e))}catch(e){t(e)}}function a(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(s,a)}l((r=r.apply(i,n||[])).next())}));var i,n,o,r}));return o.tooltip=t.tooltip||"",o})),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions")}disposeElement(e,t,i){i.toDisposeElement=(0,de.B9)(i.toDisposeElement)}disposeTemplate(e){e.toDisposeElement=(0,de.B9)(e.toDisposeElement),e.toDisposeTemplate=(0,de.B9)(e.toDisposeTemplate)}}Ys.ID="listelement";class Zs{getHeight(e){return e.saneDetail?44:22}getTemplateId(e){return Ys.ID}}var Xs;!function(e){e[e.First=1]="First",e[e.Second=2]="Second",e[e.Last=3]="Last",e[e.Next=4]="Next",e[e.Previous=5]="Previous",e[e.NextPage=6]="NextPage",e[e.PreviousPage=7]="PreviousPage"}(Xs||(Xs={}));class Qs{constructor(e,t,i){this.parent=e,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnMeta=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new W.Q5,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new W.Q5,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new W.Q5,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new W.Q5,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new W.Q5,this.onButtonTriggered=this._onButtonTriggered.event,this._onKeyDown=new W.Q5,this.onKeyDown=this._onKeyDown.event,this._onLeave=new W.Q5,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=X.R3(this.parent,Ks(".quick-input-list"));const n=new Zs,o=new Js;this.list=i.createList("QuickInput",this.container,n,[new Ys],{identityProvider:{getId:e=>e.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:o}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown((e=>{const t=new Kt.y(e);switch(t.keyCode){case 10:this.toggleCheckbox();break;case 31:(De.dz?e.metaKey:e.ctrlKey)&&this.list.setFocus((0,ct.w6)(this.list.length));break;case 16:const t=this.list.getFocus();1===t.length&&0===t[0]&&this._onLeave.fire();break;case 18:const i=this.list.getFocus();1===i.length&&i[0]===this.list.length-1&&this._onLeave.fire()}this._onKeyDown.fire(t)}))),this.disposables.push(this.list.onMouseDown((e=>{2!==e.browserEvent.button&&e.browserEvent.preventDefault()}))),this.disposables.push(X.nm(this.container,X.tw.CLICK,(e=>{(e.x||e.y)&&this._onLeave.fire()}))),this.disposables.push(this.list.onMouseMiddleClick((e=>{this._onLeave.fire()}))),this.disposables.push(this.list.onContextMenu((e=>{"number"==typeof e.index&&(e.browserEvent.preventDefault(),this.list.setSelection([e.index]))}))),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return W.ju.map(this.list.onDidChangeFocus,(e=>e.elements.map((e=>e.item))))}get onDidChangeSelection(){return W.ju.map(this.list.onDidChangeSelection,(e=>({items:e.elements.map((e=>e.item)),event:e.browserEvent})))}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let i=0,n=e.length;i{t.hidden||(t.checked=e)}))}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=(0,de.B9)(this.elementDisposables);const t=e=>this.fireButtonTriggered(e);this.inputElements=e,this.elements=e.reduce(((i,n,o)=>{var r,s,a;if("separator"!==n.type){const l=o&&e[o-1],c=n.label&&n.label.replace(/\r?\n/g," "),u=n.meta&&n.meta.replace(/\r?\n/g," "),h=n.description&&n.description.replace(/\r?\n/g," "),d=n.detail&&n.detail.replace(/\r?\n/g," "),g=n.ariaLabel||[c,h,d].map((e=>(0,en.JL)(e))).filter((e=>!!e)).join(", ");i.push(new Gs({index:o,item:n,saneLabel:c,saneMeta:u,saneAriaLabel:g,saneDescription:h,saneDetail:d,labelHighlights:null===(r=n.highlights)||void 0===r?void 0:r.label,descriptionHighlights:null===(s=n.highlights)||void 0===s?void 0:s.description,detailHighlights:null===(a=n.highlights)||void 0===a?void 0:a.detail,checked:!1,separator:l&&"separator"===l.type?l:void 0,fireButtonTriggered:t}))}return i}),[]),this.elementDisposables.push(...this.elements),this.elementDisposables.push(...this.elements.map((e=>e.onChecked((()=>this.fireCheckedEvents()))))),this.elementsToIndexes=this.elements.reduce(((e,t,i)=>(e.set(t.item,i),e)),new Map),this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map((e=>e.item))}setFocusedElements(e){if(this.list.setFocus(e.filter((e=>this.elementsToIndexes.has(e))).map((e=>this.elementsToIndexes.get(e)))),e.length>0){const e=this.list.getFocus()[0];"number"==typeof e&&this.list.reveal(e)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter((e=>this.elementsToIndexes.has(e))).map((e=>this.elementsToIndexes.get(e))))}getCheckedElements(){return this.elements.filter((e=>e.checked)).map((e=>e.item))}setCheckedElements(e){try{this._fireCheckedEvents=!1;const t=new Set;for(const i of e)t.add(i);for(const e of this.elements)e.checked=t.has(e.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}focus(e){if(!this.list.length)return;switch(e===Xs.Next&&this.list.getFocus()[0]===this.list.length-1&&(e=Xs.First),e===Xs.Previous&&0===this.list.getFocus()[0]&&(e=Xs.Last),e===Xs.Second&&this.list.length<2&&(e=Xs.First),e){case Xs.First:this.list.focusFirst();break;case Xs.Second:this.list.focusNth(1);break;case Xs.Last:this.list.focusLast();break;case Xs.Next:this.list.focusNext();break;case Xs.Previous:this.list.focusPrevious();break;case Xs.NextPage:this.list.focusNextPage();break;case Xs.PreviousPage:this.list.focusPreviousPage()}const t=this.list.getFocus()[0];"number"==typeof t&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}layout(e){this.list.getHTMLElement().style.maxHeight=e?`calc(${44*Math.floor(e/44)}px)`:"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;if((e=e.trim())&&(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail)){let t;this.elements.forEach((i=>{const n=this.matchOnLabel?(0,Le.f6)((0,Nr.Gt)(e,(0,Nr.Ho)(i.saneLabel))):void 0,o=this.matchOnDescription?(0,Le.f6)((0,Nr.Gt)(e,(0,Nr.Ho)(i.saneDescription||""))):void 0,r=this.matchOnDetail?(0,Le.f6)((0,Nr.Gt)(e,(0,Nr.Ho)(i.saneDetail||""))):void 0,s=this.matchOnMeta?(0,Le.f6)((0,Nr.Gt)(e,(0,Nr.Ho)(i.saneMeta||""))):void 0;if(n||o||r||s?(i.labelHighlights=n,i.descriptionHighlights=o,i.detailHighlights=r,i.hidden=!1):(i.labelHighlights=void 0,i.descriptionHighlights=void 0,i.detailHighlights=void 0,i.hidden=!i.item.alwaysShow),i.separator=void 0,!this.sortByLabel){const e=i.index&&this.inputElements[i.index-1];t=e&&"separator"===e.type?e:t,t&&!i.hidden&&(i.separator=t,t=void 0)}}))}else this.elements.forEach((e=>{e.labelHighlights=void 0,e.descriptionHighlights=void 0,e.detailHighlights=void 0,e.hidden=!1;const t=e.index&&this.inputElements[e.index-1];e.separator=t&&"separator"===t.type?t:void 0}));const t=this.elements.filter((e=>!e.hidden));if(this.sortByLabel&&e){const i=e.toLowerCase();t.sort(((e,t)=>function(e,t,i){const n=e.labelHighlights||[],o=t.labelHighlights||[];return n.length&&!o.length?-1:!n.length&&o.length?1:0===n.length&&0===o.length?0:function(e,t,i){const n=e.toLowerCase(),o=t.toLowerCase(),r=function(e,t,i){const n=e.toLowerCase(),o=t.toLowerCase(),r=n.startsWith(i),s=o.startsWith(i);if(r!==s)return r?-1:1;if(r&&s){if(n.lengtho.length)return 1}return 0}(e,t,i);if(r)return r;const s=n.endsWith(i);if(s!==o.endsWith(i))return s?-1:1;const a=function(e,t,i=!1){const n=e||"",o=t||"",r=Fs.value.collator.compare(n,o);return Fs.value.collatorIsNumeric&&0===r&&n!==o?n(e.set(t.item,i),e)),new Map),this.list.splice(0,this.list.length,t),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(t.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const e=this.list.getFocusedElements(),t=this.allVisibleChecked(e);for(const i of e)i.checked=!t}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(e){this.container.style.display=e?"":"none"}isDisplayed(){return"none"!==this.container.style.display}dispose(){this.elementDisposables=(0,de.B9)(this.elementDisposables),this.disposables=(0,de.B9)(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(e){this._onButtonTriggered.fire(e)}style(e){this.list.style(e)}}qs([zs.H],Qs.prototype,"onDidChangeFocus",null),qs([zs.H],Qs.prototype,"onDidChangeSelection",null);class Js{getWidgetAriaLabel(){return(0,ri.N)("quickInput","Quick Input")}getAriaLabel(e){return e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(){return"option"}}var ea=i(7927);const ta=X.$;class ia extends de.JT{constructor(e){super(),this.parent=e,this.onKeyDown=e=>X.nm(this.inputBox.inputElement,X.tw.KEY_DOWN,(t=>{e(new Kt.y(t))})),this.onMouseDown=e=>X.nm(this.inputBox.inputElement,X.tw.MOUSE_DOWN,(t=>{e(new Lr.n(t))})),this.onDidChange=e=>this.inputBox.onDidChange(e),this.container=X.R3(this.parent,ta(".quick-input-box")),this.inputBox=this._register(new ea.W(this.container,void 0))}get value(){return this.inputBox.value}set value(e){this.inputBox.value=e}select(e=null){this.inputBox.select(e)}isSelectionAtEnd(){return this.inputBox.isSelectionAtEnd()}get placeholder(){return this.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.inputBox.setPlaceHolder(e)}get ariaLabel(){return this.inputBox.getAriaLabel()}set ariaLabel(e){this.inputBox.setAriaLabel(e)}get password(){return"password"===this.inputBox.inputElement.type}set password(e){this.inputBox.inputElement.type=e?"password":"text"}setAttribute(e,t){this.inputBox.inputElement.setAttribute(e,t)}removeAttribute(e){this.inputBox.inputElement.removeAttribute(e)}showDecoration(e){e===Gt.Z.Ignore?this.inputBox.hideMessage():this.inputBox.showMessage({type:e===Gt.Z.Info?1:e===Gt.Z.Warning?2:3,content:""})}stylesForType(e){return this.inputBox.stylesForType(e===Gt.Z.Info?1:e===Gt.Z.Warning?2:3)}setFocus(){this.inputBox.focus()}layout(){this.inputBox.layout()}style(e){this.inputBox.style(e)}}var na=i(7488);const oa="done",ra="active",sa="infinite",aa="discrete",la={progressBarBackground:Bo.Il.fromHex("#0E70C0")};class ca extends de.JT{constructor(e,t){super(),this.options=t||Object.create(null),(0,ge.jB)(this.options,la,!1),this.workedVal=0,this.progressBarBackground=this.options.progressBarBackground,this._register(this.showDelayedScheduler=new xe.pY((()=>(0,X.$Z)(this.element)),0)),this.create(e)}create(e){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.element.appendChild(this.bit),this.applyStyles()}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(ra,sa,aa),this.workedVal=0,this.totalWork=void 0}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(oa),this.element.classList.contains(sa)?(this.bit.style.opacity="0",e?setTimeout((()=>this.off()),200):this.off()):(this.bit.style.width="inherit",e?setTimeout((()=>this.off()),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(aa,oa),this.element.classList.add(ra,sa),this}getContainer(){return this.element}style(e){this.progressBarBackground=e.progressBarBackground,this.applyStyles()}applyStyles(){if(this.bit){const e=this.progressBarBackground?this.progressBarBackground.toString():"";this.bit.style.backgroundColor=e}}}var ua=i(553),ha=i(6811);const da={buttonBackground:Bo.Il.fromHex("#0E639C"),buttonHoverBackground:Bo.Il.fromHex("#006BB3"),buttonForeground:Bo.Il.white};class ga extends de.JT{constructor(e,t){super(),this._onDidClick=this._register(new W.Q5),this.options=t||Object.create(null),(0,ge.jB)(this.options,da,!1),this.buttonForeground=this.options.buttonForeground,this.buttonBackground=this.options.buttonBackground,this.buttonHoverBackground=this.options.buttonHoverBackground,this.buttonSecondaryForeground=this.options.buttonSecondaryForeground,this.buttonSecondaryBackground=this.options.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=this.options.buttonSecondaryHoverBackground,this.buttonBorder=this.options.buttonBorder,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),e.appendChild(this._element),this._register(ua.o.addTarget(this._element)),[X.tw.CLICK,ua.t.Tap].forEach((e=>{this._register((0,X.nm)(this._element,e,(e=>{this.enabled?this._onDidClick.fire(e):X.zB.stop(e)})))})),this._register((0,X.nm)(this._element,X.tw.KEY_DOWN,(e=>{const t=new Kt.y(e);let i=!1;this.enabled&&(t.equals(3)||t.equals(10))?(this._onDidClick.fire(e),i=!0):t.equals(9)&&(this._element.blur(),i=!0),i&&X.zB.stop(t,!0)}))),this._register((0,X.nm)(this._element,X.tw.MOUSE_OVER,(e=>{this._element.classList.contains("disabled")||this.setHoverBackground()}))),this._register((0,X.nm)(this._element,X.tw.MOUSE_OUT,(e=>{this.applyStyles()}))),this.focusTracker=this._register((0,X.go)(this._element)),this._register(this.focusTracker.onDidFocus((()=>this.setHoverBackground()))),this._register(this.focusTracker.onDidBlur((()=>this.applyStyles()))),this.applyStyles()}get onDidClick(){return this._onDidClick.event}setHoverBackground(){let e;e=this.options.secondary?this.buttonSecondaryHoverBackground?this.buttonSecondaryHoverBackground.toString():null:this.buttonHoverBackground?this.buttonHoverBackground.toString():null,e&&(this._element.style.backgroundColor=e)}style(e){this.buttonForeground=e.buttonForeground,this.buttonBackground=e.buttonBackground,this.buttonHoverBackground=e.buttonHoverBackground,this.buttonSecondaryForeground=e.buttonSecondaryForeground,this.buttonSecondaryBackground=e.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=e.buttonSecondaryHoverBackground,this.buttonBorder=e.buttonBorder,this.applyStyles()}applyStyles(){if(this._element){let e,t;this.options.secondary?(t=this.buttonSecondaryForeground?this.buttonSecondaryForeground.toString():"",e=this.buttonSecondaryBackground?this.buttonSecondaryBackground.toString():""):(t=this.buttonForeground?this.buttonForeground.toString():"",e=this.buttonBackground?this.buttonBackground.toString():"");const i=this.buttonBorder?this.buttonBorder.toString():"";this._element.style.color=t,this._element.style.backgroundColor=e,this._element.style.borderWidth=i?"1px":"",this._element.style.borderStyle=i?"solid":"",this._element.style.borderColor=i}}get element(){return this._element}set label(e){this._element.classList.add("monaco-text-button"),this.options.supportIcons?(0,X.mc)(this._element,...(0,ha.T)(e)):this._element.textContent=e,"string"==typeof this.options.title?this._element.title=this.options.title:this.options.title&&(this._element.title=e)}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}}var fa=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const pa=X.$,ma={iconClass:(0,en.CM)("quick-input-back",en.lA.arrowLeft).classNames,tooltip:(0,ri.N)("quickInput.back","Back"),handle:-1};class _a extends de.JT{constructor(e){super(),this.ui=e,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.noValidationMessage=_a.noPromptMessage,this._severity=Gt.Z.Ignore,this.buttonsUpdated=!1,this.onDidTriggerButtonEmitter=this._register(new W.Q5),this.onDidHideEmitter=this._register(new W.Q5),this.onDisposeEmitter=this._register(new W.Q5),this.visibleDisposables=this._register(new de.SL),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){this._ignoreFocusOut=e,this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton((e=>{-1!==this.buttons.indexOf(e)&&this.onDidTriggerButtonEmitter.fire(e)}))),this.ui.show(this),this.visible=!0,this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=Os.Jq.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}update(){if(!this.visible)return;const e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:e||" "===this.ui.title.innerHTML||(this.ui.title.innerText=" ;");const t=this.getDescription();if(this.ui.description1.textContent!==t&&(this.ui.description1.textContent=t),this.ui.description2.textContent!==t&&(this.ui.description2.textContent=t),this.busy&&!this.busyDelay&&(this.busyDelay=new xe._F,this.busyDelay.setIfNotSet((()=>{this.visible&&this.ui.progressBar.infinite()}),800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const e=this.buttons.filter((e=>e===ma));this.ui.leftActionBar.push(e.map(((e,t)=>{const i=new Gi.aU(`id-${t}`,"",e.iconClass||$s(e.iconPath),!0,(()=>fa(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(e)}))));return i.tooltip=e.tooltip||"",i})),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const t=this.buttons.filter((e=>e!==ma));this.ui.rightActionBar.push(t.map(((e,t)=>{const i=new Gi.aU(`id-${t}`,"",e.iconClass||$s(e.iconPath),!0,(()=>fa(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(e)}))));return i.tooltip=e.tooltip||"",i})),{icon:!0,label:!1})}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const i=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==i&&(this._lastValidationMessage=i,X.mc(this.ui.message,...(0,ha.T)(i))),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?(0,ri.N)("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==Gt.Z.Ignore){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.paddingBottom="4px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.paddingBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}_a.noPromptMessage=(0,ri.N)("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");class va extends _a{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new W.Q5),this.onWillAcceptEmitter=this._register(new W.Q5),this.onDidAcceptEmitter=this._register(new W.Q5),this.onDidCustomEmitter=this._register(new W.Q5),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._sortByLabel=!0,this._autoFocusOnList=!0,this._itemActivation=this.ui.isScreenReaderOptimized()?Os.jG.NONE:Os.jG.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new W.Q5),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new W.Q5),this.onDidTriggerItemButtonEmitter=this._register(new W.Q5),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this._value!==e&&(this._value=e||"",this.update(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(e){this._autoFocusOnList=e,this.update()}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?Os.X5:this.ui.keyMods}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(Xs.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange((e=>{e!==this.value&&(this._value=e,this.ui.list.filter(this.filterValue(this.ui.inputBox.value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(e))}))),this.visibleDisposables.add(this.ui.inputBox.onMouseDown((e=>{this.autoFocusOnList||this.ui.list.clearFocus()}))),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown((e=>{switch(e.keyCode){case 18:this.ui.list.focus(Xs.Next),this.canSelectMany&&this.ui.list.domFocus(),X.zB.stop(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(Xs.Previous):this.ui.list.focus(Xs.Last),this.canSelectMany&&this.ui.list.domFocus(),X.zB.stop(e,!0);break;case 12:this.ui.list.focus(Xs.NextPage),this.canSelectMany&&this.ui.list.domFocus(),X.zB.stop(e,!0);break;case 11:this.ui.list.focus(Xs.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),X.zB.stop(e,!0);break;case 17:if(!this._canAcceptInBackground)return;if(!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(Xs.First),X.zB.stop(e,!0));break;case 13:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(Xs.Last),X.zB.stop(e,!0))}}))),this.visibleDisposables.add(this.ui.onDidAccept((()=>{!this.canSelectMany&&this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)}))),this.visibleDisposables.add(this.ui.onDidCustom((()=>{this.onDidCustomEmitter.fire()}))),this.visibleDisposables.add(this.ui.list.onDidChangeFocus((e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&(0,ct.fS)(e,this._activeItems,((e,t)=>e===t))||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))}))),this.visibleDisposables.add(this.ui.list.onDidChangeSelection((({items:e,event:t})=>{this.canSelectMany?e.length&&this.ui.list.setSelectedElements([]):this.selectedItemsToConfirm!==this._selectedItems&&(0,ct.fS)(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(t instanceof MouseEvent&&1===t.button))}))),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements((e=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&(0,ct.fS)(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)))}))),this.visibleDisposables.add(this.ui.list.onButtonTriggered((e=>this.onDidTriggerItemButtonEmitter.fire(e)))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return X.nm(this.ui.container,X.tw.KEY_UP,(e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new Kt.y(e),i=t.keyCode;this._quickNavigate.keybindings.some((e=>{const[n,o]=e.getParts();return!(o||(n.shiftKey&&4===i?t.ctrlKey||t.altKey||t.metaKey:!(n.altKey&&6===i||n.ctrlKey&&5===i||n.metaKey&&57===i)))}))&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)}))}update(){if(!this.visible)return;const e=!!this._hideInput&&this._items.length>0;this.ui.container.classList.toggle("hidden-input",e&&!this.description);const t={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!e,progressBar:!e,visibleCount:!0,count:this.canSelectMany,ok:"default"===this.ok?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(t),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");const i=this.ariaLabel||this.placeholder||va.DEFAULT_ARIA_LABEL;if(this.ui.inputBox.ariaLabel!==i&&(this.ui.inputBox.ariaLabel=i),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case Os.jG.NONE:this._itemActivation=Os.jG.FIRST;break;case Os.jG.SECOND:this.ui.list.focus(Xs.Second),this._itemActivation=Os.jG.FIRST;break;case Os.jG.LAST:this.ui.list.focus(Xs.Last),this._itemActivation=Os.jG.FIRST;break;default:this.trySelectFirst()}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",this.ui.setComboboxAccessibility(!0),t.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(Xs.First))}}va.DEFAULT_ARIA_LABEL=(0,ri.N)("quickInputBox.ariaLabel","Type to narrow down results.");class ba extends de.JT{constructor(e){super(),this.options=e,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new W.Q5),this.onDidCustomEmitter=this._register(new W.Q5),this.onDidTriggerButtonEmitter=this._register(new W.Q5),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new W.Q5),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new W.Q5),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const e=e=>{this.keyMods.ctrlCmd=e.ctrlKey||e.metaKey,this.keyMods.alt=e.altKey};this._register(X.nm(window,X.tw.KEY_DOWN,e,!0)),this._register(X.nm(window,X.tw.KEY_UP,e,!0)),this._register(X.nm(window,X.tw.MOUSE_DOWN,e,!0))}getUI(){if(this.ui)return this.ui;const e=X.R3(this.parentElement,pa(".quick-input-widget.show-file-icons"));e.tabIndex=-1,e.style.display="none";const t=X.dS(e),i=X.R3(e,pa(".quick-input-titlebar")),n=this._register(new qi.o(i));n.domNode.classList.add("quick-input-left-action-bar");const o=X.R3(i,pa(".quick-input-title")),r=this._register(new qi.o(i));r.domNode.classList.add("quick-input-right-action-bar");const s=X.R3(e,pa(".quick-input-description")),a=X.R3(e,pa(".quick-input-header")),l=X.R3(a,pa("input.quick-input-check-all"));l.type="checkbox",this._register(X.mu(l,X.tw.CHANGE,(e=>{const t=l.checked;C.setAllVisibleChecked(t)}))),this._register(X.nm(l,X.tw.CLICK,(e=>{(e.x||e.y)&&d.setFocus()})));const c=X.R3(a,pa(".quick-input-description")),u=X.R3(a,pa(".quick-input-and-message")),h=X.R3(u,pa(".quick-input-filter")),d=this._register(new ia(h));d.setAttribute("aria-describedby",`${this.idPrefix}message`);const g=X.R3(h,pa(".quick-input-visible-count"));g.setAttribute("aria-live","polite"),g.setAttribute("aria-atomic","true");const f=new na.Z(g,{countFormat:(0,ri.N)({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")}),p=X.R3(h,pa(".quick-input-count"));p.setAttribute("aria-live","polite");const m=new na.Z(p,{countFormat:(0,ri.N)({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")}),_=X.R3(a,pa(".quick-input-action")),v=new ga(_);v.label=(0,ri.N)("ok","OK"),this._register(v.onDidClick((e=>{this.onDidAcceptEmitter.fire()})));const b=X.R3(a,pa(".quick-input-action")),y=new ga(b);y.label=(0,ri.N)("custom","Custom"),this._register(y.onDidClick((e=>{this.onDidCustomEmitter.fire()})));const w=X.R3(u,pa(`#${this.idPrefix}message.quick-input-message`)),C=this._register(new Qs(e,this.idPrefix+"list",this.options));this._register(C.onChangedAllVisibleChecked((e=>{l.checked=e}))),this._register(C.onChangedVisibleCount((e=>{f.setCount(e)}))),this._register(C.onChangedCheckedCount((e=>{m.setCount(e)}))),this._register(C.onLeave((()=>{setTimeout((()=>{d.setFocus(),this.controller instanceof va&&this.controller.canSelectMany&&C.clearFocus()}),0)}))),this._register(C.onDidChangeFocus((()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")})));const S=new ca(e);S.getContainer().classList.add("quick-input-progress");const x=X.go(e);return this._register(x),this._register(X.nm(e,X.tw.FOCUS,(e=>{this.previousFocusElement=e.relatedTarget instanceof HTMLElement?e.relatedTarget:void 0}),!0)),this._register(x.onDidBlur((()=>{this.getUI().ignoreFocusOut||this.options.ignoreFocusOut()||this.hide(Os.Jq.Blur),this.previousFocusElement=void 0}))),this._register(X.nm(e,X.tw.FOCUS,(e=>{d.setFocus()}))),this._register(X.nm(e,X.tw.KEY_DOWN,(t=>{const i=new Kt.y(t);switch(i.keyCode){case 3:X.zB.stop(t,!0),this.onDidAcceptEmitter.fire();break;case 9:X.zB.stop(t,!0),this.hide(Os.Jq.Gesture);break;case 2:if(!i.altKey&&!i.ctrlKey&&!i.metaKey){const n=[".action-label.codicon"];e.classList.contains("show-checkboxes")?n.push("input"):n.push("input[type=text]"),this.getUI().list.isDisplayed()&&n.push(".monaco-list");const o=e.querySelectorAll(n.join(", "));i.shiftKey&&i.target===o[0]?(X.zB.stop(t,!0),o[o.length-1].focus()):i.shiftKey||i.target!==o[o.length-1]||(X.zB.stop(t,!0),o[0].focus())}}}))),this.ui={container:e,styleSheet:t,leftActionBar:n,titleBar:i,title:o,description1:s,description2:c,rightActionBar:r,checkAll:l,filterContainer:h,inputBox:d,visibleCountContainer:g,visibleCount:f,countContainer:p,count:m,okContainer:_,ok:v,message:w,customButtonContainer:b,customButton:y,list:C,progressBar:S,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:()=>this.options.isScreenReaderOptimized(),show:e=>this.show(e),hide:()=>this.hide(),setVisibilities:e=>this.setVisibilities(e),setComboboxAccessibility:e=>this.setComboboxAccessibility(e),setEnabled:e=>this.setEnabled(e),setContextKey:e=>this.options.setContextKey(e)},this.updateStyles(),this.ui}pick(e,t={},i=z.T.None){return new Promise(((n,o)=>{let r=e=>{r=n,t.onKeyMods&&t.onKeyMods(s.keyMods),n(e)};if(i.isCancellationRequested)return void r(void 0);const s=this.createQuickPick();let a;const l=[s,s.onDidAccept((()=>{if(s.canSelectMany)r(s.selectedItems.slice()),s.hide();else{const e=s.activeItems[0];e&&(r(e),s.hide())}})),s.onDidChangeActive((e=>{const i=e[0];i&&t.onDidFocus&&t.onDidFocus(i)})),s.onDidChangeSelection((e=>{if(!s.canSelectMany){const t=e[0];t&&(r(t),s.hide())}})),s.onDidTriggerItemButton((e=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton(Object.assign(Object.assign({},e),{removeItem:()=>{const t=s.items.indexOf(e.item);if(-1!==t){const e=s.items.slice(),i=e.splice(t,1),n=s.activeItems.filter((e=>e!==i[0]));s.items=e,n&&(s.activeItems=n)}}})))),s.onDidChangeValue((e=>{!a||e||1===s.activeItems.length&&s.activeItems[0]===a||(s.activeItems=[a])})),i.onCancellationRequested((()=>{s.hide()})),s.onDidHide((()=>{(0,de.B9)(l),r(void 0)}))];s.title=t.title,s.canSelectMany=!!t.canPickMany,s.placeholder=t.placeHolder,s.ignoreFocusOut=!!t.ignoreFocusLost,s.matchOnDescription=!!t.matchOnDescription,s.matchOnDetail=!!t.matchOnDetail,s.matchOnLabel=void 0===t.matchOnLabel||t.matchOnLabel,s.autoFocusOnList=void 0===t.autoFocusOnList||t.autoFocusOnList,s.quickNavigate=t.quickNavigate,s.contextKey=t.contextKey,s.busy=!0,Promise.all([e,t.activeItem]).then((([e,t])=>{a=t,s.busy=!1,s.items=e,s.canSelectMany&&(s.selectedItems=e.filter((e=>"separator"!==e.type&&e.picked))),a&&(s.activeItems=[a])})),s.show(),Promise.resolve(e).then(void 0,(e=>{o(e),s.hide()}))}))}createQuickPick(){const e=this.getUI();return new va(e)}show(e){const t=this.getUI();this.onShowEmitter.fire();const i=this.controller;this.controller=e,i&&i.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(Gt.Z.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),X.mc(t.message),t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,this.setComboboxAccessibility(!1),t.inputBox.ariaLabel="";const n=this.options.backKeybindingLabel();ma.tooltip=n?(0,ri.N)("quickInput.backWithKeybinding","Back ({0})",n):(0,ri.N)("quickInput.back","Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus()}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=!e.description||e.inputBox||e.checkAll?"none":"",t.checkAll.style.display=e.checkAll?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.display(!!e.list),t.container.classList[e.checkBox?"add":"remove"]("show-checkboxes"),this.updateLayout()}setComboboxAccessibility(e){if(e!==this.comboboxAccessibility){const t=this.getUI();this.comboboxAccessibility=e,this.comboboxAccessibility?(t.inputBox.setAttribute("role","combobox"),t.inputBox.setAttribute("aria-haspopup","true"),t.inputBox.setAttribute("aria-autocomplete","list"),t.inputBox.setAttribute("aria-activedescendant",t.list.getActiveDescendant()||"")):(t.inputBox.removeAttribute("role"),t.inputBox.removeAttribute("aria-haspopup"),t.inputBox.removeAttribute("aria-autocomplete"),t.inputBox.removeAttribute("aria-activedescendant"))}}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.getAction().enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.getAction().enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var t;const i=this.controller;if(i){const n=!(null===(t=this.ui)||void 0===t?void 0:t.container.contains(document.activeElement));this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",n||(this.previousFocusElement&&this.previousFocusElement.offsetParent?(this.previousFocusElement.focus(),this.previousFocusElement=void 0):this.options.returnFocus()),i.didHide(e)}}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(.62*this.dimension.width,ba.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&.4*this.dimension.height)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:i,contrastBorder:n,widgetShadow:o}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e?e.toString():"",this.ui.container.style.backgroundColor=t?t.toString():"",this.ui.container.style.color=i?i.toString():"",this.ui.container.style.border=n?`1px solid ${n}`:"",this.ui.container.style.boxShadow=o?`0 0 8px 2px ${o}`:"",this.ui.inputBox.style(this.styles.inputBox),this.ui.count.style(this.styles.countBadge),this.ui.ok.style(this.styles.button),this.ui.customButton.style(this.styles.button),this.ui.progressBar.style(this.styles.progressBar),this.ui.list.style(this.styles.list);const r=[];this.styles.list.pickerGroupBorder&&r.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.list.pickerGroupBorder}; }`),this.styles.list.pickerGroupForeground&&r.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.list.pickerGroupForeground}; }`),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(r.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&r.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&r.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&r.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&r.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&r.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),r.push("}"));const s=r.join("\n");s!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=s)}}}ba.MAX_WIDTH=600;var ya=i(1157),wa=i(725),Ca=i(8289),Sa=function(e,t){return function(i,n){t(i,n,e)}};let xa=class extends de.JT{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=Io.B.as(wa.IP.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,i){var n;const[o,r]=this.getOrInstantiateProvider(e),s=this.visibleQuickAccess,a=null==s?void 0:s.descriptor;if(s&&r&&a===r)return e===r.prefix||(null==i?void 0:i.preserveValue)||(s.picker.value=e),void this.adjustValueSelection(s.picker,r,i);if(r&&!(null==i?void 0:i.preserveValue)){let t;if(s&&a&&a!==r){const e=s.value.substr(a.prefix.length);e&&(t=`${r.prefix}${e}`)}if(!t){const e=null==o?void 0:o.defaultFilterValue;e===wa.Ry.LAST?t=this.lastAcceptedPickerValues.get(r):"string"==typeof e&&(t=`${r.prefix}${e}`)}"string"==typeof t&&(e=t)}const l=new de.SL,c=l.add(this.quickInputService.createQuickPick());let u,h;c.value=e,this.adjustValueSelection(c,r,i),c.placeholder=null==r?void 0:r.placeholder,c.quickNavigate=null==i?void 0:i.quickNavigateConfiguration,c.hideInput=!!c.quickNavigate&&!s,("number"==typeof(null==i?void 0:i.itemActivation)||(null==i?void 0:i.quickNavigateConfiguration))&&(c.itemActivation=null!==(n=null==i?void 0:i.itemActivation)&&void 0!==n?n:ya.jG.SECOND),c.contextKey=null==r?void 0:r.contextKey,c.filterValue=e=>e.substring(r?r.prefix.length:0),(null==r?void 0:r.placeholder)&&(c.ariaLabel=null==r?void 0:r.placeholder),t&&(u=new Promise((e=>h=e)),l.add((0,Ca.I)(c.onWillAccept)((e=>{e.veto(),c.hide()})))),l.add(this.registerPickerListeners(c,o,r,e));const d=l.add(new z.A);return o&&l.add(o.provide(c,d.token)),(0,Ca.I)(c.onDidHide)((()=>{0===c.selectedItems.length&&d.cancel(),l.dispose(),null==h||h(c.selectedItems)})),c.show(),t?u:void 0}adjustValueSelection(e,t,i){var n;let o;o=(null==i?void 0:i.preserveValue)?[e.value.length,e.value.length]:[null!==(n=null==t?void 0:t.prefix.length)&&void 0!==n?n:0,e.value.length],e.valueSelection=o}registerPickerListeners(e,t,i,n){const o=new de.SL,r=this.visibleQuickAccess={picker:e,descriptor:i,value:n};return o.add((0,de.OF)((()=>{r===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)}))),o.add(e.onDidChangeValue((e=>{const[i]=this.getOrInstantiateProvider(e);i!==t?this.show(e,{preserveValue:!0}):r.value=e}))),i&&o.add(e.onDidAccept((()=>{this.lastAcceptedPickerValues.set(i,e.value)}))),o}getOrInstantiateProvider(e){const t=this.registry.getQuickAccessProvider(e);if(!t)return[void 0,void 0];let i=this.mapProviderToDescriptor.get(t);return i||(i=this.instantiationService.createInstance(t.ctor),this.mapProviderToDescriptor.set(t,i)),[i,t]}};xa=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([Sa(0,ya.eJ),Sa(1,mn.TG)],xa);var ka=function(e,t){return function(i,n){t(i,n,e)}};let Da=class extends Ji.bB{constructor(e,t,i,n,o){super(i),this.instantiationService=e,this.contextKeyService=t,this.accessibilityService=n,this.layoutService=o,this.contexts=new Map}get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(xa))),this._quickAccess}createController(e=this.layoutService,t){var i,n;const o={idPrefix:"quickInput_",container:e.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>{},setContextKey:e=>this.setContextKey(e),returnFocus:()=>e.focus(),createList:(e,t,i,n,o)=>this.instantiationService.createInstance(ts.ev,e,t,i,n,o),styles:this.computeStyles()},r=this._register(new ba(Object.assign(Object.assign({},o),t)));return r.layout(e.dimension,null!==(n=null===(i=e.offset)||void 0===i?void 0:i.top)&&void 0!==n?n:0),this._register(e.onDidLayout((t=>{var i,n;return r.layout(t,null!==(n=null===(i=e.offset)||void 0===i?void 0:i.top)&&void 0!==n?n:0)}))),this._register(r.onShow((()=>this.resetContextKeys()))),this._register(r.onHide((()=>this.resetContextKeys()))),r}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new Xi.uy(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),t&&t.get()||(this.resetContextKeys(),t&&t.set(!0))}resetContextKeys(){this.contexts.forEach((e=>{e.get()&&e.reset()}))}pick(e,t={},i=z.T.None){return this.controller.pick(e,t,i)}createQuickPick(){return this.controller.createQuickPick()}updateStyles(){this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:Object.assign({},(0,zr.o)(this.theme,{quickInputBackground:Qi.zK,quickInputForeground:Qi.tZ,quickInputTitleBackground:Qi.lo,contrastBorder:Qi.lR,widgetShadow:Qi.rh})),inputBox:(0,zr.o)(this.theme,{inputForeground:Qi.zJ,inputBackground:Qi.sE,inputBorder:Qi.dt,inputValidationInfoBackground:Qi._l,inputValidationInfoForeground:Qi.YI,inputValidationInfoBorder:Qi.EP,inputValidationWarningBackground:Qi.RV,inputValidationWarningForeground:Qi.SU,inputValidationWarningBorder:Qi.C3,inputValidationErrorBackground:Qi.p,inputValidationErrorForeground:Qi._t,inputValidationErrorBorder:Qi.OZ}),countBadge:(0,zr.o)(this.theme,{badgeBackground:Qi.g8,badgeForeground:Qi.qe,badgeBorder:Qi.lR}),button:(0,zr.o)(this.theme,{buttonForeground:Qi.j5,buttonBackground:Qi.b7,buttonHoverBackground:Qi.GO,buttonBorder:Qi.lR}),progressBar:(0,zr.o)(this.theme,{progressBarBackground:Qi.zR}),keybindingLabel:(0,zr.o)(this.theme,{keybindingLabelBackground:Qi.oQ,keybindingLabelForeground:Qi.lW,keybindingLabelBorder:Qi.AW,keybindingLabelBottomBorder:Qi.K1,keybindingLabelShadow:Qi.rh}),list:(0,zr.o)(this.theme,{listBackground:Qi.zK,listInactiveFocusForeground:Qi.NP,listInactiveFocusBackground:Qi.Vq,listFocusOutline:Qi.xL,listInactiveFocusOutline:Qi.xL,pickerGroupBorder:Qi.op,pickerGroupForeground:Qi.kJ})}}};Da=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([ka(0,mn.TG),ka(1,Xi.i6),ka(2,Ji.XE),ka(3,Xn.F),ka(4,jr)],Da);var La=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Na=function(e,t){return function(i,n){t(i,n,e)}};let Ea=class extends Da{constructor(e,t,i,n,o,r){super(t,i,n,o,r),this.host=void 0;const s=Ma.get(e);this.host={_serviceBrand:void 0,get container(){return s.widget.getDomNode()},get dimension(){return e.getLayoutInfo()},get onDidLayout(){return e.onDidLayoutChange},focus:()=>e.focus()}}createController(){return super.createController(this.host)}};Ea=La([Na(1,mn.TG),Na(2,Xi.i6),Na(3,Ji.XE),Na(4,Xn.F),Na(5,jr)],Ea);let Aa=class{constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){const i=t=this.instantiationService.createInstance(Ea,e);this.mapEditorToService.set(e,t),(0,Ca.I)(e.onDidDispose)((()=>{i.dispose(),this.mapEditorToService.delete(e)}))}return t}get quickAccess(){return this.activeService.quickAccess}pick(e,t={},i=z.T.None){return this.activeService.pick(e,t,i)}createQuickPick(){return this.activeService.createQuickPick()}};Aa=La([Na(0,mn.TG),Na(1,Z.$)],Aa);class Ma{constructor(e){this.editor=e,this.widget=new Ia(this.editor)}static get(e){return e.getContribution(Ma.ID)}dispose(){this.widget.dispose()}}Ma.ID="editor.controller.quickInput";class Ia{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return Ia.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}var Ta;Ia.ID="editor.contrib.quickInputWidget",(0,Yi._K)(Ma.ID,Ma),function(e){const t=new _n.y;class i{constructor(e,t){this._serviceId=e,this._factory=t,this._value=null}get id(){return this._serviceId}get(e){if(!this._value){if(e&&(this._value=e[this._serviceId.toString()]),this._value||(this._value=this._factory(e)),!this._value)throw new Error("Service "+this._serviceId+" is missing!");t.set(this._serviceId,this._value)}return this._value}}e.LazyStaticService=i;let n=[];function o(e,t){let o=new i(e,t);return n.push(o),o}e.init=function(e){let t=new _n.y;for(const[e,i]of(0,ms.d)())t.set(e,i);for(let i in e)e.hasOwnProperty(i)&&t.set((0,mn.yh)(i),e[i]);n.forEach((i=>t.set(i.id,i.get(e))));let i=new Qr(t,!0);return t.set(mn.TG,i),[t,i]},e.instantiationService=o(mn.TG,(()=>new Qr(t,!0)));const r=new Ai;e.configurationService=o(Jt.Ui,(()=>r)),e.resourceConfigurationService=o(lt.V,(()=>new Mi(r))),e.resourcePropertiesService=o(lt.y,(()=>new Ii(r))),e.contextService=o(_i.ec,(()=>new Ri)),e.labelService=o(es.e,(()=>new Pi)),e.telemetryService=o(Hr.b,(()=>new Ti)),e.dialogService=o(Kr.S,(()=>new ki)),e.notificationService=o(mi.lT,(()=>new Di)),e.markerService=o(is.lT,(()=>new rs)),e.modeService=o(Ce.h,(e=>new Fo)),e.standaloneThemeService=o(Gn.Z,(()=>new rr)),e.logService=o(ut.VZ,(()=>new ut.$V(new ut.kw))),e.undoRedoService=o(ws.tJ,(t=>new Ts(e.dialogService.get(t),e.notificationService.get(t)))),e.modelService=o(at.q,(t=>new Po.BR(e.configurationService.get(t),e.resourcePropertiesService.get(t),e.standaloneThemeService.get(t),e.logService.get(t),e.undoRedoService.get(t)))),e.markerDecorationsService=o(hs.i,(t=>new ps(e.modelService.get(t),e.markerService.get(t)))),e.contextKeyService=o(Xi.i6,(t=>new mr(e.configurationService.get(t)))),e.codeEditorService=o(Z.$,(t=>new uo(null,e.contextKeyService.get(t),e.standaloneThemeService.get(t)))),e.editorProgressService=o(Sn.e,(()=>new xi)),e.storageService=o(ss.Uy,(()=>new ss.vm)),e.editorWorkerService=o(we.p,(t=>new ft(e.modelService.get(t),e.resourceConfigurationService.get(t),e.logService.get(t))))}(Ta||(Ta={}));class Ra extends de.JT{constructor(e,t){super();const[i,n]=Ta.init(t);this._serviceCollection=i,this._instantiationService=n;const o=this.get(Jt.Ui),r=this.get(mi.lT),s=this.get(Hr.b),a=this.get(Ji.XE),l=this.get(ut.VZ),c=this.get(Xi.i6);let u=(e,i)=>{let n=null;return t&&(n=t[e.toString()]),n||(n=i()),this._serviceCollection.set(e,n),n};u(Xn.F,(()=>new vs(c,o))),u(ts.Lw,(()=>new ts.XN(a)));let h=u(ne.H,(()=>new Li(this._instantiationService))),d=u(Zn.d,(()=>this._register(new Ni(c,h,s,r,l,e)))),g=u(jr,(()=>new Bi(Ta.codeEditorService.get(Z.$),e)));u(ya.eJ,(()=>new Aa(n,Ta.codeEditorService.get(Z.$))));let f=u(vn.u,(()=>this._register(new qr(g))));u(Cn.p,(()=>new ys)),u(vn.i,(()=>{const e=new Ur(s,r,f,d,a);return e.configure({blockMouse:!1}),this._register(e)})),u(Yn.co,(()=>new cs(h))),u(Zt.vu,(()=>new Fi(Ta.modelService.get(at.q))))}get(e){let t=this._serviceCollection.get(e);if(!t)throw new Error("Missing service "+e);return t}set(e,t){this._serviceCollection.set(e,t)}has(e){return this._serviceCollection.has(e)}}function Oa(e,t,i){let n=new Ra(e,t),o=null;n.has(Se.S)||(o=new Si(Ta.modelService.get()),n.set(Se.S,o)),n.has(oe.v4)||n.set(oe.v4,new ue(n.get(Z.$),n.get(ne.H)));let r=i(n);return o&&o.setEditor(r),r}function Fa(e,t){return"boolean"==typeof e?e:t}function Pa(e,t){return"string"==typeof e?e:t}function Ba(e,t=!1){t&&(e=e.map((function(e){return e.toLowerCase()})));const i=function(e){const t={};for(const i of e)t[i]=!0;return t}(e);return t?function(e){return void 0!==i[e.toLowerCase()]&&i.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==i[e]&&i.hasOwnProperty(e)}}function za(e,t){t=t.replace(/@@/g,"");let i,n=0;do{i=!1,t=t.replace(/@(\w+)/g,(function(n,o){i=!0;let r="";if("string"==typeof e[o])r=e[o];else{if(!(e[o]&&e[o]instanceof RegExp))throw void 0===e[o]?Mt(e,"language definition does not contain attribute '"+o+"', used at: "+t):Mt(e,"attribute reference '"+o+"' must be a string, used at: "+t);r=e[o].source}return Nt(r)?"":"(?:"+r+")"})),n++}while(i&&n<5);t=t.replace(/\x01/g,"@");let o=(e.ignoreCase?"i":"")+(e.unicode?"u":"");return new RegExp(t,o)}function Wa(e,t,i,n){let o=-1,r=i,s=i.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);s&&(s[3]&&(o=parseInt(s[3]),s[2]&&(o+=100)),r=s[4]);let a,l="~",c=r;if(r&&0!==r.length?/^\w*$/.test(c)?l="==":(s=r.match(/^(@|!@|~|!~|==|!=)(.*)$/),s&&(l=s[1],c=s[2])):(l="!=",c=""),"~"!==l&&"!~"!==l||!/^(\w|\|)*$/.test(c))if("@"===l||"!@"===l){let i=e[c];if(!i)throw Mt(e,"the @ match target '"+c+"' is not defined, in rule: "+t);if(!function(e,t){if(!t)return!1;if(!Array.isArray(t))return!1;for(const e of t)if("string"!=typeof e)return!1;return!0}(0,i))throw Mt(e,"the @ match target '"+c+"' must be an array of strings, in rule: "+t);let n=Ba(i,e.ignoreCase);a=function(e){return"@"===l?n(e):!n(e)}}else if("~"===l||"!~"===l)if(c.indexOf("$")<0){let t=za(e,"^"+c+"$");a=function(e){return"~"===l?t.test(e):!t.test(e)}}else a=function(t,i,n,o){return za(e,"^"+It(e,c,i,n,o)+"$").test(t)};else if(c.indexOf("$")<0){let t=Et(e,c);a=function(e){return"=="===l?e===t:e!==t}}else{let t=Et(e,c);a=function(i,n,o,r,s){let a=It(e,t,n,o,r);return"=="===l?i===a:i!==a}}else{let t=Ba(c.split("|"),e.ignoreCase);a=function(e){return"~"===l?t(e):!t(e)}}return-1===o?{name:i,value:n,test:function(e,t,i,n){return a(e,e,t,i,n)}}:{name:i,value:n,test:function(e,t,i,n){let r=function(e,t,i,n){if(n<0)return e;if(n=100){n-=100;let e=i.split(".");if(e.unshift(i),n=0&&(n.tokenSubst=!0),"string"==typeof i.bracket)if("@open"===i.bracket)n.bracket=1;else{if("@close"!==i.bracket)throw Mt(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+t);n.bracket=-1}if(i.next){if("string"!=typeof i.next)throw Mt(e,"the next state must be a string value in rule: "+t);{let o=i.next;if(!/^(@pop|@push|@popall)$/.test(o)&&("@"===o[0]&&(o=o.substr(1)),o.indexOf("$")<0&&!function(e,t){let i=t;for(;i&&i.length>0;){if(e.stateNames[i])return!0;const t=i.lastIndexOf(".");i=t<0?null:i.substr(0,t)}return!1}(e,It(e,o,"",[],""))))throw Mt(e,"the next state '"+i.next+"' is not defined in rule: "+t);n.next=o}}return"number"==typeof i.goBack&&(n.goBack=i.goBack),"string"==typeof i.switchTo&&(n.switchTo=i.switchTo),"string"==typeof i.log&&(n.log=i.log),"string"==typeof i.nextEmbedded&&(n.nextEmbedded=i.nextEmbedded,e.usesEmbedded=!0),n}}if(Array.isArray(i)){let n=[];for(let o=0,r=i.length;o0&&"^"===i[0],this.name=this.name+": "+i,this.regex=za(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")")}setAction(e,t){this.action=Va(e,this.name,t)}}class $a{constructor(e,t){this._languageIdentifier=e,this._actual=t}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i,n){if("function"==typeof this._actual.tokenize)return Ua.adaptTokenize(this._languageIdentifier.language,this._actual,e,i,n);throw new Error("Not supported!")}tokenize2(e,t,i){let n=this._actual.tokenizeEncoded(e,i);return new q.Hi(n.tokens,n.endState)}}class Ua{constructor(e,t,i){this._standaloneThemeService=e,this._languageIdentifier=t,this._actual=i}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t,i){let n=[],o=0;for(let r=0,s=e.length;r0&&o[r-1]===c)continue;let u=l.startIndex;0===a?u=0:uPromise.resolve(e[0])));const Ga=G();Ga.editor={create:function(e,t,i){return Oa(e,i||{},(i=>new _o(e,t,i,i.get(mn.TG),i.get(Z.$),i.get(ne.H),i.get(Xi.i6),i.get(Zn.d),i.get(vn.u),i.get(Gn.Z),i.get(mi.lT),i.get(Jt.Ui),i.get(Xn.F),i.get(at.q),i.get(Ce.h))))},onDidCreateEditor:function(e){return Ta.codeEditorService.get().onCodeEditorAdd((t=>{e(t)}))},createDiffEditor:function(e,t,i){return Oa(e,i||{},(i=>new vo(e,t,i,i.get(mn.TG),i.get(Xi.i6),i.get(Zn.d),i.get(vn.u),i.get(we.p),i.get(Z.$),i.get(Gn.Z),i.get(mi.lT),i.get(Jt.Ui),i.get(vn.i),i.get(Sn.e),i.get(Cn.p))))},createDiffNavigator:function(e,t){return new pe(e,t)},createModel:function(e,t,i){return bo(Ta.modelService.get(),Ta.modeService.get(),e,t,i)},setModelLanguage:function(e,t){Ta.modelService.get().setMode(e,Ta.modeService.get().create(t))},setModelMarkers:function(e,t,i){e&&Ta.markerService.get().changeOne(t,e.uri,i)},getModelMarkers:function(e){return Ta.markerService.get().read(e)},onDidChangeMarkers:function(e){return Ta.markerService.get().onMarkerChanged(e)},getModels:function(){return Ta.modelService.get().getModels()},getModel:function(e){return Ta.modelService.get().getModel(e)},onDidCreateModel:function(e){return Ta.modelService.get().onModelAdded(e)},onWillDisposeModel:function(e){return Ta.modelService.get().onModelRemoved(e)},onDidChangeModelLanguage:function(e){return Ta.modelService.get().onModelModeChanged((t=>{e({model:t.model,oldLanguage:t.oldModeId})}))},createWebWorker:function(e){return function(e,t){return new wt(e,t)}(Ta.modelService.get(),e)},colorizeElement:function(e,t){const i=Ta.standaloneThemeService.get();return i.registerEditorContainer(e),Ut.colorizeElement(i,Ta.modeService.get(),e,t)},colorize:function(e,t,i){return Ta.standaloneThemeService.get().registerEditorContainer(document.body),Ut.colorize(Ta.modeService.get(),e,t,i)},colorizeModelLine:function(e,t,i=4){return Ta.standaloneThemeService.get().registerEditorContainer(document.body),Ut.colorizeModelLine(e,t,i)},tokenize:function(e,t){Ta.modeService.get().triggerMode(t);let i=(n=t,be.RW.get(n)||{getInitialState:()=>ye.nO,tokenize:(e,t,i,o)=>(0,ye.Ri)(n,e,i,o)});var n;let o=(0,Be.uq)(e),r=[],s=i.getInitialState();for(let e=0,t=o.length;e{n.getId()===e&&(i.dispose(),t())}));return i},getEncodedLanguageId:function(e){let t=Ta.modeService.get().getLanguageIdentifier(e);return t?t.id:0},setLanguageConfiguration:function(e,t){let i=Ta.modeService.get().getLanguageIdentifier(e);if(!i)throw new Error(`Cannot set configuration for unknown language ${e}`);return Fe.zu.register(i,t,100)},setColorMap:function(e){if(e){const t=[null];for(let i=1,n=e.length;ifunction(e){return"tokenizeEncoded"in e}(e)?new $a(i,e):new Ua(Ta.standaloneThemeService.get(),i,e);return ja(t)?be.RW.registerPromise(e,t.then((e=>n(e)))):be.RW.register(e,n(t))},setMonarchTokensProvider:function(e,t){const i=t=>function(e,t,i,n){return new Vt(e,t,i,n)}(Ta.modeService.get(),Ta.standaloneThemeService.get(),e,function(e,t){if(!t||"object"!=typeof t)throw new Error("Monarch: expecting a language definition object");let i={};i.languageId=e,i.includeLF=Fa(t.includeLF,!1),i.noThrow=!1,i.maxStack=100,i.start="string"==typeof t.start?t.start:null,i.ignoreCase=Fa(t.ignoreCase,!1),i.unicode=Fa(t.unicode,!1),i.tokenPostfix=Pa(t.tokenPostfix,"."+i.languageId),i.defaultToken=Pa(t.defaultToken,"source"),i.usesEmbedded=!1;let n=t;function o(e,r,s){for(const a of s){let s=a.include;if(s){if("string"!=typeof s)throw Mt(i,"an 'include' attribute must be a string at: "+e);if("@"===s[0]&&(s=s.substr(1)),!t.tokenizer[s])throw Mt(i,"include target '"+s+"' is not defined at: "+e);o(e+"."+s,r,t.tokenizer[s])}else{const t=new Ha(e);if(Array.isArray(a)&&a.length>=1&&a.length<=3)if(t.setRegex(n,a[0]),a.length>=3)if("string"==typeof a[1])t.setAction(n,{token:a[1],next:a[2]});else{if("object"!=typeof a[1])throw Mt(i,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+e);{const e=a[1];e.next=a[2],t.setAction(n,e)}}else t.setAction(n,a[1]);else{if(!a.regex)throw Mt(i,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+e);a.name&&"string"==typeof a.name&&(t.name=a.name),a.matchOnlyAtStart&&(t.matchOnlyAtLineStart=Fa(a.matchOnlyAtLineStart,!1)),t.setRegex(n,a.regex),t.setAction(n,a.action)}r.push(t)}}}if(n.languageId=e,n.includeLF=i.includeLF,n.ignoreCase=i.ignoreCase,n.unicode=i.unicode,n.noThrow=i.noThrow,n.usesEmbedded=i.usesEmbedded,n.stateNames=t.tokenizer,n.defaultToken=i.defaultToken,!t.tokenizer||"object"!=typeof t.tokenizer)throw Mt(i,"a language definition must define the 'tokenizer' attribute as an object");i.tokenizer=[];for(let e in t.tokenizer)if(t.tokenizer.hasOwnProperty(e)){i.start||(i.start=e);const n=t.tokenizer[e];i.tokenizer[e]=new Array,o("tokenizer."+e,i.tokenizer[e],n)}if(i.usesEmbedded=n.usesEmbedded,t.brackets){if(!Array.isArray(t.brackets))throw Mt(i,"the 'brackets' attribute must be defined as an array")}else t.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];let r=[];for(let e of t.brackets){let t=e;if(t&&Array.isArray(t)&&3===t.length&&(t={token:t[2],open:t[0],close:t[1]}),t.open===t.close)throw Mt(i,"open and close brackets in a 'brackets' attribute must be different: "+t.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required.");if("string"!=typeof t.open||"string"!=typeof t.token||"string"!=typeof t.close)throw Mt(i,"every element in the 'brackets' array must be a '{open,close,token}' object or array");r.push({token:t.token+i.tokenPostfix,open:Et(i,t.open),close:Et(i,t.close)})}return i.brackets=r,i.noThrow=!0,i}(e,t));return ja(t)?be.RW.registerPromise(e,t.then((e=>i(e)))):be.RW.register(e,i(t))},registerReferenceProvider:function(e,t){return be.FL.register(e,t)},registerRenameProvider:function(e,t){return be.G0.register(e,t)},registerCompletionItemProvider:function(e,t){return be.KZ.register(e,t)},registerSignatureHelpProvider:function(e,t){return be.nD.register(e,t)},registerHoverProvider:function(e,t){return be.xp.register(e,{provideHover:(e,i,n)=>{let o=e.getWordAtPosition(i);return Promise.resolve(t.provideHover(e,i,n)).then((e=>{if(e)return!e.range&&o&&(e.range=new U.e(i.lineNumber,o.startColumn,i.lineNumber,o.endColumn)),e.range||(e.range=new U.e(i.lineNumber,i.column,i.lineNumber,i.column)),e}))}})},registerDocumentSymbolProvider:function(e,t){return be.vJ.register(e,t)},registerDocumentHighlightProvider:function(e,t){return be.vH.register(e,t)},registerLinkedEditingRangeProvider:function(e,t){return be.id.register(e,t)},registerDefinitionProvider:function(e,t){return be.Ct.register(e,t)},registerImplementationProvider:function(e,t){return be.vI.register(e,t)},registerTypeDefinitionProvider:function(e,t){return be.tA.register(e,t)},registerCodeLensProvider:function(e,t){return be.He.register(e,t)},registerCodeActionProvider:function(e,t){return be.H9.register(e,{provideCodeActions:(e,i,n,o)=>{let r=Ta.markerService.get().read({resource:e.uri}).filter((e=>U.e.areIntersectingOrTouching(e,i)));return t.provideCodeActions(e,i,{markers:r,only:n.only},o)}})},registerDocumentFormattingEditProvider:function(e,t){return be.Az.register(e,t)},registerDocumentRangeFormattingEditProvider:function(e,t){return be.vN.register(e,t)},registerOnTypeFormattingEditProvider:function(e,t){return be.ln.register(e,t)},registerLinkProvider:function(e,t){return be.pM.register(e,t)},registerColorProvider:function(e,t){return be.OH.register(e,t)},registerFoldingRangeProvider:function(e,t){return be.aC.register(e,t)},registerDeclarationProvider:function(e,t){return be.RN.register(e,t)},registerSelectionRangeProvider:function(e,t){return be.AC.register(e,t)},registerDocumentSemanticTokensProvider:function(e,t){return be.wT.register(e,t)},registerDocumentRangeSemanticTokensProvider:function(e,t){return be.K7.register(e,t)},registerInlineCompletionsProvider:function(e,t){return be.zu.register(e,t)},DocumentHighlightKind:h,CompletionItemKind:r,CompletionItemTag:s,CompletionItemInsertTextRule:o,SymbolKind:I,SymbolTag:T,IndentAction:m,CompletionTriggerKind:a,SignatureHelpTriggerKind:M,InlayHintKind:_,InlineCompletionTriggerKind:v,FoldingRangeKind:be.AD};const Ya=Ga.CancellationTokenSource,Za=Ga.Emitter,Xa=Ga.KeyCode,Qa=Ga.KeyMod,Ja=Ga.Position,el=Ga.Range,tl=Ga.Selection,il=Ga.SelectionDirection,nl=Ga.MarkerSeverity,ol=Ga.MarkerTag,rl=Ga.Uri,sl=Ga.Token,al=Ga.editor,ll=Ga.languages;((null===(qa=De.li.MonacoEnvironment)||void 0===qa?void 0:qa.globalAPI)||"function"==typeof define&&i.amdO)&&(self.monaco=Ga),void 0!==self.require&&"function"==typeof self.require.config&&self.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]})},9477:(e,t,i)=>{"use strict";i.r(t);var n=i(5321),o=i(8626),r=i(8764),s=i(5152),a=i(3794),l=i(5976),c=i(1432),u=i(7295),h=i(666),d=i(6830),g=i(9102),f=i(9720),p=i(8819),m=i(2065),_=i(1847),v=i(988),b=i(3910),y=i(7781),w=i(913),C=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},S=function(e,t){return function(i,n){t(i,n,e)}};const x=new p.uy("accessibilityHelpWidgetVisible",!1);let k=class e extends l.JT{constructor(e,t){super(),this._editor=e,this._widget=this._register(t.createInstance(D,this._editor))}static get(t){return t.getContribution(e.ID)}show(){this._widget.show()}hide(){this._widget.hide()}};k.ID="editor.contrib.accessibilityHelpController",k=C([S(1,m.TG)],k);let D=class e extends a.${constructor(e,t,i,r){super(),this._contextKeyService=t,this._keybindingService=i,this._openerService=r,this._editor=e,this._isVisibleKey=x.bindTo(this._contextKeyService),this._domNode=(0,o.X)(document.createElement("div")),this._domNode.setClassName("accessibilityHelpWidget"),this._domNode.setDisplay("none"),this._domNode.setAttribute("role","dialog"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode=(0,o.X)(document.createElement("div")),this._contentDomNode.setAttribute("role","document"),this._domNode.appendChild(this._contentDomNode),this._isVisible=!1,this._register(this._editor.onDidLayoutChange((()=>{this._isVisible&&this._layout()}))),this._register(n.mu(this._contentDomNode.domNode,"keydown",(e=>{if(this._isVisible&&(e.equals(2083)&&((0,s.Z9)(w.Oe.emergencyConfOn),this._editor.updateOptions({accessibilitySupport:"on"}),n.PO(this._contentDomNode.domNode),this._buildContent(),this._contentDomNode.domNode.focus(),e.preventDefault(),e.stopPropagation()),e.equals(2086))){(0,s.Z9)(w.Oe.openingDocs);let t=this._editor.getRawOptions().accessibilityHelpUrl;void 0===t&&(t="https://go.microsoft.com/fwlink/?linkid=852450"),this._openerService.open(h.o.parse(t)),e.preventDefault(),e.stopPropagation()}}))),this.onblur(this._contentDomNode.domNode,(()=>{this.hide()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return e.ID}getDomNode(){return this._domNode.domNode}getPosition(){return{preference:null}}show(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())}_descriptionForCommand(e,t,i){let n=this._keybindingService.lookupKeybinding(e);return n?u.WU(t,n.getAriaLabel()):u.WU(i,e)}_buildContent(){const e=this._editor.getOptions(),t=this._editor.getSelections();let i=0;if(t){const e=this._editor.getModel();e&&t.forEach((t=>{i+=e.getValueLengthInRange(t)}))}let n=function(e,t){return e&&0!==e.length?1===e.length?t?u.WU(w.Oe.singleSelectionRange,e[0].positionLineNumber,e[0].positionColumn,t):u.WU(w.Oe.singleSelection,e[0].positionLineNumber,e[0].positionColumn):t?u.WU(w.Oe.multiSelectionRange,e.length,t):e.length>0?u.WU(w.Oe.multiSelection,e.length):"":w.Oe.noSelection}(t,i);e.get(51)?e.get(78)?n+=w.Oe.readonlyDiffEditor:n+=w.Oe.editableDiffEditor:e.get(78)?n+=w.Oe.readonlyEditor:n+=w.Oe.editableEditor;const o=c.dz?w.Oe.changeConfigToOnMac:w.Oe.changeConfigToOnWinLinux;switch(e.get(2)){case 0:n+="\n\n - "+o;break;case 2:n+="\n\n - "+w.Oe.auto_on;break;case 1:n+="\n\n - "+w.Oe.auto_off,n+=" "+o}e.get(127)?n+="\n\n - "+this._descriptionForCommand(f.ToggleTabFocusModeAction.ID,w.Oe.tabFocusModeOnMsg,w.Oe.tabFocusModeOnMsgNoKb):n+="\n\n - "+this._descriptionForCommand(f.ToggleTabFocusModeAction.ID,w.Oe.tabFocusModeOffMsg,w.Oe.tabFocusModeOffMsgNoKb),n+="\n\n - "+(c.dz?w.Oe.openDocMac:w.Oe.openDocWinLinux),n+="\n\n"+w.Oe.outroMsg,this._contentDomNode.domNode.appendChild((0,r.BO)(n)),this._contentDomNode.domNode.setAttribute("aria-label",n)}hide(){this._isVisible&&(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,n.PO(this._contentDomNode.domNode),this._editor.focus())}_layout(){let t=this._editor.getLayoutInfo(),i=Math.max(5,Math.min(e.WIDTH,t.width-40)),n=Math.max(5,Math.min(e.HEIGHT,t.height-40));this._domNode.setWidth(i),this._domNode.setHeight(n);let o=Math.round((t.height-n)/2);this._domNode.setTop(o);let r=Math.round((t.width-i)/2);this._domNode.setLeft(r)}};D.ID="editor.contrib.accessibilityHelpWidget",D.WIDTH=500,D.HEIGHT=300,D=C([S(1,p.i6),S(2,_.d),S(3,v.v4)],D);class L extends d.R6{constructor(){super({id:"editor.action.showAccessibilityHelp",label:w.Oe.showAccessibilityHelpAction,alias:"Show Accessibility Help",precondition:void 0,kbOpts:{primary:571,weight:100,linux:{primary:1595,secondary:[571]}}})}run(e,t){let i=k.get(t);i&&i.show()}}(0,d._K)(k.ID,k),(0,d.Qr)(L);const N=d._l.bindToContribution(k.get);(0,d.fK)(new N({id:"closeAccessibilityHelp",precondition:x,handler:e=>e.hide(),kbOpts:{weight:200,kbExpr:g.u.focus,primary:9,secondary:[1033]}})),(0,y.Ic)(((e,t)=>{const i=e.getColor(b.D0);i&&t.addRule(`.monaco-editor .accessibilityHelpWidget { background-color: ${i}; }`);const n=e.getColor(b.Hf);n&&t.addRule(`.monaco-editor .accessibilityHelpWidget { color: ${n}; }`);const o=e.getColor(b.rh);o&&t.addRule(`.monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px ${o}; }`);const r=e.getColor(b.lR);r&&t.addRule(`.monaco-editor .accessibilityHelpWidget { border: 2px solid ${r}; }`)}))},9646:(e,t,i)=>{"use strict";i.r(t),i.d(t,{IPadShowKeyboard:()=>a});var n=i(5321),o=i(5976),r=i(6830),s=i(1432);class a extends o.JT{constructor(e){super(),this.editor=e,this.widget=null,s.gn&&(this._register(e.onDidChangeConfiguration((()=>this.update()))),this.update())}update(){const e=!this.editor.getOption(78);!this.widget&&e?this.widget=new l(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}a.ID="editor.contrib.iPadShowKeyboard";class l extends o.JT{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(n.nm(this._domNode,"touchstart",(e=>{this.editor.focus()}))),this._register(n.nm(this._domNode,"focus",(e=>{this.editor.focus()}))),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return l.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}l.ID="editor.contrib.ShowKeyboardWidget",(0,r._K)(a.ID,a)},7830:(e,t,i)=>{"use strict";i.r(t);var n=i(5321),o=i(1264),r=i(5976),s=i(6830),a=i(4101),l=i(8111),c=i(1531),u=i(2095),h=i(3910),d=i(7781),g=i(913),f=i(2321),p=function(e,t){return function(i,n){t(i,n,e)}};let m=class e extends r.JT{constructor(e,t,i){super(),this._editor=e,this._modeService=i,this._widget=null,this._register(this._editor.onDidChangeModel((e=>this.stop()))),this._register(this._editor.onDidChangeModelLanguage((e=>this.stop()))),this._register(a.RW.onDidChange((e=>this.stop()))),this._register(this._editor.onKeyUp((e=>9===e.keyCode&&this.stop())))}static get(t){return t.getContribution(e.ID)}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new v(this._editor,this._modeService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};m.ID="editor.contrib.inspectTokens",m=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([p(1,u.Z),p(2,c.h)],m);class _ extends s.R6{constructor(){super({id:"editor.action.inspectTokens",label:g.ug.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){let i=m.get(t);i&&i.launch()}}class v extends r.JT{constructor(e,t){var i;super(),this.allowEditorOverflow=!0,this._editor=e,this._modeService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=(i=this._model.getLanguageIdentifier(),a.RW.get(i.language)||{getInitialState:()=>l.nO,tokenize:(e,t,n,o)=>(0,l.Ri)(i.language,e,n,o),tokenize2:(e,t,n,o)=>(0,l.mh)(i.id,e,n,o)}),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition((e=>this._compute(this._editor.getPosition())))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return v._ID}_compute(e){let t=this._getTokensAtLine(e.lineNumber),i=0;for(let n=t.tokens1.length-1;n>=0;n--){let o=t.tokens1[n];if(e.column-1>=o.offset){i=n;break}}let r=0;for(let i=t.tokens2.length>>>1;i>=0;i--)if(e.column-1>=t.tokens2[i<<1]){r=i;break}let s=this._model.getLineContent(e.lineNumber),a="";if(i{const i=e.getColor(h.CN);if(i){let n=e.type===f.e.HIGH_CONTRAST?2:1;t.addRule(`.monaco-editor .tokens-inspect-widget { border: ${n}px solid ${i}; }`),t.addRule(`.monaco-editor .tokens-inspect-widget .tokens-inspect-separator { background-color: ${i}; }`)}const n=e.getColor(h.yJ);n&&t.addRule(`.monaco-editor .tokens-inspect-widget { background-color: ${n}; }`);const o=e.getColor(h.Sb);o&&t.addRule(`.monaco-editor .tokens-inspect-widget { color: ${o}; }`)}))},7720:(e,t,i)=>{"use strict";i.r(t),i.d(t,{GotoLineAction:()=>U,StandaloneCommandsQuickAccessProvider:()=>$});var n,o=i(9872),r=i(725),s=i(913),a=i(1640),l=i(3580),c=i(1050),u=i(5976),h=i(5393),d=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function g(e){const t=e;return Array.isArray(t.items)}!function(e){e[e.NO_ACTION=0]="NO_ACTION",e[e.CLOSE_PICKER=1]="CLOSE_PICKER",e[e.REFRESH_PICKER=2]="REFRESH_PICKER",e[e.REMOVE_ITEM=3]="REMOVE_ITEM"}(n||(n={}));class f extends u.JT{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t){var i;const o=new u.SL;let r;e.canAcceptInBackground=!!(null===(i=this.options)||void 0===i?void 0:i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const s=o.add(new u.XK),a=()=>d(this,void 0,void 0,(function*(){const i=s.value=new u.SL;null==r||r.dispose(!0),e.busy=!1,r=new c.A(t);const n=r.token,o=e.value.substr(this.prefix.length).trim(),a=this._getPicks(o,i,n),l=(t,i)=>{var n;let r,s;if(g(t)?(r=t.items,s=t.active):r=t,0===r.length){if(i)return!1;o.length>0&&(null===(n=this.options)||void 0===n?void 0:n.noResultsPick)&&(r=[this.options.noResultsPick])}return e.items=r,s&&(e.activeItems=[s]),!0};if(null===a);else if(function(e){const t=e;return!!t.picks&&t.additionalPicks instanceof Promise}(a)){let t=!1,i=!1;yield Promise.all([(()=>d(this,void 0,void 0,(function*(){yield(0,h.Vs)(f.FAST_PICKS_RACE_DELAY),n.isCancellationRequested||i||(t=l(a.picks,!0))})))(),(()=>d(this,void 0,void 0,(function*(){e.busy=!0;try{const o=yield a.additionalPicks;if(n.isCancellationRequested)return;let r,s,c,u;if(g(a.picks)?(r=a.picks.items,s=a.picks.active):r=a.picks,g(o)?(c=o.items,u=o.active):c=o,c.length>0||!t){let t;if(!s&&!u){const i=e.activeItems[0];i&&-1!==r.indexOf(i)&&(t=i)}l({items:[...r,...c],active:s||u||t})}}finally{n.isCancellationRequested||(e.busy=!1),i=!0}})))()])}else if(a instanceof Promise){e.busy=!0;try{const t=yield a;if(n.isCancellationRequested)return;l(t)}finally{n.isCancellationRequested||(e.busy=!1)}}else l(a)}));return o.add(e.onDidChangeValue((()=>a()))),a(),o.add(e.onDidAccept((t=>{const[i]=e.selectedItems;"function"==typeof(null==i?void 0:i.accept)&&(t.inBackground||e.hide(),i.accept(e.keyMods,t))}))),o.add(e.onDidTriggerItemButton((({button:i,item:o})=>d(this,void 0,void 0,(function*(){var r,s;if("function"==typeof o.trigger){const l=null!==(s=null===(r=o.buttons)||void 0===r?void 0:r.indexOf(i))&&void 0!==s?s:-1;if(l>=0){const i=o.trigger(l,e.keyMods),r="number"==typeof i?i:yield i;if(t.isCancellationRequested)return;switch(r){case n.NO_ACTION:break;case n.CLOSE_PICKER:e.hide();break;case n.REFRESH_PICKER:a();break;case n.REMOVE_ITEM:const t=e.items.indexOf(o);if(-1!==t){const i=e.items.slice();i.splice(t,1),e.items=i}}}}}))))),o}}f.FAST_PICKS_RACE_DELAY=200;var p=i(5392),m=i(8401),_=i(3702),v=i(6904),b=i(3108),y=i(2065),w=i(1847),C=i(4565),S=i(829),x=i(7301),k=i(8820),D=i(4603),L=i(9488);function N(e,t){return t&&(e.stack||e.stacktrace)?l.N("stackTrace.format","{0}: {1}",A(e),E(e.stack)||E(e.stacktrace)):A(e)}function E(e){return Array.isArray(e)?e.join("\n"):e}function A(e){return"string"==typeof e.code&&"number"==typeof e.errno&&"string"==typeof e.syscall?l.N("nodeExceptionMessage","A system error occurred ({0})",e.message):e.message||l.N("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function M(e=null,t=!1){if(!e)return l.N("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(e)){const i=L.kX(e),n=M(i[0],t);return i.length>1?l.N("error.moreErrors","{0} ({1} errors in total)",n,i.length):n}if(m.HD(e))return e;if(e.detail){const i=e.detail;if(i.error)return N(i.error,t);if(i.exception)return N(i.exception,t)}return e.stack?N(e,t):e.message?e.message:l.N("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var I=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},T=function(e,t){return function(i,n){t(i,n,e)}},R=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};let O=class e extends f{constructor(t,i,n,o,r,s){super(e.PREFIX,t),this.instantiationService=i,this.keybindingService=n,this.commandService=o,this.telemetryService=r,this.dialogService=s,this.commandsHistory=this._register(this.instantiationService.createInstance(F)),this.options=t}_getPicks(t,i,n){return R(this,void 0,void 0,(function*(){const o=yield this.getCommandPicks(i,n);if(n.isCancellationRequested)return[];const r=[];for(const i of o){const n=(0,m.f6)(e.WORD_FILTER(t,i.label)),o=i.commandAlias?(0,m.f6)(e.WORD_FILTER(t,i.commandAlias)):void 0;n||o?(i.highlights={label:n,detail:this.options.showAlias?o:void 0},r.push(i)):t===i.commandId&&r.push(i)}const s=new Map;for(const e of r){const t=s.get(e.label);t?(e.description=e.commandId,t.description=t.commandId):s.set(e.label,e)}r.sort(((e,t)=>{const i=this.commandsHistory.peek(e.commandId),n=this.commandsHistory.peek(t.commandId);return i&&n?i>n?-1:1:i?-1:n?1:e.label.localeCompare(t.label)}));const a=[];let c=!1;for(let e=0;eR(this,void 0,void 0,(function*(){this.commandsHistory.push(t.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:t.commandId,from:"quick open"});try{yield this.commandService.executeCommand(t.commandId)}catch(e){(0,x.VV)(e)||this.dialogService.show(D.Z.Error,(0,l.N)("canNotRun","Command '{0}' resulted in an error ({1})",t.label,M(e)),[(0,l.N)("ok","OK")])}}))}))}return a}))}};O.PREFIX=">",O.WORD_FILTER=(0,p.or)(p.Ji,p.KZ,p.ir),O=I([T(1,y.TG),T(2,w.d),T(3,C.H),T(4,S.b),T(5,k.S)],O);let F=class e extends u.JT{constructor(e,t){super(),this.storageService=e,this.configurationService=t,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((()=>this.updateConfiguration())))}updateConfiguration(){this.configuredCommandsHistoryLength=e.getConfiguredCommandHistoryLength(this.configurationService),e.cache&&e.cache.limit!==this.configuredCommandsHistoryLength&&(e.cache.limit=this.configuredCommandsHistoryLength,e.saveState(this.storageService))}load(){const t=this.storageService.get(e.PREF_KEY_CACHE,0);let i;if(t)try{i=JSON.parse(t)}catch(e){}const n=e.cache=new _.z6(this.configuredCommandsHistoryLength,1);if(i){let e;e=i.usesLRU?i.entries:i.entries.sort(((e,t)=>e.value-t.value)),e.forEach((e=>n.set(e.key,e.value)))}e.counter=this.storageService.getNumber(e.PREF_KEY_COUNTER,0,e.counter)}push(t){e.cache&&(e.cache.set(t,e.counter++),e.saveState(this.storageService))}peek(t){var i;return null===(i=e.cache)||void 0===i?void 0:i.peek(t)}static saveState(t){if(!e.cache)return;const i={usesLRU:!0,entries:[]};e.cache.forEach(((e,t)=>i.entries.push({key:t,value:e}))),t.store(e.PREF_KEY_CACHE,JSON.stringify(i),0,0),t.store(e.PREF_KEY_COUNTER,e.counter,0,0)}static getConfiguredCommandHistoryLength(t){var i,n;const o=null===(n=null===(i=t.getValue().workbench)||void 0===i?void 0:i.commandPalette)||void 0===n?void 0:n.history;return"number"==typeof o?o:e.DEFAULT_COMMANDS_HISTORY_LENGTH}};F.DEFAULT_COMMANDS_HISTORY_LENGTH=50,F.PREF_KEY_CACHE="commandPalette.mru.cache",F.PREF_KEY_COUNTER="commandPalette.mru.counter",F.counter=1,F=I([T(0,v.Uy),T(1,b.Ui)],F);var P=i(1212);class B extends O{constructor(e,t,i,n,o,r){super(e,t,i,n,o,r)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const i of e.getSupportedActions())t.push({commandId:i.id,commandAlias:i.alias,label:(0,P.x$)(i.label)||i.id});return t}}var z=i(6830),W=i(9102),V=i(1157),H=function(e,t){return function(i,n){t(i,n,e)}};let $=class extends B{constructor(e,t,i,n,o,r){super({showAlias:!1},e,i,n,o,r),this.codeEditorService=t}get activeTextEditorControl(){return(0,m.f6)(this.codeEditorService.getFocusedCodeEditor())}getCommandPicks(){return e=this,t=void 0,n=function*(){return this.getCodeEditorCommandPicks()},new((i=void 0)||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}));var e,t,i,n}};$=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([H(0,y.TG),H(1,a.$),H(2,w.d),H(3,C.H),H(4,S.b),H(5,k.S)],$),o.B.as(r.IP.Quickaccess).registerQuickAccessProvider({ctor:$,prefix:$.PREFIX,helpEntries:[{description:s.UX.quickCommandHelp,needsEditor:!0}]});class U extends z.R6{constructor(){super({id:"editor.action.quickCommand",label:s.UX.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:W.u.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(V.eJ).quickAccess.show($.PREFIX)}}(0,z.Qr)(U)},2097:(e,t,i)=>{"use strict";i.r(t),i.d(t,{GotoLineAction:()=>y,StandaloneGotoLineQuickAccessProvider:()=>_});var n=i(3580),o=i(5976),r=i(8275),s=i(5520);class a extends r.X{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const t=(0,n.N)("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,o.JT.None}provideWithTextEditor(e,t,i){const n=e.editor,r=new o.SL;r.add(t.onDidAccept((i=>{const[o]=t.selectedItems;if(o){if(!this.isValidLineNumber(n,o.lineNumber))return;this.gotoLocation(e,{range:this.toRange(o.lineNumber,o.column),keyMods:t.keyMods,preserveFocus:i.inBackground}),i.inBackground||t.hide()}})));const l=()=>{const e=this.parsePosition(n,t.value.trim().substr(a.PREFIX.length)),i=this.getPickLabel(n,e.lineNumber,e.column);if(t.items=[{lineNumber:e.lineNumber,column:e.column,label:i}],t.ariaLabel=i,!this.isValidLineNumber(n,e.lineNumber))return void this.clearDecorations(n);const o=this.toRange(e.lineNumber,e.column);n.revealRangeInCenter(o,0),this.addDecorations(n,o)};l(),r.add(t.onDidChangeValue((()=>l())));const c=(0,s.Pi)(n);return c&&2===c.getOptions().get(57).renderType&&(c.updateOptions({lineNumbers:"on"}),r.add((0,o.OF)((()=>c.updateOptions({lineNumbers:"relative"}))))),r}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const i=t.split(/,|:|#/).map((e=>parseInt(e,10))).filter((e=>!isNaN(e))),n=this.lineCount(e)+1;return{lineNumber:i[0]>0?i[0]:n+i[0],column:i[1]}}getPickLabel(e,t,i){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,i)?(0,n.N)("gotoLineColumnLabel","Go to line {0} and character {1}.",t,i):(0,n.N)("gotoLineLabel","Go to line {0}.",t);const o=e.getPosition()||{lineNumber:1,column:1},r=this.lineCount(e);return r>1?(0,n.N)("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",o.lineNumber,o.column,r):(0,n.N)("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",o.lineNumber,o.column)}isValidLineNumber(e,t){return!(!t||"number"!=typeof t)&&t>0&&t<=this.lineCount(e)}isValidColumn(e,t,i){if(!i||"number"!=typeof i)return!1;const n=this.getModel(e);if(!n)return!1;const o={lineNumber:t,column:i};return n.validatePosition(o).equals(o)}lineCount(e){var t,i;return null!==(i=null===(t=this.getModel(e))||void 0===t?void 0:t.getLineCount())&&void 0!==i?i:0}}a.PREFIX=":";var l=i(9872),c=i(725),u=i(1640),h=i(8401),d=i(913),g=i(4669),f=i(6830),p=i(9102),m=i(1157);let _=class extends a{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=g.ju.None}get activeTextEditorControl(){return(0,h.f6)(this.editorService.getFocusedCodeEditor())}};var v,b;_=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(v=0,b=u.$,function(e,t){b(e,t,v)})],_),l.B.as(c.IP.Quickaccess).registerQuickAccessProvider({ctor:_,prefix:_.PREFIX,helpEntries:[{description:d.qq.gotoLineActionLabel,needsEditor:!0}]});class y extends f.R6{constructor(){super({id:"editor.action.gotoLine",label:d.qq.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:p.u.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(m.eJ).quickAccess.show(_.PREFIX)}}(0,f.Qr)(y)},8936:(e,t,i)=>{"use strict";i.r(t),i.d(t,{GotoLineAction:()=>B,StandaloneGotoSymbolQuickAccessProvider:()=>O}),i(8609),i(4954);var n=i(3580),o=i(1050),r=i(5976),s=i(4314),a=i(8275),l=i(4101),c=i(6895),u=i(7295),h=i(5392),d=i(8721),g=i(1432);const f=[void 0,[]];function p(e,t,i=0,n=0){const o=t;return o.values&&o.values.length>1?function(e,t,i,n){let o=0;const r=[];for(const s of t){const[t,a]=m(e,s,i,n);if("number"!=typeof t)return f;o+=t,r.push(...a)}return[o,_(r)]}(e,o.values,i,n):m(e,t,i,n)}function m(e,t,i,n){const o=(0,h.EW)(t.original,t.originalLowercase,i,e,e.toLowerCase(),n,!0);return o?[o[0],(0,h.mB)(o)]:f}function _(e){const t=e.sort(((e,t)=>e.start-t.start)),i=[];let n;for(const e of t)!n||(r=e,(o=n).end=0;let s;const a=e.split(" ");if(a.length>1)for(const e of a){const{pathNormalized:t,normalized:i,normalizedLowercase:n}=b(e);i&&(s||(s=[]),s.push({original:e,originalLowercase:e.toLowerCase(),pathNormalized:t,normalized:i,normalizedLowercase:n}))}return{original:e,originalLowercase:t,pathNormalized:i,normalized:n,normalizedLowercase:o,values:s,containsPathSeparator:r}}function b(e){let t;t=g.ED?e.replace(/\//g,d.ir):e.replace(/\\/g,d.ir);const i=(0,u.R1)(t).replace(/\s/g,"");return{pathNormalized:t,normalized:i,normalizedLowercase:i.toLowerCase()}}function y(e){return Array.isArray(e)?v(e.map((e=>e.original)).join(" ")):v(e.original)}var w=i(3046),C=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class S extends a.X{constructor(e=Object.create(null)){super(e),this.options=e,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,(0,n.N)("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),r.JT.None}provideWithTextEditor(e,t,i){const n=e.editor,o=this.getModel(n);return o?l.vJ.has(o)?this.doProvideWithEditorSymbols(e,o,t,i):this.doProvideWithoutEditorSymbols(e,o,t,i):r.JT.None}doProvideWithoutEditorSymbols(e,t,i,o){const s=new r.SL;return this.provideLabelPick(i,(0,n.N)("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),(()=>{C(this,void 0,void 0,(function*(){(yield this.waitForLanguageSymbolRegistry(t,s))&&!o.isCancellationRequested&&s.add(this.doProvideWithEditorSymbols(e,t,i,o))}))})(),s}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}waitForLanguageSymbolRegistry(e,t){return C(this,void 0,void 0,(function*(){if(l.vJ.has(e))return!0;let i;const n=new Promise((e=>i=e)),o=t.add(l.vJ.onDidChange((()=>{l.vJ.has(e)&&(o.dispose(),i(!0))})));return t.add((0,r.OF)((()=>i(!1)))),n}))}doProvideWithEditorSymbols(e,t,i,s){const a=e.editor,l=new r.SL;l.add(i.onDidAccept((t=>{const[n]=i.selectedItems;n&&n.range&&(this.gotoLocation(e,{range:n.range.selection,keyMods:i.keyMods,preserveFocus:t.inBackground}),t.inBackground||i.hide())}))),l.add(i.onDidTriggerItemButton((({item:t})=>{t&&t.range&&(this.gotoLocation(e,{range:t.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())})));const c=this.getDocumentSymbols(t,s);let u;const h=()=>C(this,void 0,void 0,(function*(){null==u||u.dispose(!0),i.busy=!1,u=new o.A(s),i.busy=!0;try{const e=v(i.value.substr(S.PREFIX.length).trim()),t=yield this.doGetSymbolPicks(c,e,void 0,u.token);if(s.isCancellationRequested)return;t.length>0?i.items=t:e.original.length>0?this.provideLabelPick(i,(0,n.N)("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(i,(0,n.N)("noSymbolResults","No editor symbols"))}finally{s.isCancellationRequested||(i.busy=!1)}}));l.add(i.onDidChangeValue((()=>h()))),h();let d=!0;return l.add(i.onDidChangeActive((()=>{const[e]=i.activeItems;if(e&&e.range){if(d)return void(d=!1);a.revealRangeInCenter(e.range.selection,0),this.addDecorations(a,e.range.decoration)}}))),l}doGetSymbolPicks(e,t,i,o){return C(this,void 0,void 0,(function*(){const r=yield e;if(o.isCancellationRequested)return[];const a=0===t.original.indexOf(S.SCOPE_PREFIX),c=a?1:0;let h,d;t.values&&t.values.length>1?(h=y(t.values[0]),d=y(t.values.slice(1))):h=t;const g=[];for(let e=0;ec){let e=!1;if(h!==t&&([_,v]=p(f,Object.assign(Object.assign({},t),{values:void 0}),c,m),"number"==typeof _&&(e=!0)),"number"!=typeof _&&([_,v]=p(f,h,c,m),"number"!=typeof _))continue;if(!e&&d){if(C&&d.original.length>0&&([b,y]=p(C,d)),"number"!=typeof b)continue;"number"==typeof _&&(_+=b)}}const S=o.tags&&o.tags.indexOf(1)>=0;g.push({index:e,kind:o.kind,score:_,label:f,ariaLabel:a,description:C,highlights:S?void 0:{label:v,description:y},range:{selection:s.e.collapseToStart(o.selectionRange),decoration:o.range},strikethrough:S,buttons:(()=>{var e,t;const i=(null===(e=this.options)||void 0===e?void 0:e.openSideBySideDirection)?null===(t=this.options)||void 0===t?void 0:t.openSideBySideDirection():void 0;if(i)return[{iconClass:"right"===i?w.lA.splitHorizontal.classNames:w.lA.splitVertical.classNames,tooltip:"right"===i?(0,n.N)("openToSide","Open to the Side"):(0,n.N)("openToBottom","Open to the Bottom")}]})()})}const f=g.sort(((e,t)=>a?this.compareByKindAndScore(e,t):this.compareByScore(e,t)));let m=[];if(a){let e,t,i=0;function _(){t&&"number"==typeof e&&i>0&&(t.label=(0,u.WU)(k[e]||x,i))}for(const n of f)e!==n.kind?(_(),e=n.kind,i=1,t={type:"separator"},m.push(t)):i++,m.push(n);_()}else f.length>0&&(m=[{label:(0,n.N)("symbols","symbols ({0})",g.length),type:"separator"},...f]);return m}))}compareByScore(e,t){if("number"!=typeof e.score&&"number"==typeof t.score)return 1;if("number"==typeof e.score&&"number"!=typeof t.score)return-1;if("number"==typeof e.score&&"number"==typeof t.score){if(e.score>t.score)return-1;if(e.scoret.index?1:0}compareByKindAndScore(e,t){const i=k[e.kind]||x,n=k[t.kind]||x,o=i.localeCompare(n);return 0===o?this.compareByScore(e,t):o}getDocumentSymbols(e,t){return C(this,void 0,void 0,(function*(){const i=yield c.C3.create(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()}))}}S.PREFIX="@",S.SCOPE_PREFIX=":",S.PREFIX_BY_CATEGORY=`${S.PREFIX}${S.SCOPE_PREFIX}`;const x=(0,n.N)("property","properties ({0})"),k={5:(0,n.N)("method","methods ({0})"),11:(0,n.N)("function","functions ({0})"),8:(0,n.N)("_constructor","constructors ({0})"),12:(0,n.N)("variable","variables ({0})"),4:(0,n.N)("class","classes ({0})"),22:(0,n.N)("struct","structs ({0})"),23:(0,n.N)("event","events ({0})"),24:(0,n.N)("operator","operators ({0})"),10:(0,n.N)("interface","interfaces ({0})"),2:(0,n.N)("namespace","namespaces ({0})"),3:(0,n.N)("package","packages ({0})"),25:(0,n.N)("typeParameter","type parameters ({0})"),1:(0,n.N)("modules","modules ({0})"),6:(0,n.N)("property","properties ({0})"),9:(0,n.N)("enum","enumerations ({0})"),21:(0,n.N)("enumMember","enumeration members ({0})"),14:(0,n.N)("string","strings ({0})"),0:(0,n.N)("file","files ({0})"),17:(0,n.N)("array","arrays ({0})"),15:(0,n.N)("number","numbers ({0})"),16:(0,n.N)("boolean","booleans ({0})"),18:(0,n.N)("object","objects ({0})"),19:(0,n.N)("key","keys ({0})"),7:(0,n.N)("field","fields ({0})"),13:(0,n.N)("constant","constants ({0})")};var D=i(9872),L=i(725),N=i(1640),E=i(8401),A=i(913),M=i(4669),I=i(6830),T=i(9102),R=i(1157);let O=class extends S{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=M.ju.None}get activeTextEditorControl(){return(0,E.f6)(this.editorService.getFocusedCodeEditor())}};var F,P;O=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(F=0,P=N.$,function(e,t){P(e,t,F)})],O),D.B.as(L.IP.Quickaccess).registerQuickAccessProvider({ctor:O,prefix:S.PREFIX,helpEntries:[{description:A.aq.quickOutlineActionLabel,prefix:S.PREFIX,needsEditor:!0},{description:A.aq.quickOutlineByCategoryActionLabel,prefix:S.PREFIX_BY_CATEGORY,needsEditor:!0}]});class B extends I.R6{constructor(){super({id:"editor.action.quickOutline",label:A.aq.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:T.u.hasDocumentSymbolProvider,kbOpts:{kbExpr:T.u.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(R.eJ).quickAccess.show(S.PREFIX)}}(0,I.Qr)(B)},8944:(e,t,i)=>{"use strict";i.r(t);var n=i(9872),o=i(725),r=i(913),s=i(1157),a=i(3580),l=i(5976);let c=class e{constructor(e){this.quickInputService=e,this.registry=n.B.as(o.IP.Quickaccess)}provide(t){const i=new l.SL;i.add(t.onDidAccept((()=>{const[e]=t.selectedItems;e&&this.quickInputService.quickAccess.show(e.prefix,{preserveValue:!0})}))),i.add(t.onDidChangeValue((t=>{const i=this.registry.getQuickAccessProvider(t.substr(e.PREFIX.length));i&&i.prefix&&i.prefix!==e.PREFIX&&this.quickInputService.quickAccess.show(i.prefix,{preserveValue:!0})})));const{editorProviders:n,globalProviders:o}=this.getQuickAccessProviders();return t.items=0===n.length||0===o.length?[...0===n.length?o:n]:[{label:(0,a.N)("globalCommands","global commands"),type:"separator"},...o,{label:(0,a.N)("editorCommands","editor commands"),type:"separator"},...n],i}getQuickAccessProviders(){const t=[],i=[];for(const n of this.registry.getQuickAccessProviders().sort(((e,t)=>e.prefix.localeCompare(t.prefix))))if(n.prefix!==e.PREFIX)for(const e of n.helpEntries){const o=e.prefix||n.prefix,r=o||"…";(e.needsEditor?i:t).push({prefix:o,label:r,ariaLabel:(0,a.N)("helpPickAriaLabel","{0}, {1}",r,e.description),description:e.description})}return{editorProviders:i,globalProviders:t}}};var u,h;c.PREFIX="?",c=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(u=0,h=s.eJ,function(e,t){h(e,t,u)})],c),n.B.as(o.IP.Quickaccess).registerQuickAccessProvider({ctor:c,prefix:"",helpEntries:[{description:r.ld.helpQuickAccessActionLabel,needsEditor:!0}]})},5048:(e,t,i)=>{"use strict";i.r(t),i.d(t,{StandaloneReferencesController:()=>d});var n=i(6830),o=i(1640),r=i(4318),s=i(3108),a=i(8819),l=i(2065),c=i(9422),u=i(6904),h=function(e,t){return function(i,n){t(i,n,e)}};let d=class extends r.J{constructor(e,t,i,n,o,r,s){super(!0,e,t,i,n,o,r,s)}};d=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([h(1,a.i6),h(2,o.$),h(3,c.lT),h(4,l.TG),h(5,u.Uy),h(6,s.Ui)],d),(0,n._K)(r.J.ID,d)},5662:(e,t,i)=>{"use strict";i.r(t);var n=i(6830),o=i(2095),r=i(913);class s extends n.R6{constructor(){super({id:"editor.action.toggleHighContrast",label:r.xi.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const i=e.get(o.Z);this._originalThemeName?(i.setTheme(this._originalThemeName),this._originalThemeName=null):(this._originalThemeName=i.getColorTheme().themeName,i.setTheme("hc-black"))}}(0,n.Qr)(s)},2095:(e,t,i)=>{"use strict";i.d(t,{Z:()=>n});const n=(0,i(2065).yh)("themeService")},3580:(e,t,i)=>{"use strict";function n(e,t,...i){return function(e,t){let i;return i=0===t.length?e:e.replace(/\{(\d+)\}/g,(function(e,i){const n=i[0];return void 0!==t[n]?t[n]:e})),i}(t,i)}i.d(t,{N:()=>n})},1106:(e,t,i)=>{"use strict";i.d(t,{F:()=>r,U:()=>s});var n=i(2065),o=i(8819);const r=(0,n.yh)("accessibilityService"),s=new o.uy("accessibilityModeEnabled",!1)},8335:(e,t,i)=>{"use strict";i.d(t,{Mm:()=>k,Id:()=>L,vr:()=>x});var n=i(5321),o=i(4850),r=i(4741),s=i(5976),a=i(3580),l=i(4144),c=i(5606),u=i(1847),h=i(8030),d=i(9422),g=i(7781),f=i(6033),p=i(4669),m=i(553),_=i(9069);class v extends r.Wi{constructor(e,t){super(),this._onDidChangeVisibility=new p.Q5,this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=(0,n.R3)(e,(0,n.$)(".monaco-dropdown")),this._label=(0,n.R3)(this._element,(0,n.$)(".dropdown-label"));let i=t.labelRenderer;i||(i=e=>(e.textContent=t.label||"",null));for(const e of[n.tw.CLICK,n.tw.MOUSE_DOWN,m.t.Tap])this._register((0,n.nm)(this.element,e,(e=>n.zB.stop(e,!0))));for(const e of[n.tw.MOUSE_DOWN,m.t.Tap])this._register((0,n.nm)(this._label,e,(e=>{e instanceof MouseEvent&&e.detail>1||(this.visible?this.hide():this.show())})));this._register((0,n.nm)(this._label,n.tw.KEY_UP,(e=>{const t=new _.y(e);(t.equals(3)||t.equals(10))&&(n.zB.stop(e,!0),this.visible?this.hide():this.show())})));const o=i(this._label);o&&this._register(o),this._register(m.o.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class b extends v{constructor(e,t){super(e,t),this._actions=[],this._contextMenuProvider=t.contextMenuProvider,this.actions=t.actions||[],this.actionProvider=t.actionProvider,this.menuClassName=t.menuClassName||"",this.menuAsChild=!!t.menuAsChild}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this.actionProvider?this.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:e=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this.menuClassName,onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this.menuAsChild?this.element:void 0})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class y extends f.Y{constructor(e,t,i,n=Object.create(null)){super(null,e,n),this.actionItem=null,this._onDidChangeVisibility=this._register(new p.Q5),this.menuActionsOrProvider=t,this.contextMenuProvider=i,this.options=n,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const t=Array.isArray(this.menuActionsOrProvider),i={contextMenuProvider:this.contextMenuProvider,labelRenderer:e=>{this.element=(0,n.R3)(e,(0,n.$)("a.action-label"));let t=[];return"string"==typeof this.options.classNames?t=this.options.classNames.split(/\s+/g).filter((e=>!!e)):this.options.classNames&&(t=this.options.classNames),t.find((e=>"icon"===e))||t.push("codicon"),this.element.classList.add(...t),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",null},menuAsChild:this.options.menuAsChild,actions:t?this.menuActionsOrProvider:void 0,actionProvider:t?void 0:this.menuActionsOrProvider};if(this.dropdownMenu=this._register(new b(e,i)),this._register(this.dropdownMenu.onDidChangeVisibility((e=>{var t;null===(t=this.element)||void 0===t||t.setAttribute("aria-expanded",`${e}`),this._onDidChangeVisibility.fire(e)}))),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const e=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return e.options.anchorAlignmentProvider()}})}this.updateEnabled()}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}updateEnabled(){var e,t;const i=!this.getAction().enabled;null===(e=this.actionItem)||void 0===e||e.classList.toggle("disabled",i),null===(t=this.element)||void 0===t||t.classList.toggle("disabled",i)}}var w=i(1432),C=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},S=function(e,t){return function(i,n){t(i,n,e)}};function x(e,t,i,n,o,a,c){const u=e.getActions(t);return function(e,t,i,n=(e=>"navigation"===e),o=Number.MAX_SAFE_INTEGER,s=(()=>!1),a=!1){let c,u;Array.isArray(t)?(c=t,u=t):(c=t.primary,u=t.secondary);const h=new Set;for(const[t,o]of e){let e;n(t)?(e=c,e.length>0&&a&&e.push(new r.Z0)):(e=u,e.length>0&&e.push(new r.Z0));for(let n of o){i&&(n=n instanceof l.U8&&n.alt?n.alt:n);const o=e.push(n);n instanceof r.wY&&h.add({group:t,action:n,index:o-1})}}for(const{group:e,action:t,index:i}of h){const r=n(e)?c:u,a=t.actions;(a.length<=1||r.length+a.length-2<=o)&&s(t,e,r.length)&&r.splice(i,1,...a)}if(c!==u&&c.length>o){const e=c.splice(o,c.length-o);u.unshift(...e,new r.Z0)}}(u,i,!1,"string"==typeof n?e=>e===n:n,o,a,c),function(e){const t=new s.SL;for(const[,i]of e)for(const e of i)t.add(e);return t}(u)}let k=class extends f.g{constructor(e,t,i){super(void 0,e,{icon:!(!e.class&&!e.item.icon),label:!e.class&&!e.item.icon}),this._keybindingService=t,this._notificationService=i,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new s.XK),this._altKey=n._q.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}onClick(e){return t=this,i=void 0,o=function*(){e.preventDefault(),e.stopPropagation();try{yield this.actionRunner.run(this._commandAction,this._context)}catch(e){this._notificationService.error(e)}},new((n=void 0)||(n=Promise))((function(e,r){function s(e){try{l(o.next(e))}catch(e){r(e)}}function a(e){try{l(o.throw(e))}catch(e){r(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n((function(e){e(i)}))).then(s,a)}l((o=o.apply(t,i||[])).next())}));var t,i,n,o}render(e){super.render(e),e.classList.add("menu-entry"),this._updateItemClass(this._menuItemAction.item);let t=!1,i=this._altKey.keyStatus.altKey||(w.ED||w.IJ)&&this._altKey.keyStatus.shiftKey;const n=()=>{const e=t&&i;e!==this._wantsAltCommand&&(this._wantsAltCommand=e,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._menuItemAction.alt&&this._register(this._altKey.event((e=>{i=e.altKey||(w.ED||w.IJ)&&e.shiftKey,n()}))),this._register((0,o.jt)(e,"mouseleave")((e=>{t=!1,n()}))),this._register((0,o.jt)(e,"mouseenter")((e=>{t=!0,n()})))}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}updateTooltip(){if(this.label){const e=this._keybindingService.lookupKeybinding(this._commandAction.id),t=e&&e.getLabel(),i=this._commandAction.tooltip||this._commandAction.label;let n=t?(0,a.N)("titleAndKb","{0} ({1})",i,t):i;if(!this._wantsAltCommand&&this._menuItemAction.alt){const e=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,t=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id),i=t&&t.getLabel(),o=i?(0,a.N)("titleAndKb","{0} ({1})",e,i):e;n+=`\n[${h.xo.modifierLabels[w.OS].altKey}] ${o}`}this.label.title=n}}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){var t;this._itemClassDispose.value=void 0;const{element:i,label:o}=this;if(!i||!o)return;const r=this._commandAction.checked&&(null===(t=e.toggled)||void 0===t?void 0:t.icon)?e.toggled.icon:e.icon;if(r)if(g.kS.isThemeIcon(r)){const e=g.kS.asClassNameArray(r);o.classList.add(...e),this._itemClassDispose.value=(0,s.OF)((()=>{o.classList.remove(...e)}))}else r.light&&o.style.setProperty("--menu-entry-icon-light",(0,n.wY)(r.light)),r.dark&&o.style.setProperty("--menu-entry-icon-dark",(0,n.wY)(r.dark)),o.classList.add("icon"),this._itemClassDispose.value=(0,s.OF)((()=>{o.classList.remove("icon"),o.style.removeProperty("--menu-entry-icon-light"),o.style.removeProperty("--menu-entry-icon-dark")}))}};k=C([S(1,u.d),S(2,d.lT)],k);let D=class extends y{constructor(e,t){super(e,{getActions:()=>e.actions},t,{menuAsChild:!0,classNames:g.kS.isThemeIcon(e.item.icon)?g.kS.asClassName(e.item.icon):void 0})}render(e){if(super.render(e),this.element){e.classList.add("menu-entry");const{icon:t}=this._action.item;t&&!g.kS.isThemeIcon(t)&&(this.element.classList.add("icon"),t.light&&this.element.style.setProperty("--menu-entry-icon-light",(0,n.wY)(t.light)),t.dark&&this.element.style.setProperty("--menu-entry-icon-dark",(0,n.wY)(t.dark)))}}};function L(e,t){return t instanceof l.U8?e.createInstance(k,t):t instanceof l.NZ?e.createInstance(D,t):void 0}D=C([S(1,c.i)],D)},4144:(e,t,i)=>{"use strict";i.d(t,{vr:()=>f,eH:()=>p,co:()=>m,BH:()=>_,NZ:()=>v,U8:()=>b});var n=i(4741),o=i(2065),r=i(8819),s=i(4565),a=i(5976),l=i(4669),c=i(7781),u=i(3725),h=i(1741),d=i(3046),g=function(e,t){return function(i,n){t(i,n,e)}};function f(e){return void 0!==e.command}class p{constructor(e){this.id=p._idPool++,this._debugName=e}}p._idPool=0,p.CommandPalette=new p("CommandPalette"),p.EditorContext=new p("EditorContext"),p.SimpleEditorContext=new p("SimpleEditorContext"),p.EditorContextCopy=new p("EditorContextCopy"),p.EditorContextPeek=new p("EditorContextPeek"),p.MenubarEditMenu=new p("MenubarEditMenu"),p.MenubarCopy=new p("MenubarCopy"),p.MenubarGoMenu=new p("MenubarGoMenu"),p.MenubarSelectionMenu=new p("MenubarSelectionMenu"),p.InlineCompletionsActions=new p("InlineCompletionsActions");const m=(0,o.yh)("menuService"),_=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new l.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:e=>e===p.CommandPalette}}addCommand(e){return this.addCommands(u.$.single(e))}addCommands(e){for(const t of e)this._commands.set(t.id,t);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,a.OF)((()=>{let t=!1;for(const i of e)t=this._commands.delete(i.id)||t;t&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)}))}getCommand(e){return this._commands.get(e)}getCommands(){const e=new Map;return this._commands.forEach(((t,i)=>e.set(i,t))),e}appendMenuItem(e,t){return this.appendMenuItems(u.$.single({id:e,item:t}))}appendMenuItems(e){const t=new Set,i=new h.S;for(const{id:n,item:o}of e){let e=this._menuItems.get(n);e||(e=new h.S,this._menuItems.set(n,e)),i.push(e.push(o)),t.add(n)}return this._onDidChangeMenu.fire(t),(0,a.OF)((()=>{if(i.size>0){for(let e of i)e();this._onDidChangeMenu.fire(t),i.clear()}}))}getMenuItems(e){let t;return t=this._menuItems.has(e)?[...this._menuItems.get(e)]:[],e===p.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(e){const t=new Set;for(const i of e)f(i)&&(t.add(i.command.id),i.alt&&t.add(i.alt.id));this._commands.forEach(((i,n)=>{t.has(n)||e.push({command:i})}))}};class v extends n.wY{constructor(e,t,i,n){super(`submenuitem.${e.submenu.id}`,"string"==typeof e.title?e.title:e.title.value,[],"submenu"),this.item=e,this._menuService=t,this._contextKeyService=i,this._options=n}get actions(){const e=[],t=this._menuService.createMenu(this.item.submenu,this._contextKeyService),i=t.getActions(this._options);t.dispose();for(const[,t]of i)t.length>0&&(e.push(...t),e.push(new n.Z0));return e.length&&e.pop(),e}}let b=class e{constructor(t,i,n,o,r){var s;if(this._commandService=r,this.id=t.id,this.label=(null==n?void 0:n.renderShortTitle)&&t.shortTitle?"string"==typeof t.shortTitle?t.shortTitle:t.shortTitle.value:"string"==typeof t.title?t.title:t.title.value,this.tooltip=null!==(s=t.tooltip)&&void 0!==s?s:"",this.enabled=!t.precondition||o.contextMatchesRules(t.precondition),this.checked=!1,t.toggled){const e=t.toggled.condition?t.toggled:{condition:t.toggled};this.checked=o.contextMatchesRules(e.condition),this.checked&&e.tooltip&&(this.tooltip="string"==typeof e.tooltip?e.tooltip:e.tooltip.value),e.title&&(this.label="string"==typeof e.title?e.title:e.title.value)}this.item=t,this.alt=i?new e(i,void 0,n,o,r):void 0,this._options=n,c.kS.isThemeIcon(t.icon)&&(this.class=d.dT.asClassName(t.icon))}dispose(){}run(...e){var t,i;let n=[];return(null===(t=this._options)||void 0===t?void 0:t.arg)&&(n=[...n,this._options.arg]),(null===(i=this._options)||void 0===i?void 0:i.shouldForwardArgs)&&(n=[...n,...e]),this._commandService.executeCommand(this.id,...n)}};b=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([g(3,r.i6),g(4,s.H)],b)},4972:(e,t,i)=>{"use strict";i.d(t,{p:()=>n});const n=(0,i(2065).yh)("clipboardService")},4565:(e,t,i)=>{"use strict";i.d(t,{H:()=>c,P:()=>u});var n=i(5976),o=i(8401),r=i(2065),s=i(4669),a=i(1741),l=i(3725);const c=(0,r.yh)("commandService"),u=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new s.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,t){if(!e)throw new Error("invalid command");if("string"==typeof e){if(!t)throw new Error("invalid command");return this.registerCommand({id:e,handler:t})}if(e.description){const t=[];for(let i of e.description.args)t.push(i.constraint);const i=e.handler;e.handler=function(e,...n){return(0,o.D8)(n,t),i(e,...n)}}const{id:i}=e;let r=this._commands.get(i);r||(r=new a.S,this._commands.set(i,r));let s=r.unshift(e),l=(0,n.OF)((()=>{s();const e=this._commands.get(i);(null==e?void 0:e.isEmpty())&&this._commands.delete(i)}));return this._onDidRegisterCommand.fire(i),l}registerCommandAlias(e,t){return u.registerCommand(e,((e,...i)=>e.get(c).executeCommand(t,...i)))}getCommand(e){const t=this._commands.get(e);if(t&&!t.isEmpty())return l.$.first(t)}getCommands(){const e=new Map;for(const t of this._commands.keys()){const i=this.getCommand(t);i&&e.set(t,i)}return e}};u.registerCommand("noop",(()=>{}))},3108:(e,t,i)=>{"use strict";i.d(t,{Ui:()=>s,Od:()=>a,KV:()=>l,xL:()=>c,Mt:()=>h,MR:()=>d,O4:()=>g});var n=i(9872),o=i(2065),r=i(3193);const s=(0,o.yh)("configurationService");function a(e,t){const i=Object.create(null);for(let n in e)l(i,n,e[n],t);return i}function l(e,t,i,n){const o=t.split("."),r=o.pop();let s=e;for(let e=0;econsole.error(`Conflict in default settings: ${e}`)));return e}},3193:(e,t,i)=>{"use strict";i.d(t,{IP:()=>l,G1:()=>_,Uh:()=>v});var n=i(3580),o=i(4669),r=i(9872),s=i(8401),a=i(1294);const l={Configuration:"base.contributions.configuration"},c={properties:{},patternProperties:{}},u={properties:{},patternProperties:{}},h={properties:{},patternProperties:{}},d={properties:{},patternProperties:{}},g={properties:{},patternProperties:{}},f={properties:{},patternProperties:{}},p="vscode://schemas/settings/resourceLanguage",m=r.B.as(a.I.JSONContribution),_=new RegExp("\\[.*\\]$");function v(e){return e.substring(1,e.length-1)}const b=new class{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new o.Q5,this._onDidUpdateConfiguration=new o.Q5,this.defaultValues={},this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:n.N("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting",allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.excludedConfigurationProperties={},m.registerSchema(p,this.resourceLanguageSettingsSchema)}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const i=[];e.forEach((e=>{i.push(...this.validateAndRegisterProperties(e,t,e.extensionInfo)),this.configurationContributors.push(e),this.registerJSONConfiguration(e)})),m.registerSchema(p,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(i)}registerOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}validateAndRegisterProperties(e,t=!0,i,n=3){var o;n=s.Jp(e.scope)?n:e.scope;let r=[],a=e.properties;if(a)for(let e in a){if(t&&y(e)){delete a[e];continue}const l=a[e];this.updatePropertyDefaultValue(e,l),_.test(e)?l.scope=void 0:(l.scope=s.Jp(l.scope)?n:l.scope,l.restricted=s.Jp(l.restricted)?!!(null===(o=null==i?void 0:i.restrictedConfigurations)||void 0===o?void 0:o.includes(e)):l.restricted),!a[e].hasOwnProperty("included")||a[e].included?(this.configurationProperties[e]=a[e],!a[e].deprecationMessage&&a[e].markdownDeprecationMessage&&(a[e].deprecationMessage=a[e].markdownDeprecationMessage),r.push(e)):(this.excludedConfigurationProperties[e]=a[e],delete a[e])}let l=e.allOf;if(l)for(let e of l)r.push(...this.validateAndRegisterProperties(e,t,i,n));return r}getConfigurationProperties(){return this.configurationProperties}registerJSONConfiguration(e){const t=e=>{let i=e.properties;if(i)for(const e in i)this.updateSchema(e,i[e]);let n=e.allOf;n&&n.forEach(t)};t(e)}updateSchema(e,t){switch(c.properties[e]=t,t.scope){case 1:u.properties[e]=t;break;case 2:h.properties[e]=t;break;case 6:d.properties[e]=t;break;case 3:g.properties[e]=t;break;case 4:f.properties[e]=t;break;case 5:f.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,i={type:"object",description:n.N("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:n.N("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:p};this.updatePropertyDefaultValue(t,i),c.properties[t]=i,u.properties[t]=i,h.properties[t]=i,d.properties[t]=i,g.properties[t]=i,f.properties[t]=i}this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){let i=this.defaultValues[e];s.o8(i)&&(i=t.default),s.o8(i)&&(i=function(e){switch(Array.isArray(e)?e[0]:e){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}(t.type)),t.default=i}};function y(e){return e.trim()?_.test(e)?n.N("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==b.getConfigurationProperties()[e]?n.N("config.property.duplicate","Cannot register '{0}'. This property is already registered.",e):null:n.N("config.property.empty","Cannot register an empty property")}r.B.add(l.Configuration,b)},8819:(e,t,i)=>{"use strict";i.d(t,{Ao:()=>c,uy:()=>L,i6:()=>N,Eq:()=>E});var n=i(7295),o=i(2065),r=i(1432);let s=r.WE||"";const a=new Map;a.set("false",!1),a.set("true",!0),a.set("isMac",r.dz),a.set("isLinux",r.IJ),a.set("isWindows",r.ED),a.set("isWeb",r.$L),a.set("isMacNative",r.dz&&!r.$L),a.set("isEdge",s.indexOf("Edg/")>=0),a.set("isFirefox",s.indexOf("Firefox")>=0),a.set("isChrome",s.indexOf("Chrome")>=0),a.set("isSafari",s.indexOf("Safari")>=0);const l=Object.prototype.hasOwnProperty;class c{static has(e){return g.create(e)}static equals(e,t){return f.create(e,t)}static regex(e,t){return S.create(e,t)}static not(e){return v.create(e)}static and(...e){return k.create(e)}static or(...e){return D.create(e)}static deserialize(e,t=!1){if(e)return this._deserializeOrExpression(e,t)}static _deserializeOrExpression(e,t){let i=e.split("||");return D.create(i.map((e=>this._deserializeAndExpression(e,t))))}static _deserializeAndExpression(e,t){let i=e.split("&&");return k.create(i.map((e=>this._deserializeOne(e,t))))}static _deserializeOne(e,t){if((e=e.trim()).indexOf("!=")>=0){let i=e.split("!=");return _.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf("==")>=0){let i=e.split("==");return f.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf("=~")>=0){let i=e.split("=~");return S.create(i[0].trim(),this._deserializeRegexValue(i[1],t))}if(e.indexOf(" in ")>=0){let t=e.split(" in ");return p.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(e)){const t=e.split(">=");return y.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(e)){const t=e.split(">");return b.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(e)){const t=e.split("<=");return C.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(e)){const t=e.split("<");return w.create(t[0].trim(),t[1].trim())}return/^\!\s*/.test(e)?v.create(e.substr(1).trim()):g.create(e)}static _deserializeValue(e,t){if("true"===(e=e.trim()))return!0;if("false"===e)return!1;let i=/^'([^']*)'$/.exec(e);return i?i[1].trim():e}static _deserializeRegexValue(e,t){if((0,n.m5)(e)){if(t)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let i=e.indexOf("/"),o=e.lastIndexOf("/");if(i===o||i<0){if(t)throw new Error(`bad regexp-value '${e}', missing /-enclosure`);return console.warn(`bad regexp-value '${e}', missing /-enclosure`),null}let r=e.slice(i+1,o),s="i"===e[o+1]?"i":"";try{return new RegExp(r,s)}catch(i){if(t)throw new Error(`bad regexp-value '${e}', parse error: ${i}`);return console.warn(`bad regexp-value '${e}', parse error: ${i}`),null}}}function u(e,t){return e.cmp(t)}class h{constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return d.INSTANCE}}h.INSTANCE=new h;class d{constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return h.INSTANCE}}d.INSTANCE=new d;class g{constructor(e){this.key=e,this.type=2}static create(e){const t=a.get(e);return"boolean"==typeof t?t?d.INSTANCE:h.INSTANCE:new g(e)}cmp(e){return e.type!==this.type?this.type-e.type:A(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return v.create(this.key)}}class f{constructor(e,t){this.key=e,this.value=t,this.type=4}static create(e,t){if("boolean"==typeof t)return t?g.create(e):v.create(e);const i=a.get(e);return"boolean"==typeof i?t===(i?"true":"false")?d.INSTANCE:h.INSTANCE:new f(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:M(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return _.create(this.key,this.value)}}class p{constructor(e,t){this.key=e,this.valueKey=t,this.type=10}static create(e,t){return new p(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:M(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type&&this.key===e.key&&this.valueKey===e.valueKey}evaluate(e){const t=e.getValue(this.valueKey),i=e.getValue(this.key);return Array.isArray(t)?t.indexOf(i)>=0:"string"==typeof i&&"object"==typeof t&&null!==t&&l.call(t,i)}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return m.create(this)}}class m{constructor(e){this._actual=e,this.type=11}static create(e){return new m(e)}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class _{constructor(e,t){this.key=e,this.value=t,this.type=5}static create(e,t){if("boolean"==typeof t)return t?v.create(e):g.create(e);const i=a.get(e);return"boolean"==typeof i?t===(i?"true":"false")?h.INSTANCE:d.INSTANCE:new _(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:M(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return f.create(this.key,this.value)}}class v{constructor(e){this.key=e,this.type=3}static create(e){const t=a.get(e);return"boolean"==typeof t?t?h.INSTANCE:d.INSTANCE:new v(e)}cmp(e){return e.type!==this.type?this.type-e.type:A(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return g.create(this.key)}}class b{constructor(e,t){this.key=e,this.value=t,this.type=12}static create(e,t){return new b(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:M(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}evaluate(e){return parseFloat(e.getValue(this.key))>parseFloat(this.value)}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return C.create(this.key,this.value)}}class y{constructor(e,t){this.key=e,this.value=t,this.type=13}static create(e,t){return new y(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:M(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}evaluate(e){return parseFloat(e.getValue(this.key))>=parseFloat(this.value)}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return w.create(this.key,this.value)}}class w{constructor(e,t){this.key=e,this.value=t,this.type=14}static create(e,t){return new w(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:M(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}evaluate(e){return parseFloat(e.getValue(this.key))e.key)return 1;const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return ti?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return this.key===e.key&&t===i}return!1}evaluate(e){let t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return x.create(this)}}class x{constructor(e){this._actual=e,this.type=8}static create(e){return new x(e)}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class k{constructor(e){this.expr=e,this.type=6}static create(e){return k._normalizeArr(e)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,i=this.expr.length;t1;){const e=t[t.length-1];if(9!==e.type)break;t.pop();const i=t.pop(),n=D.create(e.expr.map((e=>k.create([e,i]))));n&&(t.push(n),t.sort(u))}return 1===t.length?t[0]:new k(t)}}serialize(){return this.expr.map((e=>e.serialize())).join(" && ")}keys(){const e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){let e=[];for(let t of this.expr)e.push(t.negate());return D.create(e)}}class D{constructor(e){this.expr=e,this.type=9}static create(e){const t=D._normalizeArr(e);if(0!==t.length)return 1===t.length?t[0]:new D(t)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,i=this.expr.length;te.serialize())).join(" || ")}keys(){const e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){let e=[];for(let t of this.expr)e.push(t.negate());const t=e=>9===e.type?e.expr:[e];for(;e.length>1;){const i=e.shift(),n=e.shift(),o=[];for(const e of t(i))for(const i of t(n))o.push(c.and(e,i));e.unshift(c.or(...o))}return e[0]}}class L extends g{constructor(e,t,i){super(e),this._defaultValue=t,"object"==typeof i?L._info.push(Object.assign(Object.assign({},i),{key:e})):!0!==i&&L._info.push({key:e,description:i,type:null!=t?typeof t:void 0})}static all(){return L._info.values()}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return c.not(this.key)}isEqualTo(e){return c.equals(this.key,e)}}L._info=[];const N=(0,o.yh)("contextKeyService"),E="setContext";function A(e,t){return et?1:0}function M(e,t,i,n){return ei?1:tn?1:0}},9282:(e,t,i)=>{"use strict";i.d(t,{c:()=>s,d:()=>a});var n=i(3580),o=i(8819),r=i(1432);const s=new o.uy("isWindows",r.ED,(0,n.N)("isWindows","Whether the operating system is Windows")),a="inputFocus"},5606:(e,t,i)=>{"use strict";i.d(t,{u:()=>o,i:()=>r});var n=i(2065);const o=(0,n.yh)("contextViewService"),r=(0,n.yh)("contextMenuService")},8820:(e,t,i)=>{"use strict";i.d(t,{S:()=>n});const n=(0,i(2065).yh)("dialogService")},7108:(e,t,i)=>{"use strict";i.d(t,{M:()=>n});class n{constructor(e,t=[],i=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=i}}},5026:(e,t,i)=>{"use strict";i.d(t,{z:()=>r,d:()=>s});var n=i(7108);const o=[];function r(e,t,i){t instanceof n.M||(t=new n.M(t,[],i)),o.push([e,t])}function s(){return o}},2065:(e,t,i)=>{"use strict";var n;i.d(t,{I8:()=>n,TG:()=>o,yh:()=>s,jt:()=>a}),function(e){e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(t){return t[e.DI_DEPENDENCIES]||[]}}(n||(n={}));const o=s("instantiationService");function r(e,t,i,o){t[n.DI_TARGET]===t?t[n.DI_DEPENDENCIES].push({id:e,index:i,optional:o}):(t[n.DI_DEPENDENCIES]=[{id:e,index:i,optional:o}],t[n.DI_TARGET]=t)}function s(e){if(n.serviceIds.has(e))return n.serviceIds.get(e);const t=function(e,i,n){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");r(t,e,n,!1)};return t.toString=()=>e,n.serviceIds.set(e,t),t}function a(e){return function(t,i,n){if(3!==arguments.length)throw new Error("@optional-decorator can only be used to decorate a parameter");r(e,t,n,!0)}}},972:(e,t,i)=>{"use strict";i.d(t,{y:()=>n});class n{constructor(...e){this._entries=new Map;for(let[t,i]of e)this.set(t,i)}set(e,t){const i=this._entries.get(e);return this._entries.set(e,t),i}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}}},1294:(e,t,i)=>{"use strict";i.d(t,{I:()=>r});var n=i(9872),o=i(4669);const r={JSONContribution:"base.contributions.json"},s=new class{constructor(){this._onDidChangeSchema=new o.Q5,this.schemasById={}}registerSchema(e,t){var i;this.schemasById[(i=e,i.length>0&&"#"===i.charAt(i.length-1)?i.substring(0,i.length-1):i)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}};n.B.add(r.JSONContribution,s)},1847:(e,t,i)=>{"use strict";i.d(t,{d:()=>n});const n=(0,i(2065).yh)("keybindingService")},9989:(e,t,i)=>{"use strict";i.d(t,{W:()=>l});var n=i(2258),o=i(1432),r=i(4565),s=i(9872);class a{constructor(){this._coreKeybindings=[],this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(1===o.OS){if(e&&e.win)return e.win}else if(2===o.OS){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){const t=a.bindToCurrentPlatform(e);if(t&&t.primary){const i=(0,n.gm)(t.primary,o.OS);i&&this._registerDefaultKeybinding(i,e.id,e.args,e.weight,0,e.when)}if(t&&Array.isArray(t.secondary))for(let i=0,r=t.secondary.length;i=21&&e<=30||e>=31&&e<=56||80===e||81===e||82===e||83===e||84===e||85===e||86===e||110===e||111===e||87===e||88===e||89===e||90===e||91===e||92===e}_assertNoCtrlAlt(e,t){e.ctrlKey&&e.altKey&&!e.metaKey&&a._mightProduceChar(e.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",e," for ",t)}_registerDefaultKeybinding(e,t,i,n,r,s){1===o.OS&&this._assertNoCtrlAlt(e.parts[0],t),this._coreKeybindings.push({keybinding:e,command:t,commandArgs:i,when:s,weight1:n,weight2:r,extensionId:null,isBuiltinExtension:!1}),this._cachedMergedKeybindings=null}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=[].concat(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(c)),this._cachedMergedKeybindings.slice(0)}}const l=new a;function c(e,t){return e.weight1!==t.weight1?e.weight1-t.weight1:e.commandt.command?1:e.weight2-t.weight2}s.B.add("platform.keybindingsRegistry",l)},4349:(e,t,i)=>{"use strict";i.d(t,{e:()=>n});const n=(0,i(2065).yh)("labelService")},343:(e,t,i)=>{"use strict";i.d(t,{Lw:()=>je,XN:()=>qe,ls:()=>Nt,ev:()=>_t,CQ:()=>Ye});var n=i(5321),o=i(5976),r=i(9488),s=i(3799),a=i(4669),l=i(1050);class c{constructor(e,t){this.renderer=e,this.modelProvider=t}get templateId(){return this.renderer.templateId}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:o.JT.None}}renderElement(e,t,i,n){if(i.disposable&&i.disposable.dispose(),!i.data)return;const o=this.modelProvider();if(o.isResolved(e))return this.renderer.renderElement(o.get(e),e,i.data,n);const r=new l.A,s=o.resolve(e,r.token);i.disposable={dispose:()=>r.cancel()},this.renderer.renderPlaceholder(e,i.data),s.then((t=>this.renderer.renderElement(t,e,i.data,n)))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class u{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}}var h,d=i(3580),g=i(3108),f=i(3193),p=i(8819),m=i(2065),_=i(1847),v=i(9872),b=i(8810),y=i(7781),w=i(9282),C=i(3725),S=i(9069);!function(e){e[e.Unknown=0]="Unknown",e[e.Twistie=1]="Twistie",e[e.Element=2]="Element"}(h||(h={}));class x extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class k{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}var D=i(3547),L=i(5707),N=i(4850),E=i(5392),A=i(2484);function M(e){return"object"==typeof e&&"visibility"in e&&"data"in e}function I(e){switch(e){case!0:return 1;case!1:return 0;default:return e}}function T(e){return"boolean"==typeof e.collapsible}class R{constructor(e,t,i,n={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new a.E7,this._onDidChangeCollapseState=new a.Q5,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new a.Q5,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new a.Q5,this.onDidSplice=this._onDidSplice.event,this.collapseByDefault=void 0!==n.collapseByDefault&&n.collapseByDefault,this.filter=n.filter,this.autoExpandSingleChildren=void 0!==n.autoExpandSingleChildren&&n.autoExpandSingleChildren,this.root={parent:void 0,element:i,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,i=C.$.empty(),n={}){if(0===e.length)throw new x(this.user,"Invalid tree location");n.diffIdentityProvider?this.spliceSmart(n.diffIdentityProvider,e,t,i,n):this.spliceSimple(e,t,i,n)}spliceSmart(e,t,i,n,o,r){var s;void 0===n&&(n=C.$.empty()),void 0===r&&(r=null!==(s=o.diffDepth)&&void 0!==s?s:0);const{parentNode:a}=this.getParentNodeWithListIndex(t),l=[...n],c=t[t.length-1],u=new A.Hs({getElements:()=>a.children.map((t=>e.getId(t.element).toString()))},{getElements:()=>[...a.children.slice(0,c),...l,...a.children.slice(c+i)].map((t=>e.getId(t.element).toString()))}).ComputeDiff(!1);if(u.quitEarly)return this.spliceSimple(t,i,l,o);const h=t.slice(0,-1),d=(t,i,n)=>{if(r>0)for(let s=0;st.originalStart-e.originalStart)))d(g,f,g-(e.originalStart+e.originalLength)),g=e.originalStart,f=e.modifiedStart-c,this.spliceSimple([...h,g],e.originalLength,C.$.slice(l,f,f+e.modifiedLength),o);d(g,f,g)}spliceSimple(e,t,i=C.$.empty(),{onDidCreateNode:n,onDidDeleteNode:o}){const{parentNode:r,listIndex:s,revealed:a,visible:l}=this.getParentNodeWithListIndex(e),c=[],u=C.$.map(i,(e=>this.createTreeNode(e,r,r.visible?1:0,a,c,n))),h=e[e.length-1],d=r.children.length>0;let g=0;for(let e=h;e>=0&&ee+(t.visible?t.renderNodeCount:0)),0);this._updateAncestorsRenderNodeCount(r,m-e),this.list.splice(s,e,c)}if(_.length>0&&o){const e=t=>{o(t),t.children.forEach(e)};_.forEach(e)}const b=r.children.length>0;d!==b&&this.setCollapsible(e.slice(0,-1),b),this._onDidSplice.fire({insertedNodes:f,deletedNodes:_});let y=r;for(;y;){if(2===y.visibility){this.refilter();break}y=y.parent}}rerender(e){if(0===e.length)throw new x(this.user,"Invalid tree location");const{node:t,listIndex:i,revealed:n}=this.getTreeNodeWithListIndex(e);t.visible&&n&&this.list.splice(i,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:t,visible:i,revealed:n}=this.getTreeNodeWithListIndex(e);return i&&n?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){const i=this.getTreeNode(e);void 0===t&&(t=!i.collapsible);const n={collapsible:t};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,n)))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,i){const n=this.getTreeNode(e);void 0===t&&(t=!n.collapsed);const o={collapsed:t,recursive:i||!1};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,o)))}_setCollapseState(e,t){const{node:i,listIndex:n,revealed:o}=this.getTreeNodeWithListIndex(e),r=this._setListNodeCollapseState(i,n,o,t);if(i!==this.root&&this.autoExpandSingleChildren&&r&&!T(t)&&i.collapsible&&!i.collapsed&&!t.recursive){let n=-1;for(let e=0;e-1){n=-1;break}n=e}n>-1&&this._setCollapseState([...e,n],t)}return r}_setListNodeCollapseState(e,t,i,n){const o=this._setNodeCollapseState(e,n,!1);if(!i||!e.visible||!o)return o;const r=e.renderNodeCount,s=this.updateNodeAfterCollapseChange(e),a=r-(-1===t?0:1);return this.list.splice(t+1,a,s.slice(1)),o}_setNodeCollapseState(e,t,i){let n;if(e===this.root?n=!1:(T(t)?(n=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(n=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):n=!1,n&&this._onDidChangeCollapseState.fire({node:e,deep:i})),!T(t)&&t.recursive)for(const i of e.children)n=this._setNodeCollapseState(i,t,!0)||n;return n}expandTo(e){this.eventBufferer.bufferEvents((()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})}))}refilter(){const e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t)}createTreeNode(e,t,i,n,o,r){const s={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:"boolean"==typeof e.collapsible?e.collapsible:void 0!==e.collapsed,collapsed:void 0===e.collapsed?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},a=this._filterNode(s,i);s.visibility=a,n&&o.push(s);const l=e.children||C.$.empty(),c=n&&0!==a&&!s.collapsed,u=C.$.map(l,(e=>this.createTreeNode(e,s,a,c,o,r)));let h=0,d=1;for(const e of u)s.children.push(e),d+=e.renderNodeCount,e.visible&&(e.visibleChildIndex=h++);return s.collapsible=s.collapsible||s.children.length>0,s.visibleChildrenCount=h,s.visible=2===a?h>0:1===a,s.visible?s.collapsed||(s.renderNodeCount=d):(s.renderNodeCount=0,n&&o.pop()),r&&r(s),s}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(e,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterCollapseChange(e,t){if(!1===e.visible)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(const i of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(i,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterFilterChange(e,t,i,n=!0){let o;if(e!==this.root){if(o=this._filterNode(e,t),0===o)return e.visible=!1,e.renderNodeCount=0,!1;n&&i.push(e)}const r=i.length;e.renderNodeCount=e===this.root?0:1;let s=!1;if(e.collapsed&&0===o)e.visibleChildrenCount=0;else{let t=0;for(const r of e.children)s=this._updateNodeAfterFilterChange(r,o,i,n&&!e.collapsed)||s,r.visible&&(r.visibleChildIndex=t++);e.visibleChildrenCount=t}return e!==this.root&&(e.visible=2===o?s:1===o),e.visible?e.collapsed||(e.renderNodeCount+=i.length-r):(e.renderNodeCount=0,n&&i.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(0!==t)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){const i=this.filter?this.filter.filter(e.element,t):1;return"boolean"==typeof i?(e.filterData=void 0,i?1:0):M(i)?(e.filterData=i.data,I(i.visibility)):(e.filterData=void 0,I(i))}hasTreeNode(e,t=this.root){if(!e||0===e.length)return!0;const[i,...n]=e;return!(i<0||i>t.children.length)&&this.hasTreeNode(n,t.children[i])}getTreeNode(e,t=this.root){if(!e||0===e.length)return t;const[i,...n]=e;if(i<0||i>t.children.length)throw new x(this.user,"Invalid tree location");return this.getTreeNode(n,t.children[i])}getTreeNodeWithListIndex(e){if(0===e.length)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:t,listIndex:i,revealed:n,visible:o}=this.getParentNodeWithListIndex(e),r=e[e.length-1];if(r<0||r>t.children.length)throw new x(this.user,"Invalid tree location");const s=t.children[r];return{node:s,listIndex:i,revealed:n,visible:o&&s.visible}}getParentNodeWithListIndex(e,t=this.root,i=0,n=!0,o=!0){const[r,...s]=e;if(r<0||r>t.children.length)throw new x(this.user,"Invalid tree location");for(let e=0;ee.element))),this.data=e}}function q(e){return e instanceof L.kX?new j(e):e}class K{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=o.JT.None}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(q(e),t)}onDragOver(e,t,i,n,o=!0){const s=this.dnd.onDragOver(q(e),t&&t.element,i,n),a=this.autoExpandNode!==t;if(a&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),void 0===t)return s;if(a&&"boolean"!=typeof s&&s.autoExpand&&(this.autoExpandDisposable=(0,O.Vg)((()=>{const e=this.modelProvider(),i=e.getNodeLocation(t);e.isCollapsed(i)&&e.setCollapsed(i,!1),this.autoExpandNode=void 0}),500)),"boolean"==typeof s||!s.accept||void 0===s.bubble||s.feedback)return o?s:{accept:"boolean"==typeof s?s:s.accept,effect:"boolean"==typeof s?void 0:s.effect,feedback:[i]};if(1===s.bubble){const i=this.modelProvider(),o=i.getNodeLocation(t),r=i.getParentNodeLocation(o),s=i.getNode(r),a=r&&i.getListIndex(r);return this.onDragOver(e,s,a,n,!1)}const l=this.modelProvider(),c=l.getNodeLocation(t),u=l.getListIndex(c),h=l.getListRenderCount(c);return Object.assign(Object.assign({},s),{feedback:(0,r.w6)(u,u+h)})}drop(e,t,i,n){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(q(e),t&&t.element,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}class G{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){this.delegate.setDynamicHeight&&this.delegate.setDynamicHeight(e.element,t)}}var Y;!function(e){e.None="none",e.OnHover="onHover",e.Always="always"}(Y||(Y={}));class Z{constructor(e,t=[]){this._elements=t,this.onDidChange=a.ju.forEach(e,(e=>this._elements=e))}get elements(){return this._elements}}class X{constructor(e,t,i,n,r={}){this.renderer=e,this.modelProvider=t,this.activeNodes=n,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=X.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new B.r,this.activeIndentNodes=new Set,this.indentGuidesDisposable=o.JT.None,this.disposables=new o.SL,this.templateId=e.templateId,this.updateOptions(r),a.ju.map(i,(e=>e.node))(this.onDidChangeNodeTwistieState,this,this.disposables),e.onDidChangeTwistieState&&e.onDidChangeTwistieState(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(void 0!==e.indent&&(this.indent=(0,P.u)(e.indent,0,40)),void 0!==e.renderIndentGuides){const t=e.renderIndentGuides!==Y.None;if(t!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=t,this.indentGuidesDisposable.dispose(),t)){const e=new o.SL;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,e),this.indentGuidesDisposable=e,this._onDidChangeActiveNodes(this.activeNodes.elements)}}void 0!==e.hideTwistiesOfChildlessElements&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=(0,n.R3)(e,(0,n.$)(".monaco-tl-row")),i=(0,n.R3)(t,(0,n.$)(".monaco-tl-indent")),r=(0,n.R3)(t,(0,n.$)(".monaco-tl-twistie")),s=(0,n.R3)(t,(0,n.$)(".monaco-tl-contents")),a=this.renderer.renderTemplate(s);return{container:e,indent:i,twistie:r,indentGuidesDisposable:o.JT.None,templateData:a}}renderElement(e,t,i,n){"number"==typeof n&&(this.renderedNodes.set(e,{templateData:i,height:n}),this.renderedElements.set(e.element,e));const o=X.DefaultIndent+(e.depth-1)*this.indent;i.twistie.style.paddingLeft=`${o}px`,i.indent.style.width=o+this.indent-16+"px",this.renderTwistie(e,i),"number"==typeof n&&this.renderIndentGuides(e,i),this.renderer.renderElement(e,t,i.templateData,n)}disposeElement(e,t,i,n){i.indentGuidesDisposable.dispose(),this.renderer.disposeElement&&this.renderer.disposeElement(e,t,i.templateData,n),"number"==typeof n&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){const t=this.renderedNodes.get(e);t&&(this.renderTwistie(e,t.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(e,t.templateData))}renderTwistie(e,t){t.twistie.classList.remove(...W.classNamesArray);let i=!1;this.renderer.renderTwistie&&(i=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(i||t.twistie.classList.add(...W.classNamesArray),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded")}renderIndentGuides(e,t){if((0,n.PO)(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const i=new o.SL,r=this.modelProvider();let s=e;for(;;){const e=r.getNodeLocation(s),a=r.getParentNodeLocation(e);if(!a)break;const l=r.getNode(a),c=(0,n.$)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(l)&&c.classList.add("active"),0===t.indent.childElementCount?t.indent.appendChild(c):t.indent.insertBefore(c,t.indent.firstElementChild),this.renderedIndentGuides.add(l,c),i.add((0,o.OF)((()=>this.renderedIndentGuides.delete(l,c)))),s=l}t.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,i=this.modelProvider();e.forEach((e=>{const n=i.getNodeLocation(e);try{const o=i.getParentNodeLocation(n);e.collapsible&&e.children.length>0&&!e.collapsed?t.add(e):o&&t.add(i.getNode(o))}catch(e){}})),this.activeIndentNodes.forEach((e=>{t.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.remove("active")))})),t.forEach((e=>{this.activeIndentNodes.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.add("active")))})),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),(0,o.B9)(this.disposables)}}X.DefaultIndent=8;class Q{constructor(e,t,i){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=i,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new o.SL,e.onWillRefilter(this.reset,this,this.disposables)}get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set pattern(e){this._pattern=e,this._lowercasePattern=e.toLowerCase()}filter(e,t){if(this._filter){const i=this._filter.filter(e,t);if(this.tree.options.simpleKeyboardNavigation)return i;let n;if(n="boolean"==typeof i?i?1:0:M(i)?I(i.visibility):i,0===n)return!1}if(this._totalCount++,this.tree.options.simpleKeyboardNavigation||!this._pattern)return this._matchCount++,{data:E.CL.Default,visibility:!0};const i=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),n=Array.isArray(i)?i:[i];for(const e of n){const t=e&&e.toString();if(void 0===t)return{data:E.CL.Default,visibility:!0};const i=(0,E.EW)(this._pattern,this._lowercasePattern,0,t,t.toLowerCase(),0,!0);if(i)return this._matchCount++,1===n.length?{data:i,visibility:!0}:{data:{label:t,score:i},visibility:!0}}return this.tree.options.filterOnType?2:{data:E.CL.Default,visibility:!0}}reset(){this._totalCount=0,this._matchCount=0}dispose(){(0,o.B9)(this.disposables)}}class J{constructor(e,t,i,r,s){this.tree=e,this.view=i,this.filter=r,this.keyboardNavigationDelegate=s,this._enabled=!1,this._pattern="",this._empty=!1,this._onDidChangeEmptyState=new a.Q5,this.positionClassName="ne",this.automaticKeyboardNavigation=!0,this.triggered=!1,this._onDidChangePattern=new a.Q5,this.enabledDisposables=new o.SL,this.disposables=new o.SL,this.domNode=(0,n.$)(`.monaco-list-type-filter.${this.positionClassName}`),this.domNode.draggable=!0,(0,N.jt)(this.domNode,"dragstart")(this.onDragStart,this,this.disposables),this.messageDomNode=(0,n.R3)(i.getHTMLElement(),(0,n.$)(".monaco-list-type-filter-message")),this.labelDomNode=(0,n.R3)(this.domNode,(0,n.$)("span.label"));const l=(0,n.R3)(this.domNode,(0,n.$)(".controls"));this._filterOnType=!!e.options.filterOnType,this.filterOnTypeDomNode=(0,n.R3)(l,(0,n.$)("input.filter")),this.filterOnTypeDomNode.type="checkbox",this.filterOnTypeDomNode.checked=this._filterOnType,this.filterOnTypeDomNode.tabIndex=-1,this.updateFilterOnTypeTitleAndIcon(),(0,N.jt)(this.filterOnTypeDomNode,"input")(this.onDidChangeFilterOnType,this,this.disposables),this.clearDomNode=(0,n.R3)(l,(0,n.$)("button.clear"+$.cssSelector)),this.clearDomNode.tabIndex=-1,this.clearDomNode.title=(0,d.N)("clear","Clear"),this.keyboardNavigationEventFilter=e.options.keyboardNavigationEventFilter,t.onDidSplice(this.onDidSpliceModel,this,this.disposables),this.updateOptions(e.options)}get enabled(){return this._enabled}get pattern(){return this._pattern}get filterOnType(){return this._filterOnType}updateOptions(e){e.simpleKeyboardNavigation?this.disable():this.enable(),void 0!==e.filterOnType&&(this._filterOnType=!!e.filterOnType,this.filterOnTypeDomNode.checked=this._filterOnType,this.updateFilterOnTypeTitleAndIcon()),void 0!==e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation),this.tree.refilter(),this.render(),this.automaticKeyboardNavigation||this.onEventOrInput("")}enable(){if(this._enabled)return;const e=a.ju.chain((0,N.jt)(this.view.getHTMLElement(),"keydown")).filter((e=>!(0,s.cK)(e.target)||e.target===this.filterOnTypeDomNode)).filter((e=>"Dead"!==e.key&&!/^Media/.test(e.key))).map((e=>new S.y(e))).filter(this.keyboardNavigationEventFilter||(()=>!0)).filter((()=>this.automaticKeyboardNavigation||this.triggered)).filter((e=>this.keyboardNavigationDelegate.mightProducePrintableCharacter(e)&&!(18===e.keyCode||16===e.keyCode||15===e.keyCode||17===e.keyCode)||(this.pattern.length>0||this.triggered)&&(9===e.keyCode||1===e.keyCode)&&!e.altKey&&!e.ctrlKey&&!e.metaKey||1===e.keyCode&&(F.dz?e.altKey&&!e.metaKey:e.ctrlKey)&&!e.shiftKey)).forEach((e=>{e.stopPropagation(),e.preventDefault()})).event,t=(0,N.jt)(this.clearDomNode,"click");a.ju.chain(a.ju.any(e,t)).event(this.onEventOrInput,this,this.enabledDisposables),this.filter.pattern="",this.tree.refilter(),this.render(),this._enabled=!0,this.triggered=!1}disable(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.clear(),this.tree.refilter(),this.render(),this._enabled=!1,this.triggered=!1)}onEventOrInput(e){"string"==typeof e?this.onInput(e):e instanceof MouseEvent||9===e.keyCode||1===e.keyCode&&(F.dz?e.altKey:e.ctrlKey)?this.onInput(""):1===e.keyCode?this.onInput(0===this.pattern.length?"":this.pattern.substr(0,this.pattern.length-1)):this.onInput(this.pattern+e.browserEvent.key)}onInput(e){const t=this.view.getHTMLElement();e&&!this.domNode.parentElement?t.append(this.domNode):!e&&this.domNode.parentElement&&(this.domNode.remove(),this.tree.domFocus()),this._pattern=e,this._onDidChangePattern.fire(e),this.filter.pattern=e,this.tree.refilter(),e&&this.tree.focusNext(0,!0,void 0,(e=>!E.CL.isDefault(e.filterData)));const i=this.tree.getFocus();if(i.length>0){const e=i[0];null===this.tree.getRelativeTop(e)&&this.tree.reveal(e,.5)}this.render(),e||(this.triggered=!1)}onDragStart(){const e=this.view.getHTMLElement(),{left:t}=(0,n.i)(e),i=e.clientWidth,r=i/2,s=this.domNode.clientWidth,a=new o.SL;let l=this.positionClassName;const c=()=>{switch(l){case"nw":this.domNode.style.top="4px",this.domNode.style.left="4px";break;case"ne":this.domNode.style.top="4px",this.domNode.style.left=i-s-6+"px"}};c(),this.domNode.classList.remove(l),this.domNode.classList.add("dragging"),a.add((0,o.OF)((()=>this.domNode.classList.remove("dragging")))),(0,N.jt)(document,"dragover")((e=>{e.preventDefault();const i=e.clientX-t;e.dataTransfer&&(e.dataTransfer.dropEffect="none"),l=i{this.positionClassName=l,this.domNode.className=`monaco-list-type-filter ${this.positionClassName}`,this.domNode.style.top="",this.domNode.style.left="",(0,o.B9)(a)}),null,a),D.P$.CurrentDragAndDropData=new D.TN("vscode-ui"),a.add((0,o.OF)((()=>D.P$.CurrentDragAndDropData=void 0)))}onDidSpliceModel(){this._enabled&&0!==this.pattern.length&&(this.tree.refilter(),this.render())}onDidChangeFilterOnType(){this.tree.updateOptions({filterOnType:this.filterOnTypeDomNode.checked}),this.tree.refilter(),this.tree.domFocus(),this.render(),this.updateFilterOnTypeTitleAndIcon()}updateFilterOnTypeTitleAndIcon(){this.filterOnType?(this.filterOnTypeDomNode.classList.remove(...H.classNamesArray),this.filterOnTypeDomNode.classList.add(...V.classNamesArray),this.filterOnTypeDomNode.title=(0,d.N)("disable filter on type","Disable Filter on Type")):(this.filterOnTypeDomNode.classList.remove(...V.classNamesArray),this.filterOnTypeDomNode.classList.add(...H.classNamesArray),this.filterOnTypeDomNode.title=(0,d.N)("enable filter on type","Enable Filter on Type"))}render(){const e=this.filter.totalCount>0&&0===this.filter.matchCount;this.pattern&&this.tree.options.filterOnType&&e?(this.messageDomNode.textContent=(0,d.N)("empty","No elements found"),this._empty=!0):(this.messageDomNode.innerText="",this._empty=!1),this.domNode.classList.toggle("no-matches",e),this.domNode.title=(0,d.N)("found","Matched {0} out of {1} elements",this.filter.matchCount,this.filter.totalCount),this.labelDomNode.textContent=this.pattern.length>16?"…"+this.pattern.substr(this.pattern.length-16):this.pattern,this._onDidChangeEmptyState.fire(this._empty)}shouldAllowFocus(e){return!(this.enabled&&this.pattern&&!this.filterOnType)||this.filter.totalCount>0&&this.filter.matchCount<=1||!E.CL.isDefault(e.filterData)}dispose(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.dispose(),this._enabled=!1,this.triggered=!1),this._onDidChangePattern.dispose(),(0,o.B9)(this.disposables)}}function ee(e){let t=h.Unknown;return(0,n.uU)(e.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?t=h.Twistie:(0,n.uU)(e.browserEvent.target,"monaco-tl-contents","monaco-tl-row")&&(t=h.Element),{browserEvent:e.browserEvent,element:e.element?e.element.element:null,target:t}}function te(e,t){t(e),e.children.forEach((e=>te(e,t)))}class ie{constructor(e){this.identityProvider=e,this.nodes=[],this._onDidChange=new a.Q5,this.onDidChange=this._onDidChange.event}get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}set(e,t){var i;!(null===(i=t)||void 0===i?void 0:i.__forceEvent)&&(0,r.fS)(this.nodes,e)||this._set(e,!1,t)}_set(e,t,i){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){const e=this;this._onDidChange.fire({get elements(){return e.get()},browserEvent:i})}}get(){return this.elements||(this.elements=this.nodes.map((e=>e.element))),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){const e=this.createNodeSet(),i=t=>e.delete(t);return t.forEach((e=>te(e,i))),void this.set([...e.values()])}const i=new Set,n=e=>i.add(this.identityProvider.getId(e.element).toString());t.forEach((e=>te(e,n)));const o=new Map,r=e=>o.set(this.identityProvider.getId(e.element).toString(),e);e.forEach((e=>te(e,r)));const s=[];for(const e of this.nodes){const t=this.identityProvider.getId(e.element).toString();if(i.has(t)){const e=o.get(t);e&&s.push(e)}else s.push(e)}this._set(s,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class ne extends s.sx{constructor(e,t){super(e),this.tree=t}onViewPointer(e){if((0,s.cK)(e.browserEvent.target)||(0,s.hD)(e.browserEvent.target))return;const t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const i=e.browserEvent.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&e.browserEvent.offsetX<16;let o=!1;if(o="function"==typeof this.tree.expandOnlyOnTwistieClick?this.tree.expandOnlyOnTwistieClick(t.element):!!this.tree.expandOnlyOnTwistieClick,o&&!n&&2!==e.browserEvent.detail)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&2===e.browserEvent.detail)return super.onViewPointer(e);if(t.collapsible){const i=this.tree.model,r=i.getNodeLocation(t),s=e.browserEvent.altKey;if(this.tree.setFocus([r]),i.setCollapsed(r,void 0,s),o&&n)return}super.onViewPointer(e)}onDoubleClick(e){!e.browserEvent.target.classList.contains("monaco-tl-twistie")&&this.tree.expandOnDoubleClick&&super.onDoubleClick(e)}}class oe extends s.aV{constructor(e,t,i,n,o,r,s,a){super(e,t,i,n,a),this.focusTrait=o,this.selectionTrait=r,this.anchorTrait=s}createMouseController(e){return new ne(this,e.tree)}splice(e,t,i=[]){if(super.splice(e,t,i),0===i.length)return;const n=[],o=[];let s;i.forEach(((t,i)=>{this.focusTrait.has(t)&&n.push(e+i),this.selectionTrait.has(t)&&o.push(e+i),this.anchorTrait.has(t)&&(s=e+i)})),n.length>0&&super.setFocus((0,r.cU)([...super.getFocus(),...n])),o.length>0&&super.setSelection((0,r.cU)([...super.getSelection(),...o])),"number"==typeof s&&super.setAnchor(s)}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map((e=>this.element(e))),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map((e=>this.element(e))),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(void 0===e?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class re{constructor(e,t,i,r,l={}){this._options=l,this.eventBufferer=new a.E7,this.disposables=new o.SL,this._onWillRefilter=new a.Q5,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new a.Q5;const c=new G(i),u=new a.ZD,h=new a.ZD,d=new Z(h.event);this.renderers=r.map((e=>new X(e,(()=>this.model),u.event,d,l)));for(let e of this.renderers)this.disposables.add(e);let g;var f,p;l.keyboardNavigationLabelProvider&&(g=new Q(this,l.keyboardNavigationLabelProvider,l.filter),l=Object.assign(Object.assign({},l),{filter:g}),this.disposables.add(g)),this.focus=new ie(l.identityProvider),this.selection=new ie(l.identityProvider),this.anchor=new ie(l.identityProvider),this.view=new oe(e,t,c,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},(f=()=>this.model,(p=l)&&Object.assign(Object.assign({},p),{identityProvider:p.identityProvider&&{getId:e=>p.identityProvider.getId(e.element)},dnd:p.dnd&&new K(f,p.dnd),multipleSelectionController:p.multipleSelectionController&&{isSelectionSingleChangeEvent:e=>p.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element})),isSelectionRangeChangeEvent:e=>p.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},accessibilityProvider:p.accessibilityProvider&&Object.assign(Object.assign({},p.accessibilityProvider),{getSetSize(e){const t=f(),i=t.getNodeLocation(e),n=t.getParentNodeLocation(i);return t.getNode(n).visibleChildrenCount},getPosInSet:e=>e.visibleChildIndex+1,isChecked:p.accessibilityProvider&&p.accessibilityProvider.isChecked?e=>p.accessibilityProvider.isChecked(e.element):void 0,getRole:p.accessibilityProvider&&p.accessibilityProvider.getRole?e=>p.accessibilityProvider.getRole(e.element):()=>"treeitem",getAriaLabel:e=>p.accessibilityProvider.getAriaLabel(e.element),getWidgetAriaLabel:()=>p.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:p.accessibilityProvider&&p.accessibilityProvider.getWidgetRole?()=>p.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:p.accessibilityProvider&&p.accessibilityProvider.getAriaLevel?e=>p.accessibilityProvider.getAriaLevel(e.element):e=>e.depth,getActiveDescendantId:p.accessibilityProvider.getActiveDescendantId&&(e=>p.accessibilityProvider.getActiveDescendantId(e.element))}),keyboardNavigationLabelProvider:p.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},p.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:e=>p.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}),enableKeyboardNavigation:p.simpleKeyboardNavigation}))),{tree:this})),this.model=this.createModel(e,this.view,l),u.input=this.model.onDidChangeCollapseState;const m=a.ju.forEach(this.model.onDidSplice,(e=>{this.eventBufferer.bufferEvents((()=>{this.focus.onDidModelSplice(e),this.selection.onDidModelSplice(e)}))}));if(m((()=>null),null,this.disposables),h.input=a.ju.chain(a.ju.any(m,this.focus.onDidChange,this.selection.onDidChange)).debounce((()=>null),0).map((()=>{const e=new Set;for(const t of this.focus.getNodes())e.add(t);for(const t of this.selection.getNodes())e.add(t);return[...e.values()]})).event,!1!==l.keyboardSupport){const e=a.ju.chain(this.view.onKeyDown).filter((e=>!(0,s.cK)(e.target))).map((e=>new S.y(e)));e.filter((e=>15===e.keyCode)).on(this.onLeftArrow,this,this.disposables),e.filter((e=>17===e.keyCode)).on(this.onRightArrow,this,this.disposables),e.filter((e=>10===e.keyCode)).on(this.onSpace,this,this.disposables)}if(l.keyboardNavigationLabelProvider){const e=l.keyboardNavigationDelegate||s.WK;this.typeFilterController=new J(this,this.model,this.view,g,e),this.focusNavigationFilter=e=>this.typeFilterController.shouldAllowFocus(e),this.disposables.add(this.typeFilterController)}this.styleElement=(0,n.dS)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===Y.Always)}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return a.ju.map(this.view.onMouseDblClick,ee)}get onPointer(){return a.ju.map(this.view.onPointer,ee)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get expandOnDoubleClick(){return void 0===this._options.expandOnDoubleClick||this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return void 0===this._options.expandOnlyOnTwistieClick||this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}updateOptions(e={}){this._options=Object.assign(Object.assign({},this._options),e);for(const t of this.renderers)t.updateOptions(e);this.view.updateOptions({enableKeyboardNavigation:this._options.simpleKeyboardNavigation,automaticKeyboardNavigation:this._options.automaticKeyboardNavigation,smoothScrolling:this._options.smoothScrolling,horizontalScrolling:this._options.horizontalScrolling}),this.typeFilterController&&this.typeFilterController.updateOptions(this._options),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===Y.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}domFocus(){this.view.domFocus()}layout(e,t){this.view.layout(e,t)}style(e){const t=`.${this.view.domId}`,i=[];e.treeIndentGuidesStroke&&(i.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeIndentGuidesStroke.transparent(.4)}; }`),i.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=i.join("\n"),this.view.style(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){const i=e.map((e=>this.model.getNode(e)));this.selection.set(i,t);const n=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setSelection(n,t,!0)}getSelection(){return this.selection.get()}setFocus(e,t){const i=e.map((e=>this.model.getNode(e)));this.focus.set(i,t);const n=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setFocus(n,t,!0)}focusNext(e=1,t=!1,i,n=this.focusNavigationFilter){this.view.focusNext(e,t,i,n)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);-1!==i&&this.view.reveal(i,t)}getRelativeTop(e){const t=this.model.getListIndex(e);return-1===t?null:this.view.getRelativeTop(t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!0)){const e=this.model.getParentNodeLocation(n);if(!e)return;const t=this.model.getListIndex(e);this.view.reveal(t),this.view.setFocus([t])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!1)){if(!i.children.some((e=>e.visible)))return;const[e]=this.view.getFocus(),t=e+1;this.view.reveal(t),this.view.setFocus([t])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i),o=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,o)}dispose(){(0,o.B9)(this.disposables),this.view.dispose()}}class se{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new R(e,t,null,i),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,i.sorter&&(this.sorter={compare:(e,t)=>i.sorter.compare(e.element,t.element)}),this.identityProvider=i.identityProvider}setChildren(e,t=C.$.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=C.$.empty(),i){const n=new Set,o=new Set;this.model.splice([...e,0],Number.MAX_VALUE,t,Object.assign(Object.assign({},i),{onDidCreateNode:e=>{var t;if(null===e.element)return;const r=e;if(n.add(r.element),this.nodes.set(r.element,r),this.identityProvider){const e=this.identityProvider.getId(r.element).toString();o.add(e),this.nodesByIdentity.set(e,r)}null===(t=i.onDidCreateNode)||void 0===t||t.call(i,r)},onDidDeleteNode:e=>{var t;if(null===e.element)return;const r=e;if(n.has(r.element)||this.nodes.delete(r.element),this.identityProvider){const e=this.identityProvider.getId(r.element).toString();o.has(e)||this.nodesByIdentity.delete(e)}null===(t=i.onDidDeleteNode)||void 0===t||t.call(i,r)}}))}preserveCollapseState(e=C.$.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),C.$.map(e,(e=>{let t=this.nodes.get(e.element);if(!t&&this.identityProvider){const i=this.identityProvider.getId(e.element).toString();t=this.nodesByIdentity.get(i)}if(!t)return Object.assign(Object.assign({},e),{children:this.preserveCollapseState(e.children)});const i="boolean"==typeof e.collapsible?e.collapsible:t.collapsible,n=void 0!==e.collapsed?e.collapsed:t.collapsed;return Object.assign(Object.assign({},e),{collapsible:i,collapsed:n,children:this.preserveCollapseState(e.children)})}))}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getElementLocation(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getElementLocation(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(null===e)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new x(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(null===e)throw new x(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new x(this.user,`Tree element not found: ${e}`);const i=this.model.getNodeLocation(t),n=this.model.getParentNodeLocation(i);return this.model.getNode(n).element}getElementLocation(e){if(null===e)return[];const t=this.nodes.get(e);if(!t)throw new x(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function ae(e){return{element:{elements:[e.element],incompressible:e.incompressible||!1},children:C.$.map(C.$.from(e.children),ae),collapsible:e.collapsible,collapsed:e.collapsed}}function le(e){const t=[e.element],i=e.incompressible||!1;let n,o;for(;[o,n]=C.$.consume(C.$.from(e.children),2),1===o.length&&!o[0].incompressible;)e=o[0],t.push(e.element);return{element:{elements:t,incompressible:i},children:C.$.map(C.$.concat(o,n),le),collapsible:e.collapsible,collapsed:e.collapsed}}function ce(e,t=0){let i;return i=tce(e,0))),0===t&&e.element.incompressible?{element:e.element.elements[t],children:i,incompressible:!0,collapsible:e.collapsible,collapsed:e.collapsed}:{element:e.element.elements[t],children:i,collapsible:e.collapsible,collapsed:e.collapsed}}function ue(e){return ce(e,0)}function he(e,t,i){return e.element===t?Object.assign(Object.assign({},e),{children:i}):Object.assign(Object.assign({},e),{children:C.$.map(C.$.from(e.children),(e=>he(e,t,i)))})}class de{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new se(e,t,i),this.enabled=void 0===i.compressionEnabled||i.compressionEnabled,this.identityProvider=i.identityProvider}get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}setChildren(e,t=C.$.empty(),i){const n=i.diffIdentityProvider&&(o=i.diffIdentityProvider,{getId:e=>e.elements.map((e=>o.getId(e).toString())).join("\0")});var o;if(null===e){const e=C.$.map(t,this.enabled?le:ae);return void this._setChildren(null,e,{diffIdentityProvider:n,diffDepth:1/0})}const r=this.nodes.get(e);if(!r)throw new Error("Unknown compressed tree node");const s=this.model.getNode(r),a=this.model.getParentNodeLocation(r),l=this.model.getNode(a),c=he(ue(s),e,t),u=(this.enabled?le:ae)(c),h=l.children.map((e=>e===s?u:e));this._setChildren(l.element,h,{diffIdentityProvider:n,diffDepth:s.depth-l.depth})}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const t=this.model.getNode().children,i=C.$.map(t,ue),n=C.$.map(i,e?le:ae);this._setChildren(null,n,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,i){const n=new Set;this.model.setChildren(e,t,Object.assign(Object.assign({},i),{onDidCreateNode:e=>{for(const t of e.element.elements)n.add(t),this.nodes.set(t,e.element)},onDidDeleteNode:e=>{for(const t of e.element.elements)n.has(t)||this.nodes.delete(t)}}))}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(void 0===e)return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return null===t?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),i=this.model.getParentNodeLocation(t);return null===i?null:i.elements[i.elements.length-1]}isCollapsible(e){const t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getCompressedNode(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getCompressedNode(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){const t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(null===e)return null;const t=this.nodes.get(e);if(!t)throw new x(this.user,`Tree element not found: ${e}`);return t}}const ge=e=>e[e.length-1];class fe{constructor(e,t){this.unwrapper=e,this.node=t}get element(){return null===this.node.element?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map((e=>new fe(this.unwrapper,e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class pe{constructor(e,t,i={}){this.rootRef=null,this.elementMapper=i.elementMapper||ge;const n=e=>this.elementMapper(e.elements);this.nodeMapper=new k((e=>new fe(n,e))),this.model=new de(e,function(e,t){return{splice(i,n,o){t.splice(i,n,o.map((t=>e.map(t))))},updateElementHeight(e,i){t.updateElementHeight(e,i)}}}(this.nodeMapper,t),function(e,t){return Object.assign(Object.assign({},t),{identityProvider:t.identityProvider&&{getId:i=>t.identityProvider.getId(e(i))},sorter:t.sorter&&{compare:(e,i)=>t.sorter.compare(e.elements[0],i.elements[0])},filter:t.filter&&{filter:(i,n)=>t.filter.filter(e(i),n)}})}(n,i))}get onDidSplice(){return a.ju.map(this.model.onDidSplice,(({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map((e=>this.nodeMapper.map(e))),deletedNodes:t.map((e=>this.nodeMapper.map(e)))})))}get onDidChangeCollapseState(){return a.ju.map(this.model.onDidChangeCollapseState,(({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t})))}get onDidChangeRenderNodeCount(){return a.ju.map(this.model.onDidChangeRenderNodeCount,(e=>this.nodeMapper.map(e)))}setChildren(e,t=C.$.empty(),i={}){this.model.setChildren(e,t,i)}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,i){return this.model.setCollapsed(e,t,i)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var me=i(9898);class _e extends re{constructor(e,t,i,n,o={}){super(e,t,i,n,o)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}setChildren(e,t=C.$.empty(),i){this.model.setChildren(e,t,i)}rerender(e){void 0!==e?this.model.rerender(e):this.view.rerender()}hasElement(e){return this.model.has(e)}createModel(e,t,i){return new se(e,t,i)}}class ve{constructor(e,t){this._compressedTreeNodeProvider=e,this.renderer=t,this.templateId=t.templateId,t.onDidChangeTwistieState&&(this.onDidChangeTwistieState=t.onDidChangeTwistieState)}get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){const o=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);1===o.element.elements.length?(i.compressedTreeNode=void 0,this.renderer.renderElement(e,t,i.data,n)):(i.compressedTreeNode=o,this.renderer.renderCompressedElements(o,t,i.data,n))}disposeElement(e,t,i,n){i.compressedTreeNode?this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(i.compressedTreeNode,t,i.data,n):this.renderer.disposeElement&&this.renderer.disposeElement(e,t,i.data,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return!!this.renderer.renderTwistie&&this.renderer.renderTwistie(e,t)}}!function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([me.H],ve.prototype,"compressedTreeNodeProvider",null);class be extends _e{constructor(e,t,i,n,o={}){const r=()=>this;super(e,t,i,n.map((e=>new ve(r,e))),function(e,t){return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(i){let n;try{n=e().getCompressedTreeNode(i)}catch(e){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i)}return 1===n.element.elements.length?t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i):t.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(n.element.elements)}}})}(r,o))}setChildren(e,t=C.$.empty(),i){this.model.setChildren(e,t,i)}createModel(e,t,i){return new pe(e,t,i)}updateOptions(e={}){super.updateOptions(e),void 0!==e.compressionEnabled&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}var ye=i(7301),we=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function Ce(e){return Object.assign(Object.assign({},e),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function Se(e,t){return!!t.parent&&(t.parent===e||Se(e,t.parent))}class xe{constructor(e){this.node=e}get element(){return this.node.element.element}get children(){return this.node.children.map((e=>new xe(e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class ke{constructor(e,t,i){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...U.classNamesArray),!0):(t.classList.remove(...U.classNamesArray),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function De(e){return{browserEvent:e.browserEvent,elements:e.elements.map((e=>e.element))}}function Le(e){return{browserEvent:e.browserEvent,element:e.element&&e.element.element,target:e.target}}class Ne extends L.kX{constructor(e){super(e.elements.map((e=>e.element))),this.data=e}}function Ee(e){return e instanceof L.kX?new Ne(e):e}class Ae{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(Ee(e),t)}onDragOver(e,t,i,n,o=!0){return this.dnd.onDragOver(Ee(e),t&&t.element,i,n)}drop(e,t,i,n){this.dnd.drop(Ee(e),t&&t.element,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}function Me(e){return e&&Object.assign(Object.assign({},e),{collapseByDefault:!0,identityProvider:e.identityProvider&&{getId:t=>e.identityProvider.getId(t.element)},dnd:e.dnd&&new Ae(e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent:t=>e.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},t),{element:t.element})),isSelectionRangeChangeEvent:t=>e.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))},accessibilityProvider:e.accessibilityProvider&&Object.assign(Object.assign({},e.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",isChecked:e.accessibilityProvider.isChecked?t=>{var i;return!!(null===(i=e.accessibilityProvider)||void 0===i?void 0:i.isChecked(t.element))}:void 0,getAriaLabel:t=>e.accessibilityProvider.getAriaLabel(t.element),getWidgetAriaLabel:()=>e.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider.getAriaLevel&&(t=>e.accessibilityProvider.getAriaLevel(t.element)),getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))}),filter:e.filter&&{filter:(t,i)=>e.filter.filter(t.element,i)},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}),sorter:void 0,expandOnlyOnTwistieClick:void 0===e.expandOnlyOnTwistieClick?void 0:"function"!=typeof e.expandOnlyOnTwistieClick?e.expandOnlyOnTwistieClick:t=>e.expandOnlyOnTwistieClick(t.element),additionalScrollHeight:e.additionalScrollHeight})}function Ie(e,t){t(e),e.children.forEach((e=>Ie(e,t)))}class Te{constructor(e,t,i,n,r,s={}){this.user=e,this.dataSource=r,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new a.Q5,this._onDidChangeNodeSlowState=new a.Q5,this.nodeMapper=new k((e=>new xe(e))),this.disposables=new o.SL,this.identityProvider=s.identityProvider,this.autoExpandSingleChildren=void 0!==s.autoExpandSingleChildren&&s.autoExpandSingleChildren,this.sorter=s.sorter,this.collapseByDefault=s.collapseByDefault,this.tree=this.createTree(e,t,i,n,s),this.root=Ce({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root=Object.assign(Object.assign({},this.root),{id:null})),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}get onDidChangeFocus(){return a.ju.map(this.tree.onDidChangeFocus,De)}get onDidChangeSelection(){return a.ju.map(this.tree.onDidChangeSelection,De)}get onMouseDblClick(){return a.ju.map(this.tree.onMouseDblClick,Le)}get onPointer(){return a.ju.map(this.tree.onPointer,Le)}get onDidFocus(){return this.tree.onDidFocus}get onDidDispose(){return this.tree.onDidDispose}createTree(e,t,i,n,o){const r=new G(i),s=n.map((e=>new ke(e,this.nodeMapper,this._onDidChangeNodeSlowState.event))),a=Me(o)||{};return new _e(e,t,r,s,a)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}setInput(e,t){return we(this,void 0,void 0,(function*(){this.refreshPromises.forEach((e=>e.cancel())),this.refreshPromises.clear(),this.root.element=e;const i=t&&{viewState:t,focus:[],selection:[]};yield this._updateChildren(e,!0,!1,i),i&&(this.tree.setFocus(i.focus),this.tree.setSelection(i.selection)),t&&"number"==typeof t.scrollTop&&(this.scrollTop=t.scrollTop)}))}_updateChildren(e=this.root.element,t=!0,i=!1,n,o){return we(this,void 0,void 0,(function*(){if(void 0===this.root.element)throw new x(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield a.ju.toPromise(this._onDidRender.event));const r=this.getDataNode(e);if(yield this.refreshAndRenderNode(r,t,n,o),i)try{this.tree.rerender(r)}catch(e){}}))}rerender(e){if(void 0===e||e===this.root.element)return void this.tree.rerender();const t=this.getDataNode(e);this.tree.rerender(t)}collapse(e,t=!1){const i=this.getDataNode(e);return this.tree.collapse(i===this.root?null:i,t)}expand(e,t=!1){return we(this,void 0,void 0,(function*(){if(void 0===this.root.element)throw new x(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield a.ju.toPromise(this._onDidRender.event));const i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i))return!1;if(i.refreshPromise&&(yield this.root.refreshPromise,yield a.ju.toPromise(this._onDidRender.event)),i!==this.root&&!i.refreshPromise&&!this.tree.isCollapsed(i))return!1;const n=this.tree.expand(i===this.root?null:i,t);return i.refreshPromise&&(yield this.root.refreshPromise,yield a.ju.toPromise(this._onDidRender.event)),n}))}setSelection(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setSelection(i,t)}getSelection(){return this.tree.getSelection().map((e=>e.element))}setFocus(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setFocus(i,t)}getFocus(){return this.tree.getFocus().map((e=>e.element))}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getDataNode(e){const t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new x(this.user,`Data tree node not found: ${e}`);return t}refreshAndRenderNode(e,t,i,n){return we(this,void 0,void 0,(function*(){yield this.refreshNode(e,t,i),this.render(e,i,n)}))}refreshNode(e,t,i){return we(this,void 0,void 0,(function*(){let n;return this.subTreeRefreshPromises.forEach(((o,r)=>{!n&&function(e,t){return e===t||Se(e,t)||Se(t,e)}(r,e)&&(n=o.then((()=>this.refreshNode(e,t,i))))})),n||this.doRefreshSubTree(e,t,i)}))}doRefreshSubTree(e,t,i){return we(this,void 0,void 0,(function*(){let n;e.refreshPromise=new Promise((e=>n=e)),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally((()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)}));try{const o=yield this.doRefreshNode(e,t,i);e.stale=!1,yield O.jT.settled(o.map((e=>this.doRefreshSubTree(e,t,i))))}finally{n()}}))}doRefreshNode(e,t,i){return we(this,void 0,void 0,(function*(){let n;if(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.hasChildren){const t=(0,O.Vs)(800);t.then((()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)}),(e=>null)),n=this.doGetChildren(e).finally((()=>t.cancel()))}else n=Promise.resolve(C.$.empty());try{const o=yield n;return this.setChildren(e,o,t,i)}catch(t){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),(0,ye.VV)(t))return[];throw t}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}))}doGetChildren(e){let t=this.refreshPromises.get(e);return t||(t=(0,O.PG)((()=>we(this,void 0,void 0,(function*(){const t=yield this.dataSource.getChildren(e.element);return this.processChildren(t)})))),this.refreshPromises.set(e,t),t.finally((()=>{this.refreshPromises.delete(e)})))}_onDidChangeCollapseState({node:e,deep:t}){null!==e.element&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(ye.dL))}setChildren(e,t,i,n){const o=[...t];if(0===e.children.length&&0===o.length)return[];const r=new Map,s=new Map;for(const t of e.children)if(r.set(t.element,t),this.identityProvider){const e=this.tree.isCollapsed(t);s.set(t.id,{node:t,collapsed:e})}const a=[],l=o.map((t=>{const o=!!this.dataSource.hasChildren(t);if(!this.identityProvider){const i=Ce({element:t,parent:e,hasChildren:o});return o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(i.collapsedByDefault=!1,a.push(i)),i}const l=this.identityProvider.getId(t).toString(),c=s.get(l);if(c){const e=c.node;return r.delete(e.element),this.nodes.delete(e.element),this.nodes.set(t,e),e.element=t,e.hasChildren=o,i?c.collapsed?(e.children.forEach((e=>Ie(e,(e=>this.nodes.delete(e.element))))),e.children.splice(0,e.children.length),e.stale=!0):a.push(e):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(e.collapsedByDefault=!1,a.push(e)),e}const u=Ce({element:t,parent:e,id:l,hasChildren:o});return n&&n.viewState.focus&&n.viewState.focus.indexOf(l)>-1&&n.focus.push(u),n&&n.viewState.selection&&n.viewState.selection.indexOf(l)>-1&&n.selection.push(u),n&&n.viewState.expanded&&n.viewState.expanded.indexOf(l)>-1?a.push(u):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(u.collapsedByDefault=!1,a.push(u)),u}));for(const e of r.values())Ie(e,(e=>this.nodes.delete(e.element)));for(const e of l)this.nodes.set(e.element,e);return e.children.splice(0,e.children.length,...l),e!==this.root&&this.autoExpandSingleChildren&&1===l.length&&0===a.length&&(l[0].collapsedByDefault=!1,a.push(l[0])),a}render(e,t,i){const n=e.children.map((e=>this.asTreeElement(e,t))),o=i&&Object.assign(Object.assign({},i),{diffIdentityProvider:i.diffIdentityProvider&&{getId:e=>i.diffIdentityProvider.getId(e.element)}});this.tree.setChildren(e===this.root?null:e,n,o),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let i;return i=!(t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1)&&e.collapsedByDefault,e.collapsedByDefault=void 0,{element:e,children:e.hasChildren?C.$.map(e.children,(e=>this.asTreeElement(e,t))):[],collapsible:e.hasChildren,collapsed:i}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose()}}class Re{constructor(e){this.node=e}get element(){return{elements:this.node.element.elements.map((e=>e.element)),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map((e=>new Re(e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class Oe{constructor(e,t,i,n){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=i,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderCompressedElements(e,t,i,n){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...U.classNamesArray),!0):(t.classList.remove(...U.classNamesArray),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=(0,o.B9)(this.disposables)}}class Fe extends Te{constructor(e,t,i,n,o,r,s={}){super(e,t,i,o,r,s),this.compressionDelegate=n,this.compressibleNodeMapper=new k((e=>new Re(e))),this.filter=s.filter}createTree(e,t,i,n,o){const r=new G(i),s=n.map((e=>new Oe(e,this.nodeMapper,(()=>this.compressibleNodeMapper),this._onDidChangeNodeSlowState.event))),a=function(e){const t=e&&Me(e);return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map((e=>e.element)))})})}(o)||{};return new be(e,t,r,s,a)}asTreeElement(e,t){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(e.element)},super.asTreeElement(e,t))}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t){if(!this.identityProvider)return super.render(e,t);const i=e=>this.identityProvider.getId(e).toString(),n=e=>{const t=new Set;for(const n of e){const e=this.tree.getCompressedTreeNode(n===this.root?null:n);if(e.element)for(const n of e.element.elements)t.add(i(n.element))}return t},o=n(this.tree.getSelection()),r=n(this.tree.getFocus());super.render(e,t);const s=this.getSelection();let a=!1;const l=this.getFocus();let c=!1;const u=e=>{const t=e.element;if(t)for(let e=0;e{const t="boolean"==typeof(i=this.filter.filter(e,1))?i?1:0:M(i)?I(i.visibility):I(i);var i;if(2===t)throw new Error("Recursive tree visibility not supported in async data compressed trees");return 1===t}))),super.processChildren(e)}}class Pe extends re{constructor(e,t,i,n,o,r={}){super(e,t,i,n,r),this.user=e,this.dataSource=o,this.identityProvider=r.identityProvider}createModel(e,t,i){return new se(e,t,i)}}var Be=i(1106),ze=i(3937);class We{constructor(e,t,i){this.columns=e,this.getColumnSize=i,this.templateId=We.TemplateId,this.renderedTemplates=new Set;const n=new Map(t.map((e=>[e.templateId,e])));this.renderers=[];for(const t of e){const e=n.get(t.templateId);if(!e)throw new Error(`Table cell renderer for template id ${t.templateId} not found.`);this.renderers.push(e)}}renderTemplate(e){const t=(0,n.R3)(e,(0,n.$)(".monaco-table-tr")),i=[],o=[];for(let e=0;enew Ve(e,t))),u={size:c.reduce(((e,t)=>e+t.column.weight),0),views:c.map((e=>({size:e.column.weight,view:e})))};this.splitview=new ze.z(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:u}),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;const h=new We(o,r,(e=>this.splitview.getViewSize(e)));var d;this.list=new s.aV(e,this.domNode,(d=i,{getHeight:e=>d.getHeight(e),getTemplateId:()=>We.TemplateId}),[h],l),this.columnLayoutDisposable=a.ju.any(...c.map((e=>e.onDidLayout)))((([e,t])=>h.layoutColumn(e,t))),this.styleElement=(0,n.dS)(this.domNode),this.style({})}get onDidChangeFocus(){return this.list.onDidChangeFocus}get onDidChangeSelection(){return this.list.onDidChangeSelection}get onMouseDblClick(){return this.list.onMouseDblClick}get onPointer(){return this.list.onPointer}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}updateOptions(e){this.list.updateOptions(e)}splice(e,t,i=[]){this.list.splice(e,t,i)}getHTMLElement(){return this.domNode}style(e){const t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\ttop: ${this.virtualDelegate.headerRowHeight+1}px;\n\t\t\theight: calc(100% - ${this.virtualDelegate.headerRowHeight}px);\n\t\t}`),this.styleElement.textContent=t.join("\n"),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.splitview.dispose(),this.list.dispose(),this.columnLayoutDisposable.dispose()}}He.InstanceCount=0;var $e=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Ue=function(e,t){return function(i,n){t(i,n,e)}};const je=(0,m.yh)("listService");let qe=class{constructor(e){this._themeService=e,this.disposables=new o.SL,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}get lastFocusedList(){return this._lastFocusedWidget}register(e,t){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;const e=new s.wD((0,n.dS)(),"");this.disposables.add((0,b.Jl)(e,this._themeService))}if(this.lists.some((t=>t.widget===e)))throw new Error("Cannot register the same widget multiple times");const i={widget:e,extraContextKeys:t};return this.lists.push(i),e.getHTMLElement()===document.activeElement&&(this._lastFocusedWidget=e),(0,o.F8)(e.onDidFocus((()=>this._lastFocusedWidget=e)),(0,o.OF)((()=>this.lists.splice(this.lists.indexOf(i),1))),e.onDidDispose((()=>{this.lists=this.lists.filter((e=>e!==i)),this._lastFocusedWidget===e&&(this._lastFocusedWidget=void 0)})))}dispose(){this.disposables.dispose()}};qe=$e([Ue(0,y.XE)],qe);const Ke=new p.uy("listFocus",!0),Ge=new p.uy("listSupportsMultiselect",!0),Ye=p.Ao.and(Ke,p.Ao.not(w.d)),Ze=new p.uy("listHasSelectionOrFocus",!1),Xe=new p.uy("listDoubleSelection",!1),Qe=new p.uy("listMultiSelection",!1),Je=new p.uy("listSelectionNavigation",!1),et=new p.uy("listSupportsKeyboardNavigation",!0),tt="listAutomaticKeyboardNavigation",it=new p.uy(tt,!0);let nt=!1;function ot(e,t){const i=e.createScoped(t.getHTMLElement());return Ke.bindTo(i),i}const rt="workbench.list.multiSelectModifier",st="workbench.list.openMode",at="workbench.list.horizontalScrolling",lt="workbench.list.keyboardNavigation",ct="workbench.list.automaticKeyboardNavigation",ut="workbench.tree.indent",ht="workbench.tree.renderIndentGuides",dt="workbench.list.smoothScrolling",gt="workbench.tree.expandMode";function ft(e){return"alt"===e.getValue(rt)}class pt extends o.JT{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=ft(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(rt)&&(this.useAltAsMultipleSelectionModifier=ft(this.configurationService))})))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:(0,s.Zo)(e)}isSelectionRangeChangeEvent(e){return(0,s.wn)(e)}}function mt(e,t,i){const n=new o.SL,r=Object.assign({},e);if(!1!==e.multipleSelectionSupport&&!e.multipleSelectionController){const e=new pt(t);r.multipleSelectionController=e,n.add(e)}return r.keyboardNavigationDelegate={mightProducePrintableCharacter:e=>i.mightProducePrintableCharacter(e)},r.smoothScrolling=Boolean(t.getValue(dt)),[r,n]}let _t=class extends s.aV{constructor(e,t,i,n,o,r,s,a,l,c){const u=void 0!==o.horizontalScrolling?o.horizontalScrolling:Boolean(l.getValue(at)),[h,d]=mt(o,l,c);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},(0,b.o)(a.getColorTheme(),b.O2)),h),{horizontalScrolling:u})),this.disposables.add(d),this.contextKeyService=ot(r,this),this.themeService=a,Ge.bindTo(this.contextKeyService).set(!(!1===o.multipleSelectionSupport)),Je.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)),this.listHasSelectionOrFocus=Ze.bindTo(this.contextKeyService),this.listDoubleSelection=Xe.bindTo(this.contextKeyService),this.listMultiSelection=Qe.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=ft(l),this.disposables.add(this.contextKeyService),this.disposables.add(s.register(this)),o.overrideStyles&&this.updateStyles(o.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(l.onDidChangeConfiguration((e=>{e.affectsConfiguration(rt)&&(this._useAltAsMultipleSelectionModifier=ft(l));let t={};if(e.affectsConfiguration(at)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(at));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(dt)){const e=Boolean(l.getValue(dt));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new wt(this,Object.assign({configurationService:l},o)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=(0,b.Jl)(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),super.dispose()}};_t=$e([Ue(5,p.i6),Ue(6,je),Ue(7,y.XE),Ue(8,g.Ui),Ue(9,_.d)],_t);let vt=class extends class{constructor(e,t,i,n,o={}){const r=()=>this.model,a=n.map((e=>new c(e,r)));this.list=new s.aV(e,t,i,a,function(e,t){return Object.assign(Object.assign({},t),{accessibilityProvider:t.accessibilityProvider&&new u(e,t.accessibilityProvider)})}(r,o))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return a.ju.map(this.list.onMouseDblClick,(({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i})))}get onPointer(){return a.ju.map(this.list.onPointer,(({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i})))}get onDidChangeSelection(){return a.ju.map(this.list.onDidChangeSelection,(({elements:e,indexes:t,browserEvent:i})=>({elements:e.map((e=>this._model.get(e))),indexes:t,browserEvent:i})))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,(0,r.w6)(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map((e=>this.model.get(e)))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}{constructor(e,t,i,n,r,s,a,l,c,u){const h=void 0!==r.horizontalScrolling?r.horizontalScrolling:Boolean(c.getValue(at)),[d,g]=mt(r,c,u);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},(0,b.o)(l.getColorTheme(),b.O2)),d),{horizontalScrolling:h})),this.disposables=new o.SL,this.disposables.add(g),this.contextKeyService=ot(s,this),this.themeService=l,this.horizontalScrolling=r.horizontalScrolling,Ge.bindTo(this.contextKeyService).set(!(!1===r.multipleSelectionSupport)),Je.bindTo(this.contextKeyService).set(Boolean(r.selectionNavigation)),this._useAltAsMultipleSelectionModifier=ft(c),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),r.overrideStyles&&this.updateStyles(r.overrideStyles),r.overrideStyles&&this.disposables.add((0,b.Jl)(this,l,r.overrideStyles)),this.disposables.add(c.onDidChangeConfiguration((e=>{e.affectsConfiguration(rt)&&(this._useAltAsMultipleSelectionModifier=ft(c));let t={};if(e.affectsConfiguration(at)&&void 0===this.horizontalScrolling){const e=Boolean(c.getValue(at));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(dt)){const e=Boolean(c.getValue(dt));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new wt(this,Object.assign({configurationService:c},r)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=(0,b.Jl)(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),this.disposables.dispose(),super.dispose()}};vt=$e([Ue(5,p.i6),Ue(6,je),Ue(7,y.XE),Ue(8,g.Ui),Ue(9,_.d)],vt);let bt=class extends He{constructor(e,t,i,n,r,s,a,l,c,u,h){const d=void 0!==s.horizontalScrolling?s.horizontalScrolling:Boolean(u.getValue(at)),[g,f]=mt(s,u,h);super(e,t,i,n,r,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},(0,b.o)(c.getColorTheme(),b.O2)),g),{horizontalScrolling:d})),this.disposables=new o.SL,this.disposables.add(f),this.contextKeyService=ot(a,this),this.themeService=c,Ge.bindTo(this.contextKeyService).set(!(!1===s.multipleSelectionSupport)),Je.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this.listHasSelectionOrFocus=Ze.bindTo(this.contextKeyService),this.listDoubleSelection=Xe.bindTo(this.contextKeyService),this.listMultiSelection=Qe.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=ft(u),this.disposables.add(this.contextKeyService),this.disposables.add(l.register(this)),s.overrideStyles&&this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(u.onDidChangeConfiguration((e=>{e.affectsConfiguration(rt)&&(this._useAltAsMultipleSelectionModifier=ft(u));let t={};if(e.affectsConfiguration(at)&&void 0===this.horizontalScrolling){const e=Boolean(u.getValue(at));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(dt)){const e=Boolean(u.getValue(dt));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new Ct(this,Object.assign({configurationService:u},s)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=(0,b.Jl)(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),this.disposables.dispose(),super.dispose()}};bt=$e([Ue(6,p.i6),Ue(7,je),Ue(8,y.XE),Ue(9,g.Ui),Ue(10,_.d)],bt);class yt extends o.JT{constructor(e,t){var i;super(),this.widget=e,this._onDidOpen=this._register(new a.Q5),this.onDidOpen=this._onDidOpen.event,this._register(a.ju.filter(this.widget.onDidChangeSelection,(e=>e.browserEvent instanceof KeyboardEvent))((e=>this.onSelectionFromKeyboard(e)))),this._register(this.widget.onPointer((e=>this.onPointer(e.element,e.browserEvent)))),this._register(this.widget.onMouseDblClick((e=>this.onMouseDblClick(e.element,e.browserEvent)))),"boolean"!=typeof(null==t?void 0:t.openOnSingleClick)&&(null==t?void 0:t.configurationService)?(this.openOnSingleClick="doubleClick"!==(null==t?void 0:t.configurationService.getValue(st)),this._register(null==t?void 0:t.configurationService.onDidChangeConfiguration((()=>{this.openOnSingleClick="doubleClick"!==(null==t?void 0:t.configurationService.getValue(st))})))):this.openOnSingleClick=null===(i=null==t?void 0:t.openOnSingleClick)||void 0===i||i}onSelectionFromKeyboard(e){if(1!==e.elements.length)return;const t=e.browserEvent,i="boolean"!=typeof t.preserveFocus||t.preserveFocus,n="boolean"==typeof t.pinned?t.pinned:!i;this._open(this.getSelectedElement(),i,n,!1,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick)return;if(2===t.detail)return;const i=1===t.button,n=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!0,i,n,t)}onMouseDblClick(e,t){if(!t)return;const i=t.target;if(i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&t.offsetX<16)return;const n=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!1,!0,n,t)}_open(e,t,i,n,o){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:i,revealIfVisible:!0},sideBySide:n,element:e,browserEvent:o})}}class wt extends yt{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class Ct extends yt{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class St extends yt{constructor(e,t){super(e,t)}getSelectedElement(){var e;return null!==(e=this.widget.getSelection()[0])&&void 0!==e?e:void 0}}function xt(e,t){let i=!1;return n=>{if(i)return i=!1,!1;const o=t.softDispatch(n,e);return o&&o.enterChord?(i=!0,!1):(i=!1,!0)}}let kt=class extends _e{constructor(e,t,i,n,o,r,s,a,l,c,u){const{options:h,getAutomaticKeyboardNavigation:d,disposable:g}=At(t,o,r,l,c,u);super(e,t,i,n,h),this.disposables.add(g),this.internals=new Mt(this,o,d,o.overrideStyles,r,s,a,l,u),this.disposables.add(this.internals)}};kt=$e([Ue(5,p.i6),Ue(6,je),Ue(7,y.XE),Ue(8,g.Ui),Ue(9,_.d),Ue(10,Be.F)],kt);let Dt=class extends be{constructor(e,t,i,n,o,r,s,a,l,c,u){const{options:h,getAutomaticKeyboardNavigation:d,disposable:g}=At(t,o,r,l,c,u);super(e,t,i,n,h),this.disposables.add(g),this.internals=new Mt(this,o,d,o.overrideStyles,r,s,a,l,u),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles)}};Dt=$e([Ue(5,p.i6),Ue(6,je),Ue(7,y.XE),Ue(8,g.Ui),Ue(9,_.d),Ue(10,Be.F)],Dt);let Lt=class extends Pe{constructor(e,t,i,n,o,r,s,a,l,c,u,h){const{options:d,getAutomaticKeyboardNavigation:g,disposable:f}=At(t,r,s,c,u,h);super(e,t,i,n,o,d),this.disposables.add(f),this.internals=new Mt(this,r,g,r.overrideStyles,s,a,l,c,h),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles)}};Lt=$e([Ue(6,p.i6),Ue(7,je),Ue(8,y.XE),Ue(9,g.Ui),Ue(10,_.d),Ue(11,Be.F)],Lt);let Nt=class extends Te{constructor(e,t,i,n,o,r,s,a,l,c,u,h){const{options:d,getAutomaticKeyboardNavigation:g,disposable:f}=At(t,r,s,c,u,h);super(e,t,i,n,o,d),this.disposables.add(f),this.internals=new Mt(this,r,g,r.overrideStyles,s,a,l,c,h),this.disposables.add(this.internals)}get onDidOpen(){return this.internals.onDidOpen}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles)}};Nt=$e([Ue(6,p.i6),Ue(7,je),Ue(8,y.XE),Ue(9,g.Ui),Ue(10,_.d),Ue(11,Be.F)],Nt);let Et=class extends Fe{constructor(e,t,i,n,o,r,s,a,l,c,u,h,d){const{options:g,getAutomaticKeyboardNavigation:f,disposable:p}=At(t,s,a,u,h,d);super(e,t,i,n,o,r,g),this.disposables.add(p),this.internals=new Mt(this,s,f,s.overrideStyles,a,l,c,u,d),this.disposables.add(this.internals)}};function At(e,t,i,n,o,r){var s;et.bindTo(i),nt||(it.bindTo(i),nt=!0);const a=()=>{let e=Boolean(i.getContextKeyValue(tt));return e&&(e=Boolean(n.getValue(ct))),e},l=r.isScreenReaderOptimized(),c=t.simpleKeyboardNavigation||l?"simple":n.getValue(lt),u=void 0!==t.horizontalScrolling?t.horizontalScrolling:Boolean(n.getValue(at)),[h,d]=mt(t,n,o),g=t.additionalScrollHeight;return{getAutomaticKeyboardNavigation:a,disposable:d,options:Object.assign(Object.assign({keyboardSupport:!1},h),{indent:n.getValue(ut),renderIndentGuides:n.getValue(ht),smoothScrolling:Boolean(n.getValue(dt)),automaticKeyboardNavigation:a(),simpleKeyboardNavigation:"simple"===c,filterOnType:"filter"===c,horizontalScrolling:u,keyboardNavigationEventFilter:xt(e,o),additionalScrollHeight:g,hideTwistiesOfChildlessElements:t.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:null!==(s=t.expandOnlyOnTwistieClick)&&void 0!==s?s:"doubleClick"===n.getValue(gt)})}}Et=$e([Ue(7,p.i6),Ue(8,je),Ue(9,y.XE),Ue(10,g.Ui),Ue(11,_.d),Ue(12,Be.F)],Et);let Mt=class{constructor(e,t,i,n,o,r,s,a,l){this.tree=e,this.themeService=s,this.disposables=[],this.contextKeyService=ot(o,e),Ge.bindTo(this.contextKeyService).set(!(!1===t.multipleSelectionSupport)),Je.bindTo(this.contextKeyService).set(Boolean(t.selectionNavigation)),this.hasSelectionOrFocus=Ze.bindTo(this.contextKeyService),this.hasDoubleSelection=Xe.bindTo(this.contextKeyService),this.hasMultiSelection=Qe.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=ft(a);const c=new Set;c.add(tt);const u=()=>{const t=l.isScreenReaderOptimized()?"simple":a.getValue(lt);e.updateOptions({simpleKeyboardNavigation:"simple"===t,filterOnType:"filter"===t})};this.updateStyleOverrides(n),this.disposables.push(this.contextKeyService,r.register(e),e.onDidChangeSelection((()=>{const t=e.getSelection(),i=e.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.hasSelectionOrFocus.set(t.length>0||i.length>0),this.hasMultiSelection.set(t.length>1),this.hasDoubleSelection.set(2===t.length)}))})),e.onDidChangeFocus((()=>{const t=e.getSelection(),i=e.getFocus();this.hasSelectionOrFocus.set(t.length>0||i.length>0)})),a.onDidChangeConfiguration((n=>{let o={};if(n.affectsConfiguration(rt)&&(this._useAltAsMultipleSelectionModifier=ft(a)),n.affectsConfiguration(ut)){const e=a.getValue(ut);o=Object.assign(Object.assign({},o),{indent:e})}if(n.affectsConfiguration(ht)){const e=a.getValue(ht);o=Object.assign(Object.assign({},o),{renderIndentGuides:e})}if(n.affectsConfiguration(dt)){const e=Boolean(a.getValue(dt));o=Object.assign(Object.assign({},o),{smoothScrolling:e})}if(n.affectsConfiguration(lt)&&u(),n.affectsConfiguration(ct)&&(o=Object.assign(Object.assign({},o),{automaticKeyboardNavigation:i()})),n.affectsConfiguration(at)&&void 0===t.horizontalScrolling){const e=Boolean(a.getValue(at));o=Object.assign(Object.assign({},o),{horizontalScrolling:e})}n.affectsConfiguration(gt)&&void 0===t.expandOnlyOnTwistieClick&&(o=Object.assign(Object.assign({},o),{expandOnlyOnTwistieClick:"doubleClick"===a.getValue(gt)})),Object.keys(o).length>0&&e.updateOptions(o)})),this.contextKeyService.onDidChangeContext((t=>{t.affectsSome(c)&&e.updateOptions({automaticKeyboardNavigation:i()})})),l.onDidChangeScreenReaderOptimized((()=>u()))),this.navigator=new St(e,Object.assign({configurationService:a},t)),this.disposables.push(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}updateStyleOverrides(e){(0,o.B9)(this.styler),this.styler=e?(0,b.Jl)(this.tree,this.themeService,e):o.JT.None}dispose(){this.disposables=(0,o.B9)(this.disposables),(0,o.B9)(this.styler),this.styler=void 0}};Mt=$e([Ue(4,p.i6),Ue(5,je),Ue(6,y.XE),Ue(7,g.Ui),Ue(8,Be.F)],Mt),v.B.as(f.IP.Configuration).registerConfiguration({id:"workbench",order:7,title:(0,d.N)("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[rt]:{type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[(0,d.N)("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),(0,d.N)("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:(0,d.N)({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[st]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,d.N)({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[at]:{type:"boolean",default:!1,description:(0,d.N)("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[ut]:{type:"number",default:8,minimum:0,maximum:40,description:(0,d.N)("tree indent setting","Controls tree indentation in pixels.")},[ht]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:(0,d.N)("render tree indent guides","Controls whether the tree should render indent guides.")},[dt]:{type:"boolean",default:!1,description:(0,d.N)("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[lt]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[(0,d.N)("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),(0,d.N)("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),(0,d.N)("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:(0,d.N)("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter.")},[ct]:{type:"boolean",default:!0,markdownDescription:(0,d.N)("automatic keyboard navigation setting","Controls whether keyboard navigation in lists and trees is automatically triggered simply by typing. If set to `false`, keyboard navigation is only triggered when executing the `list.toggleKeyboardNavigation` command, for which you can assign a keyboard shortcut.")},[gt]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,d.N)("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")}}})},3557:(e,t,i)=>{"use strict";i.d(t,{VZ:()=>s,in:()=>a,kw:()=>u,$V:()=>h});var n=i(2065),o=i(5976),r=i(4669);const s=(0,n.yh)("logService");var a;!function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Info=2]="Info",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.Off=6]="Off"}(a||(a={}));const l=a.Info;class c extends o.JT{constructor(){super(...arguments),this.level=l,this._onDidChangeLogLevel=this._register(new r.Q5)}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}class u extends c{constructor(e=l){super(),this.setLevel(e)}trace(e,...t){this.getLevel()<=a.Trace&&console.log("%cTRACE","color: #888",e,...t)}debug(e,...t){this.getLevel()<=a.Debug&&console.log("%cDEBUG","background: #eee; color: #888",e,...t)}info(e,...t){this.getLevel()<=a.Info&&console.log("%c INFO","color: #33f",e,...t)}error(e,...t){this.getLevel()<=a.Error&&console.log("%c ERR","color: #f33",e,...t)}dispose(){}}class h extends o.JT{constructor(e){super(),this.logger=e,this._register(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}error(e,...t){this.logger.error(e,...t)}}},8674:(e,t,i)=>{"use strict";i.d(t,{ZL:()=>n,H0:()=>o,lT:()=>l});var n,o,r=i(2065),s=i(3580),a=i(4603);!function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(n||(n={})),function(e){e.compare=function(e,t){return t-e};const t=Object.create(null);t[e.Error]=(0,s.N)("sev.error","Error"),t[e.Warning]=(0,s.N)("sev.warning","Warning"),t[e.Info]=(0,s.N)("sev.info","Info"),e.toString=function(e){return t[e]||""},e.fromSeverity=function(t){switch(t){case a.Z.Error:return e.Error;case a.Z.Warning:return e.Warning;case a.Z.Info:return e.Info;case a.Z.Ignore:return e.Hint}},e.toSeverity=function(t){switch(t){case e.Error:return a.Z.Error;case e.Warning:return a.Z.Warning;case e.Info:return a.Z.Info;case e.Hint:return a.Z.Ignore}}}(n||(n={})),function(e){const t="";function i(e,i){let o=[t];return e.source?o.push(e.source.replace("¦","\\¦")):o.push(t),e.code?"string"==typeof e.code?o.push(e.code.replace("¦","\\¦")):o.push(e.code.value.replace("¦","\\¦")):o.push(t),void 0!==e.severity&&null!==e.severity?o.push(n.toString(e.severity)):o.push(t),e.message&&i?o.push(e.message.replace("¦","\\¦")):o.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?o.push(e.startLineNumber.toString()):o.push(t),void 0!==e.startColumn&&null!==e.startColumn?o.push(e.startColumn.toString()):o.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?o.push(e.endLineNumber.toString()):o.push(t),void 0!==e.endColumn&&null!==e.endColumn?o.push(e.endColumn.toString()):o.push(t),o.push(t),o.join("¦")}e.makeKey=function(e){return i(e,!0)},e.makeKeyOptionalMessage=i}(o||(o={}));const l=(0,r.yh)("markerService")},9422:(e,t,i)=>{"use strict";i.d(t,{lT:()=>n,EO:()=>o}),i(4603);const n=(0,i(2065).yh)("notificationService");class o{}},988:(e,t,i)=>{"use strict";i.d(t,{v4:()=>l,SW:()=>c,xn:()=>u});var n=i(5976),o=i(7295),r=i(666),s=i(2065),a=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const l=(0,s.yh)("openerService"),c=Object.freeze({_serviceBrand:void 0,registerOpener:()=>n.JT.None,registerValidator:()=>n.JT.None,registerExternalUriResolver:()=>n.JT.None,setDefaultExternalOpener(){},registerExternalOpener:()=>n.JT.None,open(){return a(this,void 0,void 0,(function*(){return!1}))},resolveExternalUri(e){return a(this,void 0,void 0,(function*(){return{resolved:e,dispose(){}}}))}});function u(e,t){return r.o.isUri(e)?(0,o.qq)(e.scheme,t):(0,o.ok)(e,t+":")}},535:(e,t,i)=>{"use strict";i.d(t,{E:()=>o,e:()=>r});var n=i(2065);class o{constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}}o.None=Object.freeze({report(){}});const r=(0,n.yh)("editorProgressService")},725:(e,t,i)=>{"use strict";i.d(t,{Ry:()=>n,IP:()=>a});var n,o=i(9872),r=i(9488),s=i(5976);!function(e){e[e.PRESERVE=0]="PRESERVE",e[e.LAST=1]="LAST"}(n||(n={}));const a={Quickaccess:"workbench.contributions.quickaccess"};o.B.add(a.Quickaccess,new class{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return 0===e.prefix.length?this.defaultProvider=e:this.providers.push(e),this.providers.sort(((e,t)=>t.prefix.length-e.prefix.length)),(0,s.OF)((()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)}))}getQuickAccessProviders(){return(0,r.kX)([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find((t=>e.startsWith(t.prefix)))||this.defaultProvider}})},1157:(e,t,i)=>{"use strict";i.d(t,{jG:()=>o.jG,eJ:()=>r});var n=i(2065),o=i(7746);const r=(0,n.yh)("quickInputService")},9872:(e,t,i)=>{"use strict";i.d(t,{B:()=>r});var n=i(8401),o=i(5146);const r=new class{constructor(){this.data=new Map}add(e,t){o.ok(n.HD(e)),o.ok(n.Kn(t)),o.ok(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}}},6904:(e,t,i)=>{"use strict";i.d(t,{Uy:()=>g,vm:()=>m,fk:()=>f});var n,o=i(2065),r=i(4669),s=i(5976),a=i(8401),l=i(5393),c=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};!function(e){e[e.None=0]="None",e[e.Initialized=1]="Initialized",e[e.Closed=2]="Closed"}(n||(n={}));class u extends s.JT{constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new r.Q5),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=n.None,this.cache=new Map,this.flushDelayer=new l.rH(u.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal((e=>this.onDidChangeItemsExternal(e))))}onDidChangeItemsExternal(e){var t,i;null===(t=e.changed)||void 0===t||t.forEach(((e,t)=>this.accept(t,e))),null===(i=e.deleted)||void 0===i||i.forEach((e=>this.accept(e,void 0)))}accept(e,t){if(this.state===n.Closed)return;let i=!1;(0,a.Jp)(t)?i=this.cache.delete(e):this.cache.get(e)!==t&&(this.cache.set(e,t),i=!0),i&&this._onDidChangeStorage.fire(e)}get(e,t){const i=this.cache.get(e);return(0,a.Jp)(i)?t:i}getBoolean(e,t){const i=this.get(e);return(0,a.Jp)(i)?t:"true"===i}getNumber(e,t){const i=this.get(e);return(0,a.Jp)(i)?t:parseInt(i,10)}set(e,t){return c(this,void 0,void 0,(function*(){if(this.state===n.Closed)return;if((0,a.Jp)(t))return this.delete(e);const i=String(t);return this.cache.get(e)!==i?(this.cache.set(e,i),this.pendingInserts.set(e,i),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire(e),this.flushDelayer.trigger((()=>this.flushPending()))):void 0}))}delete(e){return c(this,void 0,void 0,(function*(){if(this.state!==n.Closed)return this.cache.delete(e)?(this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire(e),this.flushDelayer.trigger((()=>this.flushPending()))):void 0}))}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return c(this,void 0,void 0,(function*(){if(!this.hasPending)return;const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally((()=>{var e;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)null===(e=this.whenFlushedCallbacks.pop())||void 0===e||e()}))}))}dispose(){this.flushDelayer.cancel(),this.flushDelayer.dispose(),super.dispose()}}u.DEFAULT_FLUSH_DELAY=100;class h{constructor(){this.onDidChangeItemsExternal=r.ju.None,this.items=new Map}updateItems(e){return c(this,void 0,void 0,(function*(){e.insert&&e.insert.forEach(((e,t)=>this.items.set(t,e))),e.delete&&e.delete.forEach((e=>this.items.delete(e)))}))}}const d="__$__targetStorageMarker",g=(0,o.yh)("storageService");var f;!function(e){e[e.NONE=0]="NONE",e[e.SHUTDOWN=1]="SHUTDOWN"}(f||(f={}));class p extends s.JT{constructor(e={flushInterval:p.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new r.K3),this._onDidChangeTarget=this._register(new r.K3),this._onWillSaveState=this._register(new r.Q5),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._globalKeyTargets=void 0}emitDidChangeValue(e,t){t===d?(0===e?this._globalKeyTargets=void 0:1===e&&(this._workspaceKeyTargets=void 0),this._onDidChangeTarget.fire({scope:e})):this._onDidChangeValue.fire({scope:e,key:t,target:this.getKeyTargets(e)[t]})}get(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.get(e,i)}getBoolean(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.getBoolean(e,i)}getNumber(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.getNumber(e,i)}store(e,t,i,n){(0,a.Jp)(t)?this.remove(e,i):this.withPausedEmitters((()=>{var o;this.updateKeyTarget(e,i,n),null===(o=this.getStorage(i))||void 0===o||o.set(e,t)}))}remove(e,t){this.withPausedEmitters((()=>{var i;this.updateKeyTarget(e,t,void 0),null===(i=this.getStorage(t))||void 0===i||i.delete(e)}))}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,i){var n,o;const r=this.getKeyTargets(t);"number"==typeof i?r[e]!==i&&(r[e]=i,null===(n=this.getStorage(t))||void 0===n||n.set(d,JSON.stringify(r))):"number"==typeof r[e]&&(delete r[e],null===(o=this.getStorage(t))||void 0===o||o.set(d,JSON.stringify(r)))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get globalKeyTargets(){return this._globalKeyTargets||(this._globalKeyTargets=this.loadKeyTargets(0)),this._globalKeyTargets}getKeyTargets(e){return 0===e?this.globalKeyTargets:this.workspaceKeyTargets}loadKeyTargets(e){const t=this.get(d,e);if(t)try{return JSON.parse(t)}catch(e){}return Object.create(null)}}p.DEFAULT_FLUSH_INTERVAL=6e4;class m extends p{constructor(){super(),this.globalStorage=new u(new h),this.workspaceStorage=new u(new h),this._register(this.workspaceStorage.onDidChangeStorage((e=>this.emitDidChangeValue(1,e)))),this._register(this.globalStorage.onDidChangeStorage((e=>this.emitDidChangeValue(0,e))))}getStorage(e){return 0===e?this.globalStorage:this.workspaceStorage}}},829:(e,t,i)=>{"use strict";i.d(t,{b:()=>n});const n=(0,i(2065).yh)("telemetryService")},3910:(e,t,i)=>{"use strict";i.d(t,{IP:()=>u,P6:()=>d,dR:()=>g,Id:()=>f,XZ:()=>p,R8:()=>m,lR:()=>_,xL:()=>v,ur:()=>b,Sw:()=>y,rh:()=>w,sE:()=>C,zJ:()=>S,dt:()=>x,PR:()=>k,XE:()=>D,Pv:()=>L,_l:()=>N,YI:()=>E,EP:()=>A,RV:()=>M,SU:()=>I,C3:()=>T,p:()=>R,_t:()=>O,OZ:()=>F,j5:()=>z,b7:()=>W,GO:()=>V,g8:()=>H,qe:()=>$,_w:()=>U,et:()=>j,AB:()=>q,yn:()=>K,zR:()=>G,A2:()=>Y,lX:()=>Z,b6:()=>X,gp:()=>Q,uo:()=>J,pW:()=>ee,fe:()=>te,c6:()=>ie,T8:()=>ne,Du:()=>oe,fE:()=>re,cv:()=>se,NO:()=>ae,D0:()=>le,Hf:()=>ce,D1:()=>ue,Ng:()=>he,zK:()=>de,tZ:()=>ge,lo:()=>fe,kJ:()=>pe,op:()=>me,oQ:()=>_e,lW:()=>ve,AW:()=>be,K1:()=>ye,hE:()=>we,yb:()=>Ce,ES:()=>Se,Rz:()=>xe,g_:()=>ke,ny:()=>De,MU:()=>Le,jU:()=>Ne,pn:()=>Ee,Ei:()=>Ae,gk:()=>Me,pt:()=>Ie,yJ:()=>Te,Sb:()=>Re,CN:()=>Oe,Lo:()=>Fe,_Y:()=>Pe,VV:()=>Be,Pp:()=>ze,Fu:()=>We,sK:()=>Ve,Cz:()=>He,ke:()=>$e,yp:()=>Ue,P4:()=>je,XL:()=>qe,mH:()=>Ke,LL:()=>Ge,L_:()=>Ye,_b:()=>Ze,_2:()=>Xe,Oo:()=>Qe,dC:()=>Je,M6:()=>et,rg:()=>tt,yt:()=>it,s$:()=>nt,F3:()=>ot,mV:()=>rt,$d:()=>st,AS:()=>at,Gw:()=>lt,PX:()=>ct,vG:()=>ut,oS:()=>ht,S:()=>dt,Un:()=>gt,ux:()=>ft,NP:()=>mt,Vq:()=>_t,Cd:()=>vt,DE:()=>bt,Hz:()=>yt,jb:()=>wt,$D:()=>Ct,E3:()=>St,ZG:()=>xt,u2:()=>kt,Pk:()=>Dt,I1:()=>Lt,U6:()=>Nt,Fm:()=>Et,SP:()=>At,KT:()=>Mt,ov:()=>It,Gj:()=>Tt,Iv:()=>Rt,kV:()=>Ot,CA:()=>Ft,Xy:()=>Pt,br:()=>Bt,Jp:()=>zt,BO:()=>Wt,OL:()=>Vt,Zn:()=>Ut,kw:()=>jt,Sn:()=>Kt});var n=i(9872),o=i(1264),r=i(4669),s=i(3580),a=i(1294),l=i(5393),c=i(8401);const u={ColorContribution:"base.contributions.colors"},h=new class{constructor(){this._onDidChangeSchema=new r.Q5,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,i,n=!1,o){let r={id:e,description:i,defaults:t,needsTransparency:n,deprecationMessage:o};this.colorsById[e]=r;let s={type:"string",description:i,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return o&&(s.deprecationMessage=o),this.colorSchema.properties[e]=s,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(i),this._onDidChangeSchema.fire(),e}resolveDefaultColor(e,t){const i=this.colorsById[e];if(i&&i.defaults)return Kt(i.defaults[t.type],t)}getColorSchema(){return this.colorSchema}toString(){return Object.keys(this.colorsById).sort(((e,t)=>{let i=-1===e.indexOf(".")?0:1,n=-1===t.indexOf(".")?0:1;return i!==n?i-n:e.localeCompare(t)})).map((e=>`- \`${e}\`: ${this.colorsById[e].description}`)).join("\n")}};function d(e,t,i,n,o){return h.registerColor(e,t,i,n,o)}n.B.add(u.ColorContribution,h);const g=d("foreground",{dark:"#CCCCCC",light:"#616161",hc:"#FFFFFF"},s.N("foreground","Overall foreground color. This color is only used if not overridden by a component.")),f=d("errorForeground",{dark:"#F48771",light:"#A1260D",hc:"#F48771"},s.N("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),p=d("icon.foreground",{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},s.N("iconForeground","The default color for icons in the workbench.")),m=d("focusBorder",{dark:"#007FD4",light:"#0090F1",hc:"#F38518"},s.N("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),_=d("contrastBorder",{light:null,dark:null,hc:"#6FC3DF"},s.N("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),v=d("contrastActiveBorder",{light:null,dark:null,hc:m},s.N("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),b=d("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},s.N("textLinkForeground","Foreground color for links in text.")),y=d("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hc:o.Il.black},s.N("textCodeBlockBackground","Background color for code blocks in text.")),w=d("widget.shadow",{dark:Ut(o.Il.black,.36),light:Ut(o.Il.black,.16),hc:null},s.N("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),C=d("input.background",{dark:"#3C3C3C",light:o.Il.white,hc:o.Il.black},s.N("inputBoxBackground","Input box background.")),S=d("input.foreground",{dark:g,light:g,hc:g},s.N("inputBoxForeground","Input box foreground.")),x=d("input.border",{dark:null,light:null,hc:_},s.N("inputBoxBorder","Input box border.")),k=d("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hc:_},s.N("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),D=d("inputOption.activeBackground",{dark:Ut(m,.4),light:Ut(m,.2),hc:o.Il.transparent},s.N("inputOption.activeBackground","Background color of activated options in input fields.")),L=d("inputOption.activeForeground",{dark:o.Il.white,light:o.Il.black,hc:null},s.N("inputOption.activeForeground","Foreground color of activated options in input fields.")),N=d("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hc:o.Il.black},s.N("inputValidationInfoBackground","Input validation background color for information severity.")),E=d("inputValidation.infoForeground",{dark:null,light:null,hc:null},s.N("inputValidationInfoForeground","Input validation foreground color for information severity.")),A=d("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hc:_},s.N("inputValidationInfoBorder","Input validation border color for information severity.")),M=d("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hc:o.Il.black},s.N("inputValidationWarningBackground","Input validation background color for warning severity.")),I=d("inputValidation.warningForeground",{dark:null,light:null,hc:null},s.N("inputValidationWarningForeground","Input validation foreground color for warning severity.")),T=d("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hc:_},s.N("inputValidationWarningBorder","Input validation border color for warning severity.")),R=d("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hc:o.Il.black},s.N("inputValidationErrorBackground","Input validation background color for error severity.")),O=d("inputValidation.errorForeground",{dark:null,light:null,hc:null},s.N("inputValidationErrorForeground","Input validation foreground color for error severity.")),F=d("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hc:_},s.N("inputValidationErrorBorder","Input validation border color for error severity.")),P=d("dropdown.background",{dark:"#3C3C3C",light:o.Il.white,hc:o.Il.black},s.N("dropdownBackground","Dropdown background.")),B=d("dropdown.foreground",{dark:"#F0F0F0",light:null,hc:o.Il.white},s.N("dropdownForeground","Dropdown foreground.")),z=d("button.foreground",{dark:o.Il.white,light:o.Il.white,hc:o.Il.white},s.N("buttonForeground","Button foreground color.")),W=d("button.background",{dark:"#0E639C",light:"#007ACC",hc:null},s.N("buttonBackground","Button background color.")),V=d("button.hoverBackground",{dark:$t(W,.2),light:Ht(W,.2),hc:null},s.N("buttonHoverBackground","Button background color when hovering.")),H=d("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hc:o.Il.black},s.N("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),$=d("badge.foreground",{dark:o.Il.white,light:"#333",hc:o.Il.white},s.N("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),U=d("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hc:null},s.N("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),j=d("scrollbarSlider.background",{dark:o.Il.fromHex("#797979").transparent(.4),light:o.Il.fromHex("#646464").transparent(.4),hc:Ut(_,.6)},s.N("scrollbarSliderBackground","Scrollbar slider background color.")),q=d("scrollbarSlider.hoverBackground",{dark:o.Il.fromHex("#646464").transparent(.7),light:o.Il.fromHex("#646464").transparent(.7),hc:Ut(_,.8)},s.N("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),K=d("scrollbarSlider.activeBackground",{dark:o.Il.fromHex("#BFBFBF").transparent(.4),light:o.Il.fromHex("#000000").transparent(.6),hc:_},s.N("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),G=d("progressBar.background",{dark:o.Il.fromHex("#0E70C0"),light:o.Il.fromHex("#0E70C0"),hc:_},s.N("progressBarBackground","Background color of the progress bar that can show for long running operations.")),Y=d("editorError.background",{dark:null,light:null,hc:null},s.N("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Z=d("editorError.foreground",{dark:"#F48771",light:"#E51400",hc:null},s.N("editorError.foreground","Foreground color of error squigglies in the editor.")),X=d("editorError.border",{dark:null,light:null,hc:o.Il.fromHex("#E47777").transparent(.8)},s.N("errorBorder","Border color of error boxes in the editor.")),Q=d("editorWarning.background",{dark:null,light:null,hc:null},s.N("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),J=d("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hc:null},s.N("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),ee=d("editorWarning.border",{dark:null,light:null,hc:o.Il.fromHex("#FFCC00").transparent(.8)},s.N("warningBorder","Border color of warning boxes in the editor.")),te=d("editorInfo.background",{dark:null,light:null,hc:null},s.N("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),ie=d("editorInfo.foreground",{dark:"#75BEFF",light:"#75BEFF",hc:null},s.N("editorInfo.foreground","Foreground color of info squigglies in the editor.")),ne=d("editorInfo.border",{dark:null,light:null,hc:o.Il.fromHex("#75BEFF").transparent(.8)},s.N("infoBorder","Border color of info boxes in the editor.")),oe=d("editorHint.foreground",{dark:o.Il.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hc:null},s.N("editorHint.foreground","Foreground color of hint squigglies in the editor.")),re=d("editorHint.border",{dark:null,light:null,hc:o.Il.fromHex("#eeeeee").transparent(.8)},s.N("hintBorder","Border color of hint boxes in the editor.")),se=d("editor.background",{light:"#fffffe",dark:"#1E1E1E",hc:o.Il.black},s.N("editorBackground","Editor background color.")),ae=d("editor.foreground",{light:"#333333",dark:"#BBBBBB",hc:o.Il.white},s.N("editorForeground","Editor default foreground color.")),le=d("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hc:"#0C141F"},s.N("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),ce=d("editorWidget.foreground",{dark:g,light:g,hc:g},s.N("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),ue=d("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hc:_},s.N("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),he=d("editorWidget.resizeBorder",{light:null,dark:null,hc:null},s.N("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),de=d("quickInput.background",{dark:le,light:le,hc:le},s.N("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),ge=d("quickInput.foreground",{dark:ce,light:ce,hc:ce},s.N("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),fe=d("quickInputTitle.background",{dark:new o.Il(new o.VS(255,255,255,.105)),light:new o.Il(new o.VS(0,0,0,.06)),hc:"#000000"},s.N("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),pe=d("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hc:o.Il.white},s.N("pickerGroupForeground","Quick picker color for grouping labels.")),me=d("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hc:o.Il.white},s.N("pickerGroupBorder","Quick picker color for grouping borders.")),_e=d("keybindingLabel.background",{dark:new o.Il(new o.VS(128,128,128,.17)),light:new o.Il(new o.VS(221,221,221,.4)),hc:o.Il.transparent},s.N("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),ve=d("keybindingLabel.foreground",{dark:o.Il.fromHex("#CCCCCC"),light:o.Il.fromHex("#555555"),hc:o.Il.white},s.N("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),be=d("keybindingLabel.border",{dark:new o.Il(new o.VS(51,51,51,.6)),light:new o.Il(new o.VS(204,204,204,.4)),hc:new o.Il(new o.VS(111,195,223))},s.N("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),ye=d("keybindingLabel.bottomBorder",{dark:new o.Il(new o.VS(68,68,68,.6)),light:new o.Il(new o.VS(187,187,187,.4)),hc:new o.Il(new o.VS(111,195,223))},s.N("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),we=d("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},s.N("editorSelectionBackground","Color of the editor selection.")),Ce=d("editor.selectionForeground",{light:null,dark:null,hc:"#000000"},s.N("editorSelectionForeground","Color of the selected text for high contrast.")),Se=d("editor.inactiveSelectionBackground",{light:Ut(we,.5),dark:Ut(we,.5),hc:Ut(we,.5)},s.N("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),xe=d("editor.selectionHighlightBackground",{light:qt(we,se,.3,.6),dark:qt(we,se,.3,.6),hc:null},s.N("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),ke=d("editor.selectionHighlightBorder",{light:null,dark:null,hc:v},s.N("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),De=d("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hc:null},s.N("editorFindMatch","Color of the current search match.")),Le=d("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hc:null},s.N("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),Ne=d("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hc:null},s.N("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),Ee=d("editor.findMatchBorder",{light:null,dark:null,hc:v},s.N("editorFindMatchBorder","Border color of the current search match.")),Ae=d("editor.findMatchHighlightBorder",{light:null,dark:null,hc:v},s.N("findMatchHighlightBorder","Border color of the other search matches.")),Me=d("editor.findRangeHighlightBorder",{dark:null,light:null,hc:Ut(v,.4)},s.N("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),Ie=d("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hc:"#ADD6FF26"},s.N("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),Te=d("editorHoverWidget.background",{light:le,dark:le,hc:le},s.N("hoverBackground","Background color of the editor hover.")),Re=d("editorHoverWidget.foreground",{light:ce,dark:ce,hc:ce},s.N("hoverForeground","Foreground color of the editor hover.")),Oe=d("editorHoverWidget.border",{light:ue,dark:ue,hc:ue},s.N("hoverBorder","Border color of the editor hover.")),Fe=d("editorHoverWidget.statusBarBackground",{dark:$t(Te,.2),light:Ht(Te,.05),hc:le},s.N("statusBarBackground","Background color of the editor hover status bar.")),Pe=d("editorLink.activeForeground",{dark:"#4E94CE",light:o.Il.blue,hc:o.Il.cyan},s.N("activeLinkForeground","Color of active links.")),Be=d("editorInlayHint.foreground",{dark:le,light:ce,hc:le},s.N("editorInlayHintForeground","Foreground color of inline hints")),ze=d("editorInlayHint.background",{dark:ce,light:le,hc:ce},s.N("editorInlayHintBackground","Background color of inline hints")),We=d("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hc:"#FFCC00"},s.N("editorLightBulbForeground","The color used for the lightbulb actions icon.")),Ve=d("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},s.N("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),He=new o.Il(new o.VS(155,185,85,.2)),$e=new o.Il(new o.VS(255,0,0,.2)),Ue=d("diffEditor.insertedTextBackground",{dark:He,light:He,hc:null},s.N("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),je=d("diffEditor.removedTextBackground",{dark:$e,light:$e,hc:null},s.N("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),qe=d("diffEditor.insertedTextBorder",{dark:null,light:null,hc:"#33ff2eff"},s.N("diffEditorInsertedOutline","Outline color for the text that got inserted.")),Ke=d("diffEditor.removedTextBorder",{dark:null,light:null,hc:"#FF008F"},s.N("diffEditorRemovedOutline","Outline color for text that got removed.")),Ge=d("diffEditor.border",{dark:null,light:null,hc:_},s.N("diffEditorBorder","Border color between the two text editors.")),Ye=d("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hc:null},s.N("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),Ze=d("list.focusBackground",{dark:null,light:null,hc:null},s.N("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Xe=d("list.focusForeground",{dark:null,light:null,hc:null},s.N("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Qe=d("list.focusOutline",{dark:m,light:m,hc:v},s.N("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Je=d("list.activeSelectionBackground",{dark:"#094771",light:"#0060C0",hc:null},s.N("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),et=d("list.activeSelectionForeground",{dark:o.Il.white,light:o.Il.white,hc:null},s.N("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),tt=d("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hc:null},s.N("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),it=d("list.inactiveSelectionForeground",{dark:null,light:null,hc:null},s.N("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),nt=d("list.inactiveFocusBackground",{dark:null,light:null,hc:null},s.N("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),ot=d("list.inactiveFocusOutline",{dark:null,light:null,hc:null},s.N("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),rt=d("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hc:null},s.N("listHoverBackground","List/Tree background when hovering over items using the mouse.")),st=d("list.hoverForeground",{dark:null,light:null,hc:null},s.N("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),at=d("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hc:null},s.N("listDropBackground","List/Tree drag and drop background when moving items around using the mouse.")),lt=d("list.highlightForeground",{dark:"#18A3FF",light:"#0066BF",hc:m},s.N("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),ct=d("list.focusHighlightForeground",{dark:lt,light:lt,hc:lt},s.N("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.")),ut=d("listFilterWidget.background",{light:"#efc1ad",dark:"#653723",hc:o.Il.black},s.N("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),ht=d("listFilterWidget.outline",{dark:o.Il.transparent,light:o.Il.transparent,hc:"#f38518"},s.N("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),dt=d("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hc:_},s.N("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),gt=d("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hc:"#a9a9a9"},s.N("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),ft=d("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hc:null},s.N("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),pt=d("quickInput.list.focusBackground",{dark:null,light:null,hc:null},"",void 0,s.N("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),mt=d("quickInputList.focusForeground",{dark:et,light:et,hc:et},s.N("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),_t=d("quickInputList.focusBackground",{dark:jt(pt,Je,"#062F4A"),light:jt(pt,Je,"#D6EBFF"),hc:null},s.N("quickInput.listFocusBackground","Quick picker background color for the focused item.")),vt=d("menu.border",{dark:null,light:null,hc:_},s.N("menuBorder","Border color of menus.")),bt=d("menu.foreground",{dark:B,light:g,hc:B},s.N("menuForeground","Foreground color of menu items.")),yt=d("menu.background",{dark:P,light:P,hc:P},s.N("menuBackground","Background color of menu items.")),wt=d("menu.selectionForeground",{dark:et,light:et,hc:et},s.N("menuSelectionForeground","Foreground color of the selected menu item in menus.")),Ct=d("menu.selectionBackground",{dark:Je,light:Je,hc:Je},s.N("menuSelectionBackground","Background color of the selected menu item in menus.")),St=d("menu.selectionBorder",{dark:null,light:null,hc:v},s.N("menuSelectionBorder","Border color of the selected menu item in menus.")),xt=d("menu.separatorBackground",{dark:"#BBBBBB",light:"#888888",hc:_},s.N("menuSeparatorBackground","Color of a separator menu item in menus.")),kt=d("editor.snippetTabstopHighlightBackground",{dark:new o.Il(new o.VS(124,124,124,.3)),light:new o.Il(new o.VS(10,50,100,.2)),hc:new o.Il(new o.VS(124,124,124,.3))},s.N("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),Dt=d("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hc:null},s.N("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),Lt=d("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hc:null},s.N("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),Nt=d("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new o.Il(new o.VS(10,50,100,.5)),hc:"#525252"},s.N("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),Et=d("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hc:"#AB5A00"},s.N("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),At=d("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},s.N("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Mt=d("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hc:"#AB5A00"},s.N("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),It=d("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hc:"#ffffff"},s.N("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),Tt=d("minimap.errorHighlight",{dark:new o.Il(new o.VS(255,18,18,.7)),light:new o.Il(new o.VS(255,18,18,.7)),hc:new o.Il(new o.VS(255,50,50,1))},s.N("minimapError","Minimap marker color for errors.")),Rt=d("minimap.warningHighlight",{dark:J,light:J,hc:ee},s.N("overviewRuleWarning","Minimap marker color for warnings.")),Ot=d("minimap.background",{dark:null,light:null,hc:null},s.N("minimapBackground","Minimap background color.")),Ft=d("minimapSlider.background",{light:Ut(j,.5),dark:Ut(j,.5),hc:Ut(j,.5)},s.N("minimapSliderBackground","Minimap slider background color.")),Pt=d("minimapSlider.hoverBackground",{light:Ut(q,.5),dark:Ut(q,.5),hc:Ut(q,.5)},s.N("minimapSliderHoverBackground","Minimap slider background color when hovering.")),Bt=d("minimapSlider.activeBackground",{light:Ut(K,.5),dark:Ut(K,.5),hc:Ut(K,.5)},s.N("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),zt=d("problemsErrorIcon.foreground",{dark:Z,light:Z,hc:Z},s.N("problemsErrorIconForeground","The color used for the problems error icon.")),Wt=d("problemsWarningIcon.foreground",{dark:J,light:J,hc:J},s.N("problemsWarningIconForeground","The color used for the problems warning icon.")),Vt=d("problemsInfoIcon.foreground",{dark:ie,light:ie,hc:ie},s.N("problemsInfoIconForeground","The color used for the problems info icon."));function Ht(e,t){return{op:0,value:e,factor:t}}function $t(e,t){return{op:1,value:e,factor:t}}function Ut(e,t){return{op:2,value:e,factor:t}}function jt(...e){return{op:3,values:e}}function qt(e,t,i,n){return{op:4,value:e,background:t,factor:i,transparency:n}}function Kt(e,t){if(null!==e)return"string"==typeof e?"#"===e[0]?o.Il.fromHex(e):t.getColor(e):e instanceof o.Il?e:"object"==typeof e?function(e,t){var i,n,r;switch(e.op){case 0:return null===(i=Kt(e.value,t))||void 0===i?void 0:i.darken(e.factor);case 1:return null===(n=Kt(e.value,t))||void 0===n?void 0:n.lighten(e.factor);case 2:return null===(r=Kt(e.value,t))||void 0===r?void 0:r.transparent(e.factor);case 3:for(const i of e.values){const e=Kt(i,t);if(e)return e}return;case 4:const s=Kt(e.value,t);if(!s)return;const a=Kt(e.background,t);return a?s.isDarkerThan(a)?o.Il.getLighterColor(s,a,e.factor).transparent(e.transparency):o.Il.getDarkerColor(s,a,e.factor).transparent(e.transparency):s.transparent(e.factor*e.transparency);default:throw(0,c.vE)(e)}}(e,t):void 0}const Gt="vscode://schemas/workbench-colors";let Yt=n.B.as(a.I.JSONContribution);Yt.registerSchema(Gt,h.getColorSchema());const Zt=new l.pY((()=>Yt.notifySchemaChanged(Gt)),200);h.onDidChangeSchema((()=>{Zt.isScheduled()||Zt.schedule()}))},9554:(e,t,i)=>{"use strict";i.d(t,{q5:()=>h,Ks:()=>d,s_:()=>m});var n=i(9872),o=i(7781),r=i(4669),s=i(3580),a=i(1294),l=i(5393),c=i(3046);const u=new class{constructor(){this._onDidChange=new r.Q5,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:(0,s.N)("iconDefintion.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:(0,s.N)("iconDefintion.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${c.dT.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,i,n){const o=this.iconsById[e];if(o){if(i&&!o.description){o.description=i,this.iconSchema.properties[e].markdownDescription=`${i} $(${e})`;const t=this.iconReferenceSchema.enum.indexOf(e);-1!==t&&(this.iconReferenceSchema.enumDescriptions[t]=i),this._onDidChange.fire()}return o}let r={id:e,description:i,defaults:t,deprecationMessage:n};this.iconsById[e]=r;let s={$ref:"#/definitions/icons"};return n&&(s.deprecationMessage=n),i&&(s.markdownDescription=`${i}: $(${e})`),this.iconSchema.properties[e]=s,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(i||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map((e=>this.iconsById[e]))}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}getIconFont(e){return this.iconFontsById[e]}toString(){const e=(e,t)=>e.id.localeCompare(t.id),t=e=>{for(;o.kS.isThemeIcon(e.defaults);)e=this.iconsById[e.defaults.id];return`codicon codicon-${e?e.id:""}`};let i=[];i.push("| preview | identifier | default codicon ID | description"),i.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const n=Object.keys(this.iconsById).map((e=>this.iconsById[e]));for(const r of n.filter((e=>!!e.description)).sort(e))i.push(`||${r.id}|${o.kS.isThemeIcon(r.defaults)?r.defaults.id:r.id}|${r.description||""}|`);i.push("| preview | identifier "),i.push("| ----------- | --------------------------------- |");for(const r of n.filter((e=>!o.kS.isThemeIcon(e.defaults))).sort(e))i.push(`||${r.id}|`);return i.join("\n")}};function h(e,t,i,n){return u.registerIcon(e,t,i,n)}function d(){return u}n.B.add("base.contributions.icons",u),function(){for(const e of c.fK.all)u.registerIcon(e.id,e.definition,e.description);c.fK.onDidRegister((e=>u.registerIcon(e.id,e.definition,e.description)))}();const g="vscode://schemas/icons";let f=n.B.as(a.I.JSONContribution);f.registerSchema(g,u.getIconSchema());const p=new l.pY((()=>f.notifySchemaChanged(g)),200);u.onDidChange((()=>{p.isScheduled()||p.schedule()}));const m=h("widget-close",c.lA.close,(0,s.N)("widgetClose","Icon for the close action in widgets."))},8810:(e,t,i)=>{"use strict";i.d(t,{o:()=>o,WZ:()=>s,Jl:()=>a,O2:()=>l,tj:()=>u});var n=i(3910);function o(e,t){const i=Object.create(null);for(let o in t){const r=t[o];r&&(i[o]=(0,n.Sn)(r,e))}return i}function r(e,t,i){function n(){const n=o(e.getColorTheme(),t);"function"==typeof i?i(n):i.style(n)}return n(),e.onDidColorThemeChange(n)}function s(e,t,i){return r(t,{badgeBackground:(null==i?void 0:i.badgeBackground)||n.g8,badgeForeground:(null==i?void 0:i.badgeForeground)||n.qe,badgeBorder:n.lR},e)}function a(e,t,i){return r(t,Object.assign(Object.assign({},l),i||{}),e)}const l={listFocusBackground:n._b,listFocusForeground:n._2,listFocusOutline:n.Oo,listActiveSelectionBackground:n.dC,listActiveSelectionForeground:n.M6,listFocusAndSelectionBackground:n.dC,listFocusAndSelectionForeground:n.M6,listInactiveSelectionBackground:n.rg,listInactiveSelectionForeground:n.yt,listInactiveFocusBackground:n.s$,listInactiveFocusOutline:n.F3,listHoverBackground:n.mV,listHoverForeground:n.$d,listDropBackground:n.AS,listSelectionOutline:n.xL,listHoverOutline:n.xL,listFilterWidgetBackground:n.vG,listFilterWidgetOutline:n.oS,listFilterWidgetNoMatchesOutline:n.S,listMatchesShadow:n.rh,treeIndentGuidesStroke:n.Un,tableColumnsBorder:n.ux},c={shadowColor:n.rh,borderColor:n.Cd,foregroundColor:n.DE,backgroundColor:n.Hz,selectionForegroundColor:n.jb,selectionBackgroundColor:n.$D,selectionBorderColor:n.E3,separatorColor:n.ZG};function u(e,t,i){return r(t,Object.assign(Object.assign({},c),i),e)}},2321:(e,t,i)=>{"use strict";var n;i.d(t,{e:()=>n}),function(e){e.DARK="dark",e.LIGHT="light",e.HIGH_CONTRAST="hc"}(n||(n={}))},7781:(e,t,i)=>{"use strict";i.d(t,{XE:()=>c,EN:()=>d,kS:()=>h,m6:()=>g,IP:()=>f,Ic:()=>m,bB:()=>_});var n=i(2065),o=i(5976),r=i(9872),s=i(4669),a=i(2321),l=i(3046);const c=(0,n.yh)("themeService");var u,h;function d(e){return{id:e}}function g(e){switch(e){case a.e.DARK:return"vs-dark";case a.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}!function(e){e.isThemeColor=function(e){return e&&"object"==typeof e&&"string"==typeof e.id}}(u||(u={})),function(e){e.isThemeIcon=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&(void 0===e.color||u.isThemeColor(e.color))};const t=new RegExp(`^\\$\\((${l.dT.iconNameExpression}(?:${l.dT.iconModifierExpression})?)\\)$`);e.fromString=function(e){const i=t.exec(e);if(!i)return;let[,n]=i;return{id:n}},e.modify=function(e,t){let i=e.id;const n=i.lastIndexOf("~");return-1!==n&&(i=i.substring(0,n)),t&&(i=`${i}~${t}`),{id:i}},e.isEqual=function(e,t){var i,n;return e.id===t.id&&(null===(i=e.color)||void 0===i?void 0:i.id)===(null===(n=t.color)||void 0===n?void 0:n.id)},e.asThemeIcon=function(e){return{id:e.id}},e.asClassNameArray=l.dT.asClassNameArray,e.asClassName=l.dT.asClassName,e.asCSSSelector=l.dT.asCSSSelector}(h||(h={}));const f={ThemingContribution:"base.contributions.theming"};let p=new class{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new s.Q5}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),(0,o.OF)((()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)}))}getThemingParticipants(){return this.themingParticipants}};function m(e){return p.onColorThemeChange(e)}r.B.add(f.ThemingContribution,p);class _ extends o.JT{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange((e=>this.onThemeChange(e))))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}},4862:(e,t,i)=>{"use strict";i.d(t,{tJ:()=>n,YO:()=>o,Xt:()=>r,gJ:()=>s});const n=(0,i(2065).yh)("undoRedoService");class o{constructor(e,t){this.resource=e,this.elements=t}}class r{constructor(){this.id=r._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}r._ID=0,r.None=new r;class s{constructor(){this.id=s._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}s._ID=0,s.None=new s},382:(e,t,i)=>{"use strict";i.d(t,{ec:()=>o,md:()=>r});var n=i(2065);i(3702);const o=(0,n.yh)("contextService");class r{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}},4173:function(e,t,i){var n;(function(o,r){"use strict";function s(){a.width=o.innerWidth,a.height=5*d.barThickness;var e=a.getContext("2d");e.shadowBlur=d.shadowBlur,e.shadowColor=d.shadowColor;var t,i=e.createLinearGradient(0,0,a.width,0);for(t in d.barColors)i.addColorStop(t,d.barColors[t]);e.lineWidth=d.barThickness,e.beginPath(),e.moveTo(0,d.barThickness/2),e.lineTo(Math.ceil(u*a.width),d.barThickness/2),e.strokeStyle=i,e.stroke()}!function(){for(var e=0,t=["ms","moz","webkit","o"],i=0;i{const n=Symbol("SemVer ANY");class o{static get ANY(){return n}constructor(e,t){if(t=r(t),e instanceof o){if(e.loose===!!t.loose)return e;e=e.value}c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],i=e.match(t);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==i[1]?i[1]:"","="===this.operator&&(this.operator=""),i[2]?this.semver=new u(i[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new h(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new h(this.value,t).test(e.semver);const i=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),n=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),r=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=l(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=l(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return i||n||r&&s||a||c}}e.exports=o;const r=i(4167),{re:s,t:a}=i(6152),l=i(1427),c=i(4272),u=i(7800),h=i(1540)},1540:(e,t,i)=>{class n{constructor(e,t){if(t=r(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof s)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!f(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&p(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,i=o.get(t);if(i)return i;const n=this.options.loose,r=n?c[u.HYPHENRANGELOOSE]:c[u.HYPHENRANGE];e=e.replace(r,L(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(c[u.COMPARATORTRIM],h),a("comparator trim",e,c[u.COMPARATORTRIM]),e=(e=(e=e.replace(c[u.TILDETRIM],d)).replace(c[u.CARETTRIM],g)).split(/\s+/).join(" ");const l=n?c[u.COMPARATORLOOSE]:c[u.COMPARATOR],p=e.split(" ").map((e=>_(e,this.options))).join(" ").split(/\s+/).map((e=>D(e,this.options))).filter(this.options.loose?e=>!!e.match(l):()=>!0).map((e=>new s(e,this.options))),m=(p.length,new Map);for(const e of p){if(f(e))return[e];m.set(e.value,e)}m.size>1&&m.has("")&&m.delete("");const v=[...m.values()];return o.set(t,v),v}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some((i=>m(i,t)&&e.set.some((e=>m(e,t)&&i.every((i=>e.every((e=>i.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}for(let t=0;t"<0.0.0-0"===e.value,p=e=>""===e.value,m=(e,t)=>{let i=!0;const n=e.slice();let o=n.pop();for(;i&&n.length;)i=n.every((e=>o.intersects(e,t))),o=n.pop();return i},_=(e,t)=>(a("comp",e,t),e=w(e,t),a("caret",e),e=b(e,t),a("tildes",e),e=S(e,t),a("xrange",e),e=k(e,t),a("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,b=(e,t)=>e.trim().split(/\s+/).map((e=>y(e,t))).join(" "),y=(e,t)=>{const i=t.loose?c[u.TILDELOOSE]:c[u.TILDE];return e.replace(i,((t,i,n,o,r)=>{let s;return a("tilde",e,t,i,n,o,r),v(i)?s="":v(n)?s=`>=${i}.0.0 <${+i+1}.0.0-0`:v(o)?s=`>=${i}.${n}.0 <${i}.${+n+1}.0-0`:r?(a("replaceTilde pr",r),s=`>=${i}.${n}.${o}-${r} <${i}.${+n+1}.0-0`):s=`>=${i}.${n}.${o} <${i}.${+n+1}.0-0`,a("tilde return",s),s}))},w=(e,t)=>e.trim().split(/\s+/).map((e=>C(e,t))).join(" "),C=(e,t)=>{a("caret",e,t);const i=t.loose?c[u.CARETLOOSE]:c[u.CARET],n=t.includePrerelease?"-0":"";return e.replace(i,((t,i,o,r,s)=>{let l;return a("caret",e,t,i,o,r,s),v(i)?l="":v(o)?l=`>=${i}.0.0${n} <${+i+1}.0.0-0`:v(r)?l="0"===i?`>=${i}.${o}.0${n} <${i}.${+o+1}.0-0`:`>=${i}.${o}.0${n} <${+i+1}.0.0-0`:s?(a("replaceCaret pr",s),l="0"===i?"0"===o?`>=${i}.${o}.${r}-${s} <${i}.${o}.${+r+1}-0`:`>=${i}.${o}.${r}-${s} <${i}.${+o+1}.0-0`:`>=${i}.${o}.${r}-${s} <${+i+1}.0.0-0`):(a("no pr"),l="0"===i?"0"===o?`>=${i}.${o}.${r}${n} <${i}.${o}.${+r+1}-0`:`>=${i}.${o}.${r}${n} <${i}.${+o+1}.0-0`:`>=${i}.${o}.${r} <${+i+1}.0.0-0`),a("caret return",l),l}))},S=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map((e=>x(e,t))).join(" ")),x=(e,t)=>{e=e.trim();const i=t.loose?c[u.XRANGELOOSE]:c[u.XRANGE];return e.replace(i,((i,n,o,r,s,l)=>{a("xRange",e,i,n,o,r,s,l);const c=v(o),u=c||v(r),h=u||v(s),d=h;return"="===n&&d&&(n=""),l=t.includePrerelease?"-0":"",c?i=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(u&&(r=0),s=0,">"===n?(n=">=",u?(o=+o+1,r=0,s=0):(r=+r+1,s=0)):"<="===n&&(n="<",u?o=+o+1:r=+r+1),"<"===n&&(l="-0"),i=`${n+o}.${r}.${s}${l}`):u?i=`>=${o}.0.0${l} <${+o+1}.0.0-0`:h&&(i=`>=${o}.${r}.0${l} <${o}.${+r+1}.0-0`),a("xRange return",i),i}))},k=(e,t)=>(a("replaceStars",e,t),e.trim().replace(c[u.STAR],"")),D=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),L=e=>(t,i,n,o,r,s,a,l,c,u,h,d,g)=>`${i=v(n)?"":v(o)?`>=${n}.0.0${e?"-0":""}`:v(r)?`>=${n}.${o}.0${e?"-0":""}`:s?`>=${i}`:`>=${i}${e?"-0":""}`} ${l=v(c)?"":v(u)?`<${+c+1}.0.0-0`:v(h)?`<${c}.${+u+1}.0-0`:d?`<=${c}.${u}.${h}-${d}`:e?`<${c}.${u}.${+h+1}-0`:`<=${l}`}`.trim(),N=(e,t,i)=>{for(let i=0;i0){const n=e[i].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},7800:(e,t,i)=>{const n=i(4272),{MAX_LENGTH:o,MAX_SAFE_INTEGER:r}=i(1266),{re:s,t:a}=i(6152),l=i(4167),{compareIdentifiers:c}=i(4126);class u{constructor(e,t){if(t=l(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>o)throw new TypeError(`version is longer than ${o} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const i=e.trim().match(t.loose?s[a.LOOSE]:s[a.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}e.exports=u},3974:(e,t,i)=>{const n=i(155);e.exports=(e,t)=>{const i=n(e.trim().replace(/^[=v]+/,""),t);return i?i.version:null}},1427:(e,t,i)=>{const n=i(3641),o=i(7351),r=i(3365),s=i(4457),a=i(2687),l=i(6039);e.exports=(e,t,i,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof i&&(i=i.version),e===i;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof i&&(i=i.version),e!==i;case"":case"=":case"==":return n(e,i,c);case"!=":return o(e,i,c);case">":return r(e,i,c);case">=":return s(e,i,c);case"<":return a(e,i,c);case"<=":return l(e,i,c);default:throw new TypeError(`Invalid operator: ${t}`)}}},6751:(e,t,i)=>{const n=i(7800),o=i(155),{re:r,t:s}=i(6152);e.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let i=null;if((t=t||{}).rtl){let t;for(;(t=r[s.COERCERTL].exec(e))&&(!i||i.index+i[0].length!==e.length);)i&&t.index+t[0].length===i.index+i[0].length||(i=t),r[s.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;r[s.COERCERTL].lastIndex=-1}else i=e.match(r[s.COERCE]);return null===i?null:o(`${i[2]}.${i[3]||"0"}.${i[4]||"0"}`,t)}},2995:(e,t,i)=>{const n=i(7800);e.exports=(e,t,i)=>{const o=new n(e,i),r=new n(t,i);return o.compare(r)||o.compareBuild(r)}},1844:(e,t,i)=>{const n=i(6004);e.exports=(e,t)=>n(e,t,!0)},6004:(e,t,i)=>{const n=i(7800);e.exports=(e,t,i)=>new n(e,i).compare(new n(t,i))},2513:(e,t,i)=>{const n=i(155),o=i(3641);e.exports=(e,t)=>{if(o(e,t))return null;{const i=n(e),o=n(t),r=i.prerelease.length||o.prerelease.length,s=r?"pre":"",a=r?"prerelease":"";for(const e in i)if(("major"===e||"minor"===e||"patch"===e)&&i[e]!==o[e])return s+e;return a}}},3641:(e,t,i)=>{const n=i(6004);e.exports=(e,t,i)=>0===n(e,t,i)},3365:(e,t,i)=>{const n=i(6004);e.exports=(e,t,i)=>n(e,t,i)>0},4457:(e,t,i)=>{const n=i(6004);e.exports=(e,t,i)=>n(e,t,i)>=0},3866:(e,t,i)=>{const n=i(7800);e.exports=(e,t,i,o)=>{"string"==typeof i&&(o=i,i=void 0);try{return new n(e,i).inc(t,o).version}catch(e){return null}}},2687:(e,t,i)=>{const n=i(6004);e.exports=(e,t,i)=>n(e,t,i)<0},6039:(e,t,i)=>{const n=i(6004);e.exports=(e,t,i)=>n(e,t,i)<=0},2439:(e,t,i)=>{const n=i(7800);e.exports=(e,t)=>new n(e,t).major},3332:(e,t,i)=>{const n=i(7800);e.exports=(e,t)=>new n(e,t).minor},7351:(e,t,i)=>{const n=i(6004);e.exports=(e,t,i)=>0!==n(e,t,i)},155:(e,t,i)=>{const{MAX_LENGTH:n}=i(1266),{re:o,t:r}=i(6152),s=i(7800),a=i(4167);e.exports=(e,t)=>{if(t=a(t),e instanceof s)return e;if("string"!=typeof e)return null;if(e.length>n)return null;if(!(t.loose?o[r.LOOSE]:o[r.FULL]).test(e))return null;try{return new s(e,t)}catch(e){return null}}},8425:(e,t,i)=>{const n=i(7800);e.exports=(e,t)=>new n(e,t).patch},1298:(e,t,i)=>{const n=i(155);e.exports=(e,t)=>{const i=n(e,t);return i&&i.prerelease.length?i.prerelease:null}},2737:(e,t,i)=>{const n=i(6004);e.exports=(e,t,i)=>n(t,e,i)},1761:(e,t,i)=>{const n=i(2995);e.exports=(e,t)=>e.sort(((e,i)=>n(i,e,t)))},826:(e,t,i)=>{const n=i(1540);e.exports=(e,t,i)=>{try{t=new n(t,i)}catch(e){return!1}return t.test(e)}},5626:(e,t,i)=>{const n=i(2995);e.exports=(e,t)=>e.sort(((e,i)=>n(e,i,t)))},6798:(e,t,i)=>{const n=i(155);e.exports=(e,t)=>{const i=n(e,t);return i?i.version:null}},2543:(e,t,i)=>{const n=i(6152);e.exports={re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:i(1266).SEMVER_SPEC_VERSION,SemVer:i(7800),compareIdentifiers:i(4126).compareIdentifiers,rcompareIdentifiers:i(4126).rcompareIdentifiers,parse:i(155),valid:i(6798),clean:i(3974),inc:i(3866),diff:i(2513),major:i(2439),minor:i(3332),patch:i(8425),prerelease:i(1298),compare:i(6004),rcompare:i(2737),compareLoose:i(1844),compareBuild:i(2995),sort:i(5626),rsort:i(1761),gt:i(3365),lt:i(2687),eq:i(3641),neq:i(7351),gte:i(4457),lte:i(6039),cmp:i(1427),coerce:i(6751),Comparator:i(4890),Range:i(1540),satisfies:i(826),toComparators:i(434),maxSatisfying:i(4600),minSatisfying:i(142),minVersion:i(734),validRange:i(2617),outside:i(2416),gtr:i(9903),ltr:i(1611),intersects:i(1413),simplifyRange:i(9901),subset:i(2792)}},1266:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},4272:e=>{const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},4126:e=>{const t=/^[0-9]+$/,i=(e,i)=>{const n=t.test(e),o=t.test(i);return n&&o&&(e=+e,i=+i),e===i?0:n&&!o?-1:o&&!n?1:ei(t,e)}},4167:e=>{const t=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:t.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{}},6152:(e,t,i)=>{const{MAX_SAFE_COMPONENT_LENGTH:n}=i(1266),o=i(4272),r=(t=e.exports={}).re=[],s=t.src=[],a=t.t={};let l=0;const c=(e,t,i)=>{const n=l++;o(n,t),a[e]=n,s[n]=t,r[n]=new RegExp(t,i?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION",`(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${s[a.NUMERICIDENTIFIER]}|${s[a.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${s[a.NUMERICIDENTIFIERLOOSE]}|${s[a.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${s[a.PRERELEASEIDENTIFIER]}(?:\\.${s[a.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${s[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${s[a.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD",`(?:\\+(${s[a.BUILDIDENTIFIER]}(?:\\.${s[a.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${s[a.MAINVERSION]}${s[a.PRERELEASE]}?${s[a.BUILD]}?`),c("FULL",`^${s[a.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${s[a.MAINVERSIONLOOSE]}${s[a.PRERELEASELOOSE]}?${s[a.BUILD]}?`),c("LOOSE",`^${s[a.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${s[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${s[a.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:${s[a.PRERELEASE]})?${s[a.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:${s[a.PRERELEASELOOSE]})?${s[a.BUILD]}?)?)?`),c("XRANGE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAINLOOSE]}$`),c("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),c("COERCERTL",s[a.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${s[a.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",c("TILDE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${s[a.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",c("CARET",`^${s[a.LONECARET]}${s[a.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${s[a.LONECARET]}${s[a.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${s[a.GTLT]}\\s*(${s[a.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]}|${s[a.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${s[a.XRANGEPLAIN]})\\s+-\\s+(${s[a.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${s[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${s[a.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0.0.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},9903:(e,t,i)=>{const n=i(2416);e.exports=(e,t,i)=>n(e,t,">",i)},1413:(e,t,i)=>{const n=i(1540);e.exports=(e,t,i)=>(e=new n(e,i),t=new n(t,i),e.intersects(t))},1611:(e,t,i)=>{const n=i(2416);e.exports=(e,t,i)=>n(e,t,"<",i)},4600:(e,t,i)=>{const n=i(7800),o=i(1540);e.exports=(e,t,i)=>{let r=null,s=null,a=null;try{a=new o(t,i)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(r&&-1!==s.compare(e)||(r=e,s=new n(r,i)))})),r}},142:(e,t,i)=>{const n=i(7800),o=i(1540);e.exports=(e,t,i)=>{let r=null,s=null,a=null;try{a=new o(t,i)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(r&&1!==s.compare(e)||(r=e,s=new n(r,i)))})),r}},734:(e,t,i)=>{const n=i(7800),o=i(1540),r=i(3365);e.exports=(e,t)=>{e=new o(e,t);let i=new n("0.0.0");if(e.test(i))return i;if(i=new n("0.0.0-0"),e.test(i))return i;i=null;for(let t=0;t{const t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":s&&!r(t,s)||(s=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!s||i&&!r(i,s)||(i=s)}return i&&e.test(i)?i:null}},2416:(e,t,i)=>{const n=i(7800),o=i(4890),{ANY:r}=o,s=i(1540),a=i(826),l=i(3365),c=i(2687),u=i(6039),h=i(4457);e.exports=(e,t,i,d)=>{let g,f,p,m,_;switch(e=new n(e,d),t=new s(t,d),i){case">":g=l,f=u,p=c,m=">",_=">=";break;case"<":g=c,f=h,p=l,m="<",_="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,d))return!1;for(let i=0;i{e.semver===r&&(e=new o(">=0.0.0")),s=s||e,a=a||e,g(e.semver,s.semver,d)?s=e:p(e.semver,a.semver,d)&&(a=e)})),s.operator===m||s.operator===_)return!1;if((!a.operator||a.operator===m)&&f(e,a.semver))return!1;if(a.operator===_&&p(e,a.semver))return!1}return!0}},9901:(e,t,i)=>{const n=i(826),o=i(6004);e.exports=(e,t,i)=>{const r=[];let s=null,a=null;const l=e.sort(((e,t)=>o(e,t,i)));for(const e of l)n(e,t,i)?(a=e,s||(s=e)):(a&&r.push([s,a]),a=null,s=null);s&&r.push([s,null]);const c=[];for(const[e,t]of r)e===t?c.push(e):t||e!==l[0]?t?e===l[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const u=c.join(" || "),h="string"==typeof t.raw?t.raw:String(t);return u.length{const n=i(1540),o=i(4890),{ANY:r}=o,s=i(826),a=i(6004),l=(e,t,i)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===r){if(1===t.length&&t[0].semver===r)return!0;e=i.includePrerelease?[new o(">=0.0.0-0")]:[new o(">=0.0.0")]}if(1===t.length&&t[0].semver===r){if(i.includePrerelease)return!0;t=[new o(">=0.0.0")]}const n=new Set;let l,h,d,g,f,p,m;for(const t of e)">"===t.operator||">="===t.operator?l=c(l,t,i):"<"===t.operator||"<="===t.operator?h=u(h,t,i):n.add(t.semver);if(n.size>1)return null;if(l&&h){if(d=a(l.semver,h.semver,i),d>0)return null;if(0===d&&(">="!==l.operator||"<="!==h.operator))return null}for(const e of n){if(l&&!s(e,String(l),i))return null;if(h&&!s(e,String(h),i))return null;for(const n of t)if(!s(e,String(n),i))return!1;return!0}let _=!(!h||i.includePrerelease||!h.semver.prerelease.length)&&h.semver,v=!(!l||i.includePrerelease||!l.semver.prerelease.length)&&l.semver;_&&1===_.prerelease.length&&"<"===h.operator&&0===_.prerelease[0]&&(_=!1);for(const e of t){if(m=m||">"===e.operator||">="===e.operator,p=p||"<"===e.operator||"<="===e.operator,l)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if(g=c(l,e,i),g===e&&g!==l)return!1}else if(">="===l.operator&&!s(l.semver,String(e),i))return!1;if(h)if(_&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===_.major&&e.semver.minor===_.minor&&e.semver.patch===_.patch&&(_=!1),"<"===e.operator||"<="===e.operator){if(f=u(h,e,i),f===e&&f!==h)return!1}else if("<="===h.operator&&!s(h.semver,String(e),i))return!1;if(!e.operator&&(h||l)&&0!==d)return!1}return!(l&&p&&!h&&0!==d||h&&m&&!l&&0!==d||v||_)},c=(e,t,i)=>{if(!e)return t;const n=a(e.semver,t.semver,i);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},u=(e,t,i)=>{if(!e)return t;const n=a(e.semver,t.semver,i);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,i={})=>{if(e===t)return!0;e=new n(e,i),t=new n(t,i);let o=!1;e:for(const n of e.set){for(const e of t.set){const t=l(n,e,i);if(o=o||null!==t,t)continue e}if(o)return!1}return!0}},434:(e,t,i)=>{const n=i(1540);e.exports=(e,t)=>new n(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},2617:(e,t,i)=>{const n=i(1540);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},9602:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},4411:(e,t,i)=>{"use strict";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var i=0,o=arguments.length;i1)i=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,i=this.head.value}for(var o=0;null!==n;o++)i=e(i,n.value,o),n=n.next;return i},n.prototype.reduceReverse=function(e,t){var i,n=this.tail;if(arguments.length>1)i=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,i=this.tail.value}for(var o=this.length-1;null!==n;o--)i=e(i,n.value,o),n=n.prev;return i},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,i=this.head;null!==i;t++)e[t]=i.value,i=i.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,i=this.tail;null!==i;t++)e[t]=i.value,i=i.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var i=new n;if(tthis.length&&(t=this.length);for(var o=0,r=this.head;null!==r&&othis.length&&(t=this.length);for(var o=this.length,r=this.tail;null!==r&&o>t;o--)r=r.prev;for(;null!==r&&o>e;o--,r=r.prev)i.push(r.value);return i},n.prototype.splice=function(e,t,...i){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,r=this.head;null!==r&&n{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,i)=>(n.f[i](e,t),t)),[])),n.u=e=>e+".js",n.miniCssF=e=>{},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},n.l=(t,i,o,r)=>{if(e[t])e[t].push(i);else{var s,a;if(void 0!==o)for(var l=document.getElementsByTagName("script"),c=0;c{s.onerror=s.onload=null,clearTimeout(d);var o=e[t];if(delete e[t],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((e=>e(n))),i)return i(n)},d=setTimeout(h.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=h.bind(null,s.onerror),s.onload=h.bind(null,s.onload),a&&document.head.appendChild(s)}},n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/js/",(()=>{var e={143:0};n.f.j=(t,i)=>{var o=n.o(e,t)?e[t]:void 0;if(0!==o)if(o)i.push(o[2]);else{var r=new Promise(((i,n)=>o=e[t]=[i,n]));i.push(o[2]=r);var s=n.p+n.u(t),a=new Error;n.l(s,(i=>{if(n.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var r=i&&("load"===i.type?"missing":i.type),s=i&&i.target&&i.target.src;a.message="Loading chunk "+t+" failed.\n("+r+": "+s+")",a.name="ChunkLoadError",a.type=r,a.request=s,o[1](a)}}),"chunk-"+t,t)}};var t=(t,i)=>{var o,r,[s,a,l]=i,c=0;for(o in a)n.o(a,o)&&(n.m[o]=a[o]);for(l&&l(n),t&&t(i);c{var e,t={5488:(e,t,i)=>{"use strict";var n={};i.r(n),i.d(n,{aggregate:()=>Du,bin:()=>Lu,collect:()=>Eu,compare:()=>Au,countpattern:()=>Iu,cross:()=>Tu,density:()=>Fu,dotbin:()=>Vu,expression:()=>Hu,extent:()=>Uu,facet:()=>qu,field:()=>Ku,filter:()=>Yu,flatten:()=>Zu,fold:()=>Xu,formula:()=>Qu,generate:()=>Ju,impute:()=>ih,joinaggregate:()=>nh,kde:()=>oh,key:()=>rh,load:()=>ah,lookup:()=>ch,multiextent:()=>uh,multivalues:()=>dh,params:()=>fh,pivot:()=>ph,prefacet:()=>mh,project:()=>_h,proxy:()=>vh,quantile:()=>bh,relay:()=>yh,sample:()=>wh,sequence:()=>Ch,sieve:()=>Sh,subflow:()=>ju,timeunit:()=>xh,tupleindex:()=>Dh,values:()=>Lh,window:()=>Ih});var o={};i.r(o),i.d(o,{interpolate:()=>af,interpolateArray:()=>Qg,interpolateBasis:()=>Wg,interpolateBasisClosed:()=>Vg,interpolateCubehelix:()=>Up,interpolateCubehelixLong:()=>jp,interpolateDate:()=>ef,interpolateDiscrete:()=>Zf,interpolateHcl:()=>Ap,interpolateHclLong:()=>Mp,interpolateHsl:()=>lp,interpolateHslLong:()=>cp,interpolateHue:()=>Xf,interpolateLab:()=>Np,interpolateNumber:()=>tf,interpolateNumberArray:()=>Zg,interpolateObject:()=>nf,interpolateRgb:()=>qg,interpolateRgbBasis:()=>Gg,interpolateRgbBasisClosed:()=>Yg,interpolateRound:()=>lf,interpolateString:()=>sf,interpolateTransformCss:()=>np,interpolateTransformSvg:()=>op,interpolateZoom:()=>sp,piecewise:()=>Kf,quantize:()=>qp});var r={};i.r(r),i.d(r,{bound:()=>sC,identifier:()=>cC,mark:()=>uC,overlap:()=>hC,render:()=>vC,viewlayout:()=>zC});var s={};i.r(s),i.d(s,{axisticks:()=>VC,datajoin:()=>HC,encode:()=>UC,legendentries:()=>jC,linkpath:()=>ZC,pie:()=>tS,scale:()=>oS,sortitems:()=>lS,stack:()=>gS});var a={};i.r(a),i.d(a,{contour:()=>UD,geojson:()=>KD,geopath:()=>GD,geopoint:()=>YD,geoshape:()=>ZD,graticule:()=>XD,heatmap:()=>QD,isocontour:()=>RD,kde2d:()=>VD,projection:()=>eL});var l={};i.r(l),i.d(l,{force:()=>YL});var c={};i.r(c),i.d(c,{nest:()=>YN,pack:()=>tE,partition:()=>nE,stratify:()=>oE,tree:()=>aE,treelinks:()=>lE,treemap:()=>hE});var u={};i.r(u),i.d(u,{label:()=>AE});var h={};i.r(h),i.d(h,{loess:()=>IE,regression:()=>RE});var d={};i.r(d),i.d(d,{voronoi:()=>nA});var g={};i.r(g),i.d(g,{wordcloud:()=>_A});var f={};i.r(f),i.d(f,{crossfilter:()=>xA,resolvefilter:()=>kA});var p={};i.r(p),i.d(p,{Bounds:()=>ov,CanvasHandler:()=>Ty,CanvasRenderer:()=>By,DATE:()=>Mr,DAY:()=>Ir,DAYOFYEAR:()=>Tr,Dataflow:()=>ic,Debug:()=>si,Error:()=>ni,EventStream:()=>Hl,Gradient:()=>h_,GroupItem:()=>sv,HOURS:()=>Rr,Handler:()=>py,Info:()=>ri,Item:()=>rv,MILLISECONDS:()=>Pr,MINUTES:()=>Or,MONTH:()=>Er,Marks:()=>Jb,MultiPulse:()=>Ql,None:()=>ii,Operator:()=>zl,Parameters:()=>Fl,Pulse:()=>Gl,QUARTER:()=>Nr,RenderType:()=>kw,Renderer:()=>_y,ResourceLoader:()=>av,SECONDS:()=>Fr,SVGHandler:()=>Wy,SVGRenderer:()=>uw,SVGStringRenderer:()=>xw,Scenegraph:()=>ay,TIME_UNITS:()=>Br,Transform:()=>oc,View:()=>ER,WEEK:()=>Ar,Warn:()=>oi,YEAR:()=>Lr,accessor:()=>Wt,accessorFields:()=>Ht,accessorName:()=>Vt,array:()=>Ti,ascending:()=>Pi,bandwidthNRD:()=>bc,bin:()=>yc,bootstrapCI:()=>Sc,boundClip:()=>Tw,boundContext:()=>Nv,boundItem:()=>ey,boundMark:()=>iy,boundStroke:()=>uv,changeset:()=>Rl,clampRange:()=>Ri,codegenExpression:()=>IM,compare:()=>Fi,constant:()=>Vi,cumulativeLogNormal:()=>Bc,cumulativeNormal:()=>Ic,cumulativeUniform:()=>Uc,dayofyear:()=>jr,debounce:()=>Hi,defaultLocale:()=>_l,definition:()=>sc,densityLogNormal:()=>Pc,densityNormal:()=>Mc,densityUniform:()=>$c,domChild:()=>hy,domClear:()=>dy,domCreate:()=>cy,domFind:()=>uy,dotbin:()=>xc,error:()=>qt,expressionFunction:()=>MT,extend:()=>$i,extent:()=>Ui,extentIndex:()=>ji,falsy:()=>ei,fastmap:()=>Yi,field:()=>Gt,flush:()=>Zi,font:()=>Kb,fontFamily:()=>qb,fontSize:()=>Vb,format:()=>io,formatLocale:()=>cl,formats:()=>no,hasOwnProperty:()=>Ki,id:()=>Yt,identity:()=>Zt,inferType:()=>On,inferTypes:()=>Fn,ingest:()=>Nl,inherits:()=>Xi,inrange:()=>Qi,interpolate:()=>Fm,interpolateColors:()=>Tm,interpolateRange:()=>Im,intersect:()=>Nw,intersectBoxLine:()=>zv,intersectPath:()=>Ov,intersectPoint:()=>Fv,intersectRule:()=>Bv,isArray:()=>li,isBoolean:()=>Ji,isDate:()=>en,isFunction:()=>Oi,isIterable:()=>tn,isNumber:()=>nn,isObject:()=>ci,isRegExp:()=>on,isString:()=>rn,isTuple:()=>kl,key:()=>sn,lerp:()=>an,lineHeight:()=>Hb,loader:()=>yl,locale:()=>ml,logger:()=>ai,lruCache:()=>ln,markup:()=>nw,merge:()=>cn,mergeConfig:()=>hi,multiLineOffset:()=>Ub,one:()=>Qt,pad:()=>hn,panLinear:()=>Ci,panLog:()=>Si,panPow:()=>xi,panSymlog:()=>ki,parse:()=>CB,parseExpression:()=>EM,parseSelector:()=>BR,pathCurves:()=>g_,pathEqual:()=>Ow,pathParse:()=>m_,pathRectangle:()=>W_,pathRender:()=>L_,pathSymbols:()=>M_,pathTrail:()=>V_,peek:()=>fi,point:()=>fy,projection:()=>CD,quantileLogNormal:()=>zc,quantileNormal:()=>Tc,quantileUniform:()=>jc,quantiles:()=>_c,quantizeInterpolator:()=>Rm,quarter:()=>Mi,quartiles:()=>vc,random:()=>wc,randomInteger:()=>Dc,randomKDE:()=>Oc,randomLCG:()=>kc,randomLogNormal:()=>Wc,randomMixture:()=>Vc,randomNormal:()=>Rc,randomUniform:()=>qc,read:()=>bl,regressionExp:()=>Jc,regressionLinear:()=>Xc,regressionLoess:()=>ou,regressionLog:()=>Qc,regressionPoly:()=>iu,regressionPow:()=>eu,regressionQuad:()=>tu,renderModule:()=>Lw,repeat:()=>un,resetDefaultLocale:()=>vl,resetSVGClipId:()=>iv,resetSVGDefIds:()=>Fw,responseType:()=>oo,runtimeContext:()=>VT,sampleCurve:()=>lu,sampleLogNormal:()=>Fc,sampleNormal:()=>Ac,sampleUniform:()=>Hc,scale:()=>Cm,sceneEqual:()=>Rw,sceneFromJSON:()=>ry,scenePickVisit:()=>Zv,sceneToJSON:()=>oy,sceneVisit:()=>Yv,sceneZOrder:()=>Gv,scheme:()=>Wm,serializeXML:()=>ow,setRandom:()=>Cc,span:()=>dn,splitAccessPath:()=>Kt,stringValue:()=>gn,textMetrics:()=>Ob,timeBin:()=>As,timeFloor:()=>as,timeFormatLocale:()=>fl,timeInterval:()=>gs,timeOffset:()=>ms,timeSequence:()=>bs,timeUnitSpecifier:()=>Hr,timeUnits:()=>Wr,toBoolean:()=>fn,toDate:()=>mn,toNumber:()=>pi,toSet:()=>vn,toString:()=>_n,transform:()=>ac,transforms:()=>rc,truncate:()=>bn,truthy:()=>Jt,tupleid:()=>Dl,typeParsers:()=>In,utcFloor:()=>us,utcInterval:()=>fs,utcOffset:()=>_s,utcSequence:()=>ys,utcdayofyear:()=>Xr,utcquarter:()=>Ii,utcweek:()=>Qr,version:()=>SB,visitArray:()=>yn,week:()=>qr,writeConfig:()=>di,zero:()=>Xt,zoomLinear:()=>Li,zoomLog:()=>Ni,zoomPow:()=>Ei,zoomSymlog:()=>Ai});var m={};i.r(m),i.d(m,{JsonPatchError:()=>FB,_areEquals:()=>qB,applyOperation:()=>VB,applyPatch:()=>HB,applyReducer:()=>$B,deepClone:()=>PB,getValueByPointer:()=>WB,validate:()=>jB,validator:()=>UB});var _={};i.r(_),i.d(_,{compare:()=>ez,generate:()=>QB,observe:()=>XB,unobserve:()=>ZB});var v={};i.r(v),i.d(v,{accessPathDepth:()=>Gz,accessPathWithDatum:()=>Hz,compile:()=>SJ,contains:()=>Cz,deepEqual:()=>pz,deleteNestedProperty:()=>Wz,duplicate:()=>mz,entries:()=>Fz,every:()=>xz,fieldIntersection:()=>Iz,flatAccessWithDatum:()=>$z,getFirstDefined:()=>Yz,hasIntersection:()=>Az,hash:()=>yz,internalField:()=>Jz,isBoolean:()=>Pz,isEmpty:()=>Tz,isEqual:()=>Nz,isInternalField:()=>eW,isNullOrFalse:()=>wz,isNumeric:()=>iW,keys:()=>Rz,logicalExpr:()=>zz,mergeDeep:()=>kz,normalize:()=>fG,normalizeAngle:()=>tW,omit:()=>vz,pick:()=>_z,prefixGenerator:()=>Mz,removePathFromField:()=>Kz,replaceAll:()=>qz,replacePathInField:()=>jz,resetIdCounter:()=>Qz,setEqual:()=>Ez,some:()=>Sz,stringify:()=>bz,titleCase:()=>Vz,unique:()=>Lz,uniqueId:()=>Xz,vals:()=>Oz,varName:()=>Bz,version:()=>xJ});var b={};i.r(b),i.d(b,{dark:()=>LJ,excel:()=>EJ,fivethirtyeight:()=>RJ,ggplot2:()=>FJ,googlecharts:()=>n0,latimes:()=>HJ,quartz:()=>jJ,urbaninstitute:()=>JJ,version:()=>o0,vox:()=>KJ}),i(6458);var y=i(4902),w=i(4173),C=i.n(w),S=i(6789);function x(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e.hasAttribute(t))throw new Error("Missing attribute '".concat(t,"' on element <").concat(e.tagName,":").concat(e.id,">"));var n=e.getAttribute(t);return i?i(n):n}function k(e){if("true"===e)return!0;if("false"===e)return!1;throw new Error("Invalid boolean attribute ".concat(e,', should be either "true" or "false"'))}function D(e){var t=parseInt(e,10);if(Number.isNaN(t))throw new Error("Invalid integer value ".concat(e));return t}function L(e){return{attribute:x(e.el,"data-update-attribute")}}const N={mounted:function(){var e=this;this.props=L(this),this.__updateAttribute(),this.el.addEventListener("input",(function(t){e.__updateAttribute()})),this.el.addEventListener("paste",(function(e){e.preventDefault();var t=e.clipboardData.getData("text/plain");document.execCommand("insertText",!1,t)})),this.el.addEventListener("keydown",(function(t){"Enter"!==t.key&&"Escape"!==t.key||e.el.blur()})),this.el.addEventListener("focus",(function(t){e.el.setAttribute("phx-update","ignore")})),this.el.addEventListener("blur",(function(t){e.el.removeAttribute("phx-update")}))},updated:function(){this.props=L(this),this.__updateAttribute()},__updateAttribute:function(){var e=this.el.innerText.trim();this.el.setAttribute(this.props.attribute,e)}};var E=i(158);function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=i){var n,o,r=[],s=!0,a=!1;try{for(i=i.call(e);!(s=(n=i.next()).done)&&(r.push(n.value),!t||r.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==i.return||i.return()}finally{if(a)throw o}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return M(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?M(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i|[\w:]+/g)||[]}function R(e){return e[e.length-1]}function O(e){return""===e.trim()}const F={autoFormatTriggerCharacters:["\n"],provideOnTypeFormattingEdits:function(e,t,i,n,o){return"\n"===i?function(e,t){var i=e.getLinesContent(),n=t.lineNumber-1,o=i[n],r=I(i[n-1]);if(function(e,t){var i=e[t-1],n=I(i),o=T(i);if("do"===R(o)||o.includes("fn")&&"->"===R(o)){var r=e.slice(t+1).filter((function(e){return!O(e)})).find((function(e){return I(e)===n}));if(r){var s=A(T(r),1)[0];if(["after","else","catch","rescue","end"].includes(s))return!1}return!0}return!1}(i,n)){var s=t.lineNumber1&&void 0!==arguments[1]?arguments[1]:5e3;B(this,e),this.client=t,this.reportRevisionTimeoutId=null,this.reportRevisionTimeout=i}return W(e,[{key:"onClientDelta",value:function(e){return null!==this.reportRevisionTimeoutId&&(clearTimeout(this.reportRevisionTimeoutId),this.reportRevisionTimeoutId=null),this.client.sendDelta(e),new $(this.client,e)}},{key:"onServerDelta",value:function(e){var t=this;return this.client.applyDelta(e),null===this.reportRevisionTimeoutId&&(this.reportRevisionTimeoutId=setTimeout((function(){t.client.reportCurrentRevision(),t.reportRevisionTimeoutId=null}),this.reportRevisionTimeout)),this}},{key:"onServerAcknowledgement",value:function(){throw new Error("Unexpected server acknowledgement.")}}]),e}(),$=function(){function e(t,i){B(this,e),this.client=t,this.awaitedDelta=i}return W(e,[{key:"onClientDelta",value:function(e){return new U(this.client,this.awaitedDelta,e)}},{key:"onServerDelta",value:function(t){var i=this.awaitedDelta.transform(t,"right");this.client.applyDelta(i);var n=t.transform(this.awaitedDelta,"left");return new e(this.client,n)}},{key:"onServerAcknowledgement",value:function(){return new H(this.client)}}]),e}(),U=function(){function e(t,i,n){B(this,e),this.client=t,this.awaitedDelta=i,this.buffer=n}return W(e,[{key:"onClientDelta",value:function(t){var i=this.buffer.compose(t);return new e(this.client,this.awaitedDelta,i)}},{key:"onServerDelta",value:function(t){var i=this.awaitedDelta.transform(t,"right"),n=this.buffer.transform(i,"right");this.client.applyDelta(n);var o=t.transform(this.awaitedDelta,"left"),r=i.transform(this.buffer,"left");return new e(this.client,o,r)}},{key:"onServerAcknowledgement",value:function(){return this.client.sendDelta(this.buffer),new $(this.client,this.buffer)}}]),e}();function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function q(e,t){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:[];j(this,e),this.ops=t}return K(e,[{key:"retain",value:function(e){return e<=0?this:this.append({retain:e})}},{key:"insert",value:function(e){return""===e?this:this.append({insert:e})}},{key:"delete",value:function(e){return e<=0?this:this.append({delete:e})}},{key:"append",value:function(e){if(0===this.ops.length)return this.ops.push(e),this;var t=this.ops.pop();return X(e)&&J(t)?this.append(e).append(t):X(e)&&X(t)?(this.ops.push({insert:t.insert+e.insert}),this):J(e)&&J(t)?(this.ops.push({delete:t.delete+e.delete}),this):Q(e)&&Q(t)?(this.ops.push({retain:t.retain+e.retain}),this):(this.ops.push(t,e),this)}},{key:"compose",value:function(t){for(var i=new Y(this.ops),n=new Y(t.ops),o=new e;i.hasNext()||n.hasNext();)if(X(n.peek()))o.append(n.next());else if(J(i.peek()))o.append(i.next());else{var r=Math.min(i.peekLength(),n.peekLength()),s=i.next(r),a=n.next(r);Q(a)?o.append(s):J(a)&&Q(s)&&o.append(a)}return o.__trim()}},{key:"transform",value:function(t,i){if("left"!==i&&"right"!==i)throw new Error('Invalid priority "'.concat(i,'", should be either "left" or "right"'));for(var n=new Y(this.ops),o=new Y(t.ops),r=new e;n.hasNext()||o.hasNext();)if(!X(n.peek())||X(o.peek())&&"left"!==i)if(X(o.peek()))r.append(o.next());else{var s=Math.min(n.peekLength(),o.peekLength()),a=n.next(s),l=o.next(s);if(J(a))continue;J(l)?r.append(l):r.retain(s)}else{var c=Z(n.next());r.retain(c)}return r.__trim()}},{key:"__trim",value:function(){return this.ops.length>0&&Q(this.ops[this.ops.length-1])&&this.ops.pop(),this}},{key:"toCompressed",value:function(){return this.ops.map((function(e){if(X(e))return e.insert;if(Q(e))return e.retain;if(J(e))return-e.delete;throw new Error("Invalid operation ".concat(e))}))}},{key:"applyToString",value:function(e){var t="",i=0;return this.ops.forEach((function(n){Q(n)&&(t+=e.slice(i,i+n.retain),i+=n.retain),X(n)&&(t+=n.insert),J(n)&&(i+=n.delete)})),t+=e.slice(i)}}],[{key:"fromCompressed",value:function(e){return e.reduce((function(e,t){if("string"==typeof t)return e.insert(t);if("number"==typeof t&&t>=0)return e.retain(t);if("number"==typeof t&&t<0)return e.delete(-t);throw new Error("Invalid compressed operation ".concat(t))}),new this)}}]),e}(),Y=function(){function e(t){j(this,e),this.ops=t,this.index=0,this.offset=0}return K(e,[{key:"hasNext",value:function(){return this.peekLength()<1/0}},{key:"next",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1/0,t=this.ops[this.index];if(!t)return{retain:e};var i=this.offset,n=Z(t);return e>=n-i?(e=n-i,this.index+=1,this.offset=0):this.offset+=e,J(t)?{delete:e}:Q(t)?{retain:e}:X(t)?{insert:t.insert.substr(i,e)}:void 0}},{key:"peek",value:function(){return this.ops[this.index]||{retain:1/0}}},{key:"peekLength",value:function(){return this.ops[this.index]?Z(this.ops[this.index])-this.offset:1/0}}]),e}();function Z(e){return X(e)?e.insert.length:Q(e)?e.retain:J(e)?e.delete:void 0}function X(e){return"string"==typeof e.insert}function Q(e){return"number"==typeof e.retain}function J(e){return"number"==typeof e.delete}function ee(e,t){for(var i=0;ie.length)&&(t=e.length);for(var i=0,n=new Array(t);i0&&e.editor.layout()}))})).observe(this.container),this.editor.onDidContentSizeChange((function(){var t=e.editor.getContentHeight();e.container.style.height="".concat(t,"px")}))}},{key:"__setupCompletion",value:function(){var e=this,t={};this.editor.getModel().__getCompletionItems=function(i,n){var o=i.getLineContent(n.lineNumber).slice(0,n.column-1);return new Promise((function(i,n){e.hook.pushEvent("completion_request",{hint:o,cell_id:e.cellId},(function(e){var n=e.completion_ref;n?t[n]=function(e){var t=function(e){return e.map(Ce).map((function(t,i){return be(be({},t),{},{sortText:xe(i,e.length)})}))}(e);i({suggestions:t})}:i({suggestions:[]})}))}))},this.hook.handleEvent("completion_response",(function(e){var i=e.completion_ref,n=e.items,o=t[i];o&&(o(n),delete t[i])}))}}])&&we(t.prototype,i),e}();var De,Le=i(8850),Ne=i.n(Le),Ee="undefined"==typeof document?void 0:document,Ae=!!Ee&&"content"in Ee.createElement("template"),Me=!!Ee&&Ee.createRange&&"createContextualFragment"in Ee.createRange();function Ie(e,t){var i,n,o=e.nodeName,r=t.nodeName;return o===r||(i=o.charCodeAt(0),n=r.charCodeAt(0),i<=90&&n>=97?o===r.toUpperCase():n<=90&&i>=97&&r===o.toUpperCase())}function Te(e,t,i){e[i]!==t[i]&&(e[i]=t[i],e[i]?e.setAttribute(i,""):e.removeAttribute(i))}var Re={OPTION:function(e,t){var i=e.parentNode;if(i){var n=i.nodeName.toUpperCase();"OPTGROUP"===n&&(n=(i=i.parentNode)&&i.nodeName.toUpperCase()),"SELECT"!==n||i.hasAttribute("multiple")||(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),i.selectedIndex=-1)}Te(e,t,"selected")},INPUT:function(e,t){Te(e,t,"checked"),Te(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var i=t.value;e.value!==i&&(e.value=i);var n=e.firstChild;if(n){var o=n.nodeValue;if(o==i||!i&&o==e.placeholder)return;n.nodeValue=i}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var i,n,o=-1,r=0,s=e.firstChild;s;)if("OPTGROUP"===(n=s.nodeName&&s.nodeName.toUpperCase()))s=(i=s).firstChild;else{if("OPTION"===n){if(s.hasAttribute("selected")){o=r;break}r++}!(s=s.nextSibling)&&i&&(s=i.nextSibling,i=null)}e.selectedIndex=o}}};function Oe(){}function Fe(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}const Pe=function(e,t,i){if(i||(i={}),"string"==typeof t)if("#document"===e.nodeName||"HTML"===e.nodeName||"BODY"===e.nodeName){var n=t;(t=Ee.createElement("html")).innerHTML=n}else o=(o=t).trim(),t=Ae?function(e){var t=Ee.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}(o):Me?function(e){return De||(De=Ee.createRange()).selectNode(Ee.body),De.createContextualFragment(e).childNodes[0]}(o):function(e){var t=Ee.createElement("body");return t.innerHTML=e,t.childNodes[0]}(o);var o,r=i.getNodeKey||Fe,s=i.onBeforeNodeAdded||Oe,a=i.onNodeAdded||Oe,l=i.onBeforeElUpdated||Oe,c=i.onElUpdated||Oe,u=i.onBeforeNodeDiscarded||Oe,h=i.onNodeDiscarded||Oe,d=i.onBeforeElChildrenUpdated||Oe,g=!0===i.childrenOnly,f=Object.create(null),p=[];function m(e){p.push(e)}function _(e,t){if(1===e.nodeType)for(var i=e.firstChild;i;){var n=void 0;t&&(n=r(i))?m(n):(h(i),i.firstChild&&_(i,t)),i=i.nextSibling}}function v(e,t,i){!1!==u(e)&&(t&&t.removeChild(e),h(e),_(e,i))}function b(e){a(e);for(var t=e.firstChild;t;){var i=t.nextSibling,n=r(t);if(n){var o=f[n];o&&Ie(t,o)?(t.parentNode.replaceChild(o,t),y(o,t)):b(t)}else b(t);t=i}}function y(e,t,i){var n=r(t);if(n&&delete f[n],!i){if(!1===l(e,t))return;if(function(e,t){var i,n,o,r,s=t.attributes;if(11!==t.nodeType&&11!==e.nodeType){for(var a=s.length-1;a>=0;a--)n=(i=s[a]).name,o=i.namespaceURI,r=i.value,o?(n=i.localName||n,e.getAttributeNS(o,n)!==r&&("xmlns"===i.prefix&&(n=i.name),e.setAttributeNS(o,n,r))):e.getAttribute(n)!==r&&e.setAttribute(n,r);for(var l=e.attributes,c=l.length-1;c>=0;c--)n=(i=l[c]).name,(o=i.namespaceURI)?(n=i.localName||n,t.hasAttributeNS(o,n)||e.removeAttributeNS(o,n)):t.hasAttribute(n)||e.removeAttribute(n)}}(e,t),c(e),!1===d(e,t))return}"TEXTAREA"!==e.nodeName?function(e,t){var i,n,o,a,l,c=t.firstChild,u=e.firstChild;e:for(;c;){for(a=c.nextSibling,i=r(c);u;){if(o=u.nextSibling,c.isSameNode&&c.isSameNode(u)){c=a,u=o;continue e}n=r(u);var h=u.nodeType,d=void 0;if(h===c.nodeType&&(1===h?(i?i!==n&&((l=f[i])?o===l?d=!1:(e.insertBefore(l,u),n?m(n):v(u,e,!0),u=l):d=!1):n&&(d=!1),(d=!1!==d&&Ie(u,c))&&y(u,c)):3!==h&&8!=h||(d=!0,u.nodeValue!==c.nodeValue&&(u.nodeValue=c.nodeValue))),d){c=a,u=o;continue e}n?m(n):v(u,e,!0),u=o}if(i&&(l=f[i])&&Ie(l,c))e.appendChild(l),y(l,c);else{var g=s(c);!1!==g&&(g&&(c=g),c.actualize&&(c=c.actualize(e.ownerDocument||Ee)),e.appendChild(c),b(c))}c=a,u=o}!function(e,t,i){for(;t;){var n=t.nextSibling;(i=r(t))?m(i):v(t,e,!0),t=n}}(e,u,n);var p=Re[e.nodeName];p&&p(e,t)}(e,t):Re.TEXTAREA(e,t)}!function e(t){if(1===t.nodeType||11===t.nodeType)for(var i=t.firstChild;i;){var n=r(i);n&&(f[n]=i),e(i),i=i.nextSibling}}(e);var w,C,S=e,x=S.nodeType,k=t.nodeType;if(!g)if(1===x)1===k?Ie(e,t)||(h(e),S=function(e,t){for(var i=e.firstChild;i;){var n=i.nextSibling;t.appendChild(i),i=n}return t}(e,(w=t.nodeName,(C=t.namespaceURI)&&"http://www.w3.org/1999/xhtml"!==C?Ee.createElementNS(C,w):Ee.createElement(w)))):S=t;else if(3===x||8===x){if(k===x)return S.nodeValue!==t.nodeValue&&(S.nodeValue=t.nodeValue),S;S=t}if(S===t)h(e);else{if(t.isSameNode&&t.isSameNode(S))return;if(y(S,t,g),p)for(var D=0,L=p.length;D$/,""),i(null,e)})).catch((function(e){i(e,null)}))}}),ze().addHook("afterSanitizeAttributes",(function(e){"a"===e.tagName.toLowerCase()&&e.host!==window.location.host&&(e.setAttribute("target","_blank"),e.setAttribute("rel","noreferrer noopener"))}));const Ue=function(){function e(t,i){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.baseUrl,r=void 0===o?null:o,s=n.emptyText,a=void 0===s?"":s;He(this,e),this.container=t,this.content=i,this.baseUrl=r,this.emptyText=a,this.__render()}var t,i;return t=e,(i=[{key:"setContent",value:function(e){this.content=e,this.__render()}},{key:"__render",value:function(){var e=this;this.__getHtml().then((function(t){var i="
    ".concat(t,"
    ");Pe(e.container,i,{childrenOnly:!0})}))}},{key:"__getHtml",value:function(){var e=this;return new Promise((function(t,i){var n={baseUrl:e.baseUrl+"/"},o=e.__renderMathInString(e.content);Ne()(o,n,(function(i,n){var o=ze().sanitize(n);t(o||'\n
    \n '.concat(e.emptyText,"\n
    \n "))}))}))}},{key:"__renderMathInString",value:function(e){return e.replace(/(\${1,2})([\s\S]*?)\1/g,(function(e,t,i){var n="$$"===t;return Ve().renderToString(i.trim(),{displayMode:n,throwOnError:!1,errorColor:"inherit"})}))}}])&&$e(t.prototype,i),e}();function je(e,t){for(var i=0;it||r>e&&s=t&&a>=i?r-e-n:s>t&&ai?s-t+o:0}function Xe(e,t){var i=window,n=t.scrollMode,o=t.block,r=t.inline,s=t.boundary,a=t.skipOverflowHiddenElements,l="function"==typeof s?s:function(e){return e!==s};if(!Ke(e))throw new TypeError("Invalid target");for(var c=document.scrollingElement||document.documentElement,u=[],h=e;Ke(h)&&l(h);){if((h=h.parentElement)===c){u.push(h);break}null!=h&&h===document.body&&Ye(h)&&!Ye(document.documentElement)||null!=h&&Ye(h,a)&&u.push(h)}for(var d=i.visualViewport?i.visualViewport.width:innerWidth,g=i.visualViewport?i.visualViewport.height:innerHeight,f=window.scrollX||pageXOffset,p=window.scrollY||pageYOffset,m=e.getBoundingClientRect(),_=m.height,v=m.width,b=m.top,y=m.right,w=m.bottom,C=m.left,S="start"===o||"nearest"===o?b:"end"===o?w:b+_/2,x="center"===r?C+v/2:"end"===r?y:C,k=[],D=0;D=0&&C>=0&&w<=g&&y<=d&&b>=M&&w<=T&&C>=R&&y<=I)return k;var O=getComputedStyle(L),F=parseInt(O.borderLeftWidth,10),P=parseInt(O.borderTopWidth,10),B=parseInt(O.borderRightWidth,10),z=parseInt(O.borderBottomWidth,10),W=0,V=0,H="offsetWidth"in L?L.offsetWidth-L.clientWidth-F-B:0,$="offsetHeight"in L?L.offsetHeight-L.clientHeight-P-z:0;if(c===L)W="start"===o?S:"end"===o?S-g:"nearest"===o?Ze(p,p+g,g,P,z,p+S,p+S+_,_):S-g/2,V="start"===r?x:"center"===r?x-d/2:"end"===r?x-d:Ze(f,f+d,d,F,B,f+x,f+x+v,v),W=Math.max(0,W+p),V=Math.max(0,V+f);else{W="start"===o?S-M-P:"end"===o?S-T+z+$:"nearest"===o?Ze(M,T,E,P,z+$,S,S+_,_):S-(M+E/2)+$/2,V="start"===r?x-R-F:"center"===r?x-(R+A/2)+H/2:"end"===r?x-I+B+H:Ze(R,I,A,F,B+H,x,x+v,v);var U=L.scrollLeft,j=L.scrollTop;S+=j-(W=Math.max(0,Math.min(j+W,L.scrollHeight-E+$))),x+=U-(V=Math.max(0,Math.min(U+V,L.scrollWidth-A+H)))}k.push({el:L,top:W,left:V})}return k}function Qe(e){return e===Object(e)&&0!==Object.keys(e).length}function Je(e){return{cellId:x(e.el,"data-cell-id"),type:x(e.el,"data-type"),sessionPath:x(e.el,"data-session-path")}}function et(e){return"input"===e.props.type?e.el.querySelector('[data-element="input"]'):null}function tt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t=t||e.state.liveEditor.editor.getSelection(),e.state.isFocused&&e.state.insertMode&&qe.broadcast("session",{type:"cursor_selection_changed",cellId:e.props.cellId,selection:t})}const it={mounted:function(){var e=this;if(this.props=Je(this),this.state={isFocused:!1,insertMode:!1,liveEditor:null,evaluationDigest:null},["markdown","elixir"].includes(this.props.type)&&this.pushEvent("cell_init",{cell_id:this.props.cellId},(function(t){var i=t.source,n=t.revision,o=t.evaluation_digest,r=e.el.querySelector('[data-element="editor-container"]');r.firstElementChild.remove();var s=document.createElement("div");if(r.appendChild(s),e.state.liveEditor=new ke(e,s,e.props.cellId,e.props.type,i,n),"elixir"===e.props.type){e.state.evaluationDigest=o;var a=function(){var t=e.el.querySelector('[data-element="change-indicator"]');if(t){var i=function(e){return re()(e).toString(ae())}(e.state.liveEditor.getSource()),n=e.state.evaluationDigest!==i;t.toggleAttribute("data-js-shown",n)}};a(),e.handleEvent("evaluation_started:".concat(e.props.cellId),(function(t){var i=t.evaluation_digest;e.state.evaluationDigest=i,a()})),e.state.liveEditor.onChange((function(e){a()}))}if("markdown"===e.props.type){var l=e.el.querySelector('[data-element="markdown-container"]'),c=e.props.sessionPath,u=new Ue(l,i,{baseUrl:c,emptyText:"Empty markdown cell"});e.state.liveEditor.onChange((function(e){u.setContent(e)}))}e.state.isFocused&&e.state.insertMode&&(e.state.liveEditor.focus(),he(e.el),tt(e)),e.state.liveEditor.onBlur((function(){e.state.isFocused&&e.state.insertMode&&e.state.liveEditor.focus()})),e.state.liveEditor.onCursorSelectionChange((function(t){tt(e,t)}))})),"input"===this.props.type){var t=et(this);t.addEventListener("blur",(function(i){e.state.isFocused&&e.state.insertMode&&setTimeout((function(){t.focus()}),0)}))}this._unsubscribeFromCellsEvents=qe.subscribe("cells",(function(t){!function(e,t){"cell_focused"===t.type?function(e,t,i){e.props.cellId===t?(e.state.isFocused=!0,e.el.setAttribute("data-js-focused","true"),i&&he(e.el)):e.state.isFocused&&(e.state.isFocused=!1,e.el.removeAttribute("data-js-focused"))}(e,t.cellId,t.scroll):"insert_mode_changed"===t.type?function(e,t){if(e.state.isFocused){e.state.insertMode=t,e.state.liveEditor&&(e.state.insertMode?(e.state.liveEditor.focus(),setTimeout((function(){!function(e,t){var i=!e.ownerDocument.documentElement.contains(e);if(Qe(t)&&"function"==typeof t.behavior)return t.behavior(i?[]:Xe(e,t));if(!i){var n=function(e){return!1===e?{block:"end",inline:"nearest"}:Qe(e)?e:{block:"start",inline:"nearest"}}(t);(function(e,t){void 0===t&&(t="auto");var i="scrollBehavior"in document.body.style;e.forEach((function(e){var n=e.el,o=e.top,r=e.left;n.scroll&&i?n.scroll({top:o,left:r,behavior:t}):(n.scrollTop=o,n.scrollLeft=r)}))})(Xe(e,n),n.behavior)}}(document.activeElement,{scrollMode:"if-needed",behavior:"smooth",block:"center"})}),0),tt(e)):e.state.liveEditor.blur());var i=et(e);i&&(e.state.insertMode?(i.focus(),i.selectionStart=i.selectionEnd=i.value.length):i.blur())}}(e,t.enabled):"cell_moved"===t.type?function(e,t){e.state.isFocused&&t===e.props.cellId&&he(e.el)}(e,t.cellId):"cell_upload"===t.type?function(e,t,i){if(e.state.liveEditor&&e.props.cellId===t){var n="![](".concat(i,")");e.state.liveEditor.insert(n)}}(e,t.cellId,t.url):"location_report"===t.type&&function(e,t,i){e.state.liveEditor&&(e.props.cellId===i.cellId&&i.selection?e.state.liveEditor.updateUserSelection(t,i.selection):e.state.liveEditor.removeUserSelection(t))}(e,t.client,t.report)}(e,t)}))},destroyed:function(){this._unsubscribeFromCellsEvents(),this.state.liveEditor&&this.state.liveEditor.dispose()},updated:function(){this.props=Je(this)}};function nt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ot(e,t){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:2e3;nt(this,e),this.resetTimeout=t,this.buffer=[],this.resetTimeoutId=null}var t,i;return t=e,(i=[{key:"push",value:function(e){var t=this;this.buffer.push(e),this.resetTimeoutId&&clearTimeout(this.resetTimeoutId),this.resetTimeoutId=setTimeout((function(){t.reset()}),this.resetTimeout)}},{key:"reset",value:function(){this.resetTimeout&&clearTimeout(this.resetTimeout),this.clearTimeout=null,this.buffer=[]}},{key:"tryMatch",value:function(e){if(e.length>this.buffer.length)return!1;var t=this.buffer.slice(-e.length),i=e.every((function(e,i){return e===t[i]}));return i&&this.reset(),i}}])&&ot(t.prototype,i),e}();function st(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i0){var n=i[i.length-1];e.pushEvent("insert_cell_below",{cell_id:n,type:t})}else _t(e,t)}}function mt(e,t){if(e.state.focusedCellId)e.pushEvent("insert_cell_above",{cell_id:e.state.focusedCellId,type:t});else{var i=St();if(i.length>0){var n=i[0];e.pushEvent("insert_cell_above",{cell_id:n,type:t})}else _t(e,t)}}function _t(e,t){var i=Dt().map((function(e){return e.getAttribute("data-section-id")}));i.length>0&&e.pushEvent("insert_cell",{section_id:i[0],index:0,type:t})}function vt(e,t){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(e.state.focusedCellId=t,e.state.focusedCellId){var n=xt(e.state.focusedCellId);e.state.focusedCellType=n.getAttribute("data-type"),e.state.focusedSectionId=kt(e.state.focusedCellId)}else e.state.focusedCellType=null,e.state.focusedSectionId=null;qe.broadcast("cells",{type:"cell_focused",cellId:t,scroll:i}),bt(e,!1)}function bt(e,t){e.state.insertMode=t,t?e.el.setAttribute("data-js-insert-mode","true"):(e.el.removeAttribute("data-js-insert-mode"),wt(e,{cellId:e.state.focusedCellId,selection:null})),qe.broadcast("cells",{type:"insert_mode_changed",enabled:t})}function yt(e,t){qe.broadcast("cells",{type:"location_report",client:e,report:t})}function wt(e,t){var i;Object.keys(e.state.clientsMap).length>1&&e.pushEvent("location_report",{cell_id:t.cellId,selection:(i=t.selection,null===i?null:[i.selectionStartLineNumber,i.selectionStartColumn,i.positionLineNumber,i.positionColumn])})}function Ct(e){if(null===e)return null;var t,i,n=(i=4,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var i=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=i){var n,o,r=[],s=!0,a=!1;try{for(i=i.call(e);!(s=(n=i.next()).done)&&(r.push(n.value),!t||r.length!==t);s=!0);}catch(e){a=!0,o=e}finally{try{s||null==i.return||i.return()}finally{if(a)throw o}}return r}}(t,i)||function(e,t){if(e){if("string"==typeof e)return st(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?st(e,t):void 0}}(t,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],r=n[1],s=n[2],a=n[3];return new P.Selection(o,r,s,a)}function St(){return Array.from(document.querySelectorAll('[data-element="cell"]')).map((function(e){return e.getAttribute("data-cell-id")}))}function xt(e){return document.querySelector('[data-element="cell"][data-cell-id="'.concat(e,'"]'))}function kt(e){return document.querySelector('[data-element="cell"][data-cell-id="'.concat(e,'"]')).closest('[data-element="section"]').getAttribute("data-section-id")}function Dt(){return Array.from(document.querySelectorAll('[data-element="section"]'))}function Lt(e){return document.querySelector('[data-element="section"][data-section-id="'.concat(e,'"]'))}function Nt(e){e.preventDefault(),e.stopPropagation()}const Et={mounted:function(){var e,t,i=this;this.state={focusedCellId:null,focusedSectionId:null,focusedCellType:null,insertMode:!1,keyBuffer:new rt,clientsMap:{},lastLocationReportByClientPid:{},followedClientPid:null},this.pushEvent("session_init",{},(function(e){e.clients.forEach((function(e){i.state.clientsMap[e.pid]=e}))})),this.handleDocumentKeyDown=function(e){!function(e,t){if(!t.repeat){var i=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)?t.metaKey:t.ctrlKey,n=t.key,o=e.state.keyBuffer;if(e.state.insertMode)if(o.reset(),"Escape"===n){var r=!!t.target.closest(".monaco-inputbox"),s=t.target.getAttribute("aria-activedescendant"),a=s&&s.includes("suggest");r||a||function(e){bt(e,!1)}(e)}else i&&"Enter"===n?(Nt(t),"elixir"===e.state.focusedCellType&&dt(e)):i&&"s"===n&&(Nt(t),ht(e));else{if(ce(t.target))return void o.reset();o.push(t.key),i&&"s"===n?(Nt(t),ht(e)):o.tryMatch(["d","d"])?function(e){e.state.focusedCellId&&e.pushEvent("delete_cell",{cell_id:e.state.focusedCellId})}(e):"elixir"===e.state.focusedCellType&&(o.tryMatch(["e","e"])||i&&"Enter"===n)?dt(e):o.tryMatch(["e","a"])?function(e){e.pushEvent("queue_all_cells_evaluation",{})}(e):o.tryMatch(["e","s"])?function(e){e.state.focusedSectionId&&e.pushEvent("queue_section_cells_evaluation",{section_id:e.state.focusedSectionId})}(e):o.tryMatch(["e","j"])?function(e){e.state.focusedCellId&&e.pushEvent("queue_child_cells_evaluation",{cell_id:e.state.focusedCellId})}(e):o.tryMatch(["s","s"])?ct(e):o.tryMatch(["s","u"])?ut(e):o.tryMatch(["s","r"])?function(e){e.pushEvent("show_runtime_settings",{})}(e):o.tryMatch(["e","x"])?function(e){e.state.focusedCellId&&e.pushEvent("cancel_cell_evaluation",{cell_id:e.state.focusedCellId})}(e):o.tryMatch(["?"])?function(e){e.pushEvent("show_shortcuts",{})}(e):o.tryMatch(["i"])?(Nt(t),function(e){e.state.focusedCellId&&bt(e,!0)}(e)):o.tryMatch(["j"])?gt(e,1):o.tryMatch(["k"])?gt(e,-1):o.tryMatch(["J"])?ft(e,1):o.tryMatch(["K"])?ft(e,-1):o.tryMatch(["n"])?pt(e,"elixir"):o.tryMatch(["N"])?mt(e,"elixir"):o.tryMatch(["m"])?pt(e,"markdown"):o.tryMatch(["M"])&&mt(e,"markdown")}}}(i,e)},document.addEventListener("keydown",this.handleDocumentKeyDown,!0),this.handleDocumentMouseDown=function(e){!function(e,t){if(t.target.closest("a, button"))t.target.closest('[data-element="enable-insert-mode-button"]')&&bt(e,!0);else{var i=t.target.closest('[data-element="cell"]'),n=i?i.dataset.cellId:null,o=function(e,t){if(t){var i=t.querySelector('[data-element="editor-container"]'),n=t.querySelector('[data-element="input"]');return(i||n).contains(e.target)}return!1}(t,i);n!==e.state.focusedCellId&&vt(e,n,!o),e.state.insertMode!==o&&bt(e,o)}}(i,e)},document.addEventListener("mousedown",this.handleDocumentMouseDown),this.handleDocumentDoubleClick=function(e){!function(e,t){t.target.closest('[data-element="cell"][data-type="markdown"]')&&e.state.focusedCellId&&!e.state.insertMode&&bt(e,!0)}(i,e)},document.addEventListener("dblclick",this.handleDocumentDoubleClick),document.querySelector('[data-element="sections-list"]').addEventListener("click",(function(e){!function(e,t){var i=t.target.closest('[data-element="sections-list-item"]');i&&Lt(i.getAttribute("data-section-id")).scrollIntoView({behavior:"smooth",block:"start"})}(0,e)})),document.querySelector('[data-element="clients-list"]').addEventListener("click",(function(e){!function(e,t){var i=t.target.closest('[data-element="clients-list-item"]');if(i){var n=i.getAttribute("data-client-pid");t.target.closest('[data-element="client-link"]')&&function(e,t){at(e,t)}(e,n),t.target.closest('[data-element="client-follow-toggle"]')&&function(e,t,i){var n=document.querySelector('[data-element="clients-list-item"][data-js-followed]');n&&n.removeAttribute("data-js-followed"),t===e.state.followedClientPid?e.state.followedClientPid=null:(i.setAttribute("data-js-followed","true"),e.state.followedClientPid=t,at(e,t))}(e,n,i)}}(i,e)})),document.querySelector('[data-element="sections-list-toggle"]').addEventListener("click",(function(e){ct(i)})),document.querySelector('[data-element="clients-list-toggle"]').addEventListener("click",(function(e){ut(i)})),document.querySelector('[data-element="notebook"]').addEventListener("scroll",(function(e){lt()})),document.querySelector('[data-element="notebook-indicators"]').addEventListener("click",(function(e){!function(e,t){var i=t.target.closest('[data-element="focus-cell-button"]');i&&vt(e,i.getAttribute("data-target"))}(i,e)})),window.addEventListener("phx:page-loading-stop",(function(){!function(e){var t=window.location.hash;if(t.startsWith("#cell-")){var i=t.replace(/^#cell-/,"");xt(i)&&vt(e,i)}else{var n=t.replace(/^#/,""),o=document.getElementById(n);o&&o.scrollIntoView()}}(i)}),{once:!0}),lt(),e=Dt(),t=document.querySelector('[data-element="notebook-name"]'),0===e.length&&"Untitled notebook"===t.innerText&&(t.focus(),ue(t)),this.handleEvent("cell_inserted",(function(e){var t=e.cell_id;!function(e,t){vt(e,t),["markdown","elixir"].includes(e.state.focusedCellType)&&bt(e,!0)}(i,t)})),this.handleEvent("cell_deleted",(function(e){var t=e.cell_id,n=e.sibling_cell_id;!function(e,t,i){e.state.focusedCellId===t&&vt(e,i)}(i,t,n)})),this.handleEvent("cell_moved",(function(e){var t,n;n=e.cell_id,(t=i).state.focusedCellId===n&&(qe.broadcast("cells",{type:"cell_moved",cellId:n}),t.state.focusedSectionId=kt(t.state.focusedCellId))})),this.handleEvent("section_inserted",(function(e){var t=e.section_id;!function(e,t){e.state.focusedSectionId&&vt(e,null);var i=Lt(t).querySelector('[data-element="section-name"]');i.focus({preventScroll:!0}),ue(i),he(i)}(i,t)})),this.handleEvent("section_deleted",(function(e){var t,n;n=e.section_id,(t=i).state.focusedSectionId===n&&vt(t,null)})),this.handleEvent("section_moved",(function(e){he(Lt(e.section_id))})),this.handleEvent("cell_upload",(function(e){var t=e.cell_id,n=e.url;!function(e,t,i){e.state.focusedCellId!==t&&vt(e,t),e.state.insertMode||bt(e,!0),qe.broadcast("cells",{type:"cell_upload",cellId:t,url:i})}(i,t,n)})),this.handleEvent("client_joined",(function(e){var t=e.client;!function(e,t){e.state.clientsMap[t.pid]=t}(i,t)})),this.handleEvent("client_left",(function(e){var t,n,o;n=e.client_pid,(o=(t=i).state.clientsMap[n])&&(delete t.state.clientsMap[n],yt(o,{cellId:null,selection:null}),o.pid===t.state.followedClientPid&&(t.state.followedClientPid=null))})),this.handleEvent("clients_updated",(function(e){var t,n=e.clients;t=i,n.forEach((function(e){t.state.clientsMap[e.pid]=e}))})),this.handleEvent("location_report",(function(e){var t=e.client_pid,n={cellId:e.cell_id,selection:Ct(e.selection)};!function(e,t,i){var n=e.state.clientsMap[t];e.state.lastLocationReportByClientPid[t]=i,n&&(yt(n,i),n.pid===e.state.followedClientPid&&i.cellId!==e.state.focusedCellId&&vt(e,i.cellId))}(i,t,n)})),this._unsubscribeFromSessionEvents=qe.subscribe("session",(function(e){!function(e,t){"cursor_selection_changed"===t.type&&wt(e,{cellId:t.cellId,selection:t.selection})}(i,e)}))},destroyed:function(){this._unsubscribeFromSessionEvents(),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown),document.removeEventListener("dblclick",this.handleDocumentDoubleClick)}},At={mounted:function(){this.__focus()},updated:function(){this.el!==document.activeElement&&this.__focus()},__focus:function(){ce(document.activeElement)||(this.el.focus(),this.el.selectionStart=this.el.selectionEnd=this.el.value.length)}};var Mt=i(4612),It=i.n(Mt);function Tt(e,t,i,n){var o=t.childElementCount,r=Math.min(i,n*o);return{height:r,total:o,itemHeight:n,generate:function(e){return t.children.item(e).cloneNode(!0)},afterRender:function(){e.scrollWidth>e.clientWidth?e.style.height="".concat(r+12,"px"):e.style.height="".concat(r,"px")}}}function Rt(e){return{maxHeight:x(e.el,"data-max-height",D),follow:x(e.el,"data-follow",k)}}const Ot={mounted:function(){var e=this;if(this.props=Rt(this),this.state={lineHeight:null,templateElement:null,contentElement:null,virtualizedList:null},this.state.lineHeight=function(e){var t=window.getComputedStyle(e),i=parseInt(t.lineHeight,10);if(Number.isNaN(i)){var n=e.cloneNode();n.innerHTML="
    ",e.appendChild(n);var o=n.clientHeight;n.innerHTML="

    ";var r=n.clientHeight;return e.removeChild(n),r-o}return i}(this.el),this.state.templateElement=this.el.querySelector("[data-template]"),!this.state.templateElement)throw new Error("VirtualizedLines must have a child with data-template attribute");if(this.state.contentElement=this.el.querySelector("[data-content]"),!this.state.contentElement)throw new Error("VirtualizedLines must have a child with data-content attribute");var t=Tt(this.state.contentElement,this.state.templateElement,this.props.maxHeight,this.state.lineHeight);this.state.virtualizedList=new(It())(this.state.contentElement,t),this.el.querySelector("[data-clipboard]").addEventListener("click",(function(t){var i=Array.from(e.state.templateElement.children).map((function(e){return e.innerText})).join("");"clipboard"in navigator&&navigator.clipboard.writeText(i)}))},updated:function(){this.props=Rt(this);var e=Tt(this.state.contentElement,this.state.templateElement,this.props.maxHeight,this.state.lineHeight),t=Math.round(this.state.contentElement.scrollTop)===Math.round(this.state.contentElement.scrollHeight-this.state.contentElement.clientHeight);this.state.virtualizedList.refresh(this.state.contentElement,e),this.props.follow&&t&&(this.state.contentElement.scrollTop=this.state.contentElement.scrollHeight)}},Ft={mounted:function(){var e=this,t=this.el.querySelector("[data-toggle]");if(!t)throw new Error("Menu must have a child with data-toggle attribute");if(!this.el.querySelector("[data-content]"))throw new Error("Menu must have a child with data-content attribute");t.addEventListener("click",(function(t){e.el.hasAttribute("data-js-open")?e.el.removeAttribute("data-js-open"):(e.el.setAttribute("data-js-open","true"),setTimeout((function(){document.addEventListener("click",(function(t){e.el.removeAttribute("data-js-open")}),{once:!0})}),0))}))}};var Pt="user_data";function Bt(){var e=function(e){var t=document.cookie.split("; ").find((function(t){return t.startsWith("".concat(e,"="))}));return t?t.replace("".concat(e,"="),""):null}(Pt);if(e){var t=decodeURIComponent(escape(atob(e)));return JSON.parse(t)}return null}const zt={mounted:function(){var e=this;this.el.addEventListener("submit",(function(t){var i;i={name:e.el.data_name.value,hex_color:e.el.data_hex_color.value},function(e,t,i){var n="".concat("user_data","=").concat(t,";max-age=").concat(15768e4,";path=/");document.cookie=n}(0,function(e){return btoa(unescape(encodeURIComponent(e)))}(JSON.stringify(i)))}))}};function Wt(e,t,i){return e.fields=t||[],e.fname=i,e}function Vt(e){return null==e?null:e.fname}function Ht(e){return null==e?null:e.fields}function $t(e){return 1===e.length?Ut(e[0]):jt(e)}const Ut=e=>function(t){return t[e]},jt=e=>{const t=e.length;return function(i){for(let n=0;nn&&c(),a=n=o+1):"]"===r&&(a||qt("Access path missing open bracket: "+e),a>0&&c(),a=0,n=o+1):o>n?c():n=o+1}return a&&qt("Access path missing closing bracket: "+e),s&&qt("Access path missing closing quote: "+e),o>n&&(o++,c()),t}function Gt(e,t,i){const n=Kt(e);return e=1===n.length?n[0]:e,Wt((i&&i.get||$t)(n),[e],t||e)}const Yt=Gt("id"),Zt=Wt((e=>e),[],"identity"),Xt=Wt((()=>0),[],"zero"),Qt=Wt((()=>1),[],"one"),Jt=Wt((()=>!0),[],"true"),ei=Wt((()=>!1),[],"false");function ti(e,t,i){const n=[t].concat([].slice.call(i));console[e].apply(console,n)}const ii=0,ni=1,oi=2,ri=3,si=4;function ai(e,t){let i=e||ii;return{level(e){return arguments.length?(i=+e,this):i},error(){return i>=ni&&ti(t||"error","ERROR",arguments),this},warn(){return i>=oi&&ti(t||"warn","WARN",arguments),this},info(){return i>=ri&&ti(t||"log","INFO",arguments),this},debug(){return i>=si&&ti(t||"log","DEBUG",arguments),this}}}var li=Array.isArray;function ci(e){return e===Object(e)}const ui=e=>"__proto__"!==e;function hi(...e){return e.reduce(((e,t)=>{for(const i in t)if("signals"===i)e.signals=gi(e.signals,t.signals);else{const n="legend"===i?{layout:1}:"style"===i||null;di(e,i,t[i],n)}return e}),{})}function di(e,t,i,n){if(!ui(t))return;let o,r;if(ci(i)&&!li(i))for(o in r=ci(e[t])?e[t]:e[t]={},i)n&&(!0===n||n[o])?di(r,o,i[o]):ui(o)&&(r[o]=i[o]);else e[t]=i}function gi(e,t){if(null==e)return t;const i={},n=[];function o(e){i[e.name]||(i[e.name]=1,n.push(e))}return t.forEach(o),e.forEach(o),n}function fi(e){return e[e.length-1]}function pi(e){return null==e||""===e?null:+e}const mi=e=>t=>e*Math.exp(t),_i=e=>t=>Math.log(e*t),vi=e=>t=>Math.sign(t)*Math.log1p(Math.abs(t/e)),bi=e=>t=>Math.sign(t)*Math.expm1(Math.abs(t))*e,yi=e=>t=>t<0?-Math.pow(-t,e):Math.pow(t,e);function wi(e,t,i,n){const o=i(e[0]),r=i(fi(e)),s=(r-o)*t;return[n(o-s),n(r-s)]}function Ci(e,t){return wi(e,t,pi,Zt)}function Si(e,t){var i=Math.sign(e[0]);return wi(e,t,_i(i),mi(i))}function xi(e,t,i){return wi(e,t,yi(i),yi(1/i))}function ki(e,t,i){return wi(e,t,vi(i),bi(i))}function Di(e,t,i,n,o){const r=n(e[0]),s=n(fi(e)),a=null!=t?n(t):(r+s)/2;return[o(a+(r-a)*i),o(a+(s-a)*i)]}function Li(e,t,i){return Di(e,t,i,pi,Zt)}function Ni(e,t,i){const n=Math.sign(e[0]);return Di(e,t,i,_i(n),mi(n))}function Ei(e,t,i,n){return Di(e,t,i,yi(n),yi(1/n))}function Ai(e,t,i,n){return Di(e,t,i,vi(n),bi(n))}function Mi(e){return 1+~~(new Date(e).getMonth()/3)}function Ii(e){return 1+~~(new Date(e).getUTCMonth()/3)}function Ti(e){return null!=e?li(e)?e:[e]:[]}function Ri(e,t,i){let n,o=e[0],r=e[1];return r=i-t?[t,i]:[o=Math.min(Math.max(o,t),i-n),o+n]}function Oi(e){return"function"==typeof e}function Fi(e,t,i){i=i||{},t=Ti(t)||[];const n=[],o=[],r={},s=i.comparator||Bi;return Ti(e).forEach(((e,s)=>{null!=e&&(n.push("descending"===t[s]?-1:1),o.push(e=Oi(e)?e:Gt(e,null,i)),(Ht(e)||[]).forEach((e=>r[e]=1)))})),0===o.length?null:Wt(s(o,n),Object.keys(r))}const Pi=(e,t)=>(et||null==t)&&null!=e?1:(t=t instanceof Date?+t:t,(e=e instanceof Date?+e:e)!==e&&t==t?-1:t!=t&&e==e?1:0),Bi=(e,t)=>1===e.length?zi(e[0],t[0]):Wi(e,t,e.length),zi=(e,t)=>function(i,n){return Pi(e(i),e(n))*t},Wi=(e,t,i)=>(t.push(0),function(n,o){let r,s=0,a=-1;for(;0===s&&++ae}function Hi(e,t){let i;return n=>{i&&clearTimeout(i),i=setTimeout((()=>(t(n),i=null)),e)}}function $i(e){for(let t,i,n=1,o=arguments.length;nr&&(r=n))}else{for(n=t(e[s]);sr&&(r=n))}return[o,r]}function ji(e,t){const i=e.length;let n,o,r,s,a,l=-1;if(null==t){for(;++l=o){n=r=o;break}if(l===i)return[-1,-1];for(s=a=l;++lo&&(n=o,s=l),r=o){n=r=o;break}if(l===i)return[-1,-1];for(s=a=l;++lo&&(n=o,s=l),rn(e)?i[e]:void 0,set(e,t){return n(e)||(++o.size,i[e]===Gi&&--o.empty),i[e]=t,this},delete(e){return n(e)&&(--o.size,++o.empty,i[e]=Gi),this},clear(){o.size=o.empty=0,o.object=i={}},test(e){return arguments.length?(t=e,o):t},clean(){const e={};let n=0;for(const o in i){const r=i[o];r===Gi||t&&t(r)||(e[o]=r,++n)}o.size=n,o.empty=0,o.object=i=e}};return e&&Object.keys(e).forEach((t=>{o.set(t,e[t])})),o}function Zi(e,t,i,n,o,r){if(!i&&0!==i)return r;const s=+i;let a,l=e[0],c=fi(e);cs&&(o=r,r=s,s=o),n=void 0===n||n,((i=void 0===i||i)?r<=e:re.replace(/\\(.)/g,"$1"))):Ti(e));const n=e&&e.length,o=i&&i.get||$t,r=e=>o(t?[e]:Kt(e));let s;if(n)if(1===n){const t=r(e[0]);s=function(e){return""+t(e)}}else{const t=e.map(r);s=function(e){let i=""+t[0](e),o=0;for(;++o{t={},i={},n=0},r=(o,r)=>(++n>e&&(i=t,t={},n=1),t[o]=r);return o(),{clear:o,has:e=>Ki(t,e)||Ki(i,e),get:e=>Ki(t,e)?t[e]:Ki(i,e)?r(e,i[e]):void 0,set:(e,i)=>Ki(t,e)?t[e]=i:r(e,i)}}function cn(e,t,i,n){const o=t.length,r=i.length;if(!r)return t;if(!o)return i;const s=n||new t.constructor(o+r);let a=0,l=0,c=0;for(;a0?i[l++]:t[a++];for(;a=0;)i+=e;return i}function hn(e,t,i,n){const o=i||" ",r=e+"",s=t-r.length;return s<=0?r:"left"===n?un(o,s)+r:"center"===n?un(o,~~(s/2))+r+un(o,Math.ceil(s/2)):r+un(o,s)}function dn(e){return e&&fi(e)-e[0]||0}function gn(e){return li(e)?"["+e.map(gn)+"]":ci(e)||rn(e)?JSON.stringify(e).replace("\u2028","\\u2028").replace("\u2029","\\u2029"):e}function fn(e){return null==e||""===e?null:!(!e||"false"===e||"0"===e||!e)}const pn=e=>nn(e)||en(e)?e:Date.parse(e);function mn(e,t){return t=t||pn,null==e||""===e?null:t(e)}function _n(e){return null==e||""===e?null:e+""}function vn(e){const t={},i=e.length;for(let n=0;nnew Promise(((i,n)=>{e.readFile(t,((e,t)=>{e?n(e):i(t)}))})):Nn}async function Nn(){qt("No file system access.")}function En(e){return e?async function(t,i){const n=$i({},this.options.http,i),o=i&&i.response,r=await e(t,n);return r.ok?Oi(r[o])?r[o]():r.text():qt(r.status+""+r.statusText)}:An}async function An(){qt("No HTTP fetch method available.")}const Mn=e=>!(Number.isNaN(+e)||e instanceof Date),In={boolean:fn,integer:pi,number:pi,date:mn,string:_n,unknown:Zt},Tn=[e=>"true"===e||"false"===e||!0===e||!1===e,e=>Mn(e)&&Number.isInteger(+e),Mn,e=>!Number.isNaN(Date.parse(e))],Rn=["boolean","integer","number","date"];function On(e,t){if(!e||!e.length)return"unknown";const i=e.length,n=Tn.length,o=Tn.map(((e,t)=>t+1));for(let s,a,l=0,c=0;l0===e?t:e),0)-1]}function Fn(e,t){return t.reduce(((t,i)=>(t[i]=On(e,i),t)),{})}var Pn={},Bn={};function zn(e){return new Function("d","return {"+e.map((function(e,t){return JSON.stringify(e)+": d["+t+'] || ""'})).join(",")+"}")}function Wn(e){var t=Object.create(null),i=[];return e.forEach((function(e){for(var n in e)n in t||i.push(t[n]=n)})),i}function Vn(e,t){var i=e+"",n=i.length;return n=r?l=!0:10===(n=e.charCodeAt(s++))?c=!0:13===n&&(c=!0,10===e.charCodeAt(s)&&++s),e.slice(o+1,t-1).replace(/""/g,'"')}for(;s9999?"+"+Vn(e,6):Vn(e,4)}(e.getUTCFullYear())+"-"+Vn(e.getUTCMonth()+1,2)+"-"+Vn(e.getUTCDate(),2)+(o?"T"+Vn(t,2)+":"+Vn(i,2)+":"+Vn(n,2)+"."+Vn(o,3)+"Z":n?"T"+Vn(t,2)+":"+Vn(i,2)+":"+Vn(n,2)+"Z":i||t?"T"+Vn(t,2)+":"+Vn(i,2)+"Z":"")}(e):t.test(e+="")?'"'+e.replace(/"/g,'""')+'"':e}return{parse:function(e,t){var i,o,r=n(e,(function(e,n){if(i)return i(e,n-1);o=e,i=t?function(e,t){var i=zn(e);return function(n,o){return t(i(n),o,e)}}(e,t):zn(e)}));return r.columns=o||[],r},parseRows:n,format:function(t,i){return null==i&&(i=Wn(t)),[i.map(s).join(e)].concat(o(t,i)).join("\n")},formatBody:function(e,t){return null==t&&(t=Wn(e)),o(e,t).join("\n")},formatRows:function(e){return e.map(r).join("\n")},formatRow:r,formatValue:s}}function $n(e){const t=function(t,i){const n={delimiter:e};return Un(t,i?$i(i,n):n)};return t.responseType="text",t}function Un(e,t){return t.header&&(e=t.header.map(gn).join(t.delimiter)+"\n"+e),Hn(t.delimiter).parse(e+"")}function jn(e,t){const i=t&&t.property?Gt(t.property):Zt;return!ci(e)||(n=e,"function"==typeof Buffer&&Oi(Buffer.isBuffer)&&Buffer.isBuffer(n))?i(JSON.parse(e)):function(e,t){return!li(e)&&tn(e)&&(e=[...e]),t&&t.copy?JSON.parse(JSON.stringify(e)):e}(i(e),t);var n}function qn(e){return e}function Kn(e,t){return"string"==typeof t&&(t=e.objects[t]),"GeometryCollection"===t.type?{type:"FeatureCollection",features:t.geometries.map((function(t){return Gn(e,t)}))}:Gn(e,t)}function Gn(e,t){var i=t.id,n=t.bbox,o=null==t.properties?{}:t.properties,r=Yn(e,t);return null==i&&null==n?{type:"Feature",properties:o,geometry:r}:null==n?{type:"Feature",id:i,properties:o,geometry:r}:{type:"Feature",id:i,bbox:n,properties:o,geometry:r}}function Yn(e,t){var i=function(e){if(null==e)return qn;var t,i,n=e.scale[0],o=e.scale[1],r=e.translate[0],s=e.translate[1];return function(e,a){a||(t=i=0);var l=2,c=e.length,u=new Array(c);for(u[0]=(t+=e[0])*n+r,u[1]=(i+=e[1])*o+s;l1)n=Jn(0,t,i);else for(o=0,n=new Array(r=e.arcs.length);oe!==t,exterior:(e,t)=>e===t};function to(e,t){let i,n,o,r;return e=jn(e,t),t&&t.feature?(i=Kn,o=t.feature):t&&t.mesh?(i=Xn,o=t.mesh,r=eo[t.filter]):qt("Missing TopoJSON feature or mesh parameter."),n=(n=e.objects[o])?i(e,n,r):qt("Invalid TopoJSON object: "+o),n&&n.features||[n]}to.responseType="json";const io={dsv:Un,csv:$n(","),tsv:$n("\t"),json:jn,topojson:to};function no(e,t){return arguments.length>1?(io[e]=t,this):Ki(io,e)?io[e]:null}function oo(e){const t=no(e);return t&&t.responseType||"text"}var ro=Math.sqrt(50),so=Math.sqrt(10),ao=Math.sqrt(2);function lo(e,t,i){var n,o,r,s,a=-1;if(i=+i,(e=+e)==(t=+t)&&i>0)return[e];if((n=t0){let i=Math.round(e/s),n=Math.round(t/s);for(i*st&&--n,r=new Array(o=n-i+1);++at&&--n,r=new Array(o=n-i+1);++a=0?(r>=ro?10:r>=so?5:r>=ao?2:1)*Math.pow(10,o):-Math.pow(10,-o)/(r>=ro?10:r>=so?5:r>=ao?2:1)}function uo(e,t,i){var n=Math.abs(t-e)/Math.max(0,i),o=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),r=n/o;return r>=ro?o*=10:r>=so?o*=5:r>=ao&&(o*=2),t=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function fo(e){if(!(t=go.exec(e)))throw new Error("invalid format: "+e);var t;return new po({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function po(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function mo(e,t){if((i=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var i,n=e.slice(0,i);return[n.length>1?n[0]+n.slice(2):n,+e.slice(i+1)]}function _o(e){return(e=mo(Math.abs(e)))?e[1]:NaN}function vo(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(_o(t)/3)))-_o(Math.abs(e)))}function bo(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,_o(t)-_o(e))+1}function yo(e){return Math.max(0,-_o(Math.abs(e)))}function wo(e,t){var i=mo(e,t);if(!i)return e+"";var n=i[0],o=i[1];return o<0?"0."+new Array(-o).join("0")+n:n.length>o+1?n.slice(0,o+1)+"."+n.slice(o+1):n+new Array(o-n.length+2).join("0")}fo.prototype=po.prototype,po.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Co={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>wo(100*e,t),r:wo,s:function(e,t){var i=mo(e,t);if(!i)return e+"";var n=i[0],o=i[1],r=o-(ho=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,s=n.length;return r===s?n:r>s?n+new Array(r-s+1).join("0"):r>0?n.slice(0,r)+"."+n.slice(r):"0."+new Array(1-r).join("0")+mo(e,Math.max(0,t+r-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function So(e){return e}var xo,ko,Do,Lo=Array.prototype.map,No=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Eo(e){var t,i,n=void 0===e.grouping||void 0===e.thousands?So:(t=Lo.call(e.grouping,Number),i=e.thousands+"",function(e,n){for(var o=e.length,r=[],s=0,a=t[0],l=0;o>0&&a>0&&(l+a+1>n&&(a=Math.max(1,n-l)),r.push(e.substring(o-=a,o+a)),!((l+=a+1)>n));)a=t[s=(s+1)%t.length];return r.reverse().join(i)}),o=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",s=void 0===e.decimal?".":e.decimal+"",a=void 0===e.numerals?So:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(Lo.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function h(e){var t=(e=fo(e)).fill,i=e.align,h=e.sign,d=e.symbol,g=e.zero,f=e.width,p=e.comma,m=e.precision,_=e.trim,v=e.type;"n"===v?(p=!0,v="g"):Co[v]||(void 0===m&&(m=12),_=!0,v="g"),(g||"0"===t&&"="===i)&&(g=!0,t="0",i="=");var b="$"===d?o:"#"===d&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",y="$"===d?r:/[%p]/.test(v)?l:"",w=Co[v],C=/[defgprs%]/.test(v);function S(e){var o,r,l,d=b,S=y;if("c"===v)S=w(e)+S,e="";else{var x=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:w(Math.abs(e),m),_&&(e=function(e){e:for(var t,i=e.length,n=1,o=-1;n0&&(o=0)}return o>0?e.slice(0,o)+e.slice(t+1):e}(e)),x&&0==+e&&"+"!==h&&(x=!1),d=(x?"("===h?h:c:"-"===h||"("===h?"":h)+d,S=("s"===v?No[8+ho/3]:"")+S+(x&&"("===h?")":""),C)for(o=-1,r=e.length;++o(l=e.charCodeAt(o))||l>57){S=(46===l?s+e.slice(o+1):e.slice(o))+S,e=e.slice(0,o);break}}p&&!g&&(e=n(e,1/0));var k=d.length+e.length+S.length,D=k>1)+d+e+S+D.slice(k);break;default:e=D+d+e+S}return a(e)}return m=void 0===m?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),S.toString=function(){return e+""},S}return{format:h,formatPrefix:function(e,t){var i=h(((e=fo(e)).type="f",e)),n=3*Math.max(-8,Math.min(8,Math.floor(_o(t)/3))),o=Math.pow(10,-n),r=No[8+n/3];return function(e){return i(o*e)+r}}}}xo=Eo({thousands:",",grouping:[3],currency:["$",""]}),ko=xo.format,Do=xo.formatPrefix;var Ao=new Date,Mo=new Date;function Io(e,t,i,n){function o(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return o.floor=function(t){return e(t=new Date(+t)),t},o.ceil=function(i){return e(i=new Date(i-1)),t(i,1),e(i),i},o.round=function(e){var t=o(e),i=o.ceil(e);return e-t0))return a;do{a.push(s=new Date(+i)),t(i,r),e(i)}while(s=t)for(;e(t),!i(t);)t.setTime(t-1)}),(function(e,n){if(e>=e)if(n<0)for(;++n<=0;)for(;t(e,-1),!i(e););else for(;--n>=0;)for(;t(e,1),!i(e););}))},i&&(o.count=function(t,n){return Ao.setTime(+t),Mo.setTime(+n),e(Ao),e(Mo),Math.floor(i(Ao,Mo))},o.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?o.filter(n?function(t){return n(t)%e==0}:function(t){return o.count(0,t)%e==0}):o:null}),o}const To=1e3,Ro=6e4,Oo=36e5,Fo=864e5,Po=6048e5,Bo=31536e6;var zo=Io((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ro)/Fo),(e=>e.getDate()-1));const Wo=zo;function Vo(e){return Io((function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),(function(e,t){e.setDate(e.getDate()+7*t)}),(function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ro)/Po}))}zo.range;var Ho=Vo(0),$o=Vo(1),Uo=Vo(2),jo=Vo(3),qo=Vo(4),Ko=Vo(5),Go=Vo(6),Yo=(Ho.range,$o.range,Uo.range,jo.range,qo.range,Ko.range,Go.range,Io((function(e){e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+t)}),(function(e,t){return(t-e)/Fo}),(function(e){return e.getUTCDate()-1})));const Zo=Yo;function Xo(e){return Io((function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCDate(e.getUTCDate()+7*t)}),(function(e,t){return(t-e)/Po}))}Yo.range;var Qo=Xo(0),Jo=Xo(1),er=Xo(2),tr=Xo(3),ir=Xo(4),nr=Xo(5),or=Xo(6),rr=(Qo.range,Jo.range,er.range,tr.range,ir.range,nr.range,or.range,Io((function(e){e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e,t){return t.getFullYear()-e.getFullYear()}),(function(e){return e.getFullYear()})));rr.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Io((function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,i){t.setFullYear(t.getFullYear()+i*e)})):null};const sr=rr;rr.range;var ar=Io((function(e){e.setDate(1),e.setHours(0,0,0,0)}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())}),(function(e){return e.getMonth()}));const lr=ar;ar.range;var cr=Io((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*To-e.getMinutes()*Ro)}),(function(e,t){e.setTime(+e+t*Oo)}),(function(e,t){return(t-e)/Oo}),(function(e){return e.getHours()}));const ur=cr;cr.range;var hr=Io((function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*To)}),(function(e,t){e.setTime(+e+t*Ro)}),(function(e,t){return(t-e)/Ro}),(function(e){return e.getMinutes()}));const dr=hr;hr.range;var gr=Io((function(e){e.setTime(e-e.getMilliseconds())}),(function(e,t){e.setTime(+e+t*To)}),(function(e,t){return(t-e)/To}),(function(e){return e.getUTCSeconds()}));const fr=gr;gr.range;var pr=Io((function(){}),(function(e,t){e.setTime(+e+t)}),(function(e,t){return t-e}));pr.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?Io((function(t){t.setTime(Math.floor(t/e)*e)}),(function(t,i){t.setTime(+t+i*e)}),(function(t,i){return(i-t)/e})):pr:null};const mr=pr;pr.range;var _r=Io((function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)}),(function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()}),(function(e){return e.getUTCFullYear()}));_r.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Io((function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,i){t.setUTCFullYear(t.getUTCFullYear()+i*e)})):null};const vr=_r;_r.range;var br=Io((function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),(function(e,t){e.setUTCMonth(e.getUTCMonth()+t)}),(function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())}),(function(e){return e.getUTCMonth()}));const yr=br;br.range;var wr=Io((function(e){e.setUTCMinutes(0,0,0)}),(function(e,t){e.setTime(+e+t*Oo)}),(function(e,t){return(t-e)/Oo}),(function(e){return e.getUTCHours()}));const Cr=wr;wr.range;var Sr=Io((function(e){e.setUTCSeconds(0,0)}),(function(e,t){e.setTime(+e+t*Ro)}),(function(e,t){return(t-e)/Ro}),(function(e){return e.getUTCMinutes()}));const xr=Sr;function kr(e,t){return et?1:e>=t?0:NaN}function Dr(e){let t=e,i=e;function n(e,t,n,o){for(null==n&&(n=0),null==o&&(o=e.length);n>>1;i(e[r],t)<0?n=r+1:o=r}return n}return 1===e.length&&(t=(t,i)=>e(t)-i,i=function(e){return(t,i)=>kr(e(t),i)}(e)),{left:n,center:function(e,i,o,r){null==o&&(o=0),null==r&&(r=e.length);const s=n(e,i,o,r-1);return s>o&&t(e[s-1],i)>-t(e[s],i)?s-1:s},right:function(e,t,n,o){for(null==n&&(n=0),null==o&&(o=e.length);n>>1;i(e[r],t)>0?o=r:n=r+1}return n}}}Sr.range;const Lr="year",Nr="quarter",Er="month",Ar="week",Mr="date",Ir="day",Tr="dayofyear",Rr="hours",Or="minutes",Fr="seconds",Pr="milliseconds",Br=[Lr,Nr,Er,Ar,Mr,Ir,Tr,Rr,Or,Fr,Pr],zr=Br.reduce(((e,t,i)=>(e[t]=1+i,e)),{});function Wr(e){const t=Ti(e).slice(),i={};return t.length||qt("Missing time unit."),t.forEach((e=>{Ki(zr,e)?i[e]=1:qt("Invalid time unit: ".concat(e,"."))})),(i[Ar]||i[Ir]?1:0)+(i[Nr]||i[Er]||i[Mr]?1:0)+(i[Tr]?1:0)>1&&qt("Incompatible time units: ".concat(e)),t.sort(((e,t)=>zr[e]-zr[t])),t}const Vr={[Lr]:"%Y ",[Nr]:"Q%q ",[Er]:"%b ",[Mr]:"%d ",[Ar]:"W%U ",[Ir]:"%a ",[Tr]:"%j ",[Rr]:"%H:00",[Or]:"00:%M",[Fr]:":%S",[Pr]:".%L",["".concat(Lr,"-").concat(Er)]:"%Y-%m ",["".concat(Lr,"-").concat(Er,"-").concat(Mr)]:"%Y-%m-%d ",["".concat(Rr,"-").concat(Or)]:"%H:%M"};function Hr(e,t){const i=$i({},Vr,t),n=Wr(e),o=n.length;let r,s,a="",l=0;for(l=0;ll;--r)if(s=n.slice(l,r).join("-"),null!=i[s]){a+=i[s],l=r;break}return a.trim()}const $r=new Date;function Ur(e){return $r.setFullYear(e),$r.setMonth(0),$r.setDate(1),$r.setHours(0,0,0,0),$r}function jr(e){return Kr(new Date(e))}function qr(e){return Gr(new Date(e))}function Kr(e){return Wo.count(Ur(e.getFullYear())-1,e)}function Gr(e){return Ho.count(Ur(e.getFullYear())-1,e)}function Yr(e){return Ur(e).getDay()}function Zr(e,t,i,n,o,r,s){if(0<=e&&e<100){const a=new Date(-1,t,i,n,o,r,s);return a.setFullYear(e),a}return new Date(e,t,i,n,o,r,s)}function Xr(e){return Jr(new Date(e))}function Qr(e){return es(new Date(e))}function Jr(e){const t=Date.UTC(e.getUTCFullYear(),0,1);return Zo.count(t-1,e)}function es(e){const t=Date.UTC(e.getUTCFullYear(),0,1);return Qo.count(t-1,e)}function ts(e){return $r.setTime(Date.UTC(e,0,1)),$r.getUTCDay()}function is(e,t,i,n,o,r,s){if(0<=e&&e<100){const e=new Date(Date.UTC(-1,t,i,n,o,r,s));return e.setUTCFullYear(i.y),e}return new Date(Date.UTC(e,t,i,n,o,r,s))}function ns(e,t,i,n,o){const r=t||1,s=fi(e),a=(e,t,o)=>function(e,t,i,n){const o=i<=1?e:n?(t,o)=>n+i*Math.floor((e(t,o)-n)/i):(t,n)=>i*Math.floor(e(t,n)/i);return t?(e,i)=>t(o(e,i),i):o}(i[o=o||e],n[o],e===s&&r,t),l=new Date,c=vn(e),u=c[Lr]?a(Lr):Vi(2012),h=c[Er]?a(Er):c[Nr]?a(Nr):Xt,d=c[Ar]&&c[Ir]?a(Ir,1,Ar+Ir):c[Ar]?a(Ar,1):c[Ir]?a(Ir,1):c[Mr]?a(Mr,1):c[Tr]?a(Tr,1):Qt,g=c[Rr]?a(Rr):Xt,f=c[Or]?a(Or):Xt,p=c[Fr]?a(Fr):Xt,m=c[Pr]?a(Pr):Xt;return function(e){l.setTime(+e);const t=u(l);return o(t,h(l),d(l,t),g(l),f(l),p(l),m(l))}}function os(e,t,i){return t+7*e-(i+6)%7}const rs={[Lr]:e=>e.getFullYear(),[Nr]:e=>Math.floor(e.getMonth()/3),[Er]:e=>e.getMonth(),[Mr]:e=>e.getDate(),[Rr]:e=>e.getHours(),[Or]:e=>e.getMinutes(),[Fr]:e=>e.getSeconds(),[Pr]:e=>e.getMilliseconds(),[Tr]:e=>Kr(e),[Ar]:e=>Gr(e),[Ar+Ir]:(e,t)=>os(Gr(e),e.getDay(),Yr(t)),[Ir]:(e,t)=>os(1,e.getDay(),Yr(t))},ss={[Nr]:e=>3*e,[Ar]:(e,t)=>os(e,0,Yr(t))};function as(e,t){return ns(e,t||1,rs,ss,Zr)}const ls={[Lr]:e=>e.getUTCFullYear(),[Nr]:e=>Math.floor(e.getUTCMonth()/3),[Er]:e=>e.getUTCMonth(),[Mr]:e=>e.getUTCDate(),[Rr]:e=>e.getUTCHours(),[Or]:e=>e.getUTCMinutes(),[Fr]:e=>e.getUTCSeconds(),[Pr]:e=>e.getUTCMilliseconds(),[Tr]:e=>Jr(e),[Ar]:e=>es(e),[Ir]:(e,t)=>os(1,e.getUTCDay(),ts(t)),[Ar+Ir]:(e,t)=>os(es(e),e.getUTCDay(),ts(t))},cs={[Nr]:e=>3*e,[Ar]:(e,t)=>os(e,0,ts(t))};function us(e,t){return ns(e,t||1,ls,cs,is)}const hs={[Lr]:sr,[Nr]:lr.every(3),[Er]:lr,[Ar]:Ho,[Mr]:Wo,[Ir]:Wo,[Tr]:Wo,[Rr]:ur,[Or]:dr,[Fr]:fr,[Pr]:mr},ds={[Lr]:vr,[Nr]:yr.every(3),[Er]:yr,[Ar]:Qo,[Mr]:Zo,[Ir]:Zo,[Tr]:Zo,[Rr]:Cr,[Or]:xr,[Fr]:fr,[Pr]:mr};function gs(e){return hs[e]}function fs(e){return ds[e]}function ps(e,t,i){return e?e.offset(t,i):void 0}function ms(e,t,i){return ps(gs(e),t,i)}function _s(e,t,i){return ps(fs(e),t,i)}function vs(e,t,i,n){return e?e.range(t,i,n):void 0}function bs(e,t,i,n){return vs(gs(e),t,i,n)}function ys(e,t,i,n){return vs(fs(e),t,i,n)}const ws=31536e6,Cs=[Lr,Er,Mr,Rr,Or,Fr,Pr],Ss=Cs.slice(0,-1),xs=Ss.slice(0,-1),ks=xs.slice(0,-1),Ds=ks.slice(0,-1),Ls=[Lr,Er],Ns=[Lr],Es=[[Ss,1,1e3],[Ss,5,5e3],[Ss,15,15e3],[Ss,30,3e4],[xs,1,6e4],[xs,5,3e5],[xs,15,9e5],[xs,30,18e5],[ks,1,36e5],[ks,3,108e5],[ks,6,216e5],[ks,12,432e5],[Ds,1,864e5],[[Lr,Ar],1,6048e5],[Ls,1,2592e6],[Ls,3,7776e6],[Ns,1,ws]];function As(e){const t=e.extent,i=e.maxbins||40,n=Math.abs(dn(t))/i;let o,r,s=Dr((e=>e[2])).right(Es,n);return s===Es.length?(o=Ns,r=uo(t[0]/ws,t[1]/ws,i)):s?(s=Es[n/Es[s-1][2]=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:tl,s:il,S:Ca,u:Sa,U:xa,V:Da,w:La,W:Na,x:null,X:null,y:Ea,Y:Ma,Z:Ta,"%":el},y={a:function(e){return s[e.getUTCDay()]},A:function(e){return r[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return a[e.getUTCMonth()]},c:null,d:Ra,e:Ra,f:za,g:Za,G:Qa,H:Oa,I:Fa,j:Pa,L:Ba,m:Wa,M:Va,p:function(e){return o[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:tl,s:il,S:Ha,u:$a,U:Ua,V:qa,w:Ka,W:Ga,x:null,X:null,y:Ya,Y:Xa,Z:Ja,"%":el},w={a:function(e,t,i){var n=g.exec(t.slice(i));return n?(e.w=f.get(n[0].toLowerCase()),i+n[0].length):-1},A:function(e,t,i){var n=h.exec(t.slice(i));return n?(e.w=d.get(n[0].toLowerCase()),i+n[0].length):-1},b:function(e,t,i){var n=_.exec(t.slice(i));return n?(e.m=v.get(n[0].toLowerCase()),i+n[0].length):-1},B:function(e,t,i){var n=p.exec(t.slice(i));return n?(e.m=m.get(n[0].toLowerCase()),i+n[0].length):-1},c:function(e,i,n){return x(e,t,i,n)},d:oa,e:oa,f:ua,g:ea,G:Js,H:sa,I:sa,j:ra,L:ca,m:na,M:aa,p:function(e,t,i){var n=c.exec(t.slice(i));return n?(e.p=u.get(n[0].toLowerCase()),i+n[0].length):-1},q:ia,Q:da,s:ga,S:la,u:Ys,U:Zs,V:Xs,w:Gs,W:Qs,x:function(e,t,n){return x(e,i,t,n)},X:function(e,t,i){return x(e,n,t,i)},y:ea,Y:Js,Z:ta,"%":ha};function C(e,t){return function(i){var n,o,r,s=[],a=-1,l=0,c=e.length;for(i instanceof Date||(i=new Date(+i));++a53)return null;"w"in r||(r.w=1),"Z"in r?(o=(n=Is(Ts(r.y,0,1))).getUTCDay(),n=o>4||0===o?Jo.ceil(n):Jo(n),n=Zo.offset(n,7*(r.V-1)),r.y=n.getUTCFullYear(),r.m=n.getUTCMonth(),r.d=n.getUTCDate()+(r.w+6)%7):(o=(n=Ms(Ts(r.y,0,1))).getDay(),n=o>4||0===o?$o.ceil(n):$o(n),n=Wo.offset(n,7*(r.V-1)),r.y=n.getFullYear(),r.m=n.getMonth(),r.d=n.getDate()+(r.w+6)%7)}else("W"in r||"U"in r)&&("w"in r||(r.w="u"in r?r.u%7:"W"in r?1:0),o="Z"in r?Is(Ts(r.y,0,1)).getUTCDay():Ms(Ts(r.y,0,1)).getDay(),r.m=0,r.d="W"in r?(r.w+6)%7+7*r.W-(o+5)%7:r.w+7*r.U-(o+6)%7);return"Z"in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,Is(r)):Ms(r)}}function x(e,t,i,n){for(var o,r,s=0,a=t.length,l=i.length;s=l)return-1;if(37===(o=t.charCodeAt(s++))){if(o=t.charAt(s++),!(r=w[o in Ws?t.charAt(s++):o])||(n=r(e,i,n))<0)return-1}else if(o!=i.charCodeAt(n++))return-1}return n}return b.x=C(i,b),b.X=C(n,b),b.c=C(t,b),y.x=C(i,y),y.X=C(n,y),y.c=C(t,y),{format:function(e){var t=C(e+="",b);return t.toString=function(){return e},t},parse:function(e){var t=S(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=C(e+="",y);return t.toString=function(){return e},t},utcParse:function(e){var t=S(e+="",!0);return t.toString=function(){return e},t}}}var Os,Fs,Ps,Bs,zs,Ws={"-":"",_:" ",0:"0"},Vs=/^\s*\d+/,Hs=/^%/,$s=/[\\^$*+?|[\]().{}]/g;function Us(e,t,i){var n=e<0?"-":"",o=(n?-e:e)+"",r=o.length;return n+(r[e.toLowerCase(),t])))}function Gs(e,t,i){var n=Vs.exec(t.slice(i,i+1));return n?(e.w=+n[0],i+n[0].length):-1}function Ys(e,t,i){var n=Vs.exec(t.slice(i,i+1));return n?(e.u=+n[0],i+n[0].length):-1}function Zs(e,t,i){var n=Vs.exec(t.slice(i,i+2));return n?(e.U=+n[0],i+n[0].length):-1}function Xs(e,t,i){var n=Vs.exec(t.slice(i,i+2));return n?(e.V=+n[0],i+n[0].length):-1}function Qs(e,t,i){var n=Vs.exec(t.slice(i,i+2));return n?(e.W=+n[0],i+n[0].length):-1}function Js(e,t,i){var n=Vs.exec(t.slice(i,i+4));return n?(e.y=+n[0],i+n[0].length):-1}function ea(e,t,i){var n=Vs.exec(t.slice(i,i+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),i+n[0].length):-1}function ta(e,t,i){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(i,i+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),i+n[0].length):-1}function ia(e,t,i){var n=Vs.exec(t.slice(i,i+1));return n?(e.q=3*n[0]-3,i+n[0].length):-1}function na(e,t,i){var n=Vs.exec(t.slice(i,i+2));return n?(e.m=n[0]-1,i+n[0].length):-1}function oa(e,t,i){var n=Vs.exec(t.slice(i,i+2));return n?(e.d=+n[0],i+n[0].length):-1}function ra(e,t,i){var n=Vs.exec(t.slice(i,i+3));return n?(e.m=0,e.d=+n[0],i+n[0].length):-1}function sa(e,t,i){var n=Vs.exec(t.slice(i,i+2));return n?(e.H=+n[0],i+n[0].length):-1}function aa(e,t,i){var n=Vs.exec(t.slice(i,i+2));return n?(e.M=+n[0],i+n[0].length):-1}function la(e,t,i){var n=Vs.exec(t.slice(i,i+2));return n?(e.S=+n[0],i+n[0].length):-1}function ca(e,t,i){var n=Vs.exec(t.slice(i,i+3));return n?(e.L=+n[0],i+n[0].length):-1}function ua(e,t,i){var n=Vs.exec(t.slice(i,i+6));return n?(e.L=Math.floor(n[0]/1e3),i+n[0].length):-1}function ha(e,t,i){var n=Hs.exec(t.slice(i,i+1));return n?i+n[0].length:-1}function da(e,t,i){var n=Vs.exec(t.slice(i));return n?(e.Q=+n[0],i+n[0].length):-1}function ga(e,t,i){var n=Vs.exec(t.slice(i));return n?(e.s=+n[0],i+n[0].length):-1}function fa(e,t){return Us(e.getDate(),t,2)}function pa(e,t){return Us(e.getHours(),t,2)}function ma(e,t){return Us(e.getHours()%12||12,t,2)}function _a(e,t){return Us(1+Wo.count(sr(e),e),t,3)}function va(e,t){return Us(e.getMilliseconds(),t,3)}function ba(e,t){return va(e,t)+"000"}function ya(e,t){return Us(e.getMonth()+1,t,2)}function wa(e,t){return Us(e.getMinutes(),t,2)}function Ca(e,t){return Us(e.getSeconds(),t,2)}function Sa(e){var t=e.getDay();return 0===t?7:t}function xa(e,t){return Us(Ho.count(sr(e)-1,e),t,2)}function ka(e){var t=e.getDay();return t>=4||0===t?qo(e):qo.ceil(e)}function Da(e,t){return e=ka(e),Us(qo.count(sr(e),e)+(4===sr(e).getDay()),t,2)}function La(e){return e.getDay()}function Na(e,t){return Us($o.count(sr(e)-1,e),t,2)}function Ea(e,t){return Us(e.getFullYear()%100,t,2)}function Aa(e,t){return Us((e=ka(e)).getFullYear()%100,t,2)}function Ma(e,t){return Us(e.getFullYear()%1e4,t,4)}function Ia(e,t){var i=e.getDay();return Us((e=i>=4||0===i?qo(e):qo.ceil(e)).getFullYear()%1e4,t,4)}function Ta(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Us(t/60|0,"0",2)+Us(t%60,"0",2)}function Ra(e,t){return Us(e.getUTCDate(),t,2)}function Oa(e,t){return Us(e.getUTCHours(),t,2)}function Fa(e,t){return Us(e.getUTCHours()%12||12,t,2)}function Pa(e,t){return Us(1+Zo.count(vr(e),e),t,3)}function Ba(e,t){return Us(e.getUTCMilliseconds(),t,3)}function za(e,t){return Ba(e,t)+"000"}function Wa(e,t){return Us(e.getUTCMonth()+1,t,2)}function Va(e,t){return Us(e.getUTCMinutes(),t,2)}function Ha(e,t){return Us(e.getUTCSeconds(),t,2)}function $a(e){var t=e.getUTCDay();return 0===t?7:t}function Ua(e,t){return Us(Qo.count(vr(e)-1,e),t,2)}function ja(e){var t=e.getUTCDay();return t>=4||0===t?ir(e):ir.ceil(e)}function qa(e,t){return e=ja(e),Us(ir.count(vr(e),e)+(4===vr(e).getUTCDay()),t,2)}function Ka(e){return e.getUTCDay()}function Ga(e,t){return Us(Jo.count(vr(e)-1,e),t,2)}function Ya(e,t){return Us(e.getUTCFullYear()%100,t,2)}function Za(e,t){return Us((e=ja(e)).getUTCFullYear()%100,t,2)}function Xa(e,t){return Us(e.getUTCFullYear()%1e4,t,4)}function Qa(e,t){var i=e.getUTCDay();return Us((e=i>=4||0===i?ir(e):ir.ceil(e)).getUTCFullYear()%1e4,t,4)}function Ja(){return"+0000"}function el(){return"%"}function tl(e){return+e}function il(e){return Math.floor(+e/1e3)}function nl(e){const t={};return i=>t[i]||(t[i]=e(i))}function ol(e){const t=nl(e.format),i=e.formatPrefix;return{format:t,formatPrefix:i,formatFloat(e){const i=fo(e||",");if(null==i.precision){switch(i.precision=12,i.type){case"%":i.precision-=2;break;case"e":i.precision-=1}return function(e,t){return i=>{const n=e(i),o=n.indexOf(t);if(o<0)return n;let r=function(e,t){let i,n=e.lastIndexOf("e");if(n>0)return n;for(n=e.length;--n>t;)if(i=e.charCodeAt(n),i>=48&&i<=57)return n+1}(n,o);const s=ro;)if("0"!==n[r]){++r;break}return n.slice(0,r)+s}}(t(i),t(".1f")(1)[1])}return t(i)},formatSpan(e,n,o,r){r=fo(null==r?",f":r);const s=uo(e,n,o),a=Math.max(Math.abs(e),Math.abs(n));let l;if(null==r.precision)switch(r.type){case"s":return isNaN(l=vo(s,a))||(r.precision=l),i(r,a);case"":case"e":case"g":case"p":case"r":isNaN(l=bo(s,a))||(r.precision=l-("e"===r.type));break;case"f":case"%":isNaN(l=yo(s))||(r.precision=l-2*("%"===r.type))}return t(r)}}}let rl,sl;function al(){return rl=ol({format:ko,formatPrefix:Do})}function ll(e){return ol(Eo(e))}function cl(e){return arguments.length?rl=ll(e):rl}function ul(e,t,i){ci(i=i||{})||qt("Invalid time multi-format specifier: ".concat(i));const n=t(Fr),o=t(Or),r=t(Rr),s=t(Mr),a=t(Ar),l=t(Er),c=t(Nr),u=t(Lr),h=e(i[Pr]||".%L"),d=e(i[Fr]||":%S"),g=e(i[Or]||"%I:%M"),f=e(i[Rr]||"%I %p"),p=e(i[Mr]||i[Ir]||"%a %d"),m=e(i[Ar]||"%b %d"),_=e(i[Er]||"%B"),v=e(i[Nr]||"%B"),b=e(i[Lr]||"%Y");return e=>(n(e)rn(e)?t(e):ul(t,gs,e),utcFormat:e=>rn(e)?i(e):ul(i,fs,e),timeParse:nl(e.parse),utcParse:nl(e.utcParse)}}function dl(){return sl=hl({format:Fs,parse:Ps,utcFormat:Bs,utcParse:zs})}function gl(e){return hl(Rs(e))}function fl(e){return arguments.length?sl=gl(e):sl}Os=Rs({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),Fs=Os.format,Ps=Os.parse,Bs=Os.utcFormat,zs=Os.utcParse,al(),dl();const pl=(e,t)=>$i({},e,t);function ml(e,t){const i=e?ll(e):cl(),n=t?gl(t):fl();return pl(i,n)}function _l(e,t){const i=arguments.length;return i&&2!==i&&qt("defaultLocale expects either zero or two arguments."),i?pl(cl(e),fl(t)):pl(cl(),fl())}function vl(){return al(),dl(),_l()}function bl(e,t,i,n){const o=no((t=t||{}).type||"json");return o||qt("Unknown data format type: "+t.type),e=o(e,t),t.parse&&function(e,t,i,n){if(!e.length)return;const o=fl();i=i||o.timeParse,n=n||o.utcParse;let r,s,a,l,c,u,h=e.columns||Object.keys(e[0]);"auto"===t&&(t=Fn(e,h)),h=Object.keys(t);const d=h.map((e=>{const o=t[e];let r,s;if(o&&(o.startsWith("date:")||o.startsWith("utc:")))return r=o.split(/:(.+)?/,2),s=r[1],("'"===s[0]&&"'"===s[s.length-1]||'"'===s[0]&&'"'===s[s.length-1])&&(s=s.slice(1,-1)),("utc"===r[0]?n:i)(s);if(!In[o])throw Error("Illegal format pattern: "+e+":"+o);return In[o]}));for(a=0,c=e.length,u=h.length;a({options:t||{},sanitize:Dn,load:kn,fileAccess:!1,file:Ln(null),http:En(e)})}("undefined"!=typeof fetch&&fetch);function wl(e){const t=e||Zt,i=[],n={};return i.add=e=>{const o=t(e);return n[o]||(n[o]=1,i.push(e)),i},i.remove=e=>{const o=t(e);if(n[o]){n[o]=0;const t=i.indexOf(e);t>=0&&i.splice(t,1)}return i},i}async function Cl(e,t){try{await t(e)}catch(t){e.error(t)}}const Sl=Symbol("vega_id");let xl=1;function kl(e){return!(!e||!Dl(e))}function Dl(e){return e[Sl]}function Ll(e,t){return e[Sl]=t,e}function Nl(e){const t=e===Object(e)?e:{data:e};return Dl(t)?t:Ll(t,xl++)}function El(e){return Al(e,Nl({}))}function Al(e,t){for(const i in e)t[i]=e[i];return t}function Ml(e,t){return Ll(t,Dl(e))}function Il(e,t){return e?t?(i,n)=>e(i,n)||Dl(t(i))-Dl(t(n)):(t,i)=>e(t,i)||Dl(t)-Dl(i):null}function Tl(e){return e&&e.constructor===Rl}function Rl(){const e=[],t=[],i=[],n=[],o=[];let r=null,s=!1;return{constructor:Rl,insert(t){const i=Ti(t),n=i.length;for(let t=0;t{f(e)&&(c[Dl(e)]=-1)}));for(h=0,d=e.length;h0&&(_(p,f,g.value),a.modifies(f));for(h=0,d=o.length;h{f(e)&&c[Dl(e)]>0&&_(e,g.field,g.value)})),a.modifies(g.field);if(s)a.mod=t.length||n.length?l.filter((e=>c[Dl(e)]>0)):l.slice();else for(m in u)a.mod.push(u[m]);return(r||null==r&&(t.length||n.length))&&a.clean(!0),a}}}const Ol="_:mod:_";function Fl(){Object.defineProperty(this,Ol,{writable:!0,value:{}})}Fl.prototype={set(e,t,i,n){const o=this,r=o[e],s=o[Ol];return null!=t&&t>=0?(r[t]!==i||n)&&(r[t]=i,s[t+":"+e]=-1,s[e]=-1):(r!==i||n)&&(o[e]=i,s[e]=li(i)?1+i.length:-1),o},modified(e,t){const i=this[Ol];if(!arguments.length){for(const e in i)if(i[e])return!0;return!1}if(li(e)){for(let t=0;t=0?t+1{s instanceof zl?(s!==this&&(t&&s.targets().add(this),r.push(s)),o.push({op:s,name:e,index:i})):n.set(e,i,s)};for(s in e)if(a=e[s],"pulse"===s)Ti(a).forEach((e=>{e instanceof zl?e!==this&&(e.targets().add(this),r.push(e)):qt("Pulse parameters must be operator instances.")})),this.source=a;else if(li(a))for(n.set(s,-1,Array(l=a.length)),c=0;c{const i=Date.now();return i-t>e?(t=i,1):0}))},debounce(e){const t=$l();return this.targets().add($l(null,null,Hi(e,(e=>{const i=e.dataflow;t.receive(e),i&&i.run&&i.run()})))),t},between(e,t){let i=!1;return e.targets().add($l(null,null,(()=>i=!0))),t.targets().add($l(null,null,(()=>i=!1))),this.filter((()=>i))},detach(){this._filter=Jt,this._targets=null}};const Ul={skip:!0};function jl(e,t,i,n,o,r){const s=$i({},r,Ul);let a,l;Oi(i)||(i=Vi(i)),void 0===n?a=t=>e.touch(i(t)):Oi(n)?(l=new zl(null,n,o,!1),a=t=>{l.evaluate(t);const n=i(t),o=l.value;Tl(o)?e.pulse(n,o,r):e.update(n,o,s)}):a=t=>e.update(i(t),n,s),t.apply(a)}function ql(e,t,i,n,o,r){if(void 0===n)t.targets().add(i);else{const s=r||{},a=new zl(null,function(e,t){return t=Oi(t)?t:Vi(t),e?function(i,n){const o=t(i,n);return e.skip()||(e.skip(o!==this.value).value=o),o}:t}(i,n),o,!1);a.modified(s.force),a.rank=t.rank,t.targets().add(a),i&&(a.skip(!0),a.value=i.value,a.targets().add(i),e.connect(i,[a]))}}const Kl={};function Gl(e,t,i){this.dataflow=e,this.stamp=null==t?-1:t,this.add=[],this.rem=[],this.mod=[],this.fields=null,this.encode=i||null}function Yl(e,t){const i=[];return yn(e,t,(e=>i.push(e))),i}function Zl(e,t){const i={};return e.visit(t,(e=>{i[Dl(e)]=1})),e=>i[Dl(e)]?null:e}function Xl(e,t){return e?(i,n)=>e(i,n)&&t(i,n):t}function Ql(e,t,i,n){const o=this,r=i.length;let s=0;this.dataflow=e,this.stamp=t,this.fields=null,this.encode=n||null,this.pulses=i;for(let e=0;et[e]=!0)):t[e]=!0,this},modified(e,t){const i=this.fields;return!(!t&&!this.mod.length||!i)&&(arguments.length?li(e)?e.some((e=>i[e])):i[e]:!!i)},filter(e,t){const i=this;return 1&e&&(i.addF=Xl(i.addF,t)),2&e&&(i.remF=Xl(i.remF,t)),4&e&&(i.modF=Xl(i.modF,t)),16&e&&(i.srcF=Xl(i.srcF,t)),i},materialize(e){const t=this;return 1&(e=e||7)&&t.addF&&(t.add=Yl(t.add,t.addF),t.addF=null),2&e&&t.remF&&(t.rem=Yl(t.rem,t.remF),t.remF=null),4&e&&t.modF&&(t.mod=Yl(t.mod,t.modF),t.modF=null),16&e&&t.srcF&&(t.source=t.source.filter(t.srcF),t.srcF=null),t},visit(e,t){const i=this,n=t;if(16&e)return yn(i.source,i.srcF,n),i;1&e&&yn(i.add,i.addF,n),2&e&&yn(i.rem,i.remF,n),4&e&&yn(i.mod,i.modF,n);const o=i.source;if(8&e&&o){const e=i.add.length+i.mod.length;e===o.length||yn(o,e?Zl(i,5):i.srcF,n)}return i}},Xi(Ql,Gl,{fork(e){const t=new Gl(this.dataflow).init(this,e&this.NO_FIELDS);return void 0!==e&&(e&t.ADD&&this.visit(t.ADD,(e=>t.add.push(e))),e&t.REM&&this.visit(t.REM,(e=>t.rem.push(e))),e&t.MOD&&this.visit(t.MOD,(e=>t.mod.push(e)))),t},changed(e){return this.changes&e},modified(e){const t=this,i=t.fields;return i&&t.changes&t.MOD?li(e)?e.some((e=>i[e])):i[e]:0},filter(){qt("MultiPulse does not support filtering.")},materialize(){qt("MultiPulse does not support materialization.")},visit(e,t){const i=this,n=i.pulses,o=n.length;let r=0;if(e&i.SOURCE)for(;rt&&(r=i-1>>1,o=e[r],n(s,o)<0);)e[i]=o,i=r;return e[i]=s}function ic(){this.logger(ai()),this.logLevel(ni),this._clock=0,this._rank=0,this._locale=_l();try{this._loader=yl()}catch(e){}this._touched=wl(Yt),this._input={},this._pulse=null,this._heap=function(e){let t=[];return{clear:()=>t=[],size:()=>t.length,peek:()=>t[0],push:i=>(t.push(i),tc(t,0,t.length-1,e)),pop:()=>{const i=t.pop();let n;return t.length?(n=t[0],t[0]=i,function(e,t,i){const n=t,o=e.length,r=e[t];let s,a=1+(t<<1);for(;a=0&&(a=s),e[t]=e[a],a=1+((t=a)<<1);e[t]=r,tc(e,n,t,i)}(t,0,e)):n=i,n}}}(((e,t)=>e.qrank-t.qrank)),this._postrun=[]}function nc(e){return function(){return this._log[e].apply(this,arguments)}}function oc(e,t){zl.call(this,e,null,t)}ic.prototype={stamp(){return this._clock},loader(e){return arguments.length?(this._loader=e,this):this._loader},locale(e){return arguments.length?(this._locale=e,this):this._locale},logger(e){return arguments.length?(this._log=e,this):this._log},error:nc("error"),warn:nc("warn"),info:nc("info"),debug:nc("debug"),logLevel:nc("level"),cleanThreshold:1e4,add:function(e,t,i,n){let o,r=1;return e instanceof zl?o=e:e&&e.prototype instanceof zl?o=new e:Oi(e)?o=new zl(null,e):(r=0,o=new zl(e,t)),this.rank(o),r&&(n=i,i=t),i&&this.connect(o,o.parameters(i,n)),this.touch(o),o},connect:function(e,t){const i=e.rank,n=t.length;for(let o=0;o=0;)t.push(i=n[o]),i===e&&qt("Cycle detected in dataflow graph.")},pulse:function(e,t,i){this.touch(e,i||ec);const n=new Gl(this,this._clock+(this._pulse?0:1)),o=e.pulse&&e.pulse.source||[];return n.target=e,this._input[e.id]=t.pulse(n,o),this},touch:function(e,t){const i=t||ec;return this._pulse?this._enqueue(e):this._touched.add(e),i.skip&&e.skip(!0),this},update:function(e,t,i){const n=i||ec;return(e.set(t)||n.force)&&this.touch(e,n),this},changeset:Rl,ingest:function(e,t,i){return t=this.parse(t,i),this.pulse(e,this.changeset().insert(t))},parse:function(e,t){const i=this.locale();return bl(e,t,i.timeParse,i.utcParse)},preload:async function(e,t,i){const n=this,o=n._pending||function(e){let t;const i=new Promise((e=>t=e));return i.requests=0,i.done=()=>{0==--i.requests&&(e._pending=null,t(e))},e._pending=i}(n);o.requests+=1;const r=await n.request(t,i);return n.pulse(e,n.changeset().remove(Jt).insert(r.data||[])),o.done(),r},request:async function(e,t){const i=this;let n,o=0;try{n=await i.loader().load(e,{context:"dataflow",response:oo(t&&t.type)});try{n=i.parse(n,t)}catch(t){o=-2,i.warn("Data ingestion failed",e,t)}}catch(t){o=-1,i.warn("Loading failed",e,t)}return{data:n,status:o}},events:function(e,t,i,n){const o=this,r=$l(i,n),s=function(e){e.dataflow=o;try{r.receive(e)}catch(e){o.error(e)}finally{o.run()}};let a;a="string"==typeof e&&"undefined"!=typeof document?document.querySelectorAll(e):Ti(e);const l=a.length;for(let e=0;en._enqueue(e,!0))),n._touched=wl(Yt);let s,a,l,c=0;try{for(;n._heap.size()>0;)s=n._heap.pop(),s.rank===s.qrank?(a=s.run(n._getPulse(s,e)),a.then?a=await a:a.async&&(o.push(a.async),a=Kl),a!==Kl&&s._targets&&s._targets.forEach((e=>n._enqueue(e))),++c):n._enqueue(s,!0)}catch(e){n._heap.clear(),l=e}if(n._input={},n._pulse=null,n.debug(`Pulse ${r}: ${c} operators`),l&&(n._postrun=[],n.error(l)),n._postrun.length){const e=n._postrun.sort(((e,t)=>t.priority-e.priority));n._postrun=[];for(let t=0;tn.runAsync(null,(()=>{e.forEach((e=>{try{e(n)}catch(e){n.error(e)}}))})))),n},run:function(e,t,i){return this._pulse?Jl(this):(this.evaluate(e,t,i),this)},runAsync:async function(e,t,i){for(;this._running;)await this._running;const n=()=>this._running=null;return(this._running=this.evaluate(e,t,i)).then(n,n),this._running},runAfter:function(e,t,i){if(this._pulse||t)this._postrun.push({priority:i||0,callback:e});else try{e(this)}catch(e){this.error(e)}},_enqueue:function(e,t){const i=e.stampe.pulse)),t):this._input[e.id]||function(e,t){return t&&t.stamp===e.stamp?t:(e=e.fork(),t&&t!==Kl&&(e.source=t.source),e)}(this._pulse,i&&i.pulse)}},Xi(oc,zl,{run(e){if(e.stampthis.pulse=e)):t!==e.StopPropagation&&(this.pulse=t),t},evaluate(e){const t=this.marshall(e.stamp),i=this.transform(t,e);return t.clear(),i},transform(){}});const rc={};function sc(e){const t=ac(e);return t&&t.Definition||null}function ac(e){return e=e&&e.toLowerCase(),Ki(rc,e)?rc[e]:null}function lc(e,t){let i;if(void 0===t)for(const t of e)null!=t&&(i=t)&&(i=t);else{let n=-1;for(let o of e)null!=(o=t(o,++n,e))&&(i=o)&&(i=o)}return i}function cc(e,t){let i;if(void 0===t)for(const t of e)null!=t&&(i>t||void 0===i&&t>=t)&&(i=t);else{let n=-1;for(let o of e)null!=(o=t(o,++n,e))&&(i>o||void 0===i&&o>=o)&&(i=o)}return i}function uc(e,t,i=0,n=e.length-1,o=kr){for(;n>i;){if(n-i>600){const r=n-i+1,s=t-i+1,a=Math.log(r),l=.5*Math.exp(2*a/3),c=.5*Math.sqrt(a*l*(r-l)/r)*(s-r/2<0?-1:1);uc(e,t,Math.max(i,Math.floor(t-s*l/r+c)),Math.min(n,Math.floor(t+(r-s)*l/r+c)),o)}const r=e[t];let s=i,a=n;for(hc(e,i,t),o(e[n],r)>0&&hc(e,i,n);s0;)--a}0===o(e[i],r)?hc(e,i,a):(++a,hc(e,a,n)),a<=t&&(i=a+1),t<=a&&(n=a-1)}return e}function hc(e,t,i){const n=e[t];e[t]=e[i],e[i]=n}function dc(e){return null===e?NaN:+e}function gc(e,t,i){if(n=(e=Float64Array.from(function*(e,t){if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(yield t);else{let i=-1;for(let n of e)null!=(n=t(n,++i,e))&&(n=+n)>=n&&(yield n)}}(e,i))).length){if((t=+t)<=0||n<2)return cc(e);if(t>=1)return lc(e);var n,o=(n-1)*t,r=Math.floor(o),s=lc(uc(e,r).subarray(0,r+1));return s+(cc(e.subarray(r+1))-s)*(o-r)}}function fc(e,t,i=dc){if(n=e.length){if((t=+t)<=0||n<2)return+i(e[0],0,e);if(t>=1)return+i(e[n-1],n-1,e);var n,o=(n-1)*t,r=Math.floor(o),s=+i(e[r],r,e);return s+(+i(e[r+1],r+1,e)-s)*(o-r)}}function pc(e,t){return gc(e,.5,t)}function*mc(e,t){if(null==t)for(let t of e)null!=t&&""!==t&&(t=+t)>=t&&(yield t);else{let i=-1;for(let n of e)n=t(n,++i,e),null!=n&&""!==n&&(n=+n)>=n&&(yield n)}}function _c(e,t,i){const n=Float64Array.from(mc(e,i));return n.sort(kr),t.map((e=>fc(n,e)))}function vc(e,t){return _c(e,[.25,.5,.75],t)}function bc(e,t){const i=e.length,n=function(e,t){const i=function(e,t){let i,n=0,o=0,r=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(i=t-o,o+=i/++n,r+=i*(t-o));else{let s=-1;for(let a of e)null!=(a=t(a,++s,e))&&(a=+a)>=a&&(i=a-o,o+=i/++n,r+=i*(a-o))}if(n>1)return r/(n-1)}(e,t);return i?Math.sqrt(i):i}(e,t),o=vc(e,t),r=(o[2]-o[0])/1.34;return 1.06*(Math.min(n,r)||n||Math.abs(o[0])||1)*Math.pow(i,-.2)}function yc(e){const t=e.maxbins||20,i=e.base||10,n=Math.log(i),o=e.divide||[5,2];let r,s,a,l,c,u,h=e.extent[0],d=e.extent[1];const g=e.span||d-h||Math.abs(h)||1;if(e.step)r=e.step;else if(e.steps){for(l=g/t,c=0,u=e.steps.length;ct;)r*=i;for(c=0,u=o.length;c=a&&g/l<=t&&(r=l)}l=Math.log(r);const f=l>=0?0:1+~~(-l/n),p=Math.pow(i,-f-1);return(e.nice||void 0===e.nice)&&(l=Math.floor(h/r+p)*r,h=he);const o=e.length,r=new Float64Array(o);let s,a=0,l=1,c=n(e[0]),u=c,h=c+t;for(;l=h){for(u=(c+u)/2;a>1);os;)e[o--]=e[r]}r=s,s=n}return e}(r,t+t/4):r}function kc(e){return function(){return(e=(1103515245*e+12345)%2147483647)/2147483647}}function Dc(e,t){let i,n,o;null==t&&(t=e,e=0);const r={min(e){return arguments.length?(i=e||0,o=n-i,r):i},max(e){return arguments.length?(n=e||0,o=n-i,r):n},sample:()=>i+Math.floor(o*wc()),pdf:e=>e===Math.floor(e)&&e>=i&&e=n?1:(t-i+1)/o},icdf:e=>e>=0&&e<=1?i-1+Math.floor(e*o):NaN};return r.min(e).max(t)}const Lc=Math.sqrt(2*Math.PI),Nc=Math.SQRT2;let Ec=NaN;function Ac(e,t){e=e||0,t=null==t?1:t;let i,n,o=0,r=0;if(Ec==Ec)o=Ec,Ec=NaN;else{do{o=2*wc()-1,r=2*wc()-1,i=o*o+r*r}while(0===i||i>1);n=Math.sqrt(-2*Math.log(i)/i),o*=n,Ec=r*n}return e+o*t}function Mc(e,t,i){const n=(e-(t||0))/(i=null==i?1:i);return Math.exp(-.5*n*n)/(i*Lc)}function Ic(e,t,i){const n=(e-(t=t||0))/(i=null==i?1:i),o=Math.abs(n);let r;if(o>37)r=0;else{const e=Math.exp(-o*o/2);let t;o<7.07106781186547?(t=.0352624965998911*o+.700383064443688,t=t*o+6.37396220353165,t=t*o+33.912866078383,t=t*o+112.079291497871,t=t*o+221.213596169931,t=t*o+220.206867912376,r=e*t,t=.0883883476483184*o+1.75566716318264,t=t*o+16.064177579207,t=t*o+86.7807322029461,t=t*o+296.564248779674,t=t*o+637.333633378831,t=t*o+793.826512519948,t=t*o+440.413735824752,r/=t):(t=o+.65,t=o+4/t,t=o+3/t,t=o+2/t,t=o+1/t,r=e/t/2.506628274631)}return n>0?1-r:r}function Tc(e,t,i){return e<0||e>1?NaN:(t||0)+(null==i?1:i)*Nc*function(e){let t,i=-Math.log((1-e)*(1+e));return i<6.25?(i-=3.125,t=-364441206401782e-35,t=t*i-16850591381820166e-35,t=128584807152564e-32+t*i,t=11157877678025181e-33+t*i,t=t*i-1333171662854621e-31,t=20972767875968562e-33+t*i,t=6637638134358324e-30+t*i,t=t*i-4054566272975207e-29,t=t*i-8151934197605472e-29,t=26335093153082323e-28+t*i,t=t*i-12975133253453532e-27,t=t*i-5415412054294628e-26,t=1.0512122733215323e-9+t*i,t=t*i-4.112633980346984e-9,t=t*i-2.9070369957882005e-8,t=4.2347877827932404e-7+t*i,t=t*i-13654692000834679e-22,t=t*i-13882523362786469e-21,t=.00018673420803405714+t*i,t=t*i-.000740702534166267,t=t*i-.006033670871430149,t=.24015818242558962+t*i,t=1.6536545626831027+t*i):i<16?(i=Math.sqrt(i)-3.25,t=2.2137376921775787e-9,t=9.075656193888539e-8+t*i,t=t*i-2.7517406297064545e-7,t=1.8239629214389228e-8+t*i,t=15027403968909828e-22+t*i,t=t*i-4013867526981546e-21,t=29234449089955446e-22+t*i,t=12475304481671779e-21+t*i,t=t*i-47318229009055734e-21,t=6828485145957318e-20+t*i,t=24031110387097894e-21+t*i,t=t*i-.0003550375203628475,t=.0009532893797373805+t*i,t=t*i-.0016882755560235047,t=.002491442096107851+t*i,t=t*i-.003751208507569241,t=.005370914553590064+t*i,t=1.0052589676941592+t*i,t=3.0838856104922208+t*i):Number.isFinite(i)?(i=Math.sqrt(i)-5,t=-27109920616438573e-27,t=t*i-2.555641816996525e-10,t=1.5076572693500548e-9+t*i,t=t*i-3.789465440126737e-9,t=7.61570120807834e-9+t*i,t=t*i-1.496002662714924e-8,t=2.914795345090108e-8+t*i,t=t*i-6.771199775845234e-8,t=2.2900482228026655e-7+t*i,t=t*i-9.9298272942317e-7,t=4526062597223154e-21+t*i,t=t*i-1968177810553167e-20,t=7599527703001776e-20+t*i,t=t*i-.00021503011930044477,t=t*i-.00013871931833623122,t=1.0103004648645344+t*i,t=4.849906401408584+t*i):t=1/0,t*e}(2*e-1)}function Rc(e,t){let i,n;const o={mean(e){return arguments.length?(i=e||0,o):i},stdev(e){return arguments.length?(n=null==e?1:e,o):n},sample:()=>Ac(i,n),pdf:e=>Mc(e,i,n),cdf:e=>Ic(e,i,n),icdf:e=>Tc(e,i,n)};return o.mean(e).stdev(t)}function Oc(e,t){const i=Rc();let n=0;const o={data(i){return arguments.length?(e=i,n=i?i.length:0,o.bandwidth(t)):e},bandwidth(i){return arguments.length?(!(t=i)&&e&&(t=bc(e)),o):t},sample:()=>e[~~(wc()*n)]+t*i.sample(),pdf(o){let r=0,s=0;for(;sFc(i,n),pdf:e=>Pc(e,i,n),cdf:e=>Bc(e,i,n),icdf:e=>zc(e,i,n)};return o.mean(e).stdev(t)}function Vc(e,t){let i,n=0;const o={weights(e){return arguments.length?(i=function(e){const t=[];let i,o=0;for(i=0;i=t&&e<=i?1/(i-t):0}function Uc(e,t,i){return null==i&&(i=null==t?1:t,t=0),ei?1:(e-t)/(i-t)}function jc(e,t,i){return null==i&&(i=null==t?1:t,t=0),e>=0&&e<=1?t+e*(i-t):NaN}function qc(e,t){let i,n;const o={min(e){return arguments.length?(i=e||0,o):i},max(e){return arguments.length?(n=null==e?1:e,o):n},sample:()=>Hc(i,n),pdf:e=>$c(e,i,n),cdf:e=>Uc(e,i,n),icdf:e=>jc(e,i,n)};return null==t&&(t=null==e?1:e,e=0),o.min(e).max(t)}function Kc(e,t,i,n){const o=n-e*e,r=Math.abs(o)<1e-24?0:(i-e*t)/o;return[t-r*e,r]}function Gc(e,t,i,n){e=e.filter((e=>{let n=t(e),o=i(e);return null!=n&&(n=+n)>=n&&null!=o&&(o=+o)>=o})),n&&e.sort(((e,i)=>t(e)-t(i)));const o=e.length,r=new Float64Array(o),s=new Float64Array(o);let a,l,c,u=0,h=0,d=0;for(c of e)r[u]=a=+t(c),s[u]=l=+i(c),++u,h+=(a-h)/u,d+=(l-d)/u;for(u=0;u=o&&null!=r&&(r=+r)>=r&&n(o,r,++s)}function Zc(e,t,i,n,o){let r=0,s=0;return Yc(e,t,i,((e,t)=>{const i=t-o(e),a=t-n;r+=i*i,s+=a*a})),1-r/s}function Xc(e,t,i){let n=0,o=0,r=0,s=0,a=0;Yc(e,t,i,((e,t)=>{++a,n+=(e-n)/a,o+=(t-o)/a,r+=(e*t-r)/a,s+=(e*e-s)/a}));const l=Kc(n,o,r,s),c=e=>l[0]+l[1]*e;return{coef:l,predict:c,rSquared:Zc(e,t,i,o,c)}}function Qc(e,t,i){let n=0,o=0,r=0,s=0,a=0;Yc(e,t,i,((e,t)=>{++a,e=Math.log(e),n+=(e-n)/a,o+=(t-o)/a,r+=(e*t-r)/a,s+=(e*e-s)/a}));const l=Kc(n,o,r,s),c=e=>l[0]+l[1]*Math.log(e);return{coef:l,predict:c,rSquared:Zc(e,t,i,o,c)}}function Jc(e,t,i){const[n,o,r,s]=Gc(e,t,i);let a,l,c,u=0,h=0,d=0,g=0,f=0;Yc(e,t,i,((e,t)=>{a=n[f++],l=Math.log(t),c=a*t,u+=(t*l-u)/f,h+=(c-h)/f,d+=(c*l-d)/f,g+=(a*c-g)/f}));const[p,m]=Kc(h/s,u/s,d/s,g/s),_=e=>Math.exp(p+m*(e-r));return{coef:[Math.exp(p-m*r),m],predict:_,rSquared:Zc(e,t,i,s,_)}}function eu(e,t,i){let n=0,o=0,r=0,s=0,a=0,l=0;Yc(e,t,i,((e,t)=>{const i=Math.log(e),c=Math.log(t);++l,n+=(i-n)/l,o+=(c-o)/l,r+=(i*c-r)/l,s+=(i*i-s)/l,a+=(t-a)/l}));const c=Kc(n,o,r,s),u=e=>c[0]*Math.pow(e,c[1]);return c[0]=Math.exp(c[0]),{coef:c,predict:u,rSquared:Zc(e,t,i,a,u)}}function tu(e,t,i){const[n,o,r,s]=Gc(e,t,i),a=n.length;let l,c,u,h,d=0,g=0,f=0,p=0,m=0;for(l=0;lb*(e-=r)*e+y*e+w+s;return{coef:[w-y*r+b*r*r+s,y-2*b*r,b],predict:C,rSquared:Zc(e,t,i,s,C)}}function iu(e,t,i,n){if(1===n)return Xc(e,t,i);if(2===n)return tu(e,t,i);const[o,r,s,a]=Gc(e,t,i),l=o.length,c=[],u=[],h=n+1;let d,g,f,p,m;for(d=0;dMath.abs(e[n][s])&&(s=o);for(r=n;r=n;r--)e[r][o]-=e[r][n]*e[n][o]/e[n][n]}for(o=t-1;o>=0;--o){for(a=0,r=o+1;r{e-=s;let t=a+_[0]+_[1]*e+_[2]*e*e;for(d=3;d=0;--r)for(a=t[r],l=1,o[r]+=a,s=1;s<=r;++s)l*=(r+1-s)/s,o[r-s]+=a*Math.pow(i,s)*l;return o[0]+=n,o}function ou(e,t,i,n){const[o,r,s,a]=Gc(e,t,i,!0),l=o.length,c=Math.max(2,~~(n*l)),u=new Float64Array(l),h=new Float64Array(l),d=new Float64Array(l).fill(1);for(let e=-1;++e<=2;){const t=[0,c-1];for(let e=0;eo[s]-i?n:s;let l=0,c=0,g=0,f=0,p=0;const m=1/Math.abs(o[a]-i||1);for(let e=n;e<=s;++e){const t=o[e],n=r[e],s=ru(Math.abs(i-t)*m)*d[e],a=t*s;l+=s,c+=a,g+=n*s,f+=n*a,p+=t*a}const[_,v]=Kc(c/l,g/l,f/l,p/l);u[e]=_+v*i,h[e]=Math.abs(r[e]-u[e]),su(o,e+1,t)}if(2===e)break;const i=pc(h);if(Math.abs(i)<1e-12)break;for(let e,t,n=0;n=1?1e-12:(t=1-e*e)*t}return function(e,t,i,n){const o=e.length,r=[];let s,a=0,l=0,c=[];for(;a=e.length))for(;t>o&&e[r]-n<=n-e[o];)i[0]=++o,i[1]=r,++r}const au=.1*Math.PI/180;function lu(e,t,i,n){i=i||25,n=Math.max(i,n||200);const o=t=>[t,e(t)],r=t[0],s=t[1],a=s-r,l=a/n,c=[o(r)],u=[];if(i===n){for(let e=1;e0;)u.push(o(r+e/i*a));let h=c[0],d=u[u.length-1];for(;d;){const e=o((h[0]+d[0])/2);e[0]-h[0]>=l&&cu(h,e,d)>au?u.push(e):(h=d,c.push(d),u.pop()),d=u[u.length-1]}return c}function cu(e,t,i){const n=Math.atan2(i[1]-e[1],i[0]-e[0]),o=Math.atan2(t[1]-e[1],t[0]-e[0]);return Math.abs(n-o)}function uu(e,t,i){e=+e,t=+t,i=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+i;for(var n=-1,o=0|Math.max(0,Math.ceil((t-e)/i)),r=new Array(o);++n{const i=t.length;let n=1,o=String(t[0](e));for(;n{},fu={init:gu,add:gu,rem:gu,idx:0},pu={values:{init:e=>e.cell.store=!0,value:e=>e.cell.data.values(),idx:-1},count:{value:e=>e.cell.num},__count__:{value:e=>e.missing+e.valid},missing:{value:e=>e.missing},valid:{value:e=>e.valid},sum:{init:e=>e.sum=0,value:e=>e.sum,add:(e,t)=>e.sum+=+t,rem:(e,t)=>e.sum-=t},product:{init:e=>e.product=1,value:e=>e.valid?e.product:void 0,add:(e,t)=>e.product*=t,rem:(e,t)=>e.product/=t},mean:{init:e=>e.mean=0,value:e=>e.valid?e.mean:void 0,add:(e,t)=>(e.mean_d=t-e.mean,e.mean+=e.mean_d/e.valid),rem:(e,t)=>(e.mean_d=t-e.mean,e.mean-=e.valid?e.mean_d/e.valid:e.mean)},average:{value:e=>e.valid?e.mean:void 0,req:["mean"],idx:1},variance:{init:e=>e.dev=0,value:e=>e.valid>1?e.dev/(e.valid-1):void 0,add:(e,t)=>e.dev+=e.mean_d*(t-e.mean),rem:(e,t)=>e.dev-=e.mean_d*(t-e.mean),req:["mean"],idx:1},variancep:{value:e=>e.valid>1?e.dev/e.valid:void 0,req:["variance"],idx:2},stdev:{value:e=>e.valid>1?Math.sqrt(e.dev/(e.valid-1)):void 0,req:["variance"],idx:2},stdevp:{value:e=>e.valid>1?Math.sqrt(e.dev/e.valid):void 0,req:["variance"],idx:2},stderr:{value:e=>e.valid>1?Math.sqrt(e.dev/(e.valid*(e.valid-1))):void 0,req:["variance"],idx:2},distinct:{value:e=>e.cell.data.distinct(e.get),req:["values"],idx:3},ci0:{value:e=>e.cell.data.ci0(e.get),req:["values"],idx:3},ci1:{value:e=>e.cell.data.ci1(e.get),req:["values"],idx:3},median:{value:e=>e.cell.data.q2(e.get),req:["values"],idx:3},q1:{value:e=>e.cell.data.q1(e.get),req:["values"],idx:3},q3:{value:e=>e.cell.data.q3(e.get),req:["values"],idx:3},min:{init:e=>e.min=void 0,value:e=>e.min=Number.isNaN(e.min)?e.cell.data.min(e.get):e.min,add:(e,t)=>{(t{t<=e.min&&(e.min=NaN)},req:["values"],idx:4},max:{init:e=>e.max=void 0,value:e=>e.max=Number.isNaN(e.max)?e.cell.data.max(e.get):e.max,add:(e,t)=>{(t>e.max||void 0===e.max)&&(e.max=t)},rem:(e,t)=>{t>=e.max&&(e.max=NaN)},req:["values"],idx:4},argmin:{init:e=>e.argmin=void 0,value:e=>e.argmin||e.cell.data.argmin(e.get),add:(e,t,i)=>{t{t<=e.min&&(e.argmin=void 0)},req:["min","values"],idx:3},argmax:{init:e=>e.argmax=void 0,value:e=>e.argmax||e.cell.data.argmax(e.get),add:(e,t,i)=>{t>e.max&&(e.argmax=i)},rem:(e,t)=>{t>=e.max&&(e.argmax=void 0)},req:["max","values"],idx:3}},mu=Object.keys(pu);function _u(e,t){return pu[e](t)}function vu(e,t){return e.idx-t.idx}function bu(){this.valid=0,this.missing=0,this._ops.forEach((e=>e.init(this)))}function yu(e,t){null!=e&&""!==e?e==e&&(++this.valid,this._ops.forEach((i=>i.add(this,e,t)))):++this.missing}function wu(e,t){null!=e&&""!==e?e==e&&(--this.valid,this._ops.forEach((i=>i.rem(this,e,t)))):--this.missing}function Cu(e){return this._out.forEach((t=>e[t.out]=t.value(this))),e}function Su(e,t){const i=t||Zt,n=function(e){const t={};e.forEach((e=>t[e.name]=e));const i=e=>{e.req&&e.req.forEach((e=>{t[e]||i(t[e]=pu[e]())}))};return e.forEach(i),Object.values(t).sort(vu)}(e),o=e.slice().sort(vu);function r(e){this._ops=n,this._out=o,this.cell=e,this.init()}return r.prototype.init=bu,r.prototype.add=yu,r.prototype.rem=wu,r.prototype.set=Cu,r.prototype.get=i,r.fields=e.map((e=>e.out)),r}function xu(e){this._key=e?Gt(e):Dl,this.reset()}mu.forEach((e=>{pu[e]=function(e,t){return i=>$i({name:e,out:i||e},fu,t)}(e,pu[e])}));const ku=xu.prototype;function Du(e){oc.call(this,null,e),this._adds=[],this._mods=[],this._alen=0,this._mlen=0,this._drop=!0,this._cross=!1,this._dims=[],this._dnames=[],this._measures=[],this._countOnly=!1,this._counts=null,this._prev=null,this._inputs=null,this._outputs=null}function Lu(e){oc.call(this,null,e)}function Nu(e,t,i){const n=e;let o=t||[],r=i||[],s={},a=0;return{add:e=>r.push(e),remove:e=>s[n(e)]=++a,size:()=>o.length,data:(e,t)=>(a&&(o=o.filter((e=>!s[n(e)])),s={},a=0),t&&e&&o.sort(e),r.length&&(o=e?cn(e,o,r.sort(e)):o.concat(r),r=[]),o)}}function Eu(e){oc.call(this,[],e)}function Au(e){zl.call(this,null,Mu,e)}function Mu(e){return this.value&&!e.modified()?this.value:Fi(e.fields,e.orders)}function Iu(e){oc.call(this,null,e)}function Tu(e){oc.call(this,null,e)}ku.reset=function(){this._add=[],this._rem=[],this._ext=null,this._get=null,this._q=null},ku.add=function(e){this._add.push(e)},ku.rem=function(e){this._rem.push(e)},ku.values=function(){if(this._get=null,0===this._rem.length)return this._add;const e=this._add,t=this._rem,i=this._key,n=e.length,o=t.length,r=Array(n-o),s={};let a,l,c;for(a=0;a=0;)n=e(t[o])+"",Ki(i,n)||(i[n]=1,++r);return r},ku.extent=function(e){if(this._get!==e||!this._ext){const t=this.values(),i=ji(t,e);this._ext=[t[i[0]],t[i[1]]],this._get=e}return this._ext},ku.argmin=function(e){return this.extent(e)[0]||{}},ku.argmax=function(e){return this.extent(e)[1]||{}},ku.min=function(e){const t=this.extent(e)[0];return null!=t?e(t):void 0},ku.max=function(e){const t=this.extent(e)[1];return null!=t?e(t):void 0},ku.quartile=function(e){return this._get===e&&this._q||(this._q=vc(this.values(),e),this._get=e),this._q},ku.q1=function(e){return this.quartile(e)[0]},ku.q2=function(e){return this.quartile(e)[1]},ku.q3=function(e){return this.quartile(e)[2]},ku.ci=function(e){return this._get===e&&this._ci||(this._ci=Sc(this.values(),1e3,.05,e),this._get=e),this._ci},ku.ci0=function(e){return this.ci(e)[0]},ku.ci1=function(e){return this.ci(e)[1]},Du.Definition={type:"Aggregate",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"ops",type:"enum",array:!0,values:mu},{name:"fields",type:"field",null:!0,array:!0},{name:"as",type:"string",null:!0,array:!0},{name:"drop",type:"boolean",default:!0},{name:"cross",type:"boolean",default:!1},{name:"key",type:"field"}]},Xi(Du,oc,{transform(e,t){const i=this,n=t.fork(t.NO_SOURCE|t.NO_FIELDS),o=e.modified();return i.stamp=n.stamp,i.value&&(o||t.modified(i._inputs,!0))?(i._prev=i.value,i.value=o?i.init(e):{},t.visit(t.SOURCE,(e=>i.add(e)))):(i.value=i.value||i.init(e),t.visit(t.REM,(e=>i.rem(e))),t.visit(t.ADD,(e=>i.add(e)))),n.modifies(i._outputs),i._drop=!1!==e.drop,e.cross&&i._dims.length>1&&(i._drop=!1,i.cross()),t.clean()&&i._drop&&n.clean(!0).runAfter((()=>this.clean())),i.changes(n)},cross(){const e=this,t=e.value,i=e._dnames,n=i.map((()=>({}))),o=i.length;function r(e){let t,r,s,a;for(t in e)for(s=e[t].tuple,r=0;r{const t=Vt(e);return o(e),i.push(t),t})),this.cellkey=e.key?e.key:hu(this._dims),this._countOnly=!0,this._counts=[],this._measures=[];const r=e.fields||[null],s=e.ops||["count"],a=e.as||[],l=r.length,c={};let u,h,d,g,f,p;for(l!==s.length&&qt("Unmatched number of fields and aggregate ops."),p=0;pSu(e,e.field))),{}},cellkey:hu(),cell(e,t){let i=this.value[e];return i?0===i.num&&this._drop&&i.stamp{const t=n(e);e[a]=t,e[l]=null==t?null:o+r*(1+(t-o)/r)}:e=>e[a]=n(e)),t.modifies(i?s:a)},_bins(e){if(this.value&&!e.modified())return this.value;const t=e.field,i=yc(e),n=i.step;let o,r,s=i.start,a=s+Math.ceil((i.stop-s)/n)*n;null!=(o=e.anchor)&&(r=o-(s+n*Math.floor((o-s)/n)),s+=r,a+=r);const l=function(e){let i=pi(t(e));return null==i?null:ia?1/0:(i=Math.max(s,Math.min(i,a-n)),s+n*Math.floor(1e-14+(i-s)/n))};return l.start=s,l.stop=i.stop,l.step=n,this.value=Wt(l,Ht(t),e.name||"bin_"+Vt(t))}}),Eu.Definition={type:"Collect",metadata:{source:!0},params:[{name:"sort",type:"compare"}]},Xi(Eu,oc,{transform(e,t){const i=t.fork(t.ALL),n=Nu(Dl,this.value,i.materialize(i.ADD).add),o=e.sort,r=t.changed()||o&&(e.modified("sort")||t.modified(o.fields));return i.visit(i.REM,n.remove),this.modified(r),this.value=i.source=n.data(Il(o),r),t.source&&t.source.root&&(this.value.root=t.source.root),i}}),Xi(Au,zl),Iu.Definition={type:"CountPattern",metadata:{generates:!0,changes:!0},params:[{name:"field",type:"field",required:!0},{name:"case",type:"enum",values:["upper","lower","mixed"],default:"mixed"},{name:"pattern",type:"string",default:'[\\w"]+'},{name:"stopwords",type:"string",default:""},{name:"as",type:"string",array:!0,length:2,default:["text","count"]}]},Xi(Iu,oc,{transform(e,t){const i=t=>i=>{for(var n,o=function(e,t,i){switch(t){case"upper":e=e.toUpperCase();break;case"lower":e=e.toLowerCase()}return e.match(i)}(a(i),e.case,r)||[],l=0,c=o.length;lo[e]=1+(o[e]||0))),u=i((e=>o[e]-=1));return n?t.visit(t.SOURCE,c):(t.visit(t.ADD,c),t.visit(t.REM,u)),this._finish(t,l)},_parameterCheck(e,t){let i=!1;return!e.modified("stopwords")&&this._stop||(this._stop=new RegExp("^"+(e.stopwords||"")+"$","i"),i=!0),!e.modified("pattern")&&this._match||(this._match=new RegExp(e.pattern||"[\\w']+","g"),i=!0),(e.modified("field")||t.modified(e.field.fields))&&(i=!0),i&&(this._counts={}),i},_finish(e,t){const i=this._counts,n=this._tuples||(this._tuples={}),o=t[0],r=t[1],s=e.fork(e.NO_SOURCE|e.NO_FIELDS);let a,l,c;for(a in i)l=n[a],c=i[a]||0,!l&&c?(n[a]=l=Nl({}),l[o]=a,l[r]=c,s.add.push(l)):0===c?(l&&s.rem.push(l),i[a]=null,n[a]=null):l[r]!==c&&(l[r]=c,s.mod.push(l));return s.modifies(t)}}),Tu.Definition={type:"Cross",metadata:{generates:!0},params:[{name:"filter",type:"expr"},{name:"as",type:"string",array:!0,length:2,default:["a","b"]}]},Xi(Tu,oc,{transform(e,t){const i=t.fork(t.NO_SOURCE),n=e.as||["a","b"],o=n[0],r=n[1],s=!this.value||t.changed(t.ADD_REM)||e.modified("as")||e.modified("filter");let a=this.value;return s?(a&&(i.rem=a),a=t.materialize(t.SOURCE).source,i.add=this.value=function(e,t,i,n){for(var o,r,s=[],a={},l=e.length,c=0;cOu(e,t)))):"function"==typeof n[i]&&n[i](e[i]);return n}function Fu(e){oc.call(this,null,e)}const Pu=[{key:{function:"normal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"lognormal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"uniform"},params:[{name:"min",type:"number",default:0},{name:"max",type:"number",default:1}]},{key:{function:"kde"},params:[{name:"field",type:"field",required:!0},{name:"from",type:"data"},{name:"bandwidth",type:"number",default:0}]}],Bu={key:{function:"mixture"},params:[{name:"distributions",type:"param",array:!0,params:Pu},{name:"weights",type:"number",array:!0}]};function zu(e,t){return e?e.map(((e,i)=>t[i]||Vt(e))):null}function Wu(e,t,i){const n=[],o=e=>e(l);let r,s,a,l,c,u;if(null==t)n.push(e.map(i));else for(r={},s=0,a=e.length;st(i,e)),Ht(t),Vt(t))}function Uu(e){oc.call(this,[void 0,void 0],e)}function ju(e,t){zl.call(this,e),this.parent=t,this.count=0}function qu(e){oc.call(this,{},e),this._keys=Yi();const t=this._targets=[];t.active=0,t.forEach=e=>{for(let i=0,n=t.active;iGt(e))):Gt(e.name,e.as)}function Yu(e){oc.call(this,Yi(),e)}function Zu(e){oc.call(this,[],e)}function Xu(e){oc.call(this,[],e)}function Qu(e){oc.call(this,null,e)}function Ju(e){oc.call(this,[],e)}Fu.Definition={type:"Density",metadata:{generates:!0},params:[{name:"extent",type:"number",array:!0,length:2},{name:"steps",type:"number"},{name:"minsteps",type:"number",default:25},{name:"maxsteps",type:"number",default:200},{name:"method",type:"string",default:"pdf",values:["pdf","cdf"]},{name:"distribution",type:"param",params:Pu.concat(Bu)},{name:"as",type:"string",array:!0,default:["value","density"]}]},Xi(Fu,oc,{transform(e,t){const i=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){const n=Ou(e.distribution,function(e){return()=>e.materialize(e.SOURCE).source}(t)),o=e.steps||e.minsteps||25,r=e.steps||e.maxsteps||200;let s=e.method||"pdf";"pdf"!==s&&"cdf"!==s&&qt("Invalid density method: "+s),e.extent||n.data||qt("Missing density extent parameter."),s=n[s];const a=e.as||["value","density"],l=lu(s,e.extent||Ui(n.data()),o,r).map((e=>{const t={};return t[a[0]]=e[0],t[a[1]]=e[1],Nl(t)}));this.value&&(i.rem=this.value),this.value=i.add=i.source=l}return i}}),Vu.Definition={type:"DotBin",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"step",type:"number"},{name:"smooth",type:"boolean",default:!1},{name:"as",type:"string",default:"bin"}]},Xi(Vu,oc,{transform(e,t){if(this.value&&!e.modified()&&!t.changed())return t;const i=t.materialize(t.SOURCE).source,n=Wu(t.source,e.groupby,Zt),o=e.smooth||!1,r=e.field,s=e.step||((e,t)=>dn(Ui(e,t))/30)(i,r),a=Il(((e,t)=>r(e)-r(t))),l=e.as||"bin",c=n.length;let u,h=1/0,d=-1/0,g=0;for(;gd&&(d=t),e[++u][l]=t}return this.value={start:h,stop:d,step:s},t.reflow(!0).modifies(l)}}),Xi(Hu,zl),Uu.Definition={type:"Extent",metadata:{},params:[{name:"field",type:"field",required:!0}]},Xi(Uu,oc,{transform(e,t){const i=this.value,n=e.field,o=t.changed()||t.modified(n.fields)||e.modified("field");let r=i[0],s=i[1];if((o||null==r)&&(r=1/0,s=-1/0),t.visit(o?t.SOURCE:t.ADD,(e=>{const t=pi(n(e));null!=t&&(ts&&(s=t))})),!Number.isFinite(r)||!Number.isFinite(s)){let e=Vt(n);e&&(e=` for field "${e}"`),t.dataflow.warn(`Infinite extent${e}: [${r}, ${s}]`),r=s=void 0}this.value=[r,s]}}),Xi(ju,zl,{connect(e){return this.detachSubflow=e.detachSubflow,this.targets().add(e),e.source=this},add(e){this.count+=1,this.value.add.push(e)},rem(e){this.count-=1,this.value.rem.push(e)},mod(e){this.value.mod.push(e)},init(e){this.value.init(e,e.NO_SOURCE)},evaluate(){return this.value}}),Xi(qu,oc,{activate(e){this._targets[this._targets.active++]=e},subflow(e,t,i,n){const o=this.value;let r,s,a=Ki(o,e)&&o[e];return a?a.value.stampe&&e.count>0));this.initTargets(e)}},initTargets(e){const t=this._targets,i=t.length,n=e?e.length:0;let o=0;for(;othis.subflow(e,o,t);return this._group=e.group||{},this.initTargets(),t.visit(t.REM,(e=>{const t=Dl(e),i=r.get(t);void 0!==i&&(r.delete(t),a(i).rem(e))})),t.visit(t.ADD,(e=>{const t=n(e);r.set(Dl(e),t),a(t).add(e)})),s||t.modified(n.fields)?t.visit(t.MOD,(e=>{const t=Dl(e),i=r.get(t),o=n(e);i===o?a(o).mod(e):(r.set(t,o),a(i).rem(e),a(o).add(e))})):t.changed(t.MOD)&&t.visit(t.MOD,(e=>{a(r.get(Dl(e))).mod(e)})),s&&t.visit(t.REFLOW,(e=>{const t=Dl(e),i=r.get(t),o=n(e);i!==o&&(r.set(t,o),a(i).rem(e),a(o).add(e))})),t.clean()?i.runAfter((()=>{this.clean(),r.clean()})):r.empty>i.cleanThreshold&&i.runAfter(r.clean),t}}),Xi(Ku,zl),Yu.Definition={type:"Filter",metadata:{changes:!0},params:[{name:"expr",type:"expr",required:!0}]},Xi(Yu,oc,{transform(e,t){const i=t.dataflow,n=this.value,o=t.fork(),r=o.add,s=o.rem,a=o.mod,l=e.expr;let c=!0;function u(t){const i=Dl(t),o=l(t,e),u=n.get(i);o&&u?(n.delete(i),r.push(t)):o||u?c&&o&&!u&&a.push(t):(n.set(i,1),s.push(t))}return t.visit(t.REM,(e=>{const t=Dl(e);n.has(t)?n.delete(t):s.push(e)})),t.visit(t.ADD,(t=>{l(t,e)?r.push(t):n.set(Dl(t),1)})),t.visit(t.MOD,u),e.modified()&&(c=!1,t.visit(t.REFLOW,u)),n.empty>i.cleanThreshold&&i.runAfter(n.clean),o}}),Zu.Definition={type:"Flatten",metadata:{generates:!0},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"index",type:"string"},{name:"as",type:"string",array:!0}]},Xi(Zu,oc,{transform(e,t){const i=t.fork(t.NO_SOURCE),n=e.fields,o=zu(n,e.as||[]),r=e.index||null,s=o.length;return i.rem=this.value,t.visit(t.SOURCE,(e=>{const t=n.map((t=>t(e))),a=t.reduce(((e,t)=>Math.max(e,t.length)),0);let l,c,u,h=0;for(;h{for(let t,r=0;rt[n]=i(t,e)))}}),Xi(Ju,oc,{transform(e,t){const i=t.fork(t.ALL),n=e.generator;let o,r,s,a=this.value,l=e.size-a.length;if(l>0){for(o=[];--l>=0;)o.push(s=Nl(n(e))),a.push(s);i.add=i.add.length?i.materialize(i.ADD).add.concat(o):o}else r=a.slice(0,-l),i.rem=i.rem.length?i.materialize(i.REM).rem.concat(r):r,a=a.slice(-l);return i.source=this.value=a,i}});const eh={value:"value",median:pc,mean:function(e,t){let i=0,n=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(++i,n+=t);else{let o=-1;for(let r of e)null!=(r=t(r,++o,e))&&(r=+r)>=r&&(++i,n+=r)}if(i)return n/i},min:cc,max:lc},th=[];function ih(e){oc.call(this,[],e)}function nh(e){Du.call(this,e)}function oh(e){oc.call(this,null,e)}function rh(e){zl.call(this,null,sh,e)}function sh(e){return this.value&&!e.modified()?this.value:sn(e.fields,e.flat)}function ah(e){oc.call(this,[],e),this._pending=null}function lh(e,t,i){i.forEach(Nl);const n=t.fork(t.NO_FIELDS&t.NO_SOURCE);return n.rem=e.value,e.value=n.source=n.add=i,e._pending=null,n.rem.length&&n.clean(!0),n}function ch(e){oc.call(this,{},e)}function uh(e){zl.call(this,null,hh,e)}function hh(e){if(this.value&&!e.modified())return this.value;const t=e.extents,i=t.length;let n,o,r=1/0,s=-1/0;for(n=0;ns&&(s=o[1]);return[r,s]}function dh(e){zl.call(this,null,gh,e)}function gh(e){return this.value&&!e.modified()?this.value:e.values.reduce(((e,t)=>e.concat(t)),[])}function fh(e){oc.call(this,null,e)}function ph(e){Du.call(this,e)}function mh(e){qu.call(this,e)}function _h(e){oc.call(this,null,e)}function vh(e){oc.call(this,null,e)}function bh(e){oc.call(this,null,e)}function yh(e){oc.call(this,null,e)}function wh(e){oc.call(this,[],e),this.count=0}function Ch(e){oc.call(this,null,e)}function Sh(e){oc.call(this,null,e),this.modified(!0)}function xh(e){oc.call(this,null,e)}ih.Definition={type:"Impute",metadata:{changes:!0},params:[{name:"field",type:"field",required:!0},{name:"key",type:"field",required:!0},{name:"keyvals",array:!0},{name:"groupby",type:"field",array:!0},{name:"method",type:"enum",default:"value",values:["value","mean","median","max","min"]},{name:"value",default:0}]},Xi(ih,oc,{transform(e,t){var i,n,o,r,s,a,l,c,u,h,d=t.fork(t.ALL),g=function(e){var t,i=e.method||eh.value;if(null!=eh[i])return i===eh.value?(t=void 0!==e.value?e.value:0,()=>t):eh[i];qt("Unrecognized imputation method: "+i)}(e),f=function(e){const t=e.field;return e=>e?t(e):NaN}(e),p=Vt(e.field),m=Vt(e.key),_=(e.groupby||[]).map(Vt),v=function(e,t,i,n){var o,r,s,a,l,c,u,h,d=e=>e(h),g=[],f=n?n.slice():[],p={},m={};for(f.forEach(((e,t)=>p[e]=t+1)),a=0,u=e.length;ai.add(e)))):(o=i.value=i.value||this.init(e),t.visit(t.REM,(e=>i.rem(e))),t.visit(t.ADD,(e=>i.add(e)))),i.changes(),t.visit(t.SOURCE,(e=>{$i(e,o[i.cellkey(e)].tuple)})),t.reflow(n).modifies(this._outputs)},changes(){const e=this._adds,t=this._mods;let i,n;for(i=0,n=this._alen;i{const i=Oc(t,s)[a],n=e.counts?t.length:1;lu(i,u||Ui(t),h,d).forEach((e=>{const i={};for(let e=0;e(this._pending=Ti(e.data),e=>e.touch(this))))}:i.request(e.url,e.format).then((e=>lh(this,t,Ti(e.data))))}}),ch.Definition={type:"Lookup",metadata:{modifies:!0},params:[{name:"index",type:"index",params:[{name:"from",type:"data",required:!0},{name:"key",type:"field",required:!0}]},{name:"values",type:"field",array:!0},{name:"fields",type:"field",array:!0,required:!0},{name:"as",type:"string",array:!0},{name:"default",default:null}]},Xi(ch,oc,{transform(e,t){const i=e.fields,n=e.index,o=e.values,r=null==e.default?null:e.default,s=e.modified(),a=i.length;let l,c,u,h=s?t.SOURCE:t.ADD,d=t,g=e.as;return o?(c=o.length,a>1&&!g&&qt('Multi-field lookup requires explicit "as" parameter.'),g&&g.length!==a*c&&qt('The "as" parameter has too few output field names.'),g=g||o.map(Vt),l=function(e){for(var t,s,l=0,u=0;lt.modified(e.fields))),h|=u?t.MOD:0),t.visit(h,l),d.modifies(g)}}),Xi(uh,zl),Xi(dh,zl),Xi(fh,oc,{transform(e,t){return this.modified(e.modified()),this.value=e,t.fork(t.NO_SOURCE|t.NO_FIELDS)}}),ph.Definition={type:"Pivot",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"value",type:"field",required:!0},{name:"op",type:"enum",values:mu,default:"sum"},{name:"limit",type:"number",default:0},{name:"key",type:"field"}]},Xi(ph,Du,{_transform:Du.prototype.transform,transform(e,t){return this._transform(function(e,t){const i=e.field,n=e.value,o=("count"===e.op?"__count__":e.op)||"sum",r=Ht(i).concat(Ht(n)),s=function(e,t,i){const n={},o=[];return i.visit(i.SOURCE,(t=>{const i=e(t);n[i]||(n[i]=1,o.push(i))})),o.sort(Pi),t?o.slice(0,t):o}(i,e.limit||0,t);return t.changed()&&e.set("__pivot__",null,null,!0),{key:e.key,groupby:e.groupby,ops:s.map((()=>o)),fields:s.map((e=>function(e,t,i,n){return Wt((n=>t(n)===e?i(n):NaN),n,e+"")}(e,i,n,r))),as:s.map((e=>e+"")),modified:e.modified.bind(e)}}(e,t),t)}}),Xi(mh,qu,{transform(e,t){const i=e.subflow,n=e.field,o=e=>this.subflow(Dl(e),i,t,e);return(e.modified("field")||n&&t.modified(Ht(n)))&&qt("PreFacet does not support field modification."),this.initTargets(),n?(t.visit(t.MOD,(e=>{const t=o(e);n(e).forEach((e=>t.mod(e)))})),t.visit(t.ADD,(e=>{const t=o(e);n(e).forEach((e=>t.add(Nl(e))))})),t.visit(t.REM,(e=>{const t=o(e);n(e).forEach((e=>t.rem(e)))}))):(t.visit(t.MOD,(e=>o(e).mod(e))),t.visit(t.ADD,(e=>o(e).add(e))),t.visit(t.REM,(e=>o(e).rem(e)))),t.clean()&&t.runAfter((()=>this.clean())),t}}),_h.Definition={type:"Project",metadata:{generates:!0,changes:!0},params:[{name:"fields",type:"field",array:!0},{name:"as",type:"string",null:!0,array:!0}]},Xi(_h,oc,{transform(e,t){const i=t.fork(t.NO_SOURCE),n=e.fields,o=zu(e.fields,e.as||[]),r=n?(e,t)=>function(e,t,i,n){for(let o=0,r=i.length;o{const t=Dl(e);i.rem.push(s[t]),s[t]=null})),t.visit(t.ADD,(e=>{const t=r(e,Nl({}));s[Dl(e)]=t,i.add.push(t)})),t.visit(t.MOD,(e=>{i.mod.push(r(e,s[Dl(e)]))})),i}}),Xi(vh,oc,{transform(e,t){return this.value=e.value,e.modified("value")?t.fork(t.NO_SOURCE|t.NO_FIELDS):t.StopPropagation}}),bh.Definition={type:"Quantile",metadata:{generates:!0,changes:!0},params:[{name:"groupby",type:"field",array:!0},{name:"field",type:"field",required:!0},{name:"probs",type:"number",array:!0},{name:"step",type:"number",default:.01},{name:"as",type:"string",array:!0,default:["prob","value"]}]},Xi(bh,oc,{transform(e,t){const i=t.fork(t.NO_SOURCE|t.NO_FIELDS),n=e.as||["prob","value"];if(this.value&&!e.modified()&&!t.changed())return i.source=this.value,i;const o=Wu(t.materialize(t.SOURCE).source,e.groupby,e.field),r=(e.groupby||[]).map(Vt),s=[],a=e.step||.01,l=e.probs||uu(a/2,1-1e-14,a),c=l.length;return o.forEach((e=>{const t=_c(e,l);for(let i=0;i{const t=Dl(e);i.rem.push(n[t]),n[t]=null})),t.visit(t.ADD,(e=>{const t=El(e);n[Dl(e)]=t,i.add.push(t)})),t.visit(t.MOD,(e=>{const t=n[Dl(e)];for(const n in e)t[n]=e[n],i.modifies(n);i.mod.push(t)}))),i}}),wh.Definition={type:"Sample",metadata:{},params:[{name:"size",type:"number",default:1e3}]},Xi(wh,oc,{transform(e,t){const i=t.fork(t.NO_SOURCE),n=e.modified("size"),o=e.size,r=this.value.reduce(((e,t)=>(e[Dl(t)]=1,e)),{});let s=this.value,a=this.count,l=0;function c(e){let t,n;s.length=l&&(t=s[n],r[Dl(t)]&&i.rem.push(t),s[n]=e)),++a}if(t.rem.length&&(t.visit(t.REM,(e=>{const t=Dl(e);r[t]&&(r[t]=-1,i.rem.push(e)),--a})),s=s.filter((e=>-1!==r[Dl(e)]))),(t.rem.length||n)&&s.length{r[Dl(e)]||c(e)})),l=-1),n&&s.length>o){const e=s.length-o;for(let t=0;t{r[Dl(e)]&&i.mod.push(e)})),t.add.length&&t.visit(t.ADD,c),(t.add.length||l<0)&&(i.add=s.filter((e=>!r[Dl(e)]))),this.count=a,this.value=i.source=s,i}}),Ch.Definition={type:"Sequence",metadata:{generates:!0,changes:!0},params:[{name:"start",type:"number",required:!0},{name:"stop",type:"number",required:!0},{name:"step",type:"number",default:1},{name:"as",type:"string",default:"data"}]},Xi(Ch,oc,{transform(e,t){if(this.value&&!e.modified())return;const i=t.materialize().fork(t.MOD),n=e.as||"data";return i.rem=this.value?t.rem.concat(this.value):t.rem,this.value=uu(e.start,e.stop,e.step||1).map((e=>{const t={};return t[n]=e,Nl(t)})),i.add=t.add.concat(this.value),i}}),Xi(Sh,oc,{transform(e,t){return this.value=t.source,t.changed()?t.fork(t.NO_SOURCE|t.NO_FIELDS):t.StopPropagation}});const kh=["unit0","unit1"];function Dh(e){oc.call(this,Yi(),e)}function Lh(e){oc.call(this,null,e)}xh.Definition={type:"TimeUnit",metadata:{modifies:!0},params:[{name:"field",type:"field",required:!0},{name:"interval",type:"boolean",default:!0},{name:"units",type:"enum",values:Br,array:!0},{name:"step",type:"number",default:1},{name:"maxbins",type:"number",default:40},{name:"extent",type:"date",array:!0},{name:"timezone",type:"enum",default:"local",values:["local","utc"]},{name:"as",type:"string",array:!0,length:2,default:kh}]},Xi(xh,oc,{transform(e,t){const i=e.field,n=!1!==e.interval,o="utc"===e.timezone,r=this._floor(e,t),s=(o?fs:gs)(r.unit).offset,a=e.as||kh,l=a[0],c=a[1],u=r.step;let h=r.start||1/0,d=r.stop||-1/0,g=t.ADD;return(e.modified()||t.modified(Ht(i)))&&(g=(t=t.reflow(!0)).SOURCE,h=1/0,d=-1/0),t.visit(g,(e=>{const t=i(e);let o,a;null==t?(e[l]=null,n&&(e[c]=null)):(e[l]=o=a=r(t),n&&(e[c]=a=s(o,u)),od&&(d=a))})),r.start=h,r.stop=d,t.modifies(n?a:l)},_floor(e,t){const i="utc"===e.timezone,{units:n,step:o}=e.units?{units:e.units,step:e.step||1}:As({extent:e.extent||Ui(t.materialize(t.SOURCE).source,e.field),maxbins:e.maxbins}),r=Wr(n),s=this.value||{},a=(i?us:as)(r,o);return a.unit=fi(r),a.units=r,a.step=o,a.start=s.start,a.stop=s.stop,this.value=a}}),Xi(Dh,oc,{transform(e,t){const i=t.dataflow,n=e.field,o=this.value,r=e=>o.set(n(e),e);let s=!0;return e.modified("field")||t.modified(n.fields)?(o.clear(),t.visit(t.SOURCE,r)):t.changed()?(t.visit(t.REM,(e=>o.delete(n(e)))),t.visit(t.ADD,r)):s=!1,this.modified(s),o.empty>i.cleanThreshold&&i.runAfter(o.clean),t.fork()}}),Xi(Lh,oc,{transform(e,t){(!this.value||e.modified("field")||e.modified("sort")||t.changed()||e.sort&&t.modified(e.sort.fields))&&(this.value=(e.sort?t.source.slice().sort(Il(e.sort)):t.source).map(e.field))}});const Nh={row_number:function(){return{next:e=>e.index+1}},rank:function(){let e;return{init:()=>e=1,next:t=>{const i=t.index,n=t.data;return i&&t.compare(n[i-1],n[i])?e=i+1:e}}},dense_rank:function(){let e;return{init:()=>e=1,next:t=>{const i=t.index,n=t.data;return i&&t.compare(n[i-1],n[i])?++e:e}}},percent_rank:function(){const e=Nh.rank(),t=e.next;return{init:e.init,next:e=>(t(e)-1)/(e.data.length-1)}},cume_dist:function(){let e;return{init:()=>e=0,next:t=>{const i=t.data,n=t.compare;let o=t.index;if(e0||qt("ntile num must be greater than zero.");const i=Nh.cume_dist(),n=i.next;return{init:i.init,next:e=>Math.ceil(t*n(e))}},lag:function(e,t){return t=+t||1,{next:i=>{const n=i.index-t;return n>=0?e(i.data[n]):null}}},lead:function(e,t){return t=+t||1,{next:i=>{const n=i.index+t,o=i.data;return ne(t.data[t.i0])}},last_value:function(e){return{next:t=>e(t.data[t.i1-1])}},nth_value:function(e,t){return(t=+t)>0||qt("nth_value nth must be greater than zero."),{next:i=>{const n=i.i0+(t-1);return nt=null,next:i=>{const n=e(i.data[i.index]);return null!=n?t=n:t}}},next_value:function(e){let t,i;return{init:()=>(t=null,i=-1),next:n=>{const o=n.data;return n.index<=i?t:(i=function(e,t,i){for(let n=t.length;ia[e]=1))}d(e.sort),t.forEach(((e,t)=>{const a=i[t],g=Vt(a),f=du(e,g,o[t]);if(d(a),r.push(f),Ki(Nh,e))s.push(function(e,t,i,n){const o=Nh[e](t,i);return{init:o.init||Xt,update:function(e,t){t[n]=o.next(e)}}}(e,i[t],n[t],f));else{if(null==a&&"count"!==e&&qt("Null aggregate field specified."),"count"===e)return void c.push(f);h=!1;let t=l[g];t||(t=l[g]=[],t.field=a,u.push(t)),t.push(_u(e,f))}})),(c.length||u.length)&&(this.cell=function(e,t,i){e=e.map((e=>Su(e,e.field)));const n={num:0,agg:null,store:!1,count:t};if(!i)for(var o=e.length,r=n.agg=Array(o),s=0;s0&&!o(r[i],r[i-1])&&(e.i0=t.left(r,r[i])),ne.init())),this.cell&&this.cell.init()},Mh.update=function(e,t){const i=this.cell,n=this.windows,o=e.data,r=n&&n.length;let s;if(i){for(s=e.p0;sthis.group(o(e));let s=this.state;s&&!i||(s=this.state=new Ah(e)),i||t.modified(s.inputs)?(this.value={},t.visit(t.SOURCE,(e=>r(e).add(e)))):(t.visit(t.REM,(e=>r(e).remove(e))),t.visit(t.ADD,(e=>r(e).add(e))));for(let t=0,i=this._mlen;t0)for(var n,o=e[0],r=t[0],s=e[i]-o,a=t[i]-r,l=-1;++l<=i;)n=l/i,this._basis.point(this._beta*e[l]+(1-this._beta)*(o+n*s),this._beta*t[l]+(1-this._beta)*(r+n*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const Hh=function e(t){function i(e){return 1===t?new Ph(e):new Vh(e,t)}return i.beta=function(t){return e(+t)},i}(.85);function $h(e,t,i){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-i),e._x2,e._y2)}function Uh(e,t){this._context=e,this._k=(1-t)/6}Uh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:$h(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:$h(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const jh=function e(t){function i(e){return new Uh(e,t)}return i.tension=function(t){return e(+t)},i}(0);function qh(e,t){this._context=e,this._k=(1-t)/6}qh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:$h(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Kh=function e(t){function i(e){return new qh(e,t)}return i.tension=function(t){return e(+t)},i}(0);function Gh(e,t){this._context=e,this._k=(1-t)/6}Gh.prototype={areaStart:Bh,areaEnd:Bh,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:$h(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Yh=function e(t){function i(e){return new Gh(e,t)}return i.tension=function(t){return e(+t)},i}(0);var Zh=Math.abs,Xh=Math.atan2,Qh=Math.cos,Jh=Math.max,ed=Math.min,td=Math.sin,id=Math.sqrt,nd=1e-12,od=Math.PI,rd=od/2,sd=2*od;function ad(e){return e>1?0:e<-1?od:Math.acos(e)}function ld(e){return e>=1?rd:e<=-1?-rd:Math.asin(e)}function cd(e,t,i){var n=e._x1,o=e._y1,r=e._x2,s=e._y2;if(e._l01_a>nd){var a=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);n=(n*a-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,o=(o*a-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>nd){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);r=(r*c+e._x1*e._l23_2a-t*e._l12_2a)/u,s=(s*c+e._y1*e._l23_2a-i*e._l12_2a)/u}e._context.bezierCurveTo(n,o,r,s,e._x2,e._y2)}function ud(e,t){this._context=e,this._alpha=t}ud.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var i=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:cd(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const hd=function e(t){function i(e){return t?new ud(e,t):new Uh(e,0)}return i.alpha=function(t){return e(+t)},i}(.5);function dd(e,t){this._context=e,this._alpha=t}dd.prototype={areaStart:Bh,areaEnd:Bh,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var i=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:cd(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const gd=function e(t){function i(e){return t?new dd(e,t):new Gh(e,0)}return i.alpha=function(t){return e(+t)},i}(.5);function fd(e,t){this._context=e,this._alpha=t}fd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var i=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:cd(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const pd=function e(t){function i(e){return t?new fd(e,t):new qh(e,0)}return i.alpha=function(t){return e(+t)},i}(.5);function md(e){this._context=e}function _d(e){return new md(e)}function vd(e){this._context=e}function bd(e){return e<0?-1:1}function yd(e,t,i){var n=e._x1-e._x0,o=t-e._x1,r=(e._y1-e._y0)/(n||o<0&&-0),s=(i-e._y1)/(o||n<0&&-0),a=(r*o+s*n)/(n+o);return(bd(r)+bd(s))*Math.min(Math.abs(r),Math.abs(s),.5*Math.abs(a))||0}function wd(e,t){var i=e._x1-e._x0;return i?(3*(e._y1-e._y0)/i-t)/2:t}function Cd(e,t,i){var n=e._x0,o=e._y0,r=e._x1,s=e._y1,a=(r-n)/3;e._context.bezierCurveTo(n+a,o+a*t,r-a,s-a*i,r,s)}function Sd(e){this._context=e}function xd(e){this._context=new kd(e)}function kd(e){this._context=e}function Dd(e){this._context=e}function Ld(e){var t,i,n=e.length-1,o=new Array(n),r=new Array(n),s=new Array(n);for(o[0]=0,r[0]=2,s[0]=e[0]+2*e[1],t=1;t=0;--t)o[t]=(s[t]-o[t+1])/r[t];for(r[n-1]=(e[n]+o[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var i=this._x*(1-this._t)+e*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,t)}}this._x=e,this._y=t}};const Ed=Math.PI,Ad=2*Ed,Md=1e-6,Id=Ad-Md;function Td(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Rd(){return new Td}Td.prototype=Rd.prototype={constructor:Td,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,i,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+i)+","+(this._y1=+n)},bezierCurveTo:function(e,t,i,n,o,r){this._+="C"+ +e+","+ +t+","+ +i+","+ +n+","+(this._x1=+o)+","+(this._y1=+r)},arcTo:function(e,t,i,n,o){e=+e,t=+t,i=+i,n=+n,o=+o;var r=this._x1,s=this._y1,a=i-e,l=n-t,c=r-e,u=s-t,h=c*c+u*u;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(h>Md)if(Math.abs(u*a-l*c)>Md&&o){var d=i-r,g=n-s,f=a*a+l*l,p=d*d+g*g,m=Math.sqrt(f),_=Math.sqrt(h),v=o*Math.tan((Ed-Math.acos((f+h-p)/(2*m*_)))/2),b=v/_,y=v/m;Math.abs(b-1)>Md&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+o+","+o+",0,0,"+ +(u*d>c*g)+","+(this._x1=e+y*a)+","+(this._y1=t+y*l)}else this._+="L"+(this._x1=e)+","+(this._y1=t)},arc:function(e,t,i,n,o,r){e=+e,t=+t,r=!!r;var s=(i=+i)*Math.cos(n),a=i*Math.sin(n),l=e+s,c=t+a,u=1^r,h=r?n-o:o-n;if(i<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>Md||Math.abs(this._y1-c)>Md)&&(this._+="L"+l+","+c),i&&(h<0&&(h=h%Ad+Ad),h>Id?this._+="A"+i+","+i+",0,1,"+u+","+(e-s)+","+(t-a)+"A"+i+","+i+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>Md&&(this._+="A"+i+","+i+",0,"+ +(h>=Ed)+","+u+","+(this._x1=e+i*Math.cos(o))+","+(this._y1=t+i*Math.sin(o))))},rect:function(e,t,i,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +i+"v"+ +n+"h"+-i+"Z"},toString:function(){return this._}};const Od=Rd;function Fd(e){return function(){return e}}function Pd(e){return e.innerRadius}function Bd(e){return e.outerRadius}function zd(e){return e.startAngle}function Wd(e){return e.endAngle}function Vd(e){return e&&e.padAngle}function Hd(e,t,i,n,o,r,s,a){var l=i-e,c=n-t,u=s-o,h=a-r,d=h*l-u*c;if(!(d*dA*A+M*M&&(x=D,k=L),{cx:x,cy:k,x01:-u,y01:-h,x11:x*(o/w-1),y11:k*(o/w-1)}}function Ud(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function jd(e){return e[0]}function qd(e){return e[1]}function Kd(e,t){var i=Fd(!0),n=null,o=_d,r=null;function s(s){var a,l,c,u=(s=Ud(s)).length,h=!1;for(null==n&&(r=o(c=Od())),a=0;a<=u;++a)!(a=u;--h)a.point(m[h],_[h]);a.lineEnd(),a.areaEnd()}p&&(m[c]=+e(d,c,l),_[c]=+t(d,c,l),a.point(n?+n(d,c,l):m[c],i?+i(d,c,l):_[c]))}if(g)return a=null,g+""||null}function c(){return Kd().defined(o).curve(s).context(r)}return e="function"==typeof e?e:void 0===e?jd:Fd(+e),t="function"==typeof t?t:Fd(void 0===t?0:+t),i="function"==typeof i?i:void 0===i?qd:Fd(+i),l.x=function(t){return arguments.length?(e="function"==typeof t?t:Fd(+t),n=null,l):e},l.x0=function(t){return arguments.length?(e="function"==typeof t?t:Fd(+t),l):e},l.x1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:Fd(+e),l):n},l.y=function(e){return arguments.length?(t="function"==typeof e?e:Fd(+e),i=null,l):t},l.y0=function(e){return arguments.length?(t="function"==typeof e?e:Fd(+e),l):t},l.y1=function(e){return arguments.length?(i=null==e?null:"function"==typeof e?e:Fd(+e),l):i},l.lineX0=l.lineY0=function(){return c().x(e).y(t)},l.lineY1=function(){return c().x(e).y(i)},l.lineX1=function(){return c().x(n).y(t)},l.defined=function(e){return arguments.length?(o="function"==typeof e?e:Fd(!!e),l):o},l.curve=function(e){return arguments.length?(s=e,null!=r&&(a=s(r)),l):s},l.context=function(e){return arguments.length?(null==e?r=a=null:a=s(r=e),l):r},l}Array.prototype.slice;const Yd={draw:function(e,t){var i=Math.sqrt(t/od);e.moveTo(i,0),e.arc(0,0,i,0,sd)}};Math.sqrt(1/3);Math.sin(od/10),Math.sin(7*od/10);function Zd(e,t){if("undefined"!=typeof document&&document.createElement){const i=document.createElement("canvas");if(i&&i.getContext)return i.width=e,i.height=t,i}return null}Math.sin(sd/10),Math.cos(sd/10),Math.sqrt(3),Math.sqrt(3),Math.sqrt(12);const Xd=()=>"undefined"!=typeof Image?Image:null,Qd=Dr(kr),Jd=Qd.right,eg=Qd.left,tg=(Dr(dc).center,Jd);function ig(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function ng(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}const og=Symbol("implicit");function rg(){var e=new Map,t=[],i=[],n=og;function o(o){var r=o+"",s=e.get(r);if(!s){if(n!==og)return n;e.set(r,s=t.push(o))}return i[(s-1)%i.length]}return o.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new Map;for(const n of i){const i=n+"";e.has(i)||e.set(i,t.push(n))}return o},o.range=function(e){return arguments.length?(i=Array.from(e),o):i.slice()},o.unknown=function(e){return arguments.length?(n=e,o):n},o.copy=function(){return rg(t,i).unknown(n)},ig.apply(o,arguments),o}function sg(e,t,i,n){var o,r=uo(e,t,i);switch((n=fo(null==n?",f":n)).type){case"s":var s=Math.max(Math.abs(e),Math.abs(t));return null!=n.precision||isNaN(o=vo(r,s))||(n.precision=o),Do(n,s);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(o=bo(r,Math.max(Math.abs(e),Math.abs(t))))||(n.precision=o-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(o=yo(r))||(n.precision=o-2*("%"===n.type))}return ko(n)}function ag(e,t,i){e.prototype=t.prototype=i,i.constructor=e}function lg(e,t){var i=Object.create(e.prototype);for(var n in t)i[n]=t[n];return i}function cg(){}var ug=.7,hg=1/ug,dg="\\s*([+-]?\\d+)\\s*",gg="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",fg="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",pg=/^#([0-9a-f]{3,8})$/,mg=new RegExp("^rgb\\("+[dg,dg,dg]+"\\)$"),_g=new RegExp("^rgb\\("+[fg,fg,fg]+"\\)$"),vg=new RegExp("^rgba\\("+[dg,dg,dg,gg]+"\\)$"),bg=new RegExp("^rgba\\("+[fg,fg,fg,gg]+"\\)$"),yg=new RegExp("^hsl\\("+[gg,fg,fg]+"\\)$"),wg=new RegExp("^hsla\\("+[gg,fg,fg,gg]+"\\)$"),Cg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Sg(){return this.rgb().formatHex()}function xg(){return this.rgb().formatRgb()}function kg(e){var t,i;return e=(e+"").trim().toLowerCase(),(t=pg.exec(e))?(i=t[1].length,t=parseInt(t[1],16),6===i?Dg(t):3===i?new Ag(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===i?Lg(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===i?Lg(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=mg.exec(e))?new Ag(t[1],t[2],t[3],1):(t=_g.exec(e))?new Ag(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=vg.exec(e))?Lg(t[1],t[2],t[3],t[4]):(t=bg.exec(e))?Lg(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=yg.exec(e))?Rg(t[1],t[2]/100,t[3]/100,1):(t=wg.exec(e))?Rg(t[1],t[2]/100,t[3]/100,t[4]):Cg.hasOwnProperty(e)?Dg(Cg[e]):"transparent"===e?new Ag(NaN,NaN,NaN,0):null}function Dg(e){return new Ag(e>>16&255,e>>8&255,255&e,1)}function Lg(e,t,i,n){return n<=0&&(e=t=i=NaN),new Ag(e,t,i,n)}function Ng(e){return e instanceof cg||(e=kg(e)),e?new Ag((e=e.rgb()).r,e.g,e.b,e.opacity):new Ag}function Eg(e,t,i,n){return 1===arguments.length?Ng(e):new Ag(e,t,i,null==n?1:n)}function Ag(e,t,i,n){this.r=+e,this.g=+t,this.b=+i,this.opacity=+n}function Mg(){return"#"+Tg(this.r)+Tg(this.g)+Tg(this.b)}function Ig(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function Tg(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Rg(e,t,i,n){return n<=0?e=t=i=NaN:i<=0||i>=1?e=t=NaN:t<=0&&(e=NaN),new Pg(e,t,i,n)}function Og(e){if(e instanceof Pg)return new Pg(e.h,e.s,e.l,e.opacity);if(e instanceof cg||(e=kg(e)),!e)return new Pg;if(e instanceof Pg)return e;var t=(e=e.rgb()).r/255,i=e.g/255,n=e.b/255,o=Math.min(t,i,n),r=Math.max(t,i,n),s=NaN,a=r-o,l=(r+o)/2;return a?(s=t===r?(i-n)/a+6*(i0&&l<1?0:s,new Pg(s,a,l,e.opacity)}function Fg(e,t,i,n){return 1===arguments.length?Og(e):new Pg(e,t,i,null==n?1:n)}function Pg(e,t,i,n){this.h=+e,this.s=+t,this.l=+i,this.opacity=+n}function Bg(e,t,i){return 255*(e<60?t+(i-t)*e/60:e<180?i:e<240?t+(i-t)*(240-e)/60:t)}function zg(e,t,i,n,o){var r=e*e,s=r*e;return((1-3*e+3*r-s)*t+(4-6*r+3*s)*i+(1+3*e+3*r-3*s)*n+s*o)/6}function Wg(e){var t=e.length-1;return function(i){var n=i<=0?i=0:i>=1?(i=1,t-1):Math.floor(i*t),o=e[n],r=e[n+1],s=n>0?e[n-1]:2*o-r,a=n=240?e-240:e+120,o,n),Bg(e,o,n),Bg(e<120?e+240:e-120,o,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));const Hg=e=>()=>e;function $g(e,t){return function(i){return e+i*t}}function Ug(e,t){var i=t-e;return i?$g(e,i>180||i<-180?i-360*Math.round(i/360):i):Hg(isNaN(e)?t:e)}function jg(e,t){var i=t-e;return i?$g(e,i):Hg(isNaN(e)?t:e)}const qg=function e(t){var i=function(e){return 1==(e=+e)?jg:function(t,i){return i-t?function(e,t,i){return e=Math.pow(e,i),t=Math.pow(t,i)-e,i=1/i,function(n){return Math.pow(e+n*t,i)}}(t,i,e):Hg(isNaN(t)?i:t)}}(t);function n(e,t){var n=i((e=Eg(e)).r,(t=Eg(t)).r),o=i(e.g,t.g),r=i(e.b,t.b),s=jg(e.opacity,t.opacity);return function(t){return e.r=n(t),e.g=o(t),e.b=r(t),e.opacity=s(t),e+""}}return n.gamma=e,n}(1);function Kg(e){return function(t){var i,n,o=t.length,r=new Array(o),s=new Array(o),a=new Array(o);for(i=0;ir&&(o=t.slice(r,o),a[s]?a[s]+=o:a[++s]=o),(i=i[0])===(n=n[0])?a[s]?a[s]+=n:a[++s]=n:(a[++s]=null,l.push({i:s,x:tf(i,n)})),r=rf.lastIndex;return rt&&(i=e,e=t,t=i),function(i){return Math.max(e,Math.min(t,i))}}(s[0],s[e-1])),n=e>2?ff:gf,o=r=null,h}function h(t){return null==t||isNaN(t=+t)?i:(o||(o=n(s.map(e),a,l)))(e(c(t)))}return h.invert=function(i){return c(t((r||(r=n(a,s.map(e),tf)))(i)))},h.domain=function(e){return arguments.length?(s=Array.from(e,cf),u()):s.slice()},h.range=function(e){return arguments.length?(a=Array.from(e),u()):a.slice()},h.rangeRound=function(e){return a=Array.from(e),l=lf,u()},h.clamp=function(e){return arguments.length?(c=!!e||hf,u()):c!==hf},h.interpolate=function(e){return arguments.length?(l=e,u()):l},h.unknown=function(e){return arguments.length?(i=e,h):i},function(i,n){return e=i,t=n,u()}}function _f(){return mf()(hf,hf)}function vf(e){var t=e.domain;return e.ticks=function(e){var i=t();return lo(i[0],i[i.length-1],null==e?10:e)},e.tickFormat=function(e,i){var n=t();return sg(n[0],n[n.length-1],null==e?10:e,i)},e.nice=function(i){null==i&&(i=10);var n,o,r=t(),s=0,a=r.length-1,l=r[s],c=r[a],u=10;for(c0;){if((o=co(l,c,i))===n)return r[s]=l,r[a]=c,t(r);if(o>0)l=Math.floor(l/o)*o,c=Math.ceil(c/o)*o;else{if(!(o<0))break;l=Math.ceil(l*o)/o,c=Math.floor(c*o)/o}n=o}return e},e}function bf(e,t){var i,n=0,o=(e=e.slice()).length-1,r=e[n],s=e[o];return s0){for(;d<=g;++d)for(u=1,c=i(d);ul)break;p.push(h)}}else for(;d<=g;++d)for(u=r-1,c=i(d);u>=1;--u)if(!((h=c*u)l)break;p.push(h)}2*p.lengthe)).right(s,o);if(r===s.length)return e.every(uo(t/Bo,i/Bo,n));if(0===r)return mr.every(Math.max(uo(t,i,n),1));const[a,l]=s[o/s[r-1][2]180?t+=360:t-e>180&&(e+=360),r.push({i:i.push(o(i)+"rotate(",null,n)-2,x:tf(e,t)})):t&&i.push(o(i)+"rotate("+t+n)}(r.rotate,s.rotate,a,l),function(e,t,i,r){e!==t?r.push({i:i.push(o(i)+"skewX(",null,n)-2,x:tf(e,t)}):t&&i.push(o(i)+"skewX("+t+n)}(r.skewX,s.skewX,a,l),function(e,t,i,n,r,s){if(e!==i||t!==n){var a=r.push(o(r)+"scale(",null,",",null,")");s.push({i:a-4,x:tf(e,i)},{i:a-2,x:tf(t,n)})}else 1===i&&1===n||r.push(o(r)+"scale("+i+","+n+")")}(r.scaleX,r.scaleY,s.scaleX,s.scaleY,a,l),r=s=null,function(e){for(var t,i=-1,n=l.length;++i.008856451679035631?Math.pow(e,1/3):e/mp+fp}function wp(e){return e>pp?e*e*e:mp*(e-fp)}function Cp(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Sp(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function xp(e){if(e instanceof Dp)return new Dp(e.h,e.c,e.l,e.opacity);if(e instanceof bp||(e=_p(e)),0===e.a&&0===e.b)return new Dp(NaN,00?n:1:0}const Gp="linear",Yp="log",Zp="pow",Xp="sqrt",Qp="symlog",Jp="time",em="utc",tm="sequential",im="diverging",nm="quantile",om="quantize",rm="threshold",sm="ordinal",am="point",lm="band",cm="bin-ordinal",um="continuous",hm="discrete",dm="discretizing",gm="interpolating",fm="temporal";function pm(){const e=rg().unknown(void 0),t=e.domain,i=e.range;let n,o,r=[0,1],s=!1,a=0,l=0,c=.5;function u(){const e=t().length,u=r[1]g+n*e));return i(u?f.reverse():f)}return delete e.unknown,e.domain=function(e){return arguments.length?(t(e),u()):t()},e.range=function(e){return arguments.length?(r=[+e[0],+e[1]],u()):r.slice()},e.rangeRound=function(e){return r=[+e[0],+e[1]],s=!0,u()},e.bandwidth=function(){return o},e.step=function(){return n},e.round=function(e){return arguments.length?(s=!!e,u()):s},e.padding=function(e){return arguments.length?(l=Math.max(0,Math.min(1,e)),a=l,u()):a},e.paddingInner=function(e){return arguments.length?(a=Math.max(0,Math.min(1,e)),u()):a},e.paddingOuter=function(e){return arguments.length?(l=Math.max(0,Math.min(1,e)),u()):l},e.align=function(e){return arguments.length?(c=Math.max(0,Math.min(1,e)),u()):c},e.invertRange=function(e){if(null==e[0]||null==e[1])return;const n=r[1]r[1-n])?void 0:(l=Math.max(0,Jd(s,h)-1),c=h===d?l:Jd(s,d)-1,h-s[l]>o+1e-10&&++l,n&&(u=l,l=a-c,c=a-u),l>c?void 0:t().slice(l,c+1))},e.invert=function(t){const i=e.invertRange([t,t]);return i?i[0]:i},e.copy=function(){return pm().domain(t()).range(r).round(s).paddingInner(a).paddingOuter(l).align(c)},u()}function mm(e){const t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,e.copy=function(){return mm(t())},e}var _m=Array.prototype.map;function vm(e){return _m.call(e,pi)}const bm=Array.prototype.slice,ym={};function wm(e,t,i){const n=function(){const i=t();return i.invertRange||(i.invertRange=i.invert?(n=i,function(e){let t,i=e[0],o=e[1];return o=a&&i[r]<=l&&(c<0&&(c=r),n=r);if(!(c<0))return a=e.invertExtent(i[c]),l=e.invertExtent(i[n]),[void 0===a[0]?a[1]:a[0],void 0===l[1]?l[0]:l[1]]}}(i):void 0),i.type=e,i;var n};return n.metadata=vn(Ti(i)),n}function Cm(e,t,i){return arguments.length>1?(ym[e]=wm(e,t,i),this):Sm(e)?ym[e]:void 0}function Sm(e){return Ki(ym,e)}function xm(e,t){const i=ym[e];return i&&i.metadata[t]}function km(e){return xm(e,um)}function Dm(e){return xm(e,hm)}function Lm(e){return xm(e,dm)}function Nm(e){return xm(e,Yp)}function Em(e){return xm(e,gm)}function Am(e){return xm(e,nm)}Cm("identity",(function e(t){var i;function n(e){return null==e||isNaN(e=+e)?i:e}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=Array.from(e,cf),n):t.slice()},n.unknown=function(e){return arguments.length?(i=e,n):i},n.copy=function(){return e(t).unknown(i)},t=arguments.length?Array.from(t,cf):[0,1],vf(n)})),Cm(Gp,(function e(){var t=_f();return t.copy=function(){return pf(t,e())},ig.apply(t,arguments),vf(t)}),um),Cm(Yp,(function e(){var t=Df(mf()).domain([1,10]);return t.copy=function(){return pf(t,e()).base(t.base())},ig.apply(t,arguments),t}),[um,Yp]),Cm(Zp,Mf,um),Cm(Xp,(function(){return Mf.apply(null,arguments).exponent(.5)}),um),Cm(Qp,(function e(){var t=Rf(mf());return t.copy=function(){return pf(t,e()).constant(t.constant())},ig.apply(t,arguments)}),um),Cm(Jp,(function(){return ig.apply(Hf(Bf,zf,sr,lr,Ho,Wo,ur,dr,fr,Fs).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}),[um,fm]),Cm(em,(function(){return ig.apply(Hf(Ff,Pf,vr,yr,Qo,Zo,Cr,xr,fr,Bs).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}),[um,fm]),Cm(tm,jf,[um,gm]),Cm("".concat(tm,"-").concat(Gp),jf,[um,gm]),Cm("".concat(tm,"-").concat(Yp),(function e(){var t=Df($f()).domain([1,10]);return t.copy=function(){return Uf(t,e()).base(t.base())},ng.apply(t,arguments)}),[um,gm,Yp]),Cm("".concat(tm,"-").concat(Zp),qf,[um,gm]),Cm("".concat(tm,"-").concat(Xp),(function(){return qf.apply(null,arguments).exponent(.5)}),[um,gm]),Cm("".concat(tm,"-").concat(Qp),(function e(){var t=Rf($f());return t.copy=function(){return Uf(t,e()).constant(t.constant())},ng.apply(t,arguments)}),[um,gm]),Cm("".concat(im,"-").concat(Gp),(function e(){var t=vf(Gf()(hf));return t.copy=function(){return Uf(t,e())},ng.apply(t,arguments)}),[um,gm]),Cm("".concat(im,"-").concat(Yp),(function e(){var t=Df(Gf()).domain([.1,1,10]);return t.copy=function(){return Uf(t,e()).base(t.base())},ng.apply(t,arguments)}),[um,gm,Yp]),Cm("".concat(im,"-").concat(Zp),Yf,[um,gm]),Cm("".concat(im,"-").concat(Xp),(function(){return Yf.apply(null,arguments).exponent(.5)}),[um,gm]),Cm("".concat(im,"-").concat(Qp),(function e(){var t=Rf(Gf());return t.copy=function(){return Uf(t,e()).constant(t.constant())},ng.apply(t,arguments)}),[um,gm]),Cm(nm,(function e(){var t,i=[],n=[],o=[];function r(){var e=0,t=Math.max(1,n.length);for(o=new Array(t-1);++e0?o[t-1]:i[0],t=o?[r[o-1],n]:[r[t-1],r[t]]},a.unknown=function(e){return arguments.length?(t=e,a):a},a.thresholds=function(){return r.slice()},a.copy=function(){return e().domain([i,n]).range(s).unknown(t)},ig.apply(vf(a),arguments)}),dm),Cm(rm,(function e(){var t,i=[.5],n=[0,1],o=1;function r(e){return null!=e&&e<=e?n[tg(i,e,0,o)]:t}return r.domain=function(e){return arguments.length?(i=Array.from(e),o=Math.min(i.length,n.length-1),r):i.slice()},r.range=function(e){return arguments.length?(n=Array.from(e),o=Math.min(i.length,n.length-1),r):n.slice()},r.invertExtent=function(e){var t=n.indexOf(e);return[i[t-1],i[t]]},r.unknown=function(e){return arguments.length?(t=e,r):t},r.copy=function(){return e().domain(i).range(n).unknown(t)},ig.apply(r,arguments)}),dm),Cm(cm,(function e(){let t=[],i=[];function n(e){return null==e||e!=e?void 0:i[(tg(t,e)-1)%i.length]}return n.domain=function(e){return arguments.length?(t=vm(e),n):t.slice()},n.range=function(e){return arguments.length?(i=bm.call(e),n):i.slice()},n.tickFormat=function(e,i){return sg(t[0],fi(t),null==e?10:e,i)},n.copy=function(){return e().domain(n.domain()).range(n.range())},n}),[hm,dm]),Cm(sm,rg,hm),Cm(lm,pm,hm),Cm(am,(function(){return mm(pm().paddingInner(1))}),hm);const Mm=["clamp","base","constant","exponent"];function Im(e,t){const i=t[0],n=fi(t)-i;return function(t){return e(i+t*n)}}function Tm(e,t,i){return Kf(Fm(t||"rgb",i),e)}function Rm(e,t){const i=new Array(t),n=t+1;for(let o=0;oe[t]?s[t](e[t]()):0)),s):Vi(.5)}function Fm(e,t){const i=o[function(e){return"interpolate"+e.toLowerCase().split("-").map((e=>e[0].toUpperCase()+e.slice(1))).join("")}(e)];return null!=t&&i&&i.gamma?i.gamma(t):i}function Pm(e){const t=e.length/6|0,i=new Array(t);for(let n=0;n1?(zm[e]=t,this):zm[e]}Bm({category10:"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf",category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5",accent:"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666",dark2:"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666",paired:"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928",pastel1:"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2",pastel2:"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc",set1:"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999",set2:"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3",set3:"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"},Pm),Bm({blues:"cfe1f2bed8eca8cee58fc1de74b2d75ba3cf4592c63181bd206fb2125ca40a4a90",greens:"d3eecdc0e6baabdda594d3917bc77d60ba6c46ab5e329a512089430e7735036429",greys:"e2e2e2d4d4d4c4c4c4b1b1b19d9d9d8888887575756262624d4d4d3535351e1e1e",oranges:"fdd8b3fdc998fdb87bfda55efc9244f87f2cf06b18e4580bd14904b93d029f3303",purples:"e2e1efd4d4e8c4c5e0b4b3d6a3a0cc928ec3827cb97566ae684ea25c3696501f8c",reds:"fdc9b4fcb49afc9e80fc8767fa7051f6573fec3f2fdc2a25c81b1db21218970b13",blueGreen:"d5efedc1e8e0a7ddd18bd2be70c6a958ba9144ad77319c5d2089460e7736036429",bluePurple:"ccddecbad0e4a8c2dd9ab0d4919cc98d85be8b6db28a55a6873c99822287730f71",greenBlue:"d3eecec5e8c3b1e1bb9bd8bb82cec269c2ca51b2cd3c9fc7288abd1675b10b60a1",orangeRed:"fddcaffdcf9bfdc18afdad77fb9562f67d53ee6545e24932d32d1ebf130da70403",purpleBlue:"dbdaebc8cee4b1c3de97b7d87bacd15b9fc93a90c01e7fb70b70ab056199045281",purpleBlueGreen:"dbd8eac8cee4b0c3de93b7d872acd1549fc83892bb1c88a3097f8702736b016353",purpleRed:"dcc9e2d3b3d7ce9eccd186c0da6bb2e14da0e23189d91e6fc61159ab07498f023a",redPurple:"fccfccfcbec0faa9b8f98faff571a5ec539ddb3695c41b8aa908808d0179700174",yellowGreen:"e4f4acd1eca0b9e2949ed68880c97c62bb6e47aa5e3297502083440e723b036034",yellowOrangeBrown:"feeaa1fedd84fecc63feb746fca031f68921eb7215db5e0bc54c05ab3d038f3204",yellowOrangeRed:"fee087fed16ffebd59fea849fd903efc7335f9522bee3423de1b20ca0b22af0225",blueOrange:"134b852f78b35da2cb9dcae1d2e5eff2f0ebfce0bafbbf74e8932fc5690d994a07",brownBlueGreen:"704108a0651ac79548e3c78af3e6c6eef1eac9e9e48ed1c74da79e187a72025147",purpleGreen:"5b1667834792a67fb6c9aed3e6d6e8eff0efd9efd5aedda971bb75368e490e5e29",purpleOrange:"4114696647968f83b7b9b4d6dadbebf3eeeafce0bafbbf74e8932fc5690d994a07",redBlue:"8c0d25bf363adf745ef4ae91fbdbc9f2efeed2e5ef9dcae15da2cb2f78b3134b85",redGrey:"8c0d25bf363adf745ef4ae91fcdccbfaf4f1e2e2e2c0c0c0969696646464343434",yellowGreenBlue:"eff9bddbf1b4bde5b594d5b969c5be45b4c22c9ec02182b82163aa23479c1c3185",redYellowBlue:"a50026d4322cf16e43fcac64fedd90faf8c1dcf1ecabd6e875abd04a74b4313695",redYellowGreen:"a50026d4322cf16e43fcac63fedd8df9f7aed7ee8ea4d86e64bc6122964f006837",pinkYellowGreen:"8e0152c0267edd72adf0b3d6faddedf5f3efe1f2cab6de8780bb474f9125276419",spectral:"9e0142d13c4bf0704afcac63fedd8dfbf8b0e0f3a1a9dda269bda94288b55e4fa2",viridis:"440154470e61481a6c482575472f7d443a834144873d4e8a39568c35608d31688e2d708e2a788e27818e23888e21918d1f988b1fa08822a8842ab07f35b77943bf7154c56866cc5d7ad1518fd744a5db36bcdf27d2e21be9e51afde725",magma:"0000040404130b0924150e3720114b2c11603b0f704a107957157e651a80721f817f24828c29819a2e80a8327db6377ac43c75d1426fde4968e95462f1605df76f5cfa7f5efc8f65fe9f6dfeaf78febf84fece91fddea0fcedaffcfdbf",inferno:"0000040403130c0826170c3b240c4f330a5f420a68500d6c5d126e6b176e781c6d86216b932667a12b62ae305cbb3755c73e4cd24644dd513ae65c30ed6925f3771af8850ffb9506fca50afcb519fac62df6d645f2e661f3f484fcffa4",plasma:"0d088723069033059742039d5002a25d01a66a00a87801a88405a7900da49c179ea72198b12a90ba3488c33d80cb4779d35171da5a69e16462e76e5bed7953f2834cf68f44fa9a3dfca636fdb32ffec029fcce25f9dc24f5ea27f0f921",cividis:"00205100235800265d002961012b65042e670831690d346b11366c16396d1c3c6e213f6e26426e2c456e31476e374a6e3c4d6e42506e47536d4c566d51586e555b6e5a5e6e5e616e62646f66676f6a6a706e6d717270717573727976737c79747f7c75827f758682768985778c8877908b78938e789691789a94789e9778a19b78a59e77a9a177aea575b2a874b6ab73bbaf71c0b26fc5b66dc9b96acebd68d3c065d8c462ddc85fe2cb5ce7cf58ebd355f0d652f3da4ff7de4cfae249fce647",rainbow:"6e40aa883eb1a43db3bf3cafd83fa4ee4395fe4b83ff576eff6659ff7847ff8c38f3a130e2b72fcfcc36bee044aff05b8ff4576ff65b52f6673af27828ea8d1ddfa319d0b81cbecb23abd82f96e03d82e14c6edb5a5dd0664dbf6e40aa",sinebow:"ff4040fc582af47218e78d0bd5a703bfbf00a7d5038de70b72f41858fc2a40ff402afc5818f4720be78d03d5a700bfbf03a7d50b8de71872f42a58fc4040ff582afc7218f48d0be7a703d5bf00bfd503a7e70b8df41872fc2a58ff4040",turbo:"23171b32204a3e2a71453493493eae4b49c54a53d7485ee44569ee4074f53c7ff8378af93295f72e9ff42ba9ef28b3e926bce125c5d925cdcf27d5c629dcbc2de3b232e9a738ee9d3ff39347f68950f9805afc7765fd6e70fe667cfd5e88fc5795fb51a1f84badf545b9f140c5ec3cd0e637dae034e4d931ecd12ef4c92bfac029ffb626ffad24ffa223ff9821ff8d1fff821dff771cfd6c1af76118f05616e84b14df4111d5380fcb2f0dc0260ab61f07ac1805a313029b0f00950c00910b00",browns:"eedbbdecca96e9b97ae4a865dc9856d18954c7784cc0673fb85536ad44339f3632",tealBlues:"bce4d89dd3d181c3cb65b3c245a2b9368fae347da0306a932c5985",teals:"bbdfdfa2d4d58ac9c975bcbb61b0af4da5a43799982b8b8c1e7f7f127273006667",warmGreys:"dcd4d0cec5c1c0b8b4b3aaa7a59c9998908c8b827f7e7673726866665c5a59504e",goldGreen:"f4d166d5ca60b6c35c98bb597cb25760a6564b9c533f8f4f33834a257740146c36",goldOrange:"f4d166f8be5cf8aa4cf5983bf3852aef701be2621fd65322c54923b142239e3a26",goldRed:"f4d166f6be59f9aa51fc964ef6834bee734ae56249db5247cf4244c43141b71d3e",lightGreyRed:"efe9e6e1dad7d5cbc8c8bdb9bbaea9cd967ddc7b43e15f19df4011dc000b",lightGreyTeal:"e4eaead6dcddc8ced2b7c2c7a6b4bc64b0bf22a6c32295c11f85be1876bc",lightMulti:"e0f1f2c4e9d0b0de9fd0e181f6e072f6c053f3993ef77440ef4a3c",lightOrange:"f2e7daf7d5baf9c499fab184fa9c73f68967ef7860e8645bde515bd43d5b",lightTealBlue:"e3e9e0c0dccf9aceca7abfc859afc0389fb9328dad2f7ca0276b95255988",darkBlue:"3232322d46681a5c930074af008cbf05a7ce25c0dd38daed50f3faffffff",darkGold:"3c3c3c584b37725e348c7631ae8b2bcfa424ecc31ef9de30fff184ffffff",darkGreen:"3a3a3a215748006f4d048942489e4276b340a6c63dd2d836ffeb2cffffaa",darkMulti:"3737371f5287197d8c29a86995ce3fffe800ffffff",darkRed:"3434347036339e3c38cc4037e75d1eec8620eeab29f0ce32ffeb2c"},(e=>Tm(Pm(e))));const Vm="symbol",Hm=e=>li(e)?e.map((e=>String(e))):String(e),$m=(e,t)=>e[1]-t[1],Um=(e,t)=>t[1]-e[1];function jm(e,t,i){let n;return nn(t)&&(e.bins&&(t=Math.max(t,e.bins.length)),null!=i&&(t=Math.min(t,Math.floor(dn(e.domain())/i||1)))),ci(t)&&(n=t.step,t=t.interval),rn(t)&&(t=e.type===Jp?gs(t):e.type==em?fs(t):qt("Only time and utc scales accept interval strings."),n&&(t=t.every(n))),t}function qm(e,t,i){let n=e.range(),o=n[0],r=fi(n),s=$m;if(o>r&&(n=r,r=o,o=n,s=Um),o=Math.floor(o),r=Math.ceil(r),t=t.map((t=>[t,e(t)])).filter((e=>o<=e[1]&&e[1]<=r)).sort(s).map((e=>e[0])),i>0&&t.length>1){const e=[t[0],fi(t)];for(;t.length>i&&t.length>=3;)t=t.filter(((e,t)=>!(t%2)));t.length<3&&(t=e)}return t}function Km(e,t){return e.bins?qm(e,e.bins):e.ticks?e.ticks(t):e.domain()}function Gm(e,t,i,n,o,r){const s=t.type;let a=Hm;if(s===Jp||o===Jp)a=e.timeFormat(n);else if(s===em||o===em)a=e.utcFormat(n);else if(Nm(s)){const o=e.formatFloat(n);if(r||t.bins)a=o;else{const e=Ym(t,i,!1);a=t=>e(t)?o(t):""}}else if(t.tickFormat){const o=t.domain();a=e.formatSpan(o[0],o[o.length-1],i,n)}else n&&(a=e.format(n));return a}function Ym(e,t,i){const n=Km(e,t),o=e.base(),r=Math.log(o),s=Math.max(1,o*t/n.length),a=e=>{let t=e/Math.pow(o,Math.round(Math.log(e)/r));return t*o1?n[1]-n[0]:n[0];for(r=1;rZm[e.type]||e.bins)(t)?e_(a):"discrete"===n?i_(a):n_(a)}const e_=e=>(t,i,n)=>{const o=t_(n[i+1],t_(n.max,1/0)),r=o_(t,e),s=o_(o,e);return r&&s?r+" – "+s:s?"< "+s:"≥ "+r},t_=(e,t)=>null!=e?e:t,i_=e=>(t,i)=>i?e(t):null,n_=e=>t=>e(t),o_=(e,t)=>Number.isFinite(e)?t(e):null;function r_(e,t,i){i=i||{};const n=Math.max(3,i.maxlen||7),o=function(e,t,i,n){const o=n||t.type;return rn(i)&&function(e){return xm(e,fm)}(o)&&(i=i.replace(/%a/g,"%A").replace(/%b/g,"%B")),i||o!==Jp?i||o!==em?Jm(e,t,5,null,i,n,!0):e.utcFormat("%A, %d %B %Y, %X UTC"):e.timeFormat("%A, %d %B %Y, %X")}(e,t,i.format,i.formatType);if(Lm(t.type)){const e=Qm(t).slice(1).map(o),i=e.length;return"".concat(i," boundar").concat(1===i?"y":"ies",": ").concat(e.join(", "))}if(Dm(t.type)){const e=t.domain(),i=e.length,r=i>n?e.slice(0,n-2).map(o).join(", ")+", ending with "+e.slice(-1).map(o):e.map(o).join(", ");return"".concat(i," value").concat(1===i?"":"s",": ").concat(r)}{const e=t.domain();return"values from ".concat(o(e[0])," to ").concat(o(fi(e)))}}let s_=0;const a_="p_";function l_(e){return e&&e.gradient}function c_(e,t,i){const n=e.gradient;let o=e.id,r="radial"===n?a_:"";return o||(o=e.id="gradient_"+s_++,"radial"===n?(e.x1=u_(e.x1,.5),e.y1=u_(e.y1,.5),e.r1=u_(e.r1,0),e.x2=u_(e.x2,.5),e.y2=u_(e.y2,.5),e.r2=u_(e.r2,.5),r=a_):(e.x1=u_(e.x1,0),e.y1=u_(e.y1,0),e.x2=u_(e.x2,1),e.y2=u_(e.y2,0))),t[o]=e,"url("+(i||"")+"#"+r+o+")"}function u_(e,t){return null!=e?e:t}function h_(e,t){var i,n=[];return i={gradient:"linear",x1:e?e[0]:0,y1:e?e[1]:0,x2:t?t[0]:1,y2:t?t[1]:0,stops:n,stop:function(e,t){return n.push({offset:e,color:t}),i}}}const d_={basis:{curve:function(e){return new Ph(e)}},"basis-closed":{curve:function(e){return new zh(e)}},"basis-open":{curve:function(e){return new Wh(e)}},bundle:{curve:Hh,tension:"beta",value:.85},cardinal:{curve:jh,tension:"tension",value:0},"cardinal-open":{curve:Kh,tension:"tension",value:0},"cardinal-closed":{curve:Yh,tension:"tension",value:0},"catmull-rom":{curve:hd,tension:"alpha",value:.5},"catmull-rom-closed":{curve:gd,tension:"alpha",value:.5},"catmull-rom-open":{curve:pd,tension:"alpha",value:.5},linear:{curve:_d},"linear-closed":{curve:function(e){return new vd(e)}},monotone:{horizontal:function(e){return new xd(e)},vertical:function(e){return new Sd(e)}},natural:{curve:function(e){return new Dd(e)}},step:{curve:function(e){return new Nd(e,.5)}},"step-after":{curve:function(e){return new Nd(e,1)}},"step-before":{curve:function(e){return new Nd(e,0)}}};function g_(e,t,i){var n=Ki(d_,e)&&d_[e],o=null;return n&&(o=n.curve||n[t||"vertical"],n.tension&&null!=i&&(o=o[n.tension](i))),o}const f_={m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7},p_=[/([MLHVCSQTAZmlhvcsqtaz])/g,/###/,/(\.\d+)(\.\d)/g,/(\d)([-+])/g,/\s|,|###/];function m_(e){const t=[];let i,n,o,r,s,a,l,c,u,h;const d=e.slice().replace(p_[0],"###$1").split(p_[1]).slice(1);for(l=0,u=d.length;la){const e=o.length;for(c=1,t.push([s].concat(o.slice(c,c+=a))),s="M"===s?"L":"m"===s?"l":s;c1&&(p=Math.sqrt(p),i*=p,n*=p);const m=d/i,_=h/i,v=-h/n,b=d/n,y=m*a+_*l,w=v*a+b*l,C=m*e+_*t,S=v*e+b*t;let x=1/((C-y)*(C-y)+(S-w)*(S-w))-.25;x<0&&(x=0);let k=Math.sqrt(x);r==o&&(k=-k);const D=.5*(y+C)-k*(S-w),L=.5*(w+S)+k*(C-y),N=Math.atan2(w-L,y-D);let E=Math.atan2(S-L,C-D)-N;E<0&&1===r?E+=b_:E>0&&0===r&&(E-=b_);const A=Math.ceil(Math.abs(E/(v_+.001))),M=[];for(let e=0;e+e}function z_(e,t,i){return Math.max(t,Math.min(e,i))}function W_(){var e=R_,t=O_,i=F_,n=P_,o=B_(0),r=o,s=o,a=o,l=null;function c(c,u,h){var d,g=null!=u?u:+e.call(this,c),f=null!=h?h:+t.call(this,c),p=+i.call(this,c),m=+n.call(this,c),_=Math.min(p,m)/2,v=z_(+o.call(this,c),0,_),b=z_(+r.call(this,c),0,_),y=z_(+s.call(this,c),0,_),w=z_(+a.call(this,c),0,_);if(l||(l=d=Od()),v<=0&&b<=0&&y<=0&&w<=0)l.rect(g,f,p,m);else{var C=g+p,S=f+m;l.moveTo(g+v,f),l.lineTo(C-b,f),l.bezierCurveTo(C-T_*b,f,C,f+T_*b,C,f+b),l.lineTo(C,S-w),l.bezierCurveTo(C,S-T_*w,C-T_*w,S,C-w,S),l.lineTo(g+y,S),l.bezierCurveTo(g+T_*y,S,g,S-T_*y,g,S-y),l.lineTo(g,f+v),l.bezierCurveTo(g,f+T_*v,g+T_*v,f,g+v,f),l.closePath()}if(d)return l=null,d+""||null}return c.x=function(t){return arguments.length?(e=B_(t),c):e},c.y=function(e){return arguments.length?(t=B_(e),c):t},c.width=function(e){return arguments.length?(i=B_(e),c):i},c.height=function(e){return arguments.length?(n=B_(e),c):n},c.cornerRadius=function(e,t,i,n){return arguments.length?(o=B_(e),r=null!=t?B_(t):o,a=null!=i?B_(i):o,s=null!=n?B_(n):r,c):o},c.context=function(e){return arguments.length?(l=null==e?null:e,c):l},c}function V_(){var e,t,i,n,o,r,s,a,l=null;function c(e,t,i){const n=i/2;if(o){var c=s-t,u=e-r;if(c||u){var h=Math.sqrt(c*c+u*u),d=(c/=h)*a,g=(u/=h)*a,f=Math.atan2(u,c);l.moveTo(r-d,s-g),l.lineTo(e-c*n,t-u*n),l.arc(e,t,n,f-Math.PI,f),l.lineTo(r+d,s+g),l.arc(r,s,a,f,f+Math.PI)}else l.arc(e,t,n,0,b_);l.closePath()}else o=1;r=e,s=t,a=n}function u(r){var s,a,u,h=r.length,d=!1;for(null==l&&(l=u=Od()),s=0;s<=h;++s)!(se.x||0,U_=e=>e.y||0,j_=e=>!(!1===e.defined),q_=function(){var e=Pd,t=Bd,i=Fd(0),n=null,o=zd,r=Wd,s=Vd,a=null;function l(){var l,c,u=+e.apply(this,arguments),h=+t.apply(this,arguments),d=o.apply(this,arguments)-rd,g=r.apply(this,arguments)-rd,f=Zh(g-d),p=g>d;if(a||(a=l=Od()),hnd)if(f>sd-nd)a.moveTo(h*Qh(d),h*td(d)),a.arc(0,0,h,d,g,!p),u>nd&&(a.moveTo(u*Qh(g),u*td(g)),a.arc(0,0,u,g,d,p));else{var m,_,v=d,b=g,y=d,w=g,C=f,S=f,x=s.apply(this,arguments)/2,k=x>nd&&(n?+n.apply(this,arguments):id(u*u+h*h)),D=ed(Zh(h-u)/2,+i.apply(this,arguments)),L=D,N=D;if(k>nd){var E=ld(k/u*td(x)),A=ld(k/h*td(x));(C-=2*E)>nd?(y+=E*=p?1:-1,w-=E):(C=0,y=w=(d+g)/2),(S-=2*A)>nd?(v+=A*=p?1:-1,b-=A):(S=0,v=b=(d+g)/2)}var M=h*Qh(v),I=h*td(v),T=u*Qh(w),R=u*td(w);if(D>nd){var O,F=h*Qh(b),P=h*td(b),B=u*Qh(y),z=u*td(y);if(fnd?N>nd?(m=$d(B,z,M,I,h,N,p),_=$d(F,P,T,R,h,N,p),a.moveTo(m.cx+m.x01,m.cy+m.y01),Nnd&&C>nd?L>nd?(m=$d(T,R,F,P,u,-L,p),_=$d(M,I,B,z,u,-L,p),a.lineTo(m.cx+m.x01,m.cy+m.y01),Le.startAngle||0)).endAngle((e=>e.endAngle||0)).padAngle((e=>e.padAngle||0)).innerRadius((e=>e.innerRadius||0)).outerRadius((e=>e.outerRadius||0)).cornerRadius((e=>e.cornerRadius||0)),K_=Gd().x($_).y1(U_).y0((e=>(e.y||0)+(e.height||0))).defined(j_),G_=Gd().y(U_).x1($_).x0((e=>(e.x||0)+(e.width||0))).defined(j_),Y_=Kd().x($_).y(U_).defined(j_),Z_=W_().x($_).y(U_).width((e=>e.width||0)).height((e=>e.height||0)).cornerRadius((e=>H_(e.cornerRadiusTopLeft,e.cornerRadius)||0),(e=>H_(e.cornerRadiusTopRight,e.cornerRadius)||0),(e=>H_(e.cornerRadiusBottomRight,e.cornerRadius)||0),(e=>H_(e.cornerRadiusBottomLeft,e.cornerRadius)||0)),X_=function(e,t){var i=null;function n(){var n;if(i||(i=n=Od()),e.apply(this,arguments).draw(i,+t.apply(this,arguments)),n)return i=null,n+""||null}return e="function"==typeof e?e:Fd(e||Yd),t="function"==typeof t?t:Fd(void 0===t?64:+t),n.type=function(t){return arguments.length?(e="function"==typeof t?t:Fd(t),n):e},n.size=function(e){return arguments.length?(t="function"==typeof e?e:Fd(+e),n):t},n.context=function(e){return arguments.length?(i=null==e?null:e,n):i},n}().type((e=>M_(e.shape||"circle"))).size((e=>H_(e.size,64))),Q_=V_().x($_).y(U_).defined(j_).size((e=>e.size||1));function J_(e){return e.cornerRadius||e.cornerRadiusTopLeft||e.cornerRadiusTopRight||e.cornerRadiusBottomRight||e.cornerRadiusBottomLeft}function ev(e,t,i,n){return Z_.context(e)(t,i,n)}var tv=1;function iv(){tv=1}function nv(e,t,i){var n=t.clip,o=e._defs,r=t.clip_id||(t.clip_id="clip"+tv++),s=o.clipping[r]||(o.clipping[r]={id:r});return Oi(n)?s.path=n(null):J_(i)?s.path=ev(null,i,0,0):(s.width=i.width||0,s.height=i.height||0),"url(#"+r+")"}function ov(e){this.clear(),e&&this.union(e)}function rv(e){this.mark=e,this.bounds=this.bounds||new ov}function sv(e){rv.call(this,e),this.items=this.items||[]}function av(e){this._pending=0,this._loader=e||yl()}function lv(e){e._pending+=1}function cv(e){e._pending-=1}function uv(e,t,i){if(t.stroke&&0!==t.opacity&&0!==t.strokeOpacity){const n=null!=t.strokeWidth?+t.strokeWidth:1;e.expand(n+(i?function(e,t){return e.strokeJoin&&"miter"!==e.strokeJoin?0:t}(t,n):0))}return e}ov.prototype={clone(){return new ov(this)},clear(){return this.x1=+Number.MAX_VALUE,this.y1=+Number.MAX_VALUE,this.x2=-Number.MAX_VALUE,this.y2=-Number.MAX_VALUE,this},empty(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},equals(e){return this.x1===e.x1&&this.y1===e.y1&&this.x2===e.x2&&this.y2===e.y2},set(e,t,i,n){return ithis.x2&&(this.x2=e),t>this.y2&&(this.y2=t),this},expand(e){return this.x1-=e,this.y1-=e,this.x2+=e,this.y2+=e,this},round(){return this.x1=Math.floor(this.x1),this.y1=Math.floor(this.y1),this.x2=Math.ceil(this.x2),this.y2=Math.ceil(this.y2),this},scale(e){return this.x1*=e,this.y1*=e,this.x2*=e,this.y2*=e,this},translate(e,t){return this.x1+=e,this.x2+=e,this.y1+=t,this.y2+=t,this},rotate(e,t,i){const n=this.rotatedPoints(e,t,i);return this.clear().add(n[0],n[1]).add(n[2],n[3]).add(n[4],n[5]).add(n[6],n[7])},rotatedPoints(e,t,i){var{x1:n,y1:o,x2:r,y2:s}=this,a=Math.cos(e),l=Math.sin(e),c=t-t*a+i*l,u=i-t*l-i*a;return[a*n-l*o+c,l*n+a*o+u,a*n-l*s+c,l*n+a*s+u,a*r-l*o+c,l*r+a*o+u,a*r-l*s+c,l*r+a*s+u]},union(e){return e.x1this.x2&&(this.x2=e.x2),e.y2>this.y2&&(this.y2=e.y2),this},intersect(e){return e.x1>this.x1&&(this.x1=e.x1),e.y1>this.y1&&(this.y1=e.y1),e.x2=e.x2&&this.y1<=e.y1&&this.y2>=e.y2},alignsWith(e){return e&&(this.x1==e.x1||this.x2==e.x2||this.y1==e.y1||this.y2==e.y2)},intersects(e){return e&&!(this.x2e.x2||this.y2e.y2)},contains(e,t){return!(ethis.x2||tthis.y2)},width(){return this.x2-this.x1},height(){return this.y2-this.y1}},Xi(sv,rv),av.prototype={pending(){return this._pending},sanitizeURL(e){const t=this;return lv(t),t._loader.sanitize(e,{context:"href"}).then((e=>(cv(t),e))).catch((()=>(cv(t),null)))},loadImage(e){const t=this,i=Xd();return lv(t),t._loader.sanitize(e,{context:"image"}).then((e=>{const n=e.href;if(!n||!i)throw{url:n};const o=new i,r=Ki(e,"crossOrigin")?e.crossOrigin:"anonymous";return null!=r&&(o.crossOrigin=r),o.onload=()=>cv(t),o.onerror=()=>cv(t),o.src=n,o})).catch((e=>(cv(t),{complete:!1,width:0,height:0,src:e&&e.url||""})))},ready(){const e=this;return new Promise((t=>{!function i(n){e.pending()?setTimeout((()=>{i(!0)}),10):t(n)}(!1)}))}};const hv=b_-1e-8;let dv,gv,fv,pv,mv,_v,vv,bv;const yv=(e,t)=>dv.add(e,t),wv=(e,t)=>yv(gv=e,fv=t),Cv=e=>yv(e,dv.y1),Sv=e=>yv(dv.x1,e),xv=(e,t)=>mv*e+vv*t,kv=(e,t)=>_v*e+bv*t,Dv=(e,t)=>yv(xv(e,t),kv(e,t)),Lv=(e,t)=>wv(xv(e,t),kv(e,t));function Nv(e,t){return dv=e,t?(pv=t*__,mv=bv=Math.cos(pv),_v=Math.sin(pv),vv=-_v):(mv=bv=1,pv=_v=vv=0),Ev}const Ev={beginPath(){},closePath(){},moveTo:Lv,lineTo:Lv,rect(e,t,i,n){pv?(Dv(e+i,t),Dv(e+i,t+n),Dv(e,t+n),Lv(e,t)):(yv(e+i,t+n),wv(e,t))},quadraticCurveTo(e,t,i,n){const o=xv(e,t),r=kv(e,t),s=xv(i,n),a=kv(i,n);Av(gv,o,s,Cv),Av(fv,r,a,Sv),wv(s,a)},bezierCurveTo(e,t,i,n,o,r){const s=xv(e,t),a=kv(e,t),l=xv(i,n),c=kv(i,n),u=xv(o,r),h=kv(o,r);Mv(gv,s,l,u,Cv),Mv(fv,a,c,h,Sv),wv(u,h)},arc(e,t,i,n,o,r){if(n+=pv,o+=pv,gv=i*Math.cos(o)+e,fv=i*Math.sin(o)+t,Math.abs(o-n)>hv)yv(e-i,t-i),yv(e+i,t+i);else{const s=n=>yv(i*Math.cos(n)+e,i*Math.sin(n)+t);let a,l;if(s(n),s(o),o!==n)if((n%=b_)<0&&(n+=b_),(o%=b_)<0&&(o+=b_),oo;++l,a-=v_)s(a);else for(a=n-n%v_+v_,l=0;l<4&&a1e-14?(l=s*s+a*r,l>=0&&(l=Math.sqrt(l),c=(-s+l)/r,u=(-s-l)/r)):c=.5*a/s,0m)return!1;g>p&&(p=g)}else if(h>0){if(g0&&(e.globalAlpha=i,e.fillStyle=$v(e,t,t.fill),!0)}var jv=[];function qv(e,t,i){var n=null!=(n=t.strokeWidth)?n:1;return!(n<=0)&&(i*=null==t.strokeOpacity?1:t.strokeOpacity)>0&&(e.globalAlpha=i,e.strokeStyle=$v(e,t,t.stroke),e.lineWidth=n,e.lineCap=t.strokeCap||"butt",e.lineJoin=t.strokeJoin||"miter",e.miterLimit=t.strokeMiterLimit||10,e.setLineDash&&(e.setLineDash(t.strokeDash||jv),e.lineDashOffset=t.strokeDashOffset||0),!0)}function Kv(e,t){return e.zindex-t.zindex||e.index-t.index}function Gv(e){if(!e.zdirty)return e.zitems;var t,i,n,o=e.items,r=[];for(i=0,n=o.length;i=0;)if(i=t(o[n]))return i;if(o===r)for(n=(o=e.items).length;--n>=0;)if(!o[n].zindex&&(i=t(o[n])))return i;return null}function Xv(e){return function(t,i,n){Yv(i,(i=>{n&&!n.intersects(i.bounds)||Jv(e,t,i,i)}))}}function Qv(e){return function(t,i,n){!i.items.length||n&&!n.intersects(i.bounds)||Jv(e,t,i.items[0],i.items)}}function Jv(e,t,i,n){var o=null==i.opacity?1:i.opacity;0!==o&&(e(t,n)||(Wv(t,i),i.fill&&Uv(t,i,o)&&t.fill(),i.stroke&&qv(t,i,o)&&t.stroke()))}function eb(e){return e=e||Jt,function(t,i,n,o,r,s){return n*=t.pixelRatio,o*=t.pixelRatio,Zv(i,(i=>{const a=i.bounds;if((!a||a.contains(r,s))&&a)return e(t,i,n,o,r,s)?i:void 0}))}}function tb(e,t){return function(i,n,o,r){var s,a,l=Array.isArray(n)?n[0]:n,c=null==t?l.fill:t,u=l.stroke&&i.isPointInStroke;return u&&(s=l.strokeWidth,a=l.strokeCap,i.lineWidth=null!=s?s:1,i.lineCap=null!=a?a:"butt"),!e(i,n)&&(c&&i.isPointInPath(o,r)||u&&i.isPointInStroke(o,r))}}function ib(e){return eb(tb(e))}function nb(e,t){return"translate("+e+","+t+")"}function ob(e){return"rotate("+e+")"}function rb(e){return nb(e.x||0,e.y||0)}function sb(e,t,i){function n(e,i){var n=i.x||0,o=i.y||0,r=i.angle||0;e.translate(n,o),r&&e.rotate(r*=__),e.beginPath(),t(e,i),r&&e.rotate(-r),e.translate(-n,-o)}return{type:e,tag:"path",nested:!1,attr:function(e,i){e("transform",function(e){return nb(e.x||0,e.y||0)+(e.angle?" "+ob(e.angle):"")}(i)),e("d",t(null,i))},bound:function(e,i){return t(Nv(e,i.angle),i),uv(e,i).translate(i.x||0,i.y||0)},draw:Xv(n),pick:ib(n),isect:i||Ov(n)}}var ab=sb("arc",(function(e,t){return q_.context(e)(t)}));function lb(e,t,i){function n(e,i){e.beginPath(),t(e,i)}const o=tb(n);return{type:e,tag:"path",nested:!0,attr:function(e,i){var n=i.mark.items;n.length&&e("d",t(null,n))},bound:function(e,i){var n=i.items;return 0===n.length?e:(t(Nv(e),n),uv(e,n[0]))},draw:Qv(n),pick:function(e,t,i,n,r,s){var a=t.items,l=t.bounds;return!a||!a.length||l&&!l.contains(r,s)?null:(i*=e.pixelRatio,n*=e.pixelRatio,o(e,a,i,n)?a[0]:null)},isect:Fv,tip:i}}var cb=lb("area",(function(e,t){const i=t[0],n=i.interpolate||"linear";return("horizontal"===i.orient?G_:K_).curve(g_(n,i.orient,i.tension)).context(e)(t)}),(function(e,t){for(var i,n,o="horizontal"===e[0].orient?t[1]:t[0],r="horizontal"===e[0].orient?"y":"x",s=e.length,a=1/0;--s>=0;)!1!==e[s].defined&&(n=Math.abs(e[s][r]-o)).5&&t<1.5?.5-Math.abs(t-1):0}function db(e,t){const i=hb(t);e("d",ev(null,t,i,i))}function gb(e,t,i,n){const o=hb(t);e.beginPath(),ev(e,t,(i||0)+o,(n||0)+o)}const fb=tb(gb),pb=tb(gb,!1),mb=tb(gb,!0);var _b={type:"group",tag:"g",nested:!1,attr:function(e,t){e("transform",rb(t))},bound:function(e,t){if(!t.clip&&t.items){const i=t.items,n=i.length;for(let t=0;t{const n=t.x||0,o=t.y||0,r=t.strokeForeground,s=null==t.opacity?1:t.opacity;(t.stroke||t.fill)&&s&&(gb(e,t,n,o),Wv(e,t),t.fill&&Uv(e,t,s)&&e.fill(),t.stroke&&!r&&qv(e,t,s)&&e.stroke()),e.save(),e.translate(n,o),t.clip&&ub(e,t),i&&i.translate(-n,-o),Yv(t,(t=>{this.draw(e,t,i)})),i&&i.translate(n,o),e.restore(),r&&t.stroke&&s&&(gb(e,t,n,o),Wv(e,t),qv(e,t,s)&&e.stroke())}))},pick:function(e,t,i,n,o,r){if(t.bounds&&!t.bounds.contains(o,r)||!t.items)return null;const s=i*e.pixelRatio,a=n*e.pixelRatio;return Zv(t,(l=>{let c,u,h;const d=l.bounds;if(d&&!d.contains(o,r))return;u=l.x||0,h=l.y||0;const g=u+(l.width||0),f=h+(l.height||0),p=l.clip;if(p&&(og||rf))return;if(e.save(),e.translate(u,h),u=o-u,h=r-h,p&&J_(l)&&!mb(e,l,s,a))return e.restore(),null;const m=l.strokeForeground,_=!1!==t.interactive;return _&&m&&l.stroke&&pb(e,l,s,a)?(e.restore(),l):(c=Zv(l,(e=>function(e,t,i){return(!1!==e.interactive||"group"===e.marktype)&&e.bounds&&e.bounds.contains(t,i)}(e,u,h)?this.pick(e,i,n,u,h):null)),!c&&_&&(l.fill||!m&&l.stroke)&&fb(e,l,s,a)&&(c=l),e.restore(),c||null)}))},isect:Pv,content:function(e,t,i){e("clip-path",t.clip?nv(i,t,t):null)},background:function(e,t){e("class","background"),e("aria-hidden",!0),db(e,t)},foreground:function(e,t){e("class","foreground"),e("aria-hidden",!0),t.strokeForeground?db(e,t):e("d","")}},vb={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"};function bb(e,t){var i=e.image;return(!i||e.url&&e.url!==i.url)&&(i={complete:!1,width:0,height:0},t.loadImage(e.url).then((t=>{e.image=t,e.image.url=e.url}))),i}function yb(e,t){return null!=e.width?e.width:t&&t.width?!1!==e.aspect&&e.height?e.height*t.width/t.height:t.width:0}function wb(e,t){return null!=e.height?e.height:t&&t.height?!1!==e.aspect&&e.width?e.width*t.height/t.width:t.height:0}function Cb(e,t){return"center"===e?t/2:"right"===e?t:0}function Sb(e,t){return"middle"===e?t/2:"bottom"===e?t:0}var xb={type:"image",tag:"image",nested:!1,attr:function(e,t,i){const n=bb(t,i),o=yb(t,n),r=wb(t,n),s=(t.x||0)-Cb(t.align,o),a=(t.y||0)-Sb(t.baseline,r);e("href",!n.src&&n.toDataURL?n.toDataURL():n.src||"",vb["xmlns:xlink"],"xlink:href"),e("transform",nb(s,a)),e("width",o),e("height",r),e("preserveAspectRatio",!1===t.aspect?"none":"xMidYMid")},bound:function(e,t){const i=t.image,n=yb(t,i),o=wb(t,i),r=(t.x||0)-Cb(t.align,n),s=(t.y||0)-Sb(t.baseline,o);return e.set(r,s,r+n,s+o)},draw:function(e,t,i){Yv(t,(t=>{if(i&&!i.intersects(t.bounds))return;const n=bb(t,this);let o=yb(t,n),r=wb(t,n);if(0===o||0===r)return;let s,a,l,c,u=(t.x||0)-Cb(t.align,o),h=(t.y||0)-Sb(t.baseline,r);!1!==t.aspect&&(a=n.width/n.height,l=t.width/t.height,a==a&&l==l&&a!==l&&(l=0;)if(!1!==e[r].defined&&(i=e[r].x-t[0])*i+(n=e[r].y-t[1])*n{if(!i||i.intersects(t.bounds)){var n=null==t.opacity?1:t.opacity;n&&Ab(e,t,n)&&(Wv(e,t),e.stroke())}}))},pick:eb((function(e,t,i,n){return!!e.isPointInStroke&&Ab(e,t,1)&&e.isPointInStroke(i,n)})),isect:Bv},Ib=sb("shape",(function(e,t){return(t.mark.shape||t.shape).context(e)(t)})),Tb=sb("symbol",(function(e,t){return X_.context(e)(t)}),Fv);const Rb=ln();var Ob={height:Vb,measureWidth:zb,estimateWidth:Pb,width:Pb,canvas:Fb};function Fb(e){Ob.width=e&&Tv?zb:Pb}function Pb(e,t){return Bb(jb(e,t),Vb(e))}function Bb(e,t){return~~(.8*e.length*t)}function zb(e,t){return Vb(e)<=0||!(t=jb(e,t))?0:Wb(t,Kb(e))}function Wb(e,t){const i=`(${t}) ${e}`;let n=Rb.get(i);return void 0===n&&(Tv.font=t,n=Tv.measureText(e).width,Rb.set(i,n)),n}function Vb(e){return null!=e.fontSize?+e.fontSize||0:11}function Hb(e){return null!=e.lineHeight?e.lineHeight:Vb(e)+2}function $b(e){return t=e.lineBreak&&e.text&&!li(e.text)?e.text.split(e.lineBreak):e.text,li(t)?t.length>1?t:t[0]:t;var t}function Ub(e){const t=$b(e);return(li(t)?t.length-1:0)*Hb(e)}function jb(e,t){const i=null==t?"":(t+"").trim();return e.limit>0&&i.length?function(e,t){var i=+e.limit,n=function(e){if(Ob.width===zb){const t=Kb(e);return e=>Wb(e,t)}{const t=Vb(e);return e=>Bb(e,t)}}(e);if(n(t)>>1,n(t.slice(o))>i?a=o+1:l=o;return r+t.slice(a)}for(;a>>1),n(t.slice(0,o))Math.max(e,Ob.width(t,i))),0)):n=Ob.width(t,h),"center"===r?c-=n/2:"right"===r&&(c-=n),e.set(c+=a,u+=l,c+n,u+o),t.angle&&!i)e.rotate(t.angle*__,a,l);else if(2===i)return e.rotatedPoints(t.angle*__,a,l);return e}var Jb={arc:ab,area:cb,group:_b,image:xb,line:kb,path:Lb,rect:Eb,rule:Mb,shape:Ib,symbol:Tb,text:{type:"text",tag:"text",nested:!1,attr:function(e,t){var i,n=t.dx||0,o=(t.dy||0)+Gb(t),r=Xb(t),s=r.x1,a=r.y1,l=t.angle||0;e("text-anchor",Yb[t.align]||"start"),l?(i=nb(s,a)+" "+ob(l),(n||o)&&(i+=" "+nb(n,o))):i=nb(s+n,a+o),e("transform",i)},bound:Qb,draw:function(e,t,i){Yv(t,(t=>{var n,o,r,s,a,l,c,u=null==t.opacity?1:t.opacity;if(!(i&&!i.intersects(t.bounds)||0===u||t.fontSize<=0||null==t.text||0===t.text.length)){if(e.font=Kb(t),e.textAlign=t.align||"left",o=(n=Xb(t)).x1,r=n.y1,t.angle&&(e.save(),e.translate(o,r),e.rotate(t.angle*__),o=r=0),o+=t.dx||0,r+=(t.dy||0)+Gb(t),l=$b(t),Wv(e,t),li(l))for(a=Hb(t),s=0;s=0;)if(!1!==e[o].defined&&(i=e[o].x-t[0])*i+(n=e[o].y-t[1])*n<(i=e[o].size||1)*i)return e[o];return null}))};function ey(e,t,i){var n=Jb[e.mark.marktype],o=t||n.bound;return n.nested&&(e=e.mark),o(e.bounds||(e.bounds=new ov),e,i)}var ty={mark:null};function iy(e,t,i){var n,o,r,s,a=Jb[e.marktype],l=a.bound,c=e.items,u=c&&c.length;if(a.nested)return u?r=c[0]:(ty.mark=e,r=ty),s=ey(r,l,i),t&&t.union(s)||s;if(t=t||e.bounds&&e.bounds.clear()||new ov,u)for(n=0,o=c.length;nt;)e.removeChild(i[--n]);return e}function gy(e){return"mark-"+e.marktype+(e.role?" role-"+e.role:"")+(e.name?" "+e.name:"")}function fy(e,t){const i=t.getBoundingClientRect();return[e.clientX-i.left-(t.clientLeft||0),e.clientY-i.top-(t.clientTop||0)]}function py(e,t){this._active=null,this._handlers={},this._loader=e||yl(),this._tooltip=t||my}function my(e,t,i,n){e.element().setAttribute("title",n||"")}function _y(e){this._el=null,this._bgcolor=null,this._loader=new av(e)}ay.prototype={toJSON(e){return oy(this.root,e||0)},mark(e,t,i){const n=ly(e,t=t||this.root.items[0]);return t.items[i]=n,n.zindex&&(n.group.zdirty=!0),n}},py.prototype={initialize(e,t,i){return this._el=e,this._obj=i||null,this.origin(t)},element(){return this._el},canvas(){return this._el&&this._el.firstChild},origin(e){return arguments.length?(this._origin=e||[0,0],this):this._origin.slice()},scene(e){return arguments.length?(this._scene=e,this):this._scene},on(){},off(){},_handlerIndex(e,t,i){for(let n=e?e.length:0;--n>=0;)if(e[n].type===t&&(!i||e[n].handler===i))return n;return-1},handlers(e){const t=this._handlers,i=[];if(e)i.push(...t[this.eventName(e)]);else for(const e in t)i.push(...t[e]);return i},eventName(e){const t=e.indexOf(".");return t<0?e:e.slice(0,t)},handleHref(e,t,i){this._loader.sanitize(i,{context:"href"}).then((t=>{const i=new MouseEvent(e.type,e),n=cy(null,"a");for(const e in t)n.setAttribute(e,t[e]);n.dispatchEvent(i)})).catch((()=>{}))},handleTooltip(e,t,i){if(t&&null!=t.tooltip){t=function(e,t,i,n){var o,r,s=e&&e.mark;if(s&&(o=Jb[s.marktype]).tip){for((r=fy(t,i))[0]-=n[0],r[1]-=n[1];e=e.mark.group;)r[0]-=e.x||0,r[1]-=e.y||0;e=o.tip(s.items,r)}return e}(t,e,this.canvas(),this._origin);const n=i&&t&&t.tooltip||null;this._tooltip.call(this._obj,this,e,t,n)}},getItemBoundingClientRect(e){const t=this.canvas();if(!t)return;const i=t.getBoundingClientRect(),n=this._origin,o=e.bounds,r=o.width(),s=o.height();let a=o.x1+n[0]+i.left,l=o.y1+n[1]+i.top;for(;e.mark&&(e=e.mark.group);)a+=e.x||0,l+=e.y||0;return{x:a,y:l,width:r,height:s,left:a,top:l,right:a+r,bottom:l+s}}},_y.prototype={initialize(e,t,i,n,o){return this._el=e,this.resize(t,i,n,o)},element(){return this._el},canvas(){return this._el&&this._el.firstChild},background(e){return 0===arguments.length?this._bgcolor:(this._bgcolor=e,this)},resize(e,t,i,n){return this._width=e,this._height=t,this._origin=i||[0,0],this._scale=n||1,this},dirty(){},render(e){const t=this;return t._call=function(){t._render(e)},t._call(),t._call=null,t},_render(){},renderAsync(e){const t=this.render(e);return this._ready?this._ready.then((()=>t)):Promise.resolve(t)},_load(e,t){var i=this,n=i._loader[e](t);if(!i._ready){const e=i._call;i._ready=i._loader.ready().then((t=>{t&&e(),i._ready=null}))}return n},sanitizeURL(e){return this._load("sanitizeURL",e)},loadImage(e){return this._load("loadImage",e)}};const vy="dragenter",by="dragleave",yy="dragover",wy="mousedown",Cy="mousemove",Sy="mouseout",xy="mouseover",ky="click",Dy="mousewheel",Ly="touchstart",Ny="touchmove",Ey="touchend",Ay=Cy,My=Sy,Iy=ky;function Ty(e,t){py.call(this,e,t),this._down=null,this._touch=null,this._first=!0,this._events={}}function Ry(e,t){(e=>e===Ly||e===Ny||e===Ey?[Ly,Ny,Ey]:[e])(t).forEach((t=>function(e,t){const i=e.canvas();i&&!e._events[t]&&(e._events[t]=1,i.addEventListener(t,e[t]?i=>e[t](i):i=>e.fire(t,i)))}(e,t)))}function Oy(e,t,i){return function(n){const o=this._active,r=this.pickEvent(n);r===o||(o&&o.exit||this.fire(i,n),this._active=r,this.fire(t,n)),this.fire(e,n)}}function Fy(e){return function(t){this.fire(e,t),this._active=null}}Xi(Ty,py,{initialize(e,t,i){return this._canvas=e&&uy(e,"canvas"),[ky,wy,Cy,Sy,by].forEach((e=>Ry(this,e))),py.prototype.initialize.call(this,e,t,i)},canvas(){return this._canvas},context(){return this._canvas.getContext("2d")},events:["keydown","keypress","keyup",vy,by,yy,wy,"mouseup",Cy,Sy,xy,ky,"dblclick","wheel",Dy,Ly,Ny,Ey],DOMMouseScroll(e){this.fire(Dy,e)},mousemove:Oy(Cy,xy,Sy),dragover:Oy(yy,vy,by),mouseout:Fy(Sy),dragleave:Fy(by),mousedown(e){this._down=this._active,this.fire(wy,e)},click(e){this._down===this._active&&(this.fire(ky,e),this._down=null)},touchstart(e){this._touch=this.pickEvent(e.changedTouches[0]),this._first&&(this._active=this._touch,this._first=!1),this.fire(Ly,e,!0)},touchmove(e){this.fire(Ny,e,!0)},touchend(e){this.fire(Ey,e,!0),this._touch=null},fire(e,t,i){const n=i?this._touch:this._active,o=this._handlers[e];if(t.vegaType=e,e===Iy&&n&&n.href?this.handleHref(t,n,n.href):e!==Ay&&e!==My||this.handleTooltip(t,n,e!==My),o)for(let e=0,i=o.length;e=0&&n.splice(o,1),this},pickEvent(e){const t=fy(e,this._canvas),i=this._origin;return this.pick(this._scene,t[0],t[1],t[0]-i[0],t[1]-i[1])},pick(e,t,i,n,o){const r=this.context();return Jb[e.marktype].pick.call(this,r,e,t,i,n,o)}});var Py="undefined"!=typeof window&&window.devicePixelRatio||1;function By(e){_y.call(this,e),this._options={},this._redraw=!1,this._dirty=new ov,this._tempb=new ov}const zy=_y.prototype;function Wy(e,t){py.call(this,e,t);const i=this;i._hrefHandler=Vy(i,((e,t)=>{t&&t.href&&i.handleHref(e,t,t.href)})),i._tooltipHandler=Vy(i,((e,t)=>{i.handleTooltip(e,t,e.type!==My)}))}Xi(By,_y,{initialize(e,t,i,n,o,r){return this._options=r||{},this._canvas=this._options.externalContext?null:Zd(1,1,this._options.type),e&&this._canvas&&(dy(e,0).appendChild(this._canvas),this._canvas.setAttribute("class","marks")),zy.initialize.call(this,e,t,i,n,o)},resize(e,t,i,n){if(zy.resize.call(this,e,t,i,n),this._canvas)!function(e,t,i,n,o,r){const s="undefined"!=typeof HTMLElement&&e instanceof HTMLElement&&null!=e.parentNode,a=e.getContext("2d"),l=s?Py:o;e.width=t*l,e.height=i*l;for(const e in r)a[e]=r[e];s&&1!==l&&(e.style.width=t+"px",e.style.height=i+"px"),a.pixelRatio=l,a.setTransform(l,0,0,l,l*n[0],l*n[1])}(this._canvas,this._width,this._height,this._origin,this._scale,this._options.context);else{const e=this._options.externalContext;e||qt("CanvasRenderer is missing a valid canvas or context"),e.scale(this._scale,this._scale),e.translate(this._origin[0],this._origin[1])}return this._redraw=!0,this},canvas(){return this._canvas},context(){return this._options.externalContext||(this._canvas?this._canvas.getContext("2d"):null)},dirty(e){const t=this._tempb.clear().union(e.bounds);let i=e.mark.group;for(;i;)t.translate(i.x||0,i.y||0),i=i.mark.group;this._dirty.union(t)},_render(e){const t=this.context(),i=this._origin,n=this._width,o=this._height,r=this._dirty,s=((e,t,i)=>(new ov).set(0,0,t,i).translate(-e[0],-e[1]))(i,n,o);t.save();const a=this._redraw||r.empty()?(this._redraw=!1,s.expand(1)):function(e,t,i){return t.expand(1).round(),e.pixelRatio%1&&t.scale(e.pixelRatio).round().scale(1/e.pixelRatio),t.translate(-i[0]%1,-i[1]%1),e.beginPath(),e.rect(t.x1,t.y1,t.width(),t.height()),e.clip(),t}(t,s.intersect(r),i);return this.clear(-i[0],-i[1],n,o),this.draw(t,e,a),t.restore(),r.clear(),this},draw(e,t,i){const n=Jb[t.marktype];t.clip&&function(e,t){var i=t.clip;e.save(),Oi(i)?(e.beginPath(),i(e),e.clip()):ub(e,t.group)}(e,t),n.draw.call(this,e,t,i),t.clip&&e.restore()},clear(e,t,i,n){const o=this._options,r=this.context();"pdf"===o.type||o.externalContext||r.clearRect(e,t,i,n),null!=this._bgcolor&&(r.fillStyle=this._bgcolor,r.fillRect(e,t,i,n))}});const Vy=(e,t)=>i=>{let n=i.target.__data__;n=Array.isArray(n)?n[0]:n,i.vegaType=i.type,t.call(e._obj,i,n)};Xi(Wy,py,{initialize(e,t,i){let n=this._svg;return n&&(n.removeEventListener(Iy,this._hrefHandler),n.removeEventListener(Ay,this._tooltipHandler),n.removeEventListener(My,this._tooltipHandler)),this._svg=n=e&&uy(e,"svg"),n&&(n.addEventListener(Iy,this._hrefHandler),n.addEventListener(Ay,this._tooltipHandler),n.addEventListener(My,this._tooltipHandler)),py.prototype.initialize.call(this,e,t,i)},canvas(){return this._svg},on(e,t){const i=this.eventName(e),n=this._handlers;if(this._handlerIndex(n[i],e,t)<0){const o={type:e,handler:t,listener:Vy(this,t)};(n[i]||(n[i]=[])).push(o),this._svg&&this._svg.addEventListener(i,o.listener)}return this},off(e,t){const i=this.eventName(e),n=this._handlers[i],o=this._handlerIndex(n,e,t);return o>=0&&(this._svg&&this._svg.removeEventListener(i,n[o].listener),n.splice(o,1)),this}});const Hy="aria-hidden",$y="aria-label",Uy="role",jy="aria-roledescription",qy="graphics-object",Ky="graphics-symbol",Gy=(e,t,i)=>({[Uy]:e,[jy]:t,[$y]:i||void 0}),Yy=vn(["axis-domain","axis-grid","axis-label","axis-tick","axis-title","legend-band","legend-entry","legend-gradient","legend-label","legend-title","legend-symbol","title"]),Zy={axis:{desc:"axis",caption:function(e){const t=e.datum,i=e.orient,n=t.title?tw(e):null,o=e.context,r=o.scales[t.scale].value,s=o.dataflow.locale(),a=r.type;return("left"===i||"right"===i?"Y":"X")+"-axis"+(n?` titled '${n}'`:"")+` for a ${Dm(a)?"discrete":a} scale`+` with ${r_(s,r,e)}`}},legend:{desc:"legend",caption:function(e){const t=e.datum,i=t.title?tw(e):null,n=`${t.type||""} legend`.trim(),o=t.scales,r=Object.keys(o),s=e.context,a=s.scales[o[r[0]]].value,l=s.dataflow.locale();return((c=n).length?c[0].toUpperCase()+c.slice(1):c)+(i?` titled '${i}'`:"")+` for ${function(e){return(e=e.map((e=>e+("fill"===e||"stroke"===e?" color":"")))).length<2?e[0]:e.slice(0,-1).join(", ")+" and "+fi(e)}(r)}`+` with ${r_(l,a,e)}`;var c}},"title-text":{desc:"title",caption:e=>`Title text '${ew(e)}'`},"title-subtitle":{desc:"subtitle",caption:e=>`Subtitle text '${ew(e)}'`}},Xy={ariaRole:Uy,ariaRoleDescription:jy,description:$y};function Qy(e,t){const i=!1===t.aria;if(e(Hy,i||void 0),i||null==t.description)for(const t in Xy)e(Xy[t],void 0);else{const i=t.mark.marktype;e($y,t.description),e(Uy,t.ariaRole||("group"===i?qy:Ky)),e(jy,t.ariaRoleDescription||`${i} mark`)}}function Jy(e){return!1===e.aria?{[Hy]:!0}:Yy[e.role]?null:Zy[e.role]?function(e,t){try{const i=e.items[0],n=t.caption||(()=>"");return Gy(t.role||Ky,t.desc,i.description||n(i))}catch(e){return null}}(e,Zy[e.role]):function(e){const t=e.marktype,i="group"===t||"text"===t||e.items.some((e=>null!=e.description&&!1!==e.aria));return Gy(i?qy:Ky,`${t} mark container`,e.description)}(e)}function ew(e){return Ti(e.text).join(" ")}function tw(e){try{return Ti(fi(e.items).items[0].text).join(" ")}catch(e){return null}}const iw=e=>(e+"").replace(/&/g,"&").replace(//g,">");function nw(){let e="",t="",i="";const n=[],o=()=>t=i="",r=(e,i)=>{var n;return null!=i&&(t+=` ${e}="${n=i,iw(n).replace(/"/g,""").replace(/\t/g," ").replace(/\n/g," ").replace(/\r/g," ")}"`),s},s={open(a,...l){(r=>{t&&(e+=`${t}>${i}`,o()),n.push(r)})(a),t="<"+a;for(const e of l)for(const t in e)r(t,e[t]);return s},close(){const r=n.pop();return e+=t?t+(i?`>${i}`:"/>"):``,o(),s},attr:r,text:e=>(i+=iw(e),s),toString:()=>e};return s}const ow=e=>rw(nw(),e)+"";function rw(e,t){if(e.open(t.tagName),t.hasAttributes()){const i=t.attributes,n=i.length;for(let t=0;t1&&e.previousSibling!=t}(s,i))&&t.insertBefore(s,i?i.nextSibling:t.firstChild),s}Xi(uw,_y,{initialize(e,t,i,n,o){return this._defs={},this._clearDefs(),e&&(this._svg=hy(e,0,"svg",cw),this._svg.setAttributeNS(lw,"xmlns",cw),this._svg.setAttributeNS(lw,"xmlns:xlink",vb["xmlns:xlink"]),this._svg.setAttribute("version",vb.version),this._svg.setAttribute("class","marks"),dy(e,1),this._root=hy(this._svg,0,"g",cw),ww(this._root,aw),dy(this._svg,1)),this.background(this._bgcolor),hw.initialize.call(this,e,t,i,n,o)},background(e){return arguments.length&&this._svg&&this._svg.style.setProperty("background-color",e),hw.background.apply(this,arguments)},resize(e,t,i,n){return hw.resize.call(this,e,t,i,n),this._svg&&(ww(this._svg,{width:this._width*this._scale,height:this._height*this._scale,viewBox:`0 0 ${this._width} ${this._height}`}),this._root.setAttribute("transform",`translate(${this._origin})`)),this._dirty=[],this},canvas(){return this._svg},svg(){const e=this._svg,t=this._bgcolor;if(!e)return null;let i;t&&(e.removeAttribute("style"),i=hy(e,0,"rect",cw),ww(i,{width:this._width,height:this._height,fill:t}));const n=ow(e);return t&&(e.removeChild(i),this._svg.style.setProperty("background-color",t)),n},_render(e){return this._dirtyCheck()&&(this._dirtyAll&&this._clearDefs(),this.mark(this._root,e),dy(this._root,1)),this.defs(),this._dirty=[],++this._dirtyID,this},dirty(e){e.dirty!==this._dirtyID&&(e.dirty=this._dirtyID,this._dirty.push(e))},isDirty(e){return this._dirtyAll||!e._svg||e.dirty===this._dirtyID},_dirtyCheck(){this._dirtyAll=!0;const e=this._dirty;if(!e.length||!this._dirtyID)return!0;const t=++this._dirtyID;let i,n,o,r,s,a,l;for(s=0,a=e.length;s{e.dirty=t}))),n.zdirty||(i.exit?(r.nested&&n.items.length?(l=n.items[0],l._svg&&this._update(r,l._svg,l)):i._svg&&(l=i._svg.parentNode,l&&l.removeChild(i._svg)),i._svg=null):(i=r.nested?n.items[0]:i,i._update!==t&&(i._svg&&i._svg.ownerSVGElement?this._update(r,i._svg,i):(this._dirtyAll=!1,dw(i,t)),i._update=t)));return!this._dirtyAll},mark(e,t,i){if(!this.isDirty(t))return t._svg;const n=this._svg,o=Jb[t.marktype],r=!1===t.interactive?"none":null,s="g"===o.tag;let a=null,l=0;const c=pw(t,e,i,"g",n);c.setAttribute("class",gy(t));const u=Jy(t);for(const e in u)Cw(c,e,u[e]);s||Cw(c,"pointer-events",r),Cw(c,"clip-path",t.clip?nv(this,t,t.group):null);const h=e=>{const t=this.isDirty(e),i=pw(e,c,a,o.tag,n);t&&(this._update(o,i,e),s&&function(e,t,i){t=t.lastChild.previousSibling;let n,o=0;Yv(i,(i=>{n=e.mark(t,i,n),++o})),dy(t,1+o)}(this,i,e)),a=i,++l};return o.nested?t.items.length&&h(t.items[0]):Yv(t,h),dy(c,l),c},_update(e,t,i){mw=t,_w=t.__values__,Qy(bw,i),e.attr(bw,i,this);const n=vw[e.type];n&&n.call(this,e,t,i),mw&&this.style(mw,i)},style(e,t){if(null!=t)for(const i in sw){let n="font"===i?qb(t):t[i];if(n===_w[i])continue;const o=sw[i];null==n?e.removeAttribute(o):(l_(n)&&(n=c_(n,this._defs.gradient,Sw())),e.setAttribute(o,n+"")),_w[i]=n}},defs(){const e=this._svg,t=this._defs;let i=t.el,n=0;for(const o in t.gradient)i||(t.el=i=hy(e,1,"defs",cw)),n=gw(i,t.gradient[o],n);for(const o in t.clipping)i||(t.el=i=hy(e,1,"defs",cw)),n=fw(i,t.clipping[o],n);i&&(0===n?(e.removeChild(i),t.el=null):dy(i,n))},_clearDefs(){const e=this._defs;e.gradient={},e.clipping={}}});let mw=null,_w=null;const vw={group(e,t,i){const n=mw=t.childNodes[2];_w=n.__values__,e.foreground(bw,i,this),_w=t.__values__,mw=t.childNodes[1],e.content(bw,i,this);const o=mw=t.childNodes[0];e.background(bw,i,this);const r=!1===i.mark.interactive?"none":null;if(r!==_w.events&&(Cw(n,"pointer-events",r),Cw(o,"pointer-events",r),_w.events=r),i.strokeForeground&&i.stroke){const e=i.fill;Cw(n,"display",null),this.style(o,i),Cw(o,"stroke",null),e&&(i.fill=null),_w=n.__values__,this.style(n,i),e&&(i.fill=e),mw=null}else Cw(n,"display","none")},image(e,t,i){!1===i.smooth?(yw(t,"image-rendering","optimizeSpeed"),yw(t,"image-rendering","pixelated")):yw(t,"image-rendering",null)},text(e,t,i){const n=$b(i);let o,r,s,a;li(n)?(r=n.map((e=>jb(i,e))),o=r.join("\n"),o!==_w.text&&(dy(t,0),s=t.ownerDocument,a=Hb(i),r.forEach(((e,n)=>{const o=cy(s,"tspan",cw);o.__data__=i,o.textContent=e,n&&(o.setAttribute("x",0),o.setAttribute("dy",a)),t.appendChild(o)})),_w.text=o)):(r=jb(i,n),r!==_w.text&&(t.textContent=r,_w.text=r)),Cw(t,"font-family",qb(i)),Cw(t,"font-size",Vb(i)+"px"),Cw(t,"font-style",i.fontStyle),Cw(t,"font-variant",i.fontVariant),Cw(t,"font-weight",i.fontWeight)}};function bw(e,t,i){t!==_w[e]&&(i?function(e,t,i,n){null!=i?e.setAttributeNS(n,t,i):e.removeAttributeNS(n,t)}(mw,e,t,i):Cw(mw,e,t),_w[e]=t)}function yw(e,t,i){i!==_w[t]&&(null==i?e.style.removeProperty(t):e.style.setProperty(t,i+""),_w[t]=i)}function ww(e,t){for(const i in t)Cw(e,i,t[i])}function Cw(e,t,i){null!=i?e.setAttribute(t,i):e.removeAttribute(t)}function Sw(){let e;return"undefined"==typeof window?"":(e=window.location).hash?e.href.slice(0,-e.hash.length):e.href}function xw(e){_y.call(this,e),this._text=null,this._defs={gradient:{},clipping:{}}}Xi(xw,_y,{svg(){return this._text},_render(e){const t=nw();t.open("svg",$i({},vb,{class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:`0 0 ${this._width} ${this._height}`}));const i=this._bgcolor;return i&&"transparent"!==i&&"none"!==i&&t.open("rect",{width:this._width,height:this._height,fill:i}).close(),t.open("g",aw,{transform:"translate("+this._origin+")"}),this.mark(t,e),t.close(),this.defs(t),this._text=t.close()+"",this},mark(e,t){const i=Jb[t.marktype],n=i.tag,o=[Qy,i.attr];e.open("g",{class:gy(t),"clip-path":t.clip?nv(this,t,t.group):null},Jy(t),{"pointer-events":"g"!==n&&!1===t.interactive?"none":null});const r=r=>{const s=this.href(r);if(s&&e.open("a",s),e.open(n,this.attr(t,r,o,"g"!==n?n:null)),"text"===n){const t=$b(r);if(li(t)){const i={x:0,dy:Hb(r)};for(let n=0;nthis.mark(e,t))),e.close(),n&&s?(o&&(r.fill=null),r.stroke=s,e.open("path",this.attr(t,r,i.foreground,"bgrect")).close(),o&&(r.fill=o)):e.open("path",this.attr(t,r,i.foreground,"bgfore")).close()}e.close(),s&&e.close()};return i.nested?t.items&&t.items.length&&r(t.items[0]):Yv(t,r),e.close()},href(e){const t=e.href;let i;if(t){if(i=this._hrefs&&this._hrefs[t])return i;this.sanitizeURL(t).then((e=>{e["xlink:href"]=e.href,e.href=null,(this._hrefs||(this._hrefs={}))[t]=e}))}return null},attr(e,t,i,n){const o={},r=(e,t,i,n)=>{o[n||e]=t};return Array.isArray(i)?i.forEach((e=>e(r,t,this))):i(r,t,this),n&&function(e,t,i,n,o){if(null==t)return e;if("bgrect"===n&&!1===i.interactive&&(e["pointer-events"]="none"),"bgfore"===n&&(!1===i.interactive&&(e["pointer-events"]="none"),e.display="none",null!==t.fill))return e;"image"===n&&!1===t.smooth&&(e.style="image-rendering: optimizeSpeed; image-rendering: pixelated;"),"text"===n&&(e["font-family"]=qb(t),e["font-size"]=Vb(t)+"px",e["font-style"]=t.fontStyle,e["font-variant"]=t.fontVariant,e["font-weight"]=t.fontWeight);for(const i in sw){let n=t[i];const r=sw[i];("transparent"!==n||"fill"!==r&&"stroke"!==r)&&null!=n&&(l_(n)&&(n=c_(n,o.gradient,"")),e[r]=n)}}(o,t,e,n,this._defs),o},defs(e){const t=this._defs.gradient,i=this._defs.clipping;if(0!==Object.keys(t).length+Object.keys(i).length){e.open("defs");for(const i in t){const n=t[i],o=n.stops;"radial"===n.gradient?(e.open("pattern",{id:a_+i,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"}),e.open("rect",{width:"1",height:"1",fill:"url(#"+i+")"}).close(),e.close(),e.open("radialGradient",{id:i,fx:n.x1,fy:n.y1,fr:n.r1,cx:n.x2,cy:n.y2,r:n.r2})):e.open("linearGradient",{id:i,x1:n.x1,x2:n.x2,y1:n.y1,y2:n.y2});for(let t=0;t1?(Dw[e]=t,this):Dw[e]}function Nw(e,t,i){const n=[],o=(new ov).union(t),r=e.marktype;return r?Ew(e,o,i,n):"group"===r?Aw(e,o,i,n):qt("Intersect scene must be mark node or group item.")}function Ew(e,t,i,n){if(function(e,t,i){return e.bounds&&t.intersects(e.bounds)&&("group"===e.marktype||!1!==e.interactive&&(!i||i(e)))}(e,t,i)){const o=e.items,r=e.marktype,s=o.length;let a=0;if("group"===r)for(;a=0;n--)if(o[n]!=r[n])return!1;for(n=o.length-1;n>=0;n--)if(!Rw(e[i=o[n]],t[i],i))return!1;return typeof e==typeof t}(e,t):e==t)}function Ow(e,t){return Rw(m_(e),m_(t))}function Fw(){iv(),s_=0}const Pw="top",Bw="left",zw="right",Ww="bottom",Vw="start",Hw="middle",$w="end",Uw="group",jw="axis",qw="title",Kw="legend",Gw="row-header",Yw="row-footer",Zw="row-title",Xw="column-header",Qw="column-footer",Jw="column-title",eC="none",tC="all",iC="each",nC="flush",oC="column",rC="row";function sC(e){oc.call(this,null,e)}function aC(e,t,i){return t(e.bounds.clear(),e,i)}Xi(sC,oc,{transform(e,t){const i=t.dataflow,n=e.mark,o=n.marktype,r=Jb[o],s=r.bound;let a,l=n.bounds;if(r.nested)n.items.length&&i.dirty(n.items[0]),l=aC(n,s),n.items.forEach((e=>{e.bounds.clear().union(l)}));else if(o===Uw||e.modified())switch(t.visit(t.MOD,(e=>i.dirty(e))),l.clear(),n.items.forEach((e=>l.union(aC(e,s)))),n.role){case jw:case Kw:case qw:t.reflow()}else a=t.changed(t.REM),t.visit(t.ADD,(e=>{l.union(aC(e,s))})),t.visit(t.MOD,(e=>{a=a||l.alignsWith(e.bounds),i.dirty(e),l.union(aC(e,s))})),a&&(l.clear(),n.items.forEach((e=>l.union(e.bounds))));return Tw(n),t.modifies("bounds")}});const lC=":vega_identifier:";function cC(e){oc.call(this,0,e)}function uC(e){oc.call(this,null,e)}function hC(e){oc.call(this,null,e)}cC.Definition={type:"Identifier",metadata:{modifies:!0},params:[{name:"as",type:"string",required:!0}]},Xi(cC,oc,{transform(e,t){const i=(o=t.dataflow)._signals[lC]||(o._signals[lC]=o.add(0)),n=e.as;var o;let r=i.value;return t.visit(t.ADD,(e=>e[n]=e[n]||++r)),i.set(this.value=r),t}}),Xi(uC,oc,{transform(e,t){let i=this.value;i||(i=t.dataflow.scenegraph().mark(e.markdef,function(e){const t=e.groups,i=e.parent;return t&&1===t.size?t.get(Object.keys(t.object)[0]):t&&i?t.lookup(i):null}(e),e.index),i.group.context=e.context,e.context.group||(e.context.group=i.group),i.source=this.source,i.clip=e.clip,i.interactive=e.interactive,this.value=i);const n=i.marktype===Uw?sv:rv;return t.visit(t.ADD,(e=>n.call(e,i))),(e.modified("clip")||e.modified("interactive"))&&(i.clip=e.clip,i.interactive=!!e.interactive,i.zdirty=!0,t.reflow()),i.items=t.source,t}});const dC={parity:e=>e.filter(((e,t)=>t%2?e.opacity=0:1)),greedy:(e,t)=>{let i;return e.filter(((e,n)=>n&&gC(i.bounds,e.bounds,t)?e.opacity=0:(i=e,1)))}},gC=(e,t,i)=>i>Math.max(t.x1-e.x2,e.x1-t.x2,t.y1-e.y2,e.y1-t.y2),fC=(e,t)=>{for(var i,n=1,o=e.length,r=e[0].bounds;n{const t=e.bounds;return t.width()>1&&t.height()>1},mC=e=>(e.forEach((e=>e.opacity=1)),e),_C=(e,t)=>e.reflow(t.modified()).modifies("opacity");function vC(e){oc.call(this,null,e)}Xi(hC,oc,{transform(e,t){const i=dC[e.method]||dC.parity,n=e.separation||0;let o,r,s=t.materialize(t.SOURCE).source;if(!s||!s.length)return;if(!e.method)return e.modified("method")&&(mC(s),t=_C(t,e)),t;if(s=s.filter(pC),!s.length)return;if(e.sort&&(s=s.slice().sort(e.sort)),o=mC(s),t=_C(t,e),o.length>=3&&fC(o,n)){do{o=i(o,n)}while(o.length>=3&&fC(o,n));o.length<3&&!fi(s).opacity&&(o.length>1&&(fi(o).opacity=0),fi(s).opacity=1)}e.boundScale&&e.boundTolerance>=0&&(r=((e,t,i)=>{var n=e.range(),o=new ov;return t===Pw||t===Ww?o.set(n[0],-1/0,n[1],1/0):o.set(-1/0,n[0],1/0,n[1]),o.expand(i||1),e=>o.encloses(e.bounds)})(e.boundScale,e.boundOrient,+e.boundTolerance),s.forEach((e=>{r(e)||(e.opacity=0)})));const a=o[0].mark.bounds.clear();return s.forEach((e=>{e.opacity&&a.union(e.bounds)})),t}}),Xi(vC,oc,{transform(e,t){const i=t.dataflow;if(t.visit(t.ALL,(e=>i.dirty(e))),t.fields&&t.fields.zindex){const e=t.source&&t.source[0];e&&(e.mark.zdirty=!0)}}});const bC=new ov;function yC(e,t,i){return e[t]===i?0:(e[t]=i,1)}function wC(e){var t=e.items[0].orient;return t===Bw||t===zw}function CC(e,t,i,n){var o,r,s=t.items[0],a=s.datum,l=null!=s.translate?s.translate:.5,c=s.orient,u=function(e){let t=+e.grid;return[e.ticks?t++:-1,e.labels?t++:-1,t+ +e.domain]}(a),h=s.range,d=s.offset,g=s.position,f=s.minExtent,p=s.maxExtent,m=a.title&&s.items[u[2]].items[0],_=s.titlePadding,v=s.bounds,b=m&&Ub(m),y=0,w=0;switch(bC.clear().union(v),v.clear(),(o=u[0])>-1&&v.union(s.items[o].bounds),(o=u[1])>-1&&v.union(s.items[o].bounds),c){case Pw:y=g||0,w=-d,r=Math.max(f,Math.min(p,-v.y1)),v.add(0,-r).add(h,0),m&&SC(e,m,r,_,b,0,-1,v);break;case Bw:y=-d,w=g||0,r=Math.max(f,Math.min(p,-v.x1)),v.add(-r,0).add(0,h),m&&SC(e,m,r,_,b,1,-1,v);break;case zw:y=i+d,w=g||0,r=Math.max(f,Math.min(p,v.x2)),v.add(0,0).add(r,h),m&&SC(e,m,r,_,b,1,1,v);break;case Ww:y=g||0,w=n+d,r=Math.max(f,Math.min(p,v.y2)),v.add(0,0).add(h,r),m&&SC(e,m,r,_,0,0,1,v);break;default:y=s.x,w=s.y}return uv(v.translate(y,w),s),yC(s,"x",y+l)|yC(s,"y",w+l)&&(s.bounds=bC,e.dirty(s),s.bounds=v,e.dirty(s)),s.mark.bounds.clear().union(v)}function SC(e,t,i,n,o,r,s,a){const l=t.bounds;if(t.auto){const a=s*(i+o+n);let c=0,u=0;e.dirty(t),r?c=(t.x||0)-(t.x=a):u=(t.y||0)-(t.y=a),t.mark.bounds.clear().union(l.translate(-c,-u)),e.dirty(t)}a.union(l)}const xC=(e,t)=>Math.floor(Math.min(e,t)),kC=(e,t)=>Math.ceil(Math.max(e,t));function DC(e){return(new ov).set(0,0,e.width||0,e.height||0)}function LC(e){const t=e.bounds.clone();return t.empty()?t.set(0,0,0,0):t.translate(-(e.x||0),-(e.y||0))}function NC(e,t,i){const n=ci(e)?e[t]:e;return null!=n?n:void 0!==i?i:0}function EC(e){return e<0?Math.ceil(-e):0}function AC(e,t,i){var n,o,r,s,a,l,c,u,h,d,g,f=!i.nodirty,p=i.bounds===nC?DC:LC,m=bC.set(0,0,0,0),_=NC(i.align,oC),v=NC(i.align,rC),b=NC(i.padding,oC),y=NC(i.padding,rC),w=i.columns||t.length,C=w<=0?1:Math.ceil(t.length/w),S=t.length,x=Array(S),k=Array(w),D=0,L=Array(S),N=Array(C),E=0,A=Array(S),M=Array(S),I=Array(S);for(o=0;o1)for(o=0;o0&&(A[o]+=h/2);if(v&&NC(i.center,rC)&&1!==w)for(o=0;o0&&(M[o]+=d/2);for(o=0;oo&&(e.warn("Grid headers exceed limit: "+o),t=t.slice(0,o)),x+=r,p=0,_=t.length;p<_;++p)e.dirty(t[p]),t[p].mark.bounds.clear();for(f=u,p=0,_=t.length;p<_;++p,f+=h){for(v=(b=t[p]).mark.bounds,m=f;m>=0&&null==(y=i[m]);m-=d);a?(w=null==g?y.x:Math.round(y.bounds.x1+g*y.bounds.width()),C=x):(w=x,C=null==g?y.y:Math.round(y.bounds.y1+g*y.bounds.height())),v.union(b.bounds.translate(w-(b.x||0),C-(b.y||0))),b.x=w,b.y=C,e.dirty(b),k=s(k,v[c])}return k}function RC(e,t,i,n,o,r){if(t){e.dirty(t);var s=i,a=i;n?s=Math.round(o.x1+r*o.width()):a=Math.round(o.y1+r*o.height()),t.bounds.translate(s-(t.x||0),a-(t.y||0)),t.mark.bounds.clear().union(t.bounds),t.x=s,t.y=a,e.dirty(t)}}function OC(e,t,i,n,o,r,s){const a=function(e,t){const i=e[t]||{};return(t,n)=>null!=i[t]?i[t]:null!=e[t]?e[t]:n}(i,t),l=function(e,t){let i=-1/0;return e.forEach((e=>{null!=e.offset&&(i=Math.max(i,e.offset))})),i>-1/0?i:t}(e,a("offset",0)),c=a("anchor",Vw),u=c===$w?1:c===Hw?.5:0,h={align:iC,bounds:a("bounds",nC),columns:"vertical"===a("direction")?1:e.length,padding:a("margin",8),center:a("center"),nodirty:!0};switch(t){case Bw:h.anchor={x:Math.floor(n.x1)-l,column:$w,y:u*(s||n.height()+2*n.y1),row:c};break;case zw:h.anchor={x:Math.ceil(n.x2)+l,y:u*(s||n.height()+2*n.y1),row:c};break;case Pw:h.anchor={y:Math.floor(o.y1)-l,row:$w,x:u*(r||o.width()+2*o.x1),column:c};break;case Ww:h.anchor={y:Math.ceil(o.y2)+l,x:u*(r||o.width()+2*o.x1),column:c};break;case"top-left":h.anchor={x:l,y:l};break;case"top-right":h.anchor={x:r-l,y:l,column:$w};break;case"bottom-left":h.anchor={x:l,y:s-l,row:$w};break;case"bottom-right":h.anchor={x:r-l,y:s-l,column:$w,row:$w}}return h}function FC(e,t){var i,n,o=t.items[0],r=o.datum,s=o.orient,a=o.bounds,l=o.x,c=o.y;return o._bounds?o._bounds.clear().union(a):o._bounds=a.clone(),a.clear(),function(e,t,i){var n=t.padding,o=n-i.x,r=n-i.y;if(t.datum.title){var s=t.items[1].items[0],a=s.anchor,l=t.titlePadding||0,c=n-s.x,u=n-s.y;switch(s.orient){case Bw:o+=Math.ceil(s.bounds.width())+l;break;case zw:case Ww:break;default:r+=s.bounds.height()+l}switch((o||r)&&BC(e,i,o,r),s.orient){case Bw:u+=PC(t,i,s,a,1,1);break;case zw:c+=PC(t,i,s,$w,0,0)+l,u+=PC(t,i,s,a,1,1);break;case Ww:c+=PC(t,i,s,a,0,0),u+=PC(t,i,s,$w,-1,0,1)+l;break;default:c+=PC(t,i,s,a,0,0)}(c||u)&&BC(e,s,c,u),(c=Math.round(s.bounds.x1-n))<0&&(BC(e,i,-c,0),BC(e,s,-c,0))}else(o||r)&&BC(e,i,o,r)}(e,o,o.items[0].items[0]),a=function(e,t){return e.items.forEach((e=>t.union(e.bounds))),t.x1=e.padding,t.y1=e.padding,t}(o,a),i=2*o.padding,n=2*o.padding,a.empty()||(i=Math.ceil(a.width()+i),n=Math.ceil(a.height()+n)),"symbol"===r.type&&function(e){const t=e.reduce(((e,t)=>(e[t.column]=Math.max(t.bounds.x2-t.x,e[t.column]||0),e)),{});e.forEach((e=>{e.width=t[e.column],e.height=e.bounds.y2-e.y}))}(o.items[0].items[0].items[0].items),s!==eC&&(o.x=l=0,o.y=c=0),o.width=i,o.height=n,uv(a.set(l,c,l+i,c+n),o),o.mark.bounds.clear().union(a),o}function PC(e,t,i,n,o,r,s){const a="symbol"!==e.datum.type,l=i.datum.vgrad,c=(!a||!r&&l||s?t:t.items[0]).bounds[o?"y2":"x2"]-e.padding,u=l&&r?c:0,h=l&&r?0:c,d=o<=0?0:Ub(i);return Math.round(n===Vw?u:n===$w?h-d:.5*(c-d))}function BC(e,t,i,n){t.x+=i,t.y+=n,t.bounds.translate(i,n),t.mark.bounds.translate(i,n),e.dirty(t)}function zC(e){oc.call(this,null,e)}function WC(e,t){let i=0;if(void 0===t)for(let t of e)(t=+t)&&(i+=t);else{let n=-1;for(let o of e)(o=+t(o,++n,e))&&(i+=o)}return i}function VC(e){oc.call(this,null,e)}function HC(e){oc.call(this,null,e)}function $C(){return Nl({})}function UC(e){oc.call(this,null,e)}function jC(e){oc.call(this,[],e)}Xi(zC,oc,{transform(e,t){const i=t.dataflow;return e.mark.items.forEach((t=>{e.layout&&function(e,t,i){var n,o,r,s,a,l,c,u=function(e){var t,i,n=e.items,o=n.length,r=0;const s={marks:[],rowheaders:[],rowfooters:[],colheaders:[],colfooters:[],rowtitle:null,coltitle:null};for(;r{(r=e.orient||zw)!==eC&&(t[r]||(t[r]=[])).push(e)}));for(const n in t){const o=t[n];AC(e,o,OC(o,n,i.legends,d,g,c,u))}f.forEach((t=>{const n=t.bounds;if(n.equals(t._bounds)||(t.bounds=t._bounds,e.dirty(t),t.bounds=n,e.dirty(t)),i.autosize&&"fit"===i.autosize.type)switch(t.orient){case Bw:case zw:h.add(n.x1,0).add(n.x2,0);break;case Pw:case Ww:h.add(0,n.y1).add(0,n.y2)}else h.union(n)}))}h.union(d).union(g),n&&h.union(function(e,t,i,n,o){var r,s=t.items[0],a=s.frame,l=s.orient,c=s.anchor,u=s.offset,h=s.padding,d=s.items[0].items[0],g=s.items[1]&&s.items[1].items[0],f=l===Bw||l===zw?n:i,p=0,m=0,_=0,v=0,b=0;if(a!==Uw?l===Bw?(p=o.y2,f=o.y1):l===zw?(p=o.y1,f=o.y2):(p=o.x1,f=o.x2):l===Bw&&(p=n,f=0),r=c===Vw?p:c===$w?f:(p+f)/2,g&&g.text){switch(l){case Pw:case Ww:b=d.bounds.height()+h;break;case Bw:v=d.bounds.width()+h;break;case zw:v=-d.bounds.width()-h}bC.clear().union(g.bounds),bC.translate(v-(g.x||0),b-(g.y||0)),yC(g,"x",v)|yC(g,"y",b)&&(e.dirty(g),g.bounds.clear().union(bC),g.mark.bounds.clear().union(bC),e.dirty(g)),bC.clear().union(g.bounds)}else bC.clear();switch(bC.union(d.bounds),l){case Pw:m=r,_=o.y1-bC.height()-u;break;case Bw:m=o.x1-bC.width()-u,_=r;break;case zw:m=o.x2+bC.width()+u,_=r;break;case Ww:m=r,_=o.y2+u;break;default:m=s.x,_=s.y}return yC(s,"x",m)|yC(s,"y",_)&&(bC.translate(m,_),e.dirty(s),s.bounds.clear().union(bC),t.bounds.clear().union(bC),e.dirty(s)),s.bounds}(e,n,c,u,h)),t.clip&&h.set(0,0,t.width||0,t.height||0),function(e,t,i,n){const o=n.autosize||{},r=o.type;if(e._autosize<1||!r)return;let s=e._width,a=e._height,l=Math.max(0,t.width||0),c=Math.max(0,Math.ceil(-i.x1)),u=Math.max(0,t.height||0),h=Math.max(0,Math.ceil(-i.y1));const d=Math.max(0,Math.ceil(i.x2-l)),g=Math.max(0,Math.ceil(i.y2-u));if("padding"===o.contains){const t=e.padding();s-=t.left+t.right,a-=t.top+t.bottom}r===eC?(c=0,h=0,l=s,u=a):"fit"===r?(l=Math.max(0,s-c-d),u=Math.max(0,a-h-g)):"fit-x"===r?(l=Math.max(0,s-c-d),a=u+h+g):"fit-y"===r?(s=l+c+d,u=Math.max(0,a-h-g)):"pad"===r&&(s=l+c+d,a=u+h+g),e._resizeView(s,a,l,u,[c,h],o.resize)}(e,t,h,i)}(i,t,e)})),function(e){return e&&"legend-entry"!==e.mark.role}(e.mark.group)?t.reflow():t}}),Xi(VC,oc,{transform(e,t){if(this.value&&!e.modified())return t.StopPropagation;var i=t.dataflow.locale(),n=t.fork(t.NO_SOURCE|t.NO_FIELDS),o=this.value,r=e.scale,s=jm(r,null==e.count?e.values?e.values.length:10:e.count,e.minstep),a=e.format||Gm(i,r,s,e.formatSpecifier,e.formatType,!!e.values),l=e.values?qm(r,e.values,s):Km(r,s);return o&&(n.rem=o),o=l.map(((e,t)=>Nl({index:t/(l.length-1||1),value:e,label:a(e)}))),e.extra&&o.length&&o.push(Nl({index:-1,extra:{value:o[0].value},label:""})),n.source=o,n.add=o,this.value=o,n}}),Xi(HC,oc,{transform(e,t){var i=t.dataflow,n=t.fork(t.NO_SOURCE|t.NO_FIELDS),o=e.item||$C,r=e.key||Dl,s=this.value;return li(n.encode)&&(n.encode=null),s&&(e.modified("key")||t.modified(r))&&qt("DataJoin does not support modified key function or fields."),s||(t=t.addAll(),this.value=s=function(e){const t=Yi().test((e=>e.exit));return t.lookup=i=>t.get(e(i)),t}(r)),t.visit(t.ADD,(e=>{const t=r(e);let i=s.get(t);i?i.exit?(s.empty--,n.add.push(i)):n.mod.push(i):(i=o(e),s.set(t,i),n.add.push(i)),i.datum=e,i.exit=!1})),t.visit(t.MOD,(e=>{const t=r(e),i=s.get(t);i&&(i.datum=e,n.mod.push(i))})),t.visit(t.REM,(e=>{const t=r(e),i=s.get(t);e!==i.datum||i.exit||(n.rem.push(i),i.exit=!0,++s.empty)})),t.changed(t.ADD_MOD)&&n.modifies("datum"),(t.clean()||e.clean&&s.empty>i.cleanThreshold)&&i.runAfter(s.clean),n}}),Xi(UC,oc,{transform(e,t){var i=t.fork(t.ADD_REM),n=e.mod||!1,o=e.encoders,r=t.encode;if(li(r)){if(!i.changed()&&!r.every((e=>o[e])))return t.StopPropagation;r=r[0],i.encode=null}var s="enter"===r,a=o.update||ei,l=o.enter||ei,c=o.exit||ei,u=(r&&!s?o[r]:a)||ei;if(t.changed(t.ADD)&&(t.visit(t.ADD,(t=>{l(t,e),a(t,e)})),i.modifies(l.output),i.modifies(a.output),u!==ei&&u!==a&&(t.visit(t.ADD,(t=>{u(t,e)})),i.modifies(u.output))),t.changed(t.REM)&&c!==ei&&(t.visit(t.REM,(t=>{c(t,e)})),i.modifies(c.output)),s||u!==ei){const o=t.MOD|(e.modified()?t.REFLOW:0);s?(t.visit(o,(t=>{const o=l(t,e)||n;(u(t,e)||o)&&i.mod.push(t)})),i.mod.length&&i.modifies(l.output)):t.visit(o,(t=>{(u(t,e)||n)&&i.mod.push(t)})),i.mod.length&&i.modifies(u.output)}return i.changed()?i:t.StopPropagation}}),Xi(jC,oc,{transform(e,t){if(null!=this.value&&!e.modified())return t.StopPropagation;var i,n,o,r,s,a=t.dataflow.locale(),l=t.fork(t.NO_SOURCE|t.NO_FIELDS),c=this.value,u=e.type||Vm,h=e.scale,d=+e.limit,g=jm(h,null==e.count?5:e.count,e.minstep),f=!!e.values||u===Vm,p=e.format||Jm(a,h,g,u,e.formatSpecifier,e.formatType,f),m=e.values||Qm(h,g);return c&&(l.rem=c),u===Vm?(d&&m.length>d?(t.dataflow.warn("Symbol legend count exceeds limit, filtering items."),c=m.slice(0,d-1),s=!0):c=m,Oi(o=e.size)?(e.values||0!==h(c[0])||(c=c.slice(1)),r=c.reduce(((t,i)=>Math.max(t,o(i,e))),0)):o=Vi(r=o||8),c=c.map(((t,i)=>Nl({index:i,label:p(t,i,c),value:t,offset:r,size:o(t,e)}))),s&&(s=m[c.length],c.push(Nl({index:c.length,label:"…".concat(m.length-c.length," entries"),value:s,offset:r,size:o(s,e)})))):"gradient"===u?(i=h.domain(),n=Om(h,i[0],fi(i)),m.length<3&&!e.values&&i[0]!==fi(i)&&(m=[i[0],fi(i)]),c=m.map(((e,t)=>Nl({index:t,label:p(e,t,m),value:e,perc:n(e)})))):(o=m.length-1,n=function(e){const t=e.domain(),i=t.length-1;let n=+t[0],o=+fi(t),r=o-n;if(e.type===rm){const e=i?r/i:.1;n-=e,o+=e,r=o-n}return e=>(e-n)/r}(h),c=m.map(((e,t)=>Nl({index:t,label:p(e,t,m),value:e,perc:t?n(e):0,perc2:t===o?1:n(m[t+1])})))),l.source=c,l.add=c,this.value=c,l}});const qC=e=>e.source.x,KC=e=>e.source.y,GC=e=>e.target.x,YC=e=>e.target.y;function ZC(e){oc.call(this,{},e)}ZC.Definition={type:"LinkPath",metadata:{modifies:!0},params:[{name:"sourceX",type:"field",default:"source.x"},{name:"sourceY",type:"field",default:"source.y"},{name:"targetX",type:"field",default:"target.x"},{name:"targetY",type:"field",default:"target.y"},{name:"orient",type:"enum",default:"vertical",values:["horizontal","vertical","radial"]},{name:"shape",type:"enum",default:"line",values:["line","arc","curve","diagonal","orthogonal"]},{name:"require",type:"signal"},{name:"as",type:"string",default:"path"}]},Xi(ZC,oc,{transform(e,t){var i=e.sourceX||qC,n=e.sourceY||KC,o=e.targetX||GC,r=e.targetY||YC,s=e.as||"path",a=e.orient||"vertical",l=e.shape||"line",c=eS.get(l+"-"+a)||eS.get(l);return c||qt("LinkPath unsupported type: "+e.shape+(e.orient?"-"+e.orient:"")),t.visit(t.SOURCE,(e=>{e[s]=c(i(e),n(e),o(e),r(e))})),t.reflow(e.modified()).modifies(s)}});const XC=(e,t,i,n)=>"M"+e+","+t+"L"+i+","+n,QC=(e,t,i,n)=>{var o=i-e,r=n-t,s=Math.sqrt(o*o+r*r)/2;return"M"+e+","+t+"A"+s+","+s+" "+180*Math.atan2(r,o)/Math.PI+" 0 1 "+i+","+n},JC=(e,t,i,n)=>{const o=i-e,r=n-t,s=.2*(o+r),a=.2*(r-o);return"M"+e+","+t+"C"+(e+s)+","+(t+a)+" "+(i+a)+","+(n-s)+" "+i+","+n},eS=Yi({line:XC,"line-radial":(e,t,i,n)=>XC(t*Math.cos(e),t*Math.sin(e),n*Math.cos(i),n*Math.sin(i)),arc:QC,"arc-radial":(e,t,i,n)=>QC(t*Math.cos(e),t*Math.sin(e),n*Math.cos(i),n*Math.sin(i)),curve:JC,"curve-radial":(e,t,i,n)=>JC(t*Math.cos(e),t*Math.sin(e),n*Math.cos(i),n*Math.sin(i)),"orthogonal-horizontal":(e,t,i,n)=>"M"+e+","+t+"V"+n+"H"+i,"orthogonal-vertical":(e,t,i,n)=>"M"+e+","+t+"H"+i+"V"+n,"orthogonal-radial":(e,t,i,n)=>{const o=Math.cos(e),r=Math.sin(e),s=Math.cos(i),a=Math.sin(i);return"M"+t*o+","+t*r+"A"+t+","+t+" 0 0,"+((Math.abs(i-e)>Math.PI?i<=e:i>e)?1:0)+" "+t*s+","+t*a+"L"+n*s+","+n*a},"diagonal-horizontal":(e,t,i,n)=>{const o=(e+i)/2;return"M"+e+","+t+"C"+o+","+t+" "+o+","+n+" "+i+","+n},"diagonal-vertical":(e,t,i,n)=>{const o=(t+n)/2;return"M"+e+","+t+"C"+e+","+o+" "+i+","+o+" "+i+","+n},"diagonal-radial":(e,t,i,n)=>{const o=Math.cos(e),r=Math.sin(e),s=Math.cos(i),a=Math.sin(i),l=(t+n)/2;return"M"+t*o+","+t*r+"C"+l*o+","+l*r+" "+l*s+","+l*a+" "+n*s+","+n*a}});function tS(e){oc.call(this,null,e)}function iS(e){return km(e)&&e!==tm}tS.Definition={type:"Pie",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"startAngle",type:"number",default:0},{name:"endAngle",type:"number",default:6.283185307179586},{name:"sort",type:"boolean",default:!1},{name:"as",type:"string",array:!0,length:2,default:["startAngle","endAngle"]}]},Xi(tS,oc,{transform(e,t){var i,n,o,r=e.as||["startAngle","endAngle"],s=r[0],a=r[1],l=e.field||Qt,c=e.startAngle||0,u=null!=e.endAngle?e.endAngle:2*Math.PI,h=t.source,d=h.map(l),g=d.length,f=c,p=(u-c)/WC(d),m=uu(g);for(e.sort&&m.sort(((e,t)=>d[e]-d[t])),i=0;ie+(t<0?-1:t>0?1:0)),0))!==t.length&&i.warn("Log scale domain includes zero: "+gn(t)),t}function sS(e,t,i){return Oi(e)&&(t||i)?Im(e,aS(t||[0,1],i)):e}function aS(e,t){return t?e.slice().reverse():e}function lS(e){oc.call(this,null,e)}Xi(oS,oc,{transform(e,t){var i=t.dataflow,n=this.value,o=function(e){var t,i=e.type,n="";return i===tm?"sequential-linear":(function(e){const t=e.type;return km(t)&&t!==Jp&&t!==em&&(e.scheme||e.range&&e.range.length&&e.range.every(rn))}(e)&&(n=2===(t=e.rawDomain?e.rawDomain.length:e.domain?e.domain.length+ +(null!=e.domainMid):0)?"sequential-":3===t?"diverging-":""),(n+i||Gp).toLowerCase())}(e);for(o in n&&o===n.type||(this.value=n=Cm(o)()),e)if(!nS[o]){if("padding"===o&&iS(n.type))continue;Oi(n[o])?n[o](e[o]):i.warn("Unsupported scale property: "+o)}return function(e,t,i){var n=e.type,o=t.round||!1,r=t.range;if(null!=t.rangeStep)r=function(e,t,i){e!==lm&&e!==am&&qt("Only band and point scales support rangeStep.");var n=(null!=t.paddingOuter?t.paddingOuter:t.padding)||0,o=e===am?1:(null!=t.paddingInner?t.paddingInner:t.padding)||0;return[0,t.rangeStep*Kp(i,o,n)]}(n,t,i);else if(t.scheme&&(r=function(e,t,i){var n,o=t.schemeExtent;return li(t.scheme)?n=Tm(t.scheme,t.interpolate,t.interpolateGamma):(n=Wm(t.scheme.toLowerCase()))||qt("Unrecognized scheme name: ".concat(t.scheme)),i=e===rm?i+1:e===cm?i-1:e===nm||e===om?+t.schemeCount||5:i,Em(e)?sS(n,o,t.reverse):Oi(n)?Rm(sS(n,o),i):e===sm?n:n.slice(0,i)}(n,t,i),Oi(r))){if(e.interpolator)return e.interpolator(r);qt("Scale type ".concat(n," does not support interpolating color schemes."))}if(r&&Em(n))return e.interpolator(Tm(aS(r,t.reverse),t.interpolate,t.interpolateGamma));r&&t.interpolate&&e.interpolate?e.interpolate(Fm(t.interpolate,t.interpolateGamma)):Oi(e.round)?e.round(o):Oi(e.rangeRound)&&e.interpolate(o?lf:af),r&&e.range(aS(r,t.reverse))}(n,e,function(e,t,i){let n=t.bins;if(n&&!li(n)){const t=e.domain(),i=t[0],o=fi(t),r=n.step;let s=null==n.start?i:n.start,a=null==n.stop?o:n.stop;r||qt("Scale bins parameter missing step property."),so&&(a=r*Math.floor(o/r)),n=uu(s,a+r/2,r)}return n?e.bins=n:e.bins&&delete e.bins,e.type===cm&&(n?t.domain||t.domainRaw||(e.domain(n),i=n.length):e.bins=e.domain()),i}(n,e,function(e,t,i){const n=function(e,t,i){return t?(e.domain(rS(e.type,t,i)),t.length):-1}(e,t.domainRaw,i);if(n>-1)return n;var o,r,s=t.domain,a=e.type,l=t.zero||void 0===t.zero&&function(e){const t=e.type;return!e.bins&&(t===Gp||t===Zp||t===Xp)}(e);if(!s)return 0;if(iS(a)&&t.padding&&s[0]!==fi(s)&&(s=function(e,t,i,n,o,r){var s=Math.abs(fi(i)-i[0]),a=s/(s-2*n),l=e===Yp?Ni(t,null,a):e===Xp?Ei(t,null,a,.5):e===Zp?Ei(t,null,a,o||1):e===Qp?Ai(t,null,a,r||1):Li(t,null,a);return(t=t.slice())[0]=l[0],t[t.length-1]=l[1],t}(a,s,t.range,t.padding,t.exponent,t.constant)),(l||null!=t.domainMin||null!=t.domainMax||null!=t.domainMid)&&(o=(s=s.slice()).length-1||1,l&&(s[0]>0&&(s[0]=0),s[o]<0&&(s[o]=0)),null!=t.domainMin&&(s[0]=t.domainMin),null!=t.domainMax&&(s[o]=t.domainMax),null!=t.domainMid)){const e=(r=t.domainMid)>s[o]?o+1:re(l);if(null==t)g.push(e.slice());else for(o={},r=0,s=e.length;rd&&(d=h),i&&u.sort(i)}return g.max=d,g}(t.source,e.groupby,c,u),n=0,o=i.length,r=i.max;ne;function vS(e,t){e&&yS.hasOwnProperty(e.type)&&yS[e.type](e,t)}var bS={Feature:function(e,t){vS(e.geometry,t)},FeatureCollection:function(e,t){for(var i=e.features,n=-1,o=i.length;++n0){for(r=e[--o];o>0&&(t=r,i=e[--o],r=t+i,n=i-(r-t),!n););o>0&&(n<0&&e[o-1]<0||n>0&&e[o-1]>0)&&(i=2*n,t=r+i,i==t-r&&(r=t))}return r}}var kS=1e-6,DS=1e-12,LS=Math.PI,NS=LS/2,ES=LS/4,AS=2*LS,MS=180/LS,IS=LS/180,TS=Math.abs,RS=Math.atan,OS=Math.atan2,FS=Math.cos,PS=Math.ceil,BS=Math.exp,zS=(Math.floor,Math.hypot),WS=Math.log,VS=Math.pow,HS=Math.sin,$S=Math.sign||function(e){return e>0?1:e<0?-1:0},US=Math.sqrt,jS=Math.tan;function qS(e){return e>1?0:e<-1?LS:Math.acos(e)}function KS(e){return e>1?NS:e<-1?-NS:Math.asin(e)}function GS(){}var YS,ZS,XS,QS,JS=new xS,ex=new xS,tx={point:GS,lineStart:GS,lineEnd:GS,polygonStart:function(){tx.lineStart=ix,tx.lineEnd=rx},polygonEnd:function(){tx.lineStart=tx.lineEnd=tx.point=GS,JS.add(TS(ex)),ex=new xS},result:function(){var e=JS/2;return JS=new xS,e}};function ix(){tx.point=nx}function nx(e,t){tx.point=ox,YS=XS=e,ZS=QS=t}function ox(e,t){ex.add(QS*e-XS*t),XS=e,QS=t}function rx(){ox(YS,ZS)}const sx=tx;var ax=1/0,lx=ax,cx=-ax,ux=cx;const hx={point:function(e,t){ecx&&(cx=e),tux&&(ux=t)},lineStart:GS,lineEnd:GS,polygonStart:GS,polygonEnd:GS,result:function(){var e=[[ax,lx],[cx,ux]];return cx=ux=-(lx=ax=1/0),e}};var dx,gx,fx,px,mx=0,_x=0,vx=0,bx=0,yx=0,wx=0,Cx=0,Sx=0,xx=0,kx={point:Dx,lineStart:Lx,lineEnd:Ax,polygonStart:function(){kx.lineStart=Mx,kx.lineEnd=Ix},polygonEnd:function(){kx.point=Dx,kx.lineStart=Lx,kx.lineEnd=Ax},result:function(){var e=xx?[Cx/xx,Sx/xx]:wx?[bx/wx,yx/wx]:vx?[mx/vx,_x/vx]:[NaN,NaN];return mx=_x=vx=bx=yx=wx=Cx=Sx=xx=0,e}};function Dx(e,t){mx+=e,_x+=t,++vx}function Lx(){kx.point=Nx}function Nx(e,t){kx.point=Ex,Dx(fx=e,px=t)}function Ex(e,t){var i=e-fx,n=t-px,o=US(i*i+n*n);bx+=o*(fx+e)/2,yx+=o*(px+t)/2,wx+=o,Dx(fx=e,px=t)}function Ax(){kx.point=Dx}function Mx(){kx.point=Tx}function Ix(){Rx(dx,gx)}function Tx(e,t){kx.point=Rx,Dx(dx=fx=e,gx=px=t)}function Rx(e,t){var i=e-fx,n=t-px,o=US(i*i+n*n);bx+=o*(fx+e)/2,yx+=o*(px+t)/2,wx+=o,Cx+=(o=px*e-fx*t)*(fx+e),Sx+=o*(px+t),xx+=3*o,Dx(fx=e,px=t)}const Ox=kx;function Fx(e){this._context=e}Fx.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,AS)}},result:GS};var Px,Bx,zx,Wx,Vx,Hx=new xS,$x={point:GS,lineStart:function(){$x.point=Ux},lineEnd:function(){Px&&jx(Bx,zx),$x.point=GS},polygonStart:function(){Px=!0},polygonEnd:function(){Px=null},result:function(){var e=+Hx;return Hx=new xS,e}};function Ux(e,t){$x.point=jx,Bx=Wx=e,zx=Vx=t}function jx(e,t){Wx-=e,Vx-=t,Hx.add(US(Wx*Wx+Vx*Vx)),Wx=e,Vx=t}const qx=$x;function Kx(){this._string=[]}function Gx(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function Yx(e,t){var i,n,o=4.5;function r(e){return e&&("function"==typeof o&&n.pointRadius(+o.apply(this,arguments)),SS(e,i(n))),n.result()}return r.area=function(e){return SS(e,i(sx)),sx.result()},r.measure=function(e){return SS(e,i(qx)),qx.result()},r.bounds=function(e){return SS(e,i(hx)),hx.result()},r.centroid=function(e){return SS(e,i(Ox)),Ox.result()},r.projection=function(t){return arguments.length?(i=null==t?(e=null,_S):(e=t).stream,r):e},r.context=function(e){return arguments.length?(n=null==e?(t=null,new Kx):new Fx(t=e),"function"!=typeof o&&n.pointRadius(o),r):t},r.pointRadius=function(e){return arguments.length?(o="function"==typeof e?e:(n.pointRadius(+e),+e),r):o},r.projection(e).context(t)}function Zx(){var e,t=[];return{point:function(t,i,n){e.push([t,i,n])},lineStart:function(){t.push(e=[])},lineEnd:GS,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var i=t;return t=[],e=null,i}}}function Xx(e,t){return TS(e[0]-t[0])=0;--r)o.point((u=c[r])[0],u[1]);else n(d.x,d.p.x,-1,o);d=d.p}c=(d=d.o).z,g=!g}while(!d.v);o.lineEnd()}}}function ek(e){if(t=e.length){for(var t,i,n=0,o=e[0];++n=0?1:-1,D=k*x,L=D>LS,N=m*C;if(l.add(OS(N*k*HS(D),_*S+N*FS(D))),s+=L?x+k*AS:x,L^f>=i^y>=i){var E=ok(ik(g),ik(b));ak(E);var A=ok(r,E);ak(A);var M=(L^x>=0?-1:1)*KS(A[2]);(n>M||n===M&&(E[0]||E[1]))&&(a+=L^x>=0?1:-1)}}return(s<-1e-6||s0){for(h||(o.polygonStart(),h=!0),o.lineStart(),e=0;e1&&2&l&&d.push(d.pop().concat(d.shift())),s.push(d.filter(hk))}return d}}function hk(e){return e.length>1}function dk(e,t){return((e=e.x)[0]<0?e[1]-NS-kS:NS-e[1])-((t=t.x)[0]<0?t[1]-NS-kS:NS-t[1])}Kx.prototype={_radius:4.5,_circle:Gx(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._string.push("M",e,",",t),this._point=1;break;case 1:this._string.push("L",e,",",t);break;default:null==this._circle&&(this._circle=Gx(this._radius)),this._string.push("M",e,",",t,this._circle)}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}return null}};const gk=uk((function(){return!0}),(function(e){var t,i=NaN,n=NaN,o=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(r,s){var a=r>0?LS:-LS,l=TS(r-i);TS(l-LS)0?NS:-NS),e.point(o,n),e.lineEnd(),e.lineStart(),e.point(a,n),e.point(r,n),t=0):o!==a&&l>=LS&&(TS(i-o)kS?RS((HS(t)*(r=FS(n))*HS(i)-HS(n)*(o=FS(t))*HS(e))/(o*r*s)):(t+n)/2}(i,n,r,s),e.point(o,n),e.lineEnd(),e.lineStart(),e.point(a,n),t=0),e.point(i=r,n=s),o=a},lineEnd:function(){e.lineEnd(),i=n=NaN},clean:function(){return 2-t}}}),(function(e,t,i,n){var o;if(null==e)o=i*NS,n.point(-LS,o),n.point(0,o),n.point(LS,o),n.point(LS,0),n.point(LS,-o),n.point(0,-o),n.point(-LS,-o),n.point(-LS,0),n.point(-LS,o);else if(TS(e[0]-t[0])>kS){var r=e[0]0,o=TS(t)>kS;function r(e,i){return FS(e)*FS(i)>t}function s(e,i,n){var o=[1,0,0],r=ok(ik(e),ik(i)),s=nk(r,r),a=r[0],l=s-a*a;if(!l)return!n&&e;var c=t*s/l,u=-t*a/l,h=ok(o,r),d=sk(o,c);rk(d,sk(r,u));var g=h,f=nk(d,g),p=nk(g,g),m=f*f-p*(nk(d,d)-1);if(!(m<0)){var _=US(m),v=sk(g,(-f-_)/p);if(rk(v,d),v=tk(v),!n)return v;var b,y=e[0],w=i[0],C=e[1],S=i[1];w0^v[1]<(TS(v[0]-y)LS^(y<=v[0]&&v[0]<=w)){var D=sk(g,(-f+_)/p);return rk(D,d),[v,tk(D)]}}}function a(t,i){var o=n?e:LS-e,r=0;return t<-o?r|=1:t>o&&(r|=2),i<-o?r|=4:i>o&&(r|=8),r}return uk(r,(function(e){var t,i,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(h,d){var g,f=[h,d],p=r(h,d),m=n?p?0:a(h,d):p?a(h+(h<0?LS:-LS),d):0;if(!t&&(c=l=p)&&e.lineStart(),p!==l&&(!(g=s(t,f))||Xx(t,g)||Xx(f,g))&&(f[2]=1),p!==l)u=0,p?(e.lineStart(),g=s(f,t),e.point(g[0],g[1])):(g=s(t,f),e.point(g[0],g[1],2),e.lineEnd()),t=g;else if(o&&t&&n^p){var _;m&i||!(_=s(f,t,!0))||(u=0,n?(e.lineStart(),e.point(_[0][0],_[0][1]),e.point(_[1][0],_[1][1]),e.lineEnd()):(e.point(_[1][0],_[1][1]),e.lineEnd(),e.lineStart(),e.point(_[0][0],_[0][1],3)))}!p||t&&Xx(t,f)||e.point(f[0],f[1]),t=f,l=p,i=m},lineEnd:function(){l&&e.lineEnd(),t=null},clean:function(){return u|(c&&l)<<1}}}),(function(t,n,o,r){!function(e,t,i,n,o,r){if(i){var s=FS(t),a=HS(t),l=n*i;null==o?(o=t+n*AS,r=t-l/2):(o=fk(s,o),r=fk(s,r),(n>0?or)&&(o+=n*AS));for(var c,u=o;n>0?u>r:u0)do{c.point(0===u||3===u?e:i,u>1?n:t)}while((u=(u+a+4)%4)!==h);else c.point(r[0],r[1])}function s(n,o){return TS(n[0]-e)0?0:3:TS(n[0]-i)0?2:1:TS(n[1]-t)0?1:0:o>0?3:2}function a(e,t){return l(e.x,t.x)}function l(e,t){var i=s(e,1),n=s(t,1);return i!==n?i-n:0===i?t[1]-e[1]:1===i?e[0]-t[0]:2===i?e[1]-t[1]:t[0]-e[0]}return function(s){var l,c,u,h,d,g,f,p,m,_,v,b=s,y=Zx(),w={point:C,lineStart:function(){w.point=S,c&&c.push(u=[]),_=!0,m=!1,f=p=NaN},lineEnd:function(){l&&(S(h,d),g&&m&&y.rejoin(),l.push(y.result())),w.point=C,m&&b.lineEnd()},polygonStart:function(){b=y,l=[],c=[],v=!0},polygonEnd:function(){var t=function(){for(var t=0,i=0,o=c.length;in&&(d-r)*(n-s)>(g-s)*(e-r)&&++t:g<=n&&(d-r)*(n-s)<(g-s)*(e-r)&&--t;return t}(),i=v&&t,o=(l=ck(l)).length;(i||o)&&(s.polygonStart(),i&&(s.lineStart(),r(null,null,1,s),s.lineEnd()),o&&Jx(l,a,t,r,s),s.polygonEnd()),b=s,l=c=u=null}};function C(e,t){o(e,t)&&b.point(e,t)}function S(r,s){var a=o(r,s);if(c&&u.push([r,s]),_)h=r,d=s,g=a,_=!1,a&&(b.lineStart(),b.point(r,s));else if(a&&m)b.point(r,s);else{var l=[f=Math.max(_k,Math.min(mk,f)),p=Math.max(_k,Math.min(mk,p))],y=[r=Math.max(_k,Math.min(mk,r)),s=Math.max(_k,Math.min(mk,s))];!function(e,t,i,n,o,r){var s,a=e[0],l=e[1],c=0,u=1,h=t[0]-a,d=t[1]-l;if(s=i-a,h||!(s>0)){if(s/=h,h<0){if(s0){if(s>u)return;s>c&&(c=s)}if(s=o-a,h||!(s<0)){if(s/=h,h<0){if(s>u)return;s>c&&(c=s)}else if(h>0){if(s0)){if(s/=d,d<0){if(s0){if(s>u)return;s>c&&(c=s)}if(s=r-l,d||!(s<0)){if(s/=d,d<0){if(s>u)return;s>c&&(c=s)}else if(d>0){if(s0&&(e[0]=a+c*h,e[1]=l+c*d),u<1&&(t[0]=a+u*h,t[1]=l+u*d),!0}}}}}(l,y,e,t,i,n)?a&&(b.lineStart(),b.point(r,s),v=!1):(m||(b.lineStart(),b.point(l[0],l[1])),b.point(y[0],y[1]),a||b.lineEnd(),v=!1)}f=r,p=s,m=a}return w}}function bk(e,t){function i(i,n){return i=e(i,n),t(i[0],i[1])}return e.invert&&t.invert&&(i.invert=function(i,n){return(i=t.invert(i,n))&&e.invert(i[0],i[1])}),i}function yk(e,t){return[TS(e)>LS?e+Math.round(-e/AS)*AS:e,t]}function wk(e,t,i){return(e%=AS)?t||i?bk(Sk(e),xk(t,i)):Sk(e):t||i?xk(t,i):yk}function Ck(e){return function(t,i){return[(t+=e)>LS?t-AS:t<-LS?t+AS:t,i]}}function Sk(e){var t=Ck(e);return t.invert=Ck(-e),t}function xk(e,t){var i=FS(e),n=HS(e),o=FS(t),r=HS(t);function s(e,t){var s=FS(t),a=FS(e)*s,l=HS(e)*s,c=HS(t),u=c*i+a*n;return[OS(l*o-u*r,a*i-c*n),KS(u*o+l*r)]}return s.invert=function(e,t){var s=FS(t),a=FS(e)*s,l=HS(e)*s,c=HS(t),u=c*o-l*r;return[OS(l*o+c*r,a*i+u*n),KS(u*i-a*n)]},s}function kk(e){return function(t){var i=new Dk;for(var n in e)i[n]=e[n];return i.stream=t,i}}function Dk(){}function Lk(e,t,i){var n=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=n&&e.clipExtent(null),SS(i,e.stream(hx)),t(hx.result()),null!=n&&e.clipExtent(n),e}function Nk(e,t,i){return Lk(e,(function(i){var n=t[1][0]-t[0][0],o=t[1][1]-t[0][1],r=Math.min(n/(i[1][0]-i[0][0]),o/(i[1][1]-i[0][1])),s=+t[0][0]+(n-r*(i[1][0]+i[0][0]))/2,a=+t[0][1]+(o-r*(i[1][1]+i[0][1]))/2;e.scale(150*r).translate([s,a])}),i)}function Ek(e,t,i){return Nk(e,[[0,0],t],i)}function Ak(e,t,i){return Lk(e,(function(i){var n=+t,o=n/(i[1][0]-i[0][0]),r=(n-o*(i[1][0]+i[0][0]))/2,s=-o*i[0][1];e.scale(150*o).translate([r,s])}),i)}function Mk(e,t,i){return Lk(e,(function(i){var n=+t,o=n/(i[1][1]-i[0][1]),r=-o*i[0][0],s=(n-o*(i[1][1]+i[0][1]))/2;e.scale(150*o).translate([r,s])}),i)}yk.invert=yk,Dk.prototype={constructor:Dk,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Ik=FS(30*IS);function Tk(e,t){return+t?function(e,t){function i(n,o,r,s,a,l,c,u,h,d,g,f,p,m){var _=c-n,v=u-o,b=_*_+v*v;if(b>4*t&&p--){var y=s+d,w=a+g,C=l+f,S=US(y*y+w*w+C*C),x=KS(C/=S),k=TS(TS(C)-1)t||TS((_*E+v*A)/b-.5)>.3||s*d+a*g+l*f2?e[2]%360*IS:0,E()):[m*MS,_*MS,v*MS]},L.angle=function(e){return arguments.length?(b=e%360*IS,E()):b*MS},L.reflectX=function(e){return arguments.length?(y=e?-1:1,E()):y<0},L.reflectY=function(e){return arguments.length?(w=e?-1:1,E()):w<0},L.precision=function(e){return arguments.length?(s=Tk(a,D=e*e),A()):US(D)},L.fitExtent=function(e,t){return Nk(L,e,t)},L.fitSize=function(e,t){return Ek(L,e,t)},L.fitWidth=function(e,t){return Ak(L,e,t)},L.fitHeight=function(e,t){return Mk(L,e,t)},function(){return t=e.apply(this,arguments),L.invert=t.invert&&N,E()}}function Bk(e){var t=0,i=LS/3,n=Pk(e),o=n(t,i);return o.parallels=function(e){return arguments.length?n(t=e[0]*IS,i=e[1]*IS):[t*MS,i*MS]},o}function zk(e,t){var i=HS(e),n=(i+HS(t))/2;if(TS(n)2?e[2]*IS:0),t.invert=function(t){return(t=e.invert(t[0]*IS,t[1]*IS))[0]*=MS,t[1]*=MS,t},t}(o.rotate()).invert([0,0]));return l(null==c?[[a[0]-r,a[1]-r],[a[0]+r,a[1]+r]]:e===qk?[[Math.max(a[0]-r,c),t],[Math.min(a[0]+r,i),n]]:[[c,Math.max(a[1]-r,t)],[i,Math.min(a[1]+r,n)]])}return o.scale=function(e){return arguments.length?(s(e),u()):s()},o.translate=function(e){return arguments.length?(a(e),u()):a()},o.center=function(e){return arguments.length?(r(e),u()):r()},o.clipExtent=function(e){return arguments.length?(null==e?c=t=i=n=null:(c=+e[0][0],t=+e[0][1],i=+e[1][0],n=+e[1][1]),u()):null==c?null:[[c,t],[i,n]]},u()}function Gk(e){return jS((NS+e)/2)}function Yk(e,t){var i=FS(e),n=e===t?HS(e):WS(i/FS(t))/WS(Gk(t)/Gk(e)),o=i*VS(Gk(e),n)/n;if(!n)return qk;function r(e,t){o>0?t<-NS+kS&&(t=-NS+kS):t>NS-kS&&(t=NS-kS);var i=o/VS(Gk(t),n);return[i*HS(n*e),o-i*FS(n*e)]}return r.invert=function(e,t){var i=o-t,r=$S(n)*US(e*e+i*i),s=OS(e,TS(i))*$S(i);return i*n<0&&(s-=LS*$S(e)*$S(i)),[s/n,2*RS(VS(o/r,1/n))-NS]},r}function Zk(e,t){return[e,t]}function Xk(e,t){var i=FS(e),n=e===t?HS(e):(i-FS(t))/(t-e),o=i/n+e;if(TS(n)kS&&--o>0);return[e/(.8707+(r=n*n)*(r*(r*r*r*(.003971-.001529*r)-.013791)-.131979)),n]},sD.invert=$k(KS),aD.invert=$k((function(e){return 2*RS(e)})),lD.invert=function(e,t){return[-t,2*RS(BS(e))-NS]};var cD=Math.abs,uD=(Math.atan,Math.atan2,Math.ceil,Math.cos),hD=(Math.exp,Math.floor,Math.log,Math.max,Math.min,Math.pow,Math.round,Math.sign,Math.sin),dD=(Math.tan,Math.PI),gD=dD/2,fD=(Math.SQRT1_2,mD(2));function pD(e){return e>1?gD:e<-1?-gD:Math.asin(e)}function mD(e){return e>0?Math.sqrt(e):0}function _D(e,t){var i,n=e*hD(t),o=30;do{t-=i=(t+hD(t)-n)/(1+uD(t))}while(cD(i)>1e-6&&--o>0);return t/2}mD(dD);var vD=function(e,t,i){function n(n,o){return[e*n*uD(o=_D(i,o)),t*hD(o)]}return n.invert=function(n,o){return o=pD(o/t),[n/(e*uD(o)),pD((2*o+hD(2*o))/i)]},n}(fD/gD,fD,dD);const bD=Yx(),yD=["clipAngle","clipExtent","scale","translate","center","rotate","parallels","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];function wD(e,t){return function i(){const n=t();return n.type=e,n.path=Yx().projection(n),n.copy=n.copy||function(){const e=i();return yD.forEach((t=>{n[t]&&e[t](n[t]())})),e.path.pointRadius(n.path.pointRadius()),e},n}}function CD(e,t){if(!e||"string"!=typeof e)throw new Error("Projection type must be a name string.");return e=e.toLowerCase(),arguments.length>1?(xD[e]=wD(e,t),this):xD[e]||null}function SD(e){return e&&e.path||bD}const xD={albers:Vk,albersusa:function(){var e,t,i,n,o,r,s=Vk(),a=Wk().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=Wk().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(e,t){r=[e,t]}};function u(e){var t=e[0],s=e[1];return r=null,i.point(t,s),r||(n.point(t,s),r)||(o.point(t,s),r)}function h(){return e=t=null,u}return u.invert=function(e){var t=s.scale(),i=s.translate(),n=(e[0]-i[0])/t,o=(e[1]-i[1])/t;return(o>=.12&&o<.234&&n>=-.425&&n<-.214?a:o>=.166&&o<.234&&n>=-.214&&n<-.115?l:s).invert(e)},u.stream=function(i){return e&&t===i?e:e=function(e){var t=e.length;return{point:function(i,n){for(var o=-1;++o2?e[2]+90:90]):[(e=i())[0],e[1],e[2]-90]},i([0,0,90]).scale(159.155)}};for(const e in xD)CD(e,xD[e]);function kD(e,t,i){var n=uu(e,t-kS,i).concat(t);return function(e){return n.map((function(t){return[e,t]}))}}function DD(e,t,i){var n=uu(e,t-kS,i).concat(t);return function(e){return n.map((function(t){return[t,e]}))}}function LD(){}const ND=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function ED(){var e=1,t=1,i=s;function n(e,t){return t.map((t=>o(e,t)))}function o(n,o){var s=[],a=[];return function(i,n,o){var s,a,l,c,u,h,d=new Array,g=new Array;for(s=a=-1,c=i[0]>=n,ND[c<<1].forEach(f);++s=n,ND[l|c<<1].forEach(f);for(ND[c<<0].forEach(f);++a=n,u=i[a*e]>=n,ND[c<<1|u<<2].forEach(f);++s=n,h=u,u=i[a*e+s+1]>=n,ND[l|c<<1|u<<2|h<<3].forEach(f);ND[c|u<<3].forEach(f)}for(s=-1,u=i[a*e]>=n,ND[u<<2].forEach(f);++s=n,ND[u<<2|h<<3].forEach(f);function f(e){var t,i,n=[e[0][0]+s,e[0][1]+a],l=[e[1][0]+s,e[1][1]+a],c=r(n),u=r(l);(t=g[c])?(i=d[u])?(delete g[t.end],delete d[i.start],t===i?(t.ring.push(l),o(t.ring)):d[t.start]=g[i.end]={start:t.start,end:i.end,ring:t.ring.concat(i.ring)}):(delete g[t.end],t.ring.push(l),g[t.end=u]=t):(t=d[u])?(i=g[c])?(delete d[t.start],delete g[i.end],t===i?(t.ring.push(l),o(t.ring)):d[i.start]=g[t.end]={start:i.start,end:t.end,ring:i.ring.concat(t.ring)}):(delete d[t.start],t.ring.unshift(n),d[t.start=c]=t):d[c]=g[u]={start:c,end:u,ring:[n,l]}}ND[u<<3].forEach(f)}(n,o,(e=>{i(e,n,o),function(e){for(var t=0,i=e.length,n=e[i-1][1]*e[0][0]-e[i-1][0]*e[0][1];++t0?s.push([e]):a.push(e)})),a.forEach((e=>{for(var t,i=0,n=s.length;i{var r,s=i[0],a=i[1],l=0|s,c=0|a,u=n[c*e+l];s>0&&s0&&a=0&&r>=0||qt("invalid size"),e=o,t=r,n},n.smooth=function(e){return arguments.length?(i=e?s:LD,n):i===s},n}function AD(e,t){for(var i,n=-1,o=t.length;++nn!=g>n&&i<(d-c)*(n-u)/(g-u)+c&&(o=-o)}return o}function ID(e,t,i){var n;return function(e,t,i){return(t[0]-e[0])*(i[1]-e[1])==(i[0]-e[0])*(t[1]-e[1])}(e,t,i)&&function(e,t,i){return e<=t&&t<=i||i<=t&&t<=e}(e[n=+(e[0]===t[0])],i[n],t[n])}function TD(e,t,i){return function(n){var o=Ui(n),r=i?Math.min(o[0],0):o[0],s=o[1],a=s-r,l=t?uo(r,s,e):a/(e+1);return uu(r+l,s,l)}}function RD(e){oc.call(this,null,e)}function OD(e,t,i,n,o){const r=e.x1||0,s=e.y1||0,a=t*i<0;function l(e){e.forEach(c)}function c(e){a&&e.reverse(),e.forEach(u)}function u(e){e[0]=(e[0]-r)*t+n,e[1]=(e[1]-s)*i+o}return function(e){return e.coordinates.forEach(l),e}}function FD(e,t,i){const n=e>=0?e:bc(t,i);return Math.round((Math.sqrt(4*n*n+1)-1)/2)}function PD(e){return Oi(e)?e:Vi(+e)}function BD(){var e=e=>e[0],t=e=>e[1],i=Qt,n=[-1,-1],o=960,r=500,s=2;function a(a,l){const c=FD(n[0],a,e)>>s,u=FD(n[1],a,t)>>s,h=c?c+2:0,d=u?u+2:0,g=2*h+(o>>s),f=2*d+(r>>s),p=new Float32Array(g*f),m=new Float32Array(g*f);let _=p;a.forEach((n=>{const o=h+(+e(n)>>s),r=d+(+t(n)>>s);o>=0&&o=0&&r0&&u>0?(zD(g,f,p,m,c),WD(g,f,m,p,u),zD(g,f,p,m,c),WD(g,f,m,p,u),zD(g,f,p,m,c),WD(g,f,m,p,u)):c>0?(zD(g,f,p,m,c),zD(g,f,m,p,c),zD(g,f,p,m,c),_=m):u>0&&(WD(g,f,p,m,u),WD(g,f,m,p,u),WD(g,f,p,m,u),_=m);const v=l?Math.pow(2,-2*s):1/WC(_);for(let e=0,t=g*f;e>s),y2:d+(r>>s)}}return a.x=function(t){return arguments.length?(e=PD(t),a):e},a.y=function(e){return arguments.length?(t=PD(e),a):t},a.weight=function(e){return arguments.length?(i=PD(e),a):i},a.size=function(e){if(!arguments.length)return[o,r];var t=+e[0],i=+e[1];return t>=0&&i>=0||qt("invalid size"),o=t,r=i,a},a.cellSize=function(e){return arguments.length?((e=+e)>=1||qt("invalid cell size"),s=Math.floor(Math.log(e)/Math.LN2),a):1<=o&&(t>=r&&(a-=i[t-r+s*e]),n[t-o+s*e]=a/Math.min(t+1,e-1+r-t,r))}function WD(e,t,i,n,o){const r=1+(o<<1);for(let s=0;s=o&&(a>=r&&(l-=i[s+(a-r)*e]),n[s+(a-o)*e]=l/Math.min(a+1,t-1+r-a,r))}function VD(e){oc.call(this,null,e)}RD.Definition={type:"Isocontour",metadata:{generates:!0},params:[{name:"field",type:"field"},{name:"thresholds",type:"number",array:!0},{name:"levels",type:"number"},{name:"nice",type:"boolean",default:!1},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"zero",type:"boolean",default:!0},{name:"smooth",type:"boolean",default:!0},{name:"scale",type:"number",expr:!0},{name:"translate",type:"number",array:!0,expr:!0},{name:"as",type:"string",null:!0,default:"contour"}]},Xi(RD,oc,{transform(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var i=t.fork(t.NO_SOURCE|t.NO_FIELDS),n=t.materialize(t.SOURCE).source,o=e.field||Zt,r=ED().smooth(!1!==e.smooth),s=e.thresholds||function(e,t,i){const n=TD(i.levels||10,i.nice,!1!==i.zero);return"shared"!==i.resolve?n:n(e.map((e=>lc(t(e).values))))}(n,o,e),a=null===e.as?null:e.as||"contour",l=[];return n.forEach((t=>{const i=o(t),n=r.size([i.width,i.height])(i.values,li(s)?s:s(i.values));!function(e,t,i,n){let o=n.scale||t.scale,r=n.translate||t.translate;if(Oi(o)&&(o=o(i,n)),Oi(r)&&(r=r(i,n)),(1===o||null==o)&&!r)return;const s=(nn(o)?o:o[0])||1,a=(nn(o)?o:o[1])||1,l=r&&r[0]||0,c=r&&r[1]||0;e.forEach(OD(t,s,a,l,c))}(n,i,t,e),n.forEach((e=>{l.push(Al(t,Nl(null!=a?{[a]:e}:e)))}))})),this.value&&(i.rem=this.value),this.value=i.source=i.add=l,i}}),VD.Definition={type:"KDE2D",metadata:{generates:!0},params:[{name:"size",type:"number",array:!0,length:2,required:!0},{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"weight",type:"field"},{name:"groupby",type:"field",array:!0},{name:"cellSize",type:"number"},{name:"bandwidth",type:"number",array:!0,length:2},{name:"counts",type:"boolean",default:!1},{name:"as",type:"string",default:"grid"}]};const HD=["x","y","weight","size","cellSize","bandwidth"];function $D(e,t){return HD.forEach((i=>null!=t[i]?e[i](t[i]):0)),e}function UD(e){oc.call(this,null,e)}Xi(VD,oc,{transform(e,t){if(this.value&&!t.changed()&&!e.modified())return t.StopPropagation;var i,n=t.fork(t.NO_SOURCE|t.NO_FIELDS),o=function(e,t){var i,n,o,r,s,a,l=[],c=e=>e(r);if(null==t)l.push(e);else for(i={},n=0,o=e.length;nNl(function(e,t){for(let i=0;ikS})).map(l)).concat(uu(PS(r/g)*g,o,g).filter((function(e){return TS(e%p)>kS})).map(c))}return _.lines=function(){return v().map((function(e){return{type:"LineString",coordinates:e}}))},_.outline=function(){return{type:"Polygon",coordinates:[u(n).concat(h(s).slice(1),u(i).reverse().slice(1),h(a).reverse().slice(1))]}},_.extent=function(e){return arguments.length?_.extentMajor(e).extentMinor(e):_.extentMinor()},_.extentMajor=function(e){return arguments.length?(n=+e[0][0],i=+e[1][0],a=+e[0][1],s=+e[1][1],n>i&&(e=n,n=i,i=e),a>s&&(e=a,a=s,s=e),_.precision(m)):[[n,a],[i,s]]},_.extentMinor=function(i){return arguments.length?(t=+i[0][0],e=+i[1][0],r=+i[0][1],o=+i[1][1],t>e&&(i=t,t=e,e=i),r>o&&(i=r,r=o,o=i),_.precision(m)):[[t,r],[e,o]]},_.step=function(e){return arguments.length?_.stepMajor(e).stepMinor(e):_.stepMinor()},_.stepMajor=function(e){return arguments.length?(f=+e[0],p=+e[1],_):[f,p]},_.stepMinor=function(e){return arguments.length?(d=+e[0],g=+e[1],_):[d,g]},_.precision=function(d){return arguments.length?(m=+d,l=kD(r,o,90),c=DD(t,e,m),u=kD(a,s,90),h=DD(n,i,m),_):m},_.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}()}function QD(e){oc.call(this,null,e)}function JD(e){if(!Oi(e))return!1;const t=vn(Ht(e));return t.$x||t.$y||t.$value||t.$max}function eL(e){oc.call(this,null,e),this.modified(!0)}function tL(e,t,i){Oi(e[t])&&e[t](i)}function iL(e,t,i,n){if(isNaN(t)||isNaN(i))return e;var o,r,s,a,l,c,u,h,d,g=e._root,f={data:n},p=e._x0,m=e._y0,_=e._x1,v=e._y1;if(!g)return e._root=f,e;for(;g.length;)if((c=t>=(r=(p+_)/2))?p=r:_=r,(u=i>=(s=(m+v)/2))?m=s:v=s,o=g,!(g=g[h=u<<1|c]))return o[h]=f,e;if(a=+e._x.call(null,g.data),l=+e._y.call(null,g.data),t===a&&i===l)return f.next=g,o?o[h]=f:e._root=f,e;do{o=o?o[h]=new Array(4):e._root=new Array(4),(c=t>=(r=(p+_)/2))?p=r:_=r,(u=i>=(s=(m+v)/2))?m=s:v=s}while((h=u<<1|c)==(d=(l>=s)<<1|a>=r));return o[d]=g,o[h]=f,e}function nL(e,t,i,n,o){this.node=e,this.x0=t,this.y0=i,this.x1=n,this.y1=o}function oL(e){return e[0]}function rL(e){return e[1]}function sL(e,t,i){var n=new aL(null==t?oL:t,null==i?rL:i,NaN,NaN,NaN,NaN);return null==e?n:n.addAll(e)}function aL(e,t,i,n,o,r){this._x=e,this._y=t,this._x0=i,this._y0=n,this._x1=o,this._y1=r,this._root=void 0}function lL(e){for(var t={data:e.data},i=t;e=e.next;)i=i.next={data:e.data};return t}KD.Definition={type:"GeoJSON",metadata:{},params:[{name:"fields",type:"field",array:!0,length:2},{name:"geojson",type:"field"}]},Xi(KD,oc,{transform(e,t){var i,n=this._features,o=this._points,r=e.fields,s=r&&r[0],a=r&&r[1],l=e.geojson||!r&&Zt,c=t.ADD;i=e.modified()||t.changed(t.REM)||t.modified(Ht(l))||s&&t.modified(Ht(s))||a&&t.modified(Ht(a)),this.value&&!i||(c=t.SOURCE,this._features=n=[],this._points=o=[]),l&&t.visit(c,(e=>n.push(l(e)))),s&&a&&(t.visit(c,(e=>{var t=s(e),i=a(e);null!=t&&null!=i&&(t=+t)===t&&(i=+i)===i&&o.push([t,i])})),n=n.concat({type:jD,geometry:{type:"MultiPoint",coordinates:o}})),this.value={type:qD,features:n}}}),GD.Definition={type:"GeoPath",metadata:{modifies:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"path"}]},Xi(GD,oc,{transform(e,t){var i=t.fork(t.ALL),n=this.value,o=e.field||Zt,r=e.as||"path",s=i.SOURCE;!n||e.modified()?(this.value=n=SD(e.projection),i.materialize().reflow()):s=o===Zt||t.modified(o.fields)?i.ADD_MOD:i.ADD;const a=function(e,t){const i=e.pointRadius();return e.context(null),null!=t&&e.pointRadius(t),i}(n,e.pointRadius);return i.visit(s,(e=>e[r]=n(o(e)))),n.pointRadius(a),i.modifies(r)}}),YD.Definition={type:"GeoPoint",metadata:{modifies:!0},params:[{name:"projection",type:"projection",required:!0},{name:"fields",type:"field",array:!0,required:!0,length:2},{name:"as",type:"string",array:!0,length:2,default:["x","y"]}]},Xi(YD,oc,{transform(e,t){var i,n=e.projection,o=e.fields[0],r=e.fields[1],s=e.as||["x","y"],a=s[0],l=s[1];function c(e){const t=n([o(e),r(e)]);t?(e[a]=t[0],e[l]=t[1]):(e[a]=void 0,e[l]=void 0)}return e.modified()?t=t.materialize().reflow(!0).visit(t.SOURCE,c):(i=t.modified(o.fields)||t.modified(r.fields),t.visit(i?t.ADD_MOD:t.ADD,c)),t.modifies(s)}}),ZD.Definition={type:"GeoShape",metadata:{modifies:!0,nomod:!0},params:[{name:"projection",type:"projection"},{name:"field",type:"field",default:"datum"},{name:"pointRadius",type:"number",expr:!0},{name:"as",type:"string",default:"shape"}]},Xi(ZD,oc,{transform(e,t){var i=t.fork(t.ALL),n=this.value,o=e.as||"shape",r=i.ADD;return n&&!e.modified()||(this.value=n=function(e,t,i){const n=null==i?i=>e(t(i)):n=>{var o=e.pointRadius(),r=e.pointRadius(i)(t(n));return e.pointRadius(o),r};return n.context=t=>(e.context(t),n),n}(SD(e.projection),e.field||Gt("datum"),e.pointRadius),i.materialize().reflow(),r=i.SOURCE),i.visit(r,(e=>e[o]=n)),i.modifies(o)}}),XD.Definition={type:"Graticule",metadata:{changes:!0,generates:!0},params:[{name:"extent",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMajor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"extentMinor",type:"array",array:!0,length:2,content:{type:"number",array:!0,length:2}},{name:"step",type:"number",array:!0,length:2},{name:"stepMajor",type:"number",array:!0,length:2,default:[90,360]},{name:"stepMinor",type:"number",array:!0,length:2,default:[10,10]},{name:"precision",type:"number",default:2.5}]},Xi(XD,oc,{transform(e,t){var i,n=this.value,o=this.generator;if(!n.length||e.modified())for(const t in e)Oi(o[t])&&o[t](e[t]);return i=o(),n.length?t.mod.push(Ml(n[0],i)):t.add.push(Nl(i)),n[0]=i,t}}),QD.Definition={type:"heatmap",metadata:{modifies:!0},params:[{name:"field",type:"field"},{name:"color",type:"string",expr:!0},{name:"opacity",type:"number",expr:!0},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"as",type:"string",default:"image"}]},Xi(QD,oc,{transform(e,t){if(!t.changed()&&!e.modified())return t.StopPropagation;var i=t.materialize(t.SOURCE).source,n="shared"===e.resolve,o=e.field||Zt,r=function(e,t){let i;return Oi(e)?(i=i=>e(i,t),i.dep=JD(e)):e?i=Vi(e):(i=e=>e.$value/e.$max||0,i.dep=!0),i}(e.opacity,e),s=function(e,t){let i;return Oi(e)?(i=i=>Eg(e(i,t)),i.dep=JD(e)):i=Vi(Eg(e||"#888")),i}(e.color,e),a=e.as||"image",l={$x:0,$y:0,$value:0,$max:n?lc(i.map((e=>lc(o(e).values)))):0};return i.forEach((e=>{const t=o(e),i=$i({},e,l);n||(i.$max=lc(t.values||[])),e[a]=function(e,t,i,n){const o=e.width,r=e.height,s=e.x1||0,a=e.y1||0,l=e.x2||o,c=e.y2||r,u=e.values,h=u?e=>u[e]:Xt,d=Zd(l-s,c-a),g=d.getContext("2d"),f=g.getImageData(0,0,l-s,c-a),p=f.data;for(let e=a,r=0;e{null!=e[t]&&tL(i,t,e[t])}))):yD.forEach((t=>{e.modified(t)&&tL(i,t,e[t])})),null!=e.pointRadius&&i.path.pointRadius(e.pointRadius),e.fit&&function(e,t){const i=function(e){return 1===(e=Ti(e)).length?e[0]:{type:qD,features:e.reduce(((e,t)=>e.concat(function(e){return e.type===qD?e.features:Ti(e).filter((e=>null!=e)).map((e=>e.type===jD?e:{type:jD,geometry:e}))}(t))),[])}}(t.fit);t.extent?e.fitExtent(t.extent,i):t.size&&e.fitSize(t.size,i)}(i,e),t.fork(t.NO_SOURCE|t.NO_FIELDS)}});var cL=sL.prototype=aL.prototype;function uL(e){return function(){return e}}function hL(e){return 1e-6*(e()-.5)}function dL(e){return e.x+e.vx}function gL(e){return e.y+e.vy}cL.copy=function(){var e,t,i=new aL(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return i;if(!n.length)return i._root=lL(n),i;for(e=[{source:n,target:i._root=new Array(4)}];n=e.pop();)for(var o=0;o<4;++o)(t=n.source[o])&&(t.length?e.push({source:t,target:n.target[o]=new Array(4)}):n.target[o]=lL(t));return i},cL.add=function(e){const t=+this._x.call(null,e),i=+this._y.call(null,e);return iL(this.cover(t,i),t,i,e)},cL.addAll=function(e){var t,i,n,o,r=e.length,s=new Array(r),a=new Array(r),l=1/0,c=1/0,u=-1/0,h=-1/0;for(i=0;iu&&(u=n),oh&&(h=o));if(l>u||c>h)return this;for(this.cover(l,c).cover(u,h),i=0;ie||e>=o||n>t||t>=r;)switch(a=(td||(r=l.y0)>g||(s=l.x1)=_)<<1|e>=m)&&(l=f[f.length-1],f[f.length-1]=f[f.length-1-c],f[f.length-1-c]=l)}else{var v=e-+this._x.call(null,p.data),b=t-+this._y.call(null,p.data),y=v*v+b*b;if(y=(a=(f+m)/2))?f=a:m=a,(u=s>=(l=(p+_)/2))?p=l:_=l,t=g,!(g=g[h=u<<1|c]))return this;if(!g.length)break;(t[h+1&3]||t[h+2&3]||t[h+3&3])&&(i=t,d=h)}for(;g.data!==e;)if(n=g,!(g=g.next))return this;return(o=g.next)&&delete g.next,n?(o?n.next=o:delete n.next,this):t?(o?t[h]=o:delete t[h],(g=t[0]||t[1]||t[2]||t[3])&&g===(t[3]||t[2]||t[1]||t[0])&&!g.length&&(i?i[d]=g:this._root=g),this):(this._root=o,this)},cL.removeAll=function(e){for(var t=0,i=e.length;t{}};function pL(){for(var e,t=0,i=arguments.length,n={};t=0&&(i=e.slice(n+1),e=e.slice(0,n)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:i}}))}function vL(e,t){for(var i,n=0,o=e.length;n0)for(var i,n,o=new Array(i),r=0;r=0&&t._call.call(null,e),t=t._next;--SL}()}finally{SL=0,function(){for(var e,t,i=wL,n=1/0;i;)i._call?(n>i._time&&(n=i._time),e=i,i=i._next):(t=i._next,i._next=null,i=e?e._next=t:wL=t);CL=e,PL(n)}(),LL=0}}function FL(){var e=EL.now(),t=e-DL;t>1e3&&(NL-=t,DL=e)}function PL(e){SL||(xL&&(xL=clearTimeout(xL)),e-LL>24?(e<1/0&&(xL=setTimeout(OL,e-EL.now()-NL)),kL&&(kL=clearInterval(kL))):(kL||(DL=EL.now(),kL=setInterval(FL,1e3)),SL=1,AL(OL)))}TL.prototype=RL.prototype={constructor:TL,restart:function(e,t,i){if("function"!=typeof e)throw new TypeError("callback is not a function");i=(null==i?ML():+i)+(null==t?0:+t),this._next||CL===this||(CL?CL._next=this:wL=this,CL=this),this._call=e,this._time=i,PL()},stop:function(){this._call&&(this._call=null,this._time=1/0,PL())}};const BL=4294967296;function zL(e){return e.x}function WL(e){return e.y}var VL=Math.PI*(3-Math.sqrt(5));function HL(e){return e.index}function $L(e,t){var i=e.get(t);if(!i)throw new Error("node not found: "+t);return i}const UL={center:function(e,t){var i,n=1;function o(){var o,r,s=i.length,a=0,l=0;for(o=0;oc+f||ru+f||sl.index){var p=c-a.x-a.vx,m=u-a.y-a.vy,_=p*p+m*m;_e.r&&(e.r=e[t].r)}function l(){if(t){var n,o,r=t.length;for(i=new Array(r),n=0;n=a)){(e.data!==t||e.next)&&(0===h&&(f+=(h=hL(i))*h),0===d&&(f+=(d=hL(i))*d),f[a(e,t,n),e])));for(s=0,o=new Array(c);st(e,i):t)}function eN(e){var t=0,i=e.children,n=i&&i.length;if(n)for(;--n>=0;)t+=i[n].value;else t=1;e.value=t}function tN(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=nN)):void 0===t&&(t=iN);for(var i,n,o,r,s,a=new sN(e),l=[a];i=l.pop();)if((o=t(i.data))&&(s=(o=Array.from(o)).length))for(i.children=o,r=s-1;r>=0;--r)l.push(n=o[r]=new sN(o[r])),n.parent=i,n.depth=i.depth+1;return a.eachBefore(rN)}function iN(e){return e.children}function nN(e){return Array.isArray(e)?e[1]:null}function oN(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function rN(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function sN(e){this.data=e,this.depth=this.height=0,this.parent=null}function aN(e,t){var i,n;if(uN(t,e))return[t];for(i=0;i0&&i*i>n*n+o*o}function uN(e,t){for(var i=0;i(s*=s)?(n=(c+s-o)/(2*c),r=Math.sqrt(Math.max(0,s/c-n*n)),i.x=e.x-n*a-r*l,i.y=e.y-n*l+r*a):(n=(c+o-s)/(2*c),r=Math.sqrt(Math.max(0,o/c-n*n)),i.x=t.x+n*a-r*l,i.y=t.y+n*l+r*a)):(i.x=t.x+i.r,i.y=t.y)}function pN(e,t){var i=e.r+t.r-1e-6,n=t.x-e.x,o=t.y-e.y;return i>0&&i*i>n*n+o*o}function mN(e){var t=e._,i=e.next._,n=t.r+i.r,o=(t.x*i.r+i.x*t.r)/n,r=(t.y*i.r+i.y*t.r)/n;return o*o+r*r}function _N(e){this._=e,this.next=null,this.previous=null}function vN(e){if(!(o=(e=function(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}(e)).length))return 0;var t,i,n,o,r,s,a,l,c,u,h;if((t=e[0]).x=0,t.y=0,!(o>1))return t.r;if(i=e[1],t.x=-i.r,i.x=t.r,i.y=0,!(o>2))return t.r+i.r;fN(i,t,n=e[2]),t=new _N(t),i=new _N(i),n=new _N(n),t.next=n.previous=i,i.next=t.previous=n,n.next=i.previous=t;e:for(a=3;a(e=(1664525*e+1013904223)%BL)/BL}();function h(){d(),c.call("tick",t),i1?(null==i?a.delete(e):a.set(e,f(i)),t):a.get(e)},find:function(t,i,n){var o,r,s,a,l,c=0,u=e.length;for(null==n?n=1/0:n*=n,c=0;c1?(c.on(e,i),t):c.on(e)}}}(e),n=i.stop,o=i.restart;let r=!1;return i.stopped=()=>r,i.restart=()=>(r=!1,o()),i.stop=()=>(r=!0,n()),ZL(i,t,!0).on("end",(()=>r=!0))}(t.source,e),o.on("tick",(i=t.dataflow,n=this,()=>i.touch(n).run())),e.static||(r=!0,o.tick()),t.modifies("index")),s||r||e.modified(KL)||t.changed()&&e.restart)if(o.alpha(Math.max(o.alpha(),e.alpha||1)).alphaDecay(1-Math.pow(o.alphaMin(),1/a)),e.static)for(o.stop();--a>=0;)o.tick();else if(o.stopped()&&o.restart(),!r)return t.StopPropagation;return this.finish(e,t)},finish(e,t){const i=t.dataflow;for(let e,t=this._argops,a=0,l=t.length;a=0;--n)r.push(i[n]);return this},find:function(e,t){let i=-1;for(const n of this)if(e.call(t,n,++i,this))return n},sum:function(e){return this.eachAfter((function(t){for(var i=+e(t.data)||0,n=t.children,o=n&&n.length;--o>=0;)i+=n[o].value;t.value=i}))},sort:function(e){return this.eachBefore((function(t){t.children&&t.children.sort(e)}))},path:function(e){for(var t=this,i=function(e,t){if(e===t)return e;var i=e.ancestors(),n=t.ancestors(),o=null;for(e=i.pop(),t=n.pop();e===t;)o=e,e=i.pop(),t=n.pop();return o}(t,e),n=[t];t!==i;)t=t.parent,n.push(t);for(var o=n.length;e!==i;)n.splice(o,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore((function(t){t.children||e.push(t)})),e},links:function(){var e=this,t=[];return e.each((function(i){i!==e&&t.push({source:i.parent,target:i})})),t},copy:function(){return tN(this).eachBefore(oN)},[Symbol.iterator]:function*(){var e,t,i,n,o=this,r=[o];do{for(e=r.reverse(),r=[];o=e.pop();)if(yield o,t=o.children)for(i=0,n=t.length;i0)throw new Error("cycle");return r}return i.id=function(t){return arguments.length?(e=yN(t),i):e},i.parentId=function(e){return arguments.length?(t=yN(e),i):t},i}function RN(e,t){return e.parent===t.parent?1:2}function ON(e){var t=e.children;return t?t[0]:e.t}function FN(e){var t=e.children;return t?t[t.length-1]:e.t}function PN(e,t,i){var n=i/(t.i-e.i);t.c-=n,t.s+=i,e.c+=n,t.z+=i,t.m+=i}function BN(e,t,i){return e.a.parent===t.parent?e.a:i}function zN(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function WN(e,t){return e.parent===t.parent?1:2}function VN(e,t){return e+t.x}function HN(e,t){return Math.max(e,t.y)}function $N(e,t,i,n,o){for(var r,s=e.children,a=-1,l=s.length,c=e.value&&(o-i)/e.value;++ad&&(d=a),m=u*u*p,(g=Math.max(d/m,m/h))>f){u-=a;break}f=g}_.push(s={value:u,dice:l1?t:1)},i}(UN),KN=function e(t){function i(e,i,n,o,r){if((s=e._squarify)&&s.ratio===t)for(var s,a,l,c,u,h=-1,d=s.length,g=e.value;++h1?t:1)},i}(UN);function GN(e,t,i){const n={};return e.each((e=>{const o=e.data;i(o)&&(n[t(o)]=e)})),e.lookup=n,e}function YN(e){oc.call(this,null,e)}YN.Definition={type:"Nest",metadata:{treesource:!0,changes:!0},params:[{name:"keys",type:"field",array:!0},{name:"generate",type:"boolean"}]};const ZN=e=>e.values;function XN(){const e=[],t={entries:e=>n(i(e,0),0),key:i=>(e.push(i),t)};function i(t,n){if(n>=e.length)return t;const o=t.length,r=e[n++],s={},a={};let l,c,u,h=-1;for(;++he.length)return t;const o=[];for(const e in t)o.push({key:e,values:n(t[e],i)});return o}return t}function QN(e){oc.call(this,null,e)}Xi(YN,oc,{transform(e,t){t.source||qt("Nest transform requires an upstream data source.");var i=e.generate,n=e.modified(),o=t.clone(),r=this.value;return(!r||n||t.changed())&&(r&&r.each((e=>{e.children&&kl(e.data)&&o.rem.push(e.data)})),this.value=r=tN({values:Ti(e.keys).reduce(((e,t)=>(e.key(t),e)),XN()).entries(o.source)},ZN),i&&r.each((e=>{e.children&&(e=Nl(e.data),o.add.push(e),o.source.push(e))})),GN(r,Dl,Dl)),o.source.root=r,o}});const JN=(e,t)=>e.parent===t.parent?1:2;Xi(QN,oc,{transform(e,t){t.source&&t.source.root||qt(this.constructor.name+" transform requires a backing tree data source.");const i=this.layout(e.method),n=this.fields,o=t.source.root,r=e.as||n;e.field?o.sum(e.field):o.count(),e.sort&&o.sort(Il(e.sort,(e=>e.data))),function(e,t,i){for(let n,o=0,r=t.length;ofunction(e,t,i){const n=e.data,o=t.length-1;for(let r=0;r=0;--o)a.push(i=t.children[o]=new zN(n[o],o)),i.parent=t;return(s.parent=new zN(null,0)).children=[s],s}(o);if(l.eachAfter(r),l.parent.m=-l.z,l.eachBefore(s),n)o.eachBefore(a);else{var c=o,u=o,h=o;o.eachBefore((function(e){e.xu.x&&(u=e),e.depth>h.depth&&(h=e)}));var d=c===u?1:e(c,u)/2,g=d-c.x,f=t/(u.x+d+g),p=i/(h.depth||1);o.eachBefore((function(e){e.x=(e.x+g)*f,e.y=e.depth*p}))}return o}function r(t){var i=t.children,n=t.parent.children,o=t.i?n[t.i-1]:null;if(i){!function(e){for(var t,i=0,n=0,o=e.children,r=o.length;--r>=0;)(t=o[r]).z+=i,t.m+=i,i+=t.s+(n+=t.c)}(t);var r=(i[0].z+i[i.length-1].z)/2;o?(t.z=o.z+e(t._,o._),t.m=t.z-r):t.z=r}else o&&(t.z=o.z+e(t._,o._));t.parent.A=function(t,i,n){if(i){for(var o,r=t,s=t,a=i,l=r.parent.children[0],c=r.m,u=s.m,h=a.m,d=l.m;a=FN(a),r=ON(r),a&&r;)l=ON(l),(s=FN(s)).a=t,(o=a.z+h-r.z-c+e(a._,r._))>0&&(PN(BN(a,t,n),t,o),c+=o,u+=o),h+=a.m,c+=r.m,d+=l.m,u+=s.m;a&&!FN(s)&&(s.t=a,s.m+=h-u),r&&!ON(l)&&(l.t=r,l.m+=c-d,n=t)}return n}(t,o,t.parent.A||n[0])}function s(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function a(e){e.x*=t,e.y=e.depth*i}return o.separation=function(t){return arguments.length?(e=t,o):e},o.size=function(e){return arguments.length?(n=!1,t=+e[0],i=+e[1],o):n?null:[t,i]},o.nodeSize=function(e){return arguments.length?(n=!0,t=+e[0],i=+e[1],o):n?[t,i]:null},o},cluster:function(){var e=WN,t=1,i=1,n=!1;function o(o){var r,s=0;o.eachAfter((function(t){var i=t.children;i?(t.x=function(e){return e.reduce(VN,0)/e.length}(i),t.y=function(e){return 1+e.reduce(HN,0)}(i)):(t.x=r?s+=e(t,r):0,t.y=0,r=t)}));var a=function(e){for(var t;t=e.children;)e=t[0];return e}(o),l=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(o),c=a.x-e(a,l)/2,u=l.x+e(l,a)/2;return o.eachAfter(n?function(e){e.x=(e.x-o.x)*t,e.y=(o.y-e.y)*i}:function(e){e.x=(e.x-c)/(u-c)*t,e.y=(1-(o.y?e.y/o.y:1))*i})}return o.separation=function(t){return arguments.length?(e=t,o):e},o.size=function(e){return arguments.length?(n=!1,t=+e[0],i=+e[1],o):n?null:[t,i]},o.nodeSize=function(e){return arguments.length?(n=!0,t=+e[0],i=+e[1],o):n?[t,i]:null},o}},sE=["x","y","depth","children"];function aE(e){QN.call(this,e)}function lE(e){oc.call(this,[],e)}aE.Definition={type:"Tree",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"tidy",values:["tidy","cluster"]},{name:"size",type:"number",array:!0,length:2},{name:"nodeSize",type:"number",array:!0,length:2},{name:"separation",type:"boolean",default:!0},{name:"as",type:"string",array:!0,length:sE.length,default:sE}]},Xi(aE,QN,{layout(e){const t=e||"tidy";if(Ki(rE,t))return rE[t]();qt("Unrecognized Tree layout method: "+t)},params:["size","nodeSize"],fields:sE}),lE.Definition={type:"TreeLinks",metadata:{tree:!0,generates:!0,changes:!0},params:[]},Xi(lE,oc,{transform(e,t){const i=this.value,n=t.source&&t.source.root,o=t.fork(t.NO_SOURCE),r={};return n||qt("TreeLinks transform requires a tree data source."),t.changed(t.ADD_REM)?(o.rem=i,t.visit(t.SOURCE,(e=>r[Dl(e)]=1)),n.each((e=>{const t=e.data,i=e.parent&&e.parent.data;i&&r[Dl(t)]&&r[Dl(i)]&&o.add.push(Nl({source:i,target:t}))})),this.value=o.add):t.changed(t.MOD)&&(t.visit(t.MOD,(e=>r[Dl(e)]=1)),i.forEach((e=>{(r[Dl(e.source)]||r[Dl(e.target)])&&o.mod.push(e)}))),o}});const cE={binary:function(e,t,i,n,o){var r,s,a=e.children,l=a.length,c=new Array(l+1);for(c[0]=s=r=0;r=i-1){var u=a[t];return u.x0=o,u.y0=r,u.x1=s,void(u.y1=l)}for(var h=c[t],d=n/2+h,g=t+1,f=i-1;g>>1;c[p]l-r){var v=n?(o*_+s*m)/n:s;e(t,g,m,o,r,v,l),e(g,i,_,v,r,s,l)}else{var b=n?(r*_+l*m)/n:l;e(t,g,m,o,r,s,b),e(g,i,_,o,b,s,l)}}(0,l,e.value,t,i,n,o)},dice:NN,slice:$N,slicedice:function(e,t,i,n,o){(1&e.depth?$N:NN)(e,t,i,n,o)},squarify:qN,resquarify:KN},uE=["x0","y0","x1","y1","depth","children"];function hE(e){QN.call(this,e)}function dE(e,t,i,n){const o=e.width,r=e.height,s=i||n,a=Zd(o,r).getContext("2d");t.forEach((e=>gE(a,e,s)));const l=new Uint32Array(a.getImageData(0,0,o,r).data.buffer),c=e.bitmap(),u=s&&e.bitmap();let h,d,g,f,p;for(d=0;d{t.items.forEach((t=>gE(e,t.items,i)))})):Jb[n].draw(e,{items:i?t.map(fE):t})}function fE(e){const t=Al(e,{});return t.stroke&&(t.strokeOpacity=1),t.fill&&(t.fillOpacity=.0625,t.stroke="#000",t.strokeOpacity=1,t.strokeWidth=2),t}hE.Definition={type:"Treemap",metadata:{tree:!0,modifies:!0},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"squarify",values:["squarify","resquarify","binary","dice","slice","slicedice"]},{name:"padding",type:"number",default:0},{name:"paddingInner",type:"number",default:0},{name:"paddingOuter",type:"number",default:0},{name:"paddingTop",type:"number",default:0},{name:"paddingRight",type:"number",default:0},{name:"paddingBottom",type:"number",default:0},{name:"paddingLeft",type:"number",default:0},{name:"ratio",type:"number",default:1.618033988749895},{name:"round",type:"boolean",default:!1},{name:"size",type:"number",array:!0,length:2},{name:"as",type:"string",array:!0,length:uE.length,default:uE}]},Xi(hE,QN,{layout(){const e=function(){var e=qN,t=!1,i=1,n=1,o=[0],r=wN,s=wN,a=wN,l=wN,c=wN;function u(e){return e.x0=e.y0=0,e.x1=i,e.y1=n,e.eachBefore(h),o=[0],t&&e.eachBefore(LN),e}function h(t){var i=o[t.depth],n=t.x0+i,u=t.y0+i,h=t.x1-i,d=t.y1-i;h{const i=e.tile();i.ratio&&e.tile(i.ratio(t))},e.method=t=>{Ki(cE,t)?e.tile(cE[t]):qt("Unrecognized Treemap layout method: "+t)},e},params:["method","ratio","size","round","padding","paddingInner","paddingOuter","paddingTop","paddingRight","paddingBottom","paddingLeft"],fields:uE});const pE=31,mE=new Uint32Array(33),_E=new Uint32Array(33);_E[0]=0,mE[0]=~_E[0];for(let e=1;e<=32;++e)_E[e]=_E[e-1]<<1|1,mE[e]=~_E[e];function vE(e,t,i,n,o,r){let s=i/2;return e-s<0||e+s>o||t-(s=n/2)<0||t+s>r}function bE(e,t,i,n,o,r,s,a){const l=o*r/(2*n),c=e(t-l),u=e(t+l),h=e(i-(r/=2)),d=e(i+r);return s.outOfBounds(c,h,u,d)||s.getRange(c,h,u,d)||a&&a.getRange(c,h,u,d)}const yE=[-1,-1,1,1],wE=[-1,1,-1,1],CE=["right","center","left"],SE=["bottom","middle","top"];function xE(e,t,i,n,o,r,s,a,l,c,u,h){return!(o.outOfBounds(e,i,t,n)||(h&&r?r.getRange(e,i,t,n)||!function(e,t,i,n,o){return o[0]<=e&&i<=o[2]&&o[3]<=t&&n<=o[5]}(s,l,a,c,u):o.getRange(e,i,t,n)))}const kE={"top-left":0,top:1,"top-right":2,left:4,middle:5,right:6,"bottom-left":8,bottom:9,"bottom-right":10},DE={naive:function(e,t,i,n){const o=e.width,r=e.height;return function(e){const t=e.datum.datum.items[n].items,i=t.length,s=e.datum.fontSize,a=Ob.width(e.datum,e.datum.text);let l,c,u,h,d,g,f,p=0;for(let n=0;n=p&&(p=f,e.x=d,e.y=g);return d=a/2,g=s/2,l=e.x-d,c=e.x+d,u=e.y-g,h=e.y+g,e.align="center",l<0&&c<=o?e.align="left":0<=l&&o=1;)d=(g+f)/2,bE(e,u,h,c,l,d,s,a)?f=d:g=d;if(g>n)return[u,h,g,!0]}}return function(t){const a=t.datum.datum.items[n].items,c=a.length,u=t.datum.fontSize,h=Ob.width(t.datum,t.datum.text);let d,g,f,p,m,_,v,b,y,w,C,S,x,k,D,L,N,E=i?u:0,A=!1,M=!1,I=0;for(let n=0;ng&&(N=d,d=g,g=N),f>p&&(N=f,f=p,p=N),y=e(d),C=e(g),w=~~((y+C)/2),S=e(f),k=e(p),x=~~((S+k)/2),v=w;v>=y;--v)for(b=x;b>=S;--b)L=l(v,b,E,h,u),L&&([t.x,t.y,E,A]=L);for(v=w;v<=C;++v)for(b=x;b<=k;++b)L=l(v,b,E,h,u),L&&([t.x,t.y,E,A]=L);A||i||(D=Math.abs(g-d+p-f),m=(d+g)/2,_=(f+p)/2,D>=I&&!vE(m,_,h,u,o,r)&&!bE(e,m,_,u,h,u,s,null)&&(I=D,t.x=m,t.y=_,M=!0))}return!(!A&&!M||(m=h/2,_=u/2,s.setRange(e(t.x-m),e(t.y-_),e(t.x+m),e(t.y+_)),t.align="center",t.baseline="middle",0))}},floodfill:function(e,t,i,n){const o=e.width,r=e.height,s=t[0],a=t[1],l=e.bitmap();return function(t){const c=t.datum.datum.items[n].items,u=c.length,h=t.datum.fontSize,d=Ob.width(t.datum,t.datum.text),g=[];let f,p,m,_,v,b,y,w,C,S,x,k,D=i?h:0,L=!1,N=!1,E=0;for(let n=0;n=1;)x=(C+S)/2,bE(e,v,b,h,d,x,s,a)?S=x:C=x;C>D&&(t.x=v,t.y=b,D=C,L=!0)}}L||i||(k=Math.abs(p-f+_-m),v=(f+p)/2,b=(m+_)/2,k>=E&&!vE(v,b,d,h,o,r)&&!bE(e,v,b,h,d,h,s,null)&&(E=k,t.x=v,t.y=b,N=!0))}return!(!L&&!N||(v=d/2,b=h/2,s.setRange(e(t.x-v),e(t.y-b),e(t.x+v),e(t.y+b)),t.align="center",t.baseline="middle",0))}}};function LE(e,t,i,n,o,r,s,a,l,c,u){if(!e.length)return e;const h=Math.max(n.length,o.length),d=function(e,t){const i=new Float64Array(t),n=e.length;for(let t=0;t[e.x,e.x,e.x,e.y,e.y,e.y];return e?"line"===e||"area"===e?e=>o(e.datum):"line"===t?e=>{const t=e.datum.items[n].items;return o(t.length?t["start"===i?0:t.length-1]:{x:NaN,y:NaN})}:e=>{const t=e.datum.bounds;return[t.x1,(t.x1+t.x2)/2,t.x2,t.y1,(t.y1+t.y2)/2,t.y2]}:o}(f,p,a,l),v=function(e,t,i){const n=Math.max(1,Math.sqrt(e*t/1e6)),o=~~((e+2*i+n)/n),r=~~((t+2*i+n)/n),s=e=>~~((e+i)/n);return s.invert=e=>e*n-i,s.bitmap=()=>function(e,t){const i=new Uint32Array(~~((e*t+32)/32));function n(e,t){i[e]|=t}function o(e,t){i[e]&=t}return{array:i,get:(t,n)=>{const o=n*e+t;return i[o>>>5]&1<<(o&pE)},set:(t,i)=>{const o=i*e+t;n(o>>>5,1<<(o&pE))},clear:(t,i)=>{const n=i*e+t;o(n>>>5,~(1<<(n&pE)))},getRange:(t,n,o,r)=>{let s,a,l,c,u=r;for(;u>=n;--u)if(s=u*e+t,a=u*e+o,l=s>>>5,c=a>>>5,l===c){if(i[l]&mE[s&pE]&_E[1+(a&pE)])return!0}else{if(i[l]&mE[s&pE])return!0;if(i[c]&_E[1+(a&pE)])return!0;for(let e=l+1;e{let s,a,l,c,u;for(;i<=r;++i)if(s=i*e+t,a=i*e+o,l=s>>>5,c=a>>>5,l===c)n(l,mE[s&pE]&_E[1+(a&pE)]);else for(n(l,mE[s&pE]),n(c,_E[1+(a&pE)]),u=l+1;u{let s,a,l,c,u;for(;i<=r;++i)if(s=i*e+t,a=i*e+n,l=s>>>5,c=a>>>5,l===c)o(l,_E[s&pE]|mE[1+(a&pE)]);else for(o(l,_E[s&pE]),o(c,mE[1+(a&pE)]),u=l+1;ui<0||n<0||r>=t||o>=e}}(o,r),s.ratio=n,s.padding=i,s.width=e,s.height=t,s}(t[0],t[1],c),b=m&&"naive"===u;var y;const w=e.map((e=>({datum:e,opacity:0,x:void 0,y:void 0,align:void 0,baseline:void 0,boundary:_(e)})));let C;if(!b){i&&w.sort(((e,t)=>i(e.datum,t.datum)));let t=!1;for(let e=0;ee.datum))].concat(r)),C=r.length?dE(v,r,t,m):function(e,t){const i=e.bitmap();return(t||[]).forEach((t=>i.set(e(t.boundary[0]),e(t.boundary[3])))),[i,void 0]}(v,s&&w)}const S=m?DE[u](v,C,s,l):function(e,t,i,n){const o=e.width,r=e.height,s=t[0],a=t[1],l=n.length;return function(t){const c=t.boundary,u=t.datum.fontSize;if(c[2]<0||c[5]<0||c[0]>o||c[3]>r)return!1;let h,d,g,f,p,m,_,v,b,y,w,C,S,x,k,D=0;for(let o=0;o>>2&3)-1,g=0===h&&0===d||n[o]<0,f=h&&d?Math.SQRT1_2:1,p=n[o]<0?-1:1,m=c[1+h]+n[o]*h*f,w=c[4+d]+p*u*d/2+n[o]*d*f,v=w-u/2,b=w+u/2,C=e(m),x=e(v),k=e(b),!D){if(!xE(C,C,x,k,s,a,m,m,v,b,c,g))continue;D=Ob.width(t.datum,t.datum.text)}if(y=m+p*D*h/2,m=y-D/2,_=y+D/2,C=e(m),S=e(_),xE(C,S,x,k,s,a,m,_,v,b,c,g))return t.x=h?h*p<0?_:m:y,t.y=d?d*p<0?b:v:w,t.align=CE[h*p+1],t.baseline=SE[d*p+1],s.setRange(C,x,S,k),!0}return!1}}(v,C,g,d);return w.forEach((e=>e.opacity=+S(e))),w}const NE=["x","y","opacity","align","baseline"],EE=["top-left","left","bottom-left","top","bottom","top-right","right","bottom-right"];function AE(e){oc.call(this,null,e)}function ME(e,t){var i,n,o,r,s,a,l=[],c=function(e){return e(r)};if(null==t)l.push(e);else for(i={},n=0,o=e.length;n{const t=e.datum;t[n[0]]=e.x,t[n[1]]=e.y,t[n[2]]=e.opacity,t[n[3]]=e.align,t[n[4]]=e.baseline})),t.reflow(i).modifies(n)}}),IE.Definition={type:"Loess",metadata:{generates:!0},params:[{name:"x",type:"field",required:!0},{name:"y",type:"field",required:!0},{name:"groupby",type:"field",array:!0},{name:"bandwidth",type:"number",default:.3},{name:"as",type:"string",array:!0}]},Xi(IE,oc,{transform(e,t){const i=t.fork(t.NO_SOURCE|t.NO_FIELDS);if(!this.value||t.changed()||e.modified()){const n=ME(t.materialize(t.SOURCE).source,e.groupby),o=(e.groupby||[]).map(Vt),r=o.length,s=e.as||[Vt(e.x),Vt(e.y)],a=[];n.forEach((t=>{ou(t,e.x,e.y,e.bandwidth||.3).forEach((e=>{const i={};for(let e=0;e"poly"===e?t:"quad"===e?2:1)(r,s),l=e.as||[Vt(e.x),Vt(e.y)],c=TE[r],u=[];let h=e.extent;Ki(TE,r)||qt("Invalid regression method: "+r),null!=h&&"log"===r&&h[0]<=0&&(t.dataflow.warn("Ignoring extent with values <= 0 for log regression."),h=null),n.forEach((i=>{if(i.length<=a)return void t.dataflow.warn("Skipping regression with more parameters than data points.");const n=c(i,e.x,e.y,s);if(e.params)return void u.push(Nl({keys:i.dims,coef:n.coef,rSquared:n.rSquared}));const d=h||Ui(i,e.x),g=e=>{const t={};for(let e=0;eg([e,n.predict(e)]))):lu(n.predict,d,25,200).forEach(g)})),this.value&&(i.rem=this.value),this.value=i.add=i.source=u}return i}});const OE=Math.pow(2,-52),FE=new Uint32Array(512);class PE{static from(e,t=jE,i=qE){const n=e.length,o=new Float64Array(2*n);for(let r=0;r>1;if(t>0&&"number"!=typeof e[0])throw new Error("Expected coords to contain numbers.");this.coords=e;const i=Math.max(2*t-5,0);this._triangles=new Uint32Array(3*i),this._halfedges=new Int32Array(3*i),this._hashSize=Math.ceil(Math.sqrt(t)),this._hullPrev=new Uint32Array(t),this._hullNext=new Uint32Array(t),this._hullTri=new Uint32Array(t),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(t),this._dists=new Float64Array(t),this.update()}update(){const{coords:e,_hullPrev:t,_hullNext:i,_hullTri:n,_hullHash:o}=this,r=e.length>>1;let s=1/0,a=1/0,l=-1/0,c=-1/0;for(let t=0;tl&&(l=i),n>c&&(c=n),this._ids[t]=t}const u=(s+l)/2,h=(a+c)/2;let d,g,f,p=1/0;for(let t=0;t0&&(g=t,p=i)}let v=e[2*g],b=e[2*g+1],y=1/0;for(let t=0;tn&&(t[i++]=o,n=this._dists[o])}return this.hull=t.subarray(0,i),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(WE(m,_,v,b,w,C)){const e=g,t=v,i=b;g=f,v=w,b=C,f=e,w=t,C=i}const S=function(e,t,i,n,o,r){const s=i-e,a=n-t,l=o-e,c=r-t,u=s*s+a*a,h=l*l+c*c,d=.5/(s*c-a*l);return{x:e+(c*u-a*h)*d,y:t+(s*h-l*u)*d}}(m,_,v,b,w,C);this._cx=S.x,this._cy=S.y;for(let t=0;t0&&Math.abs(c-r)<=OE&&Math.abs(u-s)<=OE)continue;if(r=c,s=u,l===d||l===g||l===f)continue;let h=0;for(let e=0,t=this._hashKey(c,u);e0?3-i:1+i)/4}(e-this._cx,t-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:t,_halfedges:i,coords:n}=this;let o=0,r=0;for(;;){const s=i[e],a=e-e%3;if(r=a+(e+2)%3,-1===s){if(0===o)break;e=FE[--o];continue}const l=s-s%3,c=a+(e+1)%3,u=l+(s+2)%3,h=t[r],d=t[e],g=t[c],f=t[u];if(VE(n[2*h],n[2*h+1],n[2*d],n[2*d+1],n[2*g],n[2*g+1],n[2*f],n[2*f+1])){t[e]=f,t[s]=h;const n=i[u];if(-1===n){let t=this._hullStart;do{if(this._hullTri[t]===u){this._hullTri[t]=e;break}t=this._hullPrev[t]}while(t!==this._hullStart)}this._link(e,n),this._link(s,i[r]),this._link(r,u);const a=l+(s+1)%3;o=33306690738754716e-32*Math.abs(s+a)?s-a:0}function WE(e,t,i,n,o,r){return(zE(o,r,e,t,i,n)||zE(e,t,i,n,o,r)||zE(i,n,o,r,e,t))<0}function VE(e,t,i,n,o,r,s,a){const l=e-s,c=t-a,u=i-s,h=n-a,d=o-s,g=r-a,f=u*u+h*h,p=d*d+g*g;return l*(h*p-f*g)-c*(u*p-f*d)+(l*l+c*c)*(u*g-h*d)<0}function HE(e,t,i,n,o,r){const s=i-e,a=n-t,l=o-e,c=r-t,u=s*s+a*a,h=l*l+c*c,d=.5/(s*c-a*l),g=(c*u-a*h)*d,f=(s*h-l*u)*d;return g*g+f*f}function $E(e,t,i,n){if(n-i<=20)for(let o=i+1;o<=n;o++){const n=e[o],r=t[n];let s=o-1;for(;s>=i&&t[e[s]]>r;)e[s+1]=e[s--];e[s+1]=n}else{let o=i+1,r=n;UE(e,i+n>>1,o),t[e[i]]>t[e[n]]&&UE(e,i,n),t[e[o]]>t[e[n]]&&UE(e,o,n),t[e[i]]>t[e[o]]&&UE(e,i,o);const s=e[o],a=t[s];for(;;){do{o++}while(t[e[o]]a);if(r=r-i?($E(e,t,o,n),$E(e,t,i,r-1)):($E(e,t,i,r-1),$E(e,t,o,n))}}function UE(e,t,i){const n=e[t];e[t]=e[i],e[i]=n}function jE(e){return e[0]}function qE(e){return e[1]}const KE=1e-6;class GE{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,t){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,t){this._+=`L${this._x1=+e},${this._y1=+t}`}arc(e,t,i){const n=(e=+e)+(i=+i),o=t=+t;if(i<0)throw new Error("negative radius");null===this._x1?this._+=`M${n},${o}`:(Math.abs(this._x1-n)>KE||Math.abs(this._y1-o)>KE)&&(this._+="L"+n+","+o),i&&(this._+=`A${i},${i},0,1,1,${e-i},${t}A${i},${i},0,1,1,${this._x1=n},${this._y1=o}`)}rect(e,t,i,n){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${+i}v${+n}h${-i}Z`}value(){return this._||null}}class YE{constructor(){this._=[]}moveTo(e,t){this._.push([e,t])}closePath(){this._.push(this._[0].slice())}lineTo(e,t){this._.push([e,t])}value(){return this._.length?this._:null}}class ZE{constructor(e,[t,i,n,o]=[0,0,960,500]){if(!((n=+n)>=(t=+t)&&(o=+o)>=(i=+i)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(2*e.points.length),this.vectors=new Float64Array(2*e.points.length),this.xmax=n,this.xmin=t,this.ymax=o,this.ymin=i,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:t,triangles:i},vectors:n}=this,o=this.circumcenters=this._circumcenters.subarray(0,i.length/3*2);for(let t,n,r=0,s=0,a=i.length;r1;)o-=2;for(let e=2;e4)for(let e=0;e0){if(t>=this.ymax)return null;(o=(this.ymax-t)/n)0){if(e>=this.xmax)return null;(o=(this.xmax-e)/i)this.xmax?2:0)|(tthis.ymax?8:0)}}const XE=2*Math.PI,QE=Math.pow;function JE(e){return e[0]}function eA(e){return e[1]}function tA(e,t,i){return[e+Math.sin(e+t)*i,t+Math.cos(e-t)*i]}class iA{static from(e,t=JE,i=eA,n){return new iA("length"in e?function(e,t,i,n){const o=e.length,r=new Float64Array(2*o);for(let s=0;s2&&function(e){const{triangles:t,coords:i}=e;for(let e=0;e1e-10)return!1}return!0}(e)){this.collinear=Int32Array.from({length:t.length/2},((e,t)=>t)).sort(((e,i)=>t[2*e]-t[2*i]||t[2*e+1]-t[2*i+1]));const e=this.collinear[0],i=this.collinear[this.collinear.length-1],n=[t[2*e],t[2*e+1],t[2*i],t[2*i+1]],o=1e-8*Math.hypot(n[3]-n[1],n[2]-n[0]);for(let e=0,i=t.length/2;e0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=n[0],this.triangles[1]=n[1],this.triangles[2]=n[1],r[n[0]]=1,2===n.length&&(r[n[1]]=0))}voronoi(e){return new ZE(this,e)}*neighbors(e){const{inedges:t,hull:i,_hullIndex:n,halfedges:o,triangles:r,collinear:s}=this;if(s){const t=s.indexOf(e);return t>0&&(yield s[t-1]),void(t=0&&o!==i&&o!==n;)i=o;return o}_step(e,t,i){const{inedges:n,hull:o,_hullIndex:r,halfedges:s,triangles:a,points:l}=this;if(-1===n[e]||!l.length)return(e+1)%(l.length>>1);let c=e,u=QE(t-l[2*e],2)+QE(i-l[2*e+1],2);const h=n[e];let d=h;do{let n=a[d];const h=QE(t-l[2*n],2)+QE(i-l[2*n+1],2);if(h>5<<5,l=~~Math.max(Math.abs(v+b),Math.abs(v-b))}else s=s+31>>5<<5;if(l>g&&(g=l),h+s>=2048&&(h=0,d+=g,g=0),d+l>=aA)break;o.translate((h+(s>>1))/r,(d+(l>>1))/r),t.rotate&&o.rotate(t.rotate*sA),o.fillText(t.text,0,0),t.padding&&(o.lineWidth=2*t.padding,o.strokeText(t.text,0,0)),o.restore(),t.width=s,t.height=l,t.xoff=h,t.yoff=d,t.x1=s>>1,t.y1=l>>1,t.x0=-t.x1,t.y0=-t.y1,t.hasText=!0,h+=s}for(var w=o.getImageData(0,0,2048/r,aA/r).data,C=[];--n>=0;)if((t=i[n]).hasText){for(a=(s=t.width)>>5,l=t.y1-t.y0,c=0;c>5),D=w[2048*(d+u)+(h+c)<<2]?1<<31-c%32:0;C[k]|=D,S|=D}S?x=u:(t.y0++,l--,u--,d++)}t.y1=t.y0+x,t.sprite=C.slice(0,(t.y1-t.y0)*a)}}}function cA(e,t,i){i>>=5;for(var n,o=e.sprite,r=e.width>>5,s=e.x-(r<<4),a=127&s,l=32-a,c=e.y1-e.y0,u=(e.y+e.y0)*i+(s>>5),h=0;h>>a:0))&t[u+d])return!0;u+=i}return!1}function uA(e,t){var i=e[0],n=e[1];t.x+t.x0n.x&&(n.x=t.x+t.x1),t.y+t.y1>n.y&&(n.y=t.y+t.y1)}function hA(e,t){return e.x+e.x1>t[0].x&&e.x+e.x0t[0].y&&e.y+e.y0=h));)if(t.x=s+o,t.y=c+r,!(t.x+t.x0<0||t.y+t.y0<0||t.x+t.x1>a[0]||t.y+t.y1>a[1])&&(!i||!cA(t,e,a[0]))&&(!i||hA(t,i))){for(var p,m=t.sprite,_=t.width>>5,v=a[0]>>5,b=t.x-(_<<4),y=127&b,w=32-y,C=t.y1-t.y0,S=(t.y+t.y0)*v+(b>>5),x=0;x>>y:0);S+=v}return t.sprite=null,!0}return!1}return h.layout=function(){for(var l=function(e){e.width=e.height=1;var t=Math.sqrt(e.getContext("2d").getImageData(0,0,1,1).data.length>>2);e.width=2048/t,e.height=aA/t;var i=e.getContext("2d");return i.fillStyle=i.strokeStyle="red",i.textAlign="center",{context:i,ratio:t}}(Zd()),h=function(e){for(var t=[],i=-1;++i>5)*a[1]),g=null,f=c.length,p=-1,m=[],_=c.map((a=>({text:e(a),font:t(a),style:n(a),weight:o(a),rotate:r(a),size:~~(i(a)+1e-14),padding:s(a),xoff:0,yoff:0,x1:0,y1:0,x0:0,y0:0,hasText:!1,sprite:null,datum:a}))).sort(((e,t)=>t.size-e.size));++p>1,v.y=a[1]*(u()+.5)>>1,lA(l,v,_,p),v.hasText&&d(h,v,g)&&(m.push(v),g?uA(g,v):g=[{x:v.x+v.x0,y:v.y+v.y0},{x:v.x+v.x1,y:v.y+v.y1}],v.x-=a[0]>>1,v.y-=a[1]>>1)}return m},h.words=function(e){return arguments.length?(c=e,h):c},h.size=function(e){return arguments.length?(a=[+e[0],+e[1]],h):a},h.font=function(e){return arguments.length?(t=gA(e),h):t},h.fontStyle=function(e){return arguments.length?(n=gA(e),h):n},h.fontWeight=function(e){return arguments.length?(o=gA(e),h):o},h.rotate=function(e){return arguments.length?(r=gA(e),h):r},h.text=function(t){return arguments.length?(e=gA(t),h):e},h.spiral=function(e){return arguments.length?(l=fA[e]||e,h):l},h.fontSize=function(e){return arguments.length?(i=gA(e),h):i},h.padding=function(e){return arguments.length?(s=gA(e),h):s},h.random=function(e){return arguments.length?(u=e,h):u},h}(),e)}_A.Definition={type:"Wordcloud",metadata:{modifies:!0},params:[{name:"size",type:"number",array:!0,length:2},{name:"font",type:"string",expr:!0,default:"sans-serif"},{name:"fontStyle",type:"string",expr:!0,default:"normal"},{name:"fontWeight",type:"string",expr:!0,default:"normal"},{name:"fontSize",type:"number",expr:!0,default:14},{name:"fontSizeRange",type:"number",array:"nullable",default:[10,50]},{name:"rotate",type:"number",expr:!0,default:0},{name:"text",type:"field"},{name:"spiral",type:"string",values:["archimedean","rectangular"]},{name:"padding",type:"number",expr:!0},{name:"as",type:"string",array:!0,length:7,default:pA}]},Xi(_A,oc,{transform(e,t){!e.size||e.size[0]&&e.size[1]||qt("Wordcloud size dimensions must be non-zero.");const i=e.modified();if(!(i||t.changed(t.ADD_REM)||mA.some((function(i){const n=e[i];return Oi(n)&&t.modified(n.fields)}))))return;const n=t.materialize(t.SOURCE).source,o=this.value,r=e.as||pA;let s,a=e.fontSize||14;if(Oi(a)?s=e.fontSizeRange:a=Vi(a),s){const e=a,t=Cm("sqrt")().domain(Ui(n,e)).range(s);a=i=>t(e(i))}n.forEach((e=>{e[r[0]]=NaN,e[r[1]]=NaN,e[r[3]]=0}));const l=o.words(n).text(e.text).size(e.size||[500,500]).padding(e.padding||1).spiral(e.spiral||"archimedean").rotate(e.rotate||0).font(e.font||"sans-serif").fontStyle(e.fontStyle||"normal").fontWeight(e.fontWeight||"normal").fontSize(a).random(wc).layout(),c=o.size(),u=c[0]>>1,h=c[1]>>1,d=l.length;for(let e,t,i=0;inew Uint8Array(e),bA=e=>new Uint16Array(e),yA=e=>new Uint32Array(e);function wA(e,t,i){const n=(t<257?vA:t<65537?bA:yA)(e);return i&&n.set(i),n}function CA(e,t,i){const n=1<{const n=e[t],o=e[i];return no?1:0})),function(e,t){return Array.from(t,(t=>e[t]))}(e,t)}(d,l),s)c=t,u=e,t=Array(s+a),e=yA(s+a),function(e,t,i,n,o,r,s,a,l){let c,u=0,h=0;for(c=0;u0)for(h=0;he,size:()=>i}}function xA(e){oc.call(this,function(){let e=8,t=[],i=yA(0),n=wA(0,e),o=wA(0,e);return{data:()=>t,seen:()=>i=function(e,t,i){return e.length>=t?e:((i=i||new e.constructor(t)).set(e),i)}(i,t.length),add(e){for(let i,n=0,o=t.length,r=e.length;nt.length,curr:()=>n,prev:()=>o,reset:e=>o[e]=n[e],all:()=>e<257?255:e<65537?65535:4294967295,set(e,t){n[e]|=t},clear(e,t){n[e]&=~t},resize(t,i){(t>n.length||i>e)&&(e=Math.max(i,e),n=wA(t,e,n),o=wA(t,e))}}}(),e),this._indices=null,this._dims=null}function kA(e){oc.call(this,null,e)}xA.Definition={type:"CrossFilter",metadata:{},params:[{name:"fields",type:"field",array:!0,required:!0},{name:"query",type:"array",array:!0,required:!0,content:{type:"number",array:!0,length:2}}]},Xi(xA,oc,{transform(e,t){return this._dims?e.modified("fields")||e.fields.some((e=>t.modified(e.fields)))?this.reinit(e,t):this.eval(e,t):this.init(e,t)},init(e,t){const i=e.fields,n=e.query,o=this._indices={},r=this._dims=[],s=n.length;let a,l,c=0;for(;c{const e=o.remove(t,i);for(const t in n)n[t].reindex(e)}))},update(e,t,i){const n=this._dims,o=e.query,r=t.stamp,s=n.length;let a,l,c=0;for(i.filters=0,l=0;lg)for(m=g,_=Math.min(h,f);m<_;++m)v=l[m],r[v]!==i&&(a[v]=s[v],r[v]=i,n.push(v)),s[v]^=p;if(d>f)for(m=Math.max(h,f),_=d;m<_;++m)v=l[m],r[v]!==i&&(a[v]=s[v],r[v]=i,n.push(v)),s[v]^=p;else if(du)for(g=u,f=Math.min(l,h);gh)for(g=Math.max(l,h),f=c;ga[e]&i?null:s[e];return r.filter(r.MOD,c),o&o-1?(r.filter(r.ADD,(e=>{const t=a[e]&i;return!t&&t^l[e]&i?s[e]:null})),r.filter(r.REM,(e=>{const t=a[e]&i;return!t||t^t^l[e]&i?null:s[e]}))):(r.filter(r.ADD,c),r.filter(r.REM,(e=>(a[e]&i)===o?s[e]:null))),r.filter(r.SOURCE,(e=>c(e._index)))}});const DA="Literal",LA="CallExpression";function NA(e){this.type=e}var EA,AA,MA,IA,TA;NA.prototype.visit=function(e){let t,i,n;if(e(this))return 1;for(t=function(e){switch(e.type){case"ArrayExpression":return e.elements;case"BinaryExpression":case"LogicalExpression":return[e.left,e.right];case LA:return[e.callee].concat(e.arguments);case"ConditionalExpression":return[e.test,e.consequent,e.alternate];case"MemberExpression":return[e.object,e.property];case"ObjectExpression":return e.properties;case"Property":return[e.key,e.value];case"UnaryExpression":return[e.argument];case"Identifier":case DA:case"RawCode":default:return[]}}(this),i=0,n=t.length;i",EA[3]="Identifier",EA[4]="Keyword",EA[5]="Null",EA[6]="Numeric",EA[7]="Punctuator",EA[8]="String",EA[9]="RegularExpression";var RA="Identifier",OA="Unexpected token %0",FA="Invalid regular expression",PA="Invalid regular expression: missing /",BA="Octal literals are not allowed in strict mode.",zA="ILLEGAL",WA="Disabled.",VA=new RegExp("[\\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-\\u08B2\\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\\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\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\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-\\u13F4\\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\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\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-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\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-\\uAB5F\\uAB64\\uAB65\\uABC0-\\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]"),HA=new RegExp("[\\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-\\u08B2\\u08E4-\\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\\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\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\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\\u0D57\\u0D60-\\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-\\u13F4\\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\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\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-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\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-\\uAB5F\\uAB64\\uAB65\\uABC0-\\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-\\uFE2D\\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]");function $A(e,t){if(!e)throw new Error("ASSERT: "+t)}function UA(e){return e>=48&&e<=57}function jA(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function qA(e){return"01234567".indexOf(e)>=0}function KA(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function GA(e){return 10===e||13===e||8232===e||8233===e}function YA(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&VA.test(String.fromCharCode(e))}function ZA(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&HA.test(String.fromCharCode(e))}const XA={if:1,in:1,do:1,var:1,for:1,new:1,try:1,let:1,this:1,else:1,case:1,void:1,with:1,enum:1,while:1,break:1,catch:1,throw:1,const:1,yield:1,class:1,super:1,return:1,typeof:1,delete:1,switch:1,export:1,import:1,public:1,static:1,default:1,finally:1,extends:1,package:1,private:1,function:1,continue:1,debugger:1,interface:1,protected:1,instanceof:1,implements:1};function QA(){for(;MA1114111||"}"!==e)&&gM({},OA,zA),t<=65535?String.fromCharCode(t):(i=55296+(t-65536>>10),n=56320+(t-65536&1023),String.fromCharCode(i,n))}function tM(){var e,t;for(e=AA.charCodeAt(MA++),t=String.fromCharCode(e),92===e&&(117!==AA.charCodeAt(MA)&&gM({},OA,zA),++MA,(e=JA("u"))&&"\\"!==e&&YA(e.charCodeAt(0))||gM({},OA,zA),t=e);MA>>="===(n=AA.substr(MA,4))?{type:7,value:n,start:o,end:MA+=4}:">>>"===(i=n.substr(0,3))||"<<="===i||">>="===i?{type:7,value:i,start:o,end:MA+=3}:s===(t=i.substr(0,2))[1]&&"+-<>&|".indexOf(s)>=0||"=>"===t?{type:7,value:t,start:o,end:MA+=2}:("//"===t&&gM({},OA,zA),"<>=!+-*%&|^/".indexOf(s)>=0?{type:7,value:s,start:o,end:++MA}:void gM({},OA,zA))}function nM(){var e,t,i;if($A(UA((i=AA[MA]).charCodeAt(0))||"."===i,"Numeric literal must start with a decimal digit or a decimal point"),t=MA,e="","."!==i){if(e=AA[MA++],i=AA[MA],"0"===e){if("x"===i||"X"===i)return++MA,function(e){let t="";for(;MA=IA)return{type:2,start:MA,end:MA};const e=AA.charCodeAt(MA);return YA(e)?function(){var e,t;return e=MA,{type:1===(t=92===AA.charCodeAt(MA)?tM():function(){var e,t;for(e=MA++;MA=0&&MA($A(t=0&&gM({},FA,i),{value:i,literal:t}}(),n=function(e,t){let i=e;t.indexOf("u")>=0&&(i=i.replace(/\\u\{([0-9a-fA-F]+)\}/g,((e,t)=>{if(parseInt(t,16)<=1114111)return"x";gM({},FA)})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"));try{new RegExp(i)}catch(e){gM({},FA)}try{return new RegExp(e,t)}catch(e){return null}}(t.value,i.value),{literal:t.literal+i.literal,value:n,regex:{pattern:t.value,flags:i.value},start:e,end:MA}}()),sM()):fM(rM())}return i}function CM(){const e=[];if(pM("("),!mM(")"))for(;MA":case"<=":case">=":case"instanceof":case"in":t=7;break;case"<<":case">>":case">>>":t=8;break;case"+":case"-":t=9;break;case"*":case"/":case"%":t=11}return t}function LM(){var e,t;return e=function(){var e,t,i,n,o,r,s,a,l,c;if(e=TA,l=kM(),0===(o=DM(n=TA)))return l;for(n.prec=o,rM(),t=[e,TA],r=[l,n,s=kM()];(o=DM(TA))>0;){for(;r.length>2&&o<=r[r.length-2].prec;)s=r.pop(),a=r.pop().value,l=r.pop(),t.pop(),i=aM(a,l,s),r.push(i);(n=rM()).prec=o,r.push(n),t.push(TA),i=kM(),r.push(i)}for(i=r[c=r.length-1],t.pop();c>1;)t.pop(),i=aM(r[c-1].value,r[c-2],i),c-=2;return i}(),mM("?")&&(rM(),t=LM(),pM(":"),e=function(e,t,i){const n=new NA("ConditionalExpression");return n.test=e,n.consequent=t,n.alternate=i,n}(e,t,LM())),e}function NM(){const e=LM();if(mM(","))throw new Error(WA);return e}function EM(e){MA=0,IA=(AA=e).length,TA=null,sM();const t=NM();if(2!==TA.type)throw new Error("Unexpect token after expression.");return t}var AM={NaN:"NaN",E:"Math.E",LN2:"Math.LN2",LN10:"Math.LN10",LOG2E:"Math.LOG2E",LOG10E:"Math.LOG10E",PI:"Math.PI",SQRT1_2:"Math.SQRT1_2",SQRT2:"Math.SQRT2",MIN_VALUE:"Number.MIN_VALUE",MAX_VALUE:"Number.MAX_VALUE"};function MM(e){function t(t,i,n){return o=>function(t,i,n,o){let r=e(i[0]);return n&&(r=n+"("+r+")",0===n.lastIndexOf("new ",0)&&(r="("+r+")")),r+"."+t+(o<0?"":0===o?"()":"("+i.slice(1).map(e).join(",")+")")}(t,o,i,n)}const i="new Date",n="String",o="RegExp";return{isNaN:"Number.isNaN",isFinite:"Number.isFinite",abs:"Math.abs",acos:"Math.acos",asin:"Math.asin",atan:"Math.atan",atan2:"Math.atan2",ceil:"Math.ceil",cos:"Math.cos",exp:"Math.exp",floor:"Math.floor",log:"Math.log",max:"Math.max",min:"Math.min",pow:"Math.pow",random:"Math.random",round:"Math.round",sin:"Math.sin",sqrt:"Math.sqrt",tan:"Math.tan",clamp:function(t){t.length<3&&qt("Missing arguments to clamp function."),t.length>3&&qt("Too many arguments to clamp function.");const i=t.map(e);return"Math.max("+i[1]+", Math.min("+i[2]+","+i[0]+"))"},now:"Date.now",utc:"Date.UTC",datetime:i,date:t("getDate",i,0),day:t("getDay",i,0),year:t("getFullYear",i,0),month:t("getMonth",i,0),hours:t("getHours",i,0),minutes:t("getMinutes",i,0),seconds:t("getSeconds",i,0),milliseconds:t("getMilliseconds",i,0),time:t("getTime",i,0),timezoneoffset:t("getTimezoneOffset",i,0),utcdate:t("getUTCDate",i,0),utcday:t("getUTCDay",i,0),utcyear:t("getUTCFullYear",i,0),utcmonth:t("getUTCMonth",i,0),utchours:t("getUTCHours",i,0),utcminutes:t("getUTCMinutes",i,0),utcseconds:t("getUTCSeconds",i,0),utcmilliseconds:t("getUTCMilliseconds",i,0),length:t("length",null,-1),parseFloat:"parseFloat",parseInt:"parseInt",upper:t("toUpperCase",n,0),lower:t("toLowerCase",n,0),substring:t("substring",n),split:t("split",n),trim:t("trim",n,0),regexp:o,test:t("test",o),if:function(t){t.length<3&&qt("Missing arguments to if function."),t.length>3&&qt("Too many arguments to if function.");const i=t.map(e);return"("+i[0]+"?"+i[1]+":"+i[2]+")"}}}function IM(e){const t=(e=e||{}).allowed?vn(e.allowed):{},i=e.forbidden?vn(e.forbidden):{},n=e.constants||AM,o=(e.functions||MM)(h),r=e.globalvar,s=e.fieldvar,a=Oi(r)?r:e=>"".concat(r,'["').concat(e,'"]');let l={},c={},u=0;function h(e){if(rn(e))return e;const t=d[e.type];return null==t&&qt("Unsupported type: "+e.type),t(e)}const d={Literal:e=>e.raw,Identifier:e=>{const o=e.name;return u>0?o:Ki(i,o)?qt("Illegal identifier: "+o):Ki(n,o)?n[o]:Ki(t,o)?o:(l[o]=1,a(o))},MemberExpression:e=>{const t=!e.computed,i=h(e.object);t&&(u+=1);const n=h(e.property);return i===s&&(c[function(e){const t=e&&e.length-1;return t&&('"'===e[0]&&'"'===e[t]||"'"===e[0]&&"'"===e[t])?e.slice(1,-1):e}(n)]=1),t&&(u-=1),i+(t?"."+n:"["+n+"]")},CallExpression:e=>{"Identifier"!==e.callee.type&&qt("Illegal callee type: "+e.callee.type);const t=e.callee.name,i=e.arguments,n=Ki(o,t)&&o[t];return n||qt("Unrecognized function: "+t),Oi(n)?n(i):n+"("+i.map(h).join(",")+")"},ArrayExpression:e=>"["+e.elements.map(h).join(",")+"]",BinaryExpression:e=>"("+h(e.left)+" "+e.operator+" "+h(e.right)+")",UnaryExpression:e=>"("+e.operator+h(e.argument)+")",ConditionalExpression:e=>"("+h(e.test)+"?"+h(e.consequent)+":"+h(e.alternate)+")",LogicalExpression:e=>"("+h(e.left)+e.operator+h(e.right)+")",ObjectExpression:e=>"{"+e.properties.map(h).join(",")+"}",Property:e=>{u+=1;const t=h(e.key);return u-=1,t+":"+h(e.value)}};function g(e){const t={code:h(e),globals:Object.keys(l),fields:Object.keys(c)};return l={},c={},t}return g.functions=o,g.constants=n,g}var TM,RM,OM,FM,PM,BM,zM,WM,VM,HM,$M,UM,jM,qM,KM,GM,YM=new xS,ZM=new xS,XM={point:GS,lineStart:GS,lineEnd:GS,polygonStart:function(){YM=new xS,XM.lineStart=QM,XM.lineEnd=JM},polygonEnd:function(){var e=+YM;ZM.add(e<0?AS+e:e),this.lineStart=this.lineEnd=this.point=GS},sphere:function(){ZM.add(AS)}};function QM(){XM.point=eI}function JM(){tI(TM,RM)}function eI(e,t){XM.point=tI,TM=e,RM=t,OM=e*=IS,FM=FS(t=(t*=IS)/2+ES),PM=HS(t)}function tI(e,t){var i=(e*=IS)-OM,n=i>=0?1:-1,o=n*i,r=FS(t=(t*=IS)/2+ES),s=HS(t),a=PM*s,l=FM*r+a*FS(o),c=a*n*HS(o);YM.add(OS(c,l)),OM=e,FM=r,PM=s}var iI,nI,oI,rI,sI,aI,lI,cI,uI,hI,dI,gI,fI,pI,mI,_I,vI={point:bI,lineStart:wI,lineEnd:CI,polygonStart:function(){vI.point=SI,vI.lineStart=xI,vI.lineEnd=kI,qM=new xS,XM.polygonStart()},polygonEnd:function(){XM.polygonEnd(),vI.point=bI,vI.lineStart=wI,vI.lineEnd=CI,YM<0?(BM=-(WM=180),zM=-(VM=90)):qM>kS?VM=90:qM<-1e-6&&(zM=-90),GM[0]=BM,GM[1]=WM},sphere:function(){BM=-(WM=180),zM=-(VM=90)}};function bI(e,t){KM.push(GM=[BM=e,WM=e]),tVM&&(VM=t)}function yI(e,t){var i=ik([e*IS,t*IS]);if(jM){var n=ok(jM,i),o=ok([n[1],-n[0],0],n);ak(o),o=tk(o);var r,s=e-HM,a=s>0?1:-1,l=o[0]*MS*a,c=TS(s)>180;c^(a*HMVM&&(VM=r):c^(a*HM<(l=(l+360)%360-180)&&lVM&&(VM=t)),c?eDI(BM,WM)&&(WM=e):DI(e,WM)>DI(BM,WM)&&(BM=e):WM>=BM?(eWM&&(WM=e)):e>HM?DI(BM,e)>DI(BM,WM)&&(WM=e):DI(e,WM)>DI(BM,WM)&&(BM=e)}else KM.push(GM=[BM=e,WM=e]);tVM&&(VM=t),jM=i,HM=e}function wI(){vI.point=yI}function CI(){GM[0]=BM,GM[1]=WM,vI.point=bI,jM=null}function SI(e,t){if(jM){var i=e-HM;qM.add(TS(i)>180?i+(i>0?360:-360):i)}else $M=e,UM=t;XM.point(e,t),yI(e,t)}function xI(){XM.lineStart()}function kI(){SI($M,UM),XM.lineEnd(),TS(qM)>kS&&(BM=-(WM=180)),GM[0]=BM,GM[1]=WM,jM=null}function DI(e,t){return(t-=e)<0?t+360:t}function LI(e,t){return e[0]-t[0]}function NI(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t>>1;i(e[r],t)<0?n=r+1:o=r}return n}return 1===e.length&&(t=(t,i)=>e(t)-i,i=function(e){return(t,i)=>function(e,t){return et?1:e>=t?0:NaN}(e(t),i)}(e)),{left:n,center:function(e,i,o,r){null==o&&(o=0),null==r&&(r=e.length);const s=n(e,i,o,r-1);return s>o&&t(e[s-1],i)>-t(e[s],i)?s-1:s},right:function(e,t,n,o){for(null==n&&(n=0),null==o&&(o=e.length);n>>1;i(e[r],t)>0?o=r:n=r+1}return n}}}(UI),qI=jI.left,KI=jI.right;var GI={E_union:function(e,t){if(!e.length)return t;for(var i=0,n=t.length;it.indexOf(e)>=0)):t},R_union:function(e,t){var i=pi(t[0]),n=pi(t[1]);return i>n&&(i=t[1],n=t[0]),e.length?(e[0]>i&&(e[0]=i),e[1]n&&(i=t[1],n=t[0]),e.length?nn&&(e[1]=n),e):[i,n]}};function YI(e,t,i,n){t[0].type!==DA&&qt("First argument to selection functions must be a string literal.");const o=t[0].value,r=":"+o;(t.length>=2&&fi(t).value)!==WI||Ki(n,"@unit")||(n["@unit"]=i.getData(o).indataRef(i,"unit")),Ki(n,r)||(n[r]=i.getData(o).tuplesRef())}function ZI(e){const t=this.context.data[e];return t?t.values.value:[]}const XI=e=>function(t,i){return this.context.dataflow.locale()[e](i)(t)},QI=XI("format"),JI=XI("timeFormat"),eT=XI("utcFormat"),tT=XI("timeParse"),iT=XI("utcParse"),nT=new Date(2e3,0,1);function oT(e,t,i){return Number.isInteger(e)&&Number.isInteger(t)?(nT.setYear(2e3),nT.setMonth(e),nT.setDate(t),JI.call(this,nT,i)):""}function rT(e,t,i,n){t[0].type!==DA&&qt("First argument to data functions must be a string literal.");const o=t[0].value,r=":"+o;if(!Ki(r,n))try{n[r]=i.getData(o).tuplesRef()}catch(e){}}function sT(e,t,i,n){if(t[0].type===DA)aT(i,n,t[0].value);else for(e in i.scales)aT(i,n,e)}function aT(e,t,i){const n="%"+i;if(!Ki(t,n))try{t[n]=e.scaleRef(i)}catch(e){}}function lT(e,t){let i;return Oi(e)?e:rn(e)?(i=t.scales[e])&&i.value:void 0}function cT(e,t){return function(i,n,o){if(i){const t=lT(i,(o||this).context);return t&&t.path[e](n)}return t(n)}}const uT=cT("area",(function(e){return ZM=new xS,SS(e,XM),2*ZM})),hT=cT("bounds",(function(e){var t,i,n,o,r,s,a;if(VM=WM=-(BM=zM=1/0),KM=[],SS(e,vI),i=KM.length){for(KM.sort(LI),t=1,r=[n=KM[0]];tDI(n[0],n[1])&&(n[1]=o[1]),DI(o[0],n[1])>DI(n[0],n[1])&&(n[0]=o[0])):r.push(n=o);for(s=-1/0,t=0,n=r[i=r.length-1];t<=i;n=o,++t)o=r[t],(a=DI(n[1],o[0]))>s&&(s=a,BM=o[0],WM=n[1])}return KM=GM=null,BM===1/0||zM===1/0?[[NaN,NaN],[NaN,NaN]]:[[BM,zM],[WM,VM]]})),dT=cT("centroid",(function(e){iI=nI=oI=rI=sI=aI=lI=cI=0,uI=new xS,hI=new xS,dI=new xS,SS(e,EI);var t=+uI,i=+hI,n=+dI,o=zS(t,i,n);return o_T(e,t)}const bT={};function yT(e){return li(e)||ArrayBuffer.isView(e)?e:null}function wT(e){return yT(e)||(rn(e)?e:null)}const CT=e=>e.data;function ST(e,t){const i=ZI.call(t,e);return i.root&&i.root.lookup||{}}const xT=()=>"undefined"!=typeof window&&window||null,kT={random:()=>wc(),cumulativeNormal:Ic,cumulativeLogNormal:Bc,cumulativeUniform:Uc,densityNormal:Mc,densityLogNormal:Pc,densityUniform:$c,quantileNormal:Tc,quantileLogNormal:zc,quantileUniform:jc,sampleNormal:Ac,sampleLogNormal:Fc,sampleUniform:Hc,isArray:li,isBoolean:Ji,isDate:en,isDefined:e=>void 0!==e,isNumber:nn,isObject:ci,isRegExp:on,isString:rn,isTuple:kl,isValid:e=>null!=e&&e==e,toBoolean:fn,toDate:mn,toNumber:pi,toString:_n,indexof:function(e,...t){return wT(e).indexOf(...t)},join:function(e,...t){return yT(e).join(...t)},lastindexof:function(e,...t){return wT(e).lastIndexOf(...t)},replace:function(e,t,i){return Oi(i)&&qt("Function argument passed to replace."),String(e).replace(t,i)},reverse:function(e){return yT(e).slice().reverse()},slice:function(e,...t){return wT(e).slice(...t)},flush:Zi,lerp:an,merge:function(){const e=[].slice.call(arguments);return e.unshift({}),$i(...e)},pad:hn,peek:fi,pluck:function(e,t){const i=bT[t]||(bT[t]=Gt(t));return li(e)?e.map(i):i(e)},span:dn,inrange:Qi,truncate:bn,rgb:Eg,lab:vp,hcl:kp,hsl:Fg,luminance:pT,contrast:function(e,t){const i=pT(e),n=pT(t);return(Math.max(i,n)+.05)/(Math.min(i,n)+.05)},sequence:uu,format:QI,utcFormat:eT,utcParse:iT,utcOffset:_s,utcSequence:ys,timeFormat:JI,timeParse:tT,timeOffset:ms,timeSequence:bs,timeUnitSpecifier:Hr,monthFormat:function(e){return oT.call(this,e,1,"%B")},monthAbbrevFormat:function(e){return oT.call(this,e,1,"%b")},dayFormat:function(e){return oT.call(this,0,2+e,"%A")},dayAbbrevFormat:function(e){return oT.call(this,0,2+e,"%a")},quarter:Mi,utcquarter:Ii,week:qr,utcweek:Qr,dayofyear:jr,utcdayofyear:Xr,warn:function(){return gT(this.context.dataflow,"warn",arguments)},info:function(){return gT(this.context.dataflow,"info",arguments)},debug:function(){return gT(this.context.dataflow,"debug",arguments)},extent:Ui,inScope:function(e){const t=this.context.group;let i=!1;if(t)for(;e;){if(e===t){i=!0;break}e=e.mark.group}return i},intersect:function(e,t,i){if(!e)return[];const[n,o]=e,r=(new ov).set(n[0],n[1],o[0],o[1]);return Nw(i||this.context.dataflow.scenegraph().root,r,function(e){let t=null;if(e){const i=Ti(e.marktype),n=Ti(e.markname);t=e=>(!i.length||i.some((t=>e.marktype===t)))&&(!n.length||n.some((t=>e.name===t)))}return t}(t))},clampRange:Ri,pinchDistance:function(e){const t=e.touches,i=t[0].clientX-t[1].clientX,n=t[0].clientY-t[1].clientY;return Math.sqrt(i*i+n*n)},pinchAngle:function(e){const t=e.touches;return Math.atan2(t[0].clientY-t[1].clientY,t[0].clientX-t[1].clientX)},screen:function(){const e=xT();return e?e.screen:{}},containerSize:function(){const e=this.context.dataflow,t=e.container&&e.container();return t?[t.clientWidth,t.clientHeight]:[void 0,void 0]},windowSize:function(){const e=xT();return e?[e.innerWidth,e.innerHeight]:[void 0,void 0]},bandspace:function(e,t,i){return Kp(e||0,t||0,i||0)},setdata:function(e,t){const i=this.context.dataflow,n=this.context.data[e].input;return i.pulse(n,i.changeset().remove(Jt).insert(t)),1},pathShape:function(e){let t=null;return function(i){return i?L_(i,t=t||m_(e)):e}},panLinear:Ci,panLog:Si,panPow:xi,panSymlog:ki,zoomLinear:Li,zoomLog:Ni,zoomPow:Ei,zoomSymlog:Ai,encode:function(e,t,i){if(e){const i=this.context.dataflow,n=e.mark.source;i.pulse(n,i.changeset().encode(e,t))}return void 0!==i?i:e},modify:function(e,t,i,n,o,r){const s=this.context.dataflow,a=this.context.data[e],l=a.input,c=s.stamp();let u,h,d=a.changes;if(!1===s._trigger||!(l.value.length||t||n))return 0;if((!d||d.stamp{a.modified=!0,s.pulse(l,d).run()}),!0,1)),i&&(u=!0===i?Jt:li(i)||kl(i)?i:vT(i),d.remove(u)),t&&d.insert(t),n&&(u=vT(n),l.value.some(u)?d.remove(u):d.insert(n)),o)for(h in r)d.modify(o,h,r[h]);return 1}},DT=["view","item","group","xy","x","y"],LT="this.",NT={},ET={forbidden:["_"],allowed:["datum","event","item"],fieldvar:"datum",globalvar:e=>"_[".concat(gn("$"+e),"]"),functions:function(e){const t=MM(e);DT.forEach((e=>t[e]="event.vega."+e));for(const e in kT)t[e]=LT+e;return $i(t,function(e,t,i){t.__bandwidth=e=>e&&e.bandwidth?e.bandwidth():0,i._bandwidth=sT,i._range=sT,i._scale=sT;const n=t=>"_["+(t.type===DA?gn("%"+t.value):gn("%")+"+"+e(t))+"]";return{_bandwidth:e=>"this.__bandwidth(".concat(n(e[0]),")"),_range:e=>"".concat(n(e[0]),".range()"),_scale:t=>"".concat(n(t[0]),"(").concat(e(t[1]),")")}}(e,kT,NT)),t},constants:AM,visitors:NT},AT=IM(ET);function MT(e,t,i){return 1===arguments.length?kT[e]:(kT[e]=t,i&&(NT[e]=i),AT&&(AT.functions[e]=LT+e),this)}function IT(e,t){const i={};let n;try{n=EM(e=rn(e)?e:gn(e)+"")}catch(t){qt("Expression parse error: "+e)}n.visit((e=>{if(e.type!==LA)return;const n=e.callee.name,o=ET.visitors[n];o&&o(n,e.arguments,t,i)}));const o=AT(n);return o.globals.forEach((e=>{const n="$"+e;!Ki(i,n)&&t.getSignal(e)&&(i[n]=t.signalRef(e))})),{$expr:$i({code:o.code},t.options.ast?{ast:n}:null),$fields:o.fields,$params:i}}MT("bandwidth",(function(e,t){const i=lT(e,(t||this).context);return i&&i.bandwidth?i.bandwidth():0}),sT),MT("copy",(function(e,t){const i=lT(e,(t||this).context);return i?i.copy():void 0}),sT),MT("domain",(function(e,t){const i=lT(e,(t||this).context);return i?i.domain():[]}),sT),MT("range",(function(e,t){const i=lT(e,(t||this).context);return i&&i.range?i.range():[]}),sT),MT("invert",(function(e,t,i){const n=lT(e,(i||this).context);return n?li(t)?(n.invertRange||n.invert)(t):(n.invert||n.invertExtent)(t):void 0}),sT),MT("scale",(function(e,t,i){const n=lT(e,(i||this).context);return n?n(t):void 0}),sT),MT("gradient",(function(e,t,i,n,o){e=lT(e,(o||this).context);const r=h_(t,i);let s=e.domain(),a=s[0],l=fi(s),c=Zt;return l-a?c=Om(e,a,l):e=(e.interpolator?Cm("sequential")().interpolator(e.interpolator()):Cm("linear")().interpolate(e.interpolate()).range(e.range())).domain([a=0,l=1]),e.ticks&&(s=e.ticks(+n||15),a!==s[0]&&s.unshift(a),l!==fi(s)&&s.push(l)),s.forEach((t=>r.stop(c(t),e(t)))),r}),sT),MT("geoArea",uT,sT),MT("geoBounds",hT,sT),MT("geoCentroid",dT,sT),MT("geoShape",(function(e,t,i){const n=lT(e,(i||this).context);return function(e){return n?n.path.context(e)(t):""}}),sT),MT("indata",(function(e,t,i){const n=this.context.data[e]["index:"+t],o=n?n.value.get(i):void 0;return o?o.count:o}),(function(e,t,i,n){t[0].type!==DA&&qt("First argument to indata must be a string literal."),t[1].type!==DA&&qt("Second argument to indata must be a string literal.");const o=t[0].value,r=t[1].value,s="@"+r;Ki(s,n)||(n[s]=i.getData(o).indataRef(i,r))})),MT("data",ZI,rT),MT("treePath",(function(e,t,i){const n=ST(e,this),o=n[t],r=n[i];return o&&r?o.path(r).map(CT):void 0}),rT),MT("treeAncestors",(function(e,t){const i=ST(e,this)[t];return i?i.ancestors().map(CT):void 0}),rT),MT("vlSelectionTest",(function(e,t,i){for(var n,o,r,s,a,l=this.context.data[e],c=l?l.values.value:[],u=l?l[HI]&&l[HI].value:void 0,h=i===WI,d=c.length,g=0;g(e[r[i].field]=t,e)),{}))}return t=t||VI,Object.keys(_).forEach((e=>{_[e]=Object.keys(_[e]).map((t=>_[e][t])).reduce(((i,n)=>void 0===i?n:GI[b[e]+"_"+t](i,n)))})),m=Object.keys(v),i&&m.length&&(_[n?"vlPoint":"vlMulti"]=t===VI?{or:m.reduce(((e,t)=>(e.push(...v[t]),e)),[])}:{and:m.map((e=>({or:v[e]})))}),_}),YI),MT("vlSelectionTuples",(function(e,t){return e.map((e=>$i({values:t.fields.map((t=>(t.getter||(t.getter=Gt(t.field)))(e.datum)))},t)))}));const TT=vn(["rule"]),RT=vn(["group","image","rect"]);function OT(e){return(e+"").toLowerCase()}function FT(e,t,i){";"!==i[i.length-1]&&(i="return("+i+");");const n=Function(...t.concat(i));return e&&e.functions?n.bind(e.functions):n}var PT={operator:(e,t)=>FT(e,["_"],t.code),parameter:(e,t)=>FT(e,["datum","_"],t.code),event:(e,t)=>FT(e,["event"],t.code),handler:(e,t)=>FT(e,["_","event"],"var datum=event.item&&event.item.datum;return ".concat(t.code,";")),encode:(e,t)=>{const{marktype:i,channels:n}=t;let o="var o=item,datum=o.datum,m=0,$;";for(const e in n){const t="o["+gn(e)+"]";o+="$=".concat(n[e].code,";if(").concat(t,"!==$)").concat(t,"=$,m=1;")}return o+=function(e,t){let i="";return TT[t]||(e.x2&&(e.x?(RT[t]&&(i+="if(o.x>o.x2)$=o.x,o.x=o.x2,o.x2=$;"),i+="o.width=o.x2-o.x;"):i+="o.x=o.x2-(o.width||0);"),e.xc&&(i+="o.x=o.xc-(o.width||0)/2;"),e.y2&&(e.y?(RT[t]&&(i+="if(o.y>o.y2)$=o.y,o.y=o.y2,o.y2=$;"),i+="o.height=o.y2-o.y;"):i+="o.y=o.y2-(o.height||0);"),e.yc&&(i+="o.y=o.yc-(o.height||0)/2;")),i}(n,i),o+="return m;",FT(e,["item","_"],o)},codegen:{get(e){const t="[".concat(e.map(gn).join("]["),"]"),i=Function("_","return _".concat(t,";"));return i.path=t,i},comparator(e,t){let i;const n=Function("a","b","var u, v; return "+e.map(((e,n)=>{const o=t[n];let r,s;return e.path?(r="a".concat(e.path),s="b".concat(e.path)):((i=i||{})["f"+n]=e,r="this.f".concat(n,"(a)"),s="this.f".concat(n,"(b)")),function(e,t,i,n){return"((u = ".concat(e,") < (v = ").concat(t,") || u == null) && v != null ? ").concat(i,"\n : (u > v || v == null) && u != null ? ").concat(n,"\n : ((v = v instanceof Date ? +v : v), (u = u instanceof Date ? +u : u)) !== u && v === v ? ").concat(i,"\n : v !== v && u === u ? ").concat(n," : ")}(r,s,-o,o)})).join("")+"0;");return i?n.bind(i):n}}};function BT(e,t,i){if(!e||!ci(e))return e;for(let n,o=0,r=zT.length;oe&&e.$tupleid?Dl:e));return t.fn[i]||(t.fn[i]=Fi(n,e.$order,t.expr.codegen))}},{key:"$context",parse:function(e,t){return t}},{key:"$subflow",parse:function(e,t){const i=e.$subflow;return function(e,n,o){const r=t.fork().parse(i),s=r.get(i.operators[0].id),a=r.signals.parent;return a&&a.set(o),s.detachSubflow=()=>t.detach(r),s}}},{key:"$tupleid",parse:function(){return Dl}}];const WT={skip:!0};function VT(e,t,i,n){return new HT(e,t,i,n)}function HT(e,t,i,n){this.dataflow=e,this.transforms=t,this.events=e.events.bind(e),this.expr=n||PT,this.signals={},this.scales={},this.nodes={},this.data={},this.fn={},i&&(this.functions=Object.create(i),this.functions.context=this)}function $T(e){this.dataflow=e.dataflow,this.transforms=e.transforms,this.events=e.events,this.expr=e.expr,this.signals=Object.create(e.signals),this.scales=Object.create(e.scales),this.nodes=Object.create(e.nodes),this.data=Object.create(e.data),this.fn=Object.create(e.fn),e.functions&&(this.functions=Object.create(e.functions),this.functions.context=this)}function UT(e,t){e&&(null==t?e.removeAttribute("aria-label"):e.setAttribute("aria-label",t))}HT.prototype=$T.prototype={fork(){const e=new $T(this);return(this.subcontext||(this.subcontext=[])).push(e),e},detach(e){this.subcontext=this.subcontext.filter((t=>t!==e));const t=Object.keys(e.nodes);for(const i of t)e.nodes[i]._targets=null;for(const i of t)e.nodes[i].detach();e.nodes=null},get(e){return this.nodes[e]},set(e,t){return this.nodes[e]=t},add(e,t){const i=this,n=i.dataflow,o=e.value;if(i.set(e.id,t),"collect"===OT(e.type)&&o&&(o.$ingest?n.ingest(t,o.$ingest,o.$format):o.$request?n.preload(t,o.$request,o.$format):n.pulse(t,n.changeset().insert(o))),e.root&&(i.root=t),e.parent){let o=i.get(e.parent.$ref);o?(n.connect(o,[t]),t.targets().add(o)):(i.unresolved=i.unresolved||[]).push((()=>{o=i.get(e.parent.$ref),n.connect(o,[t]),t.targets().add(o)}))}if(e.signal&&(i.signals[e.signal]=t),e.scale&&(i.scales[e.scale]=t),e.data)for(const n in e.data){const o=i.data[n]||(i.data[n]={});e.data[n].forEach((e=>o[e]=t))}},resolve(){return(this.unresolved||[]).forEach((e=>e())),delete this.unresolved,this},operator(e,t){this.add(e,this.dataflow.add(e.value,t))},transform(e,t){this.add(e,this.dataflow.add(this.transforms[OT(t)]))},stream(e,t){this.set(e.id,t)},update(e,t,i,n,o){this.dataflow.on(t,i,n,o,e.options)},operatorExpression(e){return this.expr.operator(this,e)},parameterExpression(e){return this.expr.parameter(this,e)},eventExpression(e){return this.expr.event(this,e)},handlerExpression(e){return this.expr.handler(this,e)},encodeExpression(e){return this.expr.encode(this,e)},parse:function(e){const t=this,i=e.operators||[];return e.background&&(t.background=e.background),e.eventConfig&&(t.eventConfig=e.eventConfig),e.locale&&(t.locale=e.locale),i.forEach((e=>t.parseOperator(e))),i.forEach((e=>t.parseOperatorParameters(e))),(e.streams||[]).forEach((e=>t.parseStream(e))),(e.updates||[]).forEach((e=>t.parseUpdate(e))),t.resolve()},parseOperator:function(e){const t=this;"operator"!==OT(e.type)&&e.type?t.transform(e,e.type):t.operator(e,e.update?t.operatorExpression(e.update):null)},parseOperatorParameters:function(e){const t=this;if(e.params){const i=t.get(e.id);i||qt("Invalid operator id: "+e.id),t.dataflow.connect(i,i.parameters(t.parseParameters(e.params),e.react,e.initonly))}},parseParameters:function(e,t){t=t||{};const i=this;for(const n in e){const o=e[n];t[n]=li(o)?o.map((e=>BT(e,i,t))):BT(o,i,t)}return t},parseStream:function(e){var t,i=this,n=null!=e.filter?i.eventExpression(e.filter):void 0,o=null!=e.stream?i.get(e.stream):void 0;e.source?o=i.events(e.source,e.type,n):e.merge&&(o=(t=e.merge.map((e=>i.get(e))))[0].merge.apply(t[0],t.slice(1))),e.between&&(t=e.between.map((e=>i.get(e))),o=o.between(t[0],t[1])),e.filter&&(o=o.filter(n)),null!=e.throttle&&(o=o.throttle(+e.throttle)),null!=e.debounce&&(o=o.debounce(+e.debounce)),null==o&&qt("Invalid stream definition: "+JSON.stringify(e)),e.consume&&o.consume(!0),i.stream(e,o)},parseUpdate:function(e){var t,i=this,n=ci(n=e.source)?n.$ref:n,o=i.get(n),r=e.update,s=void 0;o||qt("Source not defined: "+e.source),t=e.target&&e.target.$expr?i.eventExpression(e.target.$expr):i.get(e.target),r&&r.$expr&&(r.$params&&(s=i.parseParameters(r.$params)),r=i.handlerExpression(r.$expr)),i.update(e,o,t,r,s)},getState:function(e){var t=this,i={};if(e.signals){var n=i.signals={};Object.keys(t.signals).forEach((i=>{const o=t.signals[i];e.signals(i,o)&&(n[i]=o.value)}))}if(e.data){var o=i.data={};Object.keys(t.data).forEach((i=>{const n=t.data[i];e.data(i,n)&&(o[i]=n.input.value)}))}return t.subcontext&&!1!==e.recurse&&(i.subcontext=t.subcontext.map((t=>t.getState(e)))),i},setState:function(e){var t=this,i=t.dataflow,n=e.data,o=e.signals;Object.keys(o||{}).forEach((e=>{i.update(t.signals[e],o[e],WT)})),Object.keys(n||{}).forEach((e=>{i.pulse(t.data[e].input,i.changeset().remove(Jt).insert(n[e]))})),(e.subcontext||[]).forEach(((e,i)=>{const n=t.subcontext[i];n&&n.setState(e)}))}};const jT="default";function qT(e,t){const i=e.globalCursor()?"undefined"!=typeof document&&document.body:e.container();if(i)return null==t?i.style.removeProperty("cursor"):i.style.cursor=t}function KT(e,t){var i=e._runtime.data;return Ki(i,t)||qt("Unrecognized data set: "+t),i[t]}function GT(e,t){Tl(t)||qt("Second argument to changes must be a changeset.");const i=KT(this,e);return i.modified=!0,this.pulse(i.input,t)}function YT(e){var t=e.padding();return Math.max(0,e._viewWidth+t.left+t.right)}function ZT(e){var t=e.padding();return Math.max(0,e._viewHeight+t.top+t.bottom)}function XT(e){var t=e.padding(),i=e._origin;return[t.left+i[0],t.top+i[1]]}const QT="view",JT={trap:!1};function eR(e,t,i,n){e._eventListeners.push({type:i,sources:Ti(t),handler:n})}function tR(e,t,i){const n=e._eventConfig&&e._eventConfig[t];return!(!1===n||ci(n)&&!n[i])||(e.warn(`Blocked ${t} ${i} event listener.`),!1)}function iR(e){return e.item}function nR(e){return e.item.mark.source}function oR(e){return function(t,i){return i.vega.view().changeset().encode(i.item,e)}}function rR(e,t,i){const n=document.createElement(e);for(const e in t)n.setAttribute(e,t[e]);return null!=i&&(n.textContent=i),n}function sR(e,t,i,n){const o=i.event||"input",r=()=>e.update(t.value);n.signal(i.signal,t.value),t.addEventListener(o,r),eR(n,t,o,r),e.set=e=>{t.value=e,t.dispatchEvent(function(e){return"undefined"!=typeof Event?new Event(e):{type:e}}(o))}}function aR(e,t,i,n){const o=n.signal(i.signal),r=rR("div",{class:"vega-bind"}),s="radio"===i.input?r:r.appendChild(rR("label"));s.appendChild(rR("span",{class:"vega-bind-name"},i.name||i.signal)),t.appendChild(r);let a=lR;switch(i.input){case"checkbox":a=cR;break;case"select":a=uR;break;case"radio":a=hR;break;case"range":a=dR}a(e,s,i,o)}function lR(e,t,i,n){const o=rR("input");for(const e in i)"signal"!==e&&"element"!==e&&o.setAttribute("input"===e?"type":e,i[e]);o.setAttribute("name",i.signal),o.value=n,t.appendChild(o),o.addEventListener("input",(()=>e.update(o.value))),e.elements=[o],e.set=e=>o.value=e}function cR(e,t,i,n){const o={type:"checkbox",name:i.signal};n&&(o.checked=!0);const r=rR("input",o);t.appendChild(r),r.addEventListener("change",(()=>e.update(r.checked))),e.elements=[r],e.set=e=>r.checked=!!e||null}function uR(e,t,i,n){const o=rR("select",{name:i.signal}),r=i.labels||[];i.options.forEach(((e,t)=>{const i={value:e};gR(e,n)&&(i.selected=!0),o.appendChild(rR("option",i,(r[t]||e)+""))})),t.appendChild(o),o.addEventListener("change",(()=>{e.update(i.options[o.selectedIndex])})),e.elements=[o],e.set=e=>{for(let t=0,n=i.options.length;t{const a={type:"radio",name:i.signal,value:t};gR(t,n)&&(a.checked=!0);const l=rR("input",a);l.addEventListener("change",(()=>e.update(t)));const c=rR("label",{},(r[s]||t)+"");return c.prepend(l),o.appendChild(c),l})),e.set=t=>{const i=e.elements,n=i.length;for(let e=0;e{l.textContent=a.value,e.update(+a.value)};a.addEventListener("input",c),a.addEventListener("change",c),e.elements=[a],e.set=e=>{a.value=e,l.textContent=e}}function gR(e,t){return e===t||e+""==t+""}function fR(e,t,i,n,o,r){return(t=t||new n(e.loader())).initialize(i,YT(e),ZT(e),XT(e),o,r).background(e.background())}function pR(e,t){return t?function(){try{t.apply(this,arguments)}catch(t){e.error(t)}}:null}function mR(e,t,i){if("string"==typeof t){if("undefined"==typeof document)return e.error("DOM document instance not found."),null;if(!(t=document.querySelector(t)))return e.error("Signal bind element not found: "+t),null}if(t&&i)try{t.innerHTML=""}catch(i){t=null,e.error(i)}return t}const _R=e=>+e||0;function vR(e){return ci(e)?{top:_R(e.top),bottom:_R(e.bottom),left:_R(e.left),right:_R(e.right)}:(e=>({top:e,bottom:e,left:e,right:e}))(_R(e))}async function bR(e,t,i,n){const o=Lw(t),r=o&&o.headless;return r||qt("Unrecognized renderer type: "+t),await e.runAsync(),fR(e,null,null,r,i,n).renderAsync(e._scenegraph.root)}var yR="padding",wR={skip:!0};function CR(e,t){var i=e.autosize(),n=e.padding();return t-(i&&i.contains===yR?n.left+n.right:0)}function SR(e,t){var i=e.autosize(),n=e.padding();return t-(i&&i.contains===yR?n.top+n.bottom:0)}function xR(e,t){return t.modified&&li(t.input.value)&&e.indexOf("_:vega:_")}function kR(e,t){return!("parent"===e||t instanceof rc.proxy)}function DR(e,t,i,n){const o=e.element();o&&o.setAttribute("title",function(e){return null==e?"":li(e)?LR(e):ci(e)&&!en(e)?(t=e,Object.keys(t).map((e=>{const i=t[e];return e+": "+(li(i)?LR(i):NR(i))})).join("\n")):e+"";var t}(n))}function LR(e){return"["+e.map(NR).join(", ")+"]"}function NR(e){return li(e)?"[…]":ci(e)&&!en(e)?"{…}":e}function ER(e,t){const i=this;if(t=t||{},ic.call(i),t.loader&&i.loader(t.loader),t.logger&&i.logger(t.logger),null!=t.logLevel&&i.logLevel(t.logLevel),t.locale||e.locale){const n=$i({},e.locale,t.locale);i.locale(ml(n.number,n.time))}i._el=null,i._elBind=null,i._renderType=t.renderer||kw.Canvas,i._scenegraph=new ay;const n=i._scenegraph.root;i._renderer=null,i._tooltip=t.tooltip||DR,i._redraw=!0,i._handler=(new Ty).scene(n),i._globalCursor=!1,i._preventDefault=!1,i._timers=[],i._eventListeners=[],i._resizeListeners=[],i._eventConfig=function(e){const t=$i({defaults:{}},e),i=(e,t)=>{t.forEach((t=>{li(e[t])&&(e[t]=vn(e[t]))}))};return i(t.defaults,["prevent","allow"]),i(t,["view","window","selector"]),t}(e.eventConfig),i.globalCursor(i._eventConfig.globalCursor);const o=function(e,t,i){return VT(e,rc,kT,i).parse(t)}(i,e,t.expr);i._runtime=o,i._signals=o.signals,i._bind=(e.bindings||[]).map((e=>({state:null,param:$i({},e)}))),o.root&&o.root.set(n),n.source=o.data.root.input,i.pulse(o.data.root.input,i.changeset().insert(n.items)),i._width=i.width(),i._height=i.height(),i._viewWidth=CR(i,i._width),i._viewHeight=SR(i,i._height),i._origin=[0,0],i._resize=0,i._autosize=1,function(e){var t=e._signals,i=t.width,n=t.height,o=t.padding;function r(){e._autosize=e._resize=1}e._resizeWidth=e.add(null,(t=>{e._width=t.size,e._viewWidth=CR(e,t.size),r()}),{size:i}),e._resizeHeight=e.add(null,(t=>{e._height=t.size,e._viewHeight=SR(e,t.size),r()}),{size:n});const s=e.add(null,r,{pad:o});e._resizeWidth.rank=i.rank+1,e._resizeHeight.rank=n.rank+1,s.rank=o.rank+1}(i),function(e){e.add(null,(t=>(e._background=t.bg,e._resize=1,t.bg)),{bg:e._signals.background})}(i),function(e){const t=e._signals.cursor||(e._signals.cursor=e.add({user:jT,item:null}));e.on(e.events("view","mousemove"),t,((e,i)=>{const n=t.value,o=n?rn(n)?n:n.user:jT,r=i.item&&i.item.cursor||null;return n&&o===n.user&&r==n.item?n:{user:o,item:r}})),e.add(null,(function(t){let i=t.cursor,n=this.value;return rn(i)||(n=i.item,i=i.user),qT(e,i&&i!==jT?i:n||i),n}),{cursor:t})}(i),i.description(e.description),t.hover&&i.hover(),t.container&&i.initialize(t.container,t.bind)}function AR(e,t){return Ki(e._signals,t)?e._signals[t]:qt("Unrecognized signal name: "+gn(t))}function MR(e,t){const i=(e._targets||[]).filter((e=>e._update&&e._update.handler===t));return i.length?i[0]:null}function IR(e,t,i,n){let o=MR(i,n);return o||(o=pR(e,(()=>n(t,i.value))),o.handler=n,e.on(i,null,o)),e}function TR(e,t,i){const n=MR(t,i);return n&&t._targets.remove(n),e}Xi(ER,ic,{async evaluate(e,t,i){if(await ic.prototype.evaluate.call(this,e,t),this._redraw||this._resize)try{this._renderer&&(this._resize&&(this._resize=0,o=XT(n=this),r=YT(n),s=ZT(n),n._renderer.background(n.background()),n._renderer.resize(r,s,o),n._handler.origin(o),n._resizeListeners.forEach((e=>{try{e(r,s)}catch(e){n.error(e)}}))),await this._renderer.renderAsync(this._scenegraph.root)),this._redraw=!1}catch(e){this.error(e)}var n,o,r,s;return i&&Cl(this,i),this},dirty(e){this._redraw=!0,this._renderer&&this._renderer.dirty(e)},description(e){if(arguments.length){const t=null!=e?e+"":null;return t!==this._desc&&UT(this._el,this._desc=t),this}return this._desc},container(){return this._el},scenegraph(){return this._scenegraph},origin(){return this._origin.slice()},signal(e,t,i){const n=AR(this,e);return 1===arguments.length?n.value:this.update(n,t,i)},width(e){return arguments.length?this.signal("width",e):this.signal("width")},height(e){return arguments.length?this.signal("height",e):this.signal("height")},padding(e){return arguments.length?this.signal("padding",vR(e)):vR(this.signal("padding"))},autosize(e){return arguments.length?this.signal("autosize",e):this.signal("autosize")},background(e){return arguments.length?this.signal("background",e):this.signal("background")},renderer(e){return arguments.length?(Lw(e)||qt("Unrecognized renderer type: "+e),e!==this._renderType&&(this._renderType=e,this._resetRenderer()),this):this._renderType},tooltip(e){return arguments.length?(e!==this._tooltip&&(this._tooltip=e,this._resetRenderer()),this):this._tooltip},loader(e){return arguments.length?(e!==this._loader&&(ic.prototype.loader.call(this,e),this._resetRenderer()),this):this._loader},resize(){return this._autosize=1,this.touch(AR(this,"autosize"))},_resetRenderer(){this._renderer&&(this._renderer=null,this.initialize(this._el,this._elBind))},_resizeView:function(e,t,i,n,o,r){this.runAfter((s=>{let a=0;s._autosize=0,s.width()!==i&&(a=1,s.signal("width",i,wR),s._resizeWidth.skip(!0)),s.height()!==n&&(a=1,s.signal("height",n,wR),s._resizeHeight.skip(!0)),s._viewWidth!==e&&(s._resize=1,s._viewWidth=e),s._viewHeight!==t&&(s._resize=1,s._viewHeight=t),s._origin[0]===o[0]&&s._origin[1]===o[1]||(s._resize=1,s._origin=o),a&&s.run("enter"),r&&s.runAfter((e=>e.resize()))}),!1,1)},addEventListener(e,t,i){let n=t;return i&&!1===i.trap||(n=pR(this,t),n.raw=t),this._handler.on(e,n),this},removeEventListener(e,t){for(var i,n,o=this._handler.handlers(e),r=o.length;--r>=0;)if(n=o[r].type,i=o[r].handler,e===n&&(t===i||t===i.raw)){this._handler.off(n,i);break}return this},addResizeListener(e){const t=this._resizeListeners;return t.indexOf(e)<0&&t.push(e),this},removeResizeListener(e){var t=this._resizeListeners,i=t.indexOf(e);return i>=0&&t.splice(i,1),this},addSignalListener(e,t){return IR(this,e,AR(this,e),t)},removeSignalListener(e,t){return TR(this,AR(this,e),t)},addDataListener(e,t){return IR(this,e,KT(this,e).values,t)},removeDataListener(e,t){return TR(this,KT(this,e).values,t)},globalCursor(e){if(arguments.length){if(this._globalCursor!==!!e){const t=qT(this,null);this._globalCursor=!!e,t&&qT(this,t)}return this}return this._globalCursor},preventDefault(e){return arguments.length?(this._preventDefault=e,this):this._preventDefault},timer:function(e,t){this._timers.push(function(e,t,i){var n=new TL,o=t;return null==t?(n.restart(e,t,i),n):(n._restart=n.restart,n.restart=function(e,t,i){t=+t,i=null==i?ML():+i,n._restart((function r(s){s+=o,n._restart(r,o+=t,i),e(s)}),t,i)},n.restart(e,t,i),n)}((function(t){e({timestamp:Date.now(),elapsed:t})}),t))},events:function(e,t,i){var n,o=this,r=new Hl(i),s=function(i,n){o.runAsync(null,(()=>{e===QT&&function(e,t){var i=e._eventConfig.defaults,n=i.prevent,o=i.allow;return!1!==n&&!0!==o&&(!0===n||!1===o||(n?n[t]:o?!o[t]:e.preventDefault()))}(o,t)&&i.preventDefault(),r.receive(function(e,t,i){var n,o,r=e._renderer,s=r&&r.canvas();return s&&(o=XT(e),(n=fy(t.changedTouches?t.changedTouches[0]:t,s))[0]-=o[0],n[1]-=o[1]),t.dataflow=e,t.item=i,t.vega=function(e,t,i){const n=t?"group"===t.mark.marktype?t:t.mark.group:null;function o(e){var i,o=n;if(e)for(i=t;i;i=i.mark.group)if(i.mark.name===e){o=i;break}return o&&o.mark&&o.mark.interactive?o:{}}function r(e){if(!e)return i;rn(e)&&(e=o(e));const t=i.slice();for(;e;)t[0]-=e.x||0,t[1]-=e.y||0,e=e.mark&&e.mark.group;return t}return{view:Vi(e),item:Vi(t||{}),group:o,xy:r,x:e=>r(e)[0],y:e=>r(e)[1]}}(e,i,n),t}(o,i,n))}))};if("timer"===e)tR(o,"timer",t)&&o.timer(s,t);else if(e===QT)tR(o,"view",t)&&o.addEventListener(t,s,JT);else if("window"===e?tR(o,"window",t)&&"undefined"!=typeof window&&(n=[window]):"undefined"!=typeof document&&tR(o,"selector",t)&&(n=document.querySelectorAll(e)),n){for(var a=0,l=n.length;a=0;)o[e].stop();for(e=r.length;--e>=0;)for(t=(i=r[e]).sources.length;--t>=0;)i.sources[t].removeEventListener(i.type,i.handler);return n&&n.call(this,this._handler,null,null,null),this},hover:function(e,t){return t=[t||"update",(e=[e||"hover"])[0]],this.on(this.events("view","mouseover",iR),nR,oR(e)),this.on(this.events("view","mouseout",iR),nR,oR(t)),this},data:function(e,t){return arguments.length<2?KT(this,e).values.value:GT.call(this,e,Rl().remove(Jt).insert(t))},change:GT,insert:function(e,t){return GT.call(this,e,Rl().insert(t))},remove:function(e,t){return GT.call(this,e,Rl().remove(t))},scale:function(e){var t=this._runtime.scales;return Ki(t,e)||qt("Unrecognized scale or projection: "+e),t[e].value},initialize:function(e,t){const i=this,n=i._renderType,o=i._eventConfig.bind,r=Lw(n);e=i._el=e?mR(i,e,!0):null,function(e){const t=e.container();t&&(t.setAttribute("role","graphics-document"),t.setAttribute("aria-roleDescription","visualization"),UT(t,e.description()))}(i),r||i.error("Unrecognized renderer type: "+n);const s=r.handler||Ty,a=e?r.renderer:r.headless;return i._renderer=a?fR(i,i._renderer,e,a):null,i._handler=function(e,t,i,n){const o=new n(e.loader(),pR(e,e.tooltip())).scene(e.scenegraph().root).initialize(i,XT(e),e);return t&&t.handlers().forEach((e=>{o.on(e.type,e.handler)})),o}(i,i._handler,e,s),i._redraw=!0,e&&"none"!==o&&(t=t?i._elBind=mR(i,t,!0):e.appendChild(rR("form",{class:"vega-bindings"})),i._bind.forEach((e=>{e.param.element&&"container"!==o&&(e.element=mR(i,e.param.element,!!e.param.input))})),i._bind.forEach((e=>{!function(e,t,i){if(!t)return;const n=i.param;let o=i.state;o||(o=i.state={elements:null,active:!1,set:null,update:t=>{t!=e.signal(n.signal)&&e.runAsync(null,(()=>{o.source=!0,e.signal(n.signal,t)}))}},n.debounce&&(o.update=Hi(n.debounce,o.update))),(null==n.input&&n.element?sR:aR)(o,t,n,e),o.active||(e.on(e._signals[n.signal],null,(()=>{o.source?o.source=!1:o.set(e.signal(n.signal))})),o.active=!0)}(i,e.element||t,e)}))),i},toImageURL:async function(e,t){e!==kw.Canvas&&e!==kw.SVG&&e!==kw.PNG&&qt("Unrecognized image type: "+e);const i=await bR(this,e,t);return e===kw.SVG?function(e,t){const i=new Blob([e],{type:"image/svg+xml"});return window.URL.createObjectURL(i)}(i.svg()):i.canvas().toDataURL("image/png")},toCanvas:async function(e,t){return(await bR(this,kw.Canvas,e,t)).canvas()},toSVG:async function(e){return(await bR(this,kw.SVG,e)).svg()},getState:function(e){return this._runtime.getState(e||{data:xR,signals:kR,recurse:!0})},setState:function(e){return this.runAsync(null,(t=>{t._trigger=!1,t._runtime.setState(e)}),(e=>{e._trigger=!0})),this}});const RR=/[[\]{}]/,OR={"*":1,arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1};let FR,PR;function BR(e,t,i){return FR=t||"view",PR=i||OR,WR(e.trim()).map(VR)}function zR(e,t,i,n,o){const r=e.length;let s,a=0;for(;t=0?--a:n&&n.indexOf(s)>=0&&++a}return t}function WR(e){const t=[],i=e.length;let n=0,o=0;for(;o"!==(e=e.slice(n+1).trim())[0])throw"Expected '>' after between selector: "+e;i=i.map(VR);const o=VR(e.slice(1).trim());return o.between?{between:i,stream:o}:(o.between=i,o)}(e):function(e){const t={source:FR},i=[];let n,o,r=[0,0],s=0,a=0,l=e.length,c=0;if("}"===e[l-1]){if(c=e.lastIndexOf("{"),!(c>=0))throw"Unmatched right brace: "+e;try{r=function(e){const t=e.split(",");if(!e.length||t.length>2)throw e;return t.map((t=>{const i=+t;if(i!=i)throw e;return i}))}(e.substring(c+1,l-1))}catch(t){throw"Invalid throttle specification: "+e}l=(e=e.slice(0,c).trim()).length,c=0}if(!l)throw e;if("@"===e[0]&&(s=++c),n=zR(e,c,":"),n1?(t.type=i[1],s?t.markname=i[0].slice(1):(u=i[0],PR[u]?t.marktype=i[0]:t.source=i[0])):t.type=i[0],"!"===t.type.slice(-1)&&(t.consume=!0,t.type=t.type.slice(0,-1)),null!=o&&(t.filter=o),r[0]&&(t.throttle=r[0]),r[1]&&(t.debounce=r[1]),t}(e)}function HR(e){return ci(e)?e:{type:e||"pad"}}const $R=e=>+e||0;function UR(e){return ci(e)?e.signal?e:{top:$R(e.top),bottom:$R(e.bottom),left:$R(e.left),right:$R(e.right)}:{top:t=$R(e),bottom:t,left:t,right:t};var t}const jR=e=>ci(e)&&!li(e)?$i({},e):{value:e};function qR(e,t,i,n){return null!=i?(ci(i)&&!li(i)||li(i)&&i.length&&ci(i[0])?e.update[t]=i:e[n||"enter"][t]={value:i},1):0}function KR(e,t,i){for(const i in t)qR(e,i,t[i]);for(const t in i)qR(e,t,i[t],"update")}function GR(e,t,i){for(const n in t)i&&Ki(i,n)||(e[n]=$i(e[n]||{},t[n]));return e}function YR(e,t){return t&&(t.enter&&t.enter[e]||t.update&&t.update[e])}const ZR="mark",XR="frame",QR="scope",JR="legend-label";function eO(e,t,i){e[t]=i&&i.signal?{signal:i.signal}:{value:i}}const tO=e=>rn(e)?gn(e):e.signal?"(".concat(e.signal,")"):rO(e);function iO(e){if(null!=e.gradient)return function(e){const t=[e.start,e.stop,e.count].map((e=>null==e?null:gn(e)));for(;t.length&&null==fi(t);)t.pop();return t.unshift(tO(e.gradient)),"gradient(".concat(t.join(","),")")}(e);let t=e.signal?"(".concat(e.signal,")"):e.color?function(e){return e.c?nO("hcl",e.h,e.c,e.l):e.h||e.s?nO("hsl",e.h,e.s,e.l):e.l||e.a?nO("lab",e.l,e.a,e.b):e.r||e.g||e.b?nO("rgb",e.r,e.g,e.b):null}(e.color):null!=e.field?rO(e.field):void 0!==e.value?gn(e.value):void 0;return null!=e.scale&&(t=function(e,t){const i=tO(e.scale);return null!=e.range?t="lerp(_range(".concat(i,"), ").concat(+e.range,")"):(void 0!==t&&(t="_scale(".concat(i,", ").concat(t,")")),e.band&&(t=(t?t+"+":"")+"_bandwidth(".concat(i,")")+(1==+e.band?"":"*"+oO(e.band)),e.extra&&(t="(datum.extra ? _scale(".concat(i,", datum.extra.value) : ").concat(t,")"))),null==t&&(t="0")),t}(e,t)),void 0===t&&(t=null),null!=e.exponent&&(t="pow(".concat(t,",").concat(oO(e.exponent),")")),null!=e.mult&&(t+="*".concat(oO(e.mult))),null!=e.offset&&(t+="+".concat(oO(e.offset))),e.round&&(t="round(".concat(t,")")),t}const nO=(e,t,i,n)=>"(".concat(e,"(").concat([t,i,n].map(iO).join(","),")+'')");function oO(e){return ci(e)?"("+iO(e)+")":e}function rO(e){return sO(ci(e)?e:{datum:e})}function sO(e){let t,i,n;if(e.signal)t="datum",n=e.signal;else if(e.group||e.parent){for(i=Math.max(1,e.level||1),t="item";i-- >0;)t+=".mark.group";e.parent?(n=e.parent,t+=".datum"):n=e.group}else e.datum?(t="datum",n=e.datum):qt("Invalid field reference: "+gn(e));return e.signal||(n=rn(n)?Kt(n).map(gn).join("]["):sO(n)),t+"["+n+"]"}function aO(e,t,i,n,o,r){const s={};(r=r||{}).encoders={$encode:s},e=function(e,t,i,n,o){const r={},s={};let a,l,c,u;for(l in l="lineBreak","text"!==t||null==o[l]||YR(l,e)||eO(r,l,o[l]),("legend"==i||String(i).startsWith("axis"))&&(i=null),u=i===XR?o.group:i===ZR?$i({},o.mark,o[t]):null,u)c=YR(l,e)||("fill"===l||"stroke"===l)&&(YR("fill",e)||YR("stroke",e)),c||eO(r,l,u[l]);for(l in Ti(n).forEach((t=>{const i=o.style&&o.style[t];for(const t in i)YR(t,e)||eO(r,t,i[t])})),e=$i({},e),r)u=r[l],u.signal?(a=a||{})[l]=u:s[l]=u;return e.enter=$i(s,e.enter),a&&(e.update=$i(a,e.update)),e}(e,t,i,n,o.config);for(const i in e)s[i]=lO(e[i],t,r,o);return r}function lO(e,t,i,n){const o={},r={};for(const t in e)null!=e[t]&&(o[t]=cO((s=e[t],li(s)?function(e){let t="";return e.forEach((e=>{const i=iO(e);t+=e.test?"(".concat(e.test,")?").concat(i,":"):i})),":"===fi(t)&&(t+="null"),t}(s):iO(s)),n,i,r));var s;return{$expr:{marktype:t,channels:o},$fields:Object.keys(r),$output:Object.keys(e)}}function cO(e,t,i,n){const o=IT(e,t);return o.$fields.forEach((e=>n[e]=1)),$i(i,o.$params),o.$expr}const uO=["value","update","init","react","bind"];function hO(e,t){qt(e+' for "outer" push: '+gn(t))}function dO(e,t){const i=e.name;if("outer"===e.push)t.signals[i]||hO("No prior signal definition",i),uO.forEach((t=>{void 0!==e[t]&&hO("Invalid property ",t)}));else{const n=t.addSignal(i,e.value);!1===e.react&&(n.react=!1),e.bind&&t.addBinding(i,e.bind)}}function gO(e,t,i,n){this.id=-1,this.type=e,this.value=t,this.params=i,n&&(this.parent=n)}function fO(e,t,i,n){return new gO(e,t,i,n)}function pO(e,t){return fO("operator",e,t)}function mO(e){const t={$ref:e.id};return e.id<0&&(e.refs=e.refs||[]).push(t),t}function _O(e,t){return t?{$field:e,$name:t}:{$field:e}}const vO=_O("key");function bO(e,t){return{$compare:e,$order:t}}function yO(e,t){return(e&&e.signal?"$"+e.signal:e||"")+(e&&t?"_":"")+(t&&t.signal?"$"+t.signal:t||"")}const wO="scope",CO="view";function SO(e){return e&&e.signal}function xO(e){if(SO(e))return!0;if(ci(e))for(const t in e)if(xO(e[t]))return!0;return!1}function kO(e,t){return null!=e?e:t}function DO(e){return e&&e.signal||e}const LO="timer";function NO(e,t){return(e.merge?EO:e.stream?AO:e.type?MO:qt("Invalid stream specification: "+gn(e)))(e,t)}function EO(e,t){const i=IO({merge:e.merge.map((e=>NO(e,t)))},e,t);return t.addStream(i).id}function AO(e,t){const i=IO({stream:NO(e.stream,t)},e,t);return t.addStream(i).id}function MO(e,t){let i;var n;e.type===LO?(i=t.event(LO,e.throttle),e={between:e.between,filter:e.filter}):i=t.event((n=e.source)===wO?CO:n||CO,e.type);const o=IO({stream:i},e,t);return 1===Object.keys(o).length?i:t.addStream(o).id}function IO(e,t,i){let n=t.between;return n&&(2!==n.length&&qt('Stream "between" parameter must have 2 entries: '+gn(t)),e.between=[NO(n[0],i),NO(n[1],i)]),n=t.filter?[].concat(t.filter):[],(t.marktype||t.markname||t.markrole)&&n.push(function(e,t,i){const n="event.item";return n+(e&&"*"!==e?"&&"+n+".mark.marktype==='"+e+"'":"")+(i?"&&"+n+".mark.role==='"+i+"'":"")+(t?"&&"+n+".mark.name==='"+t+"'":"")}(t.marktype,t.markname,t.markrole)),t.source===wO&&n.push("inScope(event.item)"),n.length&&(e.filter=IT("("+n.join(")&&(")+")",i).$expr),null!=(n=t.throttle)&&(e.throttle=+n),null!=(n=t.debounce)&&(e.debounce=+n),t.consume&&(e.consume=!0),e}const TO={code:"_.$value",ast:{type:"Identifier",value:"value"}};function RO(e){return{signal:"["+e.map((e=>e.scale?'scale("'+e.scale+'")':e.signal))+"]"}}const OO=e=>(t,i,n)=>fO(e,i,t||void 0,n),FO=OO("aggregate"),PO=OO("axisticks"),BO=OO("bound"),zO=OO("collect"),WO=OO("compare"),VO=OO("datajoin"),HO=OO("encode"),$O=OO("expression"),UO=OO("facet"),jO=OO("field"),qO=OO("key"),KO=OO("legendentries"),GO=OO("load"),YO=OO("mark"),ZO=OO("multiextent"),XO=OO("multivalues"),QO=OO("overlap"),JO=OO("params"),eF=OO("prefacet"),tF=OO("projection"),iF=OO("proxy"),nF=OO("relay"),oF=OO("render"),rF=OO("scale"),sF=OO("sieve"),aF=OO("sortitems"),lF=OO("viewlayout"),cF=OO("values");let uF=0;const hF={min:"min",max:"max",count:"sum"};function dF(e,t){const i=t.getScale(e.name).params;let n;for(n in i.domain=mF(e.domain,e,t),null!=e.range&&(i.range=xF(e,t,i)),null!=e.interpolate&&function(e,t){t.interpolate=gF(e.type||e),null!=e.gamma&&(t.interpolateGamma=gF(e.gamma))}(e.interpolate,i),null!=e.nice&&(i.nice=function(e){return ci(e)?{interval:gF(e.interval),step:gF(e.step)}:gF(e)}(e.nice)),null!=e.bins&&(i.bins=function(e,t){return e.signal||li(e)?fF(e,t):t.objectProperty(e)}(e.bins,t)),e)Ki(i,n)||"name"===n||(i[n]=gF(e[n],t))}function gF(e,t){return ci(e)?e.signal?t.signalRef(e.signal):qt("Unsupported object: "+gn(e)):e}function fF(e,t){return e.signal?t.signalRef(e.signal):e.map((e=>gF(e,t)))}function pF(e){qt("Can not find data set: "+gn(e))}function mF(e,t,i){if(e)return e.signal?i.signalRef(e.signal):(li(e)?_F:e.fields?bF:vF)(e,t,i);null==t.domainMin&&null==t.domainMax||qt("No scale domain defined for domainMin/domainMax to override.")}function _F(e,t,i){return e.map((e=>gF(e,i)))}function vF(e,t,i){const n=i.getData(e.data);return n||pF(e.data),Dm(t.type)?n.valuesRef(i,e.field,wF(e.sort,!1)):Am(t.type)?n.domainRef(i,e.field):n.extentRef(i,e.field)}function bF(e,t,i){const n=e.data,o=e.fields.reduce(((e,t)=>(t=rn(t)?{data:n,field:t}:li(t)||t.signal?function(e,t){const i="_:vega:_"+uF++,n=zO({});if(li(e))n.value={$ingest:e};else if(e.signal){const o="setdata("+gn(i)+","+e.signal+")";n.params.input=t.signalRef(o)}return t.addDataPipeline(i,[n,sF({})]),{data:i,field:"data"}}(t,i):t,e.push(t),e)),[]);return(Dm(t.type)?yF:Am(t.type)?CF:SF)(e,i,o)}function yF(e,t,i){const n=wF(e.sort,!0);let o,r;const s=i.map((e=>{const i=t.getData(e.data);return i||pF(e.data),i.countsRef(t,e.field,n)})),a={groupby:vO,pulse:s};n&&(o=n.op||"count",r=n.field?yO(o,n.field):"count",a.ops=[hF[o]],a.fields=[t.fieldRef(r)],a.as=[r]),o=t.add(FO(a));const l=t.add(zO({pulse:mO(o)}));return r=t.add(cF({field:vO,sort:t.sortRef(n),pulse:mO(l)})),mO(r)}function wF(e,t){return e&&(e.field||e.op?e.field||"count"===e.op?t&&e.field&&e.op&&!hF[e.op]&&qt("Multiple domain scales can not be sorted using "+e.op):qt("No field provided for sort aggregate op: "+e.op):ci(e)?e.field="key":e={field:"key"}),e}function CF(e,t,i){const n=i.map((e=>{const i=t.getData(e.data);return i||pF(e.data),i.domainRef(t,e.field)}));return mO(t.add(XO({values:n})))}function SF(e,t,i){const n=i.map((e=>{const i=t.getData(e.data);return i||pF(e.data),i.extentRef(t,e.field)}));return mO(t.add(ZO({extents:n})))}function xF(e,t,i){const n=t.config.range;let o=e.range;if(o.signal)return t.signalRef(o.signal);if(rn(o)){if(n&&Ki(n,o))return xF(e=$i({},e,{range:n[o]}),t,i);"width"===o?o=[0,{signal:"width"}]:"height"===o?o=Dm(e.type)?[0,{signal:"height"}]:[{signal:"height"},0]:qt("Unrecognized scale range value: "+gn(o))}else{if(o.scheme)return i.scheme=li(o.scheme)?fF(o.scheme,t):gF(o.scheme,t),o.extent&&(i.schemeExtent=fF(o.extent,t)),void(o.count&&(i.schemeCount=gF(o.count,t)));if(o.step)return void(i.rangeStep=gF(o.step,t));if(Dm(e.type)&&!li(o))return mF(o,e,t);li(o)||qt("Unsupported range type: "+gn(o))}return o.map((e=>(li(e)?fF:gF)(e,t)))}function kF(e,t,i){return li(e)?e.map((e=>kF(e,t,i))):ci(e)?e.signal?i.signalRef(e.signal):"fit"===t?e:qt("Unsupported parameter object: "+gn(e)):e}const DF="top",LF="left",NF="right",EF="bottom",AF="center",MF="index",IF="label",TF="perc",RF="value",OF="guide-label",FF="guide-title",PF="symbol",BF="gradient",zF="discrete",WF="size",VF=[WF,"shape","fill","stroke","strokeWidth","strokeDash","opacity"],HF={name:1,style:1,interactive:1},$F={value:0},UF={value:1},jF="group",qF="rect",KF="rule",GF="text";function YF(e){return e.type=jF,e.interactive=e.interactive||!1,e}function ZF(e,t){const i=(i,n)=>kO(e[i],kO(t[i],n));return i.isVertical=i=>"vertical"===kO(e.direction,t.direction||(i?t.symbolDirection:t.gradientDirection)),i.gradientLength=()=>kO(e.gradientLength,t.gradientLength||t.gradientWidth),i.gradientThickness=()=>kO(e.gradientThickness,t.gradientThickness||t.gradientHeight),i.entryColumns=()=>kO(e.columns,kO(t.columns,+i.isVertical(!0))),i}function XF(e,t){const i=t&&(t.update&&t.update[e]||t.enter&&t.enter[e]);return i&&i.signal?i:i?i.value:null}function QF(e,t,i){return"item.anchor === '".concat("start","' ? ").concat(e," : item.anchor === '").concat("end","' ? ").concat(t," : ").concat(i)}const JF=QF(gn(LF),gn(NF),gn(AF));function eP(e,t){return t?e?ci(e)?Object.assign({},e,{offset:eP(e.offset,t)}):{value:e,offset:t}:t:e}function tP(e,t){return t?(e.name=t.name,e.style=t.style||e.style,e.interactive=!!t.interactive,e.encode=GR(e.encode,t,HF)):e.interactive=!1,e}function iP(e,t,i,n){const o=ZF(e,i),r=o.isVertical(),s=o.gradientThickness(),a=o.gradientLength();let l,c,u,h,d;r?(c=[0,1],u=[0,0],h=s,d=a):(c=[0,0],u=[1,0],h=a,d=s);const g={enter:l={opacity:$F,x:$F,y:$F,width:jR(h),height:jR(d)},update:$i({},l,{opacity:UF,fill:{gradient:t,start:c,stop:u}}),exit:{opacity:$F}};return KR(g,{stroke:o("gradientStrokeColor"),strokeWidth:o("gradientStrokeWidth")},{opacity:o("gradientOpacity")}),tP({type:qF,role:"legend-gradient",encode:g},n)}function nP(e,t,i,n,o){const r=ZF(e,i),s=r.isVertical(),a=r.gradientThickness(),l=r.gradientLength();let c,u,h,d,g="";s?(c="y",h="y2",u="x",d="width",g="1-"):(c="x",h="x2",u="y",d="height");const f={opacity:$F,fill:{scale:t,field:RF}};f[c]={signal:g+"datum."+TF,mult:l},f[u]=$F,f[h]={signal:g+"datum.perc2",mult:l},f[d]=jR(a);const p={enter:f,update:$i({},f,{opacity:UF}),exit:{opacity:$F}};return KR(p,{stroke:r("gradientStrokeColor"),strokeWidth:r("gradientStrokeWidth")},{opacity:r("gradientOpacity")}),tP({type:qF,role:"legend-band",key:RF,from:o,encode:p},n)}const oP="datum.".concat(TF,'<=0?"').concat(LF,'":datum.').concat(TF,'>=1?"').concat(NF,'":"').concat(AF,'"'),rP="datum.".concat(TF,'<=0?"').concat(EF,'":datum.').concat(TF,'>=1?"').concat(DF,'":"').concat("middle",'"');function sP(e,t,i,n){const o=ZF(e,t),r=o.isVertical(),s=jR(o.gradientThickness()),a=o.gradientLength();let l,c,u,h,d=o("labelOverlap"),g="";const f={enter:l={opacity:$F},update:c={opacity:UF,text:{field:IF}},exit:{opacity:$F}};return KR(f,{fill:o("labelColor"),fillOpacity:o("labelOpacity"),font:o("labelFont"),fontSize:o("labelFontSize"),fontStyle:o("labelFontStyle"),fontWeight:o("labelFontWeight"),limit:kO(e.labelLimit,t.gradientLabelLimit)}),r?(l.align={value:"left"},l.baseline=c.baseline={signal:rP},u="y",h="x",g="1-"):(l.align=c.align={signal:oP},l.baseline={value:"top"},u="x",h="y"),l[u]=c[u]={signal:g+"datum."+TF,mult:a},l[h]=c[h]=s,s.offset=kO(e.labelOffset,t.gradientLabelOffset)||0,d=d?{separation:o("labelSeparation"),method:d,order:"datum.index"}:void 0,tP({type:GF,role:JR,style:OF,key:RF,from:n,encode:f,overlap:d},i)}function aP(e,t,i,n,o){const r=ZF(e,t),s=i.entries,a=!(!s||!s.interactive),l=s?s.name:void 0,c=r("clipHeight"),u=r("symbolOffset"),h={data:"value"},d="(".concat(o,") ? datum.").concat("offset"," : datum.").concat(WF),g=c?jR(c):{field:WF},f="datum.".concat(MF),p="max(1, ".concat(o,")");let m,_,v,b,y;g.mult=.5,m={enter:_={opacity:$F,x:{signal:d,mult:.5,offset:u},y:g},update:v={opacity:UF,x:_.x,y:_.y},exit:{opacity:$F}};let w=null,C=null;e.fill||(w=t.symbolBaseFillColor,C=t.symbolBaseStrokeColor),KR(m,{fill:r("symbolFillColor",w),shape:r("symbolType"),size:r("symbolSize"),stroke:r("symbolStrokeColor",C),strokeDash:r("symbolDash"),strokeDashOffset:r("symbolDashOffset"),strokeWidth:r("symbolStrokeWidth")},{opacity:r("symbolOpacity")}),VF.forEach((t=>{e[t]&&(v[t]=_[t]={scale:e[t],field:RF})}));const S=tP({type:"symbol",role:"legend-symbol",key:RF,from:h,clip:!!c||void 0,encode:m},i.symbols),x=jR(u);x.offset=r("labelOffset"),m={enter:_={opacity:$F,x:{signal:d,offset:x},y:g},update:v={opacity:UF,text:{field:IF},x:_.x,y:_.y},exit:{opacity:$F}},KR(m,{align:r("labelAlign"),baseline:r("labelBaseline"),fill:r("labelColor"),fillOpacity:r("labelOpacity"),font:r("labelFont"),fontSize:r("labelFontSize"),fontStyle:r("labelFontStyle"),fontWeight:r("labelFontWeight"),limit:r("labelLimit")});const k=tP({type:GF,role:JR,style:OF,key:RF,from:h,encode:m},i.labels);return m={enter:{noBound:{value:!c},width:$F,height:c?jR(c):$F,opacity:$F},exit:{opacity:$F},update:v={opacity:UF,row:{signal:null},column:{signal:null}}},r.isVertical(!0)?(b="ceil(item.mark.items.length / ".concat(p,")"),v.row.signal="".concat(f,"%").concat(b),v.column.signal="floor(".concat(f," / ").concat(b,")"),y={field:["row",f]}):(v.row.signal="floor(".concat(f," / ").concat(p,")"),v.column.signal="".concat(f," % ").concat(p),y={field:f}),v.column.signal="(".concat(o,")?").concat(v.column.signal,":").concat(f),YF({role:QR,from:n={facet:{data:n,name:"value",groupby:MF}},encode:GR(m,s,HF),marks:[S,k],name:l,interactive:a,sort:y})}const lP='item.orient === "left"',cP='item.orient === "right"',uP="(".concat(lP," || ").concat(cP,")"),hP="datum.vgrad && ".concat(uP),dP=QF('"top"','"bottom"','"middle"'),gP=QF('"right"','"left"','"center"'),fP="datum.vgrad && ".concat(cP," ? (").concat(gP,") : (").concat(uP," && !(datum.vgrad && ").concat(lP,')) ? "left" : ').concat(JF),pP="item._anchor || (".concat(uP,' ? "middle" : "start")'),mP="".concat(hP," ? (").concat(lP," ? -90 : 90) : 0"),_P="".concat(uP," ? (datum.vgrad ? (").concat(cP,' ? "bottom" : "top") : ').concat(dP,') : "top"');function vP(e,t){let i;return ci(e)&&(e.signal?i=e.signal:e.path?i="pathShape("+bP(e.path)+")":e.sphere&&(i="geoShape("+bP(e.sphere)+', {type: "Sphere"})')),i?t.signalRef(i):!!e}function bP(e){return ci(e)&&e.signal?e.signal:gn(e)}function yP(e){const t=e.role||"";return t.indexOf("axis")&&t.indexOf("legend")&&t.indexOf("title")?e.type===jF?QR:t||ZR:t}function wP(e){return{marktype:e.type,name:e.name||void 0,role:e.role||yP(e),zindex:+e.zindex||void 0,aria:e.aria,description:e.description}}function CP(e,t){return e&&e.signal?t.signalRef(e.signal):!1!==e}function SP(e,t){const i=sc(e.type);i||qt("Unrecognized transform type: "+gn(e.type));const n=fO(i.type.toLowerCase(),null,xP(i,e,t));return e.signal&&t.addSignal(e.signal,t.proxy(n)),n.metadata=i.metadata||{},n}function xP(e,t,i){const n={},o=e.params.length;for(let r=0;rLP(e,t,i)))):LP(e,n,i)}(e,t,i):"projection"===n?i.projectionRef(t[e.name]):e.array&&!SO(o)?o.map((t=>DP(e,t,i))):DP(e,o,i):void(e.required&&qt("Missing required "+gn(t.type)+" parameter: "+gn(e.name)))}function DP(e,t,i){const n=e.type;if(SO(t))return MP(n)?qt("Expression references can not be signals."):IP(n)?i.fieldRef(t):TP(n)?i.compareRef(t):i.signalRef(t.signal);{const o=e.expr||IP(n);return o&&NP(t)?i.exprRef(t.expr,t.as):o&&EP(t)?_O(t.field,t.as):MP(n)?IT(t,i):AP(n)?mO(i.getData(t).values):IP(n)?_O(t):TP(n)?i.compareRef(t):t}}function LP(e,t,i){const n=e.params.length;let o;for(let i=0;ie&&e.expr,EP=e=>e&&e.field,AP=e=>"data"===e,MP=e=>"expr"===e,IP=e=>"field"===e,TP=e=>"compare"===e;function RP(e,t){return e.$ref?e:e.data&&e.data.$ref?e.data:mO(t.getData(e.data).output)}function OP(e,t,i,n,o){this.scope=e,this.input=t,this.output=i,this.values=n,this.aggregate=o,this.index={}}function FP(e){return rn(e)?e:null}function PP(e,t,i){const n=yO(i.op,i.field);let o;if(t.ops){for(let e=0,i=t.as.length;enull==e?"null":e)).join(",")+"),0)",t);l.update=c.$expr,l.params=c.$params}function WP(e,t){const i=yP(e),n=e.type===jF,o=e.from&&e.from.facet,r=e.overlap;let s,a,l,c,u,h,d,g=e.layout||i===QR||i===XR;const f=i===ZR||g||o,p=function(e,t,i){let n,o,r,s,a;return e?(n=e.facet)&&(t||qt("Only group marks can be faceted."),null!=n.field?s=a=RP(n,i):(e.data?a=mO(i.getData(e.data).aggregate):(r=SP($i({type:"aggregate",groupby:Ti(n.groupby)},n.aggregate),i),r.params.key=i.keyRef(n.groupby),r.params.pulse=RP(n,i),s=a=mO(i.add(r))),o=i.keyRef(n.groupby,!0))):s=mO(i.add(zO(null,[{}]))),s||(s=RP(e,i)),{key:o,pulse:s,parent:a}}(e.from,n,t);a=t.add(VO({key:p.key||(e.key?_O(e.key):void 0),pulse:p.pulse,clean:!n}));const m=mO(a);a=l=t.add(zO({pulse:m})),a=t.add(YO({markdef:wP(e),interactive:CP(e.interactive,t),clip:vP(e.clip,t),context:{$context:!0},groups:t.lookup(),parent:t.signals.parent?t.signalRef("parent"):null,index:t.markpath(),pulse:mO(a)}));const _=mO(a);a=c=t.add(HO(aO(e.encode,e.type,i,e.style,t,{mod:!1,pulse:_}))),a.params.parent=t.encode(),e.transform&&e.transform.forEach((e=>{const i=SP(e,t),n=i.metadata;(n.generates||n.changes)&&qt("Mark transforms should not generate new data."),n.nomod||(c.params.mod=!0),i.params.pulse=mO(a),t.add(a=i)})),e.sort&&(a=t.add(aF({sort:t.compareRef(e.sort),pulse:mO(a)})));const v=mO(a);(o||g)&&(g=t.add(lF({layout:t.objectProperty(e.layout),legends:t.legends,mark:_,pulse:v})),h=mO(g));const b=t.add(BO({mark:_,pulse:h||v}));d=mO(b),n&&(f&&(s=t.operators,s.pop(),g&&s.pop()),t.pushState(v,h||d,m),o?function(e,t,i){const n=e.from.facet,o=n.name,r=RP(n,t);let s;n.name||qt("Facet must have a name: "+gn(n)),n.data||qt("Facet must reference a data set: "+gn(n)),n.field?s=t.add(eF({field:t.fieldRef(n.field),pulse:r})):n.groupby?s=t.add(UO({key:t.keyRef(n.groupby),group:mO(t.proxy(i.parent)),pulse:r})):qt("Facet must specify groupby or field: "+gn(n));const a=t.fork(),l=a.add(zO()),c=a.add(sF({pulse:mO(l)}));a.addData(o,new OP(a,l,l,c)),a.addSignal("parent",null),s.params.subflow={$subflow:a.parse(e).toRuntime()}}(e,t,p):f?function(e,t,i){const n=t.add(eF({pulse:i.pulse})),o=t.fork();o.add(sF()),o.addSignal("parent",null),n.params.subflow={$subflow:o.parse(e).toRuntime()}}(e,t,p):t.parse(e),t.popState(),f&&(g&&s.push(g),s.push(b))),r&&(d=function(e,t,i){const n=e.method,o=e.bound,r=e.separation,s={separation:SO(r)?i.signalRef(r.signal):r,method:SO(n)?i.signalRef(n.signal):n,pulse:t};if(e.order&&(s.sort=i.compareRef({field:e.order})),o){const e=o.tolerance;s.boundTolerance=SO(e)?i.signalRef(e.signal):+e,s.boundScale=i.scaleRef(o.scale),s.boundOrient=o.orient}return mO(i.add(QO(s)))}(r,d,t));const y=t.add(oF({pulse:d})),w=t.add(sF({pulse:mO(y)},void 0,t.parent()));null!=e.name&&(u=e.name,t.addData(u,new OP(t,l,y,w)),e.on&&e.on.forEach((e=>{(e.insert||e.remove||e.toggle)&&qt("Marks only support modify triggers."),zP(e,t,u)})))}function VP(e,t,i){const n={enter:{},update:{}};return KR(n,{orient:e("orient"),offset:e("offset"),padding:e("padding"),titlePadding:e("titlePadding"),cornerRadius:e("cornerRadius"),fill:e("fillColor"),stroke:e("strokeColor"),strokeWidth:i.strokeWidth,strokeDash:i.strokeDash,x:e("legendX"),y:e("legendY"),format:t.format,formatType:t.formatType}),n}function HP(e,t,i){return t[e]?'scale("'.concat(t[e],'",datum)'):XF(e,i[0].encode)}OP.fromEntries=function(e,t){const i=t.length,n=t[i-1],o=t[i-2];let r=t[0],s=null,a=1;for(r&&"load"===r.type&&(r=t[1]),e.add(t[0]);ae===EF||e===DF,GP=(e,t,i)=>SO(e)?eB(e.signal,t,i):e===LF||e===DF?t:i,YP=(e,t,i)=>SO(e)?QP(e.signal,t,i):KP(e)?t:i,ZP=(e,t,i)=>SO(e)?JP(e.signal,t,i):KP(e)?i:t,XP=(e,t,i)=>SO(e)?tB(e.signal,t,i):e===DF?{value:t}:{value:i},QP=(e,t,i)=>iB("".concat(e," === '").concat(DF,"' || ").concat(e," === '").concat(EF,"'"),t,i),JP=(e,t,i)=>iB("".concat(e," !== '").concat(DF,"' && ").concat(e," !== '").concat(EF,"'"),t,i),eB=(e,t,i)=>oB("".concat(e," === '").concat(LF,"' || ").concat(e," === '").concat(DF,"'"),t,i),tB=(e,t,i)=>oB("".concat(e," === '").concat(DF,"'"),t,i),iB=(e,t,i)=>(t=null!=t?jR(t):t,i=null!=i?jR(i):i,nB(t)&&nB(i)?(t=t?t.signal||gn(t.value):null,i=i?i.signal||gn(i.value):null,{signal:"".concat(e," ? (").concat(t,") : (").concat(i,")")}):[$i({test:e},t)].concat(i||[])),nB=e=>null==e||1===Object.keys(e).length,oB=(e,t,i)=>({signal:"".concat(e," ? (").concat(sB(t),") : (").concat(sB(i),")")}),rB=(e,t,i,n,o)=>({signal:(null!=n?"".concat(e," === '").concat(LF,"' ? (").concat(sB(n),") : "):"")+(null!=i?"".concat(e," === '").concat(EF,"' ? (").concat(sB(i),") : "):"")+(null!=o?"".concat(e," === '").concat(NF,"' ? (").concat(sB(o),") : "):"")+(null!=t?"".concat(e," === '").concat(DF,"' ? (").concat(sB(t),") : "):"")+"(null)"}),sB=e=>SO(e)?e.signal:null==e?null:gn(e),aB=(e,t)=>{const i=e.signal;return i&&i.endsWith("(null)")?{signal:i.slice(0,-6)+t.signal}:e};function lB(e,t,i,n){let o;if(t&&Ki(t,e))return t[e];if(Ki(i,e))return i[e];if(e.startsWith("title")){switch(e){case"titleColor":o="fill";break;case"titleFont":case"titleFontSize":case"titleFontWeight":o=e[5].toLowerCase()+e.slice(6)}return n["guide-title"][o]}if(e.startsWith("label")){switch(e){case"labelColor":o="fill";break;case"labelFont":case"labelFontSize":o=e[5].toLowerCase()+e.slice(6)}return n["guide-label"][o]}return null}function cB(e){const t={};for(const i of e)if(i)for(const e in i)t[e]=1;return Object.keys(t)}function uB(e,t){return{scale:e.scale,range:t}}function hB(e,t,i,n,o){return{signal:'flush(range("'+e+'"), scale("'+e+'", datum.value), '+t+","+i+","+n+","+o+")"}}function dB(e,t,i,n,o,r){const s=ZF(e,t),a=e.orient,l=e.scale,c=GP(a,-1,1),u=DO(s("labelFlush")),h=DO(s("labelFlushOffset")),d=s("labelAlign"),g=s("labelBaseline");let f,p=0===u||!!u;const m=jR(o);m.mult=c,m.offset=jR(s("labelPadding")||0),m.offset.mult=c;const _={scale:l,field:RF,band:.5,offset:eP(r.offset,s("labelOffset"))},v=YP(a,p?hB(l,u,'"left"','"right"','"center"'):{value:"center"},((e,t,i)=>SO(e)?((e,t,i)=>oB("".concat(e," === '").concat(NF,"'"),t,i))(e.signal,t,i):e===NF?{value:t}:{value:i})(a,"left","right")),b=YP(a,XP(a,"bottom","top"),p?hB(l,u,'"top"','"bottom"','"middle"'):{value:"middle"}),y=hB(l,u,"-(".concat(h,")"),h,0);p=p&&h;const w={opacity:$F,x:YP(a,_,m),y:ZP(a,_,m)},C={enter:w,update:f={opacity:UF,text:{field:IF},x:w.x,y:w.y,align:v,baseline:b},exit:{opacity:$F,x:w.x,y:w.y}};KR(C,{dx:!d&&p?YP(a,y):null,dy:!g&&p?ZP(a,y):null}),KR(C,{angle:s("labelAngle"),fill:s("labelColor"),fillOpacity:s("labelOpacity"),font:s("labelFont"),fontSize:s("labelFontSize"),fontWeight:s("labelFontWeight"),fontStyle:s("labelFontStyle"),limit:s("labelLimit"),lineHeight:s("labelLineHeight")},{align:d,baseline:g});const S=s("labelBound");let x=s("labelOverlap");return x=x||S?{separation:s("labelSeparation"),method:x,order:"datum.index",bound:S?{scale:l,orient:a,tolerance:S}:null}:void 0,f.align!==v&&(f.align=aB(f.align,v)),f.baseline!==b&&(f.baseline=aB(f.baseline,b)),tP({type:GF,role:"axis-label",style:OF,key:RF,from:n,encode:C,overlap:x},i)}function gB(e,t){const i=function(e,t){var i,n,o,r=t.config,s=r.style,a=r.axis,l="band"===t.scaleType(e.scale)&&r.axisBand,c=e.orient;if(SO(c)){const e=cB([r.axisX,r.axisY]),t=cB([r.axisTop,r.axisBottom,r.axisLeft,r.axisRight]);for(o of(i={},e))i[o]=YP(c,lB(o,r.axisX,a,s),lB(o,r.axisY,a,s));for(o of(n={},t))n[o]=rB(c.signal,lB(o,r.axisTop,a,s),lB(o,r.axisBottom,a,s),lB(o,r.axisLeft,a,s),lB(o,r.axisRight,a,s))}else i=c===DF||c===EF?r.axisX:r.axisY,n=r["axis"+c[0].toUpperCase()+c.slice(1)];return i||n||l?$i({},a,i,n,l):a}(e,t),n=e.encode||{},o=n.axis||{},r=o.name||void 0,s=o.interactive,a=o.style,l=ZF(e,i),c=function(e){const t=e("tickBand");let i,n,o=e("tickOffset");return t?t.signal?(i={signal:"(".concat(t.signal,") === 'extent' ? 1 : 0.5")},n={signal:"(".concat(t.signal,") === 'extent'")},ci(o)||(o={signal:"(".concat(t.signal,") === 'extent' ? 0 : ").concat(o)})):"extent"===t?(i=1,n=!0,o=0):(i=.5,n=!1):(i=e("bandPosition"),n=e("tickExtra")),{extra:n,band:i,offset:o}}(l),u={scale:e.scale,ticks:!!l("ticks"),labels:!!l("labels"),grid:!!l("grid"),domain:!!l("domain"),title:null!=e.title},h=mO(t.add(zO({},[u]))),d=mO(t.add(PO({scale:t.scaleRef(e.scale),extra:t.property(c.extra),count:t.objectProperty(e.tickCount),values:t.objectProperty(e.values),minstep:t.property(e.tickMinStep),formatType:t.property(e.formatType),formatSpecifier:t.property(e.format)}))),g=[];let f;return u.grid&&g.push(function(e,t,i,n,o){const r=ZF(e,t),s=e.orient,a=e.gridScale,l=GP(s,1,-1),c=function(e,t){if(1===t);else if(ci(e)){let i=e=$i({},e);for(;null!=i.mult;){if(!ci(i.mult))return i.mult=SO(t)?{signal:"(".concat(i.mult,") * (").concat(t.signal,")")}:i.mult*t,e;i=i.mult=$i({},i.mult)}i.mult=t}else e=SO(t)?{signal:"(".concat(t.signal,") * (").concat(e||0,")")}:t*(e||0);return e}(e.offset,l);let u,h,d;const g={enter:u={opacity:$F},update:d={opacity:UF},exit:h={opacity:$F}};KR(g,{stroke:r("gridColor"),strokeCap:r("gridCap"),strokeDash:r("gridDash"),strokeDashOffset:r("gridDashOffset"),strokeOpacity:r("gridOpacity"),strokeWidth:r("gridWidth")});const f={scale:e.scale,field:RF,band:o.band,extra:o.extra,offset:o.offset,round:r("tickRound")},p=YP(s,{signal:"height"},{signal:"width"}),m=a?{scale:a,range:0,mult:l,offset:c}:{value:0,offset:c},_=a?{scale:a,range:1,mult:l,offset:c}:$i(p,{mult:l,offset:c});return u.x=d.x=YP(s,f,m),u.y=d.y=ZP(s,f,m),u.x2=d.x2=ZP(s,_),u.y2=d.y2=YP(s,_),h.x=YP(s,f),h.y=ZP(s,f),tP({type:KF,role:"axis-grid",key:RF,from:n,encode:g},i)}(e,i,n.grid,d,c)),u.ticks&&(f=l("tickSize"),g.push(function(e,t,i,n,o,r){const s=ZF(e,t),a=e.orient,l=GP(a,-1,1);let c,u,h;const d={enter:c={opacity:$F},update:h={opacity:UF},exit:u={opacity:$F}};KR(d,{stroke:s("tickColor"),strokeCap:s("tickCap"),strokeDash:s("tickDash"),strokeDashOffset:s("tickDashOffset"),strokeOpacity:s("tickOpacity"),strokeWidth:s("tickWidth")});const g=jR(o);g.mult=l;const f={scale:e.scale,field:RF,band:r.band,extra:r.extra,offset:r.offset,round:s("tickRound")};return h.y=c.y=YP(a,$F,f),h.y2=c.y2=YP(a,g),u.x=YP(a,f),h.x=c.x=ZP(a,$F,f),h.x2=c.x2=ZP(a,g),u.y=ZP(a,f),tP({type:KF,role:"axis-tick",key:RF,from:n,encode:d},i)}(e,i,n.ticks,d,f,c))),u.labels&&(f=u.ticks?f:0,g.push(dB(e,i,n.labels,d,f,c))),u.domain&&g.push(function(e,t,i,n){const o=ZF(e,t),r=e.orient;let s,a;const l={enter:s={opacity:$F},update:a={opacity:UF},exit:{opacity:$F}};KR(l,{stroke:o("domainColor"),strokeCap:o("domainCap"),strokeDash:o("domainDash"),strokeDashOffset:o("domainDashOffset"),strokeWidth:o("domainWidth"),strokeOpacity:o("domainOpacity")});const c=uB(e,0),u=uB(e,1);return s.x=a.x=YP(r,c,$F),s.x2=a.x2=YP(r,u),s.y=a.y=ZP(r,c,$F),s.y2=a.y2=ZP(r,u),tP({type:KF,role:"axis-domain",from:n,encode:l},i)}(e,i,n.domain,h)),u.title&&g.push(function(e,t,i,n){const o=ZF(e,t),r=e.orient,s=GP(r,-1,1);let a,l;const c={enter:a={opacity:$F,anchor:jR(o("titleAnchor",null)),align:{signal:JF}},update:l=$i({},a,{opacity:UF,text:jR(e.title)}),exit:{opacity:$F}},u={signal:'lerp(range("'.concat(e.scale,'"), ').concat(QF(0,1,.5),")")};return l.x=YP(r,u),l.y=ZP(r,u),a.angle=YP(r,$F,((e,t)=>SO(e)?{signal:"(".concat(e.signal,") * ").concat(90)}:{value:90*e})(s)),a.baseline=YP(r,XP(r,EF,DF),{value:EF}),l.angle=a.angle,l.baseline=a.baseline,KR(c,{fill:o("titleColor"),fillOpacity:o("titleOpacity"),font:o("titleFont"),fontSize:o("titleFontSize"),fontStyle:o("titleFontStyle"),fontWeight:o("titleFontWeight"),limit:o("titleLimit"),lineHeight:o("titleLineHeight")},{align:o("titleAlign"),angle:o("titleAngle"),baseline:o("titleBaseline")}),function(e,t,i,n){const o=(e,t)=>null!=e?(i.update[t]=aB(jR(e),i.update[t]),!1):!YR(t,n),r=o(e("titleX"),"x"),s=o(e("titleY"),"y");i.enter.auto=s===r?jR(s):YP(t,jR(s),jR(r))}(o,r,c,i),c.update.align=aB(c.update.align,a.align),c.update.angle=aB(c.update.angle,a.angle),c.update.baseline=aB(c.update.baseline,a.baseline),tP({type:GF,role:"axis-title",style:FF,from:n,encode:c},i)}(e,i,n.title,h)),WP(YF({role:"axis",from:h,encode:GR(fB(l,e),o,HF),marks:g,aria:l("aria"),description:l("description"),zindex:l("zindex"),name:r,interactive:s,style:a}),t)}function fB(e,t){const i={enter:{},update:{}};return KR(i,{orient:e("orient"),offset:e("offset")||0,position:kO(t.position,0),titlePadding:e("titlePadding"),minExtent:e("minExtent"),maxExtent:e("maxExtent"),range:{signal:'abs(span(range("'.concat(t.scale,'")))')},translate:e("translate"),format:t.format,formatType:t.formatType}),i}function pB(e,t,i){const n=Ti(e.signals),o=Ti(e.scales);return i||n.forEach((e=>dO(e,t))),Ti(e.projections).forEach((e=>function(e,t){const i=t.config.projection||{},n={};for(const i in e)"name"!==i&&(n[i]=kF(e[i],i,t));for(const e in i)null==n[e]&&(n[e]=kF(i[e],e,t));t.addProjection(e.name,n)}(e,t))),o.forEach((e=>function(e,t){const i=e.type||"linear";Sm(i)||qt("Unrecognized scale type: "+gn(i)),t.addScale(e.name,{type:i,domain:void 0})}(e,t))),Ti(e.data).forEach((e=>function(e,t){const i=[];e.transform&&e.transform.forEach((e=>{i.push(SP(e,t))})),e.on&&e.on.forEach((i=>{zP(i,t,e.name)})),t.addDataPipeline(e.name,function(e,t,i){const n=[];let o,r,s,a,l,c=null,u=!1,h=!1;for(e.values?SO(e.values)||xO(e.format)?(n.push(qP(t,e)),n.push(c=jP())):n.push(c=jP({$ingest:e.values,$format:e.format})):e.url?xO(e.url)||xO(e.format)?(n.push(qP(t,e)),n.push(c=jP())):n.push(c=jP({$request:e.url,$format:e.format})):e.source&&(c=o=Ti(e.source).map((e=>mO(t.getData(e).output))),n.push(null)),r=0,s=i.length;rdF(e,t))),(i||n).forEach((e=>function(e,t){const i=t.getSignal(e.name);let n=e.update;e.init&&(n?qt("Signals can not include both init and update expressions."):(n=e.init,i.initonly=!0)),n&&(n=IT(n,t),i.update=n.$expr,i.params=n.$params),e.on&&e.on.forEach((e=>function(e,t,i){const n=e.encode,o={target:i};let r=e.events,s=e.update,a=[];r||qt("Signal update missing events specification."),rn(r)&&(r=BR(r,t.isSubscope()?wO:CO)),r=Ti(r).filter((e=>e.signal||e.scale?(a.push(e),0):1)),a.length>1&&(a=[RO(a)]),r.length&&a.push(r.length>1?{merge:r}:r[0]),null!=n&&(s&&qt("Signal encode and update are mutually exclusive."),s="encode(item(),"+gn(n)+")"),o.update=rn(s)?IT(s,t):null!=s.expr?IT(s.expr,t):null!=s.value?s.value:null!=s.signal?{$expr:TO,$params:{$value:t.signalRef(s.signal)}}:qt("Invalid signal update specification."),e.force&&(o.options={force:!0}),a.forEach((e=>t.addUpdate($i(function(e,t){return{source:e.signal?t.signalRef(e.signal):e.scale?t.scaleRef(e.scale):NO(e,t)}}(e,t),o))))}(e,t,i.id)))}(e,t))),Ti(e.axes).forEach((e=>gB(e,t))),Ti(e.marks).forEach((e=>WP(e,t))),Ti(e.legends).forEach((e=>function(e,t){const i=t.config.legend,n=e.encode||{},o=ZF(e,i),r=n.legend||{},s=r.name||void 0,a=r.interactive,l=r.style,c={};let u,h,d,g=0;VF.forEach((t=>e[t]?(c[t]=e[t],g=g||e[t]):0)),g||qt("Missing valid scale for legend.");const f=function(e,t){let i=e.type||PF;return e.type||1!==function(e){return VF.reduce(((t,i)=>t+(e[i]?1:0)),0)}(e)||!e.fill&&!e.stroke||(i=km(t)?BF:Lm(t)?zF:PF),i!==BF?i:Lm(t)?zF:BF}(e,t.scaleType(g)),p={title:null!=e.title,scales:c,type:f,vgrad:"symbol"!==f&&o.isVertical()},m=mO(t.add(zO(null,[p]))),_=mO(t.add(KO(h={type:f,scale:t.scaleRef(g),count:t.objectProperty(o("tickCount")),limit:t.property(o("symbolLimit")),values:t.objectProperty(e.values),minstep:t.property(e.tickMinStep),formatType:t.property(e.formatType),formatSpecifier:t.property(e.format)})));return f===BF?(d=[iP(e,g,i,n.gradient),sP(e,i,n.labels,_)],h.count=h.count||t.signalRef("max(2,2*floor((".concat(DO(o.gradientLength()),")/100))"))):f===zF?d=[nP(e,g,i,n.gradient,_),sP(e,i,n.labels,_)]:(u=function(e,t){const i=ZF(e,t);return{align:i("gridAlign"),columns:i.entryColumns(),center:{row:!0,column:!1},padding:{row:i("rowPadding"),column:i("columnPadding")}}}(e,i),d=[aP(e,i,n,_,DO(u.columns))],h.size=function(e,t,i){const n=DO(HP("size",e,i)),o=DO(HP("strokeWidth",e,i)),r=DO(function(e,t,i){return XF("fontSize",e)||function(e,t,i){const n=t.config.style["guide-label"];return n&&n.fontSize}(0,t)}(i[1].encode,t));return IT("max(ceil(sqrt(".concat(n,")+").concat(o,"),").concat(r,")"),t)}(e,t,d[0].marks)),d=[YF({role:"legend-entry",from:m,encode:{enter:{x:{value:0},y:{value:0}}},marks:d,layout:u,interactive:a})],p.title&&d.push(function(e,t,i,n){const o=ZF(e,t),r={enter:{opacity:$F},update:{opacity:UF,x:{field:{group:"padding"}},y:{field:{group:"padding"}}},exit:{opacity:$F}};return KR(r,{orient:o("titleOrient"),_anchor:o("titleAnchor"),anchor:{signal:pP},angle:{signal:mP},align:{signal:fP},baseline:{signal:_P},text:e.title,fill:o("titleColor"),fillOpacity:o("titleOpacity"),font:o("titleFont"),fontSize:o("titleFontSize"),fontStyle:o("titleFontStyle"),fontWeight:o("titleFontWeight"),limit:o("titleLimit"),lineHeight:o("titleLineHeight")},{align:o("titleAlign"),baseline:o("titleBaseline")}),tP({type:GF,role:"legend-title",style:FF,from:n,encode:r},i)}(e,i,n.title,m)),WP(YF({role:"legend",from:m,encode:GR(VP(o,e,i),r,HF),marks:d,aria:o("aria"),description:o("description"),zindex:o("zindex"),name:s,interactive:a,style:l}),t)}(e,t))),e.title&&function(e,t){const i=ZF(e=rn(e)?{text:e}:e,t.config.title),n=e.encode||{},o=n.group||{},r=o.name||void 0,s=o.interactive,a=o.style,l=[],c=mO(t.add(zO(null,[{}])));l.push(function(e,t,i,n){const o={value:0},r={enter:{opacity:o},update:{opacity:{value:1}},exit:{opacity:o}};return KR(r,{text:e.text,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:t("dx"),dy:t("dy"),fill:t("color"),font:t("font"),fontSize:t("fontSize"),fontStyle:t("fontStyle"),fontWeight:t("fontWeight"),lineHeight:t("lineHeight")},{align:t("align"),angle:t("angle"),baseline:t("baseline")}),tP({type:GF,role:"title-text",style:"group-title",from:n,encode:r},i)}(e,i,function(e){const t=e.encode;return t&&t.title||$i({name:e.name,interactive:e.interactive,style:e.style},t)}(e),c)),e.subtitle&&l.push(function(e,t,i,n){const o={value:0},r={enter:{opacity:o},update:{opacity:{value:1}},exit:{opacity:o}};return KR(r,{text:e.subtitle,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:t("dx"),dy:t("dy"),fill:t("subtitleColor"),font:t("subtitleFont"),fontSize:t("subtitleFontSize"),fontStyle:t("subtitleFontStyle"),fontWeight:t("subtitleFontWeight"),lineHeight:t("subtitleLineHeight")},{align:t("align"),angle:t("angle"),baseline:t("baseline")}),tP({type:GF,role:"title-subtitle",style:"group-subtitle",from:n,encode:r},i)}(e,i,n.subtitle,c)),WP(YF({role:"title",from:c,encode:UP(i,o),marks:l,aria:i("aria"),description:i("description"),zindex:i("zindex"),name:r,interactive:s,style:a}),t)}(e.title,t),t.parseLambdas(),t}function mB(e,t){return t&&t.signal?{name:e,update:t.signal}:{name:e,value:t}}function _B(e,t){this.config=e||{},this.options=t||{},this.bindings=[],this.field={},this.signals={},this.lambdas={},this.scales={},this.events={},this.data={},this.streams=[],this.updates=[],this.operators=[],this.eventConfig=null,this.locale=null,this._id=0,this._subid=0,this._nextsub=[0],this._parent=[],this._encode=[],this._lookup=[],this._markpath=[]}function vB(e){this.config=e.config,this.options=e.options,this.legends=e.legends,this.field=Object.create(e.field),this.signals=Object.create(e.signals),this.lambdas=Object.create(e.lambdas),this.scales=Object.create(e.scales),this.events=Object.create(e.events),this.data=Object.create(e.data),this.streams=[],this.updates=[],this.operators=[],this._id=0,this._subid=++e._nextsub[0],this._nextsub=e._nextsub,this._parent=e._parent.slice(),this._encode=e._encode.slice(),this._lookup=e._lookup.slice(),this._markpath=e._markpath}function bB(e){return(li(e)?yB:wB)(e)}function yB(e){const t=e.length;let i="[";for(let n=0;n0?",":"")+(ci(t)?t.signal||bB(t):gn(t))}return i+"]"}function wB(e){let t,i,n="{",o=0;for(t in e)i=e[t],n+=(++o>1?",":"")+gn(t)+":"+(ci(i)?i.signal||bB(i):gn(i));return n+"}"}function CB(e,t,i){return ci(e)||qt("Input Vega specification must be an object."),function(e,t){const i=t.config,n=mO(t.root=t.add(pO())),o=function(e,t){const i=i=>kO(e[i],t[i]),n=[mB("background",i("background")),mB("autosize",HR(i("autosize"))),mB("padding",UR(i("padding"))),mB("width",i("width")||0),mB("height",i("height")||0)],o=n.reduce(((e,t)=>(e[t.name]=t,e)),{}),r={};return Ti(e.signals).forEach((e=>{Ki(o,e.name)?e=$i(o[e.name],e):n.push(e),r[e.name]=e})),Ti(t.signals).forEach((e=>{Ki(r,e.name)||Ki(o,e.name)||n.push(e)})),n}(e,i);o.forEach((e=>dO(e,t))),t.description=e.description||i.description,t.eventConfig=i.events,t.legends=t.objectProperty(i.legend&&i.legend.layout),t.locale=i.locale;const r=t.add(zO()),s=t.add(HO(aO((e=>GR({enter:{x:{value:0},y:{value:0}},update:{width:{signal:"width"},height:{signal:"height"}}},e))(e.encode),jF,XR,e.style,t,{pulse:mO(r)}))),a=t.add(lF({layout:t.objectProperty(e.layout),legends:t.legends,autosize:t.signalRef("autosize"),mark:n,pulse:mO(s)}));t.operators.pop(),t.pushState(mO(s),mO(a),null),pB(e,t,o),t.operators.push(a);let l=t.add(BO({mark:n,pulse:mO(a)}));return l=t.add(oF({pulse:mO(l)})),l=t.add(sF({pulse:mO(l)})),t.addData("root",new OP(t,r,r,l)),t}(e,new _B(t=hi(function(){const e="sans-serif",t="#4c78a8",i="#000",n="#888",o="#ddd";return{description:"Vega visualization",padding:0,autosize:"pad",background:null,events:{defaults:{allow:["wheel"]}},group:null,mark:null,arc:{fill:t},area:{fill:t},image:null,line:{stroke:t,strokeWidth:2},path:{stroke:t},rect:{fill:t},rule:{stroke:i},shape:{stroke:t},symbol:{fill:t,size:64},text:{fill:i,font:e,fontSize:11},trail:{fill:t,size:2},style:{"guide-label":{fill:i,font:e,fontSize:10},"guide-title":{fill:i,font:e,fontSize:11,fontWeight:"bold"},"group-title":{fill:i,font:e,fontSize:13,fontWeight:"bold"},"group-subtitle":{fill:i,font:e,fontSize:12},point:{size:30,strokeWidth:2,shape:"circle"},circle:{size:30,strokeWidth:2},square:{size:30,strokeWidth:2,shape:"square"},cell:{fill:"transparent",stroke:o}},title:{orient:"top",anchor:"middle",offset:4,subtitlePadding:3},axis:{minExtent:0,maxExtent:200,bandPosition:.5,domain:!0,domainWidth:1,domainColor:n,grid:!1,gridWidth:1,gridColor:o,labels:!0,labelAngle:0,labelLimit:180,labelOffset:0,labelPadding:2,ticks:!0,tickColor:n,tickOffset:0,tickRound:!0,tickSize:5,tickWidth:1,titlePadding:4},axisBand:{tickOffset:-.5},projection:{type:"mercator"},legend:{orient:"right",padding:0,gridAlign:"each",columnPadding:10,rowPadding:2,symbolDirection:"vertical",gradientDirection:"vertical",gradientLength:200,gradientThickness:16,gradientStrokeColor:o,gradientStrokeWidth:0,gradientLabelOffset:2,labelAlign:"left",labelBaseline:"middle",labelLimit:160,labelOffset:4,labelOverlap:!0,symbolLimit:30,symbolType:"circle",symbolSize:100,symbolOffset:0,symbolStrokeWidth:1.5,symbolBaseFillColor:"transparent",symbolBaseStrokeColor:n,titleLimit:180,titleOrient:"top",titlePadding:5,layout:{offset:18,direction:"horizontal",left:{direction:"vertical"},right:{direction:"vertical"}}},range:{category:{scheme:"tableau10"},ordinal:{scheme:"blues"},heatmap:{scheme:"yellowgreenblue"},ramp:{scheme:"blues"},diverging:{scheme:"blueorange",extent:[1,0]},symbol:["circle","square","triangle-up","cross","diamond","triangle-right","triangle-down","triangle-left"]}}}(),t,e.config),i)).toRuntime()}_B.prototype=vB.prototype={parse(e){return pB(e,this)},fork(){return new vB(this)},isSubscope(){return this._subid>0},toRuntime(){return this.finish(),{description:this.description,operators:this.operators,streams:this.streams,updates:this.updates,bindings:this.bindings,eventConfig:this.eventConfig,locale:this.locale}},id(){return(this._subid?this._subid+":":0)+this._id++},add(e){return this.operators.push(e),e.id=this.id(),e.refs&&(e.refs.forEach((t=>{t.$ref=e.id})),e.refs=null),e},proxy(e){const t=e instanceof gO?mO(e):e;return this.add(iF({value:t}))},addStream(e){return this.streams.push(e),e.id=this.id(),e},addUpdate(e){return this.updates.push(e),e},finish(){let e,t;for(e in this.root&&(this.root.root=!0),this.signals)this.signals[e].signal=e;for(e in this.scales)this.scales[e].scale=e;function i(e,t,i){let n,o;e&&(n=e.data||(e.data={}),o=n[t]||(n[t]=[]),o.push(i))}for(e in this.data){t=this.data[e],i(t.input,e,"input"),i(t.output,e,"output"),i(t.values,e,"values");for(const n in t.index)i(t.index[n],e,"index:"+n)}return this},pushState(e,t,i){this._encode.push(mO(this.add(sF({pulse:e})))),this._parent.push(t),this._lookup.push(i?mO(this.proxy(i)):null),this._markpath.push(-1)},popState(){this._encode.pop(),this._parent.pop(),this._lookup.pop(),this._markpath.pop()},parent(){return fi(this._parent)},encode(){return fi(this._encode)},lookup(){return fi(this._lookup)},markpath(){const e=this._markpath;return++e[e.length-1]},fieldRef(e,t){if(rn(e))return _O(e,t);e.signal||qt("Unsupported field reference: "+gn(e));const i=e.signal;let n=this.field[i];if(!n){const e={name:this.signalRef(i)};t&&(e.as=t),this.field[i]=n=mO(this.add(jO(e)))}return n},compareRef(e){let t=!1;const i=e=>SO(e)?(t=!0,this.signalRef(e.signal)):function(e){return e&&e.expr}(e)?(t=!0,this.exprRef(e.expr)):e,n=Ti(e.field).map(i),o=Ti(e.order).map(i);return t?mO(this.add(WO({fields:n,orders:o}))):bO(n,o)},keyRef(e,t){let i=!1;const n=this.signals;return e=Ti(e).map((e=>SO(e)?(i=!0,mO(n[e.signal])):e)),i?mO(this.add(qO({fields:e,flat:t}))):function(e,t){const i={$key:e};return t&&(i.$flat=!0),i}(e,t)},sortRef(e){if(!e)return e;const t=yO(e.op,e.field),i=e.order||"ascending";return i.signal?mO(this.add(WO({fields:t,orders:this.signalRef(i.signal)}))):bO(t,i)},event(e,t){const i=e+":"+t;if(!this.events[i]){const n=this.id();this.streams.push({id:n,source:e,type:t}),this.events[i]=n}return this.events[i]},hasOwnSignal(e){return Ki(this.signals,e)},addSignal(e,t){this.hasOwnSignal(e)&&qt("Duplicate signal name: "+gn(e));const i=t instanceof gO?t:this.add(pO(t));return this.signals[e]=i},getSignal(e){return this.signals[e]||qt("Unrecognized signal name: "+gn(e)),this.signals[e]},signalRef(e){return this.signals[e]?mO(this.signals[e]):(Ki(this.lambdas,e)||(this.lambdas[e]=this.add(pO(null))),mO(this.lambdas[e]))},parseLambdas(){const e=Object.keys(this.lambdas);for(let t=0,i=e.length;t=48&&t<=57))return!1;i++}return!0}function MB(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function IB(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function TB(e){if(void 0===e)return!0;if(e)if(Array.isArray(e)){for(var t=0,i=e.length;t=u){if(i&&"add"===t.op&&d>l.length)throw new FB("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",r,t,e);if(!1===(s=zB[t.op].call(t,l,d,e)).test)throw new FB("Test operation failed","TEST_OPERATION_FAILED",r,t,e);return s}}else if(d&&-1!=d.indexOf("~")&&(d=IB(d)),c>=u){if(!1===(s=BB[t.op].call(t,l,d,e)).test)throw new FB("Test operation failed","TEST_OPERATION_FAILED",r,t,e);return s}l=l[d]}}function HB(e,t,i,n,o){if(void 0===n&&(n=!0),void 0===o&&(o=!0),i&&!Array.isArray(t))throw new FB("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");n||(e=EB(e));for(var r=new Array(t.length),s=0,a=t.length;s0)throw new FB('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,i);if(("move"===e.op||"copy"===e.op)&&"string"!=typeof e.from)throw new FB("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,i);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&void 0===e.value)throw new FB("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,i);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&TB(e.value))throw new FB("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,i);if(i)if("add"==e.op){var o=e.path.split("/").length,r=n.split("/").length;if(o!==r+1&&o!==r)throw new FB("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,i)}else if("replace"===e.op||"remove"===e.op||"_get"===e.op){if(e.path!==n)throw new FB("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,i)}else if("move"===e.op||"copy"===e.op){var s=jB([{op:"_get",path:e.from,value:void 0}],i);if(s&&"OPERATION_PATH_UNRESOLVABLE"===s.name)throw new FB("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,i)}}function jB(e,t,i){try{if(!Array.isArray(e))throw new FB("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)HB(EB(t),EB(e),i||!0);else{i=i||UB;for(var n=0;n0&&(e.patches=[],e.callback&&e.callback(n)),n}function JB(e,t,i,n,o){if(t!==e){"function"==typeof t.toJSON&&(t=t.toJSON());for(var r=NB(t),s=NB(e),a=!1,l=s.length-1;l>=0;l--){var c=e[h=s[l]];if(!LB(t,h)||void 0===t[h]&&void 0!==c&&!1===Array.isArray(t))Array.isArray(e)===Array.isArray(t)?(o&&i.push({op:"test",path:n+"/"+MB(h),value:EB(c)}),i.push({op:"remove",path:n+"/"+MB(h)}),a=!0):(o&&i.push({op:"test",path:n,value:e}),i.push({op:"replace",path:n,value:t}));else{var u=t[h];"object"==typeof c&&null!=c&&"object"==typeof u&&null!=u?JB(c,u,i,n+"/"+MB(h),o):c!==u&&(o&&i.push({op:"test",path:n+"/"+MB(h),value:EB(c)}),i.push({op:"replace",path:n+"/"+MB(h),value:EB(u)}))}}if(a||r.length!=s.length)for(l=0;lfz(e,t)))}:uz(e)?{or:e.or.map((e=>fz(e,t)))}:t(e)}const pz=az(),mz=rz();function _z(e,t){const i={};for(const n of t)Ki(e,n)&&(i[n]=e[n]);return i}function vz(e,t){const i={...e};for(const e of t)delete i[e];return i}Set.prototype.toJSON=function(){return`Set(${[...this].map((e=>cz()(e))).join(",")})`};const bz=cz();function yz(e){if(nn(e))return e;const t=rn(e)?e:cz()(e);if(t.length<250)return t;let i=0;for(let e=0;e0===t?e:`[${e}]`)),n=e.map(((t,i)=>e.slice(0,i+1).join("")));for(const e of n)t.add(e)}return t}function Iz(e,t){return void 0===e||void 0===t||Az(Mz(e),Mz(t))}function Tz(e){return 0===Rz(e).length}const Rz=Object.keys,Oz=Object.values,Fz=Object.entries;function Pz(e){return!0===e||!1===e}function Bz(e){const t=e.replace(/\W/g,"_");return(e.match(/^\d+/)?"_":"")+t}function zz(e,t){return dz(e)?`!(${zz(e.not,t)})`:hz(e)?`(${e.and.map((e=>zz(e,t))).join(") && (")})`:uz(e)?`(${e.or.map((e=>zz(e,t))).join(") || (")})`:t(e)}function Wz(e,t){if(0===t.length)return!0;const i=t.shift();return i in e&&Wz(e[i],t)&&delete e[i],Tz(e)}function Vz(e){return e.charAt(0).toUpperCase()+e.substr(1)}function Hz(e,t="datum"){const i=Kt(e),n=[];for(let e=1;e<=i.length;e++){const o=`[${i.slice(0,e).map(gn).join("][")}]`;n.push(`${t}${o}`)}return n.join(" && ")}function $z(e,t="datum"){return`${t}[${gn(Kt(e).join("."))}]`}function Uz(e){return e.replace(/(\[|\]|\.|'|")/g,"\\$1")}function jz(e){return`${Kt(e).map(Uz).join("\\.")}`}function qz(e,t,i){return e.replace(new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"g"),i)}function Kz(e){return`${Kt(e).join(".")}`}function Gz(e){return e?Kt(e).length:0}function Yz(...e){for(const t of e)if(void 0!==t)return t}let Zz=42;function Xz(e){const t=++Zz;return e?String(e)+t:t}function Qz(){Zz=42}function Jz(e){return eW(e)?e:`__${e}`}function eW(e){return e.startsWith("__")}function tW(e){if(void 0!==e)return(e%360+360)%360}function iW(e){return!!nn(e)||!isNaN(e)&&!isNaN(parseFloat(e))}const nW="row",oW="column",rW="facet",sW="x",aW="y",lW="x2",cW="y2",uW="radius",hW="radius2",dW="theta",gW="theta2",fW="latitude",pW="longitude",mW="latitude2",_W="longitude2",vW="color",bW="fill",yW="stroke",wW="shape",CW="size",SW="angle",xW="opacity",kW="fillOpacity",DW="strokeOpacity",LW="strokeWidth",NW="strokeDash",EW="text",AW="order",MW="detail",IW="key",TW="tooltip",RW="href",OW="url",FW="description",PW={theta:1,theta2:1,radius:1,radius2:1};function BW(e){return e in PW}const zW={longitude:1,longitude2:1,latitude:1,latitude2:1},WW=Rz(zW),VW={x:1,y:1,x2:1,y2:1,...PW,...zW,color:1,fill:1,stroke:1,opacity:1,fillOpacity:1,strokeOpacity:1,strokeWidth:1,strokeDash:1,size:1,angle:1,shape:1,order:1,text:1,detail:1,key:1,tooltip:1,href:1,url:1,description:1};function HW(e){return e===vW||e===bW||e===yW}const $W={row:1,column:1,facet:1},UW=Rz($W),jW={...VW,...$W},qW=Rz(jW),{order:KW,detail:GW,tooltip:YW,...ZW}=jW,{row:XW,column:QW,facet:JW,...eV}=ZW;function tV(e){return!!jW[e]}Rz(ZW),Rz(eV);const iV=[lW,cW,mW,_W,gW,hW];function nV(e){return oV(e)!==e}function oV(e){switch(e){case lW:return sW;case cW:return aW;case mW:return fW;case _W:return pW;case gW:return dW;case hW:return uW}return e}function rV(e){if(BW(e))switch(e){case dW:return"startAngle";case gW:return"endAngle";case uW:return"outerRadius";case hW:return"innerRadius"}return e}function sV(e){switch(e){case sW:return lW;case aW:return cW;case fW:return mW;case pW:return _W;case dW:return gW;case uW:return hW}}function aV(e){switch(e){case sW:case lW:return"width";case aW:case cW:return"height"}}Rz(VW);const{x:lV,y:cV,x2:uV,y2:hV,latitude:dV,longitude:gV,latitude2:fV,longitude2:pV,theta:mV,theta2:_V,radius:vV,radius2:bV,...yV}=VW,wV=Rz(yV),CV={x:1,y:1},SV=Rz(CV);function xV(e){return e in CV}const kV={theta:1,radius:1},DV=Rz(kV);function LV(e){return"width"===e?sW:aW}const{text:NV,tooltip:EV,href:AV,url:MV,description:IV,detail:TV,key:RV,order:OV,...FV}=yV,PV=Rz(FV),BV={...CV,...kV,...FV},zV=Rz(BV);function WV(e){return!!BV[e]}const VV={arc:"always",area:"always",bar:"always",circle:"always",geoshape:"always",image:"always",line:"always",rule:"always",point:"always",rect:"always",square:"always",trail:"always",text:"always",tick:"always"},{geoshape:HV,...$V}=VV;function UV(e){switch(e){case sW:case aW:case dW:case uW:case CW:case SW:case LW:case xW:case kW:case DW:case lW:case cW:case gW:case hW:return;case rW:case nW:case oW:case wW:case NW:case EW:case TW:case RW:case OW:case FW:return"discrete";case vW:case bW:case yW:return"flexible";case fW:case pW:case mW:case _W:case MW:case IW:case AW:return}}const jV={argmax:1,argmin:1,average:1,count:1,distinct:1,product:1,max:1,mean:1,median:1,min:1,missing:1,q1:1,q3:1,ci0:1,ci1:1,stderr:1,stdev:1,stdevp:1,sum:1,valid:1,values:1,variance:1,variancep:1},qV={count:1,min:1,max:1};function KV(e){return!!e&&!!e.argmin}function GV(e){return!!e&&!!e.argmax}function YV(e){return rn(e)&&!!jV[e]}Rz(jV);const ZV=["count","valid","missing","distinct"];function XV(e){return rn(e)&&Cz(ZV,e)}const QV=["count","sum","distinct","valid","missing"],JV=vn(["mean","average","median","q1","q3","min","max"]);function eH(e){return Ji(e)&&(e=Yj(e,void 0)),"bin"+Rz(e).map((t=>oH(e[t])?Bz(`_${t}_${Fz(e[t])}`):Bz(`_${t}_${e[t]}`))).join("")}function tH(e){return!0===e||nH(e)&&!e.binned}function iH(e){return"binned"===e||nH(e)&&!0===e.binned}function nH(e){return ci(e)}function oH(e){return e?.param}function rH(e){switch(e){case nW:case oW:case CW:case vW:case bW:case yW:case LW:case xW:case kW:case DW:case wW:return 6;case NW:return 4;default:return 10}}function sH(e){return e&&!!e.expr}function aH(e){const t=Rz(e||{}),i={};for(const n of t)i[n]=_H(e[n]);return i}function lH(e){const{anchor:t,frame:i,offset:n,orient:o,color:r,subtitleColor:s,subtitleFont:a,subtitleFontSize:l,subtitleFontStyle:c,subtitleFontWeight:u,subtitleLineHeight:h,subtitlePadding:d,...g}=e,f={...g,...r?{fill:r}:{}},p={...t?{anchor:t}:{},...i?{frame:i}:{},...n?{offset:n}:{},...o?{orient:o}:{}},m={...s?{subtitleColor:s}:{},...a?{subtitleFont:a}:{},...l?{subtitleFontSize:l}:{},...c?{subtitleFontStyle:c}:{},...u?{subtitleFontWeight:u}:{},...h?{subtitleLineHeight:h}:{},...d?{subtitlePadding:d}:{}};return{titleMarkConfig:f,subtitleMarkConfig:_z(f,["align","baseline","dx","dy","limit"]),nonMark:p,subtitle:m}}function cH(e){return rn(e)||li(e)&&rn(e[0])}function uH(e){return e&&!!e.signal}function hH(e){return!!e.step}function dH(e){return!li(e)&&"field"in e&&"data"in e}const gH=Rz({aria:1,description:1,ariaRole:1,ariaRoleDescription:1,blend:1,opacity:1,fill:1,fillOpacity:1,stroke:1,strokeCap:1,strokeWidth:1,strokeOpacity:1,strokeDash:1,strokeDashOffset:1,strokeJoin:1,strokeOffset:1,strokeMiterLimit:1,startAngle:1,endAngle:1,padAngle:1,innerRadius:1,outerRadius:1,size:1,shape:1,interpolate:1,tension:1,orient:1,align:1,baseline:1,text:1,dir:1,dx:1,dy:1,ellipsis:1,limit:1,radius:1,theta:1,angle:1,font:1,fontSize:1,fontWeight:1,fontStyle:1,lineBreak:1,lineHeight:1,cursor:1,href:1,tooltip:1,cornerRadius:1,cornerRadiusTopLeft:1,cornerRadiusTopRight:1,cornerRadiusBottomLeft:1,cornerRadiusBottomRight:1,aspect:1,width:1,height:1,url:1,smooth:1}),fH={arc:1,area:1,group:1,image:1,line:1,path:1,rect:1,rule:1,shape:1,symbol:1,text:1,trail:1},pH=["cornerRadius","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomLeft","cornerRadiusBottomRight"];function mH(e){const t=li(e.condition)?e.condition.map(vH):vH(e.condition);return{..._H(e),condition:t}}function _H(e){if(sH(e)){const{expr:t,...i}=e;return{signal:t,...i}}return e}function vH(e){if(sH(e)){const{expr:t,...i}=e;return{signal:t,...i}}return e}function bH(e){if(sH(e)){const{expr:t,...i}=e;return{signal:t,...i}}return uH(e)?e:void 0!==e?{value:e}:void 0}function yH(e){return uH(e)?e.signal:gn(e.value)}function wH(e){return uH(e)?e.signal:null==e?null:gn(e)}function CH(e,t,i){for(const n of i){const i=kH(n,t.markDef,t.config);void 0!==i&&(e[n]=bH(i))}return e}function SH(e){return[].concat(e.type,e.style??[])}function xH(e,t,i,n={}){const{vgChannel:o,ignoreVgConfig:r}=n;return o&&void 0!==t[o]?t[o]:void 0!==t[e]?t[e]:!r||o&&o!==e?kH(e,t,i,n):void 0}function kH(e,t,i,{vgChannel:n}={}){return Yz(n?DH(e,t,i.style):void 0,DH(e,t,i.style),n?i[t.type][n]:void 0,i[t.type][e],n?i.mark[n]:i.mark[e])}function DH(e,t,i){return LH(e,SH(t),i)}function LH(e,t,i){let n;t=Ti(t);for(const o of t){const t=i[o];t&&void 0!==t[e]&&(n=t[e])}return n}function NH(e,t){return Ti(e).reduce(((e,i)=>(e.field.push(Oj(i,t)),e.order.push(i.sort??"ascending"),e)),{field:[],order:[]})}function EH(e,t){const i=[...e];return t.forEach((e=>{for(const t of i)if(pz(t,e))return;i.push(e)})),i}function AH(e,t){return pz(e,t)||!t?e:e?[...Ti(e),...Ti(t)].join(", "):t}function MH(e,t){const i=e.value,n=t.value;if(null==i||null===n)return{explicit:e.explicit,value:null};if((cH(i)||uH(i))&&(cH(n)||uH(n)))return{explicit:e.explicit,value:AH(i,n)};if(cH(i)||uH(i))return{explicit:e.explicit,value:i};if(cH(n)||uH(n))return{explicit:e.explicit,value:n};if(!(cH(i)||uH(i)||cH(n)||uH(n)))return{explicit:e.explicit,value:EH(i,n)};throw new Error("It should never reach here")}function IH(e){return`Invalid specification ${bz(e)}. Make sure the specification includes at least one of the following properties: "mark", "layer", "facet", "hconcat", "vconcat", "concat", or "repeat".`}function TH(e){return("width"==e?"Width":"Height")+' "container" only works for single views and layered views.'}function RH(e){return`${"width"==e?"Width":"Height"} "container" only works well with autosize "fit" or "fit-${"width"==e?"x":"y"}".`}function OH(e){return e?`Dropping "fit-${e}" because spec has discrete ${aV(e)}.`:'Dropping "fit" because spec has discrete size.'}function FH(e){return`Unknown field for ${e}. Cannot calculate view size.`}function PH(e){return`Cannot project a selection on encoding channel "${e}", which has no field.`}function BH(e,t){return`Cannot project a selection on encoding channel "${e}" as it uses an aggregate function ("${t}").`}function zH(e){return`Selection not supported for ${e} yet.`}function WH(e){return`The "columns" property cannot be used when "${e}" has nested row/column.`}function VH(e,t,i){return`An ancestor parsed field "${e}" as ${i} but a child wants to parse the field as ${t}.`}function HH(e){return`Config.customFormatTypes is not true, thus custom format type and format for channel ${e} are dropped.`}function $H(e){return`Invalid field type "${e}".`}function UH(e,t){const{fill:i,stroke:n}=t;return`Dropping color ${e} as the plot also has ${i&&n?"fill and stroke":i?"fill":"stroke"}.`}function jH(e,t){return`Dropping ${bz(e)} from channel "${t}" since it does not contain any data field, datum, value, or signal.`}function qH(e,t,i){return`${e} dropped as it is incompatible with "${t}"${i?` when ${i}`:""}.`}function KH(e){return`${e} encoding should be discrete (ordinal / nominal / binned).`}function GH(e){return`${e} encoding should be discrete (ordinal / nominal / binned) or use a discretizing scale (e.g. threshold).`}function YH(e,t){return`Using discrete channel "${e}" to encode "${t}" field can be misleading as it does not encode ${"ordinal"===t?"order":"magnitude"}.`}function ZH(e){return`Using unaggregated domain with raw field has no effect (${bz(e)}).`}function XH(e){return`Unaggregated domain not applicable for "${e}" since it produces values outside the origin domain of the source data.`}function QH(e){return`Unaggregated domain is currently unsupported for log scale (${bz(e)}).`}function JH(e,t,i){return`${i}-scale's "${t}" is dropped as it does not work with ${e} scale.`}function e$(e){return`The step for "${e}" is dropped because the ${"width"===e?"x":"y"} is continuous.`}const t$="Domains that should be unioned has conflicting sort properties. Sort will be set to true.";function i$(e,t){return`Invalid ${e}: ${bz(t)}.`}function n$(e){return`1D error band does not support ${e}.`}function o$(e){return`Channel ${e} is required for "binned" bin.`}const r$=ai(oi);let s$=r$;function a$(...e){s$.warn(...e)}function l$(e){if(e&&ci(e))for(const t of m$)if(t in e)return!0;return!1}new WeakMap;const c$=["january","february","march","april","may","june","july","august","september","october","november","december"],u$=c$.map((e=>e.substr(0,3))),h$=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],d$=h$.map((e=>e.substr(0,3)));function g$(e,t){const i=[];if(t&&void 0!==e.day&&Rz(e).length>1&&(a$(function(e){return`Dropping day from datetime ${bz(e)} as day cannot be combined with other units.`}(e)),delete(e=mz(e)).day),void 0!==e.year?i.push(e.year):i.push(2012),void 0!==e.month){const n=t?function(e){if(iW(e)&&(e=+e),nn(e))return e-1;{const t=e.toLowerCase(),i=c$.indexOf(t);if(-1!==i)return i;const n=t.substr(0,3),o=u$.indexOf(n);if(-1!==o)return o;throw new Error(i$("month",e))}}(e.month):e.month;i.push(n)}else if(void 0!==e.quarter){const n=t?function(e){if(iW(e)&&(e=+e),nn(e))return e>4&&a$(i$("quarter",e)),e-1;throw new Error(i$("quarter",e))}(e.quarter):e.quarter;i.push(nn(n)?3*n:`${n}*3`)}else i.push(0);if(void 0!==e.date)i.push(e.date);else if(void 0!==e.day){const n=t?function(e){if(iW(e)&&(e=+e),nn(e))return e%7;{const t=e.toLowerCase(),i=h$.indexOf(t);if(-1!==i)return i;const n=t.substr(0,3),o=d$.indexOf(n);if(-1!==o)return o;throw new Error(i$("day",e))}}(e.day):e.day;i.push(nn(n)?n+1:`${n}+1`)}else i.push(1);for(const t of["hours","minutes","seconds","milliseconds"]){const n=e[t];i.push(void 0===n?0:n)}return i}function f$(e){const t=g$(e,!0).join(", ");return e.utc?`utc(${t})`:`datetime(${t})`}const p$={year:1,quarter:1,month:1,week:1,day:1,dayofyear:1,date:1,hours:1,minutes:1,seconds:1,milliseconds:1},m$=Rz(p$);function _$(e){return e.startsWith("utc")}const v$={"year-month":"%b %Y ","year-month-date":"%b %d, %Y "};function b$(e){return m$.filter((t=>y$(e,t)))}function y$(e,t){const i=e.indexOf(t);return!(i<0||i>0&&"seconds"===t&&"i"===e.charAt(i-1)||e.length>i+3&&"day"===t&&"o"===e.charAt(i+3)||i>0&&"year"===t&&"f"===e.charAt(i-1))}function w$(e){if(!e)return;const t=b$(e);return`timeUnitSpecifier(${bz(t)}, ${bz(v$)})`}function C$(e){if(!e)return;let t;return rn(e)?t={unit:e}:ci(e)&&(t={...e,...e.unit?{unit:e.unit}:{}}),_$(t.unit)&&(t.utc=!0,t.unit=function(e){return e.substr(3)}(t.unit)),t}function S$(e){return e&&!!e.field&&void 0!==e.equal}function x$(e){return e&&!!e.field&&void 0!==e.lt}function k$(e){return e&&!!e.field&&void 0!==e.lte}function D$(e){return e&&!!e.field&&void 0!==e.gt}function L$(e){return e&&!!e.field&&void 0!==e.gte}function N$(e){if(e&&e.field){if(li(e.range)&&2===e.range.length)return!0;if(uH(e.range))return!0}return!1}function E$(e){return e&&!!e.field&&(li(e.oneOf)||li(e.in))}function A$(e){return E$(e)||S$(e)||N$(e)||x$(e)||D$(e)||k$(e)||L$(e)}function M$(e,t){return Qj(e,{timeUnit:t,wrapTime:!0})}function I$(e,t=!0){const{field:i}=e,n=C$(e.timeUnit)?.unit,o=n?`time(${function(e,t,{end:i}={end:!1}){const n=Hz(t),o=_$(e)?"utc":"";let r;const s={};for(const t of m$)y$(e,t)&&(s[t]="quarter"===(a=t)?`(${o}quarter(${n})-1)`:`${o}${a}(${n})`,r=t);var a;return i&&(s[r]+="+1"),function(e){const t=g$(e,!1).join(", ");return e.utc?`utc(${t})`:`datetime(${t})`}(s)}(n,i)})`:Oj(e,{expr:"datum"});if(S$(e))return`${o}===${M$(e.equal,n)}`;if(x$(e))return`${o}<${M$(e.lt,n)}`;if(D$(e))return`${o}>${M$(e.gt,n)}`;if(k$(e))return`${o}<=${M$(e.lte,n)}`;if(L$(e))return`${o}>=${M$(e.gte,n)}`;if(E$(e))return`indexof([${function(e,t){return e.map((e=>M$(e,t)))}(e.oneOf,n).join(",")}], ${o}) !== -1`;if(function(e){return e&&!!e.field&&void 0!==e.valid}(e))return T$(o,e.valid);if(N$(e)){const{range:i}=e,r=uH(i)?{signal:`${i.signal}[0]`}:i[0],s=uH(i)?{signal:`${i.signal}[1]`}:i[1];if(null!==r&&null!==s&&t)return"inrange("+o+", ["+M$(r,n)+", "+M$(s,n)+"])";const a=[];return null!==r&&a.push(`${o} >= ${M$(r,n)}`),null!==s&&a.push(`${o} <= ${M$(s,n)}`),a.length>0?a.join(" && "):"true"}throw new Error(`Invalid field predicate: ${bz(e)}`)}function T$(e,t=!0){return t?`isValid(${e}) && isFinite(+${e})`:`!isValid(${e}) || !isFinite(+${e})`}function R$(e){return A$(e)&&e.timeUnit?{...e,timeUnit:C$(e.timeUnit)?.unit}:e}const O$={quantitative:"quantitative",ordinal:"ordinal",temporal:"temporal",nominal:"nominal",geojson:"geojson"},F$=O$.quantitative,P$=O$.ordinal,B$=O$.temporal,z$=O$.nominal,W$=O$.geojson;Rz(O$);const V$="linear",H$="time",$$="utc",U$={linear:"numeric",log:"numeric",pow:"numeric",sqrt:"numeric",symlog:"numeric",identity:"numeric",sequential:"numeric",time:"time",utc:"time",ordinal:"ordinal","bin-ordinal":"bin-ordinal",point:"ordinal-position",band:"ordinal-position",quantile:"discretizing",quantize:"discretizing",threshold:"discretizing"};function j$(e,t){const i=U$[e],n=U$[t];return i===n||"ordinal-position"===i&&"time"===n||"ordinal-position"===n&&"time"===i}Rz(U$);const q$={linear:0,log:1,pow:1,sqrt:1,symlog:1,identity:1,sequential:1,time:0,utc:0,point:10,band:11,ordinal:0,"bin-ordinal":0,quantile:0,quantize:0,threshold:0};function K$(e){return q$[e]}const G$=["linear","log","pow","sqrt","symlog","time","utc"],Y$=vn(G$),Z$=vn(["linear","log","pow","sqrt","symlog"]),X$=vn(["quantile","quantize","threshold"]),Q$=vn(G$.concat(["quantile","quantize","threshold","sequential","identity"])),J$=vn(["ordinal","bin-ordinal","point","band"]);function eU(e){return e in J$}function tU(e){return e in Q$}function iU(e){return e in Y$}function nU(e){return e in X$}function oU(e){return e?.param}const rU={type:1,domain:1,domainMax:1,domainMin:1,domainMid:1,align:1,range:1,rangeMax:1,rangeMin:1,scheme:1,bins:1,reverse:1,round:1,clamp:1,nice:1,base:1,exponent:1,constant:1,interpolate:1,zero:1,padding:1,paddingInner:1,paddingOuter:1},{type:sU,domain:aU,range:lU,rangeMax:cU,rangeMin:uU,scheme:hU,...dU}=(Rz(rU),rU),gU=Rz(dU);function fU(e,t){switch(t){case"type":case"domain":case"reverse":case"range":return!0;case"scheme":case"interpolate":return!["point","band","identity"].includes(e);case"bins":return!["point","band","identity","ordinal"].includes(e);case"round":return iU(e)||"band"===e||"point"===e;case"padding":case"rangeMin":case"rangeMax":return iU(e)||["point","band"].includes(e);case"paddingOuter":case"align":return["point","band"].includes(e);case"paddingInner":return"band"===e;case"domainMax":case"domainMid":case"domainMin":case"clamp":return iU(e);case"nice":return iU(e)||"quantize"===e||"threshold"===e;case"exponent":return"pow"===e;case"base":return"log"===e;case"constant":return"symlog"===e;case"zero":return tU(e)&&!Cz(["log","time","utc","threshold","quantile"],e)}}function pU(e,t){switch(t){case"interpolate":case"scheme":case"domainMid":return HW(e)?void 0:`Cannot use the scale property "${e}" with non-color channel.`;case"align":case"type":case"bins":case"domain":case"domainMax":case"domainMin":case"range":case"base":case"exponent":case"constant":case"nice":case"padding":case"paddingInner":case"paddingOuter":case"rangeMax":case"rangeMin":case"reverse":case"round":case"clamp":case"zero":return}}const mU={arc:"arc",area:"area",bar:"bar",image:"image",line:"line",point:"point",rect:"rect",rule:"rule",text:"text",tick:"tick",trail:"trail",circle:"circle",square:"square",geoshape:"geoshape"},_U=mU.arc,vU=mU.area,bU=mU.bar,yU=mU.image,wU=mU.line,CU=mU.point,SU=mU.rect,xU=mU.rule,kU=mU.text,DU=mU.tick,LU=mU.trail,NU=mU.circle,EU=mU.square,AU=mU.geoshape;function MU(e){return["line","area","trail"].includes(e)}function IU(e){return["rect","bar","image","arc"].includes(e)}const TU=Rz(mU);function RU(e){return e.type}vn(TU);const OU=["stroke","strokeWidth","strokeDash","strokeDashOffset","strokeOpacity","strokeJoin","strokeMiterLimit","fill","fillOpacity"],FU=Rz({color:1,filled:1,invalid:1,order:1,radius2:1,theta2:1,timeUnitBandSize:1,timeUnitBandPosition:1}),PU=Rz({mark:1,arc:1,area:1,bar:1,circle:1,image:1,line:1,point:1,rect:1,rule:1,square:1,text:1,tick:1,trail:1,geoshape:1});function BU(e){return e&&null!=e.band}const zU={horizontal:["cornerRadiusTopRight","cornerRadiusBottomRight"],vertical:["cornerRadiusTopLeft","cornerRadiusTopRight"]};function WU(e){const{channel:t,channelDef:i,markDef:n,scale:o,config:r}=e,s=qU(e);return Cj(i)&&!XV(i.aggregate)&&o&&iU(o.get("type"))&&!1===o.get("zero")?VU({fieldDef:i,channel:t,markDef:n,ref:s,config:r}):s}function VU({fieldDef:e,channel:t,markDef:i,ref:n,config:o}){return MU(i.type)||null===xH("invalid",i,o)?n:[HU(e,t),n]}function HU(e,t){return{test:$U(e,!0),..."y"===oV(t)?{field:{group:"height"}}:{value:0}}}function $U(e,t=!0){return T$(rn(e)?e:Oj(e,{expr:"datum"}),!t)}function UU(e,t,i,n){const o={};if(t&&(o.scale=t),xj(e)){const{datum:t}=e;l$(t)?o.signal=f$(t):uH(t)?o.signal=t.signal:sH(t)?o.signal=t.expr:o.value=t}else o.field=Oj(e,i);if(n){const{offset:e,band:t}=n;e&&(o.offset=e),t&&(o.band=t)}return o}function jU({scaleName:e,fieldOrDatumDef:t,fieldOrDatumDef2:i,offset:n,startSuffix:o,bandPosition:r=.5}){const s=0Bz(`${"unit"===e?"":`_${e}_`}${i[e]}`))).join(""):(t?"utc":"")+"timeunit"+Rz(i).map((e=>Bz(`_${e}_${i[e]}`))).join("")}(l),o=(!["range","mid"].includes(t.binSuffix)&&t.binSuffix||"")+(t.suffix??""))}n&&(i=i?`${n}_${i}`:n)}return o&&(i=`${i}_${o}`),n&&(i=`${n}_${i}`),t.forAs?Kz(i):t.expr?$z(i,t.expr)+r:jz(i)+r}function Fj(e){switch(e.type){case"nominal":case"ordinal":case"geojson":return!0;case"quantitative":return Cj(e)&&!!e.bin;case"temporal":return!1}throw new Error($H(e.type))}const Pj=(e,t)=>{switch(t.fieldTitle){case"plain":return e.field;case"functional":return function(e){const{aggregate:t,bin:i,timeUnit:n,field:o}=e;if(GV(t))return`${o} for argmax(${t.argmax})`;if(KV(t))return`${o} for argmin(${t.argmin})`;const r=C$(n),s=t||r?.unit||r?.maxbins&&"timeunit"||tH(i)&&"bin";return s?`${s.toUpperCase()}(${o})`:o}(e);default:return function(e,t){const{field:i,bin:n,timeUnit:o,aggregate:r}=e;if("count"===r)return t.countTitle;if(tH(n))return`${i} (binned)`;if(o){const e=C$(o)?.unit;if(e)return`${i} (${b$(e).join("-")})`}else if(r)return GV(r)?`${i} for max ${r.argmax}`:KV(r)?`${i} for min ${r.argmin}`:`${Vz(r)} of ${i}`;return i}(e,t)}};let Bj=Pj;function zj(e){Bj=e}function Wj(e,t,{allowDisabling:i,includeDefault:n=!0}){const o=Vj(e)?.title;if(!Cj(e))return o;const r=e,s=n?Hj(r,t):void 0;return i?Yz(o,r.title,s):o??r.title??s}function Vj(e){return Mj(e)&&e.axis?e.axis:Ij(e)&&e.legend?e.legend:dj(e)&&e.header?e.header:void 0}function Hj(e,t){return Bj(e,t)}function $j(e){if(Tj(e)){const{format:t,formatType:i}=e;return{format:t,formatType:i}}{const t=Vj(e)??{},{format:i,formatType:n}=t;return{format:i,formatType:n}}}function Uj(e){return Cj(e)?e:yj(e)?e.condition:void 0}function jj(e){return Lj(e)?e:wj(e)?e.condition:void 0}function qj(e,t,i,n={}){return rn(e)||nn(e)||Ji(e)?(a$(function(e,t,i){return`Channel ${e} is a ${t}. Converted to {value: ${bz(i)}}.`}(t,rn(e)?"string":nn(e)?"number":"boolean",e)),{value:e}):Lj(e)?Kj(e,t,i,n):wj(e)?{...e,condition:Kj(e.condition,t,i,n)}:e}function Kj(e,t,i,n){if(Tj(e)){const{format:o,formatType:r,...s}=e;if(GU(r)&&!i.customFormatTypes)return a$(HH(t)),Kj(s,t,i,n)}else{const o=Mj(e)?"axis":Ij(e)?"legend":dj(e)?"header":null;if(o&&e[o]){const{format:r,formatType:s,...a}=e[o];if(GU(s)&&!i.customFormatTypes)return a$(HH(t)),Kj({...e,[o]:a},t,i,n)}}return Cj(e)?Gj(e,t,n):function(e){let t=e.type;if(t)return e;const{datum:i}=e;return t=nn(i)?"quantitative":rn(i)?"nominal":l$(i)?"temporal":void 0,{...e,type:t}}(e)}function Gj(e,t,{compositeMark:i=!1}={}){const{aggregate:n,timeUnit:o,bin:r,field:s}=e,a={...e};if(i||!n||YV(n)||GV(n)||KV(n)||(a$(function(e){return`Invalid aggregation operator "${e}".`}(n)),delete a.aggregate),o&&(a.timeUnit=C$(o)),s&&(a.field=`${s}`),tH(r)&&(a.bin=Yj(r,t)),iH(r)&&!xV(t)&&a$(function(e){return`Channel ${e} should not be used with "binned" bin.`}(t)),Nj(a)){const{type:e}=a,t=function(e){if(e)switch(e=e.toLowerCase()){case"q":case F$:return"quantitative";case"t":case B$:return"temporal";case"o":case P$:return"ordinal";case"n":case z$:return"nominal";case W$:return"geojson"}}(e);e!==t&&(a.type=t),"quantitative"!==e&&XV(n)&&(a$(function(e,t){return`Invalid field type "${e}" for aggregate: "${t}", using "quantitative" instead.`}(e,n)),a.type="quantitative")}else if(!nV(t)){const e=function(e,t){switch(t){case"latitude":case"longitude":return"quantitative";case"row":case"column":case"facet":case"shape":case"strokeDash":return"nominal";case"order":return"ordinal"}if(pj(e)&&li(e.sort))return"ordinal";const{aggregate:i,bin:n,timeUnit:o}=e;if(o)return"temporal";if(n||i&&!GV(i)&&!KV(i))return"quantitative";if(Aj(e)&&e.scale?.type)switch(U$[e.scale.type]){case"numeric":case"discretizing":return"quantitative";case"time":return"temporal"}return"nominal"}(a,t);a.type=e}if(Nj(a)){const{compatible:e,warning:i}=function(e,t){const i=e.type;if("geojson"===i&&"shape"!==t)return{compatible:!1,warning:`Channel ${t} should not be used with a geojson data.`};switch(t){case nW:case oW:case rW:return Fj(e)?Zj:{compatible:!1,warning:KH(t)};case sW:case aW:case vW:case bW:case yW:case EW:case MW:case IW:case TW:case RW:case OW:case SW:case dW:case uW:case FW:return Zj;case pW:case _W:case fW:case mW:return i!==F$?{compatible:!1,warning:`Channel ${t} should be used with a quantitative field only, not ${e.type} field.`}:Zj;case xW:case kW:case DW:case LW:case CW:case gW:case hW:case lW:case cW:return"nominal"!==i||e.sort?Zj:{compatible:!1,warning:`Channel ${t} should not be used with an unsorted discrete field.`};case wW:case NW:return Fj(e)||function(e){return Aj(e)&&nU(e.scale?.type)}(e)?Zj:{compatible:!1,warning:GH(t)};case AW:return"nominal"!==e.type||"sort"in e?Zj:{compatible:!1,warning:"Channel order is inappropriate for nominal field, which has no inherent order."}}}(a,t)||{};!1===e&&a$(i)}if(pj(a)&&rn(a.sort)){const{sort:e}=a;if(aj(e))return{...a,sort:{encoding:e}};const t=e.substr(1);if("-"===e.charAt(0)&&aj(t))return{...a,sort:{encoding:t,order:"descending"}}}if(dj(a)){const{header:e}=a;if(e){const{orient:t,...i}=e;if(t)return{...a,header:{...i,labelOrient:e.labelOrient||t,titleOrient:e.titleOrient||t}}}}return a}function Yj(e,t){return Ji(e)?{maxbins:rH(t)}:"binned"===e?{binned:!0}:e.maxbins||e.step?e:{...e,maxbins:rH(t)}}const Zj={compatible:!0};function Xj(e){const{formatType:t}=$j(e);return"time"===t||!t&&function(e){return e&&("temporal"===e.type||Cj(e)&&!!e.timeUnit)}(e)}function Qj(e,{timeUnit:t,type:i,wrapTime:n,undefinedIfExprNotRequired:o}){const r=t&&C$(t)?.unit;let s,a=r||"temporal"===i;return sH(e)?s=e.expr:uH(e)?s=e.signal:l$(e)?(a=!0,s=f$(e)):(rn(e)||nn(e))&&a&&(s=`datetime(${bz(e)})`,function(e){return!!p$[e]}(r)&&(nn(e)&&e<1e4||rn(e)&&isNaN(Date.parse(e)))&&(s=f$({[r]:e}))),s?n&&a?`time(${s})`:s:o?void 0:bz(e)}function Jj(e,t){const{type:i}=e;return t.map((t=>{const n=Qj(t,{timeUnit:Cj(e)?e.timeUnit:void 0,type:i,undefinedIfExprNotRequired:!0});return void 0!==n?{signal:n}:t}))}function eq(e,t){return tH(e.bin)?WV(t)&&["ordinal","nominal"].includes(e.type):(console.warn("Only call this method for binned field defs."),!1)}const tq={labelAlign:{part:"labels",vgProp:"align"},labelBaseline:{part:"labels",vgProp:"baseline"},labelColor:{part:"labels",vgProp:"fill"},labelFont:{part:"labels",vgProp:"font"},labelFontSize:{part:"labels",vgProp:"fontSize"},labelFontStyle:{part:"labels",vgProp:"fontStyle"},labelFontWeight:{part:"labels",vgProp:"fontWeight"},labelOpacity:{part:"labels",vgProp:"opacity"},labelOffset:null,labelPadding:null,gridColor:{part:"grid",vgProp:"stroke"},gridDash:{part:"grid",vgProp:"strokeDash"},gridDashOffset:{part:"grid",vgProp:"strokeDashOffset"},gridOpacity:{part:"grid",vgProp:"opacity"},gridWidth:{part:"grid",vgProp:"strokeWidth"},tickColor:{part:"ticks",vgProp:"stroke"},tickDash:{part:"ticks",vgProp:"strokeDash"},tickDashOffset:{part:"ticks",vgProp:"strokeDashOffset"},tickOpacity:{part:"ticks",vgProp:"opacity"},tickSize:null,tickWidth:{part:"ticks",vgProp:"strokeWidth"}};function iq(e){return e&&e.condition}const nq=["domain","grid","labels","ticks","title"],oq={grid:"grid",gridCap:"grid",gridColor:"grid",gridDash:"grid",gridDashOffset:"grid",gridOpacity:"grid",gridScale:"grid",gridWidth:"grid",orient:"main",bandPosition:"both",aria:"main",description:"main",domain:"main",domainCap:"main",domainColor:"main",domainDash:"main",domainDashOffset:"main",domainOpacity:"main",domainWidth:"main",format:"main",formatType:"main",labelAlign:"main",labelAngle:"main",labelBaseline:"main",labelBound:"main",labelColor:"main",labelFlush:"main",labelFlushOffset:"main",labelFont:"main",labelFontSize:"main",labelFontStyle:"main",labelFontWeight:"main",labelLimit:"main",labelLineHeight:"main",labelOffset:"main",labelOpacity:"main",labelOverlap:"main",labelPadding:"main",labels:"main",labelSeparation:"main",maxExtent:"main",minExtent:"main",offset:"both",position:"main",tickCap:"main",tickColor:"main",tickDash:"main",tickDashOffset:"main",tickMinStep:"both",tickOffset:"both",tickOpacity:"main",tickRound:"both",ticks:"main",tickSize:"main",tickWidth:"both",title:"main",titleAlign:"main",titleAnchor:"main",titleAngle:"main",titleBaseline:"main",titleColor:"main",titleFont:"main",titleFontSize:"main",titleFontStyle:"main",titleFontWeight:"main",titleLimit:"main",titleLineHeight:"main",titleOpacity:"main",titlePadding:"main",titleX:"main",titleY:"main",encode:"both",scale:"both",tickBand:"both",tickCount:"both",tickExtra:"both",translate:"both",values:"both",zindex:"both"},rq={orient:1,aria:1,bandPosition:1,description:1,domain:1,domainCap:1,domainColor:1,domainDash:1,domainDashOffset:1,domainOpacity:1,domainWidth:1,format:1,formatType:1,grid:1,gridCap:1,gridColor:1,gridDash:1,gridDashOffset:1,gridOpacity:1,gridWidth:1,labelAlign:1,labelAngle:1,labelBaseline:1,labelBound:1,labelColor:1,labelFlush:1,labelFlushOffset:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelLineHeight:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labels:1,labelSeparation:1,maxExtent:1,minExtent:1,offset:1,position:1,tickBand:1,tickCap:1,tickColor:1,tickCount:1,tickDash:1,tickDashOffset:1,tickExtra:1,tickMinStep:1,tickOffset:1,tickOpacity:1,tickRound:1,ticks:1,tickSize:1,tickWidth:1,title:1,titleAlign:1,titleAnchor:1,titleAngle:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titlePadding:1,titleX:1,titleY:1,translate:1,values:1,zindex:1},sq={...rq,style:1,labelExpr:1,encoding:1};function aq(e){return!!sq[e]}Rz(sq);const lq=Rz({axis:1,axisBand:1,axisBottom:1,axisDiscrete:1,axisLeft:1,axisPoint:1,axisQuantitative:1,axisRight:1,axisTemporal:1,axisTop:1,axisX:1,axisXBand:1,axisXDiscrete:1,axisXPoint:1,axisXQuantitative:1,axisXTemporal:1,axisY:1,axisYBand:1,axisYDiscrete:1,axisYPoint:1,axisYQuantitative:1,axisYTemporal:1});function cq(e){return"mark"in e}class uq{constructor(e,t){this.name=e,this.run=t}hasMatchingType(e){return!!cq(e)&&function(e){return RU(e)?e.type:e}(e.mark)===this.name}}function hq(e,t){const i=e&&e[t];return!!i&&(li(i)?Sz(i,(e=>!!e.field)):Cj(i)||yj(i))}function dq(e){return Sz(qW,(t=>{if(hq(e,t)){const i=e[t];if(li(i))return Sz(i,(e=>!!e.aggregate));{const e=Uj(i);return e&&!!e.aggregate}}return!1}))}function gq(e,t){const i=[],n=[],o=[],r=[],s={};return mq(e,((a,l)=>{if(Cj(a)){const{field:c,aggregate:u,bin:h,timeUnit:d,...g}=a;if(u||d||h){const e=Vj(a),f=e&&e.title;let p=Oj(a,{forAs:!0});const m={...f?[]:{title:Wj(a,t,{allowDisabling:!0})},...g,field:p};if(u){let e;if(GV(u)?(e="argmax",p=Oj({op:"argmax",field:u.argmax},{forAs:!0}),m.field=`${p}.${c}`):KV(u)?(e="argmin",p=Oj({op:"argmin",field:u.argmin},{forAs:!0}),m.field=`${p}.${c}`):"boxplot"!==u&&"errorbar"!==u&&"errorband"!==u&&(e=u),e){const t={op:e,as:p};c&&(t.field=c),r.push(t)}}else if(i.push(p),Nj(a)&&tH(h)){if(n.push({bin:h,field:c,as:p}),i.push(Oj(a,{binSuffix:"end"})),eq(a,l)&&i.push(Oj(a,{binSuffix:"range"})),xV(l)){const e={field:`${p}_end`};s[`${l}2`]=e}m.bin="binned",nV(l)||(m.type=F$)}else if(d){o.push({timeUnit:d,field:c,as:p});const e=Nj(a)&&a.type!==B$&&"time";e&&(l===EW||l===TW?m.formatType=e:function(e){return!!yV[e]}(l)?m.legend={formatType:e,...m.legend}:xV(l)&&(m.axis={formatType:e,...m.axis}))}s[l]=m}else i.push(c),s[l]=e[l]}else s[l]=e[l]})),{bins:n,timeUnits:o,aggregate:r,groupby:i,encoding:s}}function fq(e,t,i,n){return Rz(e).reduce(((o,r)=>{if(!tV(r))return a$(function(e){return`${e}-encoding is dropped as ${e} is not a valid encoding channel.`}(r)),o;const s=e[r];if("angle"!==r||"arc"!==t||e.theta||(a$("Arc marks uses theta channel rather than angle, replacing angle with theta."),r=dW),!function(e,t,i){const n=function(e,t){return function(e){switch(e){case vW:case bW:case yW:case FW:case MW:case IW:case TW:case RW:case AW:case xW:case kW:case DW:case LW:case rW:case nW:case oW:return VV;case sW:case aW:case fW:case pW:return $V;case lW:case cW:case mW:case _W:return{area:"always",bar:"always",image:"always",rect:"always",rule:"always",circle:"binned",point:"binned",square:"binned",tick:"binned",line:"binned",trail:"binned"};case CW:return{point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",text:"always",line:"always",trail:"always"};case NW:return{line:"always",point:"always",tick:"always",rule:"always",circle:"always",square:"always",bar:"always",geoshape:"always"};case wW:return{point:"always",geoshape:"always"};case EW:return{text:"always"};case SW:return{point:"always",square:"always",text:"always"};case OW:return{image:"always"};case dW:case uW:return{text:"always",arc:"always"};case gW:case hW:return{arc:"always"}}}(e)[t]}(t,i);if(!n)return!1;if("binned"===n){const i=e[t===lW?sW:aW];return!!(Cj(i)&&Cj(e[t])&&iH(i.bin))}return!0}(e,r,t))return a$(qH(r,t)),o;if(r===CW&&"line"===t&&Uj(e[r])?.aggregate)return a$("Line marks cannot encode size with a non-groupby field. You may want to use trail marks instead."),o;if(r===vW&&(i?"fill"in e:"stroke"in e))return a$(UH("encoding",{fill:"fill"in e,stroke:"stroke"in e})),o;if(r===MW||r===AW&&!li(s)&&!Ej(s)||r===TW&&li(s))s&&(o[r]=Ti(s).reduce(((e,t)=>(Cj(t)?e.push(Gj(t,r)):a$(jH(t,r)),e)),[]));else{if(r===TW&&null===s)o[r]=null;else if(!(Cj(s)||xj(s)||Ej(s)||bj(s)||uH(s)))return a$(jH(s,r)),o;o[r]=qj(s,r,n)}return o}),{})}function pq(e,t){const i={};for(const n of Rz(e)){const o=qj(e[n],n,t,{compositeMark:!0});i[n]=o}return i}function mq(e,t,i){if(e)for(const n of Rz(e)){const o=e[n];if(li(o))for(const e of o)t.call(i,e,n);else t.call(i,o,n)}}function _q(e,t){return Rz(t).reduce(((i,n)=>{switch(n){case sW:case aW:case RW:case FW:case OW:case lW:case cW:case dW:case gW:case uW:case hW:case fW:case pW:case mW:case _W:case EW:case wW:case SW:case TW:return i;case AW:if("line"===e||"trail"===e)return i;case MW:case IW:{const e=t[n];if(li(e)||Cj(e))for(const t of Ti(e))t.aggregate||i.push(Oj(t,{}));return i}case CW:if("trail"===e)return i;case vW:case bW:case yW:case xW:case kW:case DW:case NW:case LW:{const e=Uj(t[n]);return e&&!e.aggregate&&i.push(Oj(e,{})),i}}}),[])}function vq(e,t,i,n=!0){return"tooltip"in i?{tooltip:i.tooltip}:{tooltip:[...e.map((({fieldPrefix:e,titlePrefix:i})=>{const o=n?` of ${bq(t)}`:"";return{field:e+t.field,type:t.type,title:uH(i)?{signal:`${i}"${escape(o)}"`}:i+o}})),...Lz(function(e){const t=[];for(const i of Rz(e))if(hq(e,i)){const n=Ti(e[i]);for(const e of n)Cj(e)?t.push(e):yj(e)&&t.push(e.condition)}return t}(i).map(Rj),yz)]}}function bq(e){const{title:t,field:i}=e;return Yz(t,i)}function yq(e,t,i,n,o){const{scale:r,axis:s}=i;return({partName:a,mark:l,positionPrefix:c,endPositionPrefix:u,extraEncoding:h={}})=>{const d=bq(i);return wq(e,a,o,{mark:l,encoding:{[t]:{field:`${c}_${i.field}`,type:i.type,...void 0!==d?{title:d}:{},...void 0!==r?{scale:r}:{},...void 0!==s?{axis:s}:{}},...rn(u)?{[`${t}2`]:{field:`${u}_${i.field}`}}:{},...n,...h}})}}function wq(e,t,i,n){const{clip:o,color:r,opacity:s}=e,a=e.type;return e[t]||void 0===e[t]&&i[t]?[{...n,mark:{...i[t],...o?{clip:o}:{},...r?{color:r}:{},...s?{opacity:s}:{},...RU(n.mark)?n.mark:{type:n.mark},style:`${a}-${t}`,...Ji(e[t])?{}:e[t]}}]:[]}function Cq(e,t,i){const{encoding:n}=e,o="vertical"===t?"y":"x",r=n[o],s=n[`${o}2`],a=n[`${o}Error`],l=n[`${o}Error2`];return{continuousAxisChannelDef:Sq(r,i),continuousAxisChannelDef2:Sq(s,i),continuousAxisChannelDefError:Sq(a,i),continuousAxisChannelDefError2:Sq(l,i),continuousAxis:o}}function Sq(e,t){if(e&&e.aggregate){const{aggregate:i,...n}=e;return i!==t&&a$(function(e,t){return`Continuous axis should not have customized aggregation function ${e}; ${t} already agregates the axis.`}(i,t)),n}return e}function xq(e,t){const{mark:i,encoding:n}=e,{x:o,y:r}=n;if(RU(i)&&i.orient)return i.orient;if(kj(o)){if(kj(r)){const e=Cj(o)&&o.aggregate,i=Cj(r)&&r.aggregate;if(e||i!==t){if(i||e!==t){if(e===t&&i===t)throw new Error("Both x and y cannot have aggregate");return Xj(r)&&!Xj(o)?"horizontal":"vertical"}return"horizontal"}return"vertical"}return"horizontal"}if(kj(r))return"vertical";throw new Error(`Need a valid continuous axis for ${t}s`)}const kq="boxplot",Dq=new uq(kq,Nq);function Lq(e){return nn(e)?"tukey":e}function Nq(e,{config:t}){e={...e,encoding:pq(e.encoding,t)};const{mark:i,encoding:n,params:o,projection:r,...s}=e,a=RU(i)?i:{type:i};o&&a$(zH("boxplot"));const l=a.extent??t.boxplot.extent,c=xH("size",a,t),u=Lq(l),{bins:h,timeUnits:d,transform:g,continuousAxisChannelDef:f,continuousAxis:p,groupby:m,aggregate:_,encodingWithoutContinuousAxis:v,ticksOrient:b,boxOrient:y,customTooltipWithoutAggregatedField:w}=function(e,t,i){const n=xq(e,kq),{continuousAxisChannelDef:o,continuousAxis:r}=Cq(e,n,kq),s=o.field,a=Lq(t),l=[...Eq(s),{op:"median",field:s,as:`mid_box_${s}`},{op:"min",field:s,as:("min-max"===a?"lower_whisker_":"min_")+s},{op:"max",field:s,as:("min-max"===a?"upper_whisker_":"max_")+s}],c="min-max"===a||"tukey"===a?[]:[{calculate:`datum["upper_box_${s}"] - datum["lower_box_${s}"]`,as:`iqr_${s}`},{calculate:`min(datum["upper_box_${s}"] + datum["iqr_${s}"] * ${t}, datum["max_${s}"])`,as:`upper_whisker_${s}`},{calculate:`max(datum["lower_box_${s}"] - datum["iqr_${s}"] * ${t}, datum["min_${s}"])`,as:`lower_whisker_${s}`}],{[r]:u,...h}=e.encoding,{customTooltipWithoutAggregatedField:d,filteredEncoding:g}=function(e){const{tooltip:t,...i}=e;if(!t)return{filteredEncoding:i};let n,o;if(li(t)){for(const e of t)e.aggregate?(n||(n=[]),n.push(e)):(o||(o=[]),o.push(e));n&&(i.tooltip=n)}else t.aggregate?i.tooltip=t:o=t;return li(o)&&1===o.length&&(o=o[0]),{customTooltipWithoutAggregatedField:o,filteredEncoding:i}}(h),{bins:f,timeUnits:p,aggregate:m,groupby:_,encoding:v}=gq(g,i),b="vertical"===n?"horizontal":"vertical",y=n;return{bins:f,timeUnits:p,transform:[...f,...p,{aggregate:[...m,...l],groupby:_},...c],groupby:_,aggregate:m,continuousAxisChannelDef:o,continuousAxis:r,encodingWithoutContinuousAxis:v,ticksOrient:b,boxOrient:y,customTooltipWithoutAggregatedField:d}}(e,l,t),{color:C,size:S,...x}=v,k=e=>yq(a,p,f,e,t.boxplot),D=k(x),L=k(v),N=k({...x,...S?{size:S}:{}}),E=vq([{fieldPrefix:"min-max"===u?"upper_whisker_":"max_",titlePrefix:"Max"},{fieldPrefix:"upper_box_",titlePrefix:"Q3"},{fieldPrefix:"mid_box_",titlePrefix:"Median"},{fieldPrefix:"lower_box_",titlePrefix:"Q1"},{fieldPrefix:"min-max"===u?"lower_whisker_":"min_",titlePrefix:"Min"}],f,v),A={type:"tick",color:"black",opacity:1,orient:b,invalid:null,aria:!1},M="min-max"===u?E:vq([{fieldPrefix:"upper_whisker_",titlePrefix:"Upper Whisker"},{fieldPrefix:"lower_whisker_",titlePrefix:"Lower Whisker"}],f,v),I=[...D({partName:"rule",mark:{type:"rule",invalid:null,aria:!1},positionPrefix:"lower_whisker",endPositionPrefix:"lower_box",extraEncoding:M}),...D({partName:"rule",mark:{type:"rule",invalid:null,aria:!1},positionPrefix:"upper_box",endPositionPrefix:"upper_whisker",extraEncoding:M}),...D({partName:"ticks",mark:A,positionPrefix:"lower_whisker",extraEncoding:M}),...D({partName:"ticks",mark:A,positionPrefix:"upper_whisker",extraEncoding:M})],T=[..."tukey"!==u?I:[],...L({partName:"box",mark:{type:"bar",...c?{size:c}:{},orient:y,invalid:null,ariaRoleDescription:"box"},positionPrefix:"lower_box",endPositionPrefix:"upper_box",extraEncoding:E}),...N({partName:"median",mark:{type:"tick",invalid:null,...ci(t.boxplot.median)&&t.boxplot.median.color?{color:t.boxplot.median.color}:{},...c?{size:c}:{},orient:b,aria:!1},positionPrefix:"mid_box",extraEncoding:E})];if("min-max"===u)return{...s,transform:(s.transform??[]).concat(g),layer:T};const R=`datum["lower_box_${f.field}"]`,O=`datum["upper_box_${f.field}"]`,F=`(${O} - ${R})`,P=`${R} - ${l} * ${F}`,B=`${O} + ${l} * ${F}`,z=`datum["${f.field}"]`,W={joinaggregate:Eq(f.field),groupby:m},V={transform:[{filter:`(${P} <= ${z}) && (${z} <= ${B})`},{aggregate:[{op:"min",field:f.field,as:`lower_whisker_${f.field}`},{op:"max",field:f.field,as:`upper_whisker_${f.field}`},{op:"min",field:`lower_box_${f.field}`,as:`lower_box_${f.field}`},{op:"max",field:`upper_box_${f.field}`,as:`upper_box_${f.field}`},..._],groupby:m}],layer:I},{tooltip:H,...$}=x,{scale:U,axis:j}=f,q=bq(f),K=vz(j,["title"]),G=wq(a,"outliers",t.boxplot,{transform:[{filter:`(${z} < ${P}) || (${z} > ${B})`}],mark:"point",encoding:{[p]:{field:f.field,type:f.type,...void 0!==q?{title:q}:{},...void 0!==U?{scale:U}:{},...Tz(K)?{}:{axis:K}},...$,...C?{color:C}:{},...w?{tooltip:w}:{}}})[0];let Y;const Z=[...h,...d,W];return G?Y={transform:Z,layer:[G,V]}:(Y=V,Y.transform.unshift(...Z)),{...s,layer:[Y,{transform:g,layer:T}]}}function Eq(e){return[{op:"q1",field:e,as:`lower_box_${e}`},{op:"q3",field:e,as:`upper_box_${e}`}]}const Aq="errorbar",Mq=new uq(Aq,Iq);function Iq(e,{config:t}){e={...e,encoding:pq(e.encoding,t)};const{transform:i,continuousAxisChannelDef:n,continuousAxis:o,encodingWithoutContinuousAxis:r,ticksOrient:s,markDef:a,outerSpec:l,tooltipEncoding:c}=Tq(e,Aq,t);delete r.size;const u=yq(a,o,n,r,t.errorbar),h=a.thickness,d=a.size,g={type:"tick",orient:s,aria:!1,...void 0!==h?{thickness:h}:{},...void 0!==d?{size:d}:{}},f=[...u({partName:"ticks",mark:g,positionPrefix:"lower",extraEncoding:c}),...u({partName:"ticks",mark:g,positionPrefix:"upper",extraEncoding:c}),...u({partName:"rule",mark:{type:"rule",ariaRoleDescription:"errorbar",...void 0!==h?{size:h}:{}},positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:c})];return{...l,transform:i,...f.length>1?{layer:f}:{...f[0]}}}function Tq(e,t,i){const{mark:n,encoding:o,params:r,projection:s,...a}=e,l=RU(n)?n:{type:n};r&&a$(zH(t));const{orient:c,inputType:u}=function(e,t){const{encoding:i}=e;if(function(e){return(Lj(e.x)||Lj(e.y))&&!Lj(e.x2)&&!Lj(e.y2)&&!Lj(e.xError)&&!Lj(e.xError2)&&!Lj(e.yError)&&!Lj(e.yError2)}(i))return{orient:xq(e,t),inputType:"raw"};const n=function(e){return Lj(e.x2)||Lj(e.y2)}(i),o=function(e){return Lj(e.xError)||Lj(e.xError2)||Lj(e.yError)||Lj(e.yError2)}(i),r=i.x,s=i.y;if(n){if(o)throw new Error(`${t} cannot be both type aggregated-upper-lower and aggregated-error`);const e=i.x2,n=i.y2;if(Lj(e)&&Lj(n))throw new Error(`${t} cannot have both x2 and y2`);if(Lj(e)){if(kj(r))return{orient:"horizontal",inputType:"aggregated-upper-lower"};throw new Error(`Both x and x2 have to be quantitative in ${t}`)}if(Lj(n)){if(kj(s))return{orient:"vertical",inputType:"aggregated-upper-lower"};throw new Error(`Both y and y2 have to be quantitative in ${t}`)}throw new Error("No ranged axis")}{const e=i.xError,n=i.xError2,o=i.yError,a=i.yError2;if(Lj(n)&&!Lj(e))throw new Error(`${t} cannot have xError2 without xError`);if(Lj(a)&&!Lj(o))throw new Error(`${t} cannot have yError2 without yError`);if(Lj(e)&&Lj(o))throw new Error(`${t} cannot have both xError and yError with both are quantiative`);if(Lj(e)){if(kj(r))return{orient:"horizontal",inputType:"aggregated-error"};throw new Error("All x, xError, and xError2 (if exist) have to be quantitative")}if(Lj(o)){if(kj(s))return{orient:"vertical",inputType:"aggregated-error"};throw new Error("All y, yError, and yError2 (if exist) have to be quantitative")}throw new Error("No ranged axis")}}(e,t),{continuousAxisChannelDef:h,continuousAxisChannelDef2:d,continuousAxisChannelDefError:g,continuousAxisChannelDefError2:f,continuousAxis:p}=Cq(e,c,t),{errorBarSpecificAggregate:m,postAggregateCalculates:_,tooltipSummary:v,tooltipTitleWithFieldName:b}=function(e,t,i,n,o,r,s,a){let l=[],c=[];const u=t.field;let h,d=!1;if("raw"===r){const t=e.center?e.center:e.extent?"iqr"===e.extent?"median":"mean":a.errorbar.center,i=e.extent?e.extent:"mean"===t?"stderr":"iqr";if("median"===t!=("iqr"===i)&&a$(function(e,t,i){return`${e} is not usually used with ${t} for ${i}.`}(t,i,s)),"stderr"===i||"stdev"===i)l=[{op:i,field:u,as:`extent_${u}`},{op:t,field:u,as:`center_${u}`}],c=[{calculate:`datum["center_${u}"] + datum["extent_${u}"]`,as:`upper_${u}`},{calculate:`datum["center_${u}"] - datum["extent_${u}"]`,as:`lower_${u}`}],h=[{fieldPrefix:"center_",titlePrefix:Vz(t)},{fieldPrefix:"upper_",titlePrefix:Rq(t,i,"+")},{fieldPrefix:"lower_",titlePrefix:Rq(t,i,"-")}],d=!0;else{let e,t,n;"ci"===i?(e="mean",t="ci0",n="ci1"):(e="median",t="q1",n="q3"),l=[{op:t,field:u,as:`lower_${u}`},{op:n,field:u,as:`upper_${u}`},{op:e,field:u,as:`center_${u}`}],h=[{fieldPrefix:"upper_",titlePrefix:Wj({field:u,aggregate:n,type:"quantitative"},a,{allowDisabling:!1})},{fieldPrefix:"lower_",titlePrefix:Wj({field:u,aggregate:t,type:"quantitative"},a,{allowDisabling:!1})},{fieldPrefix:"center_",titlePrefix:Wj({field:u,aggregate:e,type:"quantitative"},a,{allowDisabling:!1})}]}}else{(e.center||e.extent)&&a$(function(e,t){return`${t?"extent ":""}${t&&e?"and ":""}${e?"center ":""}${t&&e?"are ":"is "}not needed when data are aggregated.`}(e.center,e.extent)),"aggregated-upper-lower"===r?(h=[],c=[{calculate:`datum["${i.field}"]`,as:`upper_${u}`},{calculate:`datum["${u}"]`,as:`lower_${u}`}]):"aggregated-error"===r&&(h=[{fieldPrefix:"",titlePrefix:u}],c=[{calculate:`datum["${u}"] + datum["${n.field}"]`,as:`upper_${u}`}],o?c.push({calculate:`datum["${u}"] + datum["${o.field}"]`,as:`lower_${u}`}):c.push({calculate:`datum["${u}"] - datum["${n.field}"]`,as:`lower_${u}`}));for(const e of c)h.push({fieldPrefix:e.as.substring(0,6),titlePrefix:qz(qz(e.calculate,'datum["',""),'"]',"")})}return{postAggregateCalculates:c,errorBarSpecificAggregate:l,tooltipSummary:h,tooltipTitleWithFieldName:d}}(l,h,d,g,f,u,t,i),{[p]:y,["x"===p?"x2":"y2"]:w,["x"===p?"xError":"yError"]:C,["x"===p?"xError2":"yError2"]:S,...x}=o,{bins:k,timeUnits:D,aggregate:L,groupby:N,encoding:E}=gq(x,i),A=[...L,...m],M="raw"!==u?[]:N,I=vq(v,h,E,b);return{transform:[...a.transform??[],...k,...D,...0===A.length?[]:[{aggregate:A,groupby:M}],..._],groupby:M,continuousAxisChannelDef:h,continuousAxis:p,encodingWithoutContinuousAxis:E,ticksOrient:"vertical"===c?"horizontal":"vertical",markDef:l,outerSpec:a,tooltipEncoding:I}}function Rq(e,t,i){return`${Vz(e)} ${i} ${t}`}const Oq="errorband",Fq=new uq(Oq,Pq);function Pq(e,{config:t}){e={...e,encoding:pq(e.encoding,t)};const{transform:i,continuousAxisChannelDef:n,continuousAxis:o,encodingWithoutContinuousAxis:r,markDef:s,outerSpec:a,tooltipEncoding:l}=Tq(e,Oq,t),c=s,u=yq(c,o,n,r,t.errorband),h=void 0!==e.encoding.x&&void 0!==e.encoding.y;let d={type:h?"area":"rect"},g={type:h?"line":"rule"};const f={...c.interpolate?{interpolate:c.interpolate}:{},...c.tension&&c.interpolate?{tension:c.tension}:{}};return h?(d={...d,...f,ariaRoleDescription:"errorband"},g={...g,...f,aria:!1}):c.interpolate?a$(n$("interpolate")):c.tension&&a$(n$("tension")),{...a,transform:i,layer:[...u({partName:"band",mark:d,positionPrefix:"lower",endPositionPrefix:"upper",extraEncoding:l}),...u({partName:"borders",mark:g,positionPrefix:"lower",extraEncoding:l}),...u({partName:"borders",mark:g,positionPrefix:"upper",extraEncoding:l})]}}const Bq={};function zq(e,t,i){const n=new uq(e,t);Bq[e]={normalizer:n,parts:i}}zq(kq,Nq,["box","median","outliers","rule","ticks"]),zq(Aq,Iq,["ticks","rule"]),zq(Oq,Pq,["band","borders"]);const Wq=["gradientHorizontalMaxLength","gradientHorizontalMinLength","gradientVerticalMaxLength","gradientVerticalMinLength","unselectedOpacity"],Vq={titleAlign:"align",titleAnchor:"anchor",titleAngle:"angle",titleBaseline:"baseline",titleColor:"color",titleFont:"font",titleFontSize:"fontSize",titleFontStyle:"fontStyle",titleFontWeight:"fontWeight",titleLimit:"limit",titleLineHeight:"lineHeight",titleOrient:"orient",titlePadding:"offset"},Hq={labelAlign:"align",labelAnchor:"anchor",labelAngle:"angle",labelBaseline:"baseline",labelColor:"color",labelFont:"font",labelFontSize:"fontSize",labelFontStyle:"fontStyle",labelFontWeight:"fontWeight",labelLimit:"limit",labelLineHeight:"lineHeight",labelOrient:"orient",labelPadding:"offset"},$q=Rz(Vq),Uq=Rz(Hq),jq=Rz({header:1,headerRow:1,headerColumn:1,headerFacet:1}),qq=["size","shape","fill","stroke","strokeDash","strokeWidth","opacity"],Kq={aria:1,clipHeight:1,columnPadding:1,columns:1,cornerRadius:1,description:1,direction:1,fillColor:1,format:1,formatType:1,gradientLength:1,gradientOpacity:1,gradientStrokeColor:1,gradientStrokeWidth:1,gradientThickness:1,gridAlign:1,labelAlign:1,labelBaseline:1,labelColor:1,labelFont:1,labelFontSize:1,labelFontStyle:1,labelFontWeight:1,labelLimit:1,labelOffset:1,labelOpacity:1,labelOverlap:1,labelPadding:1,labelSeparation:1,legendX:1,legendY:1,offset:1,orient:1,padding:1,rowPadding:1,strokeColor:1,symbolDash:1,symbolDashOffset:1,symbolFillColor:1,symbolLimit:1,symbolOffset:1,symbolOpacity:1,symbolSize:1,symbolStrokeColor:1,symbolStrokeWidth:1,symbolType:1,tickCount:1,tickMinStep:1,title:1,titleAlign:1,titleAnchor:1,titleBaseline:1,titleColor:1,titleFont:1,titleFontSize:1,titleFontStyle:1,titleFontWeight:1,titleLimit:1,titleLineHeight:1,titleOpacity:1,titleOrient:1,titlePadding:1,type:1,values:1,zindex:1},Gq=(Rz(Kq),"_vgsid_"),Yq={point:{on:"click",fields:[Gq],toggle:"event.shiftKey",resolve:"global",clear:"dblclick"},interval:{on:"[mousedown, window:mouseup] > window:mousemove!",encodings:["x","y"],translate:"[mousedown, window:mouseup] > window:mousemove!",zoom:"wheel!",mark:{fill:"#333",fillOpacity:.125,stroke:"white"},resolve:"global",clear:"dblclick"}};function Zq(e){return!(!e||"legend"!==e&&!e.legend)}function Xq(e){return Zq(e)&&ci(e)}function Qq(e){return!!e.select}function Jq(e){const t=[];for(const i of e||[]){if(Qq(i))continue;const{expr:e,bind:n,...o}=i;if(n&&e){const i={...o,bind:n,init:e};t.push(i)}else{const i={...o,...e?{update:e}:{},...n?{bind:n}:{}};t.push(i)}}return t}function eK(e){return"concat"in e}function tK(e){return"vconcat"in e}function iK(e){return"hconcat"in e}function nK(e){return ci(e)&&void 0!==e.step}function oK(e){return e.view||e.width||e.height}const rK=Rz({align:1,bounds:1,center:1,columns:1,spacing:1});function sK(e,t){return e[t]??e["width"===t?"continuousWidth":"continuousHeight"]}function aK(e,t){const i=lK(e,t);return nK(i)?i.step:cK}function lK(e,t){return Yz(e[t]??e["width"===t?"discreteWidth":"discreteHeight"],{step:e.step})}const cK=20,uK={background:"white",padding:5,timeFormat:"%b %d, %Y",countTitle:"Count of Records",view:{continuousWidth:200,continuousHeight:200,step:cK},mark:{color:"#4c78a8",invalid:"filter",timeUnitBandSize:1},arc:{},area:{},bar:{binSpacing:1,continuousBandSize:5,timeUnitBandPosition:.5},circle:{},geoshape:{},image:{},line:{},point:{},rect:{binSpacing:0,continuousBandSize:5,timeUnitBandPosition:.5},rule:{color:"black"},square:{},text:{color:"black"},tick:{thickness:1},trail:{},boxplot:{size:14,extent:1.5,box:{},median:{color:"white"},outliers:{},rule:{},ticks:null},errorbar:{center:"mean",rule:!0,ticks:!1},errorband:{band:{opacity:.3},borders:!1},scale:{pointPadding:.5,barBandPaddingInner:.1,rectBandPaddingInner:0,minBandSize:2,minFontSize:8,maxFontSize:40,minOpacity:.3,maxOpacity:.8,minSize:9,minStrokeWidth:1,maxStrokeWidth:4,quantileCount:4,quantizeCount:4},projection:{},legend:{gradientHorizontalMaxLength:200,gradientHorizontalMinLength:100,gradientVerticalMaxLength:200,gradientVerticalMinLength:64,unselectedOpacity:.35},header:{titlePadding:10,labelPadding:10},headerColumn:{},headerRow:{},headerFacet:{},selection:Yq,style:{},title:{},facet:{spacing:20},concat:{spacing:20}},hK=["#4c78a8","#f58518","#e45756","#72b7b2","#54a24b","#eeca3b","#b279a2","#ff9da6","#9d755d","#bab0ac"],dK={text:11,guideLabel:10,guideTitle:11,groupTitle:13,groupSubtitle:12},gK={blue:hK[0],orange:hK[1],red:hK[2],teal:hK[3],green:hK[4],yellow:hK[5],purple:hK[6],pink:hK[7],brown:hK[8],gray0:"#000",gray1:"#111",gray2:"#222",gray3:"#333",gray4:"#444",gray5:"#555",gray6:"#666",gray7:"#777",gray8:"#888",gray9:"#999",gray10:"#aaa",gray11:"#bbb",gray12:"#ccc",gray13:"#ddd",gray14:"#eee",gray15:"#fff"};function fK(e){const t=Rz(e||{}),i={};for(const n of t){const t=e[n];i[n]=iq(t)?mH(t):_H(t)}return i}const pK=[...PU,...lq,...jq,"background","padding","legend","lineBreak","scale","style","title","view"];function mK(e={}){const{color:t,font:i,fontSize:n,...o}=e,r=hi({},uK,i?function(e){return{text:{font:e},style:{"guide-label":{font:e},"guide-title":{font:e},"group-title":{font:e},"group-subtitle":{font:e}}}}(i):{},t?function(e={}){return{signals:[{name:"color",value:ci(e)?{...gK,...e}:gK}],mark:{color:{signal:"color.blue"}},rule:{color:{signal:"color.gray0"}},text:{color:{signal:"color.gray0"}},style:{"guide-label":{fill:{signal:"color.gray0"}},"guide-title":{fill:{signal:"color.gray0"}},"group-title":{fill:{signal:"color.gray0"}},"group-subtitle":{fill:{signal:"color.gray0"}},cell:{stroke:{signal:"color.gray8"}}},axis:{domainColor:{signal:"color.gray13"},gridColor:{signal:"color.gray8"},tickColor:{signal:"color.gray13"}},range:{category:[{signal:"color.blue"},{signal:"color.orange"},{signal:"color.red"},{signal:"color.teal"},{signal:"color.green"},{signal:"color.yellow"},{signal:"color.purple"},{signal:"color.pink"},{signal:"color.brown"},{signal:"color.grey8"}]}}}(t):{},n?function(e){return{signals:[{name:"fontSize",value:ci(e)?{...dK,...e}:dK}],text:{fontSize:{signal:"fontSize.text"}},style:{"guide-label":{fontSize:{signal:"fontSize.guideLabel"}},"guide-title":{fontSize:{signal:"fontSize.guideTitle"}},"group-title":{fontSize:{signal:"fontSize.groupTitle"}},"group-subtitle":{fontSize:{signal:"fontSize.groupSubtitle"}}}}}(n):{},o||{}),s=vz(r,pK);for(const e of["background","lineBreak","padding"])r[e]&&(s[e]=_H(r[e]));for(const e of PU)r[e]&&(s[e]=aH(r[e]));for(const e of lq)r[e]&&(s[e]=fK(r[e]));for(const e of jq)r[e]&&(s[e]=aH(r[e]));return r.legend&&(s.legend=aH(r.legend)),r.scale&&(s.scale=aH(r.scale)),r.style&&(s.style=function(e){const t=Rz(e),i={};for(const n of t)i[n]=fK(e[n]);return i}(r.style)),r.title&&(s.title=aH(r.title)),r.view&&(s.view=aH(r.view)),s}const _K=["view",...TU],vK=["color","fontSize","background","padding","facet","concat","numberFormat","timeFormat","countTitle","header","axisQuantitative","axisTemporal","axisDiscrete","axisPoint","axisXBand","axisXPoint","axisXDiscrete","axisXQuantitative","axisXTemporal","axisYBand","axisYPoint","axisYDiscrete","axisYQuantitative","axisYTemporal","scale","selection","overlay"],bK={view:["continuousWidth","continuousHeight","discreteWidth","discreteHeight","step"],area:["line","point"],bar:["binSpacing","continuousBandSize","discreteBandSize"],rect:["binSpacing","continuousBandSize","discreteBandSize"],line:["point"],tick:["bandSize","thickness"]};function yK(e,t,i,n){"view"===t&&(i="cell");const o={...n?e[t][n]:e[t],...e.style[i??t]};Tz(o)||(e.style[i??t]=o),n||delete e[t]}function wK(e){return"layer"in e}class CK{map(e,t){return gj(e)?this.mapFacet(e,t):function(e){return"repeat"in e}(e)?this.mapRepeat(e,t):iK(e)?this.mapHConcat(e,t):tK(e)?this.mapVConcat(e,t):eK(e)?this.mapConcat(e,t):this.mapLayerOrUnit(e,t)}mapLayerOrUnit(e,t){if(wK(e))return this.mapLayer(e,t);if(cq(e))return this.mapUnit(e,t);throw new Error(IH(e))}mapLayer(e,t){return{...e,layer:e.layer.map((e=>this.mapLayerOrUnit(e,t)))}}mapHConcat(e,t){return{...e,hconcat:e.hconcat.map((e=>this.map(e,t)))}}mapVConcat(e,t){return{...e,vconcat:e.vconcat.map((e=>this.map(e,t)))}}mapConcat(e,t){const{concat:i,...n}=e;return{...n,concat:i.map((e=>this.map(e,t)))}}mapFacet(e,t){return{...e,spec:this.map(e.spec,t)}}mapRepeat(e,t){return{...e,spec:this.map(e.spec,t)}}}const SK={zero:1,center:1,normalize:1},xK=new Set([_U,bU,vU,xU,CU,NU,EU,wU,kU,DU]),kK=new Set([bU,vU,_U]);function DK(e,t){const i="x"===t?"y":"radius",n=e[t],o=e[i];if(Cj(n)&&Cj(o))if("quantitative"===Sj(n)&&"quantitative"===Sj(o)){if(n.stack)return t;if(o.stack)return i;const e=Cj(n)&&!!n.aggregate;if(e!==(Cj(o)&&!!o.aggregate))return e?t:i;{const e=n.scale?.type,r=o.scale?.type;if(e&&"linear"!==e)return i;if(r&&"linear"!==r)return t}}else{if("quantitative"===Sj(n))return t;if("quantitative"===Sj(o))return i}else{if("quantitative"===Sj(n))return t;if("quantitative"===Sj(o))return i}}function LK(e,t,i={}){const n=RU(e)?e.type:e;if(!xK.has(n))return null;const o=DK(t,"x")||DK(t,"theta");if(!o)return null;const r=t[o],s=Cj(r)?Oj(r,{}):void 0;let a=function(e){switch(e){case"x":return"y";case"y":return"x";case"theta":return"radius";case"radius":return"theta"}}(o),l=t[a],c=Cj(l)?Oj(l,{}):void 0;c===s&&(c=void 0,l=void 0,a=void 0);const u=wV.reduce(((e,i)=>{if("tooltip"!==i&&hq(t,i)){const n=t[i];for(const t of Ti(n)){const n=Uj(t);if(n.aggregate)continue;const o=Oj(n,{});o&&o===c||e.push({channel:i,fieldDef:n})}}return e}),[]);let h;if(void 0!==r.stack?h=Ji(r.stack)?r.stack?"zero":null:r.stack:kK.has(n)&&(h="zero"),!h||!(h in SK))return null;var d;if(dq(t)&&0===u.length)return null;if(r?.scale?.type&&r?.scale?.type!==V$){if(i.disallowNonLinearStack)return null;a$(function(e){return`Cannot stack non-linear scale (${e}).`}(r.scale.type))}return Lj(t[sV(o)])?(void 0!==r.stack&&a$(`Cannot stack "${d=o}" if there is already "${d}2".`),null):(Cj(r)&&r.aggregate&&!Cz(QV,r.aggregate)&&a$(`Stacking is applied even though the aggregate function is non-summative ("${r.aggregate}").`),{groupbyChannel:l?a:void 0,groupbyField:c,fieldChannel:o,impute:null!==r.impute&&MU(n),stackBy:u,offset:h})}function NK(e){const{point:t,line:i,...n}=e;return Rz(n).length>1?n:n.type}function EK(e){for(const t of["line","area","rule","trail"])e[t]&&(e={...e,[t]:vz(e[t],["point","line"])});return e}function AK(e,t={},i){return"transparent"===e.point?{opacity:0}:e.point?ci(e.point)?e.point:{}:void 0!==e.point?null:t.point||i.shape?ci(t.point)?t.point:{}:void 0}function MK(e,t={}){return e.line?!0===e.line?{}:e.line:void 0!==e.line?null:t.line?!0===t.line?{}:t.line:void 0}class IK{constructor(){this.name="path-overlay"}hasMatchingType(e,t){if(cq(e)){const{mark:i,encoding:n}=e,o=RU(i)?i:{type:i};switch(o.type){case"line":case"rule":case"trail":return!!AK(o,t[o.type],n);case"area":return!!AK(o,t[o.type],n)||!!MK(o,t[o.type])}}return!1}run(e,t,i){const{config:n}=t,{params:o,projection:r,mark:s,encoding:a,...l}=e,c=pq(a,n),u=RU(s)?s:{type:s},h=AK(u,n[u.type],c),d="area"===u.type&&MK(u,n[u.type]),g=[{...o?{params:o}:{},mark:NK({..."area"===u.type&&void 0===u.opacity&&void 0===u.fillOpacity?{opacity:.7}:{},...u}),encoding:vz(c,["shape"])}],f=LK(u,c);let p=c;if(f){const{fieldChannel:e,offset:t}=f;p={...c,[e]:{...c[e],...t?{stack:t}:{}}}}return d&&g.push({...r?{projection:r}:{},mark:{type:"line",..._z(u,["clip","interpolate","tension","tooltip"]),...d},encoding:p}),h&&g.push({...r?{projection:r}:{},mark:{type:"point",opacity:1,filled:!0,..._z(u,["clip","tooltip"]),...h},encoding:p}),i({...l,layer:g},{...t,config:EK(n)})}}function TK(e,t){return t?hj(e)?zK(e,t):FK(e,t):e}function RK(e,t){return t?zK(e,t):e}function OK(e,t,i){const n=t[e];return function(e){return e&&!rn(e)&&"repeat"in e}(n)?n.repeat in i?{...t,[e]:i[n.repeat]}:void a$(function(e){return`Unknown repeated value "${e}".`}(n.repeat)):t}function FK(e,t){if(void 0!==(e=OK("field",e,t))){if(null===e)return null;if(pj(e)&&cj(e.sort)){const i=OK("field",e.sort,t);e={...e,...i?{sort:i}:{}}}return e}}function PK(e,t){if(Cj(e))return FK(e,t);{const i=OK("datum",e,t);return i===e||i.type||(i.type="nominal"),i}}function BK(e,t){if(!Lj(e)){if(wj(e)){const i=PK(e.condition,t);if(i)return{...e,condition:i};{const{condition:t,...i}=e;return i}}return e}{const i=PK(e,t);if(i)return i;if(bj(e))return{condition:e.condition}}}function zK(e,t){const i={};for(const n in e)if(Ki(e,n)){const o=e[n];if(li(o))i[n]=o.map((e=>BK(e,t))).filter((e=>e));else{const e=BK(o,t);void 0!==e&&(i[n]=e)}}return i}class WK{constructor(){this.name="RuleForRangedLine"}hasMatchingType(e){if(cq(e)){const{encoding:t,mark:i}=e;if("line"===i||RU(i)&&"line"===i.type)for(const e of iV){const i=t[oV(e)];if(t[e]&&(Cj(i)&&!iH(i.bin)||xj(i)))return!0}}return!1}run(e,t,i){const{encoding:n,mark:o}=e;var r,s;return a$((r=!!n.x2,s=!!n.y2,`Line mark is for continuous lines and thus cannot be used with ${r&&s?"x2 and y2":r?"x2":"y2"}. We will use the rule mark (line segments) instead.`)),console.log(o),i({...e,mark:ci(o)?{...o,type:"rule"}:"rule"},t)}}function VK({parentEncoding:e,encoding:t={},layer:i}){let n={};if(e){const o=new Set([...Rz(e),...Rz(t)]);for(const r of o){const o=t[r],s=e[r];if(Lj(o)){const e={...s,...o};n[r]=e}else wj(o)?n[r]={...o,condition:{...s,...o.condition}}:o||null===o?n[r]=o:(i||Ej(s)||uH(s)||Lj(s)||li(s))&&(n[r]=s)}}else n=t;return!n||Tz(n)?void 0:n}function HK(e){const{parentProjection:t,projection:i}=e;return t&&i&&a$(function(e){const{parentProjection:t,projection:i}=e;return`Layer's shared projection ${bz(t)} is overridden by a child projection ${bz(i)}.`}({parentProjection:t,projection:i})),i??t}function $K(e){return"filter"in e}function UK(e){return void 0!==e?.stop}function jK(e){return"lookup"in e}function qK(e){return"pivot"in e}function KK(e){return"density"in e}function GK(e){return"quantile"in e}function YK(e){return"regression"in e}function ZK(e){return"loess"in e}function XK(e){return"sample"in e}function QK(e){return"window"in e}function JK(e){return"joinaggregate"in e}function eG(e){return"flatten"in e}function tG(e){return"calculate"in e}function iG(e){return"bin"in e}function nG(e){return"impute"in e}function oG(e){return"timeUnit"in e}function rG(e){return"aggregate"in e}function sG(e){return"stack"in e}function aG(e){return"fold"in e}function lG(e,t){const{transform:i,...n}=e;return i?{...n,transform:i.map((e=>{if($K(e))return{filter:hG(e,t)};if(iG(e)&&nH(e.bin))return{...e,bin:uG(e.bin)};if(jK(e)){const{selection:t,...i}=e.from;return t?{...e,from:{param:t,...i}}:e}return e}))}:e}function cG(e,t){const i=mz(e);if(Cj(i)&&nH(i.bin)&&(i.bin=uG(i.bin)),Aj(i)&&i.scale?.domain?.selection){const{selection:e,...t}=i.scale.domain;i.scale.domain={...t,...e?{param:e}:{}}}if(bj(i))if(li(i.condition))i.condition=i.condition.map((e=>{const{selection:i,param:n,test:o,...r}=e;return n?e:{...r,test:hG(e,t)}}));else{const{selection:e,param:n,test:o,...r}=cG(i.condition,t);i.condition=n?i.condition:{...r,test:hG(i.condition,t)}}return i}function uG(e){const t=e.extent;if(t?.selection){const{selection:i,...n}=t;return{...e,extent:{...n,param:i}}}return e}function hG(e,t){const i=e=>fz(e,(e=>{var i;const n={param:e,empty:t.emptySelections[e]??!0};return(i=t.selectionPredicates)[e]??(i[e]=[]),t.selectionPredicates[e].push(n),n}));return e.selection?i(e.selection):fz(e.test||e.filter,(e=>e.selection?i(e.selection):e))}class dG extends CK{map(e,t){const i=t.selections??[];if(e.params&&!cq(e)){const t=[];for(const n of e.params)Qq(n)?i.push(n):t.push(n);e.params=t}return t.selections=i,super.map(e,gG(e,t))}mapUnit(e,t){const i=t.selections;if(!i||!i.length)return e;const n=(t.path??[]).concat(e.name),o=[];for(const t of i)if(t.views&&t.views.length)for(const i of t.views)(rn(i)&&(i===e.name||n.indexOf(i)>=0)||li(i)&&i.map((e=>n.indexOf(e))).every(((e,t,i)=>-1!==e&&(0===t||e>i[t-1]))))&&o.push(t);else o.push(t);return o.length&&(e.params=o),e}}for(const e of["mapFacet","mapRepeat","mapHConcat","mapVConcat","mapLayer"]){const t=dG.prototype[e];dG.prototype[e]=function(e,i){return t.call(this,e,gG(e,i))}}function gG(e,t){return e.name?{...t,path:(t.path??[]).concat(e.name)}:t}function fG(e,t){void 0===t&&(t=mK(e.config));const i=function(e,t={}){const i={config:t};return _G.map(pG.map(mG.map(e,i),i),i)}(e,t),{width:n,height:o}=e,r=function(e,t,i){let{width:n,height:o}=t;const r=cq(e)||wK(e),s={};r?"container"==n&&"container"==o?(s.type="fit",s.contains="padding"):"container"==n?(s.type="fit-x",s.contains="padding"):"container"==o&&(s.type="fit-y",s.contains="padding"):("container"==n&&(a$(TH("width")),n=void 0),"container"==o&&(a$(TH("height")),o=void 0));const a={type:"pad",...s,...i?vG(i.autosize):{},...vG(e.autosize)};if("fit"!==a.type||r||(a$('Autosize "fit" only works for single views and layered views.'),a.type="pad"),"container"==n&&"fit"!=a.type&&"fit-x"!=a.type&&a$(RH("width")),"container"==o&&"fit"!=a.type&&"fit-y"!=a.type&&a$(RH("height")),!pz(a,{type:"pad"}))return a}(i,{width:n,height:o,autosize:e.autosize},t);return{...i,...r?{autosize:r}:{}}}const pG=new class extends CK{constructor(){super(...arguments),this.nonFacetUnitNormalizers=[Dq,Mq,Fq,new IK,new WK]}map(e,t){if(cq(e)){const i=hq(e.encoding,nW),n=hq(e.encoding,oW),o=hq(e.encoding,rW);if(i||n||o)return this.mapFacetedUnit(e,t)}return super.map(e,t)}mapUnit(e,t){const{parentEncoding:i,parentProjection:n}=t,o=RK(e.encoding,t.repeater),r={...e,...o?{encoding:o}:{}};if(i||n)return this.mapUnitWithParentEncodingOrProjection(r,t);const s=this.mapLayerOrUnit.bind(this);for(const e of this.nonFacetUnitNormalizers)if(e.hasMatchingType(r,t.config))return e.run(r,t,s);return r}mapRepeat(e,t){return function(e){return!li(e.repeat)&&e.repeat.layer}(e)?this.mapLayerRepeat(e,t):this.mapNonLayerRepeat(e,t)}mapLayerRepeat(e,t){const{repeat:i,spec:n,...o}=e,{row:r,column:s,layer:a}=i,{repeater:l={},repeaterPrefix:c=""}=t;return r||s?this.mapRepeat({...e,repeat:{...r?{row:r}:{},...s?{column:s}:{}},spec:{repeat:{layer:a},spec:n}},t):{...o,layer:a.map((e=>{const i={...l,layer:e},o=`${(n.name||"")+c}child__layer_${Bz(e)}`,r=this.mapLayerOrUnit(n,{...t,repeater:i,repeaterPrefix:o});return r.name=o,r}))}}mapNonLayerRepeat(e,t){const{repeat:i,spec:n,data:o,...r}=e;!li(i)&&e.columns&&(e=vz(e,["columns"]),a$(WH("repeat")));const s=[],{repeater:a={},repeaterPrefix:l=""}=t,c=!li(i)&&i.row||[a?a.row:null],u=!li(i)&&i.column||[a?a.column:null],h=li(i)&&i||[a?a.repeat:null];for(const e of h)for(const o of c)for(const r of u){const c={repeat:e,row:o,column:r,layer:a.layer},u=(n.name||"")+l+"child__"+(li(i)?`${Bz(e)}`:(i.row?`row_${Bz(o)}`:"")+(i.column?`column_${Bz(r)}`:"")),h=this.map(n,{...t,repeater:c,repeaterPrefix:u});h.name=u,s.push(vz(h,["data"]))}const d=li(i)?e.columns:i.column?i.column.length:1;return{data:n.data??o,align:"all",...r,columns:d,concat:s}}mapFacet(e,t){const{facet:i}=e;return hj(i)&&e.columns&&(e=vz(e,["columns"]),a$(WH("facet"))),super.mapFacet(e,t)}mapUnitWithParentEncodingOrProjection(e,t){const{encoding:i,projection:n}=e,{parentEncoding:o,parentProjection:r,config:s}=t,a=HK({parentProjection:r,projection:n}),l=VK({parentEncoding:o,encoding:RK(i,t.repeater)});return this.mapUnit({...e,...a?{projection:a}:{},...l?{encoding:l}:{}},{config:s})}mapFacetedUnit(e,t){const{row:i,column:n,facet:o,...r}=e.encoding,{mark:s,width:a,projection:l,height:c,view:u,params:h,encoding:d,...g}=e,{facetMapping:f,layout:p}=this.getFacetMappingAndLayout({row:i,column:n,facet:o},t),m=RK(r,t.repeater);return this.mapFacet({...g,...p,facet:f,spec:{...a?{width:a}:{},...c?{height:c}:{},...u?{view:u}:{},...l?{projection:l}:{},mark:s,encoding:m,...h?{params:h}:{}}},t)}getFacetMappingAndLayout(e,t){const{row:i,column:n,facet:o}=e;if(i||n){o&&a$(`Facet encoding dropped as ${(r=[...i?[nW]:[],...n?[oW]:[]]).join(" and ")} ${r.length>1?"are":"is"} also specified.`);const t={},s={};for(const i of[nW,oW]){const n=e[i];if(n){const{align:e,center:o,spacing:r,columns:a,...l}=n;t[i]=l;for(const e of["align","center","spacing"])void 0!==n[e]&&(s[e]??(s[e]={}),s[e][i]=n[e])}}return{facetMapping:t,layout:s}}{const{align:e,center:i,spacing:n,columns:r,...s}=o;return{facetMapping:TK(s,t.repeater),layout:{...e?{align:e}:{},...i?{center:i}:{},...n?{spacing:n}:{},...r?{columns:r}:{}}}}var r}mapLayer(e,{parentEncoding:t,parentProjection:i,...n}){const{encoding:o,projection:r,...s}=e,a={...n,parentEncoding:VK({parentEncoding:t,encoding:o,layer:!0}),parentProjection:HK({parentProjection:i,projection:r})};return super.mapLayer(s,a)}},mG=new class extends CK{map(e,t){return t.emptySelections??(t.emptySelections={}),t.selectionPredicates??(t.selectionPredicates={}),e=lG(e,t),super.map(e,t)}mapLayerOrUnit(e,t){if((e=lG(e,t)).encoding){const i={};for(const[n,o]of Fz(e.encoding))i[n]=cG(o,t);e={...e,encoding:i}}return super.mapLayerOrUnit(e,t)}mapUnit(e,t){const{selection:i,...n}=e;return i?{...n,params:Fz(i).map((([e,i])=>{const{init:n,bind:o,empty:r,...s}=i;"single"===s.type?(s.type="point",s.toggle=!1):"multi"===s.type&&(s.type="point"),t.emptySelections[e]="none"!==r;for(const i of Oz(t.selectionPredicates[e]??{}))i.empty="none"!==r;return{name:e,value:n,select:s,bind:o}}))}:e}},_G=new dG;function vG(e){return rn(e)?{type:e}:e??{}}const bG=["background","padding"];function yG(e,t){const i={};for(const t of bG)e&&void 0!==e[t]&&(i[t]=_H(e[t]));return t&&(i.params=e.params),i}class wG{constructor(e={},t={}){this.explicit=e,this.implicit=t}clone(){return new wG(mz(this.explicit),mz(this.implicit))}combine(){return{...this.explicit,...this.implicit}}get(e){return Yz(this.explicit[e],this.implicit[e])}getWithExplicit(e){return void 0!==this.explicit[e]?{explicit:!0,value:this.explicit[e]}:void 0!==this.implicit[e]?{explicit:!1,value:this.implicit[e]}:{explicit:!1,value:void 0}}setWithExplicit(e,{value:t,explicit:i}){void 0!==t&&this.set(e,t,i)}set(e,t,i){return delete this[i?"implicit":"explicit"][e],this[i?"explicit":"implicit"][e]=t,this}copyKeyFromSplit(e,{explicit:t,implicit:i}){void 0!==t[e]?this.set(e,t[e],!0):void 0!==i[e]&&this.set(e,i[e],!1)}copyKeyFromObject(e,t){void 0!==t[e]&&this.set(e,t[e],!0)}copyAll(e){for(const t of Rz(e.combine())){const i=e.getWithExplicit(t);this.setWithExplicit(t,i)}}}function CG(e){return{explicit:!0,value:e}}function SG(e){return{explicit:!1,value:e}}function xG(e){return(t,i,n,o)=>{const r=e(t.value,i.value);return r>0?t:r<0?i:kG(t,i,n,o)}}function kG(e,t,i,n){return e.explicit&&t.explicit&&a$(function(e,t,i,n){return`Conflicting ${t.toString()} property "${e.toString()}" (${bz(i)} and ${bz(n)}). Using ${bz(i)}.`}(i,n,e.value,t.value)),e}function DG(e,t,i,n,o=kG){return void 0===e||void 0===e.value?t:e.explicit&&!t.explicit?e:t.explicit&&!e.explicit?t:pz(e.value,t.value)?e:o(e,t,i,n)}class LG extends wG{constructor(e={},t={},i=!1){super(e,t),this.explicit=e,this.implicit=t,this.parseNothing=i}clone(){const e=super.clone();return e.parseNothing=this.parseNothing,e}}function NG(e){return"url"in e}function EG(e){return"values"in e}function AG(e){return"name"in e&&!NG(e)&&!EG(e)&&!MG(e)}function MG(e){return e&&(IG(e)||TG(e)||RG(e))}function IG(e){return"sequence"in e}function TG(e){return"sphere"in e}function RG(e){return"graticule"in e}var OG;function FG(e,t=!0,i=Zt){if(li(e)){const n=e.map((e=>FG(e,t,i)));return t?`[${n.join(", ")}]`:n}return l$(e)?i(t?f$(e):function(e){const t=g$(e,!0);return e.utc?+new Date(Date.UTC(...t)):+new Date(...t)}(e)):t?i(bz(e)):e}function PG(e,t){for(const i of Oz(e.component.selection??{})){const n=i.name;let o=`${n}${KY}, ${"global"===i.resolve?"true":`{unit: ${XY(e)}}`}`;for(const n of ZY)n.defined(i)&&(n.signals&&(t=n.signals(e,i,t)),n.modifyExpr&&(o=n.modifyExpr(e,i,o)));t.push({name:n+GY,on:[{events:{signal:i.name+KY},update:`modify(${gn(i.name+qY)}, ${o})`}]})}return WG(t)}function BG(e,t){if(e.component.selection&&Rz(e.component.selection).length){const i=gn(e.getName("cell"));t.unshift({name:"facet",value:{},on:[{events:BR("mousemove","scope"),update:`isTuple(facet) ? facet : group(${i}).datum`}]})}return WG(t)}function zG(e,t){for(const i of Oz(e.component.selection??{}))for(const n of ZY)n.defined(i)&&n.marks&&(t=n.marks(e,i,t));return t}function WG(e){return e.map((e=>(e.on&&!e.on.length&&delete e.on,e)))}!function(e){e[e.Raw=0]="Raw",e[e.Main=1]="Main",e[e.Row=2]="Row",e[e.Column=3]="Column",e[e.Lookup=4]="Lookup"}(OG||(OG={}));class VG{constructor(e,t){this.debugName=t,this._children=[],this._parent=null,e&&(this.parent=e)}clone(){throw new Error("Cannot clone node")}get parent(){return this._parent}set parent(e){this._parent=e,e&&e.addChild(this)}get children(){return this._children}numChildren(){return this._children.length}addChild(e,t){this._children.includes(e)?a$("Attempt to add the same child twice."):void 0!==t?this._children.splice(t,0,e):this._children.push(e)}removeChild(e){const t=this._children.indexOf(e);return this._children.splice(t,1),t}remove(){let e=this._parent.removeChild(this);for(const t of this._children)t._parent=this._parent,this._parent.addChild(t,e++)}insertAsParentOf(e){const t=e.parent;t.removeChild(this),this.parent=t,e.parent=this}swapWithParent(){const e=this._parent,t=e.parent;for(const t of this._children)t.parent=e;this._children=[],e.removeChild(this),e.parent.removeChild(e),this.parent=t,e.parent=this}}class HG extends VG{constructor(e,t,i,n){super(e,t),this.type=i,this.refCounts=n,this._source=this._name=t,this.refCounts&&!(this._name in this.refCounts)&&(this.refCounts[this._name]=0)}clone(){const e=new this.constructor;return e.debugName=`clone_${this.debugName}`,e._source=this._source,e._name=`clone_${this._name}`,e.type=this.type,e.refCounts=this.refCounts,e.refCounts[e._name]=0,e}dependentFields(){return new Set}producedFields(){return new Set}hash(){return void 0===this._hash&&(this._hash=`Output ${Xz()}`),this._hash}getSource(){return this.refCounts[this._name]++,this._source}isRequired(){return!!this.refCounts[this._name]}setSource(e){this._source=e}}class $G extends VG{constructor(e,t){super(e),this.formula=t}clone(){return new $G(null,mz(this.formula))}static makeFromEncoding(e,t){const i=t.reduceFieldDef(((e,t)=>{const{field:i,timeUnit:n}=t;if(n){const o=Oj(t,{forAs:!0});e[yz({as:o,field:i,timeUnit:n})]={as:o,field:i,timeUnit:n}}return e}),{});return Tz(i)?null:new $G(e,i)}static makeFromTransform(e,t){const{timeUnit:i,...n}={...t},o={...n,timeUnit:C$(i)};return new $G(e,{[yz(o)]:o})}merge(e){this.formula={...this.formula};for(const t in e.formula)this.formula[t]||(this.formula[t]=e.formula[t]);for(const t of e.children)e.removeChild(t),t.parent=this;e.remove()}removeFormulas(e){const t={};for(const[i,n]of Fz(this.formula))e.has(n.as)||(t[i]=n);this.formula=t}producedFields(){return new Set(Oz(this.formula).map((e=>e.as)))}dependentFields(){return new Set(Oz(this.formula).map((e=>e.field)))}hash(){return`TimeUnit ${yz(this.formula)}`}assemble(){const e=[];for(const t of Oz(this.formula)){const{field:i,as:n,timeUnit:o}=t,{unit:r,utc:s,...a}=C$(o);e.push({field:jz(i),type:"timeunit",...r?{units:b$(r)}:{},...s?{timezone:"utc"}:{},...a,as:[n,`${n}_end`]})}return e}}const UG="_tuple_fields";class jG{constructor(...e){this.items=e,this.hasChannel={},this.hasField={}}}const qG={defined:()=>!0,parse:(e,t,i)=>{const n=t.name,o=t.project??(t.project=new jG),r={},s={},a=new Set,l=(e,t)=>{const i="visual"===t?e.channel:e.field;let o=Bz(`${n}_${i}`);for(let e=1;a.has(o);e++)o=Bz(`${n}_${i}_${e}`);return a.add(o),{[t]:o}},c=t.type,u=e.config.selection[c],h=void 0!==i.value?Ti(i.value):null;let{fields:d,encodings:g}=ci(i.select)?i.select:{};if(!d&&!g&&h)for(const e of h)if(ci(e))for(const t of Rz(e))eV[t]?(g||(g=[])).push(t):"interval"===c?(a$('Interval selections should be initialized using "x" and/or "y" keys.'),g=u.encodings):(d||(d=[])).push(t);d||g||(g=u.encodings,d=u.fields);for(const t of g??[]){const i=e.fieldDef(t);if(i){let n=i.field;if(i.aggregate){a$(BH(t,i.aggregate));continue}if(!n){a$(PH(t));continue}if(i.timeUnit){n=e.vgField(t);const o={timeUnit:i.timeUnit,as:n,field:i.field};s[yz(o)]=o}if(!r[n]){let s="E";"interval"===c?tU(e.getScaleComponent(t).get("type"))&&(s="R"):i.bin&&(s="R-RE");const a={field:n,channel:t,type:s};a.signals={...l(a,"data"),...l(a,"visual")},o.items.push(r[n]=a),o.hasField[n]=o.hasChannel[t]=r[n]}}else a$(PH(t))}for(const e of d??[]){if(o.hasField[e])continue;const t={type:"E",field:e};t.signals={...l(t,"data")},o.items.push(t),o.hasField[e]=t}h&&(t.init=h.map((e=>o.items.map((t=>ci(e)?void 0!==e[t.channel]?e[t.channel]:e[t.field]:e))))),Tz(s)||(o.timeUnit=new $G(null,s))},signals:(e,t,i)=>{const n=t.name+UG;return i.filter((e=>e.name===n)).length>0?i:i.concat({name:n,value:t.project.items.map((e=>{const{signals:t,hasLegend:i,...n}=e;return n.field=jz(n.field),n}))})}},KG={defined:e=>"interval"===e.type&&"global"===e.resolve&&e.bind&&"scales"===e.bind,parse:(e,t)=>{const i=t.scales=[];for(const n of t.project.items){const o=n.channel;if(!WV(o))continue;const r=e.getScaleComponent(o),s=r?r.get("type"):void 0;r&&tU(s)?(r.set("selectionExtent",{param:t.name,field:n.field},!0),i.push(n)):a$("Scale bindings are currently only supported for scales with unbinned, continuous domains.")}},topLevelSignals:(e,t,i)=>{const n=t.scales.filter((e=>0===i.filter((t=>t.name===e.signals.data)).length));if(!e.parent||YG(e)||0===n.length)return i;const o=i.filter((e=>e.name===t.name))[0];let r=o.update;if(r.indexOf(YY)>=0)o.update=`{${n.map((e=>`${gn(jz(e.field))}: ${e.signals.data}`)).join(", ")}}`;else{for(const e of n){const t=`${gn(jz(e.field))}: ${e.signals.data}`;r.includes(t)||(r=`${r.substring(0,r.length-1)}, ${t}}`)}o.update=r}return i.concat(n.map((e=>({name:e.signals.data}))))},signals:(e,t,i)=>{if(e.parent&&!YG(e))for(const e of t.scales){const t=i.filter((t=>t.name===e.signals.data))[0];t.push="outer",delete t.value,delete t.update}return i}};function GG(e,t){return`domain(${gn(e.scaleName(t))})`}function YG(e){return e.parent&&LQ(e.parent)&&(!e.parent.parent??YG(e.parent.parent))}const ZG="_brush",XG="_scale_trigger",QG={defined:e=>"interval"===e.type,signals:(e,t,i)=>{const n=t.name,o=n+UG,r=KG.defined(t),s=t.init?t.init[0]:null,a=[],l=[];if(t.translate&&!r){const e=`!event.item || event.item.mark.name !== ${gn(n+ZG)}`;JG(t,((t,i)=>{var n;const o=Ti((n=i.between[0]).filter??(n.filter=[]));return o.includes(e)||o.push(e),t}))}t.project.items.forEach(((n,o)=>{const r=n.channel;if(r!==sW&&r!==aW)return void a$("Interval selections only support x and y encoding channels.");const c=s?s[o]:null,u=function(e,t,i,n){const o=i.channel,r=i.signals.visual,s=i.signals.data,a=KG.defined(t),l=gn(e.scaleName(o)),c=e.getScaleComponent(o),u=c?c.get("type"):void 0,h=e=>`scale(${l}, ${e})`,d=e.getSizeSignalRef(o===sW?"width":"height").signal,g=`${o}(unit)`,f=JG(t,((e,t)=>[...e,{events:t.between[0],update:`[${g}, ${g}]`},{events:t,update:`[${r}[0], clamp(${g}, 0, ${d})]`}]));return f.push({events:{signal:t.name+XG},update:tU(u)?`[${h(`${s}[0]`)}, ${h(`${s}[1]`)}]`:"[0, 0]"}),a?[{name:s,on:[]}]:[{name:r,...n?{init:FG(n,!0,h)}:{value:[]},on:f},{name:s,...n?{init:FG(n)}:{},on:[{events:{signal:r},update:`${r}[0] === ${r}[1] ? null : invert(${l}, ${r})`}]}]}(e,t,n,c),h=n.signals.data,d=n.signals.visual,g=gn(e.scaleName(r)),f=tU(e.getScaleComponent(r).get("type"))?"+":"";i.push(...u),a.push(h),l.push({scaleName:e.scaleName(r),expr:`(!isArray(${h}) || (${f}invert(${g}, ${d})[0] === ${f}${h}[0] && ${f}invert(${g}, ${d})[1] === ${f}${h}[1]))`})})),r||i.push({name:n+XG,value:{},on:[{events:l.map((e=>({scale:e.scaleName}))),update:`${l.map((e=>e.expr)).join(" && ")} ? ${n+XG} : {}`}]});const c=`unit: ${XY(e)}, fields: ${o}, values`;return i.concat({name:n+KY,...s?{init:`{${c}: ${FG(s)}}`}:{},on:[{events:[{signal:a.join(" || ")}],update:`${a.join(" && ")} ? {${c}: [${a}]} : null`}]})},marks:(e,t,i)=>{const n=t.name,{x:o,y:r}=t.project.hasChannel,s=o&&o.signals.visual,a=r&&r.signals.visual,l=`data(${gn(t.name+qY)})`;if(KG.defined(t))return i;const c={x:void 0!==o?{signal:`${s}[0]`}:{value:0},y:void 0!==r?{signal:`${a}[0]`}:{value:0},x2:void 0!==o?{signal:`${s}[1]`}:{field:{group:"width"}},y2:void 0!==r?{signal:`${a}[1]`}:{field:{group:"height"}}};if("global"===t.resolve)for(const t of Rz(c))c[t]=[{test:`${l}.length && ${l}[0].unit === ${XY(e)}`,...c[t]},{value:0}];const{fill:u,fillOpacity:h,cursor:d,...g}=t.mark,f=Rz(g).reduce(((e,t)=>(e[t]=[{test:[void 0!==o&&`${s}[0] !== ${s}[1]`,void 0!==r&&`${a}[0] !== ${a}[1]`].filter((e=>e)).join(" && "),value:g[t]},{value:null}],e)),{});return[{name:`${n+ZG}_bg`,type:"rect",clip:!0,encode:{enter:{fill:{value:u},fillOpacity:{value:h}},update:c}},...i,{name:n+ZG,type:"rect",clip:!0,encode:{enter:{...d?{cursor:{value:d}}:{},fill:{value:"transparent"}},update:{...c,...f}}}]}};function JG(e,t){return e.events.reduce(((e,i)=>i.between?t(e,i):(a$(`${i} is not an ordered event stream for interval selections.`),e)),[])}const eY={defined:e=>"point"===e.type,signals:(e,t,i)=>{const n=t.name,o=n+UG,r=t.project,s="(item().isVoronoi ? datum.datum : datum)",a=r.items.map((t=>{const i=e.fieldDef(t.channel);return i&&i.bin?`[${s}[${gn(e.vgField(t.channel,{}))}], ${s}[${gn(e.vgField(t.channel,{binSuffix:"end"}))}]]`:`${s}[${gn(t.field)}]`})).join(", "),l=`unit: ${XY(e)}, fields: ${o}, values`,c=t.events;return i.concat([{name:n+KY,on:c?[{events:c,update:`datum && item().mark.marktype !== 'group' ? {${l}: [${a}]} : null`,force:!0}]:[]}])}};function tY(e,t,i,n){const o=bj(t)&&t.condition,r=n(t);return o?{[i]:[...Ti(o).map((t=>{const i=n(t);if(function(e){return e.param}(t)){const{param:n,empty:o}=t;return{test:oZ(e,{param:n,empty:o}),...i}}return{test:sZ(e,t.test),...i}})),...void 0!==r?[r]:[]]}:void 0!==r?{[i]:r}:{}}function iY(e,t="text"){const i=e.encoding[t];return tY(e,i,t,(t=>nY(t,e.config)))}function nY(e,t,i="datum"){if(e){if(Ej(e))return bH(e.value);if(Lj(e)){const{format:n,formatType:o}=$j(e);return ZU({fieldOrDatumDef:e,format:n,formatType:o,expr:i,config:t})}}}function oY(e,t={}){const{encoding:i,markDef:n,config:o,stack:r}=e,s=i.tooltip;if(li(s))return{tooltip:sY({tooltip:s},r,o,t)};{const a=t.reactiveGeom?"datum.datum":"datum";return tY(e,s,"tooltip",(e=>{const s=nY(e,o,a);if(s)return s;if(null===e)return;let l=xH("tooltip",n,o);return!0===l&&(l={content:"encoding"}),rn(l)?{value:l}:ci(l)?uH(l)?l:"encoding"===l.content?sY(i,r,o,t):{signal:a}:void 0}))}}function rY(e,t,i,{reactiveGeom:n}={}){const o={},r=n?"datum.datum":"datum",s=[];function a(n,a){const l=oV(a),c=Nj(n)?n:{...n,type:e[l].type},u=Ti(c.title||Hj(c,i)).join(", ");let h;if(xV(a)){const n="x"===a?"x2":"y2",s=Uj(e[n]);if(iH(c.bin)&&s){const e=Oj(c,{expr:r}),t=Oj(s,{expr:r}),{format:a,formatType:l}=$j(c);h=oj(e,t,a,l,i),o[n]=!0}else if(t&&t.fieldChannel===a&&"normalize"===t.offset){const{format:e,formatType:t}=$j(c);h=ZU({fieldOrDatumDef:c,format:e,formatType:t,expr:r,config:i,normalizeStack:!0}).signal}}h??(h=nY(c,i,r).signal),s.push({channel:a,key:u,value:h})}mq(e,((e,t)=>{Cj(e)?a(e,t):yj(e)&&a(e.condition,t)}));const l={};for(const{channel:e,key:t,value:i}of s)o[e]||l[t]||(l[t]=i);return l}function sY(e,t,i,{reactiveGeom:n}={}){const o=rY(e,t,i,{reactiveGeom:n}),r=Fz(o).map((([e,t])=>`"${e}": ${t}`));return r.length>0?{signal:`{${r.join(", ")}}`}:void 0}function aY(e){const{markDef:t,config:i}=e,n=xH("aria",t,i);return!1===n?{}:{...n?{aria:n}:{},...lY(e),...cY(e)}}function lY(e){const{mark:t,markDef:i,config:n}=e;if(!1===n.aria)return{};const o=xH("ariaRoleDescription",i,n);return null!=o?{ariaRoleDescription:{value:o}}:t in fH?{}:{ariaRoleDescription:{value:t}}}function cY(e){const{encoding:t,markDef:i,config:n,stack:o}=e,r=t.description;if(r)return tY(e,r,"description",(t=>nY(t,e.config)));const s=xH("description",i,n);if(null!=s)return{description:bH(s)};if(!1===n.aria)return{};const a=rY(t,o,n);return Tz(a)?void 0:{description:{signal:Fz(a).map((([e,t],i)=>`"${i>0?"; ":""}${e}: " + (${t})`)).join(" + ")}}}function uY(e,t,i={}){const{markDef:n,encoding:o,config:r}=t,{vgChannel:s}=i;let{defaultRef:a,defaultValue:l}=i;void 0===a&&(l??(l=xH(e,n,r,{vgChannel:s,ignoreVgConfig:!0})),void 0!==l&&(a=bH(l)));const c=o[e];return tY(t,c,s??e,(i=>qU({channel:e,channelDef:i,markDef:n,config:r,scaleName:t.scaleName(e),scale:t.getScaleComponent(e),stack:null,defaultRef:a})))}function hY(e,t={filled:void 0}){const{markDef:i,encoding:n,config:o}=e,{type:r}=i,s=t.filled??xH("filled",i,o),a=Cz(["bar","point","circle","square","geoshape"],r)?"transparent":void 0,l=xH(!0===s?"color":void 0,i,o,{vgChannel:"fill"})??o.mark[!0===s&&"color"]??a,c=xH(!1===s?"color":void 0,i,o,{vgChannel:"stroke"})??o.mark[!1===s&&"color"],u=s?"fill":"stroke",h={...l?{fill:bH(l)}:{},...c?{stroke:bH(c)}:{}};return i.color&&(s?i.fill:i.stroke)&&a$(UH("property",{fill:"fill"in i,stroke:"stroke"in i})),{...h,...uY("color",e,{vgChannel:u,defaultValue:s?l:c}),...uY("fill",e,{defaultValue:n.fill?l:void 0}),...uY("stroke",e,{defaultValue:n.stroke?c:void 0})}}function dY(e){const{encoding:t,mark:i}=e,n=t.order;return!MU(i)&&Ej(n)?tY(e,n,"zindex",(e=>bH(e.value))):{}}function gY(e,t){const i=t[function(e){switch(e){case sW:return"xOffset";case aW:return"yOffset";case lW:return"x2Offset";case cW:return"y2Offset";case dW:return"thetaOffset";case uW:return"radiusOffset";case gW:return"theta2Offset";case hW:return"radius2Offset"}}(e)];if(i)return i}function fY(e,t,{defaultPos:i,vgChannel:n}){const{encoding:o,markDef:r,config:s,stack:a}=t,l=o[e],c=o[sV(e)],u=t.scaleName(e),h=t.getScaleComponent(e),d=gY(e,r),g=pY({model:t,defaultPos:i,channel:e,scaleName:u,scale:h}),f=!l&&xV(e)&&(o.latitude||o.longitude)?{field:t.getName(e)}:function(e){const{channel:t,channelDef:i,scaleName:n,stack:o,offset:r,markDef:s}=e;if(Lj(i)&&o&&t===o.fieldChannel){if(Cj(i)){let e=i.bandPosition;if(void 0!==e||"text"!==s.type||"radius"!==t&&"theta"!==t||(e=.5),void 0!==e)return jU({scaleName:n,fieldOrDatumDef:i,startSuffix:"start",bandPosition:e,offset:r})}return UU(i,n,{suffix:"end"},{offset:r})}return WU(e)}({channel:e,channelDef:l,channel2Def:c,markDef:r,config:s,scaleName:u,scale:h,stack:a,offset:d,defaultRef:g});return f?{[n||e]:f}:void 0}function pY({model:e,defaultPos:t,channel:i,scaleName:n,scale:o}){const{markDef:r,config:s}=e;return()=>{const a=oV(i),l=rV(i),c=xH(i,r,s,{vgChannel:l});if(void 0!==c)return KU(i,c);switch(t){case"zeroOrMin":case"zeroOrMax":if(n){const e=o.get("type");if(Cz(["log",H$,$$],e));else if(o.domainDefinitelyIncludesZero())return{scale:n,value:0}}if("zeroOrMin"===t)return"y"===a?{field:{group:"height"}}:{value:0};switch(a){case"radius":return{signal:`min(${e.width.signal},${e.height.signal})/2`};case"theta":return{signal:"2*PI"};case"x":return{field:{group:"width"}};case"y":return{value:0}}break;case"mid":return{...e[aV(i)],mult:.5}}}}const mY={left:"x",center:"xc",right:"x2"},_Y={top:"y",middle:"yc",bottom:"y2"};function vY(e,t,i,n="middle"){if("radius"===e||"theta"===e)return rV(e);const o="x"===e?"align":"baseline",r=xH(o,t,i);let s;return uH(r)?(a$(function(e){return`The ${e} for range marks cannot be an expression`}(o)),s=void 0):s=r,"x"===e?mY[s||("top"===n?"left":"center")]:_Y[s||n]}function bY(e,t,{defaultPos:i,defaultPos2:n,range:o}){return o?yY(e,t,{defaultPos:i,defaultPos2:n}):fY(e,t,{defaultPos:i})}function yY(e,t,{defaultPos:i,defaultPos2:n}){const{markDef:o,config:r}=t,s=sV(e),a=aV(e),l=function(e,t,i){const{encoding:n,mark:o,markDef:r,stack:s,config:a}=e,l=oV(i),c=aV(i),u=rV(i),h=n[l],d=e.scaleName(l),g=e.getScaleComponent(l),f=gY(i in n||i in r?i:l,e.markDef);if(!h&&("x2"===i||"y2"===i)&&(n.latitude||n.longitude)){const t=aV(i),n=e.markDef[t];return null!=n?{[t]:{value:n}}:{[u]:{field:e.getName(i)}}}const p=function({channel:e,channelDef:t,channel2Def:i,markDef:n,config:o,scaleName:r,scale:s,stack:a,offset:l,defaultRef:c}){return Lj(t)&&a&&e.charAt(0)===a.fieldChannel.charAt(0)?UU(t,r,{suffix:"start"},{offset:l}):WU({channel:e,channelDef:i,scaleName:r,scale:s,stack:a,markDef:n,config:o,offset:l,defaultRef:c})}({channel:i,channelDef:h,channel2Def:n[i],markDef:r,config:a,scaleName:d,scale:g,stack:s,offset:f,defaultRef:void 0});return void 0!==p?{[u]:p}:wY(i,r)||wY(i,{[i]:DH(i,r,a.style),[c]:DH(c,r,a.style)})||wY(i,a[o])||wY(i,a.mark)||{[u]:pY({model:e,defaultPos:t,channel:i,scaleName:d,scale:g})()}}(t,n,s);return{...fY(e,t,{defaultPos:i,vgChannel:l[a]?vY(e,o,r):rV(e)}),...l}}function wY(e,t){const i=aV(e),n=rV(e);if(void 0!==t[n])return{[n]:KU(e,t[n])};if(void 0!==t[e])return{[n]:KU(e,t[e])};if(t[i]){const n=t[i];if(!BU(n))return{[i]:KU(e,n)};a$(function(e){return`Position range does not support relative band size for ${e}.`}(i))}}function CY(e,t,i){const{config:n,encoding:o,markDef:r}=e,s=sV(t),a=aV(t),l=o[t],c=o[s],u=e.getScaleComponent(t),h=u?u.get("type"):void 0,d=e.scaleName(t),g=r.orient,f=o[a]??o.size??xH("size",r,n,{vgChannel:a}),p="bar"===i&&("x"===t?"vertical"===g:"horizontal"===g);return!Cj(l)||!(tH(l.bin)||iH(l.bin)||l.timeUnit&&!c)||f&&!BU(f)||eU(h)?(Lj(l)&&eU(h)||p)&&!c?function(e,t,i){const{markDef:n,encoding:o,config:r,stack:s}=i,a=n.orient,l=i.scaleName(t),c=i.getScaleComponent(t),u=aV(t),h=sV(t),d="horizontal"===a&&"y"===t||"vertical"===a&&"x"===t;let g;(o.size||n.size)&&(d?g=uY("size",i,{vgChannel:u,defaultRef:bH(n.size)}):a$(function(e){return`Cannot apply size to non-oriented mark "${e}".`}(n.type)));const f=_j({channel:t,fieldDef:e,markDef:n,config:r,scaleType:c?.get("type"),useVlSizeChannel:d});g=g||{[u]:SY(u,l,c,r,f)};const p=vY(t,n,r,"band"===c?.get("type")&&"band"in g[u]?"top":"middle"),m="xc"===p||"yc"===p,_=gY(t,n),v=WU({channel:t,channelDef:e,markDef:n,config:r,scaleName:l,scale:c,stack:s,offset:_,defaultRef:pY({model:i,defaultPos:"mid",channel:t,scaleName:l,scale:c}),bandPosition:m?.5:uH(f)?{signal:`(1-${f})/2`}:BU(f)?(1-f.band)/2:0});if(u)return{[p]:v,...g};{const e=rV(h),t=g[u],i=_?{...t,offset:_}:t;return{[p]:v,[e]:li(v)?[v[0],{...v[1],offset:i}]:{...v,offset:i}}}}(l,t,e):yY(t,e,{defaultPos:"zeroOrMax",defaultPos2:"zeroOrMin"}):function({fieldDef:e,fieldDef2:t,channel:i,bandSize:n,scaleName:o,markDef:r,spacing:s=0,axisTranslate:a,reverse:l,config:c}){const u=sV(i),h=rV(i),d=rV(u),g=gY(i,r),f=uH(n)?{signal:`(1-${n.signal})/2`}:BU(n)?(1-n.band)/2:.5;if(tH(e.bin)||e.timeUnit)return{[d]:kY({channel:i,fieldDef:e,scaleName:o,markDef:r,bandPosition:f,offset:xY(u,s,l,a,g),config:c}),[h]:kY({channel:i,fieldDef:e,scaleName:o,markDef:r,bandPosition:uH(f)?{signal:`1-${f.signal}`}:1-f,offset:xY(i,s,l,a,g),config:c})};if(iH(e.bin)){const n=UU(e,o,{},{offset:xY(u,s,l,a,g)});if(Cj(t))return{[d]:n,[h]:UU(t,o,{},{offset:xY(i,s,l,a,g)})};if(nH(e.bin)&&e.bin.step)return{[d]:n,[h]:{signal:`scale("${o}", ${Oj(e,{expr:"datum"})} + ${e.bin.step})`,offset:xY(i,s,l,a,g)}}}a$(o$(u))}({fieldDef:l,fieldDef2:c,channel:t,markDef:r,scaleName:d,bandSize:_j({channel:t,fieldDef:l,markDef:r,config:n,scaleType:h}),axisTranslate:e.component.axes[t]?.[0]?.get("translate")??.5,spacing:xV(t)?xH("binSpacing",r,n):void 0,reverse:u.get("reverse"),config:n})}function SY(e,t,i,n,o){if(BU(o)){if(!i)return{mult:o.band,field:{group:e}};{const e=i.get("type");if("band"===e)return{scale:t,band:o.band};1!==o.band&&(a$(function(e){return`Cannot use the relative band size with ${e} scale.`}(e)),o=void 0)}}else{if(uH(o))return o;if(o)return{value:o}}if(i){const e=i.get("range");if(hH(e)&&nn(e.step))return{value:e.step-2}}return{value:aK(n.view,e)-2}}function xY(e,t,i,n,o){if(BW(e))return 0;const r="x"===e||"y2"===e?-t/2:t/2;if(uH(i)||uH(o)||uH(n)){const e=wH(i),t=wH(o),s=wH(n);return{signal:(s?`${s} + `:"")+(e?`(${e} ? -1 : 1) * `:"")+(t?`(${t} + ${r})`:r)}}return o=o||0,n+(i?-o-r:+o+r)}function kY({channel:e,fieldDef:t,scaleName:i,markDef:n,bandPosition:o,offset:r,config:s}){return VU({fieldDef:t,channel:e,markDef:n,ref:jU({scaleName:i,fieldOrDatumDef:t,bandPosition:o,offset:r}),config:s})}const DY=new Set(["aria","width","height"]);function LY(e,t){const{fill:i,stroke:n}="include"===t.color?hY(e):{};return{...EY(e.markDef,t),...NY(e,"fill",i),...NY(e,"stroke",n),...uY("opacity",e),...uY("fillOpacity",e),...uY("strokeOpacity",e),...uY("strokeWidth",e),...uY("strokeDash",e),...dY(e),...oY(e),...iY(e,"href"),...aY(e)}}function NY(e,t,i){const{config:n,mark:o,markDef:r}=e;if("hide"===xH("invalid",r,n)&&i&&!MU(o)){const n=function(e,{invalid:t=!1,channels:i}){const n=i.reduce(((t,i)=>{const n=e.getScaleComponent(i);if(n){const o=n.get("type"),r=e.vgField(i,{expr:"datum"});r&&tU(o)&&(t[r]=!0)}return t}),{}),o=Rz(n);if(o.length>0){const e=t?"||":"&&";return o.map((e=>$U(e,t))).join(` ${e} `)}}(e,{invalid:!0,channels:zV});if(n)return{[t]:[{test:n,value:null},...Ti(i)]}}return i?{[t]:i}:{}}function EY(e,t){return gH.reduce(((i,n)=>(DY.has(n)||void 0===e[n]||"ignore"===t[n]||(i[n]=bH(e[n])),i)),{})}function AY(e){const{config:t,markDef:i}=e;if(xH("invalid",i,t)){const t=function(e,{invalid:t=!1,channels:i}){const n=i.reduce(((t,i)=>{const n=e.getScaleComponent(i);if(n){const o=n.get("type"),r=e.vgField(i,{expr:"datum"});r&&tU(o)&&(t[r]=!0)}return t}),{}),o=Rz(n);if(o.length>0){const e=t?"||":"&&";return o.map((e=>$U(e,t))).join(` ${e} `)}}(e,{channels:SV});if(t)return{defined:{signal:t}}}return{}}function MY(e,t){if(void 0!==t)return{[e]:bH(t)}}const IY="voronoi",TY={defined:e=>"point"===e.type&&e.nearest,parse:(e,t)=>{if(t.events)for(const i of t.events)i.markname=e.getName(IY)},marks:(e,t,i)=>{const{x:n,y:o}=t.project.hasChannel,r=e.mark;if(MU(r))return a$(`The "nearest" transform is not supported for ${r} marks.`),i;const s={name:e.getName(IY),type:"path",interactive:!0,from:{data:e.getName("marks")},encode:{update:{fill:{value:"transparent"},strokeWidth:{value:.35},stroke:{value:"transparent"},isVoronoi:{value:!0},...oY(e,{reactiveGeom:!0})}},transform:[{type:"voronoi",x:{expr:n||!o?"datum.datum.x || 0":"0"},y:{expr:o||!n?"datum.datum.y || 0":"0"},size:[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]}]};let a=0,l=!1;return i.forEach(((t,i)=>{const n=t.name??"";n===e.component.mark[0].name?a=i:n.indexOf(IY)>=0&&(l=!0)})),l||i.splice(a+1,0,s),i}},RY={defined:e=>"point"===e.type&&"global"===e.resolve&&e.bind&&"scales"!==e.bind&&!Zq(e.bind),parse:(e,t,i)=>JY(t,i),topLevelSignals:(e,t,i)=>{const n=t.name,o=t.project,r=t.bind,s=t.init&&t.init[0],a=TY.defined(t)?"(item().isVoronoi ? datum.datum : datum)":"datum";return o.items.forEach(((e,o)=>{const l=Bz(`${n}_${e.field}`);i.filter((e=>e.name===l)).length||i.unshift({name:l,...s?{init:FG(s[o])}:{value:null},on:t.events?[{events:t.events,update:`datum && item().mark.marktype !== 'group' ? ${a}[${gn(e.field)}] : null`}]:[],bind:r[e.field]??r[e.channel]??r})})),i},signals:(e,t,i)=>{const n=t.name,o=t.project,r=i.filter((e=>e.name===n+KY))[0],s=n+UG,a=o.items.map((e=>Bz(`${n}_${e.field}`))),l=a.map((e=>`${e} !== null`)).join(" && ");return a.length&&(r.update=`${l} ? {fields: ${s}, values: [${a.join(", ")}]} : null`),delete r.value,delete r.on,i}},OY="_toggle",FY={defined:e=>"point"===e.type&&!!e.toggle,signals:(e,t,i)=>i.concat({name:t.name+OY,value:!1,on:[{events:t.events,update:t.toggle}]}),modifyExpr:(e,t)=>{const i=t.name+KY,n=t.name+OY;return`${n} ? null : ${i}, `+("global"===t.resolve?`${n} ? null : true, `:`${n} ? null : {unit: ${XY(e)}}, `)+`${n} ? ${i} : null`}},PY={defined:e=>void 0!==e.clear&&!1!==e.clear,parse:(e,t)=>{t.clear&&(t.clear=rn(t.clear)?BR(t.clear,"view"):t.clear)},topLevelSignals:(e,t,i)=>{if(RY.defined(t))for(const e of t.project.items){const n=i.findIndex((i=>i.name===Bz(`${t.name}_${e.field}`)));-1!==n&&i[n].on.push({events:t.clear,update:"null"})}return i},signals:(e,t,i)=>{function n(e,n){-1!==e&&i[e].on&&i[e].on.push({events:t.clear,update:n})}if("interval"===t.type)for(const e of t.project.items){const t=i.findIndex((t=>t.name===e.signals.visual));n(t,"[0, 0]"),-1===t&&n(i.findIndex((t=>t.name===e.signals.data)),"null")}else{let e=i.findIndex((e=>e.name===t.name+KY));n(e,"null"),FY.defined(t)&&(e=i.findIndex((e=>e.name===t.name+OY)),n(e,"false"))}return i}},BY={defined:e=>{const t="global"===e.resolve&&e.bind&&Zq(e.bind),i=1===e.project.items.length&&e.project.items[0].field!==Gq;return t&&!i&&a$("Legend bindings are only supported for selections over an individual field or encoding channel."),t&&i},parse:(e,t,i)=>{const n=mz(i);if(n.select=rn(n.select)?{type:n.select,toggle:t.toggle}:{...n.select,toggle:t.toggle},JY(t,n),ci(i.select)&&(i.select.on||i.select.clear)){const e='event.item && indexof(event.item.mark.role, "legend") < 0';for(const i of t.events)i.filter=Ti(i.filter??[]),i.filter.includes(e)||i.filter.push(e)}const o=Xq(t.bind)?t.bind.legend:"click",r=rn(o)?BR(o,"view"):Ti(o);t.bind={legend:{merge:r}}},topLevelSignals:(e,t,i)=>{const n=t.name,o=Xq(t.bind)&&t.bind.legend,r=e=>t=>{const i=mz(t);return i.markname=e,i};for(const e of t.project.items){if(!e.hasLegend)continue;const s=`${Bz(e.field)}_legend`,a=`${n}_${s}`;if(0===i.filter((e=>e.name===a)).length){const e=o.merge.map(r(`${s}_symbols`)).concat(o.merge.map(r(`${s}_labels`))).concat(o.merge.map(r(`${s}_entries`)));i.unshift({name:a,...t.init?{}:{value:null},on:[{events:e,update:"datum.value || item().items[0].items[0].datum.value",force:!0},{events:o.merge,update:`!event.item || !datum ? null : ${a}`,force:!0}]})}}return i},signals:(e,t,i)=>{const n=t.name,o=t.project,r=i.find((e=>e.name===n+KY)),s=n+UG,a=o.items.filter((e=>e.hasLegend)).map((e=>Bz(`${n}_${Bz(e.field)}_legend`))),l=`${a.map((e=>`${e} !== null`)).join(" && ")} ? {fields: ${s}, values: [${a.join(", ")}]} : null`;t.events&&a.length>0?r.on.push({events:a.map((e=>({signal:e}))),update:l}):a.length>0&&(r.update=l,delete r.value,delete r.on);const c=i.find((e=>e.name===n+OY)),u=Xq(t.bind)&&t.bind.legend;return c&&(t.events?c.on.push({...c.on[0],events:u}):c.on[0].events=u),i}},zY="_translate_anchor",WY="_translate_delta",VY={defined:e=>"interval"===e.type&&e.translate,signals:(e,t,i)=>{const n=t.name,o=KG.defined(t),r=n+zY,{x:s,y:a}=t.project.hasChannel;let l=BR(t.translate,"scope");return o||(l=l.map((e=>(e.between[0].markname=n+ZG,e)))),i.push({name:r,value:{},on:[{events:l.map((e=>e.between[0])),update:"{x: x(unit), y: y(unit)"+(void 0!==s?`, extent_x: ${o?GG(e,sW):`slice(${s.signals.visual})`}`:"")+(void 0!==a?`, extent_y: ${o?GG(e,aW):`slice(${a.signals.visual})`}`:"")+"}"}]},{name:n+WY,value:{},on:[{events:l,update:`{x: ${r}.x - x(unit), y: ${r}.y - y(unit)}`}]}),void 0!==s&&HY(e,t,s,"width",i),void 0!==a&&HY(e,t,a,"height",i),i}};function HY(e,t,i,n,o){const r=t.name,s=r+zY,a=r+WY,l=i.channel,c=KG.defined(t),u=o.filter((e=>e.name===i.signals[c?"data":"visual"]))[0],h=e.getSizeSignalRef(n).signal,d=e.getScaleComponent(l),g=d.get("type"),f=d.get("reverse"),p=`${s}.extent_${l}`,m=`${c?"log"===g?"panLog":"symlog"===g?"panSymlog":"pow"===g?"panPow":"panLinear":"panLinear"}(${p}, ${c?l===sW?f?"":"-":f?"-":"":""}${a}.${l} / ${c?`${h}`:`span(${p})`}${c?"pow"===g?`, ${d.get("exponent")??1}`:"symlog"===g?`, ${d.get("constant")??1}`:"":""})`;u.on.push({events:{signal:a},update:c?m:`clampRange(${m}, 0, ${h})`})}const $Y="_zoom_delta",UY={defined:e=>"interval"===e.type&&e.zoom,signals:(e,t,i)=>{const n=t.name,o=KG.defined(t),r=n+$Y,{x:s,y:a}=t.project.hasChannel,l=gn(e.scaleName(sW)),c=gn(e.scaleName(aW));let u=BR(t.zoom,"scope");return o||(u=u.map((e=>(e.markname=n+ZG,e)))),i.push({name:n+"_zoom_anchor",on:[{events:u,update:o?"{"+[l?`x: invert(${l}, x(unit))`:"",c?`y: invert(${c}, y(unit))`:""].filter((e=>!!e)).join(", ")+"}":"{x: x(unit), y: y(unit)}"}]},{name:r,on:[{events:u,force:!0,update:"pow(1.001, event.deltaY * pow(16, event.deltaMode))"}]}),void 0!==s&&jY(e,t,s,"width",i),void 0!==a&&jY(e,t,a,"height",i),i}};function jY(e,t,i,n,o){const r=t.name,s=i.channel,a=KG.defined(t),l=o.filter((e=>e.name===i.signals[a?"data":"visual"]))[0],c=e.getSizeSignalRef(n).signal,u=e.getScaleComponent(s),h=u.get("type"),d=a?GG(e,s):l.name,g=r+$Y,f=`${a?"log"===h?"zoomLog":"symlog"===h?"zoomSymlog":"pow"===h?"zoomPow":"zoomLinear":"zoomLinear"}(${d}, ${r}_zoom_anchor.${s}, ${g}${a?"pow"===h?`, ${u.get("exponent")??1}`:"symlog"===h?`, ${u.get("constant")??1}`:"":""})`;l.on.push({events:{signal:g},update:a?f:`clampRange(${f}, 0, ${c})`})}const qY="_store",KY="_tuple",GY="_modify",YY="vlSelectionResolve",ZY=[eY,QG,qG,FY,RY,KG,BY,PY,VY,UY,TY];function XY(e,{escape:t}={escape:!0}){let i=t?gn(e.name):e.name;const n=function(e){let t=e.parent;for(;t&&!kQ(t);)t=t.parent;return t}(e);if(n){const{facet:e}=n;for(const t of UW)e[t]&&(i+=` + '__facet_${t}_' + (facet[${gn(n.vgField(t))}])`)}return i}function QY(e){return Oz(e.component.selection??{}).reduce(((e,t)=>e||t.project.items.some((e=>e.field===Gq))),!1)}function JY(e,t){!rn(t.select)&&t.select.on||delete e.events,!rn(t.select)&&t.select.clear||delete e.clear,!rn(t.select)&&t.select.toggle||delete e.toggle}function eZ(e){const t=[];return"Identifier"===e.type?[e.name]:"Literal"===e.type?[e.value]:("MemberExpression"===e.type&&(t.push(...eZ(e.object)),t.push(...eZ(e.property))),t)}function tZ(e){return"MemberExpression"===e.object.type?tZ(e.object):"datum"===e.object.name}function iZ(e){const t=EM(e),i=new Set;return t.visit((e=>{"MemberExpression"===e.type&&tZ(e)&&i.add(eZ(e).slice(1).join("."))})),i}class nZ extends VG{constructor(e,t,i){super(e),this.model=t,this.filter=i,this.expr=sZ(this.model,this.filter,this),this._dependentFields=iZ(this.expr)}clone(){return new nZ(null,this.model,mz(this.filter))}dependentFields(){return this._dependentFields}producedFields(){return new Set}assemble(){return{type:"filter",expr:this.expr}}hash(){return`Filter ${this.expr}`}}function oZ(e,t,i,n="datum"){const o=rn(t)?t:t.param,r=Bz(o),s=gn(r+qY);let a;try{a=e.getSelectionComponent(r,o)}catch(e){return`!!${r}`}if(a.project.timeUnit){const t=i??e.component.data.raw,n=a.project.timeUnit.clone();t.parent?n.insertAsParentOf(t):t.parent=n}const l=`vlSelectionTest(${s}, ${n}${"global"===a.resolve?")":`, ${gn(a.resolve)})`}`,c=`length(data(${s}))`;return!1===t.empty?`${c} && ${l}`:`!${c} || ${l}`}function rZ(e,t,i){const n=Bz(t),o=i.encoding;let r,s=i.field;try{r=e.getSelectionComponent(n,t)}catch(e){return n}if(o||s){if(o&&!s){const e=r.project.items.filter((e=>e.channel===o));!e.length||e.length>1?(s=r.project.items[0].field,a$((e.length?"Multiple ":"No ")+`matching ${gn(o)} encoding found for selection ${gn(i.param)}. `+`Using "field": ${gn(s)}.`)):s=e[0].field}}else s=r.project.items[0].field,r.project.items.length>1&&a$(`A "field" or "encoding" must be specified when using a selection as a scale domain. Using "field": ${gn(s)}.`);return`${r.name}[${gn(jz(s))}]`}function sZ(e,t,i){return zz(t,(t=>rn(t)?t:function(e){return e?.param}(t)?oZ(e,t,i):I$(t)))}function aZ(e,t,i,n){var o,r;e.encode??(e.encode={}),(o=e.encode)[t]??(o[t]={}),(r=e.encode[t]).update??(r.update={}),e.encode[t].update[i]=n}function lZ(e,t,i,n={header:!1}){const{disable:o,orient:r,scale:s,labelExpr:a,title:l,zindex:c,...u}=e.combine();if(!o){for(const e in u){const i=oq[e],n=u[e];if(i&&i!==t&&"both"!==i)delete u[e];else if(iq(n)){const{condition:t,...i}=n,o=Ti(t),r=tq[e];if(r){const{vgProp:t,part:n}=r;aZ(u,n,t,[...o.map((e=>{const{test:t,...i}=e;return{test:sZ(null,t),...i}})),i]),delete u[e]}else if(null===r){const t={signal:o.map((e=>{const{test:t,...i}=e;return`${sZ(null,t)} ? ${yH(i)} : `})).join("")+yH(i)};u[e]=t}}else if(uH(n)){const t=tq[e];if(t){const{vgProp:i,part:o}=t;aZ(u,o,i,n),delete u[e]}}Cz(["labelAlign","labelBaseline"],e)&&null===u[e]&&delete u[e]}if("grid"===t){if(!u.grid)return;if(u.encode){const{grid:e}=u.encode;u.encode={...e?{grid:e}:{}},Tz(u.encode)&&delete u.encode}return{scale:s,orient:r,...u,domain:!1,labels:!1,aria:!1,maxExtent:0,minExtent:0,ticks:!1,zindex:Yz(c,0)}}{if(!n.header&&e.mainExtracted)return;if(void 0!==a){let e=a;u.encode?.labels?.update&&uH(u.encode.labels.update.text)&&(e=qz(a,"datum.label",u.encode.labels.update.text.signal)),aZ(u,"labels","text",{signal:e})}if(null===u.labelAlign&&delete u.labelAlign,u.encode){for(const t of nq)e.hasAxisPart(t)||delete u.encode[t];Tz(u.encode)&&delete u.encode}const t=function(e,t){if(e)return li(e)&&!cH(e)?e.map((e=>Hj(e,t))).join(", "):e}(l,i);return{scale:s,orient:r,grid:!1,...t?{title:t}:{},...u,...!1===i.aria?{aria:!1}:{},zindex:Yz(c,0)}}}}function cZ(e){const{axes:t}=e.component,i=[];for(const n of SV)if(t[n])for(const o of t[n])if(!o.get("disable")&&!o.get("gridScale")){const t="x"===n?"height":"width",o=e.getSizeSignalRef(t).signal;t!==o&&i.push({name:t,update:o})}return i}function uZ(e,t,i,n){return Object.assign.apply(null,[{},...e.map((e=>{if("axisOrient"===e){const e="x"===i?"bottom":"left",o=t["x"===i?"axisBottom":"axisLeft"]||{},r=t["x"===i?"axisTop":"axisRight"]||{},s=new Set([...Rz(o),...Rz(r)]),a={};for(const t of s.values())a[t]={signal:`${n.signal} === "${e}" ? ${wH(o[t])} : ${wH(r[t])}`};return a}return t[e]}))])}function hZ(e,t){const i=[{}];for(const n of e){let e=t[n]?.style;if(e){e=Ti(e);for(const n of e)i.push(t.style[n])}}return Object.assign.apply(null,i)}function dZ(e,t,i,n={}){const o=LH(e,i,t);if(void 0!==o)return{configFrom:"style",configValue:o};for(const t of["vlOnlyAxisConfig","vgAxisConfig","axisConfigStyle"])if(void 0!==n[t]?.[e])return{configFrom:t,configValue:n[t][e]};return{}}const gZ={scale:({model:e,channel:t})=>e.scaleName(t),format:({fieldOrDatumDef:e,config:t,axis:i})=>{const{format:n,formatType:o}=i;return JU(e,e.type,n,o,t,!0)},formatType:({axis:e,fieldOrDatumDef:t,scaleType:i})=>{const{formatType:n}=e;return ej(n,t,i)},grid:({fieldOrDatumDef:e,axis:t,scaleType:i})=>t.grid??function(e,t){return!eU(e)&&Cj(t)&&!tH(t?.bin)&&!iH(t?.bin)}(i,e),gridScale:({model:e,channel:t})=>function(e,t){const i="x"===t?"y":"x";if(e.getScaleComponent(i))return e.scaleName(i)}(e,t),labelAlign:({axis:e,labelAngle:t,orient:i,channel:n})=>e.labelAlign||mZ(t,i,n),labelAngle:({labelAngle:e})=>e,labelBaseline:({axis:e,labelAngle:t,orient:i,channel:n})=>e.labelBaseline||pZ(t,i,n),labelFlush:({axis:e,fieldOrDatumDef:t,channel:i})=>e.labelFlush??function(e,t){if("x"===t&&Cz(["quantitative","temporal"],e))return!0}(t.type,i),labelOverlap:({axis:e,fieldOrDatumDef:t,scaleType:i})=>e.labelOverlap??function(e,t,i,n){if(i&&!ci(n)||"nominal"!==e&&"ordinal"!==e)return"log"!==t&&"symlog"!==t||"greedy"}(t.type,i,Cj(t)&&!!t.timeUnit,Cj(t)?t.sort:void 0),orient:({orient:e})=>e,tickCount:({channel:e,model:t,axis:i,fieldOrDatumDef:n,scaleType:o})=>{const r="x"===e?"width":"y"===e?"height":void 0,s=r?t.getSizeSignalRef(r):void 0;return i.tickCount??function({fieldOrDatumDef:e,scaleType:t,size:i,values:n}){if(!n&&!eU(t)&&"log"!==t){if(Cj(e)){if(tH(e.bin))return{signal:`ceil(${i.signal}/10)`};if(e.timeUnit&&Cz(["month","hours","day","quarter"],C$(e.timeUnit)?.unit))return}return{signal:`ceil(${i.signal}/40)`}}}({fieldOrDatumDef:n,scaleType:o,size:s,values:i.values})},title:({axis:e,model:t,channel:i})=>{if(void 0!==e.title)return e.title;const n=_Z(t,i);if(void 0!==n)return n;const o=t.typedFieldDef(i),r="x"===i?"x2":"y2",s=t.fieldDef(r);return EH(o?[fj(o)]:[],Cj(s)?[fj(s)]:[])},values:({axis:e,fieldOrDatumDef:t})=>function(e,t){const i=e.values;return li(i)?Jj(t,i):uH(i)?i:void 0}(e,t),zindex:({axis:e,fieldOrDatumDef:t,mark:i})=>e.zindex??function(e,t){return"rect"===e&&Fj(t)?1:0}(i,t)};function fZ(e){return`(((${e.signal} % 360) + 360) % 360)`}function pZ(e,t,i,n){if(void 0!==e){if("x"===i){if(uH(e)){const i=fZ(e);return{signal:`(45 < ${i} && ${i} < 135) || (225 < ${i} && ${i} < 315) ? "middle" :(${i} <= 45 || 315 <= ${i}) === ${uH(t)?`(${t.signal} === "top")`:"top"===t} ? "bottom" : "top"`}}if(45{if(Aj(t)&&uj(t.sort)){const{field:n,timeUnit:o}=t,r=t.sort,s=r.map(((e,t)=>`${I$({field:n,timeUnit:o,equal:e})} ? ${t} : `)).join("")+r.length;e=new vZ(e,{calculate:s,as:bZ(t,i,{forAs:!0})})}})),e}producedFields(){return new Set([this.transform.as])}dependentFields(){return this._dependentFields}assemble(){return{type:"formula",expr:this.transform.calculate,as:this.transform.as}}hash(){return`Calculate ${yz(this.transform)}`}}function bZ(e,t,i){return Oj(e,{prefix:t,suffix:"sort_index",...i??{}})}function yZ(e,t){return Cz(["top","bottom"],t)?"column":Cz(["left","right"],t)||"row"===e?"row":"column"}function wZ(e,t,i,n){const o="row"===n?i.headerRow:"column"===n?i.headerColumn:i.headerFacet;return Yz((t||{})[e],o[e],i.header[e])}function CZ(e,t,i,n){const o={};for(const r of e){const e=wZ(r,t||{},i,n);void 0!==e&&(o[r]=e)}return o}const SZ=["row","column"],xZ=["header","footer"];function kZ(e,t){const i=e.component.layoutHeaders[t].title,n=e.config?e.config:void 0,o=e.component.layoutHeaders[t].facetFieldDef?e.component.layoutHeaders[t].facetFieldDef:void 0,{titleAnchor:r,titleAngle:s,titleOrient:a}=CZ(["titleAnchor","titleAngle","titleOrient"],o.header,n,t),l=yZ(t,a),c=tW(s);return{name:`${t}-title`,type:"group",role:`${l}-title`,title:{text:i,..."row"===t?{orient:"left"}:{},style:"guide-title",...LZ(c,l),...DZ(l,c,r),...RZ(n,o,t,$q,Vq)}}}function DZ(e,t,i="middle"){switch(i){case"start":return{align:"left"};case"end":return{align:"right"}}const n=mZ(t,"row"===e?"left":"top","row"===e?"y":"x");return n?{align:n}:{}}function LZ(e,t){const i=pZ(e,"row"===t?"left":"top","row"===t?"y":"x",!0);return i?{baseline:i}:{}}function NZ(e,t){const i=e.component.layoutHeaders[t],n=[];for(const o of xZ)if(i[o])for(const r of i[o]){const s=MZ(e,t,o,i,r);null!=s&&n.push(s)}return n}function EZ(e,t){const{sort:i}=e;return cj(i)?{field:Oj(i,{expr:"datum"}),order:i.order??"ascending"}:li(i)?{field:bZ(e,t,{expr:"datum"}),order:"ascending"}:{field:Oj(e,{expr:"datum"}),order:i??"ascending"}}function AZ(e,t,i){const{format:n,formatType:o,labelAngle:r,labelAnchor:s,labelOrient:a,labelExpr:l}=CZ(["format","formatType","labelAngle","labelAnchor","labelOrient","labelExpr"],e.header,i,t),c=ZU({fieldOrDatumDef:e,format:n,formatType:o,expr:"parent",config:i}).signal,u=yZ(t,a);return{text:{signal:l?qz(qz(l,"datum.label",c),"datum.value",Oj(e,{expr:"parent"})):c},..."row"===t?{orient:"left"}:{},style:"guide-label",frame:"group",...LZ(r,u),...DZ(u,r,s),...RZ(i,e,t,Uq,Hq)}}function MZ(e,t,i,n,o){if(o){let r=null;const{facetFieldDef:s}=n,a=e.config?e.config:void 0;if(s&&o.labels){const{labelOrient:e}=CZ(["labelOrient"],s.header,a,t);("row"===t&&!Cz(["top","bottom"],e)||"column"===t&&!Cz(["left","right"],e))&&(r=AZ(s,t,a))}const l=kQ(e)&&!hj(e.facet),c=o.axes,u=c?.length>0;if(r||u){const a="row"===t?"height":"width";return{name:e.getName(`${t}_${i}`),type:"group",role:`${t}-${i}`,...n.facetFieldDef?{from:{data:e.getName(`${t}_domain`)},sort:EZ(s,t)}:{},...u&&l?{from:{data:e.getName(`facet_domain_${t}`)}}:{},...r?{title:r}:{},...o.sizeSignal?{encode:{update:{[a]:o.sizeSignal}}}:{},...u?{axes:c}:{}}}}return null}const IZ={column:{start:0,end:1},row:{start:1,end:0}};function TZ(e,t){return IZ[t][e]}function RZ(e,t,i,n,o){const r={};for(const s of n){if(!o[s])continue;const n=wZ(s,t?.header,e,i);void 0!==n&&(r[o[s]]=n)}return r}function OZ(e){return[...FZ(e,"width"),...FZ(e,"height"),...FZ(e,"childWidth"),...FZ(e,"childHeight")]}function FZ(e,t){const i="width"===t?"x":"y",n=e.component.layoutSize.get(t);if(!n||"merged"===n)return[];const o=e.getSizeSignalRef(t).signal;if("step"===n){const t=e.getScaleComponent(i);if(t){const n=t.get("type"),r=t.get("range");if(eU(n)&&hH(r)){const n=e.scaleName(i);return kQ(e.parent)&&"independent"===e.parent.component.resolve.scale[i]?[PZ(n,r)]:[PZ(n,r),{name:o,update:BZ(n,t,`domain('${n}').length`)}]}}throw new Error("layout size is step although width/height is not step.")}if("container"==n){const t=o.endsWith("width"),i=t?"containerSize()[0]":"containerSize()[1]",n=`isFinite(${i}) ? ${i} : ${sK(e.config.view,t?"width":"height")}`;return[{name:o,init:n,on:[{update:n,events:"window:resize"}]}]}return[{name:o,value:n}]}function PZ(e,t){return{name:`${e}_step`,value:t.step}}function BZ(e,t,i){const n=t.get("type"),o=t.get("padding"),r=Yz(t.get("paddingOuter"),o);let s=t.get("paddingInner");return s="band"===n?void 0!==s?s:o:1,`bandspace(${i}, ${wH(s)}, ${wH(r)}) * ${e}_step`}function zZ(e){return"childWidth"===e?"width":"childHeight"===e?"height":e}function WZ(e,t){return Rz(e).reduce(((i,n)=>{const o=e[n];return{...i,...tY(t,o,n,(e=>bH(e.value)))}}),{})}function VZ(e,t){if(LQ(t)||kQ(t))return"shared";if(DQ(t))return xV(e)?"independent":"shared";throw new Error("invalid model type for resolve")}function HZ(e,t){const i=e.scale[t],n=xV(t)?"axis":"legend";return"independent"===i?("shared"===e[n][t]&&a$(function(e){return`Setting the scale to be independent for "${e}" means we also have to set the guide (axis or legend) to be independent.`}(t)),"independent"):e[n][t]||"shared"}const $Z={...Kq,disable:1,labelExpr:1,selections:1,opacity:1,shape:1,stroke:1,fill:1,size:1,strokeWidth:1,strokeDash:1,encode:1},UZ=Rz($Z);class jZ extends wG{}const qZ={symbols:function(e,{fieldOrDatumDef:t,model:i,channel:n,legendCmpt:o,legendType:r}){if("symbol"!==r)return;const{markDef:s,encoding:a,config:l,mark:c}=i,u=s.filled&&"trail"!==c;let h={...CH({},i,OU),...hY(i,{filled:u})};const d=o.get("symbolOpacity")??l.legend.symbolOpacity,g=o.get("symbolFillColor")??l.legend.symbolFillColor,f=o.get("symbolStrokeColor")??l.legend.symbolStrokeColor,p=void 0===d?KZ(a.opacity)??s.opacity:void 0;if(h.fill)if("fill"===n||u&&n===vW)delete h.fill;else if(h.fill.field)g?delete h.fill:(h.fill=bH(l.legend.symbolBaseFillColor??"black"),h.fillOpacity=bH(p??1));else if(li(h.fill)){const e=GZ(a.fill??a.color)??s.fill??(u&&s.color);e&&(h.fill=bH(e))}if(h.stroke)if("stroke"===n||!u&&n===vW)delete h.stroke;else if(h.stroke.field||f)delete h.stroke;else if(li(h.stroke)){const e=Yz(GZ(a.stroke||a.color),s.stroke,u?s.color:void 0);e&&(h.stroke={value:e})}if(n!==xW){const e=Cj(t)&&ZZ(0,o,t);e?h.opacity=[{test:e,...bH(p??1)},bH(l.legend.unselectedOpacity)]:p&&(h.opacity=bH(p))}return h={...h,...e},Tz(h)?void 0:h},gradient:function(e,{model:t,legendType:i,legendCmpt:n}){if("gradient"!==i)return;const{config:o,markDef:r,encoding:s}=t;let a={};const l=void 0===(n.get("gradientOpacity")??o.legend.gradientOpacity)?KZ(s.opacity)||r.opacity:void 0;return l&&(a.opacity=bH(l)),a={...a,...e},Tz(a)?void 0:a},labels:function(e,{fieldOrDatumDef:t,model:i,channel:n,legendCmpt:o}){const r=i.legend(n)||{},s=i.config,a=Cj(t)?ZZ(0,o,t):void 0,l=a?[{test:a,value:1},{value:s.legend.unselectedOpacity}]:void 0,{format:c,formatType:u}=r,h=GU(u)?QU({fieldOrDatumDef:t,field:"datum.value",format:c,formatType:u,config:s}):void 0,d={...l?{opacity:l}:{},...h?{text:h}:{},...e};return Tz(d)?void 0:d},entries:function(e,{legendCmpt:t}){return t.get("selections")?.length?{...e,fill:{value:"transparent"}}:e}};function KZ(e){return YZ(e,((e,t)=>Math.max(e,t.value)))}function GZ(e){return YZ(e,((e,t)=>Yz(e,t.value)))}function YZ(e,t){return function(e){const t=e&&e.condition;return!!t&&(li(t)||Ej(t))}(e)?Ti(e.condition).reduce(t,e.value):Ej(e)?e.value:void 0}function ZZ(e,t,i){const n=t.get("selections");if(!n?.length)return;const o=gn(i.field);return n.map((e=>`(!length(data(${gn(Bz(e)+qY)})) || (${e}[${o}] && indexof(${e}[${o}], datum.value) >= 0))`)).join(" || ")}const XZ={direction:({direction:e})=>e,format:({fieldOrDatumDef:e,legend:t,config:i})=>{const{format:n,formatType:o}=t;return JU(e,e.type,n,o,i,!1)},formatType:({legend:e,fieldOrDatumDef:t,scaleType:i})=>{const{formatType:n}=e;return ej(n,t,i)},gradientLength:e=>{const{legend:t,legendConfig:i}=e;return t.gradientLength??i.gradientLength??function({legendConfig:e,model:t,direction:i,orient:n,scaleType:o}){const{gradientHorizontalMaxLength:r,gradientHorizontalMinLength:s,gradientVerticalMaxLength:a,gradientVerticalMinLength:l}=e;if(iU(o))return"horizontal"===i?"top"===n||"bottom"===n?JZ(t,"width",s,r):s:JZ(t,"height",l,a)}(e)},labelOverlap:({legend:e,legendConfig:t,scaleType:i})=>e.labelOverlap??t.labelOverlap??function(e){if(Cz(["quantile","threshold","log","symlog"],e))return"greedy"}(i),symbolType:({legend:e,markDef:t,channel:i,encoding:n})=>e.symbolType??function(e,t,i,n){if("shape"!==t){const e=GZ(i)??n;if(e)return e}switch(e){case"bar":case"rect":case"image":case"square":return"square";case"line":case"trail":case"rule":return"stroke";case"arc":case"point":case"circle":case"tick":case"geoshape":case"area":case"text":return"circle"}}(t.type,i,n.shape,t.shape),title:({fieldOrDatumDef:e,config:t})=>Wj(e,t,{allowDisabling:!0}),type:({legendType:e,scaleType:t,channel:i})=>{if(HW(i)&&iU(t)){if("gradient"===e)return}else if("symbol"===e)return;return e},values:({fieldOrDatumDef:e,legend:t})=>function(e,t){const i=e.values;return li(i)?Jj(t,i):uH(i)?i:void 0}(t,e)};function QZ({legendConfig:e,legendType:t,orient:i,legend:n}){return n.direction??e[t?"gradientDirection":"symbolDirection"]??function(e,t){switch(e){case"top":case"bottom":return"horizontal";case"left":case"right":case"none":case void 0:return;default:return"gradient"===t?"horizontal":void 0}}(i,t)}function JZ(e,t,i,n){return{signal:`clamp(${e.getSizeSignalRef(t).signal}, ${i}, ${n})`}}function eX(e){const t=xQ(e)?function(e){const{encoding:t}=e,i={};for(const n of[vW,...qq]){const o=jj(t[n]);o&&e.getScaleComponent(n)&&(n===wW&&Cj(o)&&o.type===W$||(i[n]=iX(e,n)))}return i}(e):function(e){const{legends:t,resolve:i}=e.component;for(const n of e.children){eX(n);for(const o of Rz(n.component.legends))i.legend[o]=HZ(e.component.resolve,o),"shared"===i.legend[o]&&(t[o]=nX(t[o],n.component.legends[o]),t[o]||(i.legend[o]="independent",delete t[o]))}for(const n of Rz(t))for(const t of e.children)t.component.legends[n]&&"shared"===i.legend[n]&&delete t.component.legends[n];return t}(e);return e.component.legends=t,t}function tX(e,t,i,n){switch(t){case"disable":return void 0!==i;case"values":return!!i?.values;case"title":if("title"===t&&e===n?.title)return!0}return e===(i||{})[t]}function iX(e,t){let i=e.legend(t);const{markDef:n,encoding:o,config:r}=e,s=r.legend,a=new jZ({},function(e,t){const i=e.scaleName(t);if("trail"===e.mark){if("color"===t)return{stroke:i};if("size"===t)return{strokeWidth:i}}return"color"===t?e.markDef.filled?{fill:i}:{stroke:i}:{[t]:i}}(e,t));!function(e,t,i){const n=e.fieldDef(t)?.field;for(const o of Oz(e.component.selection??{})){const e=o.project.hasField[n]??o.project.hasChannel[t];if(e&&BY.defined(o)){const t=i.get("selections")??[];t.push(o.name),i.set("selections",t,!1),e.hasLegend=!0}}}(e,t,a);const l=void 0!==i?!i:s.disable;if(a.set("disable",l,void 0!==i),l)return a;i=i||{};const c=e.getScaleComponent(t).get("type"),u=jj(o[t]),h=Cj(u)?C$(u.timeUnit)?.unit:void 0,d=i.orient||r.legend.orient||"right",g=function(e){const{legend:t}=e;return Yz(t.type,function({channel:e,timeUnit:t,scaleType:i}){if(HW(e)){if(Cz(["quarter","month","day"],t))return"symbol";if(iU(i))return"gradient"}return"symbol"}(e))}({legend:i,channel:t,timeUnit:h,scaleType:c}),f={legend:i,channel:t,model:e,markDef:n,encoding:o,fieldOrDatumDef:u,legendConfig:s,config:r,scaleType:c,orient:d,legendType:g,direction:QZ({legend:i,legendType:g,orient:d,legendConfig:s})};for(const n of UZ){if("gradient"===g&&n.startsWith("symbol")||"symbol"===g&&n.startsWith("gradient"))continue;const o=n in XZ?XZ[n](f):i[n];if(void 0!==o){const s=tX(o,n,i,e.fieldDef(t));(s||void 0===r.legend[n])&&a.set(n,o,s)}}const p=i?.encoding??{},m=a.get("selections"),_={},v={fieldOrDatumDef:u,model:e,channel:t,legendCmpt:a,legendType:g};for(const t of["labels","legend","title","symbols","gradient","entries"]){const i=WZ(p[t]??{},e),n=t in qZ?qZ[t](i,v):i;void 0===n||Tz(n)||(_[t]={...m?.length&&Cj(u)?{name:`${Bz(u.field)}_legend_${t}`}:{},...m?.length?{interactive:!!m}:{},update:n})}return Tz(_)||a.set("encode",_,!!i?.encoding),a}function nX(e,t){if(!e)return t.clone();const i=e.getWithExplicit("orient"),n=t.getWithExplicit("orient");if(i.explicit&&n.explicit&&i.value!==n.value)return;let o=!1;for(const i of UZ){const n=DG(e.getWithExplicit(i),t.getWithExplicit(i),i,"legend",((e,t)=>{switch(i){case"symbolType":return n=e,"circle"===(r=t).value?r:n;case"title":return MH(e,t);case"type":return o=!0,SG("symbol")}var n,r;return kG(e,t,i,"legend")}));e.setWithExplicit(i,n)}return o&&(e.implicit?.encode?.gradient&&Wz(e.implicit,["encode","gradient"]),e.explicit?.encode?.gradient&&Wz(e.explicit,["encode","gradient"])),e}function oX(e){const t=e.component.legends,i={};for(const n of Rz(t)){const o=e.getScaleComponent(n),r=bz(o.get("domains"));if(i[r])for(const e of i[r])nX(e,t[n])||i[r].push(t[n]);else i[r]=[t[n].clone()]}return Oz(i).flat().map((t=>function(e,t){const{disable:i,labelExpr:n,selections:o,...r}=e.combine();if(!i){if(!1===t.aria&&null==r.aria&&(r.aria=!1),r.encode?.symbols){const e=r.encode.symbols.update;!e.fill||"transparent"===e.fill.value||e.stroke||r.stroke||(e.stroke={value:"transparent"});for(const t of qq)r[t]&&delete e[t]}if(r.title||delete r.title,void 0!==n){let e=n;r.encode?.labels?.update&&uH(r.encode.labels.update.text)&&(e=qz(n,"datum.label",r.encode.labels.update.text.signal)),function(e,t,i,n){var o,r;e.encode??(e.encode={}),(o=e.encode)[t]??(o[t]={}),(r=e.encode[t]).update??(r.update={}),e.encode[t].update.text=n}(r,"labels",0,{signal:e})}return r}}(t,e.config))).filter((e=>void 0!==e))}function rX(e){const t=e.component.projection;if(!t||t.merged)return[];const i=t.combine(),{name:n}=i;if(t.data){const o={signal:`[${t.size.map((e=>e.signal)).join(", ")}]`},r=t.data.reduce(((t,i)=>{const n=uH(i)?i.signal:`data('${e.lookupDataSource(i)}')`;return Cz(t,n)||t.push(n),t}),[]);if(r.length<=0)throw new Error("Projection's fit didn't find any data sources");return[{name:n,size:o,fit:{signal:r.length>1?`[${r.join(", ")}]`:r[0]},...i}]}return[{name:n,translate:{signal:"[width / 2, height / 2]"},...i}]}const sX=["type","clipAngle","clipExtent","center","rotate","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];class aX extends wG{constructor(e,t,i,n){super({...t},{name:e}),this.specifiedProjection=t,this.size=i,this.data=n,this.merged=!1}get isFit(){return!!this.data}}function lX(e){e.component.projection=xQ(e)?function(e){if(e.hasProjection){const t=aH(e.specifiedProjection),i=!(t&&(null!=t.scale||null!=t.translate)),n=i?[e.getSizeSignalRef("width"),e.getSizeSignalRef("height")]:void 0,o=i?function(e){const t=[],{encoding:i}=e;for(const n of[[pW,fW],[_W,mW]])(jj(i[n[0]])||jj(i[n[1]]))&&t.push({signal:e.getName(`geojson_${t.length}`)});return e.channelHasField(wW)&&e.typedFieldDef(wW).type===W$&&t.push({signal:e.getName(`geojson_${t.length}`)}),0===t.length&&t.push(e.requestDataName(OG.Main)),t}(e):void 0,r=new aX(e.projectionName(!0),{...aH(e.config.projection)??{},...t??{}},n,o);return r.get("type")||r.set("type","equalEarth",!1),r}}(e):function(e){if(0===e.children.length)return;let t;for(const t of e.children)lX(t);const i=xz(e.children,(e=>{const i=e.component.projection;if(i){if(t){const e=function(e,t){const i=xz(sX,(i=>!Ki(e.explicit,i)&&!Ki(t.explicit,i)||!!(Ki(e.explicit,i)&&Ki(t.explicit,i)&&pz(e.get(i),t.get(i)))));if(pz(e.size,t.size)){if(i)return e;if(pz(e.explicit,{}))return t;if(pz(t.explicit,{}))return e}return null}(t,i);return e&&(t=e),!!e}return t=i,!0}return!0}));if(t&&i){const i=e.projectionName(!0),n=new aX(i,t.specifiedProjection,t.size,mz(t.data));for(const t of e.children){const e=t.component.projection;e&&(e.isFit&&n.data.push(...t.component.projection.data),t.renameProjection(e.get("name"),i),e.merged=!0)}return n}}(e)}function cX(e,t,i,n){if(eq(t,i)){const o=xQ(e)?e.axis(i)??e.legend(i)??{}:{},r=Oj(t,{expr:"datum"}),s=Oj(t,{expr:"datum",binSuffix:"end"});return{formulaAs:Oj(t,{binSuffix:"range",forAs:!0}),formula:oj(r,s,o.format,o.formatType,n)}}return{}}function uX(e,t){return`${eH(e)}_${t}`}function hX(e,t,i){const n=uX(Yj(i,void 0)??{},t);return e.getName(`${n}_bins`)}function dX(e,t,i){let n,o;n=function(e){return"as"in e}(e)?rn(e.as)?[e.as,`${e.as}_end`]:[e.as[0],e.as[1]]:[Oj(e,{forAs:!0}),Oj(e,{binSuffix:"end",forAs:!0})];const r={...Yj(t,void 0)},s=uX(r,e.field),{signal:a,extentSignal:l}=function(e,t){return{signal:e.getName(`${t}_bins`),extentSignal:e.getName(`${t}_extent`)}}(i,s);if(oH(r.extent)){const e=r.extent;o=rZ(i,e.param,e),delete r.extent}return{key:s,binComponent:{bin:r,field:e.field,as:[n],...a?{signal:a}:{},...l?{extentSignal:l}:{},...o?{span:o}:{}}}}class gX extends VG{constructor(e,t){super(e),this.bins=t}clone(){return new gX(null,mz(this.bins))}static makeFromEncoding(e,t){const i=t.reduceFieldDef(((e,i,n)=>{if(Nj(i)&&tH(i.bin)){const{key:o,binComponent:r}=dX(i,i.bin,t);e[o]={...r,...e[o],...cX(t,i,n,t.config)}}return e}),{});return Tz(i)?null:new gX(e,i)}static makeFromTransform(e,t,i){const{key:n,binComponent:o}=dX(t,t.bin,i);return new gX(e,{[n]:o})}merge(e,t){for(const i of Rz(e.bins))i in this.bins?(t(e.bins[i].signal,this.bins[i].signal),this.bins[i].as=Lz([...this.bins[i].as,...e.bins[i].as],yz)):this.bins[i]=e.bins[i];for(const t of e.children)e.removeChild(t),t.parent=this;e.remove()}producedFields(){return new Set(Oz(this.bins).map((e=>e.as)).flat(2))}dependentFields(){return new Set(Oz(this.bins).map((e=>e.field)))}hash(){return`Bin ${yz(this.bins)}`}assemble(){return Oz(this.bins).flatMap((e=>{const t=[],[i,...n]=e.as,{extent:o,...r}=e.bin,s={type:"bin",field:jz(e.field),as:i,signal:e.signal,...oH(o)?{extent:null}:{extent:o},...e.span?{span:{signal:`span(${e.span})`}}:{},...r};!o&&e.extentSignal&&(t.push({type:"extent",field:jz(e.field),signal:e.extentSignal}),s.extent={signal:e.extentSignal}),t.push(s);for(const e of n)for(let n=0;n<2;n++)t.push({type:"formula",expr:Oj({field:i[n]},{expr:"datum"}),as:e[n]});return e.formula&&t.push({type:"formula",expr:e.formula,as:e.formulaAs}),t}))}}class fX extends VG{constructor(e,t,i){super(e),this.dimensions=t,this.measures=i}clone(){return new fX(null,new Set(this.dimensions),mz(this.measures))}get groupBy(){return this.dimensions}static makeFromEncoding(e,t){let i=!1;t.forEachFieldDef((e=>{e.aggregate&&(i=!0)}));const n={},o=new Set;return i?(t.forEachFieldDef(((e,i)=>{const{aggregate:r,field:s}=e;if(r)if("count"===r)n["*"]??(n["*"]={}),n["*"].count=new Set([Oj(e,{forAs:!0})]);else{if(KV(r)||GV(r)){const e=KV(r)?"argmin":"argmax",t=r[e];n[t]??(n[t]={}),n[t][e]=new Set([Oj({op:e,field:t},{forAs:!0})])}else n[s]??(n[s]={}),n[s][r]=new Set([Oj(e,{forAs:!0})]);WV(i)&&"unaggregated"===t.scaleDomain(i)&&(n[s]??(n[s]={}),n[s].min=new Set([Oj({field:s,aggregate:"min"},{forAs:!0})]),n[s].max=new Set([Oj({field:s,aggregate:"max"},{forAs:!0})]))}else!function(e,t,i,n){const o=xQ(n)?n.encoding[sV(t)]:void 0;if(Nj(i)&&xQ(n)&&vj(i,o,n.markDef,n.config))e.add(Oj(i,{})),e.add(Oj(i,{suffix:"end"})),i.bin&&eq(i,t)&&e.add(Oj(i,{binSuffix:"range"}));else if(t in zW){const i=function(e){switch(e){case fW:return"y";case mW:return"y2";case pW:return"x";case _W:return"x2"}}(t);e.add(n.getName(i))}else e.add(Oj(i))}(o,i,e,t)})),o.size+Rz(n).length===0?null:new fX(e,o,n)):null}static makeFromTransform(e,t){const i=new Set,n={};for(const e of t.aggregate){const{op:t,field:i,as:o}=e;t&&("count"===t?(n["*"]??(n["*"]={}),n["*"].count=new Set([o||Oj(e,{forAs:!0})])):(n[i]??(n[i]={}),n[i][t]=new Set([o||Oj(e,{forAs:!0})])))}for(const e of t.groupby??[])i.add(e);return i.size+Rz(n).length===0?null:new fX(e,i,n)}merge(e){return Ez(this.dimensions,e.dimensions)?(function(e,t){for(const i of Rz(t)){const n=t[i];for(const t of Rz(n))i in e?e[i][t]=new Set([...e[i][t]??[],...n[t]]):e[i]={[t]:n[t]}}}(this.measures,e.measures),!0):(function(...e){s$.debug(...e)}("different dimensions, cannot merge"),!1)}addDimensions(e){e.forEach(this.dimensions.add,this.dimensions)}dependentFields(){return new Set([...this.dimensions,...Rz(this.measures)])}producedFields(){const e=new Set;for(const t of Rz(this.measures))for(const i of Rz(this.measures[t])){const n=this.measures[t][i];0===n.size?e.add(`${i}_${t}`):n.forEach(e.add,e)}return e}hash(){return`Aggregate ${yz({dimensions:this.dimensions,measures:this.measures})}`}assemble(){const e=[],t=[],i=[];for(const n of Rz(this.measures))for(const o of Rz(this.measures[n]))for(const r of this.measures[n][o])i.push(r),e.push(o),t.push("*"===n?null:jz(n));return{type:"aggregate",groupby:[...this.dimensions].map(jz),ops:e,fields:t,as:i}}}class pX extends VG{constructor(e,t,i,n){super(e),this.model=t,this.name=i,this.data=n;for(const e of UW){const i=t.facet[e];if(i){const{bin:n,sort:o}=i;this[e]={name:t.getName(`${e}_domain`),fields:[Oj(i),...tH(n)?[Oj(i,{binSuffix:"end"})]:[]],...cj(o)?{sortField:o}:li(o)?{sortIndexField:bZ(i,e)}:{}}}}this.childModel=t.child}hash(){let e="Facet";for(const t of UW)this[t]&&(e+=` ${t.charAt(0)}:${yz(this[t])}`);return e}get fields(){const e=[];for(const t of UW)this[t]?.fields&&e.push(...this[t].fields);return e}dependentFields(){const e=new Set(this.fields);for(const t of UW)this[t]&&(this[t].sortField&&e.add(this[t].sortField.field),this[t].sortIndexField&&e.add(this[t].sortIndexField));return e}producedFields(){return new Set}getSource(){return this.name}getChildIndependentFieldsWithStep(){const e={};for(const t of SV){const i=this.childModel.component.scales[t];if(i&&!i.merged){const n=i.get("type"),o=i.get("range");if(eU(n)&&hH(o)){const i=oQ(rQ(this.childModel,t));i?e[t]=i:a$(FH(t))}}}return e}assembleRowColumnHeaderData(e,t,i){const n={row:"y",column:"x",facet:void 0}[e],o=[],r=[],s=[];n&&i&&i[n]&&(t?(o.push(`distinct_${i[n]}`),r.push("max")):(o.push(i[n]),r.push("distinct")),s.push(`distinct_${i[n]}`));const{sortField:a,sortIndexField:l}=this[e];if(a){const{op:e=rj,field:t}=a;o.push(t),r.push(e),s.push(Oj(a,{forAs:!0}))}else l&&(o.push(l),r.push("max"),s.push(l));return{name:this[e].name,source:t??this.data,transform:[{type:"aggregate",groupby:this[e].fields,...o.length?{fields:o,ops:r,as:s}:{}}]}}assembleFacetHeaderData(e){const{columns:t}=this.model.layout,{layoutHeaders:i}=this.model.component,n=[],o={};for(const e of SZ){for(const t of xZ){const n=(i[e]&&i[e][t])??[];for(const t of n)if(t.axes?.length>0){o[e]=!0;break}}if(o[e]){const i=`length(data("${this.facet.name}"))`,o="row"===e?t?{signal:`ceil(${i} / ${t})`}:1:t?{signal:`min(${i}, ${t})`}:{signal:i};n.push({name:`${this.facet.name}_${e}`,transform:[{type:"sequence",start:0,stop:o}]})}}const{row:r,column:s}=o;return(r||s)&&n.unshift(this.assembleRowColumnHeaderData("facet",null,e)),n}assemble(){const e=[];let t=null;const i=this.getChildIndependentFieldsWithStep(),{column:n,row:o,facet:r}=this;if(n&&o&&(i.x||i.y)){t=`cross_${this.column.name}_${this.row.name}`;const n=[].concat(i.x??[],i.y??[]),o=n.map((()=>"distinct"));e.push({name:t,source:this.data,transform:[{type:"aggregate",groupby:this.fields,fields:n,ops:o}]})}for(const n of[oW,nW])this[n]&&e.push(this.assembleRowColumnHeaderData(n,t,i));if(r){const t=this.assembleFacetHeaderData(i);t&&e.push(...t)}return e}}function mX(e){return"'"===e[0]&&"'"===e[e.length-1]||'"'===e[0]&&'"'===e[e.length-1]?e.slice(1,-1):e}function _X(e){const t={};return gz(e.filter,(e=>{if(A$(e)){let i=null;S$(e)?i=_H(e.equal):k$(e)?i=_H(e.lte):x$(e)?i=_H(e.lt):D$(e)?i=_H(e.gt):L$(e)?i=_H(e.gte):N$(e)?i=e.range[0]:E$(e)&&(i=(e.oneOf??e.in)[0]),i&&(l$(i)?t[e.field]="date":nn(i)?t[e.field]="number":rn(i)&&(t[e.field]="string")),e.timeUnit&&(t[e.field]="date")}})),t}class vX extends VG{constructor(e,t){super(e),this._parse=t}clone(){return new vX(null,mz(this._parse))}hash(){return`Parse ${yz(this._parse)}`}static makeExplicit(e,t,i){let n={};const o=t.data;return!MG(o)&&o&&o.format&&o.format.parse&&(n=o.format.parse),this.makeWithAncestors(e,n,{},i)}static makeWithAncestors(e,t,i,n){for(const e of Rz(i)){const t=n.getWithExplicit(e);void 0!==t.value&&(t.explicit||t.value===i[e]||"derived"===t.value||"flatten"===i[e]?delete i[e]:a$(VH(e,i[e],t.value)))}for(const e of Rz(t)){const i=n.get(e);void 0!==i&&(i===t[e]?delete t[e]:a$(VH(e,t[e],i)))}const o=new wG(t,i);n.copyAll(o);const r={};for(const e of Rz(o.combine())){const t=o.get(e);null!==t&&(r[e]=t)}return 0===Rz(r).length||n.parseNothing?null:new vX(e,r)}get parse(){return this._parse}merge(e){this._parse={...this._parse,...e.parse},e.remove()}assembleFormatParse(){const e={};for(const t of Rz(this._parse)){const i=this._parse[t];1===Gz(t)&&(e[t]=i)}return e}producedFields(){return new Set(Rz(this._parse))}dependentFields(){return new Set(Rz(this._parse))}assembleTransforms(e=!1){return Rz(this._parse).filter((t=>!e||Gz(t)>1)).map((e=>{const t=function(e,t){const i=Hz(e);return"number"===t?`toNumber(${i})`:"boolean"===t?`toBoolean(${i})`:"string"===t?`toString(${i})`:"date"===t?`toDate(${i})`:"flatten"===t?i:t.startsWith("date:")?`timeParse(${i},'${mX(t.slice(5,t.length))}')`:t.startsWith("utc:")?`utcParse(${i},'${mX(t.slice(4,t.length))}')`:(a$(`Unrecognized parse "${t}".`),null)}(e,this._parse[e]);return t?{type:"formula",expr:t,as:Kz(e)}:null})).filter((e=>null!==e))}}class bX extends VG{clone(){return new bX(null)}constructor(e){super(e)}dependentFields(){return new Set}producedFields(){return new Set([Gq])}hash(){return"Identifier"}assemble(){return{type:"identifier",as:Gq}}}class yX extends VG{constructor(e,t){super(e),this.params=t}clone(){return new yX(null,this.params)}dependentFields(){return new Set}producedFields(){}hash(){return`Graticule ${yz(this.params)}`}assemble(){return{type:"graticule",...!0===this.params?{}:this.params}}}class wX extends VG{constructor(e,t){super(e),this.params=t}clone(){return new wX(null,this.params)}dependentFields(){return new Set}producedFields(){return new Set([this.params.as??"data"])}hash(){return`Hash ${yz(this.params)}`}assemble(){return{type:"sequence",...this.params}}}class CX extends VG{constructor(e){let t;if(super(null),e??(e={name:"source"}),MG(e)||(t=e.format?{...vz(e.format,["parse"])}:{}),EG(e))this._data={values:e.values};else if(NG(e)){if(this._data={url:e.url},!t.type){let i=/(?:\.([^.]+))?$/.exec(e.url)[1];Cz(["json","csv","tsv","dsv","topojson"],i)||(i="json"),t.type=i}}else TG(e)?this._data={values:[{type:"Sphere"}]}:(AG(e)||MG(e))&&(this._data={});this._generator=MG(e),e.name&&(this._name=e.name),t&&!Tz(t)&&(this._data.format=t)}dependentFields(){return new Set}producedFields(){}get data(){return this._data}hasName(){return!!this._name}get isGenerator(){return this._generator}get dataName(){return this._name}set dataName(e){this._name=e}set parent(e){throw new Error("Source nodes have to be roots.")}remove(){throw new Error("Source nodes are roots and cannot be removed.")}hash(){throw new Error("Cannot hash sources")}assemble(){return{name:this._name,...this._data,transform:[]}}}var SX,xX=function(e,t,i){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,i),i};function kX(e){return e instanceof CX||e instanceof yX||e instanceof wX}class DX{constructor(){SX.set(this,void 0),xX(this,SX,!1)}setModified(){xX(this,SX,!0)}get modifiedFlag(){return function(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}(this,SX)}}SX=new WeakMap;class LX extends DX{getNodeDepths(e,t,i){i.set(e,t);for(const n of e.children)this.getNodeDepths(n,t+1,i);return i}optimize(e){const t=[...this.getNodeDepths(e,0,new Map).entries()].sort(((e,t)=>t[1]-e[1]));for(const e of t)this.run(e[0]);return this.modifiedFlag}}class NX extends DX{optimize(e){this.run(e);for(const t of e.children)this.optimize(t);return this.modifiedFlag}}class EX extends NX{mergeNodes(e,t){const i=t.shift();for(const n of t)e.removeChild(n),n.parent=i,n.remove()}run(e){const t=e.children.map((e=>e.hash())),i={};for(let n=0;n1&&(this.setModified(),this.mergeNodes(e,i[t]))}}class AX extends NX{constructor(e){super(),this.requiresSelectionId=e&&QY(e)}run(e){e instanceof bX&&(this.requiresSelectionId&&(kX(e.parent)||e.parent instanceof fX||e.parent instanceof vX)||(this.setModified(),e.remove()))}}class MX extends DX{optimize(e){return this.run(e,new Set),this.modifiedFlag}run(e,t){let i=new Set;e instanceof $G&&(i=e.producedFields(),Az(i,t)&&(this.setModified(),e.removeFormulas(t),0===e.producedFields.length&&e.remove()));for(const n of e.children)this.run(n,new Set([...t,...i]))}}class IX extends NX{constructor(){super()}run(e){e instanceof HG&&!e.isRequired()&&(this.setModified(),e.remove())}}class TX extends LX{run(e){if(!(kX(e)||e.numChildren()>1))for(const t of e.children)if(t instanceof vX)if(e instanceof vX)this.setModified(),e.merge(t);else{if(Iz(e.producedFields(),t.dependentFields()))continue;this.setModified(),t.swapWithParent()}}}class RX extends LX{run(e){const t=[...e.children],i=e.children.filter((e=>e instanceof vX));if(e.numChildren()>1&&i.length>=1){const n={},o=new Set;for(const e of i){const t=e.parse;for(const e of Rz(t))e in n?n[e]!==t[e]&&o.add(e):n[e]=t[e]}for(const e of o)delete n[e];if(!Tz(n)){this.setModified();const i=new vX(e,n);for(const o of t){if(o instanceof vX)for(const e of Rz(n))delete o.parse[e];e.removeChild(o),o.parent=i,o instanceof vX&&0===Rz(o.parse).length&&o.remove()}}}}}class OX extends LX{run(e){e instanceof HG||e.numChildren()>0||e instanceof pX||e instanceof CX||(this.setModified(),e.remove())}}class FX extends LX{run(e){const t=e.children.filter((e=>e instanceof $G)),i=t.pop();for(const e of t)this.setModified(),i.merge(e)}}class PX extends LX{run(e){const t=e.children.filter((e=>e instanceof fX)),i={};for(const e of t){const t=yz(e.groupBy);t in i||(i[t]=[]),i[t].push(e)}for(const t of Rz(i)){const n=i[t];if(n.length>1){const t=n.pop();for(const i of n)t.merge(i)&&(e.removeChild(i),i.parent=t,i.remove(),this.setModified())}}}}class BX extends LX{constructor(e){super(),this.model=e}run(e){const t=!(kX(e)||e instanceof nZ||e instanceof vX||e instanceof bX),i=[],n=[];for(const o of e.children)o instanceof gX&&(t&&!Iz(e.producedFields(),o.dependentFields())?i.push(o):n.push(o));if(i.length>0){const t=i.pop();for(const e of i)t.merge(e,this.model.renameSignal.bind(this.model));this.setModified(),e instanceof gX?e.merge(t,this.model.renameSignal.bind(this.model)):t.swapWithParent()}if(n.length>1){const e=n.pop();for(const t of n)e.merge(t,this.model.renameSignal.bind(this.model));this.setModified()}}}class zX extends LX{run(e){const t=[...e.children];if(!Sz(t,(e=>e instanceof HG))||e.numChildren()<=1)return;const i=[];let n;for(const o of t)if(o instanceof HG){let t=o;for(;1===t.numChildren();){const[e]=t.children;if(!(e instanceof HG))break;t=e}i.push(...t.children),n?(e.removeChild(o),o.parent=n.parent,n.parent.removeChild(n),n.parent=t,this.setModified()):n=t}else i.push(o);if(i.length){this.setModified();for(const e of i)e.parent.removeChild(e),e.parent=n}}}class WX extends VG{constructor(e,t){super(e),this.transform=t}clone(){return new WX(null,mz(this.transform))}addDimensions(e){this.transform.groupby=Lz(this.transform.groupby.concat(e),(e=>e))}dependentFields(){const e=new Set;return this.transform.groupby&&this.transform.groupby.forEach(e.add,e),this.transform.joinaggregate.map((e=>e.field)).filter((e=>void 0!==e)).forEach(e.add,e),e}producedFields(){return new Set(this.transform.joinaggregate.map(this.getDefaultName))}getDefaultName(e){return e.as??Oj(e)}hash(){return`JoinAggregateTransform ${yz(this.transform)}`}assemble(){const e=[],t=[],i=[];for(const n of this.transform.joinaggregate)t.push(n.op),i.push(this.getDefaultName(n)),e.push(void 0===n.field?null:n.field);const n=this.transform.groupby;return{type:"joinaggregate",as:i,ops:t,fields:e,...void 0!==n?{groupby:n}:{}}}}class VX extends VG{constructor(e,t){super(e),this._stack=t}clone(){return new VX(null,mz(this._stack))}static makeFromTransform(e,t){const{stack:i,groupby:n,as:o,offset:r="zero"}=t,s=[],a=[];if(void 0!==t.sort)for(const e of t.sort)s.push(e.field),a.push(Yz(e.order,"ascending"));const l={field:s,order:a};let c;return c=function(e){return li(e)&&e.every((e=>rn(e)))&&e.length>1}(o)?o:rn(o)?[o,`${o}_end`]:[`${t.stack}_start`,`${t.stack}_end`],new VX(e,{stackField:i,groupby:n,offset:r,sort:l,facetby:[],as:c})}static makeFromEncoding(e,t){const i=t.stack,{encoding:n}=t;if(!i)return null;const{groupbyChannel:o,fieldChannel:r,offset:s,impute:a}=i;let l;o&&(l=Uj(n[o]));const c=function(e){return e.stack.stackBy.reduce(((e,t)=>{const i=Oj(t.fieldDef);return i&&e.push(i),e}),[])}(t),u=t.encoding.order;let h;return h=li(u)||Cj(u)?NH(u):c.reduce(((e,t)=>(e.field.push(t),e.order.push("y"===r?"descending":"ascending"),e)),{field:[],order:[]}),new VX(e,{dimensionFieldDef:l,stackField:t.vgField(r),facetby:[],stackby:c,sort:h,offset:s,impute:a,as:[t.vgField(r,{suffix:"start",forAs:!0}),t.vgField(r,{suffix:"end",forAs:!0})]})}get stack(){return this._stack}addDimensions(e){this._stack.facetby.push(...e)}dependentFields(){const e=new Set;return e.add(this._stack.stackField),this.getGroupbyFields().forEach(e.add,e),this._stack.facetby.forEach(e.add,e),this._stack.sort.field.forEach(e.add,e),e}producedFields(){return new Set(this._stack.as)}hash(){return`Stack ${yz(this._stack)}`}getGroupbyFields(){const{dimensionFieldDef:e,impute:t,groupby:i}=this._stack;return e?e.bin?t?[Oj(e,{binSuffix:"mid"})]:[Oj(e,{}),Oj(e,{binSuffix:"end"})]:[Oj(e)]:i??[]}assemble(){const e=[],{facetby:t,dimensionFieldDef:i,stackField:n,stackby:o,sort:r,offset:s,impute:a,as:l}=this._stack;if(a&&i){const{bandPosition:r=.5,bin:s}=i;s&&e.push({type:"formula",expr:`${r}*`+Oj(i,{expr:"datum"})+`+${1-r}*`+Oj(i,{expr:"datum",binSuffix:"end"}),as:Oj(i,{binSuffix:"mid",forAs:!0})}),e.push({type:"impute",field:n,groupby:[...o,...t],key:Oj(i,{binSuffix:"mid"}),method:"value",value:0})}return e.push({type:"stack",groupby:[...this.getGroupbyFields(),...t],field:n,sort:r,as:l,offset:s}),e}}class HX extends VG{constructor(e,t){super(e),this.transform=t}clone(){return new HX(null,mz(this.transform))}addDimensions(e){this.transform.groupby=Lz(this.transform.groupby.concat(e),(e=>e))}dependentFields(){const e=new Set;return(this.transform.groupby??[]).forEach(e.add,e),(this.transform.sort??[]).forEach((t=>e.add(t.field))),this.transform.window.map((e=>e.field)).filter((e=>void 0!==e)).forEach(e.add,e),e}producedFields(){return new Set(this.transform.window.map(this.getDefaultName))}getDefaultName(e){return e.as??Oj(e)}hash(){return`WindowTransform ${yz(this.transform)}`}assemble(){const e=[],t=[],i=[],n=[];for(const o of this.transform.window)t.push(o.op),i.push(this.getDefaultName(o)),n.push(void 0===o.param?null:o.param),e.push(void 0===o.field?null:o.field);const o=this.transform.frame,r=this.transform.groupby;if(o&&null===o[0]&&null===o[1]&&t.every((e=>YV(e))))return{type:"joinaggregate",as:i,ops:t,fields:e,...void 0!==r?{groupby:r}:{}};const s=[],a=[];if(void 0!==this.transform.sort)for(const e of this.transform.sort)s.push(e.field),a.push(e.order??"ascending");const l={field:s,order:a},c=this.transform.ignorePeers;return{type:"window",params:n,as:i,ops:t,fields:e,sort:l,...void 0!==c?{ignorePeers:c}:{},...void 0!==r?{groupby:r}:{},...void 0!==o?{frame:o}:{}}}}function $X(e){if(e instanceof pX)if(1!==e.numChildren()||e.children[0]instanceof HG){const i=e.model.component.data.main;UX(i);const n=(t=e,function e(i){if(!(i instanceof pX)){const n=i.clone();if(n instanceof HG){const e=jX+n.getSource();n.setSource(e),t.model.component.data.outputNodes[e]=n}else(n instanceof fX||n instanceof VX||n instanceof HX||n instanceof WX)&&n.addDimensions(t.fields);for(const t of i.children.flatMap(e))t.parent=n;return[n]}return i.children.flatMap(e)}),o=e.children.map(n).flat();for(const e of o)e.parent=i}else{const t=e.children[0];(t instanceof fX||t instanceof VX||t instanceof HX||t instanceof WX)&&t.addDimensions(e.fields),t.swapWithParent(),$X(e)}else e.children.map($X);var t}function UX(e){if(e instanceof HG&&e.type===OG.Main&&1===e.numChildren()){const t=e.children[0];t instanceof pX||(t.swapWithParent(),UX(e))}}const jX="scale_";function qX(e){for(const t of e){for(const e of t.children)if(e.parent!==t)return!1;if(!qX(t.children))return!1}return!0}function KX(e,t){let i=!1;for(const n of t)i=e.optimize(n)||i;return i}function GX(e,t,i){let n=e.sources,o=!1;return o=KX(new IX,n)||o,o=KX(new AX(t),n)||o,n=n.filter((e=>e.numChildren()>0)),o=KX(new OX,n)||o,n=n.filter((e=>e.numChildren()>0)),i||(o=KX(new TX,n)||o,o=KX(new BX(t),n)||o,o=KX(new MX,n)||o,o=KX(new RX,n)||o,o=KX(new PX,n)||o,o=KX(new FX,n)||o,o=KX(new EX,n)||o,o=KX(new zX,n)||o),e.sources=n,o}class YX{constructor(e){Object.defineProperty(this,"signal",{enumerable:!0,get:e})}static fromName(e,t){return new YX((()=>e(t)))}}function ZX(e){xQ(e)?function(e){const t=e.component.scales;for(const i of Rz(t)){const n=XX(e,i);if(t[i].setWithExplicit("domains",n),tQ(e,i),e.component.data.isFaceted){let t=e;for(;!kQ(t)&&t.parent;)t=t.parent;if("shared"===t.component.resolve.scale[i])for(const e of n.value)dH(e)&&(e.data=jX+e.data.replace(jX,""))}}}(e):function(e){for(const t of e.children)ZX(t);const t=e.component.scales;for(const i of Rz(t)){let n,o=null;for(const t of e.children){const e=t.component.scales[i];if(e){n=void 0===n?e.getWithExplicit("domains"):DG(n,e.getWithExplicit("domains"),"domains","scale",nQ);const t=e.get("selectionExtent");o&&t&&o.param!==t.param&&a$("The same selection must be used to override scale domains in a layered view."),o=t}}t[i].setWithExplicit("domains",n),o&&t[i].set("selectionExtent",o,!0)}}(e)}function XX(e,t){const i=e.getScaleComponent(t).get("type"),{encoding:n}=e,o=function(e,t,i,n){if("unaggregated"===e){const{valid:e,reason:n}=iQ(t,i);if(!e)return void a$(n)}else if(void 0===e&&n.useUnaggregatedDomain){const{valid:e}=iQ(t,i);if(e)return"unaggregated"}return e}(e.scaleDomain(t),e.typedFieldDef(t),i,e.config.scale);return o!==e.scaleDomain(t)&&(e.specifiedScales[t]={...e.specifiedScales[t],domain:o}),"x"===t&&jj(n.x2)?jj(n.x)?DG(JX(i,o,e,"x"),JX(i,o,e,"x2"),"domain","scale",nQ):JX(i,o,e,"x2"):"y"===t&&jj(n.y2)?jj(n.y)?DG(JX(i,o,e,"y"),JX(i,o,e,"y2"),"domain","scale",nQ):JX(i,o,e,"y2"):JX(i,o,e,t)}function QX(e,t,i){const n=C$(i)?.unit;return"temporal"===t||n?function(e,t,i){return e.map((e=>({signal:`{data: ${Qj(e,{timeUnit:i,type:t})}}`})))}(e,t,n):[e]}function JX(e,t,i,n){const{encoding:o}=i,r=jj(o[n]),{type:s}=r,a=r.timeUnit;if(function(e){return e&&e.unionWith}(t)){const o=JX(e,void 0,i,n),r=QX(t.unionWith,s,a);return CG([...o.value,...r])}if(uH(t))return CG([t]);if(t&&"unaggregated"!==t&&!oU(t))return CG(QX(t,s,a));const l=i.stack;if(l&&n===l.fieldChannel){if("normalize"===l.offset)return SG([[0,1]]);const e=i.requestDataName(OG.Main);return SG([{data:e,field:i.vgField(n,{suffix:"start"})},{data:e,field:i.vgField(n,{suffix:"end"})}])}const c=WV(n)&&Cj(r)?function(e,t,i){if(!eU(i))return;const n=e.fieldDef(t),o=n.sort;if(uj(o))return{op:"min",field:bZ(n,t),order:"ascending"};const{stack:r}=e,s=r?[...r.groupbyField?[r.groupbyField]:[],...r.stackBy.map((e=>e.fieldDef.field))]:void 0;if(cj(o))return eQ(o,r&&!Cz(s,o.field));if(lj(o)){const{encoding:t,order:i}=o,n=e.fieldDef(t),{aggregate:a,field:l}=n,c=r&&!Cz(s,l);if(KV(a)||GV(a))return eQ({field:Oj(n),order:i},c);if(YV(a)||!a)return eQ({op:a,field:l,order:i},c)}else{if("descending"===o)return{op:"min",field:e.vgField(t),order:"descending"};if(Cz(["ascending",void 0],o))return!0}}(i,n,e):void 0;if(xj(r))return SG(QX([r.datum],s,a));const u=r;if("unaggregated"===t){const e=i.requestDataName(OG.Main),{field:t}=r;return SG([{data:e,field:Oj({field:t,aggregate:"min"})},{data:e,field:Oj({field:t,aggregate:"max"})}])}if(tH(u.bin)){if(eU(e))return SG("bin-ordinal"===e?[]:[{data:Pz(c)?i.requestDataName(OG.Main):i.requestDataName(OG.Raw),field:i.vgField(n,eq(u,n)?{binSuffix:"range"}:{}),sort:!0!==c&&ci(c)?c:{field:i.vgField(n,{}),op:"min"}}]);{const{bin:e}=u;if(tH(e)){const t=hX(i,u.field,e);return SG([new YX((()=>{const e=i.getSignalName(t);return`[${e}.start, ${e}.stop]`}))])}return SG([{data:i.requestDataName(OG.Main),field:i.vgField(n,{})}])}}if(u.timeUnit&&Cz(["time","utc"],e)&&vj(u,xQ(i)?i.encoding[sV(n)]:void 0,i.markDef,i.config)){const e=i.requestDataName(OG.Main);return SG([{data:e,field:i.vgField(n)},{data:e,field:i.vgField(n,{suffix:"end"})}])}return SG(c?[{data:Pz(c)?i.requestDataName(OG.Main):i.requestDataName(OG.Raw),field:i.vgField(n),sort:c}]:[{data:i.requestDataName(OG.Main),field:i.vgField(n)}])}function eQ(e,t){const{op:i,field:n,order:o}=e;return{op:i??(t?"sum":rj),...n?{field:jz(n)}:{},...o?{order:o}:{}}}function tQ(e,t){const i=e.component.scales[t],n=e.specifiedScales[t].domain,o=e.fieldDef(t)?.bin,r=oU(n)&&n,s=nH(o)&&oH(o.extent)&&o.extent;(r||s)&&i.set("selectionExtent",r??s,!0)}function iQ(e,t){const{aggregate:i,type:n}=e;return i?rn(i)&&!JV[i]?{valid:!1,reason:XH(i)}:"quantitative"===n&&"log"===t?{valid:!1,reason:QH(e)}:{valid:!0}:{valid:!1,reason:ZH(e)}}function nQ(e,t,i,n){return e.explicit&&t.explicit&&a$(function(e,t,i,n){return`Conflicting ${t.toString()} property "${e.toString()}" (${bz(i)} and ${bz(n)}). Using the union of the two domains.`}(i,n,e.value,t.value)),{explicit:e.explicit,value:[...e.value,...t.value]}}function oQ(e){if(dH(e)&&rn(e.field))return e.field;if(function(e){return!li(e)&&"fields"in e&&!("data"in e)}(e)){let t;for(const i of e.fields)if(dH(i)&&rn(i.field))if(t){if(t!==i.field)return a$("Detected faceted independent scales that union domain of multiple fields from different data sources. We will use the first field. The result view size may be incorrect."),t}else t=i.field;return a$("Detected faceted independent scales that union domain of the same fields from different source. We will assume that this is the same field from a different fork of the same data source. However, if this is not the case, the result view size may be incorrect."),t}if(function(e){return!li(e)&&"fields"in e&&"data"in e}(e)){a$("Detected faceted independent scales that union domain of multiple fields from the same data source. We will use the first field. The result view size may be incorrect.");const t=e.fields[0];return rn(t)?t:void 0}}function rQ(e,t){return function(e){const t=Lz(e.map((e=>{if(dH(e)){const{sort:t,...i}=e;return i}return e})),yz),i=Lz(e.map((e=>{if(dH(e)){const t=e.sort;return void 0===t||Pz(t)||("op"in t&&"count"===t.op&&delete t.field,"ascending"===t.order&&delete t.order),t}})).filter((e=>void 0!==e)),yz);if(0===t.length)return;if(1===t.length){const t=e[0];if(dH(t)&&i.length>0){let e=i[0];if(i.length>1)a$(t$),e=!0;else if(ci(e)&&"field"in e){const i=e.field;t.field===i&&(e=!e.order||{order:e.order})}return{...t,sort:e}}return t}const n=Lz(i.map((e=>Pz(e)||!("op"in e)||rn(e.op)&&e.op in qV?e:(a$(function(e){return`Dropping sort property ${bz(e)} as unioned domains only support boolean or op "count", "min", and "max".`}(e)),!0))),yz);let o;1===n.length?o=n[0]:n.length>1&&(a$(t$),o=!0);const r=Lz(e.map((e=>dH(e)?e.data:null)),(e=>e));return 1===r.length&&null!==r[0]?{data:r[0],fields:t.map((e=>e.field)),...o?{sort:o}:{}}:{fields:t,...o?{sort:o}:{}}}(e.component.scales[t].get("domains").map((t=>(dH(t)&&(t.data=e.lookupDataSource(t.data)),t))))}function sQ(e){return LQ(e)||DQ(e)?e.children.reduce(((e,t)=>e.concat(sQ(t))),aQ(e)):aQ(e)}function aQ(e){return Rz(e.component.scales).reduce(((t,i)=>{const n=e.component.scales[i];if(n.merged)return t;const o=n.combine(),{name:r,type:s,selectionExtent:a,domains:l,range:c,reverse:u,...h}=o,d=function(e,t,i,n){if(xV(i)){if(hH(e))return{step:{signal:`${t}_step`}}}else if(ci(e)&&dH(e))return{...e,data:n.lookupDataSource(e.data)};return e}(o.range,r,i,e),g=rQ(e,i),f=a?function(e,t,i,n){const o=rZ(e,t.param,t);return{signal:tU(i.get("type"))&&li(n)&&n[0]>n[1]?`isValid(${o}) && reverse(${o})`:o}}(e,a,n,g):null;return t.push({name:r,type:s,...g?{domain:g}:{},...f?{domainRaw:f}:{},range:d,...void 0!==u?{reverse:u}:{},...h}),t}),[])}class lQ extends wG{constructor(e,t){super({},{name:e}),this.merged=!1,this.setWithExplicit("type",t)}domainDefinitelyIncludesZero(){return!1!==this.get("zero")||Sz(this.get("domains"),(e=>li(e)&&2===e.length&&e[0]<=0&&e[1]>=0))}}const cQ=["range","scheme"];function uQ(e){return"x"===e?"width":"y"===e?"height":void 0}function hQ(e,t){const i=e.fieldDef(t);if(i?.bin){const{bin:n,field:o}=i,r=uQ(t),s=e.getName(r);if(ci(n)&&n.binned&&void 0!==n.step)return new YX((()=>{const i=e.scaleName(t),o=`(domain("${i}")[1] - domain("${i}")[0]) / ${n.step}`;return`${e.getSignalName(s)} / (${o})`}));if(tH(n)){const t=hX(e,o,n);return new YX((()=>{const i=e.getSignalName(t),n=`(${i}.stop - ${i}.start) / ${i}.step`;return`${e.getSignalName(s)} / (${n})`}))}}}function dQ(e,t){const i=t.specifiedScales[e],{size:n}=t,o=t.getScaleComponent(e).get("type");for(const n of cQ)if(void 0!==i[n]){const r=fU(o,n),s=pU(e,n);if(r)if(s)a$(s);else switch(n){case"range":{const n=i.range;if(li(n)){if(xV(e))return CG(n.map((e=>{if("width"===e||"height"===e){const i=t.getName(e),n=t.getSignalName.bind(t);return YX.fromName(n,i)}return e})))}else if(ci(n))return CG({data:t.requestDataName(OG.Main),field:n.field,sort:{op:"min",field:t.vgField(e)}});return CG(n)}case"scheme":return CG(gQ(i[n]))}else a$(JH(o,n,e))}if(e===sW||e===aW){const t=e===sW?"width":"height",i=n[t];if(nK(i)){if(eU(o))return CG({step:i.step});a$(e$(t))}}const{rangeMin:r,rangeMax:s}=i,a=function(e,t){const{size:i,config:n,mark:o,encoding:r}=t,s=t.getSignalName.bind(t),{type:a}=jj(r[e]),l=t.getScaleComponent(e).get("type"),{domain:c,domainMid:u}=t.specifiedScales[e];switch(e){case sW:case aW:{if(Cz(["point","band"],l))if(e!==sW||i.width){if(e===aW&&!i.height){const e=lK(n.view,"height");if(nK(e))return e}}else{const e=lK(n.view,"width");if(nK(e))return e}const o=uQ(e),r=t.getName(o);return e===aW&&tU(l)?[YX.fromName(s,r),0]:[0,YX.fromName(s,r)]}case CW:{const r=fQ(o,t.component.scales[e].get("zero"),n),s=function(e,t,i,n){const o={x:hQ(i,"x"),y:hQ(i,"y")};switch(e){case"bar":case"tick":{if(void 0!==n.scale.maxBandSize)return n.scale.maxBandSize;const e=mQ(t,o,n.view);return nn(e)?e-1:new YX((()=>`${e.signal} - 1`))}case"line":case"trail":case"rule":return n.scale.maxStrokeWidth;case"text":return n.scale.maxFontSize;case"point":case"square":case"circle":{if(n.scale.maxSize)return n.scale.maxSize;const e=mQ(t,o,n.view);return nn(e)?Math.pow(pQ*e,2):new YX((()=>`pow(0.95 * ${e.signal}, 2)`))}}throw new Error(qH("size",e))}(o,i,t,n);return nU(l)?function(e,t,i){const n=()=>{const n=wH(t),o=wH(e),r=`(${n} - ${o}) / (${i} - 1)`;return`sequence(${o}, ${n} + ${r}, ${r})`};return uH(t)?new YX(n):{signal:n()}}(r,s,function(e,t,i,n){switch(e){case"quantile":return t.scale.quantileCount;case"quantize":return t.scale.quantizeCount;case"threshold":return void 0!==i&&li(i)?i.length+1:(a$(function(e){return`Domain for ${e} is required for threshold scale.`}(n)),3)}}(l,n,c,e)):[r,s]}case dW:return[0,2*Math.PI];case SW:return[0,360];case uW:return[0,new YX((()=>`min(${t.getSignalName("width")},${t.getSignalName("height")})/2`))];case LW:return[n.scale.minStrokeWidth,n.scale.maxStrokeWidth];case NW:return[[1,0],[4,2],[2,1],[1,1],[1,2,4,2]];case wW:return"symbol";case vW:case bW:case yW:return"ordinal"===l?"nominal"===a?"category":"ordinal":void 0!==u?"diverging":"rect"===o||"geoshape"===o?"heatmap":"ramp";case xW:case kW:case DW:return[n.scale.minOpacity,n.scale.maxOpacity]}throw new Error(`Scale range undefined for channel ${e}`)}(e,t);return(void 0!==r||void 0!==s)&&fU(o,"rangeMin")&&li(a)&&2===a.length?CG([r??a[0],s??a[1]]):SG(a)}function gQ(e){return function(e){return!rn(e)&&!!e.name}(e)?{scheme:e.name,...vz(e,["name"])}:{scheme:e}}function fQ(e,t,i){if(t)return uH(t)?{signal:`${t.signal} ? 0 : ${fQ(e,!1,i)}`}:0;switch(e){case"bar":case"tick":return i.scale.minBandSize;case"line":case"trail":case"rule":return i.scale.minStrokeWidth;case"text":return i.scale.minFontSize;case"point":case"square":case"circle":return i.scale.minSize}throw new Error(qH("size",e))}const pQ=.95;function mQ(e,t,i){const n=nK(e.width)?e.width.step:aK(i,"width"),o=nK(e.height)?e.height.step:aK(i,"height");return t.x||t.y?new YX((()=>`min(${[t.x?t.x.signal:n,t.y?t.y.signal:o].join(", ")})`)):Math.min(n,o)}function _Q(e,t){xQ(e)?function(e,t){const i=e.component.scales,{config:n,encoding:o,markDef:r,specifiedScales:s}=e;for(const a of Rz(i)){const l=s[a],c=i[a],u=e.getScaleComponent(a),h=jj(o[a]),d=l[t],g=u.get("type"),f=u.get("padding"),p=u.get("paddingInner"),m=fU(g,t),_=pU(a,t);if(void 0!==d&&(m?_&&a$(_):a$(JH(g,t,a))),m&&void 0===_)if(void 0!==d){const e=h.timeUnit,i=h.type;switch(t){case"domainMax":case"domainMin":l$(l[t])||"temporal"===i||e?c.set(t,{signal:Qj(l[t],{type:i,timeUnit:e})},!0):c.set(t,l[t],!0);break;default:c.copyKeyFromObject(t,l)}}else{const i=t in vQ?vQ[t]({model:e,channel:a,fieldOrDatumDef:h,scaleType:g,scalePadding:f,scalePaddingInner:p,domain:l.domain,markDef:r,config:n}):n.scale[t];void 0!==i&&c.set(t,i,!1)}}}(e,t):yQ(e,t)}const vQ={bins:({model:e,fieldOrDatumDef:t})=>Cj(t)?function(e,t){const i=t.bin;if(tH(i)){const n=hX(e,t.field,i);return new YX((()=>e.getSignalName(n)))}if(iH(i)&&nH(i)&&void 0!==i.step)return{step:i.step}}(e,t):void 0,interpolate:({channel:e,fieldOrDatumDef:t})=>function(e,t){if(Cz([vW,bW,yW],e)&&"nominal"!==t)return"hcl"}(e,t.type),nice:({scaleType:e,channel:t,domain:i,fieldOrDatumDef:n})=>function(e,t,i,n){if(!(Uj(n)?.bin||li(i)||Cz([H$,$$],e)))return t in CV||void 0}(e,t,i,n),padding:({channel:e,scaleType:t,fieldOrDatumDef:i,markDef:n,config:o})=>function(e,t,i,n,o,r){if(e in CV){if(iU(t)){if(void 0!==i.continuousPadding)return i.continuousPadding;const{type:t,orient:s}=o;if("bar"===t&&(!Cj(n)||!n.bin&&!n.timeUnit)&&("vertical"===s&&"x"===e||"horizontal"===s&&"y"===e))return r.continuousBandSize}if("point"===t)return i.pointPadding}}(e,t,o.scale,i,n,o.bar),paddingInner:({scalePadding:e,channel:t,markDef:i,config:n})=>function(e,t,i,n){if(void 0===e&&t in CV){const{bandPaddingInner:e,barBandPaddingInner:t,rectBandPaddingInner:o}=n;return Yz(e,"bar"===i?t:o)}}(e,t,i.type,n.scale),paddingOuter:({scalePadding:e,channel:t,scaleType:i,markDef:n,scalePaddingInner:o,config:r})=>function(e,t,i,n,o,r){if(void 0===e&&t in CV&&"band"===i){const{bandPaddingOuter:e}=r;return Yz(e,uH(o)?{signal:`${o.signal}/2`}:o/2)}}(e,t,i,n.type,o,r.scale),reverse:({fieldOrDatumDef:e,scaleType:t,channel:i,config:n})=>function(e,t,i,n){return"x"===i&&void 0!==n.xReverse?tU(e)&&"descending"===t?uH(n.xReverse)?{signal:`!${n.xReverse.signal}`}:!n.xReverse:n.xReverse:!(!tU(e)||"descending"!==t)||void 0}(t,Cj(e)?e.sort:void 0,i,n.scale),zero:({channel:e,fieldOrDatumDef:t,domain:i,markDef:n,scaleType:o})=>function(e,t,i,n,o){if(i&&"unaggregated"!==i&&tU(o)){if(li(i)){const e=i[0],t=i[i.length-1];if(e<=0&&t>=0)return!0}return!1}if("size"===e&&"quantitative"===t.type&&!nU(o))return!0;if((!Cj(t)||!t.bin)&&Cz([...SV,...DV],e)){const{orient:t,type:i}=n;return!Cz(["bar","area","line","trail"],i)||!("horizontal"===t&&"y"===e||"vertical"===t&&"x"===e)}return!1}(e,t,i,n,o)};function bQ(e){xQ(e)?function(e){const t=e.component.scales;for(const i of zV){const n=t[i];if(!n)continue;const o=dQ(i,e);n.setWithExplicit("range",o)}}(e):yQ(e,"range")}function yQ(e,t){const i=e.component.scales;for(const i of e.children)"range"===t?bQ(i):_Q(i,t);for(const n of Rz(i)){let o;for(const i of e.children){const e=i.component.scales[n];e&&(o=DG(o,e.getWithExplicit(t),t,"scale",xG(((e,i)=>{switch(t){case"range":return e.step&&i.step?e.step-i.step:0}return 0}))))}i[n].setWithExplicit(t,o)}}function wQ(e){xQ(e)?e.component.scales=function(e){const{encoding:t,mark:i,markDef:n}=e;return zV.reduce(((o,r)=>{const s=jj(t[r]);if(s&&i===AU&&r===wW&&s.type===W$)return o;let a=s&&s.scale;if(s&&null!==a&&!1!==a){a??(a={});const t=function(e,t,i,n){const o=function(e,t,i){switch(t.type){case"nominal":case"ordinal":if(HW(e)||"discrete"===UV(e))return"shape"===e&&"ordinal"===t.type&&a$(YH(e,"ordinal")),"ordinal";if(e in CV){if(Cz(["rect","bar","image","rule"],i.type))return"band"}else if("arc"===i.type&&e in kV)return"band";return BU(i[aV(e)])||Mj(t)&&t.axis?.tickBand?"band":"point";case"temporal":return HW(e)?"time":"discrete"===UV(e)?(a$(YH(e,"temporal")),"ordinal"):Cj(t)&&t.timeUnit&&C$(t.timeUnit).utc?"utc":"time";case"quantitative":return HW(e)?Cj(t)&&tH(t.bin)?"bin-ordinal":"linear":"discrete"===UV(e)?(a$(YH(e,"quantitative")),"ordinal"):"linear";case"geojson":return}throw new Error($H(t.type))}(t,i,n),{type:r}=e;return WV(t)?void 0!==r?function(e,t){if(!WV(e))return!1;switch(e){case sW:case aW:case dW:case uW:return iU(t)||Cz(["band","point"],t);case CW:case LW:case xW:case kW:case DW:case SW:return iU(t)||nU(t)||Cz(["band","point","ordinal"],t);case vW:case bW:case yW:return"band"!==t;case NW:case wW:return"ordinal"===t||nU(t)}}(t,r)?Cj(i)&&(s=r,a=i.type,!(Cz([P$,z$],a)?void 0===s||eU(s):a===B$?Cz([H$,$$,void 0],s):a!==F$||Cz(["log","pow","sqrt","symlog","quantile","quantize","threshold",V$,void 0],s)))?(a$(function(e,t){return`FieldDef does not work with "${e}" scale. We are using "${t}" scale instead.`}(r,o)),o):r:(a$(function(e,t,i){return`Channel "${e}" does not work with "${t}" scale. We are using "${i}" scale instead.`}(t,r,o)),o):o:null;var s,a}(a,r,s,n);o[r]=new lQ(e.scaleName(`${r}`,!0),{value:t,explicit:a.type===t})}return o}),{})}(e):e.component.scales=function(e){var t;const i=e.component.scales={},n={},o=e.component.resolve;for(const i of e.children){wQ(i);for(const r of Rz(i.component.scales))if((t=o.scale)[r]??(t[r]=VZ(r,e)),"shared"===o.scale[r]){const e=n[r],t=i.component.scales[r].getWithExplicit("type");e?j$(e.value,t.value)?n[r]=DG(e,t,"type","scale",CQ):(o.scale[r]="independent",delete n[r]):n[r]=t}}for(const t of Rz(n)){const o=e.scaleName(t,!0),r=n[t];i[t]=new lQ(o,r);for(const i of e.children){const e=i.component.scales[t];e&&(i.renameScale(e.get("name"),o),e.merged=!0)}}return i}(e)}const CQ=xG(((e,t)=>K$(e)-K$(t)));class SQ{constructor(){this.nameMap={}}rename(e,t){this.nameMap[e]=t}has(e){return void 0!==this.nameMap[e]}get(e){for(;this.nameMap[e]&&e!==this.nameMap[e];)e=this.nameMap[e];return e}}function xQ(e){return"unit"===e?.type}function kQ(e){return"facet"===e?.type}function DQ(e){return"concat"===e?.type}function LQ(e){return"layer"===e?.type}class NQ{constructor(e,t,i,n,o,r,s){this.type=t,this.parent=i,this.config=o,this.correctDataNames=e=>(e.from&&e.from.data&&(e.from.data=this.lookupDataSource(e.from.data)),e.from&&e.from.facet&&e.from.facet.data&&(e.from.facet.data=this.lookupDataSource(e.from.facet.data)),e),this.parent=i,this.config=o,this.view=aH(s),this.name=e.name??n,this.title=cH(e.title)?{text:e.title}:e.title?aH(e.title):void 0,this.scaleNameMap=i?i.scaleNameMap:new SQ,this.projectionNameMap=i?i.projectionNameMap:new SQ,this.signalNameMap=i?i.signalNameMap:new SQ,this.data=e.data,this.description=e.description,this.transforms=(e.transform??[]).map((e=>$K(e)?{filter:fz(e.filter,R$)}:e)),this.layout="layer"===t||"unit"===t?{}:function(e,t,i){const n=i[t],o={},{spacing:r,columns:s}=n;void 0!==r&&(o.spacing=r),void 0!==s&&(gj(e)&&!hj(e.facet)||eK(e))&&(o.columns=s),tK(e)&&(o.columns=1);for(const t of rK)if(void 0!==e[t])if("spacing"===t){const i=e[t];o[t]=nn(i)?i:{row:i.row??r,column:i.column??r}}else o[t]=e[t];return o}(e,t,o),this.component={data:{sources:i?i.component.data.sources:[],outputNodes:i?i.component.data.outputNodes:{},outputNodeRefCounts:i?i.component.data.outputNodeRefCounts:{},isFaceted:gj(e)||i&&i.component.data.isFaceted&&void 0===e.data},layoutSize:new wG,layoutHeaders:{row:{},column:{},facet:{}},mark:null,resolve:{scale:{},axis:{},legend:{},...r?mz(r):{}},selection:null,scales:null,projection:null,axes:{},legends:{}}}get width(){return this.getSizeSignalRef("width")}get height(){return this.getSizeSignalRef("height")}parse(){this.parseScale(),this.parseLayoutSize(),this.renameTopLevelLayoutSizeSignal(),this.parseSelections(),this.parseProjection(),this.parseData(),this.parseAxesAndHeaders(),this.parseLegends(),this.parseMarkGroup()}parseScale(){!function(e,{ignoreRange:t}={}){wQ(e),ZX(e);for(const t of gU)_Q(e,t);t||bQ(e)}(this)}parseProjection(){lX(this)}renameTopLevelLayoutSizeSignal(){"width"!==this.getName("width")&&this.renameSignal(this.getName("width"),"width"),"height"!==this.getName("height")&&this.renameSignal(this.getName("height"),"height")}parseLegends(){eX(this)}assembleGroupStyle(){if("unit"===this.type||"layer"===this.type)return this.view?.style??"cell"}assembleEncodeFromView(e){const{style:t,...i}=e,n={};for(const e of Rz(i)){const t=i[e];void 0!==t&&(n[e]=bH(t))}return n}assembleGroupEncodeEntry(e){let t={};return this.view&&(t=this.assembleEncodeFromView(this.view)),e||(this.description&&(t.description=bH(this.description)),"unit"!==this.type&&"layer"!==this.type)?Tz(t)?void 0:t:{width:this.getSizeSignalRef("width"),height:this.getSizeSignalRef("height"),...t??{}}}assembleLayout(){if(!this.layout)return;const{spacing:e,...t}=this.layout,{component:i,config:n}=this,o=function(e,t){const i={};for(const n of UW){const o=e[n];if(o?.facetFieldDef){const{titleAnchor:e,titleOrient:r}=CZ(["titleAnchor","titleOrient"],o.facetFieldDef.header,t,n),s=yZ(n,r),a=TZ(e,s);void 0!==a&&(i[s]=a)}}return Tz(i)?void 0:i}(i.layoutHeaders,n);return{padding:e,...this.assembleDefaultLayout(),...t,...o?{titleBand:o}:{}}}assembleDefaultLayout(){return{}}assembleHeaderMarks(){const{layoutHeaders:e}=this.component;let t=[];for(const i of UW)e[i].title&&t.push(kZ(this,i));for(const e of SZ)t=t.concat(NZ(this,e));return t}assembleAxes(){return function(e,t){const{x:i=[],y:n=[]}=e;return[...i.map((e=>lZ(e,"grid",t))),...n.map((e=>lZ(e,"grid",t))),...i.map((e=>lZ(e,"main",t))),...n.map((e=>lZ(e,"main",t)))].filter((e=>e))}(this.component.axes,this.config)}assembleLegends(){return oX(this)}assembleProjections(){return LQ(e=this)||DQ(e)?function(e){return e.children.reduce(((e,t)=>e.concat(t.assembleProjections())),rX(e))}(e):rX(e);var e}assembleTitle(){const{encoding:e,...t}=this.title??{},i={...lH(this.config.title).nonMark,...t,...e?{encode:{update:e}}:{}};if(i.text)return Cz(["unit","layer"],this.type)?Cz(["middle",void 0],i.anchor)&&(i.frame??(i.frame="group")):i.anchor??(i.anchor="start"),Tz(i)?void 0:i}assembleGroup(e=[]){const t={};(e=e.concat(this.assembleSignals())).length>0&&(t.signals=e);const i=this.assembleLayout();i&&(t.layout=i),t.marks=[].concat(this.assembleHeaderMarks(),this.assembleMarks());const n=!this.parent||kQ(this.parent)?sQ(this):[];n.length>0&&(t.scales=n);const o=this.assembleAxes();o.length>0&&(t.axes=o);const r=this.assembleLegends();return r.length>0&&(t.legends=r),t}getName(e){return Bz((this.name?`${this.name}_`:"")+e)}getDataName(e){return this.getName(OG[e].toLowerCase())}requestDataName(e){const t=this.getDataName(e),i=this.component.data.outputNodeRefCounts;return i[t]=(i[t]||0)+1,t}getSizeSignalRef(e){if(kQ(this.parent)){const t=LV(zZ(e)),i=this.component.scales[t];if(i&&!i.merged){const e=i.get("type"),n=i.get("range");if(eU(e)&&hH(n)){const e=i.get("name"),n=oQ(rQ(this,t));return n?{signal:BZ(e,i,Oj({aggregate:"distinct",field:n},{expr:"datum"}))}:(a$(FH(t)),null)}}}return{signal:this.signalNameMap.get(this.getName(e))}}lookupDataSource(e){const t=this.component.data.outputNodes[e];return t?t.getSource():e}getSignalName(e){return this.signalNameMap.get(e)}renameSignal(e,t){this.signalNameMap.rename(e,t)}renameScale(e,t){this.scaleNameMap.rename(e,t)}renameProjection(e,t){this.projectionNameMap.rename(e,t)}scaleName(e,t){return t?this.getName(e):tV(e)&&WV(e)&&this.component.scales[e]||this.scaleNameMap.has(this.getName(e))?this.scaleNameMap.get(this.getName(e)):void 0}projectionName(e){return e?this.getName("projection"):this.component.projection&&!this.component.projection.merged||this.projectionNameMap.has(this.getName("projection"))?this.projectionNameMap.get(this.getName("projection")):void 0}getScaleComponent(e){if(!this.component.scales)throw new Error("getScaleComponent cannot be called before parseScale(). Make sure you have called parseScale or use parseUnitModelWithScale().");const t=this.component.scales[e];return t&&!t.merged?t:this.parent?this.parent.getScaleComponent(e):void 0}getSelectionComponent(e,t){let i=this.component.selection[e];if(!i&&this.parent&&(i=this.parent.getSelectionComponent(e,t)),!i)throw new Error(`Cannot find a selection named "${t}".`);return i}hasAxisOrientSignalRef(){return this.component.axes.x?.some((e=>e.hasOrientSignalRef()))||this.component.axes.y?.some((e=>e.hasOrientSignalRef()))}}class EQ extends NQ{vgField(e,t={}){const i=this.fieldDef(e);if(i)return Oj(i,t)}reduceFieldDef(e,t){return function(e,t,i,n){return e?Rz(e).reduce(((i,o)=>{const r=e[o];return li(r)?r.reduce(((e,i)=>t.call(n,e,i,o)),i):t.call(n,i,r,o)}),i):i}(this.getMapping(),((t,i,n)=>{const o=Uj(i);return o?e(t,o,n):t}),t)}forEachFieldDef(e,t){mq(this.getMapping(),((t,i)=>{const n=Uj(t);n&&e(n,i)}),t)}}class AQ extends VG{constructor(e,t){super(e),this.transform=t,this.transform=mz(t);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??"value",i[1]??"density"]}clone(){return new AQ(null,mz(this.transform))}dependentFields(){return new Set([this.transform.density,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`DensityTransform ${yz(this.transform)}`}assemble(){const{density:e,...t}=this.transform;return{type:"kde",field:e,...t}}}class MQ extends VG{constructor(e,t){super(e),this.filter=t}clone(){return new MQ(null,{...this.filter})}static make(e,t){const{config:i,mark:n,markDef:o}=t;if("filter"!==xH("invalid",o,i))return null;const r=t.reduceFieldDef(((e,i,o)=>{const r=WV(o)&&t.getScaleComponent(o);return r&&tU(r.get("type"))&&"count"!==i.aggregate&&!MU(n)&&(e[i.field]=i),e}),{});return Rz(r).length?new MQ(e,r):null}dependentFields(){return new Set(Rz(this.filter))}producedFields(){return new Set}hash(){return`FilterInvalid ${yz(this.filter)}`}assemble(){const e=Rz(this.filter).reduce(((e,t)=>{const i=this.filter[t],n=Oj(i,{expr:"datum"});return null!==i&&("temporal"===i.type?e.push(`(isDate(${n}) || (isValid(${n}) && isFinite(+${n})))`):"quantitative"===i.type&&(e.push(`isValid(${n})`),e.push(`isFinite(+${n})`))),e}),[]);return e.length>0?{type:"filter",expr:e.join(" && ")}:null}}class IQ extends VG{constructor(e,t){super(e),this.transform=t,this.transform=mz(t);const{flatten:i,as:n=[]}=this.transform;this.transform.as=i.map(((e,t)=>n[t]??e))}clone(){return new IQ(this.parent,mz(this.transform))}dependentFields(){return new Set(this.transform.flatten)}producedFields(){return new Set(this.transform.as)}hash(){return`FlattenTransform ${yz(this.transform)}`}assemble(){const{flatten:e,as:t}=this.transform;return{type:"flatten",fields:e,as:t}}}class TQ extends VG{constructor(e,t){super(e),this.transform=t,this.transform=mz(t);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??"key",i[1]??"value"]}clone(){return new TQ(null,mz(this.transform))}dependentFields(){return new Set(this.transform.fold)}producedFields(){return new Set(this.transform.as)}hash(){return`FoldTransform ${yz(this.transform)}`}assemble(){const{fold:e,as:t}=this.transform;return{type:"fold",fields:e,as:t}}}class RQ extends VG{constructor(e,t,i,n){super(e),this.fields=t,this.geojson=i,this.signal=n}clone(){return new RQ(null,mz(this.fields),this.geojson,this.signal)}static parseAll(e,t){if(t.component.projection&&!t.component.projection.isFit)return e;let i=0;for(const n of[[pW,fW],[_W,mW]]){const o=n.map((e=>{const i=jj(t.encoding[e]);return Cj(i)?i.field:xj(i)?{expr:`${i.datum}`}:Ej(i)?{expr:`${i.value}`}:void 0}));(o[0]||o[1])&&(e=new RQ(e,o,null,t.getName("geojson_"+i++)))}if(t.channelHasField(wW)){const n=t.typedFieldDef(wW);n.type===W$&&(e=new RQ(e,null,n.field,t.getName("geojson_"+i++)))}return e}dependentFields(){const e=(this.fields??[]).filter(rn);return new Set([...this.geojson?[this.geojson]:[],...e])}producedFields(){return new Set}hash(){return`GeoJSON ${this.geojson} ${this.signal} ${yz(this.fields)}`}assemble(){return[...this.geojson?[{type:"filter",expr:`isValid(datum["${this.geojson}"])`}]:[],{type:"geojson",...this.fields?{fields:this.fields}:{},...this.geojson?{geojson:this.geojson}:{},signal:this.signal}]}}class OQ extends VG{constructor(e,t,i,n){super(e),this.projection=t,this.fields=i,this.as=n}clone(){return new OQ(null,this.projection,mz(this.fields),mz(this.as))}static parseAll(e,t){if(!t.projectionName())return e;for(const i of[[pW,fW],[_W,mW]]){const n=i.map((e=>{const i=jj(t.encoding[e]);return Cj(i)?i.field:xj(i)?{expr:`${i.datum}`}:Ej(i)?{expr:`${i.value}`}:void 0})),o=i[0]===_W?"2":"";(n[0]||n[1])&&(e=new OQ(e,t.projectionName(),n,[t.getName(`x${o}`),t.getName(`y${o}`)]))}return e}dependentFields(){return new Set(this.fields.filter(rn))}producedFields(){return new Set(this.as)}hash(){return`Geopoint ${this.projection} ${yz(this.fields)} ${yz(this.as)}`}assemble(){return{type:"geopoint",projection:this.projection,fields:this.fields,as:this.as}}}class FQ extends VG{constructor(e,t){super(e),this.transform=t}clone(){return new FQ(null,mz(this.transform))}dependentFields(){return new Set([this.transform.impute,this.transform.key,...this.transform.groupby??[]])}producedFields(){return new Set([this.transform.impute])}processSequence(e){const{start:t=0,stop:i,step:n}=e;return{signal:`sequence(${[t,i,...n?[n]:[]].join(",")})`}}static makeFromTransform(e,t){return new FQ(e,t)}static makeFromEncoding(e,t){const i=t.encoding,n=i.x,o=i.y;if(Cj(n)&&Cj(o)){const r=n.impute?n:o.impute?o:void 0;if(void 0===r)return;const s=n.impute?o:o.impute?n:void 0,{method:a,value:l,frame:c,keyvals:u}=r.impute,h=_q(t.mark,i);return new FQ(e,{impute:r.field,key:s.field,...a?{method:a}:{},...void 0!==l?{value:l}:{},...c?{frame:c}:{},...void 0!==u?{keyvals:u}:{},...h.length?{groupby:h}:{}})}return null}hash(){return`Impute ${yz(this.transform)}`}assemble(){const{impute:e,key:t,keyvals:i,method:n,groupby:o,value:r,frame:s=[null,null]}=this.transform,a={type:"impute",field:e,key:t,...i?{keyvals:UK(i)?this.processSequence(i):i}:{},method:"value",...o?{groupby:o}:{},value:n&&"value"!==n?null:r};return n&&"value"!==n?[a,{type:"window",as:[`imputed_${e}_value`],ops:[n],fields:[e],frame:s,ignorePeers:!1,...o?{groupby:o}:{}},{type:"formula",expr:`datum.${e} === null ? datum.imputed_${e}_value : datum.${e}`,as:e}]:[a]}}class PQ extends VG{constructor(e,t){super(e),this.transform=t,this.transform=mz(t);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??t.on,i[1]??t.loess]}clone(){return new PQ(null,mz(this.transform))}dependentFields(){return new Set([this.transform.loess,this.transform.on,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`LoessTransform ${yz(this.transform)}`}assemble(){const{loess:e,on:t,...i}=this.transform;return{type:"loess",x:t,y:e,...i}}}class BQ extends VG{constructor(e,t,i){super(e),this.transform=t,this.secondary=i}clone(){return new BQ(null,mz(this.transform),this.secondary)}static make(e,t,i,n){const o=t.component.data.sources,{from:r}=i;let s=null;if(function(e){return"data"in e}(r)){let e=JQ(r.data,o);e||(e=new CX(r.data),o.push(e));const i=t.getName(`lookup_${n}`);s=new HG(e,i,OG.Lookup,t.component.data.outputNodeRefCounts),t.component.data.outputNodes[i]=s}else if(function(e){return"param"in e}(r)){const e=r.param;let n;i={as:e,...i};try{n=t.getSelectionComponent(Bz(e),e)}catch(t){throw new Error(`Lookups can only be performed on selection parameters. "${e}" is a variable parameter.`)}if(s=n.materialized,!s)throw new Error(`Cannot define and lookup the "${e}" selection in the same view. Try moving the lookup into a second, layered view?`)}return new BQ(e,i,s.getSource())}dependentFields(){return new Set([this.transform.lookup])}producedFields(){return new Set(this.transform.as?Ti(this.transform.as):this.transform.from.fields)}hash(){return`Lookup ${yz({transform:this.transform,secondary:this.secondary})}`}assemble(){let e;if(this.transform.from.fields)e={values:this.transform.from.fields,...this.transform.as?{as:Ti(this.transform.as)}:{}};else{let t=this.transform.as;rn(t)||(a$('If "from.fields" is not specified, "as" has to be a string that specifies the key to be used for the data from the secondary source.'),t="_lookup"),e={as:[t]}}return{type:"lookup",from:this.secondary,key:this.transform.from.key,fields:[this.transform.lookup],...e,...this.transform.default?{default:this.transform.default}:{}}}}class zQ extends VG{constructor(e,t){super(e),this.transform=t,this.transform=mz(t);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??"prob",i[1]??"value"]}clone(){return new zQ(null,mz(this.transform))}dependentFields(){return new Set([this.transform.quantile,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`QuantileTransform ${yz(this.transform)}`}assemble(){const{quantile:e,...t}=this.transform;return{type:"quantile",field:e,...t}}}class WQ extends VG{constructor(e,t){super(e),this.transform=t,this.transform=mz(t);const i=this.transform.as??[void 0,void 0];this.transform.as=[i[0]??t.on,i[1]??t.regression]}clone(){return new WQ(null,mz(this.transform))}dependentFields(){return new Set([this.transform.regression,this.transform.on,...this.transform.groupby??[]])}producedFields(){return new Set(this.transform.as)}hash(){return`RegressionTransform ${yz(this.transform)}`}assemble(){const{regression:e,on:t,...i}=this.transform;return{type:"regression",x:t,y:e,...i}}}class VQ extends VG{constructor(e,t){super(e),this.transform=t}clone(){return new VQ(null,mz(this.transform))}addDimensions(e){this.transform.groupby=Lz((this.transform.groupby??[]).concat(e),(e=>e))}producedFields(){}dependentFields(){return new Set([this.transform.pivot,this.transform.value,...this.transform.groupby??[]])}hash(){return`PivotTransform ${yz(this.transform)}`}assemble(){const{pivot:e,value:t,groupby:i,limit:n,op:o}=this.transform;return{type:"pivot",field:e,value:t,...void 0!==n?{limit:n}:{},...void 0!==o?{op:o}:{},...void 0!==i?{groupby:i}:{}}}}class HQ extends VG{constructor(e,t){super(e),this.transform=t}clone(){return new HQ(null,mz(this.transform))}dependentFields(){return new Set}producedFields(){return new Set}hash(){return`SampleTransform ${yz(this.transform)}`}assemble(){return{type:"sample",size:this.transform.sample}}}function $Q(e){let t=0;return function i(n,o){if(n instanceof CX&&!n.isGenerator&&!NG(n.data)&&(e.push(o),o={name:null,source:o.name,transform:[]}),n instanceof vX&&(n.parent instanceof CX&&!o.source?(o.format={...o.format??{},parse:n.assembleFormatParse()},o.transform.push(...n.assembleTransforms(!0))):o.transform.push(...n.assembleTransforms())),n instanceof pX)return o.name||(o.name="data_"+t++),!o.source||o.transform.length>0?(e.push(o),n.data=o.name):n.data=o.source,void e.push(...n.assemble());switch((n instanceof yX||n instanceof wX||n instanceof MQ||n instanceof nZ||n instanceof vZ||n instanceof OQ||n instanceof fX||n instanceof BQ||n instanceof HX||n instanceof WX||n instanceof TQ||n instanceof IQ||n instanceof AQ||n instanceof PQ||n instanceof zQ||n instanceof WQ||n instanceof bX||n instanceof HQ||n instanceof VQ)&&o.transform.push(n.assemble()),(n instanceof gX||n instanceof $G||n instanceof FQ||n instanceof VX||n instanceof RQ)&&o.transform.push(...n.assemble()),n instanceof HG&&(o.source&&0===o.transform.length?n.setSource(o.source):n.parent instanceof HG?n.setSource(o.name):(o.name||(o.name="data_"+t++),n.setSource(o.name),1===n.numChildren()&&(e.push(o),o={name:null,source:o.name,transform:[]}))),n.numChildren()){case 0:n instanceof HG&&(!o.source||o.transform.length>0)&&e.push(o);break;case 1:i(n.children[0],o);break;default:{o.name||(o.name="data_"+t++);let r=o.name;!o.source||o.transform.length>0?e.push(o):r=o.source;for(const e of n.children)i(e,{name:null,source:r,transform:[]});break}}}}function UQ(e){return"top"===e||"left"===e||uH(e)?"header":"footer"}function jQ(e,t){const{facet:i,config:n,child:o,component:r}=e;if(e.channelHasField(t)){const s=i[t],a=wZ("title",null,n,t);let l=Wj(s,n,{allowDisabling:!0,includeDefault:void 0===a||!!a});o.component.layoutHeaders[t].title&&(l=li(l)?l.join(", "):l,l+=` / ${o.component.layoutHeaders[t].title}`,o.component.layoutHeaders[t].title=null);const c=wZ("labelOrient",s.header,n,t),u=null!==s.header&&Yz(s.header?.labels,n.header.labels,!0),h=Cz(["bottom","right"],c)?"footer":"header";r.layoutHeaders[t]={title:null!==s.header?l:null,facetFieldDef:s,[h]:"facet"===t?[]:[qQ(e,t,u)]}}}function qQ(e,t,i){const n="row"===t?"height":"width";return{labels:i,sizeSignal:e.child.component.layoutSize.get(n)?e.child.getSizeSignalRef(n):void 0,axes:[]}}function KQ(e,t){const{child:i}=e;if(i.component.axes[t]){const{layoutHeaders:n,resolve:o}=e.component;if(o.axis[t]=HZ(o,t),"shared"===o.axis[t]){const o="x"===t?"column":"row",r=n[o];for(const n of i.component.axes[t]){const t=UQ(n.get("orient"));r[t]??(r[t]=[qQ(e,o,!1)]);const i=lZ(n,"main",e.config,{header:!0});i&&r[t][0].axes.push(i),n.mainExtracted=!0}}}}function GQ(e){for(const t of e.children)t.parseLayoutSize()}function YQ(e,t){const i=zZ(t),n=LV(i),o=e.component.resolve,r=e.component.layoutSize;let s;for(const t of e.children){const r=t.component.layoutSize.getWithExplicit(i),a=o.scale[n]??VZ(n,e);if("independent"===a&&"step"===r.value){s=void 0;break}if(s){if("independent"===a&&s.value!==r.value){s=void 0;break}s=DG(s,r,i,"")}else s=r}if(s){for(const n of e.children)e.renameSignal(n.getName(i),e.getName(t)),n.component.layoutSize.set(i,"merged",!1);r.setWithExplicit(t,s)}else r.setWithExplicit(t,{explicit:!1,value:void 0})}function ZQ(e,t){const i="width"===t?"x":"y",n=e.config,o=e.getScaleComponent(i);if(o){const e=o.get("type"),i=o.get("range");if(eU(e)){const e=lK(n.view,t);return hH(i)||nK(e)?"step":e}return sK(n.view,t)}if(e.hasProjection||"arc"===e.mark)return sK(n.view,t);{const e=lK(n.view,t);return nK(e)?e.step:e}}function XQ(e,t,i){return Oj(t,{suffix:`by_${Oj(e)}`,...i??{}})}class QQ extends EQ{constructor(e,t,i,n){super(e,"facet",t,i,n,e.resolve),this.child=CJ(e.spec,this,this.getName("child"),void 0,n),this.children=[this.child],this.facet=this.initFacet(e.facet)}initFacet(e){if(!hj(e))return{facet:this.initFacetFieldDef(e,"facet")};const t=Rz(e),i={};for(const n of t){if(![nW,oW].includes(n)){a$(qH(n,"facet"));break}const t=e[n];if(void 0===t.field){a$(jH(t,n));break}i[n]=this.initFacetFieldDef(t,n)}return i}initFacetFieldDef(e,t){const i=Gj(e,t);return i.header?i.header=aH(i.header):null===i.header&&(i.header=null),i}channelHasField(e){return!!this.facet[e]}fieldDef(e){return this.facet[e]}parseData(){this.component.data=eJ(this),this.child.parseData()}parseLayoutSize(){GQ(this)}parseSelections(){this.child.parseSelections(),this.component.selection=this.child.component.selection}parseMarkGroup(){this.child.parseMarkGroup()}parseAxesAndHeaders(){this.child.parseAxesAndHeaders(),function(e){for(const t of UW)jQ(e,t);KQ(e,"x"),KQ(e,"y")}(this)}assembleSelectionTopLevelSignals(e){return this.child.assembleSelectionTopLevelSignals(e)}assembleSignals(){return this.child.assembleSignals(),[]}assembleSelectionData(e){return this.child.assembleSelectionData(e)}getHeaderLayoutMixins(){const e={};for(const t of UW)for(const i of xZ){const n=this.component.layoutHeaders[t],o=n[i],{facetFieldDef:r}=n;if(r){const i=wZ("titleOrient",r.header,this.config,t);if(["right","bottom"].includes(i)){const n=yZ(t,i);e.titleAnchor??(e.titleAnchor={}),e.titleAnchor[n]="end"}}if(o?.[0]){const o="row"===t?"height":"width",r="header"===i?"headerBand":"footerBand";"facet"===t||this.child.component.layoutSize.get(o)||(e[r]??(e[r]={}),e[r][t]=.5),n.title&&(e.offset??(e.offset={}),e.offset["row"===t?"rowTitle":"columnTitle"]=10)}}return e}assembleDefaultLayout(){const{column:e,row:t}=this.facet,i=e?this.columnDistinctSignal():t?1:void 0;let n="all";return(t||"independent"!==this.component.resolve.scale.x)&&(e||"independent"!==this.component.resolve.scale.y)||(n="none"),{...this.getHeaderLayoutMixins(),...i?{columns:i}:{},bounds:"full",align:n}}assembleLayoutSignals(){return this.child.assembleLayoutSignals()}columnDistinctSignal(){if(!(this.parent&&this.parent instanceof QQ))return{signal:`length(data('${this.getName("column_domain")}'))`}}assembleGroup(e){return this.parent&&this.parent instanceof QQ?{...this.channelHasField("column")?{encode:{update:{columns:{field:Oj(this.facet.column,{prefix:"distinct"})}}}}:{},...super.assembleGroup(e)}:super.assembleGroup(e)}getCardinalityAggregateForChild(){const e=[],t=[],i=[];if(this.child instanceof QQ){if(this.child.channelHasField("column")){const n=Oj(this.child.facet.column);e.push(n),t.push("distinct"),i.push(`distinct_${n}`)}}else for(const n of SV){const o=this.child.component.scales[n];if(o&&!o.merged){const r=o.get("type"),s=o.get("range");if(eU(r)&&hH(s)){const o=oQ(rQ(this.child,n));o?(e.push(o),t.push("distinct"),i.push(`distinct_${o}`)):a$(FH(n))}}}return{fields:e,ops:t,as:i}}assembleFacet(){const{name:e,data:t}=this.component.data.facetRoot,{row:i,column:n}=this.facet,{fields:o,ops:r,as:s}=this.getCardinalityAggregateForChild(),a=[];for(const e of UW){const t=this.facet[e];if(t){a.push(Oj(t));const{bin:l,sort:c}=t;if(tH(l)&&a.push(Oj(t,{binSuffix:"end"})),cj(c)){const{field:e,op:a=rj}=c,l=XQ(t,c);i&&n?(o.push(l),r.push("max"),s.push(l)):(o.push(e),r.push(a),s.push(l))}else if(li(c)){const i=bZ(t,e);o.push(i),r.push("max"),s.push(i)}}}const l=!!i&&!!n;return{name:e,data:t,groupby:a,...l||o.length>0?{aggregate:{...l?{cross:l}:{},...o.length?{fields:o,ops:r,as:s}:{}}}:{}}}facetSortFields(e){const{facet:t}=this,i=t[e];return i?cj(i.sort)?[XQ(i,i.sort,{expr:"datum"})]:li(i.sort)?[bZ(i,e,{expr:"datum"})]:[Oj(i,{expr:"datum"})]:[]}facetSortOrder(e){const{facet:t}=this,i=t[e];if(i){const{sort:e}=i;return[(cj(e)?e.order:!li(e)&&e)||"ascending"]}return[]}assembleLabelTitle(){const{facet:e,config:t}=this;if(e.facet)return AZ(e.facet,"facet",t);const i={row:["top","bottom"],column:["left","right"]};for(const n of SZ)if(e[n]){const o=wZ("labelOrient",e[n]?.header,t,n);if(i[n].includes(o))return AZ(e[n],n,t)}}assembleMarks(){const{child:e}=this,t=function(e){const t=[],i=$Q(t);for(const t of e.children)i(t,{source:e.name,name:null,transform:[]});return t}(this.component.data.facetRoot),i=e.assembleGroupEncodeEntry(!1),n=this.assembleLabelTitle()||e.assembleTitle(),o=e.assembleGroupStyle();return[{name:this.getName("cell"),type:"group",...n?{title:n}:{},...o?{style:o}:{},from:{facet:this.assembleFacet()},sort:{field:UW.map((e=>this.facetSortFields(e))).flat(),order:UW.map((e=>this.facetSortOrder(e))).flat()},...t.length>0?{data:t}:{},...i?{encode:{update:i}}:{},...e.assembleGroup(BG(this,[]))}]}getMapping(){return this.facet}}function JQ(e,t){for(const i of t){const t=i.data;if(e.name&&i.hasName()&&e.name!==i.dataName)continue;const n=e.format?.mesh,o=t.format?.feature;if(n&&o)continue;const r=e.format?.feature;if((r||o)&&r!==o)continue;const s=t.format?.mesh;if(!n&&!s||n===s)if(EG(e)&&EG(t)){if(pz(e.values,t.values))return i}else if(NG(e)&&NG(t)){if(e.url===t.url)return i}else if(AG(e)&&e.name===i.dataName)return i}return null}function eJ(e){let t=function(e,t){if(e.data||!e.parent){if(null===e.data){const e=new CX({values:[]});return t.push(e),e}const i=JQ(e.data,t);if(i)return MG(e.data)||(i.data.format=kz({},e.data.format,i.data.format)),!i.hasName()&&e.data.name&&(i.dataName=e.data.name),i;{const i=new CX(e.data);return t.push(i),i}}return e.parent.component.data.facetRoot?e.parent.component.data.facetRoot:e.parent.component.data.main}(e,e.component.data.sources);const{outputNodes:i,outputNodeRefCounts:n}=e.component.data,o=e.parent?e.parent.component.data.ancestorParse.clone():new LG,r=e.data;MG(r)?(IG(r)?t=new wX(t,r.sequence):RG(r)&&(t=new yX(t,r.graticule)),o.parseNothing=!0):null===r?.format?.parse&&(o.parseNothing=!0),t=vX.makeExplicit(t,e,o)??t,t=new bX(t);const s=e.parent&&LQ(e.parent);(xQ(e)||kQ(e))&&s&&(t=gX.makeFromEncoding(t,e)??t),e.transforms.length>0&&(t=function(e,t,i){let n=0;for(const o of t.transforms){let r,s;if(tG(o))s=e=new vZ(e,o),r="derived";else if($K(o)){const n=_X(o);s=e=vX.makeWithAncestors(e,{},n,i)??e,e=new nZ(e,t,o.filter)}else if(iG(o))s=e=gX.makeFromTransform(e,o,t),r="number";else if(oG(o))r="date",void 0===i.getWithExplicit(o.field).value&&(e=new vX(e,{[o.field]:r}),i.set(o.field,r,!1)),s=e=$G.makeFromTransform(e,o);else if(rG(o))s=e=fX.makeFromTransform(e,o),r="number",QY(t)&&(e=new bX(e));else if(jK(o))s=e=BQ.make(e,t,o,n++),r="derived";else if(QK(o))s=e=new HX(e,o),r="number";else if(JK(o))s=e=new WX(e,o),r="number";else if(sG(o))s=e=VX.makeFromTransform(e,o),r="derived";else if(aG(o))s=e=new TQ(e,o),r="derived";else if(eG(o))s=e=new IQ(e,o),r="derived";else if(qK(o))s=e=new VQ(e,o),r="derived";else if(XK(o))e=new HQ(e,o);else if(nG(o))s=e=FQ.makeFromTransform(e,o),r="derived";else if(KK(o))s=e=new AQ(e,o),r="derived";else if(GK(o))s=e=new zQ(e,o),r="derived";else if(YK(o))s=e=new WQ(e,o),r="derived";else{if(!ZK(o)){a$(`Ignoring an invalid transform: ${bz(o)}.`);continue}s=e=new PQ(e,o),r="derived"}if(s&&void 0!==r)for(const e of s.producedFields()??[])i.set(e,r,!1)}return e}(t,e,o));const a=function(e){const t={};if(xQ(e)&&e.component.selection)for(const i of Rz(e.component.selection)){const n=e.component.selection[i];for(const e of n.project.items)!e.channel&&Gz(e.field)>1&&(t[e.field]="flatten")}return t}(e),l=function(e){const t={};function i(e){var i;Xj(e)?t[e.field]="date":"quantitative"===e.type&&rn(i=e.aggregate)&&Cz(["min","max"],i)?t[e.field]="number":Gz(e.field)>1?e.field in t||(t[e.field]="flatten"):Aj(e)&&cj(e.sort)&&Gz(e.sort.field)>1&&(e.sort.field in t||(t[e.sort.field]="flatten"))}if((xQ(e)||kQ(e))&&e.forEachFieldDef(((t,n)=>{if(Nj(t))i(t);else{const o=oV(n),r=e.fieldDef(o);i({...t,type:r.type})}})),xQ(e)){const{mark:i,markDef:n,encoding:o}=e;if(MU(i)&&!e.encoding.order){const e=o["horizontal"===n.orient?"y":"x"];Cj(e)&&"quantitative"===e.type&&!(e.field in t)&&(t[e.field]="number")}}return t}(e);t=vX.makeWithAncestors(t,{},{...a,...l},o)??t,xQ(e)&&(t=RQ.parseAll(t,e),t=OQ.parseAll(t,e)),(xQ(e)||kQ(e))&&(s||(t=gX.makeFromEncoding(t,e)??t),t=$G.makeFromEncoding(t,e)??t,t=vZ.parseAllForSortIndex(t,e));const c=e.getDataName(OG.Raw),u=new HG(t,c,OG.Raw,n);if(i[c]=u,t=u,xQ(e)){const i=fX.makeFromEncoding(t,e);i&&(t=i,QY(e)&&(t=new bX(t))),t=FQ.makeFromEncoding(t,e)??t,t=VX.makeFromEncoding(t,e)??t}xQ(e)&&(t=MQ.make(t,e)??t);const h=e.getDataName(OG.Main),d=new HG(t,h,OG.Main,n);i[h]=d,t=d,xQ(e)&&function(e,t){for(const[i,n]of Fz(e.component.selection??{})){const o=e.getName(`lookup_${i}`);e.component.data.outputNodes[o]=n.materialized=new HG(new nZ(t,e,{param:i}),o,OG.Lookup,e.component.data.outputNodeRefCounts)}}(e,d);let g=null;if(kQ(e)){const n=e.getName("facet");t=function(e,t){const{row:i,column:n}=t;if(i&&n){let t=null;for(const o of[i,n])if(cj(o.sort)){const{field:i,op:n=rj}=o.sort;e=t=new WX(e,{joinaggregate:[{op:n,field:i,as:XQ(o,o.sort,{forAs:!0})}],groupby:[Oj(o)]})}return t}return null}(t,e.facet)??t,g=new pX(t,e,n,d.getSource()),i[n]=g}return{...e.component.data,outputNodes:i,outputNodeRefCounts:n,raw:u,main:d,facetRoot:g,ancestorParse:o}}class tJ extends NQ{constructor(e,t,i,n){super(e,"concat",t,i,n,e.resolve),"shared"!==e.resolve?.axis?.x&&"shared"!==e.resolve?.axis?.y||a$("Axes cannot be shared in concatenated or repeated views yet (https://github.com/vega/vega-lite/issues/2415)."),this.children=this.getChildren(e).map(((e,t)=>CJ(e,this,this.getName(`concat_${t}`),void 0,n)))}parseData(){this.component.data=eJ(this);for(const e of this.children)e.parseData()}parseSelections(){this.component.selection={};for(const e of this.children){e.parseSelections();for(const t of Rz(e.component.selection))this.component.selection[t]=e.component.selection[t]}}parseMarkGroup(){for(const e of this.children)e.parseMarkGroup()}parseAxesAndHeaders(){for(const e of this.children)e.parseAxesAndHeaders()}getChildren(e){return tK(e)?e.vconcat:iK(e)?e.hconcat:e.concat}parseLayoutSize(){!function(e){GQ(e);const t=1===e.layout.columns?"width":"childWidth",i=void 0===e.layout.columns?"height":"childHeight";YQ(e,t),YQ(e,i)}(this)}parseAxisGroup(){return null}assembleSelectionTopLevelSignals(e){return this.children.reduce(((e,t)=>t.assembleSelectionTopLevelSignals(e)),e)}assembleSignals(){return this.children.forEach((e=>e.assembleSignals())),[]}assembleLayoutSignals(){const e=OZ(this);for(const t of this.children)e.push(...t.assembleLayoutSignals());return e}assembleSelectionData(e){return this.children.reduce(((e,t)=>t.assembleSelectionData(e)),e)}assembleMarks(){return this.children.map((e=>{const t=e.assembleTitle(),i=e.assembleGroupStyle(),n=e.assembleGroupEncodeEntry(!1);return{type:"group",name:e.getName("group"),...t?{title:t}:{},...i?{style:i}:{},...n?{encode:{update:n}}:{},...e.assembleGroup()}}))}assembleDefaultLayout(){const e=this.layout.columns;return{...null!=e?{columns:e}:{},bounds:"full",align:"each"}}}const iJ={disable:1,gridScale:1,scale:1,...rq,labelExpr:1,encode:1},nJ=Rz(iJ);class oJ extends wG{constructor(e={},t={},i=!1){super(),this.explicit=e,this.implicit=t,this.mainExtracted=i}clone(){return new oJ(mz(this.explicit),mz(this.implicit),this.mainExtracted)}hasAxisPart(e){return!("axis"!==e&&("grid"===e||"title"===e?!this.get(e):!1===(t=this.get(e))||null===t));var t}hasOrientSignalRef(){return uH(this.explicit.orient)}}const rJ={bottom:"top",top:"bottom",left:"right",right:"left"};function sJ(e,t){if(!e)return t.map((e=>e.clone()));{if(e.length!==t.length)return;const i=e.length;for(let n=0;n{switch(i){case"title":return MH(e,t);case"gridScale":return{explicit:e.explicit,value:Yz(e.value,t.value)}}return kG(e,t,i,"axis")}));e.setWithExplicit(i,n)}return e}function lJ(e,t,i,n,o){if("disable"===t)return void 0!==i;switch(i=i||{},t){case"titleAngle":case"labelAngle":return e===(uH(i.labelAngle)?i.labelAngle:tW(i.labelAngle));case"values":return!!i.values;case"encode":return!!i.encoding||!!i.labelAngle;case"title":if(e===_Z(n,o))return!0}return e===i[t]}const cJ=new Set(["grid","translate","format","formatType","orient","labelExpr","tickCount","position","tickMinStep"]);function uJ(e,t){let i=t.axis(e);const n=new oJ,o=jj(t.encoding[e]),{mark:r,config:s}=t,a=i?.orient||s["x"===e?"axisX":"axisY"]?.orient||s.axis?.orient||function(e){return"x"===e?"bottom":"left"}(e),l=t.getScaleComponent(e).get("type"),c=function(e,t,i,n){const o="band"===t?["axisDiscrete","axisBand"]:"point"===t?["axisDiscrete","axisPoint"]:t in Z$?["axisQuantitative"]:"time"===t||"utc"===t?["axisTemporal"]:[],r="x"===e?"axisX":"axisY",s=uH(i)?"axisOrient":`axis${Vz(i)}`,a=[...o,...o.map((e=>r+e.substr(4)))],l=["axis",s,r];return{vlOnlyAxisConfig:uZ(a,n,e,i),vgAxisConfig:uZ(l,n,e,i),axisConfigStyle:hZ([...l,...a],n)}}(e,l,a,t.config),u=void 0!==i?!i:dZ("disable",s.style,i?.style,c).configValue;if(n.set("disable",u,void 0!==i),u)return n;i=i||{};const h=function(e,t,i,n,o){const r=t?.labelAngle;if(void 0!==r)return uH(r)?r:tW(r);{const{configValue:r}=dZ("labelAngle",n,t?.style,o);return void 0!==r?tW(r):i!==sW||!Cz([z$,P$],e.type)||Cj(e)&&e.timeUnit?void 0:270}}(o,i,e,s.style,c),d={fieldOrDatumDef:o,axis:i,channel:e,model:t,scaleType:l,orient:a,labelAngle:h,mark:r,config:s};for(const o of nJ){const r=o in gZ?gZ[o](d):aq(o)?i[o]:void 0,a=void 0!==r,l=lJ(r,o,i,t,e);if(a&&l)n.set(o,r,l);else{const{configValue:e,configFrom:t}=aq(o)&&"values"!==o?dZ(o,s.style,i.style,c):{},u=void 0!==e;a&&!u?n.set(o,r,l):("vgAxisConfig"!==t||cJ.has(o)&&u||iq(e)||uH(e))&&n.set(o,e,!1)}}const g=i.encoding??{},f=nq.reduce(((i,o)=>{if(!n.hasAxisPart(o))return i;const r=WZ(g[o]??{},t),s="labels"===o?function(e,t,i){const{encoding:n,config:o}=e,r=jj(n[t])??jj(n[sV(t)]),s=e.axis(t)||{},{format:a,formatType:l}=s;return GU(l)?{text:QU({fieldOrDatumDef:r,field:"datum.value",format:a,formatType:l,config:o}),...i}:i}(t,e,r):r;return void 0===s||Tz(s)||(i[o]={update:s}),i}),{});return Tz(f)||n.set("encode",f,!!i.encoding||void 0!==i.labelAngle),n}function hJ(e,t){const{config:i}=e;return{...LY(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"}),...fY("x",e,{defaultPos:"mid"}),...fY("y",e,{defaultPos:"mid"}),...uY("size",e),...uY("angle",e),...dJ(e,0,t)}}function dJ(e,t,i){return i?{shape:{value:i}}:uY("shape",e)}function gJ(e,t,i){if(void 0===xH("align",e,i))return"center"}function fJ(e,t,i){if(void 0===xH("baseline",e,i))return"middle"}function pJ(e){const{config:t,markDef:i}=e,{orient:n}=i,o="horizontal"===n?"width":"height",r=e.getScaleComponent("horizontal"===n?"x":"y"),s=xH("size",i,t,{vgChannel:o})??t.tick.bandSize;if(void 0!==s)return s;{const e=r?r.get("range"):void 0;return e&&hH(e)&&nn(e.step)?3*e.step/4:3*aK(t.view,o)/4}}const mJ={arc:{vgMark:"arc",encodeEntry:e=>({...LY(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}),...fY("x",e,{defaultPos:"mid"}),...fY("y",e,{defaultPos:"mid"}),...CY(e,"radius","arc"),...CY(e,"theta","arc")})},area:{vgMark:"area",encodeEntry:e=>({...LY(e,{align:"ignore",baseline:"ignore",color:"include",orient:"include",size:"ignore",theta:"ignore"}),...bY("x",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:"horizontal"===e.markDef.orient}),...bY("y",e,{defaultPos:"zeroOrMin",defaultPos2:"zeroOrMin",range:"vertical"===e.markDef.orient}),...AY(e)})},bar:{vgMark:"rect",encodeEntry:e=>({...LY(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...CY(e,"x","bar"),...CY(e,"y","bar")})},circle:{vgMark:"symbol",encodeEntry:e=>hJ(e,"circle")},geoshape:{vgMark:"shape",encodeEntry:e=>({...LY(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"})}),postEncodingTransform:e=>{const{encoding:t}=e,i=t.shape;return[{type:"geoshape",projection:e.projectionName(),...i&&Cj(i)&&i.type===W$?{field:Oj(i,{expr:"datum"})}:{}}]}},image:{vgMark:"image",encodeEntry:e=>({...LY(e,{align:"ignore",baseline:"ignore",color:"ignore",orient:"ignore",size:"ignore",theta:"ignore"}),...CY(e,"x","image"),...CY(e,"y","image"),...iY(e,"url")})},line:{vgMark:"line",encodeEntry:e=>({...LY(e,{align:"ignore",baseline:"ignore",color:"include",size:"ignore",orient:"ignore",theta:"ignore"}),...fY("x",e,{defaultPos:"mid"}),...fY("y",e,{defaultPos:"mid"}),...uY("size",e,{vgChannel:"strokeWidth"}),...AY(e)})},point:{vgMark:"symbol",encodeEntry:e=>hJ(e)},rect:{vgMark:"rect",encodeEntry:e=>({...LY(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...CY(e,"x","rect"),...CY(e,"y","rect")})},rule:{vgMark:"rule",encodeEntry:e=>{const{markDef:t}=e,i=t.orient;return e.encoding.x||e.encoding.y||e.encoding.latitude||e.encoding.longitude?{...LY(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...bY("x",e,{defaultPos:"horizontal"===i?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:"vertical"!==i}),...bY("y",e,{defaultPos:"vertical"===i?"zeroOrMax":"mid",defaultPos2:"zeroOrMin",range:"horizontal"!==i}),...uY("size",e,{vgChannel:"strokeWidth"})}:{}}},square:{vgMark:"symbol",encodeEntry:e=>hJ(e,"square")},text:{vgMark:"text",encodeEntry:e=>{const{config:t,encoding:i}=e;return{...LY(e,{align:"include",baseline:"include",color:"include",size:"ignore",orient:"ignore",theta:"include"}),...fY("x",e,{defaultPos:"mid"}),...fY("y",e,{defaultPos:"mid"}),...iY(e),...uY("size",e,{vgChannel:"fontSize"}),...uY("angle",e),...MY("align",gJ(e.markDef,0,t)),...MY("baseline",fJ(e.markDef,0,t)),...fY("radius",e,{defaultPos:null}),...fY("theta",e,{defaultPos:null})}}},tick:{vgMark:"rect",encodeEntry:e=>{const{config:t,markDef:i}=e,n=i.orient,o="horizontal"===n?"width":"height",r="horizontal"===n?"height":"width";return{...LY(e,{align:"ignore",baseline:"ignore",color:"include",orient:"ignore",size:"ignore",theta:"ignore"}),...fY("x",e,{defaultPos:"mid",vgChannel:"xc"}),...fY("y",e,{defaultPos:"mid",vgChannel:"yc"}),...uY("size",e,{defaultValue:pJ(e),vgChannel:o}),[r]:bH(xH("thickness",i,t))}}},trail:{vgMark:"trail",encodeEntry:e=>({...LY(e,{align:"ignore",baseline:"ignore",color:"include",size:"include",orient:"ignore",theta:"ignore"}),...fY("x",e,{defaultPos:"mid"}),...fY("y",e,{defaultPos:"mid"}),...uY("size",e),...AY(e)})}};const _J="faceted_path_",vJ="stack_group_";function bJ(e,t={fromPrefix:""}){const{mark:i,markDef:n,encoding:o,config:r}=e,s=Yz(n.clip,function(e){const t=e.getScaleComponent("x"),i=e.getScaleComponent("y");return!!(t&&t.get("selectionExtent")||i&&i.get("selectionExtent"))||void 0}(e),function(e){const t=e.component.projection;return!(!t||t.isFit)||void 0}(e)),a=SH(n),l=o.key,c=function(e){const{encoding:t,stack:i,mark:n,markDef:o,config:r}=e,s=t.order;if(!(!li(s)&&Ej(s)&&wz(s.value)||!s&&wz(xH("order",o,r)))){if((li(s)||Cj(s))&&!i)return NH(s,{expr:"datum"});if(MU(n)){const i="horizontal"===o.orient?"y":"x",n=t[i];if(Cj(n)){const t=n.sort;return li(t)?{field:Oj(n,{prefix:i,suffix:"sort_index",expr:"datum"})}:cj(t)?{field:Oj({aggregate:dq(e.encoding)?t.op:void 0,field:t.field},{expr:"datum"})}:lj(t)?{field:Oj(e.fieldDef(t.encoding),{expr:"datum"}),order:t.order}:null===t?void 0:{field:Oj(n,{binSuffix:e.stack&&e.stack.impute?"mid":void 0,expr:"datum"})}}}}}(e),u=function(e){if(!e.component.selection)return null;const t=Rz(e.component.selection).length;let i=t,n=e.parent;for(;n&&0===i;)i=Rz(n.component.selection).length,n=n.parent;return i?{interactive:t>0||!!e.encoding.tooltip}:null}(e),h=xH("aria",n,r),d=mJ[i].postEncodingTransform?mJ[i].postEncodingTransform(e):null;return[{name:e.getName("marks"),type:mJ[i].vgMark,...s?{clip:!0}:{},...a?{style:a}:{},...l?{key:l.field}:{},...c?{sort:c}:{},...u||{},...!1===h?{aria:h}:{},from:{data:t.fromPrefix+e.requestDataName(OG.Main)},encode:{update:mJ[i].encodeEntry(e)},...d?{transform:d}:{}}]}class yJ extends EQ{constructor(e,t,i,n={},o){super(e,"unit",t,i,o,void 0,oK(e)?e.view:void 0),this.specifiedScales={},this.specifiedAxes={},this.specifiedLegends={},this.specifiedProjection={},this.selection=[],this.children=[];const r=RU(e.mark)?{...e.mark}:{type:e.mark},s=r.type;void 0===r.filled&&(r.filled=function(e,t,{graticule:i}){if(i)return!1;const n=kH("filled",e,t),o=e.type;return Yz(n,o!==CU&&o!==wU&&o!==xU)}(r,o,{graticule:e.data&&RG(e.data)}));const a=this.encoding=fq(e.encoding||{},s,r.filled,o);this.markDef=function(e,t,i){const n=aH(e),o=xH("orient",n,i);if(n.orient=function(e,t,i){switch(e){case CU:case NU:case EU:case kU:case SU:case yU:return}const{x:n,y:o,x2:r,y2:s}=t;switch(e){case bU:if(Cj(n)&&(iH(n.bin)||Cj(o)&&o.aggregate&&!n.aggregate))return"vertical";if(Cj(o)&&(iH(o.bin)||Cj(n)&&n.aggregate&&!o.aggregate))return"horizontal";if(s||r){if(i)return i;if(!r&&(Cj(n)&&n.type===F$&&!tH(n.bin)||Dj(n)))return"horizontal";if(!s&&(Cj(o)&&o.type===F$&&!tH(o.bin)||Dj(o)))return"vertical"}case xU:if(r&&(!Cj(n)||!iH(n.bin))&&s&&(!Cj(o)||!iH(o.bin)))return;case vU:if(s)return Cj(o)&&iH(o.bin)?"horizontal":"vertical";if(r)return Cj(n)&&iH(n.bin)?"vertical":"horizontal";if(e===xU){if(n&&!o)return"vertical";if(o&&!n)return"horizontal"}case wU:case DU:{const t=kj(n),r=kj(o);if(i)return i;if(t&&!r)return"tick"!==e?"horizontal":"vertical";if(!t&&r)return"tick"!==e?"vertical":"horizontal";if(t&&r){const t=n,i=o,r=t.type===B$,s=i.type===B$;return r&&!s?"tick"!==e?"vertical":"horizontal":!r&&s?"tick"!==e?"horizontal":"vertical":!t.aggregate&&i.aggregate?"tick"!==e?"vertical":"horizontal":t.aggregate&&!i.aggregate&&"tick"!==e?"horizontal":"vertical"}return}}return"vertical"}(n.type,t,o),void 0!==o&&o!==n.orient&&a$(`Specified orient "${n.orient}" overridden with "${o}".`),"bar"===n.type&&n.orient){const e=xH("cornerRadiusEnd",n,i);if(void 0!==e){const i="horizontal"===n.orient&&t.x2||"vertical"===n.orient&&t.y2?["cornerRadius"]:zU[n.orient];for(const t of i)n[t]=e;void 0!==n.cornerRadiusEnd&&delete n.cornerRadiusEnd}}return void 0===xH("opacity",n,i)&&(n.opacity=function(e,t){if(Cz([CU,DU,NU,EU],e)&&!dq(t))return.7}(n.type,t)),void 0===xH("cursor",n,i)&&(n.cursor=function(e,t,i){return t.href||e.href||xH("href",e,i)?"pointer":e.cursor}(n,t,i)),n}(r,a,o),this.size=function({encoding:e,size:t}){for(const i of SV){const n=aV(i);nK(t[n])&&kj(e[i])&&(delete t[n],a$(e$(n)))}return t}({encoding:a,size:oK(e)?{...n,...e.width?{width:e.width}:{},...e.height?{height:e.height}:{}}:n}),this.stack=LK(s,a),this.specifiedScales=this.initScales(s,a),this.specifiedAxes=this.initAxes(a),this.specifiedLegends=this.initLegends(a),this.specifiedProjection=e.projection,this.selection=(e.params??[]).filter((e=>Qq(e)))}get hasProjection(){const{encoding:e}=this,t=this.mark===AU,i=e&&WW.some((t=>Lj(e[t])));return t||i}scaleDomain(e){const t=this.specifiedScales[e];return t?t.domain:void 0}axis(e){return this.specifiedAxes[e]}legend(e){return this.specifiedLegends[e]}initScales(e,t){return zV.reduce(((e,i)=>{const n=jj(t[i]);return n&&(e[i]=this.initScale(n.scale??{})),e}),{})}initScale(e){const{domain:t,range:i}=e,n=aH(e);return li(t)&&(n.domain=t.map(_H)),li(i)&&(n.range=i.map(_H)),n}initAxes(e){return SV.reduce(((t,i)=>{const n=e[i];if(Lj(n)||i===sW&&Lj(e.x2)||i===aW&&Lj(e.y2)){const e=Lj(n)?n.axis:void 0;t[i]=e?this.initAxis({...e}):e}return t}),{})}initAxis(e){const t=Rz(e),i={};for(const n of t){const t=e[n];i[n]=iq(t)?mH(t):_H(t)}return i}initLegends(e){return PV.reduce(((t,i)=>{const n=jj(e[i]);if(n&&function(e){switch(e){case vW:case bW:case yW:case CW:case wW:case xW:case LW:case NW:return!0;case kW:case DW:case SW:return!1}}(i)){const e=n.legend;t[i]=e?aH(e):e}return t}),{})}parseData(){this.component.data=eJ(this)}parseLayoutSize(){!function(e){const{size:t,component:i}=e;for(const n of SV){const o=aV(n);if(t[o]){const e=t[o];i.layoutSize.set(o,nK(e)?"step":e,!0)}else{const t=ZQ(e,o);i.layoutSize.set(o,t,!1)}}}(this)}parseSelections(){this.component.selection=function(e,t){const i={},n=e.config.selection;if(!t||!t.length)return i;for(const o of t){const t=Bz(o.name),r=o.select,s=rn(r)?r:r.type,a=ci(r)?mz(r):{type:s},{fields:l,encodings:c,...u}=n[s];for(const e in u)"mark"===e&&(a[e]={...u[e],...a[e]}),void 0!==a[e]&&!0!==a[e]||(a[e]=u[e]??a[e]);const h=i[t]={...a,name:t,type:s,init:o.value,bind:o.bind,events:rn(a.on)?BR(a.on,"scope"):Ti(mz(a.on))};for(const t of ZY)t.defined(h)&&t.parse&&t.parse(e,h,o)}return i}(this,this.selection)}parseMarkGroup(){this.component.mark=function(e){if(Cz([wU,vU,LU],e.mark)){const t=_q(e.mark,e.encoding);if(t.length>0)return function(e,t){return[{name:e.getName("pathgroup"),type:"group",from:{facet:{name:_J+e.requestDataName(OG.Main),data:e.requestDataName(OG.Main),groupby:t}},encode:{update:{width:{field:{group:"width"}},height:{field:{group:"height"}}}},marks:bJ(e,{fromPrefix:_J})}]}(e,t)}else if(e.mark===bU){const t=pH.some((t=>xH(t,e.markDef,e.config)));if(e.stack&&!e.fieldDef("size")&&t)return function(e){const[t]=bJ(e,{fromPrefix:vJ}),i=e.scaleName(e.stack.fieldChannel),n=(t={})=>e.vgField(e.stack.fieldChannel,t),o=(e,t)=>`${e}(${[n({prefix:"min",suffix:"start",expr:t}),n({prefix:"max",suffix:"start",expr:t}),n({prefix:"min",suffix:"end",expr:t}),n({prefix:"max",suffix:"end",expr:t})].map((e=>`scale('${i}',${e})`)).join(",")})`;let r,s;"x"===e.stack.fieldChannel?(r={..._z(t.encode.update,["y","yc","y2","height",...pH]),x:{signal:o("min","datum")},x2:{signal:o("max","datum")},clip:{value:!0}},s={x:{field:{group:"x"},mult:-1},height:{field:{group:"height"}}},t.encode.update={...vz(t.encode.update,["y","yc","y2"]),height:{field:{group:"height"}}}):(r={..._z(t.encode.update,["x","xc","x2","width"]),y:{signal:o("min","datum")},y2:{signal:o("max","datum")},clip:{value:!0}},s={y:{field:{group:"y"},mult:-1},width:{field:{group:"width"}}},t.encode.update={...vz(t.encode.update,["x","xc","x2"]),width:{field:{group:"width"}}});for(const i of pH){const n=kH(i,e.markDef,e.config);t.encode.update[i]?(r[i]=t.encode.update[i],delete t.encode.update[i]):n&&(r[i]=bH(n)),n&&(t.encode.update[i]={value:0})}const a=[];if(e.stack.groupbyChannel){const t=e.fieldDef(e.stack.groupbyChannel),i=Oj(t);i&&a.push(i),(t?.bin||t?.timeUnit)&&a.push(Oj(t,{binSuffix:"end"}))}return r=["stroke","strokeWidth","strokeJoin","strokeCap","strokeDash","strokeDashOffset","strokeMiterLimit","strokeOpacity"].reduce(((i,n)=>{if(t.encode.update[n])return{...i,[n]:t.encode.update[n]};{const t=kH(n,e.markDef,e.config);return void 0!==t?{...i,[n]:bH(t)}:i}}),r),r.stroke&&(r.strokeForeground={value:!0},r.strokeOffset={value:0}),[{type:"group",from:{facet:{data:e.requestDataName(OG.Main),name:vJ+e.requestDataName(OG.Main),groupby:a,aggregate:{fields:[n({suffix:"start"}),n({suffix:"start"}),n({suffix:"end"}),n({suffix:"end"})],ops:["min","max","min","max"]}}},encode:{update:r},marks:[{type:"group",encode:{update:s},marks:[t]}]}]}(e)}return bJ(e)}(this)}parseAxesAndHeaders(){var e;this.component.axes=(e=this,SV.reduce(((t,i)=>(e.component.scales[i]&&(t[i]=[uJ(i,e)]),t)),{}))}assembleSelectionTopLevelSignals(e){return function(e,t){let i=!1;for(const n of Oz(e.component.selection??{})){const o=n.name,r=gn(o+qY);if(0===t.filter((e=>e.name===o)).length){const e="global"===n.resolve?"union":n.resolve,i="point"===n.type?", true, true)":")";t.push({name:n.name,update:`${YY}(${r}, ${gn(e)}${i}`})}i=!0;for(const i of ZY)i.defined(n)&&i.topLevelSignals&&(t=i.topLevelSignals(e,n,t))}return i&&0===t.filter((e=>"unit"===e.name)).length&&t.unshift({name:"unit",value:{},on:[{events:"mousemove",update:"isTuple(group()) ? group() : unit"}]}),WG(t)}(this,e)}assembleSignals(){return[...cZ(this),...PG(this,[])]}assembleSelectionData(e){return function(e,t){const i=[...t];for(const t of Oz(e.component.selection??{})){const n={name:t.name+qY};if(t.init){const i=t.project.items.map((e=>{const{signals:t,...i}=e;return i}));n.values=t.init.map((t=>({unit:XY(e,{escape:!1}),fields:i,values:FG(t,!1)})))}i.filter((e=>e.name===t.name+qY)).length||i.push(n)}return i}(this,e)}assembleLayout(){return null}assembleLayoutSignals(){return OZ(this)}assembleMarks(){let e=this.component.mark??[];return this.parent&&LQ(this.parent)||(e=zG(this,e)),e.map(this.correctDataNames)}getMapping(){return this.encoding}get mark(){return this.markDef.type}channelHasField(e){return hq(this.encoding,e)}fieldDef(e){return Uj(this.encoding[e])}typedFieldDef(e){const t=this.fieldDef(e);return Nj(t)?t:null}}class wJ extends NQ{constructor(e,t,i,n,o){super(e,"layer",t,i,o,e.resolve,e.view);const r={...n,...e.width?{width:e.width}:{},...e.height?{height:e.height}:{}};this.children=e.layer.map(((e,t)=>{if(wK(e))return new wJ(e,this,this.getName(`layer_${t}`),r,o);if(cq(e))return new yJ(e,this,this.getName(`layer_${t}`),r,o);throw new Error(IH(e))}))}parseData(){this.component.data=eJ(this);for(const e of this.children)e.parseData()}parseLayoutSize(){GQ(this),YQ(this,"width"),YQ(this,"height")}parseSelections(){this.component.selection={};for(const e of this.children){e.parseSelections();for(const t of Rz(e.component.selection))this.component.selection[t]=e.component.selection[t]}}parseMarkGroup(){for(const e of this.children)e.parseMarkGroup()}parseAxesAndHeaders(){!function(e){const{axes:t,resolve:i}=e.component,n={top:0,bottom:0,right:0,left:0};for(const n of e.children){n.parseAxesAndHeaders();for(const o of Rz(n.component.axes))i.axis[o]=HZ(e.component.resolve,o),"shared"===i.axis[o]&&(t[o]=sJ(t[o],n.component.axes[o]),t[o]||(i.axis[o]="independent",delete t[o]))}for(const o of SV){for(const r of e.children)if(r.component.axes[o]){if("independent"===i.axis[o]){t[o]=(t[o]??[]).concat(r.component.axes[o]);for(const e of r.component.axes[o]){const{value:t,explicit:i}=e.getWithExplicit("orient");if(!uH(t)){if(n[t]>0&&!i){const i=rJ[t];n[t]>n[i]&&e.set("orient",i,!1)}n[t]++}}}delete r.component.axes[o]}if("independent"===i.axis[o]&&t[o]&&t[o].length>1)for(const e of t[o])e.get("grid")&&!e.explicit.grid&&(e.implicit.grid=!1)}}(this)}assembleSelectionTopLevelSignals(e){return this.children.reduce(((e,t)=>t.assembleSelectionTopLevelSignals(e)),e)}assembleSignals(){return this.children.reduce(((e,t)=>e.concat(t.assembleSignals())),cZ(this))}assembleLayoutSignals(){return this.children.reduce(((e,t)=>e.concat(t.assembleLayoutSignals())),OZ(this))}assembleSelectionData(e){return this.children.reduce(((e,t)=>t.assembleSelectionData(e)),e)}assembleTitle(){let e=super.assembleTitle();if(e)return e;for(const t of this.children)if(e=t.assembleTitle(),e)return e}assembleLayout(){return null}assembleMarks(){return function(e,t){for(const i of e.children)xQ(i)&&(t=zG(i,t));return t}(this,this.children.flatMap((e=>e.assembleMarks())))}assembleLegends(){return this.children.reduce(((e,t)=>e.concat(t.assembleLegends())),oX(this))}}function CJ(e,t,i,n,o){if(gj(e))return new QQ(e,t,i,o);if(wK(e))return new wJ(e,t,i,n,o);if(cq(e))return new yJ(e,t,i,n,o);if(function(e){return tK(e)||iK(e)||eK(e)}(e))return new tJ(e,t,i,o);throw new Error(IH(e))}function SJ(e,t={}){var i;t.logger&&(i=t.logger,s$=i),t.fieldTitle&&zj(t.fieldTitle);try{const i=mK(hi(t.config,e.config)),n=fG(e,i),o=CJ(n,null,"",void 0,i);return o.parse(),function(e,t){qX(e.sources);let i=0,n=0;for(let n=0;n<5&&GX(e,t,!0);n++)i++;e.sources.map($X);for(let i=0;i<5&&GX(e,t,!1);i++)n++;qX(e.sources),5===Math.max(i,n)&&a$("Maximum optimization runs(5) reached.")}(o.component.data,o),{spec:function(e,t,i={},n){const o=e.config?function(e){e=mz(e);for(const t of vK)delete e[t];if(e.axis)for(const t in e.axis)iq(e.axis[t])&&delete e.axis[t];if(e.legend)for(const t of Wq)delete e.legend[t];if(e.mark){for(const t of FU)delete e.mark[t];e.mark.tooltip&&ci(e.mark.tooltip)&&delete e.mark.tooltip}e.params&&(e.signals=(e.signals||[]).concat(Jq(e.params)),delete e.params);for(const t of _K){for(const i of FU)delete e[t][i];const i=bK[t];if(i)for(const n of i)delete e[t][n];yK(e,t)}for(const t of Rz(Bq))delete e[t];!function(e){const{titleMarkConfig:t,subtitleMarkConfig:i,subtitle:n}=lH(e.title);Tz(t)||(e.style["group-title"]={...e.style["group-title"],...t}),Tz(i)||(e.style["group-subtitle"]={...e.style["group-subtitle"],...i}),Tz(n)?delete e.title:e.title=n}(e);for(const t in e)ci(e[t])&&Tz(e[t])&&delete e[t];return Tz(e)?void 0:e}(e.config):void 0,r=[].concat(e.assembleSelectionData([]),function(e,t){const i=[],n=$Q(i);let o=0;for(const t of e.sources){t.hasName()||(t.dataName="source_"+o++);const e=t.assemble();n(t,e)}for(const e of i)0===e.transform.length&&delete e.transform;let r=0;for(const[e,t]of i.entries())0!==(t.transform??[]).length||t.source||i.splice(r++,0,i.splice(e,1)[0]);for(const t of i)for(const i of t.transform??[])"lookup"===i.type&&(i.from=e.outputNodes[i.from].getSource());for(const e of i)e.name in t&&(e.values=t[e.name]);return i}(e.component.data,i)),s=e.assembleProjections(),a=e.assembleTitle(),l=e.assembleGroupStyle(),c=e.assembleGroupEncodeEntry(!0);let u=e.assembleLayoutSignals();u=u.filter((e=>"width"!==e.name&&"height"!==e.name||void 0===e.value||(t[e.name]=+e.value,!1)));const{params:h,...d}=t;return{$schema:"https://vega.github.io/schema/vega/v5.json",...e.description?{description:e.description}:{},...d,...a?{title:a}:{},...l?{style:l}:{},...c?{encode:{update:c}}:{},data:r,...s.length>0?{projections:s}:{},...e.assembleGroup([...u,...e.assembleSelectionTopLevelSignals([]),...Jq(h)]),...o?{config:o}:{},...n?{usermeta:n}:{}}}(o,function(e,t,i,n){const o=n.component.layoutSize.get("width"),r=n.component.layoutSize.get("height");if(void 0===t?(t={type:"pad"},n.hasAxisOrientSignalRef()&&(t.resize=!0)):rn(t)&&(t={type:t}),o&&r&&("fit"===(s=t.type)||"fit-x"===s||"fit-y"===s))if("step"===o&&"step"===r)a$(OH()),t.type="pad";else if("step"===o||"step"===r){const e="step"===o?"width":"height";a$(OH(LV(e)));const i="width"===e?"height":"width";t.type=function(e){return e?`fit-${LV(e)}`:"fit"}(i)}var s;return{...1===Rz(t).length&&t.type?"pad"===t.type?{}:{autosize:t.type}:{autosize:t},...yG(i,!1),...yG(e,!0)}}(e,n.autosize,i,o),e.datasets,e.usermeta),normalized:n}}finally{t.logger&&(s$=r$),t.fieldTitle&&zj(Pj)}}const xJ="5.1.0",kJ=function(e){const[t,i]=/schema\/([\w-]+)\/([\w\.\-]+)\.json$/g.exec(e).slice(1,3);return{library:t,version:i}},DJ="#fff",LJ={background:"#333",title:{color:DJ,subtitleColor:DJ},style:{"guide-label":{fill:DJ},"guide-title":{fill:DJ}},axis:{domainColor:DJ,gridColor:"#888",tickColor:DJ}},NJ="#4572a7",EJ={background:"#fff",arc:{fill:NJ},area:{fill:NJ},line:{stroke:NJ,strokeWidth:2},path:{stroke:NJ},rect:{fill:NJ},shape:{stroke:NJ},symbol:{fill:NJ,strokeWidth:1.5,size:50},axis:{bandPosition:.5,grid:!0,gridColor:"#000000",gridOpacity:1,gridWidth:.5,labelPadding:10,tickSize:5,tickWidth:.5},axisBand:{grid:!1,tickExtra:!0},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:50,symbolType:"square"},range:{category:["#4572a7","#aa4643","#8aa453","#71598e","#4598ae","#d98445","#94aace","#d09393","#b9cc98","#a99cbc"]}},AJ="#30a2da",MJ="#cbcbcb",IJ="#f0f0f0",TJ="#333",RJ={arc:{fill:AJ},area:{fill:AJ},axis:{domainColor:MJ,grid:!0,gridColor:MJ,gridWidth:1,labelColor:"#999",labelFontSize:10,titleColor:"#333",tickColor:MJ,tickSize:10,titleFontSize:14,titlePadding:10,labelPadding:4},axisBand:{grid:!1},background:IJ,group:{fill:IJ},legend:{labelColor:TJ,labelFontSize:11,padding:1,symbolSize:30,symbolType:"square",titleColor:TJ,titleFontSize:14,titlePadding:10},line:{stroke:AJ,strokeWidth:2},path:{stroke:AJ,strokeWidth:.5},rect:{fill:AJ},range:{category:["#30a2da","#fc4f30","#e5ae38","#6d904f","#8b8b8b","#b96db8","#ff9e27","#56cc60","#52d2ca","#52689e","#545454","#9fe4f8"],diverging:["#cc0020","#e77866","#f6e7e1","#d6e8ed","#91bfd9","#1d78b5"],heatmap:["#d6e8ed","#cee0e5","#91bfd9","#549cc6","#1d78b5"]},point:{filled:!0,shape:"circle"},shape:{stroke:AJ},bar:{binSpacing:2,fill:AJ,stroke:null},title:{anchor:"start",fontSize:24,fontWeight:600,offset:20}},OJ="#000",FJ={group:{fill:"#e5e5e5"},arc:{fill:OJ},area:{fill:OJ},line:{stroke:OJ},path:{stroke:OJ},rect:{fill:OJ},shape:{stroke:OJ},symbol:{fill:OJ,size:40},axis:{domain:!1,grid:!0,gridColor:"#FFFFFF",gridOpacity:1,labelColor:"#7F7F7F",labelPadding:4,tickColor:"#7F7F7F",tickSize:5.67,titleFontSize:16,titleFontWeight:"normal"},legend:{labelBaseline:"middle",labelFontSize:11,symbolSize:40},range:{category:["#000000","#7F7F7F","#1A1A1A","#999999","#333333","#B0B0B0","#4D4D4D","#C9C9C9","#666666","#DCDCDC"]}},PJ="Benton Gothic, sans-serif",BJ="#82c6df",zJ="Benton Gothic Bold, sans-serif",WJ="normal",VJ={"category-6":["#ec8431","#829eb1","#c89d29","#3580b1","#adc839","#ab7fb4"],"fire-7":["#fbf2c7","#f9e39c","#f8d36e","#f4bb6a","#e68a4f","#d15a40","#ab4232"],"fireandice-6":["#e68a4f","#f4bb6a","#f9e39c","#dadfe2","#a6b7c6","#849eae"],"ice-7":["#edefee","#dadfe2","#c4ccd2","#a6b7c6","#849eae","#607785","#47525d"]},HJ={background:"#ffffff",title:{anchor:"start",color:"#000000",font:zJ,fontSize:22,fontWeight:"normal"},arc:{fill:BJ},area:{fill:BJ},line:{stroke:BJ,strokeWidth:2},path:{stroke:BJ},rect:{fill:BJ},shape:{stroke:BJ},symbol:{fill:BJ,size:30},axis:{labelFont:PJ,labelFontSize:11.5,labelFontWeight:"normal",titleFont:zJ,titleFontSize:13,titleFontWeight:WJ},axisX:{labelAngle:0,labelPadding:4,tickSize:3},axisY:{labelBaseline:"middle",maxExtent:45,minExtent:45,tickSize:2,titleAlign:"left",titleAngle:0,titleX:-45,titleY:-11},legend:{labelFont:PJ,labelFontSize:11.5,symbolType:"square",titleFont:zJ,titleFontSize:13,titleFontWeight:WJ},range:{category:VJ["category-6"],diverging:VJ["fireandice-6"],heatmap:VJ["fire-7"],ordinal:VJ["fire-7"],ramp:VJ["fire-7"]}},$J="#ab5787",UJ="#979797",jJ={background:"#f9f9f9",arc:{fill:$J},area:{fill:$J},line:{stroke:$J},path:{stroke:$J},rect:{fill:$J},shape:{stroke:$J},symbol:{fill:$J,size:30},axis:{domainColor:UJ,domainWidth:.5,gridWidth:.2,labelColor:UJ,tickColor:UJ,tickWidth:.2,titleColor:UJ},axisBand:{grid:!1},axisX:{grid:!0,tickSize:10},axisY:{domain:!1,grid:!0,tickSize:0},legend:{labelFontSize:11,padding:1,symbolSize:30,symbolType:"square"},range:{category:["#ab5787","#51b2e5","#703c5c","#168dd9","#d190b6","#00609f","#d365ba","#154866","#666666","#c4c4c4"]}},qJ="#3e5c69",KJ={background:"#fff",arc:{fill:qJ},area:{fill:qJ},line:{stroke:qJ},path:{stroke:qJ},rect:{fill:qJ},shape:{stroke:qJ},symbol:{fill:qJ},axis:{domainWidth:.5,grid:!0,labelPadding:2,tickSize:5,tickWidth:.5,titleFontWeight:"normal"},axisBand:{grid:!1},axisX:{gridWidth:.2},axisY:{gridDash:[3],gridWidth:.4},legend:{labelFontSize:11,padding:1,symbolType:"square"},range:{category:["#3e5c69","#6793a6","#182429","#0570b0","#3690c0","#74a9cf","#a6bddb","#e2ddf2"]}},GJ="#1696d2",YJ="#000000",ZJ="Lato",XJ="Lato",QJ={"main-colors":["#1696d2","#d2d2d2","#000000","#fdbf11","#ec008b","#55b748","#5c5859","#db2b27"],"shades-blue":["#CFE8F3","#A2D4EC","#73BFE2","#46ABDB","#1696D2","#12719E","#0A4C6A","#062635"],"shades-gray":["#F5F5F5","#ECECEC","#E3E3E3","#DCDBDB","#D2D2D2","#9D9D9D","#696969","#353535"],"shades-yellow":["#FFF2CF","#FCE39E","#FDD870","#FCCB41","#FDBF11","#E88E2D","#CA5800","#843215"],"shades-magenta":["#F5CBDF","#EB99C2","#E46AA7","#E54096","#EC008B","#AF1F6B","#761548","#351123"],"shades-green":["#DCEDD9","#BCDEB4","#98CF90","#78C26D","#55B748","#408941","#2C5C2D","#1A2E19"],"shades-black":["#D5D5D4","#ADABAC","#848081","#5C5859","#332D2F","#262223","#1A1717","#0E0C0D"],"shades-red":["#F8D5D4","#F1AAA9","#E9807D","#E25552","#DB2B27","#A4201D","#6E1614","#370B0A"],"one-group":["#1696d2","#000000"],"two-groups-cat-1":["#1696d2","#000000"],"two-groups-cat-2":["#1696d2","#fdbf11"],"two-groups-cat-3":["#1696d2","#db2b27"],"two-groups-seq":["#a2d4ec","#1696d2"],"three-groups-cat":["#1696d2","#fdbf11","#000000"],"three-groups-seq":["#a2d4ec","#1696d2","#0a4c6a"],"four-groups-cat-1":["#000000","#d2d2d2","#fdbf11","#1696d2"],"four-groups-cat-2":["#1696d2","#ec0008b","#fdbf11","#5c5859"],"four-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a"],"five-groups-cat-1":["#1696d2","#fdbf11","#d2d2d2","#ec008b","#000000"],"five-groups-cat-2":["#1696d2","#0a4c6a","#d2d2d2","#fdbf11","#332d2f"],"five-groups-seq":["#cfe8f3","#73bf42","#1696d2","#0a4c6a","#000000"],"six-groups-cat-1":["#1696d2","#ec008b","#fdbf11","#000000","#d2d2d2","#55b748"],"six-groups-cat-2":["#1696d2","#d2d2d2","#ec008b","#fdbf11","#332d2f","#0a4c6a"],"six-groups-seq":["#cfe8f3","#a2d4ec","#73bfe2","#46abdb","#1696d2","#12719e"],"diverging-colors":["#ca5800","#fdbf11","#fdd870","#fff2cf","#cfe8f3","#73bfe2","#1696d2","#0a4c6a"]},JJ={background:"#FFFFFF",title:{anchor:"start",fontSize:18,font:ZJ},axisX:{domain:!0,domainColor:YJ,domainWidth:1,grid:!1,labelFontSize:12,labelFont:XJ,labelAngle:0,tickColor:YJ,tickSize:5,titleFontSize:12,titlePadding:10,titleFont:ZJ},axisY:{domain:!1,domainWidth:1,grid:!0,gridColor:"#DEDDDD",gridWidth:1,labelFontSize:12,labelFont:XJ,labelPadding:8,ticks:!1,titleFontSize:12,titlePadding:10,titleFont:ZJ,titleAngle:0,titleY:-10,titleX:18},legend:{labelFontSize:12,labelFont:XJ,symbolSize:100,titleFontSize:12,titlePadding:10,titleFont:ZJ,orient:"right",offset:10},view:{stroke:"transparent"},range:{category:QJ["six-groups-cat-1"],diverging:QJ["diverging-colors"],heatmap:QJ["diverging-colors"],ordinal:QJ["six-groups-seq"],ramp:QJ["shades-blue"]},area:{fill:GJ},rect:{fill:GJ},line:{color:GJ,stroke:GJ,strokeWidth:5},trail:{color:GJ,stroke:GJ,strokeWidth:0,size:1},path:{stroke:GJ,strokeWidth:.5},point:{filled:!0},text:{font:"Lato",color:GJ,fontSize:11,align:"center",fontWeight:400,size:11},style:{bar:{fill:GJ,stroke:null}},arc:{fill:GJ},shape:{stroke:GJ},symbol:{fill:GJ,size:30}},e0="#3366CC",t0="#ccc",i0="Arial, sans-serif",n0={arc:{fill:e0},area:{fill:e0},path:{stroke:e0},rect:{fill:e0},shape:{stroke:e0},symbol:{stroke:e0},circle:{fill:e0},background:"#fff",padding:{top:10,right:10,bottom:10,left:10},style:{"guide-label":{font:i0,fontSize:12},"guide-title":{font:i0,fontSize:12},"group-title":{font:i0,fontSize:12}},title:{font:i0,fontSize:14,fontWeight:"bold",dy:-3,anchor:"start"},axis:{gridColor:t0,tickColor:t0,domain:!1,grid:!0},range:{category:["#4285F4","#DB4437","#F4B400","#0F9D58","#AB47BC","#00ACC1","#FF7043","#9E9D24","#5C6BC0","#F06292","#00796B","#C2185B"],heatmap:["#c6dafc","#5e97f6","#2a56c6"]}},o0="2.10.0";const r0="vg-tooltip-element",s0={offsetX:10,offsetY:10,id:r0,styleId:"vega-tooltip-style",theme:"light",disableDefaultStyle:!1,sanitize:function(e){return String(e).replace(/&/g,"&").replace(/e?"[Object]":t.indexOf(n)>=0?"[Circular]":(t.push(n),n)}}(t))}class l0{constructor(e){this.options=Object.assign(Object.assign({},s0),e);const t=this.options.id;if(this.el=null,this.call=this.tooltipHandler.bind(this),!this.options.disableDefaultStyle&&!document.getElementById(this.options.styleId)){const e=document.createElement("style");e.setAttribute("id",this.options.styleId),e.innerHTML=function(e){if(!/^[A-Za-z]+[-:.\w]*$/.test(e))throw new Error("Invalid HTML ID");return"#vg-tooltip-element {\n visibility: hidden;\n padding: 8px;\n position: fixed;\n z-index: 1000;\n font-family: sans-serif;\n font-size: 11px;\n border-radius: 3px;\n box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);\n /* The default theme is the light theme. */\n background-color: rgba(255, 255, 255, 0.95);\n border: 1px solid #d9d9d9;\n color: black; }\n #vg-tooltip-element.visible {\n visibility: visible; }\n #vg-tooltip-element h2 {\n margin-top: 0;\n margin-bottom: 10px;\n font-size: 13px; }\n #vg-tooltip-element img {\n max-width: 200px;\n max-height: 200px; }\n #vg-tooltip-element table {\n border-spacing: 0; }\n #vg-tooltip-element table tr {\n border: none; }\n #vg-tooltip-element table tr td {\n overflow: hidden;\n text-overflow: ellipsis;\n padding-top: 2px;\n padding-bottom: 2px; }\n #vg-tooltip-element table tr td.key {\n color: #808080;\n max-width: 150px;\n text-align: right;\n padding-right: 4px; }\n #vg-tooltip-element table tr td.value {\n display: block;\n max-width: 300px;\n max-height: 7em;\n text-align: left; }\n #vg-tooltip-element.dark-theme {\n background-color: rgba(32, 32, 32, 0.9);\n border: 1px solid #f5f5f5;\n color: white; }\n #vg-tooltip-element.dark-theme td.key {\n color: #bfbfbf; }\n".toString().replace(r0,e)}(t);const i=document.head;i.childNodes.length>0?i.insertBefore(e,i.childNodes[0]):i.appendChild(e)}}tooltipHandler(e,t,i,n){if(this.el=document.getElementById(this.options.id),this.el||(this.el=document.createElement("div"),this.el.setAttribute("id",this.options.id),this.el.classList.add("vg-tooltip"),document.body.appendChild(this.el)),(null!=document.fullscreenElement?document.fullscreenElement:document.body).appendChild(this.el),null==n||""===n)return void this.el.classList.remove("visible",`${this.options.theme}-theme`);this.el.innerHTML=function(e,t,i){if(li(e))return`[${e.map((e=>t(rn(e)?e:a0(e,i)))).join(", ")}]`;if(ci(e)){let n="";const o=e,{title:r,image:s}=o,a=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o${t(r)}`),s&&(n+=``);const l=Object.keys(a);if(l.length>0){n+="";for(const e of l){let o=a[e];void 0!==o&&(ci(o)&&(o=a0(o,i)),n+=``)}n+="
    ${t(e)}:${t(o)}
    "}return n||"{}"}return t(e)}(n,this.options.sanitize,this.options.maxDepth),this.el.classList.add("visible",`${this.options.theme}-theme`);const{x:o,y:r}=function(e,t,i,n){let o=e.clientX+i;o+t.width>window.innerWidth&&(o=+e.clientX-i-t.width);let r=e.clientY+n;return r+t.height>window.innerHeight&&(r=+e.clientY-n-t.height),{x:o,y:r}}(t,this.el.getBoundingClientRect(),this.options.offsetX,this.options.offsetY);this.el.setAttribute("style",`top: ${r}px; left: ${o}px`)}}function c0(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function u0(e,t,i,n,o,r,s){try{var a=e[r](s),l=a.value}catch(e){return void i(e)}a.done?t(l):Promise.resolve(l).then(n,o)}function h0(e){return function(){var t=this,i=arguments;return new Promise((function(n,o){var r=e.apply(t,i);function s(e){u0(r,n,o,s,a,"next",e)}function a(e){u0(r,n,o,s,a,"throw",e)}s(void 0)}))}}var d0,g0=Object.prototype,f0=g0.hasOwnProperty,p0="function"==typeof Symbol?Symbol:{},m0=p0.iterator||"@@iterator",_0=p0.asyncIterator||"@@asyncIterator",v0=p0.toStringTag||"@@toStringTag";function b0(e,t,i,n){var o=t&&t.prototype instanceof D0?t:D0,r=Object.create(o.prototype),s=new z0(n||[]);return r._invoke=function(e,t,i){var n=w0;return function(o,r){if(n===S0)throw new Error("Generator is already running");if(n===x0){if("throw"===o)throw r;return V0()}for(i.method=o,i.arg=r;;){var s=i.delegate;if(s){var a=F0(s,i);if(a){if(a===k0)continue;return a}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(n===w0)throw n=x0,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n=S0;var l=y0(e,t,i);if("normal"===l.type){if(n=i.done?x0:C0,l.arg===k0)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(n=x0,i.method="throw",i.arg=l.arg)}}}(e,i,s),r}function y0(e,t,i){try{return{type:"normal",arg:e.call(t,i)}}catch(e){return{type:"throw",arg:e}}}var w0="suspendedStart",C0="suspendedYield",S0="executing",x0="completed",k0={};function D0(){}function L0(){}function N0(){}var E0={};E0[m0]=function(){return this};var A0=Object.getPrototypeOf,M0=A0&&A0(A0(W0([])));M0&&M0!==g0&&f0.call(M0,m0)&&(E0=M0);var I0=N0.prototype=D0.prototype=Object.create(E0);function T0(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function R0(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===L0||"GeneratorFunction"===(t.displayName||t.name))}function O0(e,t){function i(n,o,r,s){var a=y0(e[n],e,o);if("throw"!==a.type){var l=a.arg,c=l.value;return c&&"object"==typeof c&&f0.call(c,"__await")?t.resolve(c.__await).then((function(e){i("next",e,r,s)}),(function(e){i("throw",e,r,s)})):t.resolve(c).then((function(e){l.value=e,r(l)}),(function(e){return i("throw",e,r,s)}))}s(a.arg)}var n;this._invoke=function(e,o){function r(){return new t((function(t,n){i(e,o,t,n)}))}return n=n?n.then(r,r):r()}}function F0(e,t){var i=e.iterator[t.method];if(i===d0){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=d0,F0(e,t),"throw"===t.method))return k0;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return k0}var n=y0(i,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,k0;var o=n.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=d0),t.delegate=null,k0):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,k0)}function P0(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function B0(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function z0(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P0,this),this.reset(!0)}function W0(e){if(e){var t=e[m0];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,n=function t(){for(;++i=0;--n){var o=this.tryEntries[n],r=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var s=f0.call(o,"catchLoc"),a=f0.call(o,"finallyLoc");if(s&&a){if(this.prev=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&f0.call(n,"finallyLoc")&&this.prev=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),B0(i),k0}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var n=i.completion;if("throw"===n.type){var o=n.arg;B0(i)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,i){return this.delegate={iterator:W0(e),resultName:t,nextLoc:i},"next"===this.method&&(this.arg=d0),k0}};var H0={wrap:b0,isGeneratorFunction:R0,AsyncIterator:O0,mark:function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,N0):(e.__proto__=N0,v0 in e||(e[v0]="GeneratorFunction")),e.prototype=Object.create(I0),e},awrap:function(e){return{__await:e}},async:function(e,t,i,n,o){void 0===o&&(o=Promise);var r=new O0(b0(e,t,i,n),o);return R0(t)?r:r.next().then((function(e){return e.done?e.value:r.next()}))},keys:function(e){var t=[];for(var i in e)t.push(i);return t.reverse(),function i(){for(;t.length;){var n=t.pop();if(n in e)return i.value=n,i.done=!1,i}return i.done=!0,i}},values:W0};function $0(e,t,i){var n=e.open(t),o=new URL(t).origin,r=40;e.addEventListener("message",(function t(i){i.source===n&&(r=0,e.removeEventListener("message",t,!1))}),!1),setTimeout((function e(){r<=0||(n.postMessage(i,o),setTimeout(e,250),r-=1)}),250)}var U0,j0='.vega-embed {\n position: relative;\n display: inline-block;\n box-sizing: border-box; }\n .vega-embed.has-actions {\n padding-right: 38px; }\n .vega-embed details:not([open]) > :not(summary) {\n display: none !important; }\n .vega-embed summary {\n list-style: none;\n position: absolute;\n top: 0;\n right: 0;\n padding: 6px;\n z-index: 1000;\n background: white;\n box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);\n color: #1b1e23;\n border: 1px solid #aaa;\n border-radius: 999px;\n opacity: 0.2;\n transition: opacity 0.4s ease-in;\n outline: none;\n cursor: pointer;\n line-height: 0px; }\n .vega-embed summary::-webkit-details-marker {\n display: none; }\n .vega-embed summary:active {\n box-shadow: #aaa 0px 0px 0px 1px inset; }\n .vega-embed summary svg {\n width: 14px;\n height: 14px; }\n .vega-embed details[open] summary {\n opacity: 0.7; }\n .vega-embed:hover summary,\n .vega-embed:focus summary {\n opacity: 1 !important;\n transition: opacity 0.2s ease; }\n .vega-embed .vega-actions {\n position: absolute;\n z-index: 1001;\n top: 35px;\n right: -9px;\n display: flex;\n flex-direction: column;\n padding-bottom: 8px;\n padding-top: 8px;\n border-radius: 4px;\n box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);\n border: 1px solid #d9d9d9;\n background: white;\n animation-duration: 0.15s;\n animation-name: scale-in;\n animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5);\n text-align: left; }\n .vega-embed .vega-actions a {\n padding: 8px 16px;\n font-family: sans-serif;\n font-size: 14px;\n font-weight: 600;\n white-space: nowrap;\n color: #434a56;\n text-decoration: none; }\n .vega-embed .vega-actions a:hover {\n background-color: #f7f7f9;\n color: black; }\n .vega-embed .vega-actions::before, .vega-embed .vega-actions::after {\n content: "";\n display: inline-block;\n position: absolute; }\n .vega-embed .vega-actions::before {\n left: auto;\n right: 14px;\n top: -16px;\n border: 8px solid #0000;\n border-bottom-color: #d9d9d9; }\n .vega-embed .vega-actions::after {\n left: auto;\n right: 15px;\n top: -14px;\n border: 7px solid #0000;\n border-bottom-color: #fff; }\n .vega-embed .chart-wrapper.fit-x {\n width: 100%; }\n .vega-embed .chart-wrapper.fit-y {\n height: 100%; }\n\n.vega-embed-wrapper {\n max-width: 100%;\n overflow: auto;\n padding-right: 14px; }\n\n@keyframes scale-in {\n from {\n opacity: 0;\n transform: scale(0.6); }\n to {\n opacity: 1;\n transform: scale(1); } }\n';function q0(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;ne,"vega-lite":(e,t)=>X0.compile(e,{config:t}).spec},o1='\n\n \n \n \n',r1="chart-wrapper";function s1(e){return"function"==typeof e}function a1(e,t,i,n){var o="".concat(t,'
    '),r="
    ".concat(i,""),s=window.open("");s.document.write(o+e+r),s.document.title="".concat(t1[n]," JSON Source")}function l1(e,t){if(e.$schema){var i,n=kJ(e.$schema);t&&t!==n.library&&console.warn("The given visualization spec is written in ".concat(t1[n.library],", but mode argument sets ").concat(null!==(i=t1[t])&&void 0!==i?i:t,"."));var o=n.library;return(0,nz.satisfies)(i1[o],"^".concat(n.version.slice(1)))||console.warn("The input spec uses ".concat(t1[o]," ").concat(n.version,", but the current version of ").concat(t1[o]," is v").concat(i1[o],".")),o}return"mark"in e||"encoding"in e||"layer"in e||"hconcat"in e||"vconcat"in e||"facet"in e||"repeat"in e?"vega-lite":"marks"in e||"signals"in e||"scales"in e||"axes"in e?"vega":null!=t?t:"vega"}function c1(e){return(t=e)&&"load"in t?e:Z0.loader(e);var t}function u1(e){var t;return null!==(t=e.usermeta&&e.usermeta.embedOptions)&&void 0!==t?t:{}}function h1(){return(h1=h0(H0.mark((function e(t,i){var n,o,r,s,a,l,c,u,h,d,g=arguments;return H0.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=g.length>2&&void 0!==g[2]?g[2]:{},!rn(i)){e.next=10;break}return a=c1(r.loader),e.t0=JSON,e.next=6,a.load(i);case 6:e.t1=e.sent,s=e.t0.parse.call(e.t0,e.t1),e.next=11;break;case 10:s=i;case 11:return l=u1(s).loader,a&&!l||(a=c1(null!==(c=r.loader)&&void 0!==c?c:l)),e.next=15,d1(u1(s),a);case 15:return u=e.sent,e.next=18,d1(r,a);case 18:return h=e.sent,d=Y0(Y0({},q0(h,u)),{},{config:hi(null!==(n=h.config)&&void 0!==n?n:{},null!==(o=u.config)&&void 0!==o?o:{})}),e.next=22,p1(t,s,d,a);case 22:return e.abrupt("return",e.sent);case 23:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d1(e,t){return g1.apply(this,arguments)}function g1(){return(g1=h0(H0.mark((function e(t,i){var n,o,r;return H0.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!rn(t.config)){e.next=8;break}return e.t1=JSON,e.next=4,i.load(t.config);case 4:e.t2=e.sent,e.t0=e.t1.parse.call(e.t1,e.t2),e.next=9;break;case 8:e.t0=null!==(n=t.config)&&void 0!==n?n:{};case 9:if(o=e.t0,!rn(t.patch)){e.next=18;break}return e.t4=JSON,e.next=14,i.load(t.patch);case 14:e.t5=e.sent,e.t3=e.t4.parse.call(e.t4,e.t5),e.next=19;break;case 18:e.t3=t.patch;case 19:return r=e.t3,e.abrupt("return",Y0(Y0(Y0({},t),r?{patch:r}:{}),o?{config:o}:{}));case 21:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f1(e){var t,i=e.getRootNode?e.getRootNode():document;return i instanceof ShadowRoot?{root:i,rootContainer:i}:{root:document,rootContainer:null!==(t=document.head)&&void 0!==t?t:document.body}}function p1(e,t){return m1.apply(this,arguments)}function m1(){return(m1=h0(H0.mark((function e(t,i){var n,o,r,s,a,l,c,u,h,d,g,f,p,m,_,v,y,w,C,S,x,k,D,L,N,E,A,M,I,T,R,O,F,P,B,z,W,V,H,$,U,j,q,K,G,Y,Z,X=arguments;return H0.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Z=function(){P&&document.removeEventListener("click",P),M.finalize()},l=X.length>2&&void 0!==X[2]?X[2]:{},c=X.length>3?X[3]:void 0,u=l.theme?hi(b[l.theme],null!==(n=l.config)&&void 0!==n?n:{}):l.config,h=Ji(l.actions)?l.actions:q0({},J0,null!==(o=l.actions)&&void 0!==o?o:{}),d=Y0(Y0({},e1),l.i18n),g=null!==(r=l.renderer)&&void 0!==r?r:"canvas",f=null!==(s=l.logLevel)&&void 0!==s?s:Z0.Warn,p=null!==(a=l.downloadFileName)&&void 0!==a?a:"visualization",m="string"==typeof t?document.querySelector(t):t){e.next=12;break}throw new Error("".concat(t," does not exist"));case 12:return!1!==l.defaultStyle&&(_="vega-embed-style",v=f1(m),y=v.root,w=v.rootContainer,y.getElementById(_)||((C=document.createElement("style")).id=_,C.innerText=void 0===l.defaultStyle||!0===l.defaultStyle?j0.toString():l.defaultStyle,w.appendChild(C))),S=l1(i,l.mode),x=n1[S](i,u),"vega-lite"===S&&x.$schema&&(k=kJ(x.$schema),(0,nz.satisfies)(i1.vega,"^".concat(k.version.slice(1)))||console.warn("The compiled spec uses Vega ".concat(k.version,", but current version is v").concat(i1.vega,"."))),m.classList.add("vega-embed"),h&&m.classList.add("has-actions"),m.innerHTML="",D=m,h&&((L=document.createElement("div")).classList.add(r1),m.appendChild(L),D=L),(N=l.patch)&&(x=N instanceof Function?N(x):HB(x,N,!0,!1).newDocument),l.formatLocale&&Z0.formatLocale(l.formatLocale),l.timeFormatLocale&&Z0.timeFormatLocale(l.timeFormatLocale),E=l.ast,A=Z0.parse(x,"vega-lite"===S?{}:u,{ast:E}),(M=new(l.viewClass||Z0.View)(A,Y0({loader:c,logLevel:f,renderer:g},E?{expr:Z0.expressionInterpreter}:{}))).addSignalListener("autosize",((e,t)=>{var i=t.type;"fit-x"==i?(D.classList.add("fit-x"),D.classList.remove("fit-y")):"fit-y"==i?(D.classList.remove("fit-x"),D.classList.add("fit-y")):"fit"==i?D.classList.add("fit-x","fit-y"):D.classList.remove("fit-x","fit-y")})),!1!==l.tooltip&&(I=s1(l.tooltip)?l.tooltip:new l0(!0===l.tooltip?{}:l.tooltip).call,M.tooltip(I)),void 0===(T=l.hover)&&(T="vega"===S),T&&(O=(R="boolean"==typeof T?{}:T).hoverSet,F=R.updateSet,M.hover(O,F)),l&&(null!=l.width&&M.width(l.width),null!=l.height&&M.height(l.height),null!=l.padding&&M.padding(l.padding)),e.next=36,M.initialize(D,l.bind).runAsync();case 36:if(!1!==h){if(B=m,!1!==l.defaultStyle&&((z=document.createElement("details")).title=d.CLICK_TO_VIEW_ACTIONS,m.append(z),B=z,(W=document.createElement("summary")).innerHTML=o1,z.append(W),P=e=>{z.contains(e.target)||z.removeAttribute("open")},document.addEventListener("click",P)),V=document.createElement("div"),B.append(V),V.classList.add("vega-actions"),!0===h||!1!==h.export)for(H=function(){var e=U[$];if(!0===h||!0===h.export||h.export[e]){var t=d["".concat(e.toUpperCase(),"_ACTION")],i=document.createElement("a");i.text=t,i.href="#",i.target="_blank",i.download="".concat(p,".").concat(e),i.addEventListener("mousedown",function(){var t=h0(H0.mark((function t(i){var n;return H0.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i.preventDefault(),t.next=3,M.toImageURL(e,l.scaleFactor);case 3:n=t.sent,this.href=n;case 5:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()),V.append(i)}},$=0,U=["svg","png"];$e.length)&&(t=e.length);for(var i=0,n=new Array(t);i=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){a=!0,r=e},f:function(){try{s||null==i.return||i.return()}finally{if(a)throw r}}}}(e.attributes);try{for(n.s();!(i=n.n()).done;){var o=i.value;o.name.startsWith("data-js-")&&t.setAttribute(o.name,o.value)}}catch(e){n.e(e)}finally{n.f()}},onNodeAdded:function(e){if(e.nodeType===Node.ELEMENT_NODE&&e.hasAttribute("autofocus")&&(e.focus(),e.setSelectionRange&&e.value)){var t=e.value.length;e.setSelectionRange(t,t)}}};var C1={ContentEditable:N,Cell:it,Session:Et,FocusOnUpdate:At,ScrollOnUpdate:{mounted:function(){this.__scroll()},updated:function(){this.__scroll()},__scroll:function(){this.el.scrollTop=this.el.scrollHeight}},VirtualizedLines:Ot,Menu:Ft,UserForm:zt,VegaLite:{mounted:function(){var e=this;this.props=_1(this),this.state={container:null,viewPromise:null},this.state.container=document.createElement("div"),this.el.appendChild(this.state.container),this.handleEvent("vega_lite:".concat(this.props.id,":init"),(function(t){var i=t.spec;i.data||(i.data={values:[]}),e.state.viewPromise=function(e,t){return h1.apply(this,arguments)}(e.state.container,i,{}).then((function(e){return e.view})).catch((function(t){var i="Failed to render the given Vega-Lite specification, got the following error:\n\n ".concat(t.message,"\n\nMake sure to check for typos.");e.state.container.innerHTML='\n
    '.concat(i,"
    \n ")}))}));var t,i,n=(t=function(e){return e.resize()},1e3,i=!1,function(){i||(t.apply(void 0,arguments),i=!0,setTimeout((function(){i=!1}),1e3))});this.handleEvent("vega_lite:".concat(this.props.id,":push"),(function(t){var i=t.data,o=t.dataset,r=t.window;o=o||"source_0",e.state.viewPromise.then((function(e){var t=v1(e.data(o),i,r);n(e),e.change(o,t).run()}))}))},updated:function(){this.props=_1(this)},destroyed:function(){this.state.viewPromise&&this.state.viewPromise.then((function(e){return e.finalize()}))}},Timer:{mounted:function(){var e=this;this.state={start:Date.now(),interval:null},this.state.interval=setInterval((function(){e.__tick()}),100)},destroyed:function(){clearInterval(this.state.interval)},__tick:function(){var e=(Date.now()-this.state.start)/1e3;this.el.innerHTML="".concat(e.toFixed(1),"s")}},MarkdownRenderer:{mounted:function(){this.props=b1(this);var e=new Ue(this.el,"");this.handleEvent("markdown-renderer:".concat(this.props.id,":content"),(function(t){var i=t.content;e.setContent(i)}))},updated:function(){this.props=b1(this)}}},S1=document.querySelector("meta[name='csrf-token']").getAttribute("content"),x1=new S.LiveSocket("/live",y.Socket,{params:function(e){return{_csrf_token:S1,user_data:Bt()}},hooks:C1,dom:w1});C().config({barColors:{0:"#b2c1ff"},shadowColor:"rgba(0, 0, 0, .3)"}),window.addEventListener("phx:page-loading-start",(function(){return C().show()})),window.addEventListener("phx:page-loading-stop",(function(){return C().hide()})),x1.connect(),window.liveSocket=x1},4902:function(e){e.exports=function(e){var t={};function i(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(n,o,function(t){return e[t]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=0)}([function(e,t,i){(function(t){e.exports=t.Phoenix=i(2)}).call(this,i(1))},function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t,i){"use strict";function n(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var i=[],n=!0,o=!1,r=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(i.push(s.value),!t||i.length!==t);n=!0);}catch(e){o=!0,r=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw r}}return i}}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"==typeof e)return a(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(i):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i0&&void 0!==arguments[0]?arguments[0]:this.timeout;if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=e,this.joinedOnce=!0,this.rejoin(),this.joinPush}},{key:"onClose",value:function(e){this.on(b,e)}},{key:"onError",value:function(e){return this.on(y,(function(t){return e(t)}))}},{key:"on",value:function(e,t){var i=this.bindingRef++;return this.bindings.push({event:e,ref:i,callback:t}),i}},{key:"off",value:function(e,t){this.bindings=this.bindings.filter((function(i){return!(i.event===e&&(void 0===t||t===i.ref))}))}},{key:"canPush",value:function(){return this.socket.isConnected()&&this.isJoined()}},{key:"push",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.timeout;if(t=t||{},!this.joinedOnce)throw new Error("tried to push '".concat(e,"' to '").concat(this.topic,"' before joining. Use channel.join() before pushing events"));var n=new L(this,e,(function(){return t}),i);return this.canPush()?n.send():(n.startTimeout(),this.pushBuffer.push(n)),n}},{key:"leave",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=v;var i=function(){e.socket.hasLogger()&&e.socket.log("channel","leave ".concat(e.topic)),e.trigger(b,"leave")},n=new L(this,S,D({}),t);return n.receive("ok",(function(){return i()})).receive("timeout",(function(){return i()})),n.send(),this.canPush()||n.trigger("ok",{}),n}},{key:"onMessage",value:function(e,t,i){return t}},{key:"isLifecycleEvent",value:function(e){return x.indexOf(e)>=0}},{key:"isMember",value:function(e,t,i,n){return!(this.topic!==e||n&&n!==this.joinRef()&&this.isLifecycleEvent(t)&&(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:e,event:t,payload:i,joinRef:n}),1))}},{key:"joinRef",value:function(){return this.joinPush.ref}},{key:"rejoin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.timeout;this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=_,this.joinPush.resend(e))}},{key:"trigger",value:function(e,t,i,n){var o=this.onMessage(e,t,i,n);if(t&&!o)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");for(var r=this.bindings.filter((function(t){return t.event===e})),s=0;s1&&void 0!==arguments[1]?arguments[1]:{};l(this,e),this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.timeout=n.timeout||1e4,this.transport=n.transport||g.WebSocket||M,this.defaultEncoder=E.encode.bind(E),this.defaultDecoder=E.decode.bind(E),this.closeWasClean=!1,this.unloaded=!1,this.binaryType=n.binaryType||"arraybuffer",this.transport!==M?(this.encode=n.encode||this.defaultEncoder,this.decode=n.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder),d&&d.addEventListener&&d.addEventListener("beforeunload",(function(e){i.conn&&(i.unloaded=!0,i.abnormalClose("unloaded"))})),this.heartbeatIntervalMs=n.heartbeatIntervalMs||3e4,this.rejoinAfterMs=function(e){return n.rejoinAfterMs?n.rejoinAfterMs(e):[1e3,2e3,5e3][e-1]||1e4},this.reconnectAfterMs=function(e){return i.unloaded?100:n.reconnectAfterMs?n.reconnectAfterMs(e):[10,50,100,150,200,250,500,1e3,2e3][e-1]||5e3},this.logger=n.logger||null,this.longpollerTimeout=n.longpollerTimeout||2e4,this.params=D(n.params||{}),this.endPoint="".concat(t,"/").concat(k),this.vsn=n.vsn||"2.0.0",this.heartbeatTimer=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new R((function(){i.teardown((function(){return i.connect()}))}),this.reconnectAfterMs)}return u(e,[{key:"protocol",value:function(){return location.protocol.match(/^https/)?"wss":"ws"}},{key:"endPointURL",value:function(){var e=I.appendParams(I.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return"/"!==e.charAt(0)?e:"/"===e.charAt(1)?"".concat(this.protocol(),":").concat(e):"".concat(this.protocol(),"://").concat(location.host).concat(e)}},{key:"disconnect",value:function(e,t,i){this.closeWasClean=!0,this.reconnectTimer.reset(),this.teardown(e,t,i)}},{key:"connect",value:function(e){var t=this;e&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=D(e)),this.conn||(this.closeWasClean=!1,this.conn=new this.transport(this.endPointURL()),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=function(){return t.onConnOpen()},this.conn.onerror=function(e){return t.onConnError(e)},this.conn.onmessage=function(e){return t.onConnMessage(e)},this.conn.onclose=function(e){return t.onConnClose(e)})}},{key:"log",value:function(e,t,i){this.logger(e,t,i)}},{key:"hasLogger",value:function(){return null!==this.logger}},{key:"onOpen",value:function(e){var t=this.makeRef();return this.stateChangeCallbacks.open.push([t,e]),t}},{key:"onClose",value:function(e){var t=this.makeRef();return this.stateChangeCallbacks.close.push([t,e]),t}},{key:"onError",value:function(e){var t=this.makeRef();return this.stateChangeCallbacks.error.push([t,e]),t}},{key:"onMessage",value:function(e){var t=this.makeRef();return this.stateChangeCallbacks.message.push([t,e]),t}},{key:"onConnOpen",value:function(){this.hasLogger()&&this.log("transport","connected to ".concat(this.endPointURL())),this.unloaded=!1,this.closeWasClean=!1,this.flushSendBuffer(),this.reconnectTimer.reset(),this.resetHeartbeat(),this.stateChangeCallbacks.open.forEach((function(e){return(0,r(e,2)[1])()}))}},{key:"resetHeartbeat",value:function(){var e=this;this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,clearInterval(this.heartbeatTimer),this.heartbeatTimer=setInterval((function(){return e.sendHeartbeat()}),this.heartbeatIntervalMs))}},{key:"teardown",value:function(e,t,i){var n=this;if(!this.conn)return e&&e();this.waitForBufferDone((function(){n.conn&&(t?n.conn.close(t,i||""):n.conn.close()),n.waitForSocketClosed((function(){n.conn&&(n.conn.onclose=function(){},n.conn=null),e&&e()}))}))}},{key:"waitForBufferDone",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;5!==i&&this.conn&&this.conn.bufferedAmount?setTimeout((function(){t.waitForBufferDone(e,i+1)}),150*i):e()}},{key:"waitForSocketClosed",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;5!==i&&this.conn&&3!==this.conn.readyState?setTimeout((function(){t.waitForSocketClosed(e,i+1)}),150*i):e()}},{key:"onConnClose",value:function(e){this.hasLogger()&&this.log("transport","close",e),this.triggerChanError(),clearInterval(this.heartbeatTimer),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.stateChangeCallbacks.close.forEach((function(t){return(0,r(t,2)[1])(e)}))}},{key:"onConnError",value:function(e){this.hasLogger()&&this.log("transport",e),this.triggerChanError(),this.stateChangeCallbacks.error.forEach((function(t){return(0,r(t,2)[1])(e)}))}},{key:"triggerChanError",value:function(){this.channels.forEach((function(e){e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(y)}))}},{key:"connectionState",value:function(){switch(this.conn&&this.conn.readyState){case 0:return"connecting";case 1:return"open";case 2:return"closing";default:return"closed"}}},{key:"isConnected",value:function(){return"open"===this.connectionState()}},{key:"remove",value:function(e){this.off(e.stateChangeRefs),this.channels=this.channels.filter((function(t){return t.joinRef()!==e.joinRef()}))}},{key:"off",value:function(e){for(var t in this.stateChangeCallbacks)this.stateChangeCallbacks[t]=this.stateChangeCallbacks[t].filter((function(t){var i=r(t,1)[0];return-1===e.indexOf(i)}))}},{key:"channel",value:function(e){var t=new N(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},this);return this.channels.push(t),t}},{key:"push",value:function(e){var t=this;if(this.hasLogger()){var i=e.topic,n=e.event,o=e.payload,r=e.ref,s=e.join_ref;this.log("push","".concat(i," ").concat(n," (").concat(s,", ").concat(r,")"),o)}this.isConnected()?this.encode(e,(function(e){return t.conn.send(e)})):this.sendBuffer.push((function(){return t.encode(e,(function(e){return t.conn.send(e)}))}))}},{key:"makeRef",value:function(){var e=this.ref+1;return e===this.ref?this.ref=0:this.ref=e,this.ref.toString()}},{key:"sendHeartbeat",value:function(){if(this.isConnected()){if(this.pendingHeartbeatRef)return this.pendingHeartbeatRef=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection"),void this.abnormalClose("heartbeat timeout");this.pendingHeartbeatRef=this.makeRef(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef})}}},{key:"abnormalClose",value:function(e){this.closeWasClean=!1,1===this.conn.readyState&&this.conn.close(1e3,e)}},{key:"flushSendBuffer",value:function(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach((function(e){return e()})),this.sendBuffer=[])}},{key:"onConnMessage",value:function(e){var t=this;this.decode(e.data,(function(e){var i=e.topic,n=e.event,o=e.payload,s=e.ref,a=e.join_ref;s&&s===t.pendingHeartbeatRef&&(t.pendingHeartbeatRef=null),t.hasLogger()&&t.log("receive","".concat(o.status||""," ").concat(i," ").concat(n," ").concat(s&&"("+s+")"||""),o);for(var l=0;l1&&void 0!==arguments[1]?arguments[1]:{};l(this,e);var o=n.events||{state:"presence_state",diff:"presence_diff"};this.state={},this.pendingDiffs=[],this.channel=t,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(o.state,(function(t){var n=i.caller,o=n.onJoin,r=n.onLeave,s=n.onSync;i.joinRef=i.channel.joinRef(),i.state=e.syncState(i.state,t,o,r),i.pendingDiffs.forEach((function(t){i.state=e.syncDiff(i.state,t,o,r)})),i.pendingDiffs=[],s()})),this.channel.on(o.diff,(function(t){var n=i.caller,o=n.onJoin,r=n.onLeave,s=n.onSync;i.inPendingSyncState()?i.pendingDiffs.push(t):(i.state=e.syncDiff(i.state,t,o,r),s())}))}return u(e,[{key:"onJoin",value:function(e){this.caller.onJoin=e}},{key:"onLeave",value:function(e){this.caller.onLeave=e}},{key:"onSync",value:function(e){this.caller.onSync=e}},{key:"list",value:function(t){return e.list(this.state,t)}},{key:"inPendingSyncState",value:function(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}}],[{key:"syncState",value:function(e,t,i,n){var o=this,r=this.clone(e),s={},a={};return this.map(r,(function(e,i){t[e]||(a[e]=i)})),this.map(t,(function(e,t){var i=r[e];if(i){var n=t.metas.map((function(e){return e.phx_ref})),l=i.metas.map((function(e){return e.phx_ref})),c=t.metas.filter((function(e){return l.indexOf(e.phx_ref)<0})),u=i.metas.filter((function(e){return n.indexOf(e.phx_ref)<0}));c.length>0&&(s[e]=t,s[e].metas=c),u.length>0&&(a[e]=o.clone(i),a[e].metas=u)}else s[e]=t})),this.syncDiff(r,{joins:s,leaves:a},i,n)}},{key:"syncDiff",value:function(e,t,i,o){var r=t.joins,s=t.leaves,a=this.clone(e);return i||(i=function(){}),o||(o=function(){}),this.map(r,(function(e,t){var o=a[e];if(a[e]=t,o){var r,s=a[e].metas.map((function(e){return e.phx_ref})),l=o.metas.filter((function(e){return s.indexOf(e.phx_ref)<0}));(r=a[e].metas).unshift.apply(r,n(l))}i(e,o,t)})),this.map(s,(function(e,t){var i=a[e];if(i){var n=t.metas.map((function(e){return e.phx_ref}));i.metas=i.metas.filter((function(e){return n.indexOf(e.phx_ref)<0})),o(e,i,t),0===i.metas.length&&delete a[e]}})),a}},{key:"list",value:function(e,t){return t||(t=function(e,t){return t}),this.map(e,(function(e,i){return t(e,i)}))}},{key:"map",value:function(e,t){return Object.getOwnPropertyNames(e).map((function(i){return t(i,e[i])}))}},{key:"clone",value:function(e){return JSON.parse(JSON.stringify(e))}}]),e}(),R=function(){function e(t,i){l(this,e),this.callback=t,this.timerCalc=i,this.timer=null,this.tries=0}return u(e,[{key:"reset",value:function(){this.tries=0,clearTimeout(this.timer)}},{key:"scheduleTimeout",value:function(){var e=this;clearTimeout(this.timer),this.timer=setTimeout((function(){e.tries=e.tries+1,e.callback()}),this.timerCalc(this.tries+1))}}]),e}()}])},6458:()=>{"use strict";!function(){var e=function(){if("function"==typeof window.CustomEvent)return window.CustomEvent;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var i=document.createEvent("CustomEvent");return i.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),i}return e.prototype=window.Event.prototype,e}();function t(e,t){var i=document.createElement("input");return i.type="hidden",i.name=e,i.value=t,i}function i(e){var i=e.getAttribute("data-to"),n=t("_method",e.getAttribute("data-method")),o=t("_csrf_token",e.getAttribute("data-csrf")),r=document.createElement("form"),s=e.getAttribute("target");r.method="get"===e.getAttribute("data-method")?"get":"post",r.action=i,r.style.display="hidden",s&&(r.target=s),r.appendChild(o),r.appendChild(n),document.body.appendChild(r),r.submit()}window.addEventListener("click",(function(t){for(var n=t.target;n&&n.getAttribute;){var o=new e("phoenix.link.click",{bubbles:!0,cancelable:!0});if(!n.dispatchEvent(o))return t.preventDefault(),t.stopImmediatePropagation(),!1;if(n.getAttribute("data-method"))return i(n),t.preventDefault(),!1;n=n.parentNode}}),!1),window.addEventListener("phoenix.link.click",(function(e){var t=e.target.getAttribute("data-confirm");t&&!window.confirm(t)&&e.preventDefault()}),!1)}()},6789:function(e){e.exports=function(e){var t={};function i(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},i.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=2)}([function(e,t,i){"use strict";i.r(t);var n,o="undefined"==typeof document?void 0:document,r=!!o&&"content"in o.createElement("template"),s=!!o&&o.createRange&&"createContextualFragment"in o.createRange();function a(e){return e=e.trim(),r?function(e){var t=o.createElement("template");return t.innerHTML=e,t.content.childNodes[0]}(e):s?function(e){return n||(n=o.createRange()).selectNode(o.body),n.createContextualFragment(e).childNodes[0]}(e):function(e){var t=o.createElement("body");return t.innerHTML=e,t.childNodes[0]}(e)}function l(e,t){var i,n,o=e.nodeName,r=t.nodeName;return o===r||(i=o.charCodeAt(0),n=r.charCodeAt(0),i<=90&&n>=97?o===r.toUpperCase():n<=90&&i>=97&&r===o.toUpperCase())}function c(e,t,i){e[i]!==t[i]&&(e[i]=t[i],e[i]?e.setAttribute(i,""):e.removeAttribute(i))}var u={OPTION:function(e,t){var i=e.parentNode;if(i){var n=i.nodeName.toUpperCase();"OPTGROUP"===n&&(n=(i=i.parentNode)&&i.nodeName.toUpperCase()),"SELECT"!==n||i.hasAttribute("multiple")||(e.hasAttribute("selected")&&!t.selected&&(e.setAttribute("selected","selected"),e.removeAttribute("selected")),i.selectedIndex=-1)}c(e,t,"selected")},INPUT:function(e,t){c(e,t,"checked"),c(e,t,"disabled"),e.value!==t.value&&(e.value=t.value),t.hasAttribute("value")||e.removeAttribute("value")},TEXTAREA:function(e,t){var i=t.value;e.value!==i&&(e.value=i);var n=e.firstChild;if(n){var o=n.nodeValue;if(o==i||!i&&o==e.placeholder)return;n.nodeValue=i}},SELECT:function(e,t){if(!t.hasAttribute("multiple")){for(var i,n,o=-1,r=0,s=e.firstChild;s;)if("OPTGROUP"===(n=s.nodeName&&s.nodeName.toUpperCase()))s=(i=s).firstChild;else{if("OPTION"===n){if(s.hasAttribute("selected")){o=r;break}r++}!(s=s.nextSibling)&&i&&(s=i.nextSibling,i=null)}e.selectedIndex=o}}};function h(){}function d(e){if(e)return e.getAttribute&&e.getAttribute("id")||e.id}var g=function(e){return function(t,i,n){if(n||(n={}),"string"==typeof i)if("#document"===t.nodeName||"HTML"===t.nodeName||"BODY"===t.nodeName){var r=i;(i=o.createElement("html")).innerHTML=r}else i=a(i);var s=n.getNodeKey||d,c=n.onBeforeNodeAdded||h,g=n.onNodeAdded||h,f=n.onBeforeElUpdated||h,p=n.onElUpdated||h,m=n.onBeforeNodeDiscarded||h,_=n.onNodeDiscarded||h,v=n.onBeforeElChildrenUpdated||h,b=!0===n.childrenOnly,y=Object.create(null),w=[];function C(e){w.push(e)}function S(e,t,i){!1!==m(e)&&(t&&t.removeChild(e),_(e),function e(t,i){if(1===t.nodeType)for(var n=t.firstChild;n;){var o=void 0;i&&(o=s(n))?C(o):(_(n),n.firstChild&&e(n,i)),n=n.nextSibling}}(e,i))}function x(e){g(e);for(var t=e.firstChild;t;){var i=t.nextSibling,n=s(t);if(n){var o=y[n];o&&l(t,o)?(t.parentNode.replaceChild(o,t),k(o,t)):x(t)}else x(t);t=i}}function k(t,i,n){var r=s(i);if(r&&delete y[r],!n){if(!1===f(t,i))return;if(e(t,i),p(t),!1===v(t,i))return}"TEXTAREA"!==t.nodeName?function(e,t){var i,n,r,a,h,d=t.firstChild,g=e.firstChild;e:for(;d;){for(a=d.nextSibling,i=s(d);g;){if(r=g.nextSibling,d.isSameNode&&d.isSameNode(g)){d=a,g=r;continue e}n=s(g);var f=g.nodeType,p=void 0;if(f===d.nodeType&&(1===f?(i?i!==n&&((h=y[i])?r===h?p=!1:(e.insertBefore(h,g),n?C(n):S(g,e,!0),g=h):p=!1):n&&(p=!1),(p=!1!==p&&l(g,d))&&k(g,d)):3!==f&&8!=f||(p=!0,g.nodeValue!==d.nodeValue&&(g.nodeValue=d.nodeValue))),p){d=a,g=r;continue e}n?C(n):S(g,e,!0),g=r}if(i&&(h=y[i])&&l(h,d))e.appendChild(h),k(h,d);else{var m=c(d);!1!==m&&(m&&(d=m),d.actualize&&(d=d.actualize(e.ownerDocument||o)),e.appendChild(d),x(d))}d=a,g=r}!function(e,t,i){for(;t;){var n=t.nextSibling;(i=s(t))?C(i):S(t,e,!0),t=n}}(e,g,n);var _=u[e.nodeName];_&&_(e,t)}(t,i):u.TEXTAREA(t,i)}!function e(t){if(1===t.nodeType||11===t.nodeType)for(var i=t.firstChild;i;){var n=s(i);n&&(y[n]=i),e(i),i=i.nextSibling}}(t);var D=t,L=D.nodeType,N=i.nodeType;if(!b)if(1===L)1===N?l(t,i)||(_(t),D=function(e,t){for(var i=e.firstChild;i;){var n=i.nextSibling;t.appendChild(i),i=n}return t}(t,function(e,t){return t&&"http://www.w3.org/1999/xhtml"!==t?o.createElementNS(t,e):o.createElement(e)}(i.nodeName,i.namespaceURI))):D=i;else if(3===L||8===L){if(N===L)return D.nodeValue!==i.nodeValue&&(D.nodeValue=i.nodeValue),D;D=i}if(D===i)_(t);else{if(i.isSameNode&&i.isSameNode(D))return;if(k(D,i,b),w)for(var E=0,A=w.length;E=0;a--)n=(i=s[a]).name,o=i.namespaceURI,r=i.value,o?(n=i.localName||n,e.getAttributeNS(o,n)!==r&&("xmlns"===i.prefix&&(n=i.name),e.setAttributeNS(o,n,r))):e.getAttribute(n)!==r&&e.setAttribute(n,r);for(var l=e.attributes,c=l.length-1;c>=0;c--)n=(i=l[c]).name,(o=i.namespaceURI)?(n=i.localName||n,t.hasAttributeNS(o,n)||e.removeAttributeNS(o,n)):t.hasAttribute(n)||e.removeAttribute(n)}}));function f(e){return C(e)||m(e)||S(e)||w()}function p(e){return function(e){if(Array.isArray(e))return x(e)}(e)||m(e)||S(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function _(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function v(e){for(var t=1;te.length)&&(t=e.length);for(var i=0,n=new Array(t);i=0;return t.size>0&&(i||n)}},{key:"isPreflighted",value:function(e,t){return e.getAttribute("data-phx-preflighted-refs").split(",").indexOf(X.genFileRef(t))>=0&&this.isActive(e,t)}}]),L(e,[{key:"metadata",value:function(){return this.meta}},{key:"progress",value:function(e){var t=this;this._progress=Math.floor(e),this._progress>this._lastProgressSent&&(this._progress>=100?(this._progress=100,this._lastProgressSent=100,this._isDone=!0,this.view.pushFileProgress(this.fileEl,this.ref,100,(function(){X.untrackFile(t.fileEl,t.file),t._onDone()}))):(this._lastProgressSent=this._progress,this.view.pushFileProgress(this.fileEl,this.ref,this._progress)))}},{key:"cancel",value:function(){this._isCancelled=!0,this._isDone=!0,this._onDone()}},{key:"isDone",value:function(){return this._isDone}},{key:"error",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"failed";X.clearFiles(this.fileEl),this.view.pushFileProgress(this.fileEl,this.ref,{error:e})}},{key:"onDone",value:function(e){this._onDone=e}},{key:"toPreflightPayload",value:function(){return{last_modified:this.file.lastModified,name:this.file.name,size:this.file.size,type:this.file.type,ref:this.ref}}},{key:"uploader",value:function(e){if(this.meta.uploader){var t=e[this.meta.uploader]||W("no uploader configured for ".concat(this.meta.uploader));return{name:this.meta.uploader,callback:t}}return{name:"channel",callback:Q}}},{key:"zipPostFlight",value:function(e){this.meta=e.entries[this.ref],this.meta||W("no preflight upload response returned with ref ".concat(this.ref),{input:this.fileEl,response:e})}}]),e}(),Y={LiveFileUpload:{preflightedRefs:function(){return this.el.getAttribute("data-phx-preflighted-refs")},mounted:function(){this.preflightedWas=this.preflightedRefs()},updated:function(){var e=this.preflightedRefs();this.preflightedWas!==e&&(this.preflightedWas=e,""===e&&this.__view.cancelSubmit(this.el.form))}}};Y.LiveImgPreview={mounted:function(){var e=this;this.ref=this.el.getAttribute("data-phx-entry-ref"),this.inputEl=document.getElementById(this.el.getAttribute(R)),X.getEntryDataURL(this.inputEl,this.ref,(function(t){return e.el.src=t}))}};var Z=0,X=function(){function e(t,i,n){k(this,e),this.view=i,this.onComplete=n,this._entries=Array.from(e.filesAwaitingPreflight(t)||[]).map((function(e){return new G(t,e,i)})),this.numEntriesInProgress=this._entries.length}return L(e,null,[{key:"genFileRef",value:function(e){var t=e._phxRef;return void 0!==t?t:(e._phxRef=(Z++).toString(),e._phxRef)}},{key:"getEntryDataURL",value:function(e,t,i){var n=this,o=this.activeFiles(e).find((function(e){return n.genFileRef(e)===t})),r=new FileReader;r.onload=function(e){return i(e.target.result)},r.readAsDataURL(o)}},{key:"hasUploadsInProgress",value:function(e){var t=0;return oe.findUploadInputs(e).forEach((function(e){e.getAttribute("data-phx-preflighted-refs")!==e.getAttribute("data-phx-done-refs")&&t++})),t>0}},{key:"serializeUploads",value:function(e){var t=this,i={};return this.activeFiles(e,"serialize").forEach((function(n){var o={path:e.name},r=e.getAttribute(R);i[r]=i[r]||[],o.ref=t.genFileRef(n),o.name=n.name,o.type=n.type,o.size=n.size,i[r].push(o)})),i}},{key:"clearFiles",value:function(e){e.value=null,e.removeAttribute(R),oe.putPrivate(e,"files",[])}},{key:"untrackFile",value:function(e,t){oe.putPrivate(e,"files",oe.private(e,"files").filter((function(e){return!Object.is(e,t)})))}},{key:"trackFiles",value:function(e,t){var i=this;if(null!==e.getAttribute("multiple")){var n=t.filter((function(t){return!i.activeFiles(e).find((function(e){return Object.is(e,t)}))}));oe.putPrivate(e,"files",this.activeFiles(e).concat(n)),e.value=null}else oe.putPrivate(e,"files",t)}},{key:"activeFileInputs",value:function(e){var t=this,i=oe.findUploadInputs(e);return Array.from(i).filter((function(e){return e.files&&t.activeFiles(e).length>0}))}},{key:"activeFiles",value:function(e){return(oe.private(e,"files")||[]).filter((function(t){return G.isActive(e,t)}))}},{key:"inputsAwaitingPreflight",value:function(e){var t=this,i=oe.findUploadInputs(e);return Array.from(i).filter((function(e){return t.filesAwaitingPreflight(e).length>0}))}},{key:"filesAwaitingPreflight",value:function(e){return this.activeFiles(e).filter((function(t){return!G.isPreflighted(e,t)}))}}]),L(e,[{key:"entries",value:function(){return this._entries}},{key:"initAdapterUpload",value:function(e,t,i){var n=this;this._entries=this._entries.map((function(t){return t.zipPostFlight(e),t.onDone((function(){n.numEntriesInProgress--,0===n.numEntriesInProgress&&n.onComplete()})),t}));var o=this._entries.reduce((function(e,t){var n=t.uploader(i.uploaders),o=n.name,r=n.callback;return e[o]=e[o]||{callback:r,entries:[]},e[o].entries.push(t),e}),{});for(var r in o){var s=o[r];(0,s.callback)(s.entries,t,e,i)}}}]),e}(),Q=function(e,t,i,n){e.forEach((function(e){new J(e,i.config.chunk_size,n).upload()}))},J=function(){function e(t,i,n){k(this,e),this.liveSocket=n,this.entry=t,this.offset=0,this.chunkSize=i,this.chunkTimer=null,this.uploadChannel=n.channel("lvu:".concat(t.ref),{token:t.metadata()})}return L(e,[{key:"error",value:function(e){clearTimeout(this.chunkTimer),this.uploadChannel.leave(),this.entry.error(e)}},{key:"upload",value:function(){var e=this;this.uploadChannel.onError((function(t){return e.error(t)})),this.uploadChannel.join().receive("ok",(function(t){return e.readNextChunk()})).receive("error",(function(t){return e.error(t)}))}},{key:"isDone",value:function(){return this.offset>=this.entry.file.size}},{key:"readNextChunk",value:function(){var e=this,t=new window.FileReader,i=this.entry.file.slice(this.offset,this.chunkSize+this.offset);t.onload=function(t){if(null!==t.target.error)return W("Read error: "+t.target.error);e.offset+=t.target.result.byteLength,e.pushChunk(t.target.result)},t.readAsArrayBuffer(i)}},{key:"pushChunk",value:function(e){var t=this;this.uploadChannel.isJoined()&&this.uploadChannel.push("chunk",e).receive("ok",(function(){t.entry.progress(t.offset/t.entry.file.size*100),t.isDone()||(t.chunkTimer=setTimeout((function(){return t.readNextChunk()}),t.liveSocket.getLatencySim()||0))}))}}]),e}(),ee=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=new FormData(e),n=[];i.forEach((function(e,t,i){e instanceof File&&n.push(t)})),n.forEach((function(e){return i.delete(e)}));var o,r=new URLSearchParams,s=function(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=S(e))){var t=0,i=function(){};return{s:i,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o,r=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return r=e.done,e},e:function(e){s=!0,o=e},f:function(){try{r||null==n.return||n.return()}finally{if(s)throw o}}}}(i.entries());try{for(s.s();!(o=s.n()).done;){var a=y(o.value,2),l=a[0],c=a[1];r.append(l,c)}}catch(e){s.e(e)}finally{s.f()}for(var u in t)r.append(u,t[u]);return r.toString()},te=function(){function e(t,i){k(this,e),this.viewId=t,this.rendered={},this.mergeDiff(i)}return L(e,null,[{key:"extract",value:function(e){var t=e.r,i=e.e,n=e.t;return delete e.r,delete e.e,delete e.t,{diff:e,title:n,reply:t||null,events:i||[]}}}]),L(e,[{key:"parentViewId",value:function(){return this.viewId}},{key:"toString",value:function(e){return this.recursiveToString(this.rendered,this.rendered.c,e)}},{key:"recursiveToString",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.c,i=arguments.length>2?arguments[2]:void 0,n={buffer:"",components:t,onlyCids:i=i?new Set(i):null};return this.toOutputBuffer(e,n),n.buffer}},{key:"componentCIDs",value:function(e){return Object.keys(e.c||{}).map((function(e){return parseInt(e)}))}},{key:"isComponentOnlyDiff",value:function(e){return!!e.c&&1===Object.keys(e).length}},{key:"getComponent",value:function(e,t){return e.c[t]}},{key:"mergeDiff",value:function(e){var t=e.c,i={};if(delete e.c,this.rendered=this.mutableMerge(this.rendered,e),this.rendered.c=this.rendered.c||{},t){var n=this.rendered.c;for(var o in t)t[o]=this.cachedFindComponent(o,t[o],n,t,i);for(var r in t)n[r]=t[r];e.c=t}}},{key:"cachedFindComponent",value:function(e,t,i,n,o){if(o[e])return o[e];var r,s,a,l=t.s;return"number"==typeof l?(s=(a=l>0?this.cachedFindComponent(l,n[l],i,n,o):i[-l]).s,(r=this.cloneMerge(a,t)).s=s):r=void 0!==t.s?t:this.cloneMerge(i[e]||{},t),o[e]=r,r}},{key:"mutableMerge",value:function(e,t){return void 0!==t.s?t:(this.doMutableMerge(e,t),e)}},{key:"doMutableMerge",value:function(e,t){for(var i in t){var n=t[i],o=e[i];j(n)&&void 0===n.s&&j(o)?this.doMutableMerge(o,n):e[i]=n}}},{key:"cloneMerge",value:function(e,t){var i=v(v({},e),t);for(var n in i){var o=t[n],r=e[n];j(o)&&void 0===o.s&&j(r)&&(i[n]=this.cloneMerge(r,o))}return i}},{key:"componentToString",value:function(e){return this.recursiveCIDToString(this.rendered.c,e)}},{key:"pruneCIDs",value:function(e){var t=this;e.forEach((function(e){return delete t.rendered.c[e]}))}},{key:"get",value:function(){return this.rendered}},{key:"isNewFingerprint",value:function(){return!!(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).s}},{key:"toOutputBuffer",value:function(e,t){if(e.d)return this.comprehensionToBuffer(e,t);var i=e.s;t.buffer+=i[0];for(var n=1;n2&&void 0!==arguments[2]?arguments[2]:{};if(k(this,e),this.unloaded=!1,!i||"Object"===i.constructor.name)throw new Error('\n a phoenix Socket must be provided as the second argument to the LiveSocket constructor. For example:\n\n import {Socket} from "phoenix"\n import {LiveSocket} from "phoenix_live_view"\n let liveSocket = new LiveSocket("/live", Socket, {...})\n ');this.socket=new i(t,o),this.bindingPrefix=o.bindingPrefix||B,this.opts=o,this.params=H(o.params||{}),this.viewLogger=o.viewLogger,this.metadataCallbacks=o.metadata||{},this.defaults=Object.assign($(z),o.defaults||{}),this.activeElement=null,this.prevActive=null,this.silenced=!1,this.main=null,this.linkRef=1,this.roots={},this.href=window.location.href,this.pendingLink=null,this.currentLocation=$(window.location),this.hooks=o.hooks||{},this.uploaders=o.uploaders||{},this.loaderTimeout=o.loaderTimeout||1,this.localStorage=o.localStorage||window.localStorage,this.sessionStorage=o.sessionStorage||window.sessionStorage,this.boundTopLevelEvents=!1,this.domCallbacks=Object.assign({onNodeAdded:H(),onBeforeElUpdated:H()},o.dom||{}),window.addEventListener("pagehide",(function(e){n.unloaded=!0})),this.socket.onOpen((function(){n.isUnloaded()&&window.location.reload()}))}return L(e,[{key:"isProfileEnabled",value:function(){return"true"===this.sessionStorage.getItem("phx:live-socket:profiling")}},{key:"isDebugEnabled",value:function(){return"true"===this.sessionStorage.getItem("phx:live-socket:debug")}},{key:"enableDebug",value:function(){this.sessionStorage.setItem("phx:live-socket:debug","true")}},{key:"enableProfiling",value:function(){this.sessionStorage.setItem("phx:live-socket:profiling","true")}},{key:"disableDebug",value:function(){this.sessionStorage.removeItem("phx:live-socket:debug")}},{key:"disableProfiling",value:function(){this.sessionStorage.removeItem("phx:live-socket:profiling")}},{key:"enableLatencySim",value:function(e){this.enableDebug(),console.log("latency simulator enabled for the duration of this browser session. Call disableLatencySim() to disable"),this.sessionStorage.setItem("phx:live-socket:latency-sim",e)}},{key:"disableLatencySim",value:function(){this.sessionStorage.removeItem("phx:live-socket:latency-sim")}},{key:"getLatencySim",value:function(){var e=this.sessionStorage.getItem("phx:live-socket:latency-sim");return e?parseInt(e):null}},{key:"getSocket",value:function(){return this.socket}},{key:"connect",value:function(){var e=this,t=function(){e.joinRootViews()&&(e.bindTopLevelEvents(),e.socket.connect())};["complete","loaded","interactive"].indexOf(document.readyState)>=0?t():document.addEventListener("DOMContentLoaded",(function(){return t()}))}},{key:"disconnect",value:function(e){this.socket.disconnect(e)}},{key:"triggerDOM",value:function(e,t){var i;(i=this.domCallbacks)[e].apply(i,p(t))}},{key:"time",value:function(e,t){if(!this.isProfileEnabled()||!console.time)return t();console.time(e);var i=t();return console.timeEnd(e),i}},{key:"log",value:function(e,t,i){if(this.viewLogger){var n=y(i(),2),o=n[0],r=n[1];this.viewLogger(e,t,o,r)}else if(this.isDebugEnabled()){var s=y(i(),2),a=s[0],l=s[1];V(e,t,a,l)}}},{key:"onChannel",value:function(e,t,i){var n=this;e.on(t,(function(e){var t=n.getLatencySim();t?(console.log("simulating ".concat(t,"ms of latency from server to client")),setTimeout((function(){return i(e)}),t)):i(e)}))}},{key:"wrapPush",value:function(e,t,i){var n=this,o=this.getLatencySim(),r=e.joinCount;if(!o)return t.timeout?i().receive("timeout",(function(){e.joinCount===r&&n.reloadWithJitter(e,(function(){n.log(e,"timeout",(function(){return["received timeout while communicating with server. Falling back to hard refresh for recovery"]}))}))})):i();console.log("simulating ".concat(o,"ms of latency from client to server"));var s={receives:[],receive:function(e,t){this.receives.push([e,t])}};return setTimeout((function(){s.receives.reduce((function(e,t){var i=y(t,2),n=i[0],o=i[1];return e.receive(n,o)}),i())}),o),s}},{key:"reloadWithJitter",value:function(e,t){var i=this;e.destroy(),this.disconnect();var n=E[0],o=E[1],r=Math.floor(Math.random()*(o-n+1))+n,s=ne.updateLocal(this.localStorage,e.name(),"consecutive-reloads",0,(function(e){return e+1}));t?t():this.log(e,"join",(function(){return["encountered ".concat(s," consecutive reloads")]})),s>10&&(this.log(e,"join",(function(){return["exceeded ".concat(10," consecutive reloads. Entering failsafe mode")]})),r=3e4),setTimeout((function(){i.hasPendingLink()?window.location=i.pendingLink:window.location.reload()}),r)}},{key:"getHookCallbacks",value:function(e){return e&&e.startsWith("Phoenix.")?Y[e.split(".")[1]]:this.hooks[e]}},{key:"isUnloaded",value:function(){return this.unloaded}},{key:"isConnected",value:function(){return this.socket.isConnected()}},{key:"getBindingPrefix",value:function(){return this.bindingPrefix}},{key:"binding",value:function(e){return"".concat(this.getBindingPrefix()).concat(e)}},{key:"channel",value:function(e,t){return this.socket.channel(e,t)}},{key:"joinRootViews",value:function(){var e=this,t=!1;return oe.all(document,"".concat(O,":not([").concat("data-phx-parent-id","])"),(function(i){if(!e.getRootById(i.id)){var n=e.joinRootView(i,e.getHref());e.root=e.root||n,i.getAttribute("data-phx-main")&&(e.main=n)}t=!0})),t}},{key:"redirect",value:function(e,t){this.disconnect(),ne.redirect(e,t)}},{key:"replaceMain",value:function(e,t){var i=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.setPendingLink(e),r=this.main.el;this.main.showLoader(this.loaderTimeout),this.main.destroy(),ne.fetchPage(e,(function(s,a){if(200!==s)return i.redirect(e);var l=document.createElement("template");l.innerHTML=a;var c=l.content.childNodes[0];if(!c||!i.isPhxView(c))return i.redirect(e);i.joinRootView(c,e,t,(function(e,t){1===t&&(i.commitPendingLink(o)?(r.replaceWith(e.el),i.main=e,n&&n()):e.destroy())}))}))}},{key:"isPhxView",value:function(e){return e.getAttribute&&null!==e.getAttribute(A)}},{key:"joinRootView",value:function(e,t,i,n){var o=new ae(e,this,null,t,i);return this.roots[o.id]=o,o.join(n),o}},{key:"owner",value:function(e,t){var i=this,n=K(e.closest(O),(function(e){return i.getViewByEl(e)}));n&&t(n)}},{key:"withinOwners",value:function(e,t){var i=this;this.owner(e,(function(n){var o=e.getAttribute(i.binding("target"));null===o?t(n,e):n.withinTargets(o,t)}))}},{key:"getViewByEl",value:function(e){var t=e.getAttribute("data-phx-root-id");return K(this.getRootById(t),(function(t){return t.getDescendentByEl(e)}))}},{key:"getRootById",value:function(e){return this.roots[e]}},{key:"destroyAllViews",value:function(){for(var e in this.roots)this.roots[e].destroy(),delete this.roots[e]}},{key:"destroyViewByEl",value:function(e){var t=this.getRootById(e.getAttribute("data-phx-root-id"));t&&t.destroyDescendent(e.id)}},{key:"setActiveElement",value:function(e){var t=this;if(this.activeElement!==e){this.activeElement=e;var i=function(){e===t.activeElement&&(t.activeElement=null),e.removeEventListener("mouseup",t),e.removeEventListener("touchend",t)};e.addEventListener("mouseup",i),e.addEventListener("touchend",i)}}},{key:"getActiveElement",value:function(){return document.activeElement===document.body?this.activeElement||document.activeElement:document.activeElement||document.body}},{key:"dropActiveElement",value:function(e){this.prevActive&&e.ownsElement(this.prevActive)&&(this.prevActive=null)}},{key:"restorePreviouslyActiveFocus",value:function(){this.prevActive&&this.prevActive!==document.body&&this.prevActive.focus()}},{key:"blurActiveElement",value:function(){this.prevActive=this.getActiveElement(),this.prevActive!==document.body&&this.prevActive.blur()}},{key:"bindTopLevelEvents",value:function(){var e=this;this.boundTopLevelEvents||(this.boundTopLevelEvents=!0,document.body.addEventListener("click",(function(){})),window.addEventListener("pageshow",(function(t){t.persisted&&(e.getSocket().disconnect(),e.withPageLoading({to:window.location.href,kind:"redirect"}),window.location.reload())}),!0),this.bindClicks(),this.bindNav(),this.bindForms(),this.bind({keyup:"keyup",keydown:"keydown"},(function(t,i,n,o,r,s,a){var l=o.getAttribute(e.binding("key")),c=t.key&&t.key.toLowerCase();l&&l.toLowerCase()!==c||n.pushKey(o,r,i,s,v({key:t.key},e.eventMeta(i,t,o)))})),this.bind({blur:"focusout",focus:"focusin"},(function(t,i,n,o,r,s,a){a||n.pushEvent(i,o,r,s,e.eventMeta(i,t,o))})),this.bind({blur:"blur",focus:"focus"},(function(t,i,n,o,r,s,a){a&&"window"!==!a&&n.pushEvent(i,o,r,s,e.eventMeta(i,t,o))})),window.addEventListener("dragover",(function(e){return e.preventDefault()})),window.addEventListener("drop",(function(t){t.preventDefault();var i=K(U(t.target,e.binding("drop-target")),(function(t){return t.getAttribute(e.binding("drop-target"))})),n=i&&document.getElementById(i),o=Array.from(t.dataTransfer.files||[]);n&&!n.disabled&&0!==o.length&&n.files instanceof FileList&&(X.trackFiles(n,o),n.dispatchEvent(new Event("input",{bubbles:!0})))})))}},{key:"eventMeta",value:function(e,t,i){var n=this.metadataCallbacks[e];return n?n(t,i):{}}},{key:"setPendingLink",value:function(e){return this.linkRef++,this.pendingLink=e,this.linkRef}},{key:"commitPendingLink",value:function(e){return this.linkRef===e&&(this.href=this.pendingLink,this.pendingLink=null,!0)}},{key:"getHref",value:function(){return this.href}},{key:"hasPendingLink",value:function(){return!!this.pendingLink}},{key:"bind",value:function(e,t){var i=this,n=function(n){var o=e[n];i.on(o,(function(e){var o=i.binding(n),r=i.binding("window-".concat(n)),s=e.target.getAttribute&&e.target.getAttribute(o);s?i.debounce(e.target,e,(function(){i.withinOwners(e.target,(function(i,o){t(e,n,i,e.target,o,s,null)}))})):oe.all(document,"[".concat(r,"]"),(function(o){var s=o.getAttribute(r);i.debounce(o,e,(function(){i.withinOwners(o,(function(i,r){t(e,n,i,o,r,s,"window")}))}))}))}))};for(var o in e)n(o)}},{key:"bindClicks",value:function(){this.bindClick("click","click",!1),this.bindClick("mousedown","capture-click",!0)}},{key:"bindClick",value:function(e,t,i){var n=this,o=this.binding(t);window.addEventListener(e,(function(e){if(n.isConnected()){var t=null,r=(t=i?e.target.matches("[".concat(o,"]"))?e.target:e.target.querySelector("[".concat(o,"]")):U(e.target,o))&&t.getAttribute(o);r&&("#"===t.getAttribute("href")&&e.preventDefault(),n.debounce(t,e,(function(){n.withinOwners(t,(function(i,o){i.pushEvent("click",t,o,r,n.eventMeta("click",e,t))}))})))}}),i)}},{key:"bindNav",value:function(){var e=this;if(ne.canPushState()){history.scrollRestoration&&(history.scrollRestoration="manual");var t=null;window.addEventListener("scroll",(function(e){clearTimeout(t),t=setTimeout((function(){ne.updateCurrentState((function(e){return Object.assign(e,{scroll:window.scrollY})}))}),100)})),window.addEventListener("popstate",(function(t){if(e.registerNewLocation(window.location)){var i=t.state||{},n=i.type,o=i.id,r=i.root,s=i.scroll,a=window.location.href;e.main.isConnected()&&"patch"===n&&o===e.main.id?e.main.pushLinkPatch(a,null):e.replaceMain(a,null,(function(){r&&e.replaceRootHistory(),"number"==typeof s&&setTimeout((function(){window.scrollTo(0,s)}),0)}))}}),!1),window.addEventListener("click",(function(t){var i=U(t.target,"data-phx-link"),n=i&&i.getAttribute("data-phx-link"),o=t.metaKey||t.ctrlKey||1===t.button;if(n&&e.isConnected()&&e.main&&!o){var r=i.href,s=i.getAttribute("data-phx-link-state");if(t.preventDefault(),e.pendingLink!==r)if("patch"===n)e.pushHistoryPatch(r,s,i);else{if("redirect"!==n)throw new Error("expected ".concat("data-phx-link",' to be "patch" or "redirect", got: ').concat(n));e.historyRedirect(r,s)}}}),!1)}}},{key:"withPageLoading",value:function(e,t){oe.dispatchEvent(window,"phx:page-loading-start",e);var i=function(){return oe.dispatchEvent(window,"phx:page-loading-stop",e)};return t?t(i):i}},{key:"pushHistoryPatch",value:function(e,t,i){var n=this;this.withPageLoading({to:e,kind:"patch"},(function(o){n.main.pushLinkPatch(e,i,(function(i){n.historyPatch(e,t,i),o()}))}))}},{key:"historyPatch",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.setPendingLink(e);this.commitPendingLink(i)&&(ne.pushState(t,{type:"patch",id:this.main.id},e),this.registerNewLocation(window.location))}},{key:"historyRedirect",value:function(e,t,i){var n=this,o=window.scrollY;this.withPageLoading({to:e,kind:"redirect"},(function(r){n.replaceMain(e,i,(function(){ne.pushState(t,{type:"redirect",id:n.main.id,scroll:o},e),n.registerNewLocation(window.location),r()}))}))}},{key:"replaceRootHistory",value:function(){ne.pushState("replace",{root:!0,type:"patch",id:this.main.id})}},{key:"registerNewLocation",value:function(e){var t=this.currentLocation;return t.pathname+t.search!==e.pathname+e.search&&(this.currentLocation=$(e),!0)}},{key:"bindForms",value:function(){var e=this,t=0;this.on("submit",(function(t){var i=t.target.getAttribute(e.binding("submit"));i&&(t.preventDefault(),t.target.disabled=!0,e.withinOwners(t.target,(function(e,n){return e.submitForm(t.target,n,i)})))}),!1);for(var i=function(){var i=o[n];e.on(i,(function(n){var o=n.target,r=o.form&&o.form.getAttribute(e.binding("change"));if(r&&("number"!==o.type||!o.validity||!o.validity.badInput)){var s=t;t++;var a=oe.private(o,"prev-iteration")||{},l=a.at,c=a.type;l===s-1&&i!==c||(oe.putPrivate(o,"prev-iteration",{at:s,type:i}),e.debounce(o,n,(function(){e.withinOwners(o.form,(function(t,i){oe.putPrivate(o,"phx-has-focused",!0),oe.isTextualInput(o)||e.setActiveElement(o),t.pushInput(o,i,r,n.target)}))})))}}),!1)},n=0,o=["change","input"];n=0},findPhxChildren:function(e,t){return this.all(e,"".concat(O,"[").concat("data-phx-parent-id",'="').concat(t,'"]'))},findParentCIDs:function(e,t){var i=this,n=new Set(t);return t.reduce((function(t,n){var o="[".concat(I,'="').concat(n,'"] [').concat(I,"]");return i.filterWithinSameLiveView(i.all(e,o),e).map((function(e){return parseInt(e.getAttribute(I))})).forEach((function(e){return t.delete(e)})),t}),n)},filterWithinSameLiveView:function(e,t){var i=this;return t.querySelector(O)?e.filter((function(e){return i.withinSameLiveView(e,t)})):e},withinSameLiveView:function(e,t){for(;e=e.parentNode;){if(e.isSameNode(t))return!0;if(e.getAttribute(A))return!1}},private:function(e,t){return e.phxPrivate&&e.phxPrivate[t]},deletePrivate:function(e,t){e.phxPrivate&&delete e.phxPrivate[t]},putPrivate:function(e,t,i){e.phxPrivate||(e.phxPrivate={}),e.phxPrivate[t]=i},copyPrivates:function(e,t){t.phxPrivate&&(e.phxPrivate=$(t.phxPrivate))},putTitle:function(e){var t=document.querySelector("title").dataset,i=t.prefix,n=t.suffix;document.title="".concat(i||"").concat(e).concat(n||"")},debounce:function(e,t,i,n,o,r,s){var a=this,l=e.getAttribute(i),c=e.getAttribute(o);""===l&&(l=n),""===c&&(c=r);var u=l||c;switch(u){case null:return s();case"blur":return void(this.once(e,"debounce-blur")&&e.addEventListener("blur",(function(){return s()})));default:var h=parseInt(u),d=this.incCycle(e,"debounce-trigger",(function(){return c?a.deletePrivate(e,"throttled"):s()}));if(isNaN(h))return W("invalid throttle/debounce value: ".concat(u));if(c){var g=!1;if("keydown"===t.type){var f=this.private(e,"debounce-prev-key");this.putPrivate(e,"debounce-prev-key",t.key),g=f!==t.key}if(!g&&this.private(e,"throttled"))return!1;s(),this.putPrivate(e,"throttled",!0),setTimeout((function(){return a.triggerCycle(e,"debounce-trigger")}),h)}else setTimeout((function(){return a.triggerCycle(e,"debounce-trigger",d)}),h);var p=e.form;p&&this.once(p,"bind-debounce")&&p.addEventListener("submit",(function(e){Array.from(new FormData(p).entries(),(function(e){var t=y(e,2),i=t[0],n=(t[1],p.querySelector('[name="'.concat(i,'"]')));a.incCycle(n,"debounce-trigger"),a.deletePrivate(n,"throttled")}))})),this.once(e,"bind-debounce")&&e.addEventListener("blur",(function(t){return a.triggerCycle(e,"debounce-trigger")}))}},triggerCycle:function(e,t,i){var n=y(this.private(e,t),2),o=n[0],r=n[1];i||(i=o),i===o&&(this.incCycle(e,t),r())},once:function(e,t){return!0!==this.private(e,t)&&(this.putPrivate(e,t,!0),!0)},incCycle:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},n=y(this.private(e,t)||[0,i],2),o=n[0];return n[1],o++,this.putPrivate(e,t,[o,i]),o},discardError:function(e,t,i){var n=t.getAttribute&&t.getAttribute(i),o=n&&e.querySelector('[id="'.concat(n,'"], [name="').concat(n,'"]'));o&&(this.private(o,"phx-has-focused")||this.private(o.form,"phx-has-submitted")||t.classList.add("phx-no-feedback"))},showError:function(e,t){var i=this;(e.id||e.name)&&this.all(e.form,"[".concat(t,'="').concat(e.id,'"], [').concat(t,'="').concat(e.name,'"]'),(function(e){i.removeClass(e,"phx-no-feedback")}))},isPhxChild:function(e){return e.getAttribute&&e.getAttribute("data-phx-parent-id")},dispatchEvent:function(e,t){var i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}});e.dispatchEvent(i)},cloneNode:function(e,t){if(void 0===t)return e.cloneNode(!0);var i=e.cloneNode(!1);return i.innerHTML=t,i},mergeAttrs:function(e,t){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i.exclude||[],o=i.isIgnored,r=t.attributes,s=r.length-1;s>=0;s--){var a=r[s].name;n.indexOf(a)<0&&e.setAttribute(a,t.getAttribute(a))}for(var l=e.attributes,c=l.length-1;c>=0;c--){var u=l[c].name;o?u.startsWith("data-")&&!t.hasAttribute(u)&&e.removeAttribute(u):t.hasAttribute(u)||e.removeAttribute(u)}},mergeFocusedInput:function(e,t){e instanceof HTMLSelectElement||oe.mergeAttrs(e,t,{except:["value"]}),t.readOnly?e.setAttribute("readonly",!0):e.removeAttribute("readonly")},hasSelectionRange:function(e){return e.setSelectionRange&&("text"===e.type||"textarea"===e.type)},restoreFocus:function(e,t,i){if(oe.isTextualInput(e)){var n=e.matches(":focus");e.readOnly&&e.blur(),n||e.focus(),this.hasSelectionRange(e)&&e.setSelectionRange(t,i)}},isFormInput:function(e){return/^(?:input|select|textarea)$/i.test(e.tagName)&&"button"!==e.type},syncAttrsToProps:function(e){e instanceof HTMLInputElement&&P.indexOf(e.type.toLocaleLowerCase())>=0&&(e.checked=null!==e.getAttribute("checked"))},isTextualInput:function(e){return F.indexOf(e.type)>=0},isNowTriggerFormExternal:function(e,t){return e.getAttribute&&null!==e.getAttribute(t)},syncPendingRef:function(e,t,i){var n=e.getAttribute(T);return null===n||(oe.isFormInput(e)||null!==e.getAttribute(i)?(oe.isUploadInput(e)&&oe.mergeAttrs(e,t,{isIgnored:!0}),oe.putPrivate(e,T,t),!1):(M.forEach((function(i){e.classList.contains(i)&&t.classList.add(i)})),t.setAttribute(T,n),!0))},cleanChildNodes:function(e,t){if(oe.isPhxUpdate(e,t,["append","prepend"])){var i=[];e.childNodes.forEach((function(e){e.id||(e.nodeType===Node.TEXT_NODE&&""===e.nodeValue.trim()||W("only HTML element tags with an id are allowed inside containers with phx-update.\n\n"+'removing illegal node: "'.concat((e.outerHTML||e.nodeValue).trim(),'"\n\n')),i.push(e))})),i.forEach((function(e){return e.remove()}))}}},re=function(){function e(t,i,n){k(this,e);var o=new Set,r=new Set(p(i.children).map((function(e){return e.id}))),s=[];Array.from(t.children).forEach((function(e){if(e.id&&(o.add(e.id),r.has(e.id))){var t=e.previousElementSibling&&e.previousElementSibling.id;s.push({elementId:e.id,previousElementId:t})}})),this.containerId=i.id,this.updateType=n,this.elementsToModify=s,this.elementIdsToAdd=p(r).filter((function(e){return!o.has(e)}))}return L(e,[{key:"perform",value:function(){var e=oe.byId(this.containerId);this.elementsToModify.forEach((function(t){t.previousElementId?K(document.getElementById(t.previousElementId),(function(e){K(document.getElementById(t.elementId),(function(t){t.previousElementSibling&&t.previousElementSibling.id==e.id||e.insertAdjacentElement("afterend",t)}))})):K(document.getElementById(t.elementId),(function(t){null==t.previousElementSibling||e.insertAdjacentElement("afterbegin",t)}))})),"prepend"==this.updateType&&this.elementIdsToAdd.reverse().forEach((function(t){K(document.getElementById(t),(function(t){return e.insertAdjacentElement("afterbegin",t)}))}))}}]),e}(),se=function(){function e(t,i,n,o,r){k(this,e),this.view=t,this.liveSocket=t.liveSocket,this.container=i,this.id=n,this.rootID=t.root.id,this.html=o,this.targetCID=r,this.cidPatch="number"==typeof this.targetCID,this.callbacks={beforeadded:[],beforeupdated:[],beforephxChildAdded:[],afteradded:[],afterupdated:[],afterdiscarded:[],afterphxChildAdded:[]}}return L(e,null,[{key:"patchEl",value:function(e,t,i){g(e,t,{childrenOnly:!1,onBeforeElUpdated:function(e,t){if(i&&i.isSameNode(e)&&oe.isFormInput(e))return oe.mergeFocusedInput(e,t),!1}})}}]),L(e,[{key:"before",value:function(e,t){this.callbacks["before".concat(e)].push(t)}},{key:"after",value:function(e,t){this.callbacks["after".concat(e)].push(t)}},{key:"trackBefore",value:function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n1?t-1:0),n=1;n *, [phx-update=prepend] > *",(function(e){e.setAttribute("data-phx-remove","")}))}},{key:"perform",value:function(){var e=this,t=this.view,i=this.liveSocket,n=this.container,o=this.html,r=this.isCIDPatch()?this.targetCIDContainer(o):n;if(!this.isCIDPatch()||r){var s=i.getActiveElement(),a=s&&oe.hasSelectionRange(s)?s:{},l=a.selectionStart,c=a.selectionEnd,u=i.binding("update"),h=i.binding("feedback-for"),d=i.binding("disable-with"),f=i.binding("trigger-action"),p=[],m=[],_=[],v=null,b=i.time("premorph container prep",(function(){return e.buildDiffHTML(n,o,u,r)}));return this.trackBefore("added",n),this.trackBefore("updated",n,n),i.time("morphdom",(function(){g(r,b,{childrenOnly:null===r.getAttribute(I),getNodeKey:function(e){return oe.isPhxDestroyed(e)?null:e.id},onBeforeNodeAdded:function(t){return oe.discardError(r,t,h),e.trackBefore("added",t),t},onNodeAdded:function(i){oe.isNowTriggerFormExternal(i,f)&&(v=i),oe.isPhxChild(i)&&t.ownsElement(i)&&e.trackAfter("phxChildAdded",i),p.push(i)},onNodeDiscarded:function(t){oe.isPhxChild(t)&&i.destroyViewByEl(t),e.trackAfter("discarded",t)},onBeforeNodeDiscarded:function(t){return!((!t.getAttribute||null===t.getAttribute("data-phx-remove"))&&(null!==t.parentNode&&oe.isPhxUpdate(t.parentNode,u,["append","prepend"])&&t.id||e.skipCIDSibling(t)))},onElUpdated:function(e){oe.isNowTriggerFormExternal(e,f)&&(v=e),m.push(e)},onBeforeElUpdated:function(t,i){if(oe.cleanChildNodes(i,u),e.skipCIDSibling(i))return!1;if(oe.isIgnored(t,u))return e.trackBefore("updated",t,i),oe.mergeAttrs(t,i,{isIgnored:!0}),m.push(t),!1;if("number"===t.type&&t.validity&&t.validity.badInput)return!1;if(!oe.syncPendingRef(t,i,d))return oe.isUploadInput(t)&&(e.trackBefore("updated",t,i),m.push(t)),!1;if(oe.isPhxChild(i)){var n=t.getAttribute("data-phx-session");return oe.mergeAttrs(t,i,{exclude:["data-phx-static"]}),""!==n&&t.setAttribute("data-phx-session",n),t.setAttribute("data-phx-root-id",e.rootID),!1}return oe.copyPrivates(i,t),oe.discardError(r,i,h),s&&t.isSameNode(s)&&oe.isFormInput(t)&&!e.forceFocusedSelectUpdate(t,i)?(e.trackBefore("updated",t,i),oe.mergeFocusedInput(t,i),oe.syncAttrsToProps(t),m.push(t),!1):(oe.isPhxUpdate(i,u,["append","prepend"])&&_.push(new re(t,i,i.getAttribute(u))),oe.syncAttrsToProps(i),e.trackBefore("updated",t,i),!0)}})})),i.isDebugEnabled()&&function(){for(var e=new Set,t=document.querySelectorAll("*[id]"),i=0,n=t.length;i0&&i.time("post-morph append/prepend restoration",(function(){_.forEach((function(e){return e.perform()}))})),i.silenceEvents((function(){return oe.restoreFocus(s,l,c)})),oe.dispatchEvent(document,"phx:update"),p.forEach((function(t){return e.trackAfter("added",t)})),m.forEach((function(t){return e.trackAfter("updated",t)})),v&&(i.disconnect(),v.submit()),!0}}},{key:"forceFocusedSelectUpdate",value:function(e,t){var i=["select","select-one","select-multiple"].find((function(t){return t===e.type}));return!0===e.multiple||i&&e.innerHTML!=t.innerHTML}},{key:"isCIDPatch",value:function(){return this.cidPatch}},{key:"skipCIDSibling",value:function(e){return e.nodeType===Node.ELEMENT_NODE&&null!==e.getAttribute("data-phx-skip")}},{key:"targetCIDContainer",value:function(e){if(this.isCIDPatch()){var t=f(oe.findComponentNodeList(this.container,this.targetCID)),i=t[0];return 0===t.slice(1).length&&1===oe.childNodeLength(e)?i:i&&i.parentNode}}},{key:"buildDiffHTML",value:function(e,t,i,n){var o=this,r=this.isCIDPatch(),s=r&&n.getAttribute(I)===this.targetCID.toString();if(!r||s)return t;var a=null,l=document.createElement("template");a=oe.cloneNode(n);var c=f(oe.findComponentNodeList(a,this.targetCID)),u=c[0],h=c.slice(1);return l.innerHTML=t,h.forEach((function(e){return e.remove()})),Array.from(a.childNodes).forEach((function(e){e.id&&e.nodeType===Node.ELEMENT_NODE&&e.getAttribute(I)!==o.targetCID.toString()&&(e.setAttribute("data-phx-skip",""),e.innerHTML="")})),Array.from(l.content.childNodes).forEach((function(e){return a.insertBefore(e,u)})),u.remove(),a.outerHTML}}]),e}(),ae=function(){function e(t,i,n,o,r){var s=this;k(this,e),this.liveSocket=i,this.flash=r,this.parent=n,this.root=n?n.root:this,this.el=t,this.id=this.el.id,this.view=this.el.getAttribute(A),this.ref=0,this.childJoins=0,this.loaderTimer=null,this.pendingDiffs=[],this.pruningCIDs=[],this.href=o,this.joinCount=this.parent?this.parent.joinCount-1:0,this.joinPending=!0,this.destroyed=!1,this.joinCallback=function(){},this.stopCallback=function(){},this.pendingJoinOps=this.parent?null:[],this.viewHooks={},this.uploaders={},this.formSubmits=[],this.children=this.parent?null:{},this.root.children[this.id]={},this.channel=this.liveSocket.channel("lv:".concat(this.id),(function(){return{url:s.href,params:s.connectParams(),session:s.getSession(),static:s.getStatic(),flash:s.flash}})),this.showLoader(this.liveSocket.loaderTimeout),this.bindChannel()}return L(e,[{key:"isMain",value:function(){return this.liveSocket.main===this}},{key:"connectParams",value:function(){var e=this.liveSocket.params(this.view),t=oe.all(document,"[".concat(this.binding("track-static"),"]")).map((function(e){return e.src||e.href})).filter((function(e){return"string"==typeof e}));return t.length>0&&(e._track_static=t),e._mounts=this.joinCount,e}},{key:"name",value:function(){return this.view}},{key:"isConnected",value:function(){return this.channel.canPush()}},{key:"getSession",value:function(){return this.el.getAttribute("data-phx-session")}},{key:"getStatic",value:function(){var e=this.el.getAttribute("data-phx-static");return""===e?null:e}},{key:"destroy",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};this.destroyAllChildren(),this.destroyed=!0,delete this.root.children[this.id],this.parent&&delete this.root.children[this.parent.id][this.id],clearTimeout(this.loaderTimer);var i=function(){for(var i in t(),e.viewHooks)e.destroyHook(e.viewHooks[i])};oe.markPhxChildDestroyed(this.el),this.log("destroyed",(function(){return["the child has been removed from the parent"]})),this.channel.leave().receive("ok",i).receive("error",i).receive("timeout",i)}},{key:"setContainerClasses",value:function(){var e;this.el.classList.remove("phx-connected","phx-disconnected","phx-error"),(e=this.el.classList).add.apply(e,arguments)}},{key:"isLoading",value:function(){return this.el.classList.contains("phx-disconnected")}},{key:"showLoader",value:function(e){var t=this;if(clearTimeout(this.loaderTimer),e)this.loaderTimer=setTimeout((function(){return t.showLoader()}),e);else{for(var i in this.viewHooks)this.viewHooks[i].__disconnected();this.setContainerClasses("phx-disconnected")}}},{key:"hideLoader",value:function(){clearTimeout(this.loaderTimer),this.setContainerClasses("phx-connected")}},{key:"triggerReconnected",value:function(){for(var e in this.viewHooks)this.viewHooks[e].__reconnected()}},{key:"log",value:function(e,t){this.liveSocket.log(this,e,t)}},{key:"withinTargets",value:function(e,t){var i=this;if(e instanceof HTMLElement)return this.liveSocket.owner(e,(function(i){return t(i,e)}));if(/^(0|[1-9]\d*)$/.test(e)){var n=oe.findComponentNodeList(this.el,e);0===n.length?W("no component found matching phx-target of ".concat(e)):t(this,n[0])}else{var o=Array.from(document.querySelectorAll(e));0===o.length&&W('nothing found matching the phx-target selector "'.concat(e,'"')),o.forEach((function(e){return i.liveSocket.owner(e,(function(i){return t(i,e)}))}))}}},{key:"applyDiff",value:function(e,t,i){this.log(e,(function(){return["",$(t)]}));var n=te.extract(t),o=n.diff,r=n.reply,s=n.events,a=n.title;return a&&oe.putTitle(a),i({diff:o,reply:r,events:s}),r}},{key:"onJoin",value:function(e){var t=this,i=e.rendered;this.childJoins=0,this.joinPending=!0,this.flash=null,ne.dropLocal(this.liveSocket.localStorage,this.name(),"consecutive-reloads"),this.applyDiff("mount",i,(function(i){var n=i.diff,o=i.events;t.rendered=new te(t.id,n);var r=t.renderContainer(null,"join");t.dropPendingRefs();var s=t.formsForRecovery(r);t.joinCount++,s.length>0?s.forEach((function(e,i){t.pushFormRecovery(e,(function(e){i===s.length-1&&t.onJoinComplete(e,r,o)}))})):t.onJoinComplete(e,r,o)}))}},{key:"dropPendingRefs",value:function(){oe.all(this.el,"[".concat(T,"]"),(function(e){return e.removeAttribute(T)}))}},{key:"onJoinComplete",value:function(e,t,i){var n=this,o=e.live_patch;if(this.joinCount>1||this.parent&&!this.parent.isJoinPending())return this.applyJoinPatch(o,t,i);0===oe.findPhxChildrenInFragment(t,this.id).filter((function(e){var t=e.id&&n.el.querySelector("#".concat(e.id)),i=t&&t.getAttribute("data-phx-static");return i&&e.setAttribute("data-phx-static",i),n.joinChild(e)})).length?this.parent?(this.root.pendingJoinOps.push([this,function(){return n.applyJoinPatch(o,t,i)}]),this.parent.ackJoin(this)):(this.onAllChildJoinsComplete(),this.applyJoinPatch(o,t,i)):this.root.pendingJoinOps.push([this,function(){return n.applyJoinPatch(o,t,i)}])}},{key:"attachTrueDocEl",value:function(){this.el=oe.byId(this.id),this.el.setAttribute("data-phx-root-id",this.root.id)}},{key:"dispatchEvents",value:function(e){e.forEach((function(e){var t=y(e,2),i=t[0],n=t[1];window.dispatchEvent(new CustomEvent("phx:hook:".concat(i),{detail:n}))}))}},{key:"applyJoinPatch",value:function(e,t,i){var n=this;this.attachTrueDocEl();var o=new se(this,this.el,this.id,t,null);if(o.markPrunableContentForRemoval(),this.performPatch(o,!1),this.joinNewChildren(),oe.all(this.el,"[".concat(this.binding("hook"),"], [data-phx-").concat("hook","]"),(function(e){var t=n.addHook(e);t&&t.__mounted()})),this.joinPending=!1,this.dispatchEvents(i),this.applyPendingUpdates(),e){var r=e.kind,s=e.to;this.liveSocket.historyPatch(s,r)}this.hideLoader(),this.joinCount>1&&this.triggerReconnected(),this.stopCallback()}},{key:"triggerBeforeUpdateHook",value:function(e,t){this.liveSocket.triggerDOM("onBeforeElUpdated",[e,t]);var i=this.getHook(e),n=i&&oe.isIgnored(e,this.binding("update"));if(i&&!e.isEqualNode(t)&&(!n||!function(e,t){return JSON.stringify(e)===JSON.stringify(t)}(e.dataset,t.dataset)))return i.__beforeUpdate(),i}},{key:"performPatch",value:function(e,t){var i=this,n=[],o=!1,r=new Set;return e.after("added",(function(e){i.liveSocket.triggerDOM("onNodeAdded",[e]);var t=i.addHook(e);t&&t.__mounted()})),e.after("phxChildAdded",(function(e){return o=!0})),e.before("updated",(function(e,t){i.triggerBeforeUpdateHook(e,t)&&r.add(e.id)})),e.after("updated",(function(e){r.has(e.id)&&i.getHook(e).__updated()})),e.after("discarded",(function(e){var t=i.componentID(e);"number"==typeof t&&-1===n.indexOf(t)&&n.push(t);var o=i.getHook(e);o&&i.destroyHook(o)})),e.perform(),t&&this.maybePushComponentsDestroyed(n),o}},{key:"joinNewChildren",value:function(){var e=this;oe.findPhxChildren(this.el,this.id).forEach((function(t){return e.joinChild(t)}))}},{key:"getChildById",value:function(e){return this.root.children[this.id][e]}},{key:"getDescendentByEl",value:function(e){return e.id===this.id?this:this.children[e.getAttribute("data-phx-parent-id")][e.id]}},{key:"destroyDescendent",value:function(e){for(var t in this.root.children)for(var i in this.root.children[t])if(i===e)return this.root.children[t][i].destroy()}},{key:"joinChild",value:function(t){if(!this.getChildById(t.id)){var i=new e(t,this.liveSocket,this);return this.root.children[this.id][i.id]=i,i.join(),this.childJoins++,!0}}},{key:"isJoinPending",value:function(){return this.joinPending}},{key:"ackJoin",value:function(e){this.childJoins--,0===this.childJoins&&(this.parent?this.parent.ackJoin(this):this.onAllChildJoinsComplete())}},{key:"onAllChildJoinsComplete",value:function(){this.joinCallback(),this.pendingJoinOps.forEach((function(e){var t=y(e,2),i=t[0],n=t[1];i.isDestroyed()||n()})),this.pendingJoinOps=[]}},{key:"update",value:function(e,t){var i=this;if(this.isJoinPending()||this.liveSocket.hasPendingLink())return this.pendingDiffs.push({diff:e,events:t});this.rendered.mergeDiff(e);var n=!1;this.rendered.isComponentOnlyDiff(e)?this.liveSocket.time("component patch complete",(function(){oe.findParentCIDs(i.el,i.rendered.componentCIDs(e)).forEach((function(t){i.componentPatch(i.rendered.getComponent(e,t),t)&&(n=!0)}))})):q(e)||this.liveSocket.time("full patch complete",(function(){var t=i.renderContainer(e,"update"),o=new se(i,i.el,i.id,t,null);n=i.performPatch(o,!0)})),this.dispatchEvents(t),n&&this.joinNewChildren()}},{key:"renderContainer",value:function(e,t){var i=this;return this.liveSocket.time("toString diff (".concat(t,")"),(function(){var t=i.el.tagName,n=e?i.rendered.componentCIDs(e).concat(i.pruningCIDs):null,o=i.rendered.toString(n);return"<".concat(t,">").concat(o,"")}))}},{key:"componentPatch",value:function(e,t){if(q(e))return!1;var i=this.rendered.componentToString(t),n=new se(this,this.el,this.id,i,t);return this.performPatch(n,!0)}},{key:"getHook",value:function(e){return this.viewHooks[ce.elementID(e)]}},{key:"addHook",value:function(e){if(!ce.elementID(e)&&e.getAttribute){var t=e.getAttribute("data-phx-".concat("hook"))||e.getAttribute(this.binding("hook"));if(!t||this.ownsElement(e)){var i=this.liveSocket.getHookCallbacks(t);if(i){e.id||W('no DOM ID for hook "'.concat(t,'". Hooks require a unique ID on each element.'),e);var n=new ce(this,e,i);return this.viewHooks[ce.elementID(n.el)]=n,n}null!==t&&W('unknown hook found for "'.concat(t,'"'),e)}}}},{key:"destroyHook",value:function(e){e.__destroyed(),e.__cleanup__(),delete this.viewHooks[ce.elementID(e.el)]}},{key:"applyPendingUpdates",value:function(){var e=this;this.pendingDiffs.forEach((function(t){var i=t.diff,n=t.events;return e.update(i,n)})),this.pendingDiffs=[]}},{key:"onChannel",value:function(e,t){var i=this;this.liveSocket.onChannel(this.channel,e,(function(e){i.isJoinPending()?i.root.pendingJoinOps.push([i,function(){return t(e)}]):t(e)}))}},{key:"bindChannel",value:function(){var e=this;this.liveSocket.onChannel(this.channel,"diff",(function(t){e.applyDiff("update",t,(function(t){var i=t.diff,n=t.events;return e.update(i,n)}))})),this.onChannel("redirect",(function(t){var i=t.to,n=t.flash;return e.onRedirect({to:i,flash:n})})),this.onChannel("live_patch",(function(t){return e.onLivePatch(t)})),this.onChannel("live_redirect",(function(t){return e.onLiveRedirect(t)})),this.channel.onError((function(t){return e.onError(t)})),this.channel.onClose((function(t){return e.onClose(t)}))}},{key:"destroyAllChildren",value:function(){for(var e in this.root.children[this.id])this.getChildById(e).destroy()}},{key:"onLiveRedirect",value:function(e){var t=e.to,i=e.kind,n=e.flash,o=this.expandURL(t);this.liveSocket.historyRedirect(o,i,n)}},{key:"onLivePatch",value:function(e){var t=e.to,i=e.kind;this.href=this.expandURL(t),this.liveSocket.historyPatch(t,i)}},{key:"expandURL",value:function(e){return e.startsWith("/")?"".concat(window.location.protocol,"//").concat(window.location.host).concat(e):e}},{key:"onRedirect",value:function(e){var t=e.to,i=e.flash;this.liveSocket.redirect(t,i)}},{key:"isDestroyed",value:function(){return this.destroyed}},{key:"join",value:function(e){var t=this;this.parent||(this.stopCallback=this.liveSocket.withPageLoading({to:this.href,kind:"initial"})),this.joinCallback=function(){return e&&e(t,t.joinCount)},this.liveSocket.wrapPush(this,{timeout:!1},(function(){return t.channel.join().receive("ok",(function(e){return t.onJoin(e)})).receive("error",(function(e){return t.onJoinError(e)})).receive("timeout",(function(){return t.onJoinError({reason:"timeout"})}))}))}},{key:"onJoinError",value:function(e){return(e.redirect||e.live_redirect)&&(this.joinPending=!1,this.channel.leave()),e.redirect?this.onRedirect(e.redirect):e.live_redirect?this.onLiveRedirect(e.live_redirect):(this.log("error",(function(){return["unable to join",e]})),this.liveSocket.reloadWithJitter(this))}},{key:"onClose",value:function(e){if(!this.isDestroyed()){if(this.isJoinPending()&&"hidden"!==document.visibilityState||this.liveSocket.hasPendingLink()&&"leave"!==e)return this.liveSocket.reloadWithJitter(this);this.destroyAllChildren(),this.liveSocket.dropActiveElement(this),document.activeElement&&document.activeElement.blur(),this.liveSocket.isUnloaded()&&this.showLoader(200)}}},{key:"onError",value:function(e){this.onClose(e),this.log("error",(function(){return["view crashed",e]})),this.liveSocket.isUnloaded()||this.displayError()}},{key:"displayError",value:function(){this.isMain()&&oe.dispatchEvent(window,"phx:page-loading-start",{to:this.href,kind:"error"}),this.showLoader(),this.setContainerClasses("phx-disconnected","phx-error")}},{key:"pushWithReply",value:function(e,t,i){var n=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){};if(this.isConnected()){var r=y(e?e():[null,[]],2),s=r[0],a=y(r[1],1)[0],l=function(){};return a&&null!==a.getAttribute(this.binding("page-loading"))&&(l=this.liveSocket.withPageLoading({kind:"element",target:a})),"number"!=typeof i.cid&&delete i.cid,this.liveSocket.wrapPush(this,{timeout:!0},(function(){return n.channel.push(t,i,3e4).receive("ok",(function(e){var t=null;null!==s&&n.undoRefs(s),e.diff&&(t=n.applyDiff("update",e.diff,(function(e){var t=e.diff,i=e.events;n.update(t,i)}))),e.redirect&&n.onRedirect(e.redirect),e.live_patch&&n.onLivePatch(e.live_patch),e.live_redirect&&n.onLiveRedirect(e.live_redirect),l(),o(e,t)}))}))}}},{key:"undoRefs",value:function(e){var t=this;oe.all(this.el,"[".concat(T,'="').concat(e,'"]'),(function(e){e.removeAttribute(T),null!==e.getAttribute("data-phx-readonly")&&(e.readOnly=!1,e.removeAttribute("data-phx-readonly")),null!==e.getAttribute("data-phx-disabled")&&(e.disabled=!1,e.removeAttribute("data-phx-disabled")),M.forEach((function(t){return oe.removeClass(e,t)}));var i=e.getAttribute("data-phx-disable-with-restore");null!==i&&(e.innerText=i,e.removeAttribute("data-phx-disable-with-restore"));var n=oe.private(e,T);if(n){var o=t.triggerBeforeUpdateHook(e,n);se.patchEl(e,n,t.liveSocket.getActiveElement()),o&&o.__updated(),oe.deletePrivate(e,T)}}))}},{key:"putRef",value:function(e,t){var i=this.ref++,n=this.binding("disable-with");return e.forEach((function(e){e.classList.add("phx-".concat(t,"-loading")),e.setAttribute(T,i);var o=e.getAttribute(n);null!==o&&(e.getAttribute("data-phx-disable-with-restore")||e.setAttribute("data-phx-disable-with-restore",e.innerText),e.innerText=o)})),[i,e]}},{key:"componentID",value:function(e){var t=e.getAttribute&&e.getAttribute(I);return t?parseInt(t):null}},{key:"targetComponentID",value:function(e,t){return e.getAttribute(this.binding("target"))?this.closestComponentID(t):null}},{key:"closestComponentID",value:function(e){var t=this;return e?K(e.closest("[".concat(I,"]")),(function(e){return t.ownsElement(e)&&t.componentID(e)})):null}},{key:"pushHookEvent",value:function(e,t,i,n){if(!this.isConnected())return this.log("hook",(function(){return["unable to push hook event. LiveView not connected",t,i]})),!1;var o=y(this.putRef([],"hook"),2),r=o[0],s=o[1];return this.pushWithReply((function(){return[r,s]}),"event",{type:"hook",event:t,value:i,cid:this.closestComponentID(e)},(function(e,t){return n(t,r)})),r}},{key:"extractMeta",value:function(e,t){for(var i=this.binding("value-"),n=0;n=0&&!e.checked&&delete t.value),t}},{key:"pushEvent",value:function(e,t,i,n,o){var r=this;this.pushWithReply((function(){return r.putRef([t],e)}),"event",{type:e,event:n,value:this.extractMeta(t,o),cid:this.targetComponentID(t,i)})}},{key:"pushKey",value:function(e,t,i,n,o){var r=this;this.pushWithReply((function(){return r.putRef([e],i)}),"event",{type:i,event:n,value:this.extractMeta(e,o),cid:this.targetComponentID(e,t)})}},{key:"pushFileProgress",value:function(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){};this.liveSocket.withinOwners(e.form,(function(o,r){o.pushWithReply(null,"progress",{event:e.getAttribute(o.binding("progress")),ref:e.getAttribute(R),entry_ref:t,progress:i,cid:o.targetComponentID(e.form,r)},n)}))}},{key:"pushInput",value:function(e,t,i,n,o){var r=this,s=this.targetComponentID(e.form,t),a=function(){return r.putRef([e,e.form],"change")},l=ee(e.form,{_target:n.name});e.files&&e.files.length>0&&X.trackFiles(e,Array.from(e.files));var c={type:"form",event:i,value:l,uploads:X.serializeUploads(e),cid:s};this.pushWithReply(a,"event",c,(function(i){if(oe.showError(e,r.liveSocket.binding("feedback-for")),oe.isUploadInput(e)&&null!==e.getAttribute("data-phx-auto-upload")){if(X.filesAwaitingPreflight(e).length>0){var n=y(a(),2),l=n[0];n[1],r.uploadFiles(e.form,t,l,s,(function(t){o&&o(i),r.triggerAwaitingSubmit(e.form)}))}}else o&&o(i)}))}},{key:"triggerAwaitingSubmit",value:function(e){var t=this.getScheduledSubmit(e);if(t){var i=y(t,3),n=(i[0],i[1],i[2]);this.cancelSubmit(e),n()}}},{key:"getScheduledSubmit",value:function(e){return this.formSubmits.find((function(t){var i=y(t,2),n=i[0];return i[1],n.isSameNode(e)}))}},{key:"scheduleSubmit",value:function(e,t,i){if(this.getScheduledSubmit(e))return!0;this.formSubmits.push([e,t,i])}},{key:"cancelSubmit",value:function(e){var t=this;this.formSubmits=this.formSubmits.filter((function(i){var n=y(i,3),o=n[0],r=n[1];return n[2],!o.isSameNode(e)||(t.undoRefs(r),!1)}))}},{key:"pushFormSubmit",value:function(e,t,i,n){var o=this,r=function(e){return!(U(e,"".concat(o.binding("update"),"=ignore"),e.form)||U(e,"data-phx-update=ignore",e.form))},s=function(e){return e.hasAttribute(o.binding("disable-with"))},a=function(e){return"BUTTON"==e.tagName},l=function(e){return["INPUT","TEXTAREA","SELECT"].includes(e.tagName)},c=function(){var t=Array.from(e.elements),i=t.filter(s),n=t.filter(a).filter(r),c=t.filter(l).filter(r);return n.forEach((function(e){e.setAttribute("data-phx-disabled",e.disabled),e.disabled=!0})),c.forEach((function(e){e.setAttribute("data-phx-readonly",e.readOnly),e.readOnly=!0,e.files&&(e.setAttribute("data-phx-disabled",e.disabled),e.disabled=!0)})),e.setAttribute(o.binding("page-loading"),""),o.putRef([e].concat(i).concat(n).concat(c),"submit")},u=this.targetComponentID(e,t);if(X.hasUploadsInProgress(e)){var h=y(c(),2),d=h[0];return h[1],this.scheduleSubmit(e,d,(function(){return o.pushFormSubmit(e,t,i,n)}))}if(X.inputsAwaitingPreflight(e).length>0){var g=y(c(),2),f=g[0],p=g[1],m=function(){return[f,p]};this.uploadFiles(e,t,f,u,(function(t){var r=ee(e,{});o.pushWithReply(m,"event",{type:"form",event:i,value:r,cid:u},n)}))}else{var _=ee(e);this.pushWithReply(c,"event",{type:"form",event:i,value:_,cid:u},n)}}},{key:"uploadFiles",value:function(e,t,i,n,o){var r=this,s=this.joinCount;X.activeFileInputs(e).forEach((function(e){var n=new X(e,r,o);r.uploaders[e]=n;var a=n.entries().map((function(e){return e.toPreflightPayload()})),l={ref:e.getAttribute(R),entries:a,cid:r.targetComponentID(e.form,t)};r.log("upload",(function(){return["sending preflight request",l]})),r.pushWithReply(null,"allow_upload",l,(function(e){if(r.log("upload",(function(){return["got preflight response",e]})),e.error){r.undoRefs(i);var t=y(e.error,2),o=t[0],a=t[1];r.log("upload",(function(){return["error for entry ".concat(o),a]}))}else n.initAdapterUpload(e,(function(e){r.channel.onError((function(){r.joinCount===s&&e()}))}),r.liveSocket)}))}))}},{key:"pushFormRecovery",value:function(e,t){var i=this;this.liveSocket.withinOwners(e,(function(n,o){var r=e.elements[0],s=e.getAttribute(i.binding("auto-recover"))||e.getAttribute(i.binding("change"));n.pushInput(r,o,s,r,t)}))}},{key:"pushLinkPatch",value:function(e,t,i){var n=this,o=this.liveSocket.setPendingLink(e),r=t?function(){return n.putRef([t],"click")}:null;this.pushWithReply(r,"link",{url:e},(function(t){t.link_redirect?n.liveSocket.replaceMain(e,null,i,o):(n.liveSocket.commitPendingLink(o)&&(n.href=e),n.applyPendingUpdates(),i&&i(o))})).receive("timeout",(function(){return n.liveSocket.redirect(window.location.href)}))}},{key:"formsForRecovery",value:function(e){var t=this;if(0===this.joinCount)return[];var i=this.binding("change"),n=document.createElement("template");return n.innerHTML=e,oe.all(this.el,"form[".concat(i,"]")).filter((function(e){return t.ownsElement(e)})).filter((function(e){return e.elements.length>0})).filter((function(e){return"ignore"!==e.getAttribute(t.binding("auto-recover"))})).filter((function(e){return n.content.querySelector("form[".concat(i,'="').concat(e.getAttribute(i),'"]'))}))}},{key:"maybePushComponentsDestroyed",value:function(e){var t,i=this,n=e.filter((function(e){return 0===oe.findComponentNodeList(i.el,e).length}));n.length>0&&((t=this.pruningCIDs).push.apply(t,p(n)),this.pushWithReply(null,"cids_will_destroy",{cids:n},(function(){i.pruningCIDs=i.pruningCIDs.filter((function(e){return-1!==n.indexOf(e)}));var e=n.filter((function(e){return 0===oe.findComponentNodeList(i.el,e).length}));e.length>0&&i.pushWithReply(null,"cids_destroyed",{cids:e},(function(e){i.rendered.pruneCIDs(e.cids)}))})))}},{key:"ownsElement",value:function(e){return e.getAttribute("data-phx-parent-id")===this.id||K(e.closest(O),(function(e){return e.id}))===this.id}},{key:"submitForm",value:function(e,t,i){var n=this;oe.putPrivate(e,"phx-has-submitted",!0),this.liveSocket.blurActiveElement(this),this.pushFormSubmit(e,t,i,(function(){n.liveSocket.restorePreviouslyActiveFocus()}))}},{key:"binding",value:function(e){return this.liveSocket.binding(e)}}]),e}(),le=1,ce=function(){function e(t,i,n){for(var o in k(this,e),this.__view=t,this.__liveSocket=t.liveSocket,this.__callbacks=n,this.__listeners=new Set,this.__isDisconnected=!1,this.el=i,this.viewName=t.name(),this.el.phxHookId=this.constructor.makeID(),this.__callbacks)this[o]=this.__callbacks[o]}return L(e,null,[{key:"makeID",value:function(){return le++}},{key:"elementID",value:function(e){return e.phxHookId}}]),L(e,[{key:"__mounted",value:function(){this.mounted&&this.mounted()}},{key:"__updated",value:function(){this.updated&&this.updated()}},{key:"__beforeUpdate",value:function(){this.beforeUpdate&&this.beforeUpdate()}},{key:"__destroyed",value:function(){this.destroyed&&this.destroyed()}},{key:"__reconnected",value:function(){this.__isDisconnected&&(this.__isDisconnected=!1,this.reconnected&&this.reconnected())}},{key:"__disconnected",value:function(){this.__isDisconnected=!0,this.disconnected&&this.disconnected()}},{key:"pushEvent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){};return this.__view.pushHookEvent(null,e,t,i)}},{key:"pushEventTo",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){};return this.__view.withinTargets(e,(function(e,o){return e.pushHookEvent(o,t,i,n)}))}},{key:"handleEvent",value:function(e,t){var i=function(i,n){return n?e:t(i.detail)};return window.addEventListener("phx:hook:".concat(e),i),this.__listeners.add(i),i}},{key:"removeHandleEvent",value:function(e){var t=e(null,!0);window.removeEventListener("phx:hook:".concat(t),e),this.__listeners.delete(e)}},{key:"__cleanup__",value:function(){var e=this;this.__listeners.forEach((function(t){return e.removeHandleEvent(t)}))}}]),e}();t.default=ie},function(e,t){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t,i){(function(t){t.Phoenix||(t.Phoenix={}),e.exports=t.Phoenix.LiveView=i(0)}).call(this,i(1))}])},6313:e=>{var t=function(){"use strict";function e(e,t){return null!=t&&e instanceof t}var t,i,n;try{t=Map}catch(e){t=function(){}}try{i=Set}catch(e){i=function(){}}try{n=Promise}catch(e){n=function(){}}function o(r,a,l,c,u){"object"==typeof a&&(l=a.depth,c=a.prototype,u=a.includeNonEnumerable,a=a.circular);var h=[],d=[],g="undefined"!=typeof Buffer;return void 0===a&&(a=!0),void 0===l&&(l=1/0),function r(l,f){if(null===l)return null;if(0===f)return l;var p,m;if("object"!=typeof l)return l;if(e(l,t))p=new t;else if(e(l,i))p=new i;else if(e(l,n))p=new n((function(e,t){l.then((function(t){e(r(t,f-1))}),(function(e){t(r(e,f-1))}))}));else if(o.__isArray(l))p=[];else if(o.__isRegExp(l))p=new RegExp(l.source,s(l)),l.lastIndex&&(p.lastIndex=l.lastIndex);else if(o.__isDate(l))p=new Date(l.getTime());else{if(g&&Buffer.isBuffer(l))return p=Buffer.allocUnsafe?Buffer.allocUnsafe(l.length):new Buffer(l.length),l.copy(p),p;e(l,Error)?p=Object.create(l):void 0===c?(m=Object.getPrototypeOf(l),p=Object.create(m)):(p=Object.create(c),m=c)}if(a){var _=h.indexOf(l);if(-1!=_)return d[_];h.push(l),d.push(p)}for(var v in e(l,t)&&l.forEach((function(e,t){var i=r(t,f-1),n=r(e,f-1);p.set(i,n)})),e(l,i)&&l.forEach((function(e){var t=r(e,f-1);p.add(t)})),l){var b;m&&(b=Object.getOwnPropertyDescriptor(m,v)),b&&null==b.set||(p[v]=r(l[v],f-1))}if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(l);for(v=0;v>>2]>>>24-r%4*8&255;t[n+r>>>2]|=s<<24-(n+r)%4*8}else for(r=0;r>>2]=i[r>>>2];return this.sigBytes+=o,this},clamp:function(){var t=this.words,i=this.sigBytes;t[i>>>2]&=4294967295<<32-i%4*8,t.length=e.ceil(i/4)},clone:function(){var e=l.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],i=0;i>>2]>>>24-o%4*8&255;n.push((r>>>4).toString(16)),n.push((15&r).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,i=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new c.init(i,t/2)}},d=u.Latin1={stringify:function(e){for(var t=e.words,i=e.sigBytes,n=[],o=0;o>>2]>>>24-o%4*8&255;n.push(String.fromCharCode(r))}return n.join("")},parse:function(e){for(var t=e.length,i=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new c.init(i,t)}},g=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(d.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return d.parse(unescape(encodeURIComponent(e)))}},f=a.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=g.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var i,n=this._data,o=n.words,r=n.sigBytes,s=this.blockSize,a=r/(4*s),l=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,u=e.min(4*l,r);if(l){for(var h=0;h>>2]>>>24-r%4*8&255)<<16|(t[r+1>>>2]>>>24-(r+1)%4*8&255)<<8|t[r+2>>>2]>>>24-(r+2)%4*8&255,a=0;a<4&&r+.75*a>>6*(3-a)&63));var l=n.charAt(64);if(l)for(;o.length%4;)o.push(l);return o.join("")},parse:function(e){var t=e.length,i=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var o=0;o>>6-s%4*2;n[o>>>2]|=a<<24-o%4*8,o++}return r.create(n,o)}(e,t,n)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},n.enc.Base64)},8214:function(e,t,i){var n;e.exports=(n=i(8249),function(e){var t=n,i=t.lib,o=i.WordArray,r=i.Hasher,s=t.algo,a=[];!function(){for(var t=0;t<64;t++)a[t]=4294967296*e.abs(e.sin(t+1))|0}();var l=s.MD5=r.extend({_doReset:function(){this._hash=new o.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var i=0;i<16;i++){var n=t+i,o=e[n];e[n]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8)}var r=this._hash.words,s=e[t+0],l=e[t+1],g=e[t+2],f=e[t+3],p=e[t+4],m=e[t+5],_=e[t+6],v=e[t+7],b=e[t+8],y=e[t+9],w=e[t+10],C=e[t+11],S=e[t+12],x=e[t+13],k=e[t+14],D=e[t+15],L=r[0],N=r[1],E=r[2],A=r[3];L=c(L,N,E,A,s,7,a[0]),A=c(A,L,N,E,l,12,a[1]),E=c(E,A,L,N,g,17,a[2]),N=c(N,E,A,L,f,22,a[3]),L=c(L,N,E,A,p,7,a[4]),A=c(A,L,N,E,m,12,a[5]),E=c(E,A,L,N,_,17,a[6]),N=c(N,E,A,L,v,22,a[7]),L=c(L,N,E,A,b,7,a[8]),A=c(A,L,N,E,y,12,a[9]),E=c(E,A,L,N,w,17,a[10]),N=c(N,E,A,L,C,22,a[11]),L=c(L,N,E,A,S,7,a[12]),A=c(A,L,N,E,x,12,a[13]),E=c(E,A,L,N,k,17,a[14]),L=u(L,N=c(N,E,A,L,D,22,a[15]),E,A,l,5,a[16]),A=u(A,L,N,E,_,9,a[17]),E=u(E,A,L,N,C,14,a[18]),N=u(N,E,A,L,s,20,a[19]),L=u(L,N,E,A,m,5,a[20]),A=u(A,L,N,E,w,9,a[21]),E=u(E,A,L,N,D,14,a[22]),N=u(N,E,A,L,p,20,a[23]),L=u(L,N,E,A,y,5,a[24]),A=u(A,L,N,E,k,9,a[25]),E=u(E,A,L,N,f,14,a[26]),N=u(N,E,A,L,b,20,a[27]),L=u(L,N,E,A,x,5,a[28]),A=u(A,L,N,E,g,9,a[29]),E=u(E,A,L,N,v,14,a[30]),L=h(L,N=u(N,E,A,L,S,20,a[31]),E,A,m,4,a[32]),A=h(A,L,N,E,b,11,a[33]),E=h(E,A,L,N,C,16,a[34]),N=h(N,E,A,L,k,23,a[35]),L=h(L,N,E,A,l,4,a[36]),A=h(A,L,N,E,p,11,a[37]),E=h(E,A,L,N,v,16,a[38]),N=h(N,E,A,L,w,23,a[39]),L=h(L,N,E,A,x,4,a[40]),A=h(A,L,N,E,s,11,a[41]),E=h(E,A,L,N,f,16,a[42]),N=h(N,E,A,L,_,23,a[43]),L=h(L,N,E,A,y,4,a[44]),A=h(A,L,N,E,S,11,a[45]),E=h(E,A,L,N,D,16,a[46]),L=d(L,N=h(N,E,A,L,g,23,a[47]),E,A,s,6,a[48]),A=d(A,L,N,E,v,10,a[49]),E=d(E,A,L,N,k,15,a[50]),N=d(N,E,A,L,m,21,a[51]),L=d(L,N,E,A,S,6,a[52]),A=d(A,L,N,E,f,10,a[53]),E=d(E,A,L,N,w,15,a[54]),N=d(N,E,A,L,l,21,a[55]),L=d(L,N,E,A,b,6,a[56]),A=d(A,L,N,E,D,10,a[57]),E=d(E,A,L,N,_,15,a[58]),N=d(N,E,A,L,x,21,a[59]),L=d(L,N,E,A,p,6,a[60]),A=d(A,L,N,E,C,10,a[61]),E=d(E,A,L,N,g,15,a[62]),N=d(N,E,A,L,y,21,a[63]),r[0]=r[0]+L|0,r[1]=r[1]+N|0,r[2]=r[2]+E|0,r[3]=r[3]+A|0},_doFinalize:function(){var t=this._data,i=t.words,n=8*this._nDataBytes,o=8*t.sigBytes;i[o>>>5]|=128<<24-o%32;var r=e.floor(n/4294967296),s=n;i[15+(o+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),i[14+(o+64>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),t.sigBytes=4*(i.length+1),this._process();for(var a=this._hash,l=a.words,c=0;c<4;c++){var u=l[c];l[c]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}return a},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});function c(e,t,i,n,o,r,s){var a=e+(t&i|~t&n)+o+s;return(a<>>32-r)+t}function u(e,t,i,n,o,r,s){var a=e+(t&n|i&~n)+o+s;return(a<>>32-r)+t}function h(e,t,i,n,o,r,s){var a=e+(t^i^n)+o+s;return(a<>>32-r)+t}function d(e,t,i,n,o,r,s){var a=e+(i^(t|~n))+o+s;return(a<>>32-r)+t}t.MD5=r._createHelper(l),t.HmacMD5=r._createHmacHelper(l)}(Math),n.MD5)},7856:function(e){e.exports=function(){"use strict";var e=Object.hasOwnProperty,t=Object.setPrototypeOf,i=Object.isFrozen,n=Object.getPrototypeOf,o=Object.getOwnPropertyDescriptor,r=Object.freeze,s=Object.seal,a=Object.create,l="undefined"!=typeof Reflect&&Reflect,c=l.apply,u=l.construct;c||(c=function(e,t,i){return e.apply(t,i)}),r||(r=function(e){return e}),s||(s=function(e){return e}),u||(u=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t1?i-1:0),o=1;o/gm),z=s(/^data-[\-\w.\u00B7-\uFFFF]/),W=s(/^aria-[\-\w]+$/),V=s(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H=s(/^(?:\w+script|data):/i),$=s(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function j(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:q(),i=function(t){return e(t)};if(i.version="2.2.6",i.removed=[],!t||!t.document||9!==t.document.nodeType)return i.isSupported=!1,i;var n=t.document,o=t.document,s=t.DocumentFragment,a=t.HTMLTemplateElement,l=t.Node,c=t.Element,u=t.NodeFilter,h=t.NamedNodeMap,C=void 0===h?t.NamedNodeMap||t.MozNamedAttrMap:h,G=t.Text,Y=t.Comment,Z=t.DOMParser,X=t.trustedTypes,Q=c.prototype,J=k(Q,"cloneNode"),ee=k(Q,"nextSibling"),te=k(Q,"childNodes"),ie=k(Q,"parentNode");if("function"==typeof a){var ne=o.createElement("template");ne.content&&ne.content.ownerDocument&&(o=ne.content.ownerDocument)}var oe=K(X,n),re=oe&&Pe?oe.createHTML(""):"",se=o,ae=se.implementation,le=se.createNodeIterator,ce=se.getElementsByTagName,ue=se.createDocumentFragment,he=n.importNode,de={};try{de=x(o).documentMode?o.documentMode:{}}catch(e){}var ge={};i.isSupported=ae&&void 0!==ae.createHTMLDocument&&9!==de;var fe=P,pe=B,me=z,_e=W,ve=H,be=$,ye=V,we=null,Ce=S({},[].concat(j(D),j(L),j(N),j(A),j(I))),Se=null,xe=S({},[].concat(j(T),j(R),j(O),j(F))),ke=null,De=null,Le=!0,Ne=!0,Ee=!1,Ae=!1,Me=!1,Ie=!1,Te=!1,Re=!1,Oe=!1,Fe=!0,Pe=!1,Be=!0,ze=!0,We=!1,Ve={},He=S({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),$e=null,Ue=S({},["audio","video","img","source","image","track"]),je=null,qe=S({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),Ke=null,Ge=o.createElement("form"),Ye=function(e){Ke&&Ke===e||(e&&"object"===(void 0===e?"undefined":U(e))||(e={}),e=x(e),we="ALLOWED_TAGS"in e?S({},e.ALLOWED_TAGS):Ce,Se="ALLOWED_ATTR"in e?S({},e.ALLOWED_ATTR):xe,je="ADD_URI_SAFE_ATTR"in e?S(x(qe),e.ADD_URI_SAFE_ATTR):qe,$e="ADD_DATA_URI_TAGS"in e?S(x(Ue),e.ADD_DATA_URI_TAGS):Ue,ke="FORBID_TAGS"in e?S({},e.FORBID_TAGS):{},De="FORBID_ATTR"in e?S({},e.FORBID_ATTR):{},Ve="USE_PROFILES"in e&&e.USE_PROFILES,Le=!1!==e.ALLOW_ARIA_ATTR,Ne=!1!==e.ALLOW_DATA_ATTR,Ee=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ae=e.SAFE_FOR_TEMPLATES||!1,Me=e.WHOLE_DOCUMENT||!1,Re=e.RETURN_DOM||!1,Oe=e.RETURN_DOM_FRAGMENT||!1,Fe=!1!==e.RETURN_DOM_IMPORT,Pe=e.RETURN_TRUSTED_TYPE||!1,Te=e.FORCE_BODY||!1,Be=!1!==e.SANITIZE_DOM,ze=!1!==e.KEEP_CONTENT,We=e.IN_PLACE||!1,ye=e.ALLOWED_URI_REGEXP||ye,Ae&&(Ne=!1),Oe&&(Re=!0),Ve&&(we=S({},[].concat(j(I))),Se=[],!0===Ve.html&&(S(we,D),S(Se,T)),!0===Ve.svg&&(S(we,L),S(Se,R),S(Se,F)),!0===Ve.svgFilters&&(S(we,N),S(Se,R),S(Se,F)),!0===Ve.mathMl&&(S(we,A),S(Se,O),S(Se,F))),e.ADD_TAGS&&(we===Ce&&(we=x(we)),S(we,e.ADD_TAGS)),e.ADD_ATTR&&(Se===xe&&(Se=x(Se)),S(Se,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&S(je,e.ADD_URI_SAFE_ATTR),ze&&(we["#text"]=!0),Me&&S(we,["html","head","body"]),we.table&&(S(we,["tbody"]),delete ke.tbody),r&&r(e),Ke=e)},Ze=S({},["mi","mo","mn","ms","mtext"]),Xe=S({},["foreignobject","desc","title","annotation-xml"]),Qe=S({},L);S(Qe,N),S(Qe,E);var Je=S({},A);S(Je,M);var et="http://www.w3.org/1998/Math/MathML",tt="http://www.w3.org/2000/svg",it="http://www.w3.org/1999/xhtml",nt=function(e){var t=ie(e);t&&t.tagName||(t={namespaceURI:it,tagName:"template"});var i=p(e.tagName),n=p(t.tagName);if(e.namespaceURI===tt)return t.namespaceURI===it?"svg"===i:t.namespaceURI===et?"svg"===i&&("annotation-xml"===n||Ze[n]):Boolean(Qe[i]);if(e.namespaceURI===et)return t.namespaceURI===it?"math"===i:t.namespaceURI===tt?"math"===i&&Xe[n]:Boolean(Je[i]);if(e.namespaceURI===it){if(t.namespaceURI===tt&&!Xe[n])return!1;if(t.namespaceURI===et&&!Ze[n])return!1;var o=S({},["title","style","font","a","script"]);return!Je[i]&&(o[i]||!Qe[i])}return!1},ot=function(e){f(i.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=re}catch(t){e.remove()}}},rt=function(e,t){try{f(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){f(i.removed,{attribute:null,from:t})}t.removeAttribute(e)},st=function(e){var t=void 0,i=void 0;if(Te)e=""+e;else{var n=m(e,/^[\r\n\t ]+/);i=n&&n[0]}var r=oe?oe.createHTML(e):e;try{t=(new Z).parseFromString(r,"text/html")}catch(e){}if(!t||!t.documentElement){var s=(t=ae.createHTMLDocument("")).body;s.parentNode.removeChild(s.parentNode.firstElementChild),s.outerHTML=r}return e&&i&&t.body.insertBefore(o.createTextNode(i),t.body.childNodes[0]||null),ce.call(t,Me?"html":"body")[0]},at=function(e){return le.call(e.ownerDocument||e,e,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT,(function(){return u.FILTER_ACCEPT}),!1)},lt=function(e){return!(e instanceof G||e instanceof Y||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof C&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore)},ct=function(e){return"object"===(void 0===l?"undefined":U(l))?e instanceof l:e&&"object"===(void 0===e?"undefined":U(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},ut=function(e,t,n){ge[e]&&d(ge[e],(function(e){e.call(i,t,n,Ke)}))},ht=function(e){var t=void 0;if(ut("beforeSanitizeElements",e,null),lt(e))return ot(e),!0;if(m(e.nodeName,/[\u0080-\uFFFF]/))return ot(e),!0;var n=p(e.nodeName);if(ut("uponSanitizeElement",e,{tagName:n,allowedTags:we}),!ct(e.firstElementChild)&&(!ct(e.content)||!ct(e.content.firstElementChild))&&y(/<[/\w]/g,e.innerHTML)&&y(/<[/\w]/g,e.textContent))return ot(e),!0;if(!we[n]||ke[n]){if(ze&&!He[n])for(var o=ie(e),r=te(e),s=r.length-1;s>=0;--s)o.insertBefore(J(r[s],!0),ee(e));return ot(e),!0}return e instanceof c&&!nt(e)?(ot(e),!0):"noscript"!==n&&"noembed"!==n||!y(/<\/no(script|embed)/i,e.innerHTML)?(Ae&&3===e.nodeType&&(t=e.textContent,t=_(t,fe," "),t=_(t,pe," "),e.textContent!==t&&(f(i.removed,{element:e.cloneNode()}),e.textContent=t)),ut("afterSanitizeElements",e,null),!1):(ot(e),!0)},dt=function(e,t,i){if(Be&&("id"===t||"name"===t)&&(i in o||i in Ge))return!1;if(Ne&&y(me,t));else if(Le&&y(_e,t));else{if(!Se[t]||De[t])return!1;if(je[t]);else if(y(ye,_(i,be,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==v(i,"data:")||!$e[e])if(Ee&&!y(ve,_(i,be,"")));else if(i)return!1}return!0},gt=function(e){var t=void 0,n=void 0,o=void 0,r=void 0;ut("beforeSanitizeAttributes",e,null);var s=e.attributes;if(s){var a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Se};for(r=s.length;r--;){var l=t=s[r],c=l.name,u=l.namespaceURI;if(n=b(t.value),o=p(c),a.attrName=o,a.attrValue=n,a.keepAttr=!0,a.forceKeepAttr=void 0,ut("uponSanitizeAttribute",e,a),n=a.attrValue,!a.forceKeepAttr&&(rt(c,e),a.keepAttr))if(y(/\/>/i,n))rt(c,e);else{Ae&&(n=_(n,fe," "),n=_(n,pe," "));var h=e.nodeName.toLowerCase();if(dt(h,o,n))try{u?e.setAttributeNS(u,c,n):e.setAttribute(c,n),g(i.removed)}catch(e){}}}ut("afterSanitizeAttributes",e,null)}},ft=function e(t){var i=void 0,n=at(t);for(ut("beforeSanitizeShadowDOM",t,null);i=n.nextNode();)ut("uponSanitizeShadowNode",i,null),ht(i)||(i.content instanceof s&&e(i.content),gt(i));ut("afterSanitizeShadowDOM",t,null)};return i.sanitize=function(e,o){var r=void 0,a=void 0,c=void 0,u=void 0,h=void 0;if(e||(e="\x3c!--\x3e"),"string"!=typeof e&&!ct(e)){if("function"!=typeof e.toString)throw w("toString is not a function");if("string"!=typeof(e=e.toString()))throw w("dirty is not a string, aborting")}if(!i.isSupported){if("object"===U(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(ct(e))return t.toStaticHTML(e.outerHTML)}return e}if(Ie||Ye(o),i.removed=[],"string"==typeof e&&(We=!1),We);else if(e instanceof l)1===(a=(r=st("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===a.nodeName||"HTML"===a.nodeName?r=a:r.appendChild(a);else{if(!Re&&!Ae&&!Me&&-1===e.indexOf("<"))return oe&&Pe?oe.createHTML(e):e;if(!(r=st(e)))return Re?null:re}r&&Te&&ot(r.firstChild);for(var d=at(We?e:r);c=d.nextNode();)3===c.nodeType&&c===u||ht(c)||(c.content instanceof s&&ft(c.content),gt(c),u=c);if(u=null,We)return e;if(Re){if(Oe)for(h=ue.call(r.ownerDocument);r.firstChild;)h.appendChild(r.firstChild);else h=r;return Fe&&(h=he.call(n,h,!0)),h}var g=Me?r.outerHTML:r.innerHTML;return Ae&&(g=_(g,fe," "),g=_(g,pe," ")),oe&&Pe?oe.createHTML(g):g},i.setConfig=function(e){Ye(e),Ie=!0},i.clearConfig=function(){Ke=null,Ie=!1},i.isValidAttribute=function(e,t,i){Ke||Ye({});var n=p(e),o=p(t);return dt(n,o,i)},i.addHook=function(e,t){"function"==typeof t&&(ge[e]=ge[e]||[],f(ge[e],t))},i.removeHook=function(e){ge[e]&&g(ge[e])},i.removeHooks=function(e){ge[e]&&(ge[e]=[])},i.removeAllHooks=function(){ge={}},i}()}()},4063:e=>{"use strict";e.exports=function e(t,i){if(t===i)return!0;if(t&&i&&"object"==typeof t&&"object"==typeof i){if(t.constructor!==i.constructor)return!1;var n,o,r;if(Array.isArray(t)){if((n=t.length)!=i.length)return!1;for(o=n;0!=o--;)if(!e(t[o],i[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===i.source&&t.flags===i.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===i.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===i.toString();if((n=(r=Object.keys(t)).length)!==Object.keys(i).length)return!1;for(o=n;0!=o--;)if(!Object.prototype.hasOwnProperty.call(i,r[o]))return!1;for(o=n;0!=o--;){var s=r[o];if(!e(t[s],i[s]))return!1}return!0}return t!=t&&i!=i}},5035:e=>{"use strict";e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var i,n="boolean"==typeof t.cycles&&t.cycles,o=t.cmp&&(i=t.cmp,function(e){return function(t,n){var o={key:t,value:e[t]},r={key:n,value:e[n]};return i(o,r)}}),r=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var i,s;if(Array.isArray(t)){for(s="[",i=0;i{e.exports=function e(t,i,n){function o(s,a){if(!i[s]){if(!t[s]){if(r)return r(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=i[s]={exports:{}};t[s][0].call(c.exports,(function(e){return o(t[s][1][e]||e)}),c,c.exports,e,t,i,n)}return i[s].exports}for(var r=void 0,s=0;sn._averageHeight){var s=n._renderChunk();n._lastRepaint=t,!1!==s&&"function"==typeof o.afterRender&&o.afterRender()}}}()}return n(e,null,[{key:"create",value:function(t,i){return new e(t,i)}},{key:"mergeStyle",value:function(e,t){for(var i in t)e.style[i]!==t[i]&&(e.style[i]=t[i])}},{key:"getMaxBrowserHeight",value:function(){var t=document.createElement("div"),i=document.createElement("div");e.mergeStyle(t,{position:"absolute",height:"1px",opacity:0}),e.mergeStyle(i,{height:"1e7px"}),t.appendChild(i),document.body.appendChild(t);var n=i.offsetHeight;return document.body.removeChild(t),n}}]),n(e,[{key:"destroy",value:function(){window.cancelAnimationFrame(this._renderAnimationFrame)}},{key:"refresh",value:function(t,i){var n;if(Object.assign(this._config,r,i),!t||1!==t.nodeType)throw new Error("HyperList requires a valid DOM Node container");this._element=t;var a=this._config,l=this._scroller||a.scroller||document.createElement(a.scrollerTagName||"tr");if("boolean"!=typeof a.useFragment&&(this._config.useFragment=!0),!a.generate)throw new Error("Missing required `generate` function");if(!s(a.total))throw new Error("Invalid required `total` value, expected number");if(!Array.isArray(a.itemHeight)&&!s(a.itemHeight))throw new Error("\n Invalid required `itemHeight` value, expected number or array\n ".trim());s(a.itemHeight)?this._itemHeights=Array(a.total).fill(a.itemHeight):this._itemHeights=a.itemHeight,Object.keys(r).filter((function(e){return e in a})).forEach((function(e){var t=a[e],i=s(t);if(t&&"string"!=typeof t&&"number"!=typeof t)throw new Error("Invalid optional `"+e+"`, expected string or number");i&&(a[e]=t+"px")}));var c=Boolean(a.horizontal),u=a[c?"width":"height"];if(u){var h=s(u),d=!h&&"%"===u.slice(-1),g=h?u:parseInt(u.replace(/px|%/,""),10),f=window[c?"innerWidth":"innerHeight"];this._containerSize=d?f*g/100:s(u)?u:g}var p=a.scrollContainer,m=a.itemHeight*a.total,_=this._maxElementHeight;m>_&&console.warn(["HyperList: The maximum element height",_+"px has","been exceeded; please reduce your item height."].join(" "));var v={width:""+a.width,height:p?m+"px":""+a.height,overflow:p?"none":"auto",position:"relative"};e.mergeStyle(t,v),p&&e.mergeStyle(a.scrollContainer,{overflow:"auto"});var b=(o(n={opacity:"0",position:"absolute"},c?"height":"width","1px"),o(n,c?"width":"height",m+"px"),n);e.mergeStyle(l,b),this._scroller||t.appendChild(l);var y=this._computeScrollPadding();this._scrollPaddingBottom=y.bottom,this._scrollPaddingTop=y.top,this._scroller=l,this._scrollHeight=this._computeScrollHeight(),this._itemPositions=this._itemPositions||Array(a.total).fill(0),this._computePositions(0),this._renderChunk(null!==this._lastRepaint),"function"==typeof a.afterRender&&a.afterRender()}},{key:"_getRow",value:function(t){var i=this._config,n=i.generate(t),r=n.height;if(void 0!==r&&s(r)?(n=n.element,r!==this._itemHeights[t]&&(this._itemHeights[t]=r,this._computePositions(t),this._scrollHeight=this._computeScrollHeight(t))):r=this._itemHeights[t],!n||1!==n.nodeType)throw new Error("Generator did not return a DOM Node for index: "+t);a(n,i.rowClassName||"vrow");var l=this._itemPositions[t]+this._scrollPaddingTop;return e.mergeStyle(n,o({position:"absolute"},i.horizontal?"left":"top",l+"px")),n}},{key:"_getScrollPosition",value:function(){var e=this._config;return"function"==typeof e.overrideScrollPosition?e.overrideScrollPosition():this._element[e.horizontal?"scrollLeft":"scrollTop"]}},{key:"_renderChunk",value:function(e){var t=this._config,i=this._element,n=this._getScrollPosition(),o=t.total,r=t.reverse?this._getReverseFrom(n):this._getFrom(n)-1;if((r<0||r-this._screenItemsLen<0)&&(r=0),!e&&this._lastFrom===r)return!1;this._lastFrom=r;var s=r+this._cachedItemsLen;(s>o||s+this._cachedItemsLen>o)&&(s=o);var a=t.useFragment?document.createDocumentFragment():[],l=this._scroller;a[t.useFragment?"appendChild":"push"](l);for(var c=r;c0&&void 0!==arguments[0]?arguments[0]:1,t=this._config,i=t.total,n=t.reverse;e<1&&!n&&(e=1);for(var o=e;o0&&this._itemPositions[t]{"use strict";var t=/("(?:[^\\"]|\\.)*")|[:,]/g;e.exports=function(e,i){var n,o,r;return i=i||{},n=JSON.stringify([1],void 0,void 0===i.indent?2:i.indent).slice(2,-3),o=""===n?1/0:void 0===i.maxLength?80:i.maxLength,r=i.replacer,function e(i,s,a){var l,c,u,h,d,g,f,p,m,_,v,b;if(i&&"function"==typeof i.toJSON&&(i=i.toJSON()),void 0===(v=JSON.stringify(i,r)))return v;if(f=o-s.length-a,v.length<=f&&(m=v.replace(t,(function(e,t){return t||e+" "}))).length<=f)return m;if(null!=r&&(i=JSON.parse(v),r=void 0),"object"==typeof i&&null!==i){if(p=s+n,u=[],c=0,Array.isArray(i))for(_="[",l="]",f=i.length;c0)return[_,n+u.join(",\n"+p),l].join("\n"+s)}return v}(e,"",0)}},527:function(e){var t;"undefined"!=typeof self&&self,t=function(){return function(){"use strict";var e={d:function(t,i){for(var n in i)e.o(i,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:i[n]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={};e.d(t,{default:function(){return Qn}});var i=function e(t,i){this.position=void 0;var n,o="KaTeX parse error: "+t,r=i&&i.loc;if(r&&r.start<=r.end){var s=r.lexer.input;n=r.start;var a=r.end;n===s.length?o+=" at end of input: ":o+=" at position "+(n+1)+": ";var l=s.slice(n,a).replace(/[^]/g,"$&̲");o+=(n>15?"…"+s.slice(n-15,n):s.slice(0,n))+l+(a+15":">","<":"<",'"':""","'":"'"},s=/[&><"']/g,a=function e(t){return"ordgroup"===t.type||"color"===t.type?1===t.body.length?e(t.body[0]):t:"font"===t.type?e(t.body):t},l=function(e,t){return-1!==e.indexOf(t)},c=function(e,t){return void 0===e?t:e},u=function(e){return String(e).replace(s,(function(e){return r[e]}))},h=function(e){return e.replace(o,"-$1").toLowerCase()},d=a,g=function(e){var t=a(e);return"mathord"===t.type||"textord"===t.type||"atom"===t.type},f=function(e){var t=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(e);return null!=t?t[1]:"_relative"},p=function(){function e(e){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e=e||{},this.displayMode=c(e.displayMode,!1),this.output=c(e.output,"htmlAndMathml"),this.leqno=c(e.leqno,!1),this.fleqn=c(e.fleqn,!1),this.throwOnError=c(e.throwOnError,!0),this.errorColor=c(e.errorColor,"#cc0000"),this.macros=e.macros||{},this.minRuleThickness=Math.max(0,c(e.minRuleThickness,0)),this.colorIsTextColor=c(e.colorIsTextColor,!1),this.strict=c(e.strict,"warn"),this.trust=c(e.trust,!1),this.maxSize=Math.max(0,c(e.maxSize,1/0)),this.maxExpand=Math.max(0,c(e.maxExpand,1e3)),this.globalGroup=c(e.globalGroup,!1)}var t=e.prototype;return t.reportNonstrict=function(e,t,i){var o=this.strict;if("function"==typeof o&&(o=o(e,t,i)),o&&"ignore"!==o){if(!0===o||"error"===o)throw new n("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",i);"warn"===o?"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"):"undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+o+"': "+t+" ["+e+"]")}},t.useStrictBehavior=function(e,t,i){var n=this.strict;if("function"==typeof n)try{n=n(e,t,i)}catch(e){n="error"}return!(!n||"ignore"===n||!0!==n&&"error"!==n&&("warn"===n?("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+t+" ["+e+"]"),1):("undefined"!=typeof console&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+t+" ["+e+"]"),1)))},t.isTrusted=function(e){e.url&&!e.protocol&&(e.protocol=f(e.url));var t="function"==typeof this.trust?this.trust(e):this.trust;return Boolean(t)},e}(),m=function(){function e(e,t,i){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=i}var t=e.prototype;return t.sup=function(){return _[v[this.id]]},t.sub=function(){return _[b[this.id]]},t.fracNum=function(){return _[y[this.id]]},t.fracDen=function(){return _[w[this.id]]},t.cramp=function(){return _[C[this.id]]},t.text=function(){return _[S[this.id]]},t.isTight=function(){return this.size>=2},e}(),_=[new m(0,0,!1),new m(1,0,!0),new m(2,1,!1),new m(3,1,!0),new m(4,2,!1),new m(5,2,!0),new m(6,3,!1),new m(7,3,!0)],v=[4,5,4,5,6,7,6,7],b=[5,5,5,5,7,7,7,7],y=[2,3,4,5,6,7,6,7],w=[3,3,5,5,7,7,7,7],C=[1,1,3,3,5,5,7,7],S=[0,1,2,3,2,3,2,3],x={DISPLAY:_[0],TEXT:_[2],SCRIPT:_[4],SCRIPTSCRIPT:_[6]},k=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}],D=[];function L(e){for(var t=0;t=D[t]&&e<=D[t+1])return!0;return!1}k.forEach((function(e){return e.blocks.forEach((function(e){return D.push.apply(D,e)}))}));var N={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",tilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",tilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",tilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",tilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"},E=function(){function e(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var t=e.prototype;return t.hasClass=function(e){return l(this.classes,e)},t.toNode=function(){for(var e=document.createDocumentFragment(),t=0;t"},R=function(){function e(e,t,i,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,M.call(this,e,i,n),this.children=t||[]}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.hasClass=function(e){return l(this.classes,e)},t.toNode=function(){return I.call(this,"span")},t.toMarkup=function(){return T.call(this,"span")},e}(),O=function(){function e(e,t,i,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,M.call(this,t,n),this.children=i||[],this.setAttribute("href",e)}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.hasClass=function(e){return l(this.classes,e)},t.toNode=function(){return I.call(this,"a")},t.toMarkup=function(){return T.call(this,"a")},e}(),F=function(){function e(e,t,i){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=["mord"],this.style=i}var t=e.prototype;return t.hasClass=function(e){return l(this.classes,e)},t.toNode=function(){var e=document.createElement("img");for(var t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e},t.toMarkup=function(){var e=""+this.alt+""},e}(),P={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"},B=function(){function e(e,t,i,n,o,r,s,a){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=i||0,this.italic=n||0,this.skew=o||0,this.width=r||0,this.classes=s||[],this.style=a||{},this.maxFontSize=0;var l=function(e){for(var t=0;t=o[0]&&e<=o[1])return i.name}return null}(this.text.charCodeAt(0));l&&this.classes.push(l+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=P[this.text])}var t=e.prototype;return t.hasClass=function(e){return l(this.classes,e)},t.toNode=function(){var e=document.createTextNode(this.text),t=null;for(var i in this.italic>0&&((t=document.createElement("span")).style.marginRight=this.italic+"em"),this.classes.length>0&&((t=t||document.createElement("span")).className=A(this.classes)),this.style)this.style.hasOwnProperty(i)&&((t=t||document.createElement("span")).style[i]=this.style[i]);return t?(t.appendChild(e),t):e},t.toMarkup=function(){var e=!1,t="0&&(i+="margin-right:"+this.italic+"em;"),this.style)this.style.hasOwnProperty(n)&&(i+=h(n)+":"+this.style[n]+";");i&&(e=!0,t+=' style="'+u(i)+'"');var o=u(this.text);return e?(t+=">",t+=o,t+="
    "):o},e}(),z=function(){function e(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var i=0;i"},e}(),W=function(){function e(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?e.setAttribute("d",this.alternate):e.setAttribute("d",N[this.pathName]),e},t.toMarkup=function(){return this.alternate?"":""},e}(),V=function(){function e(e){this.attributes=void 0,this.attributes=e||{}}var t=e.prototype;return t.toNode=function(){var e=document.createElementNS("http://www.w3.org/2000/svg","line");for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e},t.toMarkup=function(){var e=""},e}();function H(e){if(e instanceof B)return e;throw new Error("Expected symbolNode but got "+String(e)+".")}var $={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,1],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.67,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.9,0,0,.278],8943:[-.19,.31,0,0,1.172],8945:[-.1,.82,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.744,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.744,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},U={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},j={Å:"A",Ç:"C",Ð:"D",Þ:"o",å:"a",ç:"c",ð:"d",þ:"o",А:"A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function q(e,t,i){if(!$[t])throw new Error("Font metrics not found for font: "+t+".");var n=e.charCodeAt(0),o=$[t][n];if(!o&&e[0]in j&&(n=j[e[0]].charCodeAt(0),o=$[t][n]),o||"text"!==i||L(n)&&(o=$[t][77]),o)return{depth:o[0],height:o[1],italic:o[2],skew:o[3],width:o[4]}}var K={},G={bin:1,close:1,inner:1,open:1,punct:1,rel:1},Y={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Z={math:{},text:{}},X=Z;function Q(e,t,i,n,o,r){Z[e][o]={font:t,group:i,replace:n},r&&n&&(Z[e][n]=Z[e][o])}var J="math",ee="text",te="main",ie="ams",ne="accent-token",oe="bin",re="close",se="inner",ae="mathord",le="op-token",ce="open",ue="punct",he="rel",de="spacing",ge="textord";Q(J,te,he,"≡","\\equiv",!0),Q(J,te,he,"≺","\\prec",!0),Q(J,te,he,"≻","\\succ",!0),Q(J,te,he,"∼","\\sim",!0),Q(J,te,he,"⊥","\\perp"),Q(J,te,he,"⪯","\\preceq",!0),Q(J,te,he,"⪰","\\succeq",!0),Q(J,te,he,"≃","\\simeq",!0),Q(J,te,he,"∣","\\mid",!0),Q(J,te,he,"≪","\\ll",!0),Q(J,te,he,"≫","\\gg",!0),Q(J,te,he,"≍","\\asymp",!0),Q(J,te,he,"∥","\\parallel"),Q(J,te,he,"⋈","\\bowtie",!0),Q(J,te,he,"⌣","\\smile",!0),Q(J,te,he,"⊑","\\sqsubseteq",!0),Q(J,te,he,"⊒","\\sqsupseteq",!0),Q(J,te,he,"≐","\\doteq",!0),Q(J,te,he,"⌢","\\frown",!0),Q(J,te,he,"∋","\\ni",!0),Q(J,te,he,"∝","\\propto",!0),Q(J,te,he,"⊢","\\vdash",!0),Q(J,te,he,"⊣","\\dashv",!0),Q(J,te,he,"∋","\\owns"),Q(J,te,ue,".","\\ldotp"),Q(J,te,ue,"⋅","\\cdotp"),Q(J,te,ge,"#","\\#"),Q(ee,te,ge,"#","\\#"),Q(J,te,ge,"&","\\&"),Q(ee,te,ge,"&","\\&"),Q(J,te,ge,"ℵ","\\aleph",!0),Q(J,te,ge,"∀","\\forall",!0),Q(J,te,ge,"ℏ","\\hbar",!0),Q(J,te,ge,"∃","\\exists",!0),Q(J,te,ge,"∇","\\nabla",!0),Q(J,te,ge,"♭","\\flat",!0),Q(J,te,ge,"ℓ","\\ell",!0),Q(J,te,ge,"♮","\\natural",!0),Q(J,te,ge,"♣","\\clubsuit",!0),Q(J,te,ge,"℘","\\wp",!0),Q(J,te,ge,"♯","\\sharp",!0),Q(J,te,ge,"♢","\\diamondsuit",!0),Q(J,te,ge,"ℜ","\\Re",!0),Q(J,te,ge,"♡","\\heartsuit",!0),Q(J,te,ge,"ℑ","\\Im",!0),Q(J,te,ge,"♠","\\spadesuit",!0),Q(ee,te,ge,"§","\\S",!0),Q(ee,te,ge,"¶","\\P",!0),Q(J,te,ge,"†","\\dag"),Q(ee,te,ge,"†","\\dag"),Q(ee,te,ge,"†","\\textdagger"),Q(J,te,ge,"‡","\\ddag"),Q(ee,te,ge,"‡","\\ddag"),Q(ee,te,ge,"‡","\\textdaggerdbl"),Q(J,te,re,"⎱","\\rmoustache",!0),Q(J,te,ce,"⎰","\\lmoustache",!0),Q(J,te,re,"⟯","\\rgroup",!0),Q(J,te,ce,"⟮","\\lgroup",!0),Q(J,te,oe,"∓","\\mp",!0),Q(J,te,oe,"⊖","\\ominus",!0),Q(J,te,oe,"⊎","\\uplus",!0),Q(J,te,oe,"⊓","\\sqcap",!0),Q(J,te,oe,"∗","\\ast"),Q(J,te,oe,"⊔","\\sqcup",!0),Q(J,te,oe,"◯","\\bigcirc",!0),Q(J,te,oe,"∙","\\bullet"),Q(J,te,oe,"‡","\\ddagger"),Q(J,te,oe,"≀","\\wr",!0),Q(J,te,oe,"⨿","\\amalg"),Q(J,te,oe,"&","\\And"),Q(J,te,he,"⟵","\\longleftarrow",!0),Q(J,te,he,"⇐","\\Leftarrow",!0),Q(J,te,he,"⟸","\\Longleftarrow",!0),Q(J,te,he,"⟶","\\longrightarrow",!0),Q(J,te,he,"⇒","\\Rightarrow",!0),Q(J,te,he,"⟹","\\Longrightarrow",!0),Q(J,te,he,"↔","\\leftrightarrow",!0),Q(J,te,he,"⟷","\\longleftrightarrow",!0),Q(J,te,he,"⇔","\\Leftrightarrow",!0),Q(J,te,he,"⟺","\\Longleftrightarrow",!0),Q(J,te,he,"↦","\\mapsto",!0),Q(J,te,he,"⟼","\\longmapsto",!0),Q(J,te,he,"↗","\\nearrow",!0),Q(J,te,he,"↩","\\hookleftarrow",!0),Q(J,te,he,"↪","\\hookrightarrow",!0),Q(J,te,he,"↘","\\searrow",!0),Q(J,te,he,"↼","\\leftharpoonup",!0),Q(J,te,he,"⇀","\\rightharpoonup",!0),Q(J,te,he,"↙","\\swarrow",!0),Q(J,te,he,"↽","\\leftharpoondown",!0),Q(J,te,he,"⇁","\\rightharpoondown",!0),Q(J,te,he,"↖","\\nwarrow",!0),Q(J,te,he,"⇌","\\rightleftharpoons",!0),Q(J,ie,he,"≮","\\nless",!0),Q(J,ie,he,"","\\@nleqslant"),Q(J,ie,he,"","\\@nleqq"),Q(J,ie,he,"⪇","\\lneq",!0),Q(J,ie,he,"≨","\\lneqq",!0),Q(J,ie,he,"","\\@lvertneqq"),Q(J,ie,he,"⋦","\\lnsim",!0),Q(J,ie,he,"⪉","\\lnapprox",!0),Q(J,ie,he,"⊀","\\nprec",!0),Q(J,ie,he,"⋠","\\npreceq",!0),Q(J,ie,he,"⋨","\\precnsim",!0),Q(J,ie,he,"⪹","\\precnapprox",!0),Q(J,ie,he,"≁","\\nsim",!0),Q(J,ie,he,"","\\@nshortmid"),Q(J,ie,he,"∤","\\nmid",!0),Q(J,ie,he,"⊬","\\nvdash",!0),Q(J,ie,he,"⊭","\\nvDash",!0),Q(J,ie,he,"⋪","\\ntriangleleft"),Q(J,ie,he,"⋬","\\ntrianglelefteq",!0),Q(J,ie,he,"⊊","\\subsetneq",!0),Q(J,ie,he,"","\\@varsubsetneq"),Q(J,ie,he,"⫋","\\subsetneqq",!0),Q(J,ie,he,"","\\@varsubsetneqq"),Q(J,ie,he,"≯","\\ngtr",!0),Q(J,ie,he,"","\\@ngeqslant"),Q(J,ie,he,"","\\@ngeqq"),Q(J,ie,he,"⪈","\\gneq",!0),Q(J,ie,he,"≩","\\gneqq",!0),Q(J,ie,he,"","\\@gvertneqq"),Q(J,ie,he,"⋧","\\gnsim",!0),Q(J,ie,he,"⪊","\\gnapprox",!0),Q(J,ie,he,"⊁","\\nsucc",!0),Q(J,ie,he,"⋡","\\nsucceq",!0),Q(J,ie,he,"⋩","\\succnsim",!0),Q(J,ie,he,"⪺","\\succnapprox",!0),Q(J,ie,he,"≆","\\ncong",!0),Q(J,ie,he,"","\\@nshortparallel"),Q(J,ie,he,"∦","\\nparallel",!0),Q(J,ie,he,"⊯","\\nVDash",!0),Q(J,ie,he,"⋫","\\ntriangleright"),Q(J,ie,he,"⋭","\\ntrianglerighteq",!0),Q(J,ie,he,"","\\@nsupseteqq"),Q(J,ie,he,"⊋","\\supsetneq",!0),Q(J,ie,he,"","\\@varsupsetneq"),Q(J,ie,he,"⫌","\\supsetneqq",!0),Q(J,ie,he,"","\\@varsupsetneqq"),Q(J,ie,he,"⊮","\\nVdash",!0),Q(J,ie,he,"⪵","\\precneqq",!0),Q(J,ie,he,"⪶","\\succneqq",!0),Q(J,ie,he,"","\\@nsubseteqq"),Q(J,ie,oe,"⊴","\\unlhd"),Q(J,ie,oe,"⊵","\\unrhd"),Q(J,ie,he,"↚","\\nleftarrow",!0),Q(J,ie,he,"↛","\\nrightarrow",!0),Q(J,ie,he,"⇍","\\nLeftarrow",!0),Q(J,ie,he,"⇏","\\nRightarrow",!0),Q(J,ie,he,"↮","\\nleftrightarrow",!0),Q(J,ie,he,"⇎","\\nLeftrightarrow",!0),Q(J,ie,he,"△","\\vartriangle"),Q(J,ie,ge,"ℏ","\\hslash"),Q(J,ie,ge,"▽","\\triangledown"),Q(J,ie,ge,"◊","\\lozenge"),Q(J,ie,ge,"Ⓢ","\\circledS"),Q(J,ie,ge,"®","\\circledR"),Q(ee,ie,ge,"®","\\circledR"),Q(J,ie,ge,"∡","\\measuredangle",!0),Q(J,ie,ge,"∄","\\nexists"),Q(J,ie,ge,"℧","\\mho"),Q(J,ie,ge,"Ⅎ","\\Finv",!0),Q(J,ie,ge,"⅁","\\Game",!0),Q(J,ie,ge,"‵","\\backprime"),Q(J,ie,ge,"▲","\\blacktriangle"),Q(J,ie,ge,"▼","\\blacktriangledown"),Q(J,ie,ge,"■","\\blacksquare"),Q(J,ie,ge,"⧫","\\blacklozenge"),Q(J,ie,ge,"★","\\bigstar"),Q(J,ie,ge,"∢","\\sphericalangle",!0),Q(J,ie,ge,"∁","\\complement",!0),Q(J,ie,ge,"ð","\\eth",!0),Q(ee,te,ge,"ð","ð"),Q(J,ie,ge,"╱","\\diagup"),Q(J,ie,ge,"╲","\\diagdown"),Q(J,ie,ge,"□","\\square"),Q(J,ie,ge,"□","\\Box"),Q(J,ie,ge,"◊","\\Diamond"),Q(J,ie,ge,"¥","\\yen",!0),Q(ee,ie,ge,"¥","\\yen",!0),Q(J,ie,ge,"✓","\\checkmark",!0),Q(ee,ie,ge,"✓","\\checkmark"),Q(J,ie,ge,"ℶ","\\beth",!0),Q(J,ie,ge,"ℸ","\\daleth",!0),Q(J,ie,ge,"ℷ","\\gimel",!0),Q(J,ie,ge,"ϝ","\\digamma",!0),Q(J,ie,ge,"ϰ","\\varkappa"),Q(J,ie,ce,"┌","\\@ulcorner",!0),Q(J,ie,re,"┐","\\@urcorner",!0),Q(J,ie,ce,"└","\\@llcorner",!0),Q(J,ie,re,"┘","\\@lrcorner",!0),Q(J,ie,he,"≦","\\leqq",!0),Q(J,ie,he,"⩽","\\leqslant",!0),Q(J,ie,he,"⪕","\\eqslantless",!0),Q(J,ie,he,"≲","\\lesssim",!0),Q(J,ie,he,"⪅","\\lessapprox",!0),Q(J,ie,he,"≊","\\approxeq",!0),Q(J,ie,oe,"⋖","\\lessdot"),Q(J,ie,he,"⋘","\\lll",!0),Q(J,ie,he,"≶","\\lessgtr",!0),Q(J,ie,he,"⋚","\\lesseqgtr",!0),Q(J,ie,he,"⪋","\\lesseqqgtr",!0),Q(J,ie,he,"≑","\\doteqdot"),Q(J,ie,he,"≓","\\risingdotseq",!0),Q(J,ie,he,"≒","\\fallingdotseq",!0),Q(J,ie,he,"∽","\\backsim",!0),Q(J,ie,he,"⋍","\\backsimeq",!0),Q(J,ie,he,"⫅","\\subseteqq",!0),Q(J,ie,he,"⋐","\\Subset",!0),Q(J,ie,he,"⊏","\\sqsubset",!0),Q(J,ie,he,"≼","\\preccurlyeq",!0),Q(J,ie,he,"⋞","\\curlyeqprec",!0),Q(J,ie,he,"≾","\\precsim",!0),Q(J,ie,he,"⪷","\\precapprox",!0),Q(J,ie,he,"⊲","\\vartriangleleft"),Q(J,ie,he,"⊴","\\trianglelefteq"),Q(J,ie,he,"⊨","\\vDash",!0),Q(J,ie,he,"⊪","\\Vvdash",!0),Q(J,ie,he,"⌣","\\smallsmile"),Q(J,ie,he,"⌢","\\smallfrown"),Q(J,ie,he,"≏","\\bumpeq",!0),Q(J,ie,he,"≎","\\Bumpeq",!0),Q(J,ie,he,"≧","\\geqq",!0),Q(J,ie,he,"⩾","\\geqslant",!0),Q(J,ie,he,"⪖","\\eqslantgtr",!0),Q(J,ie,he,"≳","\\gtrsim",!0),Q(J,ie,he,"⪆","\\gtrapprox",!0),Q(J,ie,oe,"⋗","\\gtrdot"),Q(J,ie,he,"⋙","\\ggg",!0),Q(J,ie,he,"≷","\\gtrless",!0),Q(J,ie,he,"⋛","\\gtreqless",!0),Q(J,ie,he,"⪌","\\gtreqqless",!0),Q(J,ie,he,"≖","\\eqcirc",!0),Q(J,ie,he,"≗","\\circeq",!0),Q(J,ie,he,"≜","\\triangleq",!0),Q(J,ie,he,"∼","\\thicksim"),Q(J,ie,he,"≈","\\thickapprox"),Q(J,ie,he,"⫆","\\supseteqq",!0),Q(J,ie,he,"⋑","\\Supset",!0),Q(J,ie,he,"⊐","\\sqsupset",!0),Q(J,ie,he,"≽","\\succcurlyeq",!0),Q(J,ie,he,"⋟","\\curlyeqsucc",!0),Q(J,ie,he,"≿","\\succsim",!0),Q(J,ie,he,"⪸","\\succapprox",!0),Q(J,ie,he,"⊳","\\vartriangleright"),Q(J,ie,he,"⊵","\\trianglerighteq"),Q(J,ie,he,"⊩","\\Vdash",!0),Q(J,ie,he,"∣","\\shortmid"),Q(J,ie,he,"∥","\\shortparallel"),Q(J,ie,he,"≬","\\between",!0),Q(J,ie,he,"⋔","\\pitchfork",!0),Q(J,ie,he,"∝","\\varpropto"),Q(J,ie,he,"◀","\\blacktriangleleft"),Q(J,ie,he,"∴","\\therefore",!0),Q(J,ie,he,"∍","\\backepsilon"),Q(J,ie,he,"▶","\\blacktriangleright"),Q(J,ie,he,"∵","\\because",!0),Q(J,ie,he,"⋘","\\llless"),Q(J,ie,he,"⋙","\\gggtr"),Q(J,ie,oe,"⊲","\\lhd"),Q(J,ie,oe,"⊳","\\rhd"),Q(J,ie,he,"≂","\\eqsim",!0),Q(J,te,he,"⋈","\\Join"),Q(J,ie,he,"≑","\\Doteq",!0),Q(J,ie,oe,"∔","\\dotplus",!0),Q(J,ie,oe,"∖","\\smallsetminus"),Q(J,ie,oe,"⋒","\\Cap",!0),Q(J,ie,oe,"⋓","\\Cup",!0),Q(J,ie,oe,"⩞","\\doublebarwedge",!0),Q(J,ie,oe,"⊟","\\boxminus",!0),Q(J,ie,oe,"⊞","\\boxplus",!0),Q(J,ie,oe,"⋇","\\divideontimes",!0),Q(J,ie,oe,"⋉","\\ltimes",!0),Q(J,ie,oe,"⋊","\\rtimes",!0),Q(J,ie,oe,"⋋","\\leftthreetimes",!0),Q(J,ie,oe,"⋌","\\rightthreetimes",!0),Q(J,ie,oe,"⋏","\\curlywedge",!0),Q(J,ie,oe,"⋎","\\curlyvee",!0),Q(J,ie,oe,"⊝","\\circleddash",!0),Q(J,ie,oe,"⊛","\\circledast",!0),Q(J,ie,oe,"⋅","\\centerdot"),Q(J,ie,oe,"⊺","\\intercal",!0),Q(J,ie,oe,"⋒","\\doublecap"),Q(J,ie,oe,"⋓","\\doublecup"),Q(J,ie,oe,"⊠","\\boxtimes",!0),Q(J,ie,he,"⇢","\\dashrightarrow",!0),Q(J,ie,he,"⇠","\\dashleftarrow",!0),Q(J,ie,he,"⇇","\\leftleftarrows",!0),Q(J,ie,he,"⇆","\\leftrightarrows",!0),Q(J,ie,he,"⇚","\\Lleftarrow",!0),Q(J,ie,he,"↞","\\twoheadleftarrow",!0),Q(J,ie,he,"↢","\\leftarrowtail",!0),Q(J,ie,he,"↫","\\looparrowleft",!0),Q(J,ie,he,"⇋","\\leftrightharpoons",!0),Q(J,ie,he,"↶","\\curvearrowleft",!0),Q(J,ie,he,"↺","\\circlearrowleft",!0),Q(J,ie,he,"↰","\\Lsh",!0),Q(J,ie,he,"⇈","\\upuparrows",!0),Q(J,ie,he,"↿","\\upharpoonleft",!0),Q(J,ie,he,"⇃","\\downharpoonleft",!0),Q(J,te,he,"⊶","\\origof",!0),Q(J,te,he,"⊷","\\imageof",!0),Q(J,ie,he,"⊸","\\multimap",!0),Q(J,ie,he,"↭","\\leftrightsquigarrow",!0),Q(J,ie,he,"⇉","\\rightrightarrows",!0),Q(J,ie,he,"⇄","\\rightleftarrows",!0),Q(J,ie,he,"↠","\\twoheadrightarrow",!0),Q(J,ie,he,"↣","\\rightarrowtail",!0),Q(J,ie,he,"↬","\\looparrowright",!0),Q(J,ie,he,"↷","\\curvearrowright",!0),Q(J,ie,he,"↻","\\circlearrowright",!0),Q(J,ie,he,"↱","\\Rsh",!0),Q(J,ie,he,"⇊","\\downdownarrows",!0),Q(J,ie,he,"↾","\\upharpoonright",!0),Q(J,ie,he,"⇂","\\downharpoonright",!0),Q(J,ie,he,"⇝","\\rightsquigarrow",!0),Q(J,ie,he,"⇝","\\leadsto"),Q(J,ie,he,"⇛","\\Rrightarrow",!0),Q(J,ie,he,"↾","\\restriction"),Q(J,te,ge,"‘","`"),Q(J,te,ge,"$","\\$"),Q(ee,te,ge,"$","\\$"),Q(ee,te,ge,"$","\\textdollar"),Q(J,te,ge,"%","\\%"),Q(ee,te,ge,"%","\\%"),Q(J,te,ge,"_","\\_"),Q(ee,te,ge,"_","\\_"),Q(ee,te,ge,"_","\\textunderscore"),Q(J,te,ge,"∠","\\angle",!0),Q(J,te,ge,"∞","\\infty",!0),Q(J,te,ge,"′","\\prime"),Q(J,te,ge,"△","\\triangle"),Q(J,te,ge,"Γ","\\Gamma",!0),Q(J,te,ge,"Δ","\\Delta",!0),Q(J,te,ge,"Θ","\\Theta",!0),Q(J,te,ge,"Λ","\\Lambda",!0),Q(J,te,ge,"Ξ","\\Xi",!0),Q(J,te,ge,"Π","\\Pi",!0),Q(J,te,ge,"Σ","\\Sigma",!0),Q(J,te,ge,"Υ","\\Upsilon",!0),Q(J,te,ge,"Φ","\\Phi",!0),Q(J,te,ge,"Ψ","\\Psi",!0),Q(J,te,ge,"Ω","\\Omega",!0),Q(J,te,ge,"A","Α"),Q(J,te,ge,"B","Β"),Q(J,te,ge,"E","Ε"),Q(J,te,ge,"Z","Ζ"),Q(J,te,ge,"H","Η"),Q(J,te,ge,"I","Ι"),Q(J,te,ge,"K","Κ"),Q(J,te,ge,"M","Μ"),Q(J,te,ge,"N","Ν"),Q(J,te,ge,"O","Ο"),Q(J,te,ge,"P","Ρ"),Q(J,te,ge,"T","Τ"),Q(J,te,ge,"X","Χ"),Q(J,te,ge,"¬","\\neg",!0),Q(J,te,ge,"¬","\\lnot"),Q(J,te,ge,"⊤","\\top"),Q(J,te,ge,"⊥","\\bot"),Q(J,te,ge,"∅","\\emptyset"),Q(J,ie,ge,"∅","\\varnothing"),Q(J,te,ae,"α","\\alpha",!0),Q(J,te,ae,"β","\\beta",!0),Q(J,te,ae,"γ","\\gamma",!0),Q(J,te,ae,"δ","\\delta",!0),Q(J,te,ae,"ϵ","\\epsilon",!0),Q(J,te,ae,"ζ","\\zeta",!0),Q(J,te,ae,"η","\\eta",!0),Q(J,te,ae,"θ","\\theta",!0),Q(J,te,ae,"ι","\\iota",!0),Q(J,te,ae,"κ","\\kappa",!0),Q(J,te,ae,"λ","\\lambda",!0),Q(J,te,ae,"μ","\\mu",!0),Q(J,te,ae,"ν","\\nu",!0),Q(J,te,ae,"ξ","\\xi",!0),Q(J,te,ae,"ο","\\omicron",!0),Q(J,te,ae,"π","\\pi",!0),Q(J,te,ae,"ρ","\\rho",!0),Q(J,te,ae,"σ","\\sigma",!0),Q(J,te,ae,"τ","\\tau",!0),Q(J,te,ae,"υ","\\upsilon",!0),Q(J,te,ae,"ϕ","\\phi",!0),Q(J,te,ae,"χ","\\chi",!0),Q(J,te,ae,"ψ","\\psi",!0),Q(J,te,ae,"ω","\\omega",!0),Q(J,te,ae,"ε","\\varepsilon",!0),Q(J,te,ae,"ϑ","\\vartheta",!0),Q(J,te,ae,"ϖ","\\varpi",!0),Q(J,te,ae,"ϱ","\\varrho",!0),Q(J,te,ae,"ς","\\varsigma",!0),Q(J,te,ae,"φ","\\varphi",!0),Q(J,te,oe,"∗","*"),Q(J,te,oe,"+","+"),Q(J,te,oe,"−","-"),Q(J,te,oe,"⋅","\\cdot",!0),Q(J,te,oe,"∘","\\circ"),Q(J,te,oe,"÷","\\div",!0),Q(J,te,oe,"±","\\pm",!0),Q(J,te,oe,"×","\\times",!0),Q(J,te,oe,"∩","\\cap",!0),Q(J,te,oe,"∪","\\cup",!0),Q(J,te,oe,"∖","\\setminus"),Q(J,te,oe,"∧","\\land"),Q(J,te,oe,"∨","\\lor"),Q(J,te,oe,"∧","\\wedge",!0),Q(J,te,oe,"∨","\\vee",!0),Q(J,te,ge,"√","\\surd"),Q(J,te,ce,"⟨","\\langle",!0),Q(J,te,ce,"∣","\\lvert"),Q(J,te,ce,"∥","\\lVert"),Q(J,te,re,"?","?"),Q(J,te,re,"!","!"),Q(J,te,re,"⟩","\\rangle",!0),Q(J,te,re,"∣","\\rvert"),Q(J,te,re,"∥","\\rVert"),Q(J,te,he,"=","="),Q(J,te,he,":",":"),Q(J,te,he,"≈","\\approx",!0),Q(J,te,he,"≅","\\cong",!0),Q(J,te,he,"≥","\\ge"),Q(J,te,he,"≥","\\geq",!0),Q(J,te,he,"←","\\gets"),Q(J,te,he,">","\\gt",!0),Q(J,te,he,"∈","\\in",!0),Q(J,te,he,"","\\@not"),Q(J,te,he,"⊂","\\subset",!0),Q(J,te,he,"⊃","\\supset",!0),Q(J,te,he,"⊆","\\subseteq",!0),Q(J,te,he,"⊇","\\supseteq",!0),Q(J,ie,he,"⊈","\\nsubseteq",!0),Q(J,ie,he,"⊉","\\nsupseteq",!0),Q(J,te,he,"⊨","\\models"),Q(J,te,he,"←","\\leftarrow",!0),Q(J,te,he,"≤","\\le"),Q(J,te,he,"≤","\\leq",!0),Q(J,te,he,"<","\\lt",!0),Q(J,te,he,"→","\\rightarrow",!0),Q(J,te,he,"→","\\to"),Q(J,ie,he,"≱","\\ngeq",!0),Q(J,ie,he,"≰","\\nleq",!0),Q(J,te,de," ","\\ "),Q(J,te,de," ","~"),Q(J,te,de," ","\\space"),Q(J,te,de," ","\\nobreakspace"),Q(ee,te,de," ","\\ "),Q(ee,te,de," "," "),Q(ee,te,de," ","~"),Q(ee,te,de," ","\\space"),Q(ee,te,de," ","\\nobreakspace"),Q(J,te,de,null,"\\nobreak"),Q(J,te,de,null,"\\allowbreak"),Q(J,te,ue,",",","),Q(J,te,ue,";",";"),Q(J,ie,oe,"⊼","\\barwedge",!0),Q(J,ie,oe,"⊻","\\veebar",!0),Q(J,te,oe,"⊙","\\odot",!0),Q(J,te,oe,"⊕","\\oplus",!0),Q(J,te,oe,"⊗","\\otimes",!0),Q(J,te,ge,"∂","\\partial",!0),Q(J,te,oe,"⊘","\\oslash",!0),Q(J,ie,oe,"⊚","\\circledcirc",!0),Q(J,ie,oe,"⊡","\\boxdot",!0),Q(J,te,oe,"△","\\bigtriangleup"),Q(J,te,oe,"▽","\\bigtriangledown"),Q(J,te,oe,"†","\\dagger"),Q(J,te,oe,"⋄","\\diamond"),Q(J,te,oe,"⋆","\\star"),Q(J,te,oe,"◃","\\triangleleft"),Q(J,te,oe,"▹","\\triangleright"),Q(J,te,ce,"{","\\{"),Q(ee,te,ge,"{","\\{"),Q(ee,te,ge,"{","\\textbraceleft"),Q(J,te,re,"}","\\}"),Q(ee,te,ge,"}","\\}"),Q(ee,te,ge,"}","\\textbraceright"),Q(J,te,ce,"{","\\lbrace"),Q(J,te,re,"}","\\rbrace"),Q(J,te,ce,"[","\\lbrack",!0),Q(ee,te,ge,"[","\\lbrack",!0),Q(J,te,re,"]","\\rbrack",!0),Q(ee,te,ge,"]","\\rbrack",!0),Q(J,te,ce,"(","\\lparen",!0),Q(J,te,re,")","\\rparen",!0),Q(ee,te,ge,"<","\\textless",!0),Q(ee,te,ge,">","\\textgreater",!0),Q(J,te,ce,"⌊","\\lfloor",!0),Q(J,te,re,"⌋","\\rfloor",!0),Q(J,te,ce,"⌈","\\lceil",!0),Q(J,te,re,"⌉","\\rceil",!0),Q(J,te,ge,"\\","\\backslash"),Q(J,te,ge,"∣","|"),Q(J,te,ge,"∣","\\vert"),Q(ee,te,ge,"|","\\textbar",!0),Q(J,te,ge,"∥","\\|"),Q(J,te,ge,"∥","\\Vert"),Q(ee,te,ge,"∥","\\textbardbl"),Q(ee,te,ge,"~","\\textasciitilde"),Q(ee,te,ge,"\\","\\textbackslash"),Q(ee,te,ge,"^","\\textasciicircum"),Q(J,te,he,"↑","\\uparrow",!0),Q(J,te,he,"⇑","\\Uparrow",!0),Q(J,te,he,"↓","\\downarrow",!0),Q(J,te,he,"⇓","\\Downarrow",!0),Q(J,te,he,"↕","\\updownarrow",!0),Q(J,te,he,"⇕","\\Updownarrow",!0),Q(J,te,le,"∐","\\coprod"),Q(J,te,le,"⋁","\\bigvee"),Q(J,te,le,"⋀","\\bigwedge"),Q(J,te,le,"⨄","\\biguplus"),Q(J,te,le,"⋂","\\bigcap"),Q(J,te,le,"⋃","\\bigcup"),Q(J,te,le,"∫","\\int"),Q(J,te,le,"∫","\\intop"),Q(J,te,le,"∬","\\iint"),Q(J,te,le,"∭","\\iiint"),Q(J,te,le,"∏","\\prod"),Q(J,te,le,"∑","\\sum"),Q(J,te,le,"⨂","\\bigotimes"),Q(J,te,le,"⨁","\\bigoplus"),Q(J,te,le,"⨀","\\bigodot"),Q(J,te,le,"∮","\\oint"),Q(J,te,le,"∯","\\oiint"),Q(J,te,le,"∰","\\oiiint"),Q(J,te,le,"⨆","\\bigsqcup"),Q(J,te,le,"∫","\\smallint"),Q(ee,te,se,"…","\\textellipsis"),Q(J,te,se,"…","\\mathellipsis"),Q(ee,te,se,"…","\\ldots",!0),Q(J,te,se,"…","\\ldots",!0),Q(J,te,se,"⋯","\\@cdots",!0),Q(J,te,se,"⋱","\\ddots",!0),Q(J,te,ge,"⋮","\\varvdots"),Q(J,te,ne,"ˊ","\\acute"),Q(J,te,ne,"ˋ","\\grave"),Q(J,te,ne,"¨","\\ddot"),Q(J,te,ne,"~","\\tilde"),Q(J,te,ne,"ˉ","\\bar"),Q(J,te,ne,"˘","\\breve"),Q(J,te,ne,"ˇ","\\check"),Q(J,te,ne,"^","\\hat"),Q(J,te,ne,"⃗","\\vec"),Q(J,te,ne,"˙","\\dot"),Q(J,te,ne,"˚","\\mathring"),Q(J,te,ae,"","\\@imath"),Q(J,te,ae,"","\\@jmath"),Q(J,te,ge,"ı","ı"),Q(J,te,ge,"ȷ","ȷ"),Q(ee,te,ge,"ı","\\i",!0),Q(ee,te,ge,"ȷ","\\j",!0),Q(ee,te,ge,"ß","\\ss",!0),Q(ee,te,ge,"æ","\\ae",!0),Q(ee,te,ge,"œ","\\oe",!0),Q(ee,te,ge,"ø","\\o",!0),Q(ee,te,ge,"Æ","\\AE",!0),Q(ee,te,ge,"Œ","\\OE",!0),Q(ee,te,ge,"Ø","\\O",!0),Q(ee,te,ne,"ˊ","\\'"),Q(ee,te,ne,"ˋ","\\`"),Q(ee,te,ne,"ˆ","\\^"),Q(ee,te,ne,"˜","\\~"),Q(ee,te,ne,"ˉ","\\="),Q(ee,te,ne,"˘","\\u"),Q(ee,te,ne,"˙","\\."),Q(ee,te,ne,"˚","\\r"),Q(ee,te,ne,"ˇ","\\v"),Q(ee,te,ne,"¨",'\\"'),Q(ee,te,ne,"˝","\\H"),Q(ee,te,ne,"◯","\\textcircled");var fe={"--":!0,"---":!0,"``":!0,"''":!0};Q(ee,te,ge,"–","--",!0),Q(ee,te,ge,"–","\\textendash"),Q(ee,te,ge,"—","---",!0),Q(ee,te,ge,"—","\\textemdash"),Q(ee,te,ge,"‘","`",!0),Q(ee,te,ge,"‘","\\textquoteleft"),Q(ee,te,ge,"’","'",!0),Q(ee,te,ge,"’","\\textquoteright"),Q(ee,te,ge,"“","``",!0),Q(ee,te,ge,"“","\\textquotedblleft"),Q(ee,te,ge,"”","''",!0),Q(ee,te,ge,"”","\\textquotedblright"),Q(J,te,ge,"°","\\degree",!0),Q(ee,te,ge,"°","\\degree"),Q(ee,te,ge,"°","\\textdegree",!0),Q(J,te,ge,"£","\\pounds"),Q(J,te,ge,"£","\\mathsterling",!0),Q(ee,te,ge,"£","\\pounds"),Q(ee,te,ge,"£","\\textsterling",!0),Q(J,ie,ge,"✠","\\maltese"),Q(ee,ie,ge,"✠","\\maltese");for(var pe='0123456789/@."',me=0;me=5?0:e>=3?1:2]){var i=K[t]={cssEmPerMu:U.quad[t]/18};for(var n in U)U.hasOwnProperty(n)&&(i[n]=U[n][t])}return K[t]}(this.size)),this._fontMetrics},t.getColor=function(){return this.phantom?"transparent":this.color},e}();Pe.BASESIZE=6;var Be=Pe,ze={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},We={ex:!0,em:!0,mu:!0},Ve=function(e){return"string"!=typeof e&&(e=e.unit),e in ze||e in We||"ex"===e},He=function(e,t){var i;if(e.unit in ze)i=ze[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)i=t.fontMetrics().cssEmPerMu;else{var o;if(o=t.style.isTight()?t.havingStyle(t.style.text()):t,"ex"===e.unit)i=o.fontMetrics().xHeight;else{if("em"!==e.unit)throw new n("Invalid unit: '"+e.unit+"'");i=o.fontMetrics().quad}o!==t&&(i*=o.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*i,t.maxSize)},$e=function(e,t,i){return X[i][e]&&X[i][e].replace&&(e=X[i][e].replace),{value:e,metrics:q(e,t,i)}},Ue=function(e,t,i,n,o){var r,s=$e(e,t,i),a=s.metrics;if(e=s.value,a){var l=a.italic;("text"===i||n&&"mathit"===n.font)&&(l=0),r=new B(e,a.height,a.depth,l,a.skew,a.width,o)}else"undefined"!=typeof console&&console.warn("No character metrics for '"+e+"' in style '"+t+"' and mode '"+i+"'"),r=new B(e,0,0,0,0,0,o);if(n){r.maxFontSize=n.sizeMultiplier,n.style.isTight()&&r.classes.push("mtight");var c=n.getColor();c&&(r.style.color=c)}return r},je=function(e,t){if(A(e.classes)!==A(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize)return!1;if(1===e.classes.length){var i=e.classes[0];if("mbin"===i||"mord"===i)return!1}for(var n in e.style)if(e.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;for(var o in t.style)if(t.style.hasOwnProperty(o)&&e.style[o]!==t.style[o])return!1;return!0},qe=function(e){for(var t=0,i=0,n=0,o=0;ot&&(t=r.height),r.depth>i&&(i=r.depth),r.maxFontSize>n&&(n=r.maxFontSize)}e.height=t,e.depth=i,e.maxFontSize=n},Ke=function(e,t,i,n){var o=new R(e,t,i,n);return qe(o),o},Ge=function(e,t,i,n){return new R(e,t,i,n)},Ye=function(e){var t=new E(e);return qe(t),t},Ze=function(e,t,i){var n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}return n+"-"+("textbf"===t&&"textit"===i?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},Xe={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Qe={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},Je={fontMap:Xe,makeSymbol:Ue,mathsym:function(e,t,i,n){return void 0===n&&(n=[]),"boldsymbol"===i.font&&$e(e,"Main-Bold",t).metrics?Ue(e,"Main-Bold",t,i,n.concat(["mathbf"])):"\\"===e||"main"===X[t][e].font?Ue(e,"Main-Regular",t,i,n):Ue(e,"AMS-Regular",t,i,n.concat(["amsrm"]))},makeSpan:Ke,makeSvgSpan:Ge,makeLineSpan:function(e,t,i){var n=Ke([e],[],t);return n.height=Math.max(i||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),n.style.borderBottomWidth=n.height+"em",n.maxFontSize=1,n},makeAnchor:function(e,t,i,n){var o=new O(e,t,i,n);return qe(o),o},makeFragment:Ye,wrapFragment:function(e,t){return e instanceof E?Ke([],[e],t):e},makeVList:function(e,t){for(var i=function(e){if("individualShift"===e.positionType){for(var t=e.children,i=[t[0]],n=-t[0].shift-t[0].elem.depth,o=n,r=1;r0&&(s.push(xt(a,t)),a=[]),s.push(o[l]));a.length>0&&s.push(xt(a,t)),i?((r=xt(_t(i,t,!0))).classes=["tag"],s.push(r)):n&&s.push(n);var u=dt(["katex-html"],s);if(u.setAttribute("aria-hidden","true"),r){var h=r.children[0];h.style.height=u.height+u.depth+"em",h.style.verticalAlign=-u.depth+"em"}return u}function Dt(e){return new E(e)}var Lt=function(){function e(e,t,i){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=i||[]}var t=e.prototype;return t.setAttribute=function(e,t){this.attributes[e]=t},t.getAttribute=function(e){return this.attributes[e]},t.toNode=function(){var e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=A(this.classes));for(var i=0;i0&&(e+=' class ="'+u(A(this.classes))+'"'),e+=">";for(var i=0;i"},t.toText=function(){return this.children.map((function(e){return e.toText()})).join("")},e}(),Nt=function(){function e(e){this.text=void 0,this.text=e}var t=e.prototype;return t.toNode=function(){return document.createTextNode(this.text)},t.toMarkup=function(){return u(this.toText())},t.toText=function(){return this.text},e}(),Et={MathNode:Lt,TextNode:Nt,SpaceNode:function(){function e(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?" ":e>=.1666&&e<=.1667?" ":e>=.2222&&e<=.2223?" ":e>=.2777&&e<=.2778?"  ":e>=-.05556&&e<=-.05555?" ⁣":e>=-.1667&&e<=-.1666?" ⁣":e>=-.2223&&e<=-.2222?" ⁣":e>=-.2778&&e<=-.2777?" ⁣":null}var t=e.prototype;return t.toNode=function(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return e.setAttribute("width",this.width+"em"),e},t.toMarkup=function(){return this.character?""+this.character+"":''},t.toText=function(){return this.character?this.character:" "},e}(),newDocumentFragment:Dt},At=function(e,t,i){return!X[t][e]||!X[t][e].replace||55349===e.charCodeAt(0)||fe.hasOwnProperty(e)&&i&&(i.fontFamily&&"tt"===i.fontFamily.substr(4,2)||i.font&&"tt"===i.font.substr(4,2))||(e=X[t][e].replace),new Et.TextNode(e)},Mt=function(e){return 1===e.length?e[0]:new Et.MathNode("mrow",e)},It=function(e,t){if("texttt"===t.fontFamily)return"monospace";if("textsf"===t.fontFamily)return"textit"===t.fontShape&&"textbf"===t.fontWeight?"sans-serif-bold-italic":"textit"===t.fontShape?"sans-serif-italic":"textbf"===t.fontWeight?"bold-sans-serif":"sans-serif";if("textit"===t.fontShape&&"textbf"===t.fontWeight)return"bold-italic";if("textit"===t.fontShape)return"italic";if("textbf"===t.fontWeight)return"bold";var i=t.font;if(!i||"mathnormal"===i)return null;var n=e.mode;if("mathit"===i)return"italic";if("boldsymbol"===i)return"textord"===e.type?"bold":"bold-italic";if("mathbf"===i)return"bold";if("mathbb"===i)return"double-struck";if("mathfrak"===i)return"fraktur";if("mathscr"===i||"mathcal"===i)return"script";if("mathsf"===i)return"sans-serif";if("mathtt"===i)return"monospace";var o=e.text;return l(["\\imath","\\jmath"],o)?null:(X[n][o]&&X[n][o].replace&&(o=X[n][o].replace),q(o,Je.fontMap[i].fontName,n)?Je.fontMap[i].variant:null)},Tt=function(e,t,i){if(1===e.length){var n=Ot(e[0],t);return i&&n instanceof Lt&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n]}for(var o,r=[],s=0;s0&&(g.text=g.text.slice(0,1)+"̸"+g.text.slice(1),r.pop())}}}r.push(a),o=a}return r},Rt=function(e,t,i){return Mt(Tt(e,t,i))},Ot=function(e,t){if(!e)return new Et.MathNode("mrow");if(at[e.type])return at[e.type](e,t);throw new n("Got group of unknown type: '"+e.type+"'")};function Ft(e,t,i,n,o){var r,s=Tt(e,i);r=1===s.length&&s[0]instanceof Lt&&l(["mrow","mtable"],s[0].type)?s[0]:new Et.MathNode("mrow",s);var a=new Et.MathNode("annotation",[new Et.TextNode(t)]);a.setAttribute("encoding","application/x-tex");var c=new Et.MathNode("semantics",[r,a]),u=new Et.MathNode("math",[c]);return u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),n&&u.setAttribute("display","block"),Je.makeSpan([o?"katex":"katex-mathml"],[u])}var Pt=function(e){return new Be({style:e.displayMode?x.DISPLAY:x.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Bt=function(e,t){if(t.displayMode){var i=["katex-display"];t.leqno&&i.push("leqno"),t.fleqn&&i.push("fleqn"),e=Je.makeSpan(i,[e])}return e},zt={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\\\cdrightarrow":"→","\\\\cdleftarrow":"←","\\\\cdlongequal":"="},Wt={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequal"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Vt=function(e){var t=new Et.MathNode("mo",[new Et.TextNode(zt[e])]);return t.setAttribute("stretchy","true"),t},Ht=function(e,t){var i=function(){var i=4e5,n=e.label.substr(1);if(l(["widehat","widecheck","widetilde","utilde"],n)){var o,r,s,a="ordgroup"===(f=e.base).type?f.body.length:1;if(a>5)"widehat"===n||"widecheck"===n?(o=420,i=2364,s=.42,r=n+"4"):(o=312,i=2340,s=.34,r="tilde4");else{var c=[1,1,2,2,3,3][a];"widehat"===n||"widecheck"===n?(i=[0,1062,2364,2364,2364][c],o=[0,239,300,360,420][c],s=[0,.24,.3,.3,.36,.42][c],r=n+c):(i=[0,600,1033,2339,2340][c],o=[0,260,286,306,312][c],s=[0,.26,.286,.3,.306,.34][c],r="tilde"+c)}var u=new W(r),h=new z([u],{width:"100%",height:s+"em",viewBox:"0 0 "+i+" "+o,preserveAspectRatio:"none"});return{span:Je.makeSvgSpan([],[h],t),minWidth:0,height:s}}var d,g,f,p=[],m=Wt[n],_=m[0],v=m[1],b=m[2],y=b/1e3,w=_.length;if(1===w)d=["hide-tail"],g=[m[3]];else if(2===w)d=["halfarrow-left","halfarrow-right"],g=["xMinYMin","xMaxYMin"];else{if(3!==w)throw new Error("Correct katexImagesData or update code here to support\n "+w+" children.");d=["brace-left","brace-center","brace-right"],g=["xMinYMin","xMidYMin","xMaxYMin"]}for(var C=0;C0&&(n.style.minWidth=o+"em"),n};function $t(e,t){if(!e||e.type!==t)throw new Error("Expected node of type "+t+", but got "+(e?"node of type "+e.type:String(e)));return e}function Ut(e){var t=jt(e);if(!t)throw new Error("Expected node of symbol group type, but got "+(e?"node of type "+e.type:String(e)));return t}function jt(e){return e&&("atom"===e.type||Y.hasOwnProperty(e.type))?e:null}var qt=function(e,t){var i,n,o;e&&"supsub"===e.type?(i=(n=$t(e.base,"accent")).base,e.base=i,o=function(e){if(e instanceof R)return e;throw new Error("Expected span but got "+String(e)+".")}(St(e,t)),e.base=n):i=(n=$t(e,"accent")).base;var r=St(i,t.havingCrampedStyle()),s=0;if(n.isShifty&&g(i)){var a=d(i);s=H(St(a,t.havingCrampedStyle())).skew}var l,c=Math.min(r.height,t.fontMetrics().xHeight);if(n.isStretchy)l=Ht(n,t),l=Je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"elem",elem:l,wrapperClasses:["svg-align"],wrapperStyle:s>0?{width:"calc(100% - "+2*s+"em)",marginLeft:2*s+"em"}:void 0}]},t);else{var u,h;"\\vec"===n.label?(u=Je.staticSvg("vec",t),h=Je.svgData.vec[1]):((u=H(u=Je.makeOrd({mode:n.mode,text:n.label},t,"textord"))).italic=0,h=u.width),l=Je.makeSpan(["accent-body"],[u]);var f="\\textcircled"===n.label;f&&(l.classes.push("accent-full"),c=r.height);var p=s;f||(p-=h/2),l.style.left=p+"em","\\textcircled"===n.label&&(l.style.top=".2em"),l=Je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r},{type:"kern",size:-c},{type:"elem",elem:l}]},t)}var m=Je.makeSpan(["mord","accent"],[l],t);return o?(o.children[0]=m,o.height=Math.max(m.height,o.height),o.classes[0]="mord",o):m},Kt=function(e,t){var i=e.isStretchy?Vt(e.label):new Et.MathNode("mo",[At(e.label,e.mode)]),n=new Et.MathNode("mover",[Ot(e.base,t),i]);return n.setAttribute("accent","true"),n},Gt=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map((function(e){return"\\"+e})).join("|"));lt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:function(e,t){var i=ut(t[0]),n=!Gt.test(e.funcName),o=!n||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:n,isShifty:o,base:i}},htmlBuilder:qt,mathmlBuilder:Kt}),lt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!1,argTypes:["primitive"]},handler:function(e,t){var i=t[0];return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:!1,isShifty:!0,base:i}},htmlBuilder:qt,mathmlBuilder:Kt}),lt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(e,t){var i=e.parser,n=e.funcName,o=t[0];return{type:"accentUnder",mode:i.mode,label:n,base:o}},htmlBuilder:function(e,t){var i=St(e.base,t),n=Ht(e,t),o="\\utilde"===e.label?.12:0,r=Je.makeVList({positionType:"top",positionData:i.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:o},{type:"elem",elem:i}]},t);return Je.makeSpan(["mord","accentunder"],[r],t)},mathmlBuilder:function(e,t){var i=Vt(e.label),n=new Et.MathNode("munder",[Ot(e.base,t),i]);return n.setAttribute("accentunder","true"),n}});var Yt=function(e){var t=new Et.MathNode("mpadded",e?[e]:[]);return t.setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t};lt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler:function(e,t,i){var n=e.parser,o=e.funcName;return{type:"xArrow",mode:n.mode,label:o,body:t[0],below:i[0]}},htmlBuilder:function(e,t){var i,n=t.style,o=t.havingStyle(n.sup()),r=Je.wrapFragment(St(e.body,o,t),t),s="\\x"===e.label.slice(0,2)?"x":"cd";r.classes.push(s+"-arrow-pad"),e.below&&(o=t.havingStyle(n.sub()),(i=Je.wrapFragment(St(e.below,o,t),t)).classes.push(s+"-arrow-pad"));var a,l=Ht(e,t),c=-t.fontMetrics().axisHeight+.5*l.height,u=-t.fontMetrics().axisHeight-.5*l.height-.111;if((r.depth>.25||"\\xleftequilibrium"===e.label)&&(u-=r.depth),i){var h=-t.fontMetrics().axisHeight+i.height+.5*l.height+.111;a=Je.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:u},{type:"elem",elem:l,shift:c},{type:"elem",elem:i,shift:h}]},t)}else a=Je.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:u},{type:"elem",elem:l,shift:c}]},t);return a.children[0].children[0].children[1].classes.push("svg-align"),Je.makeSpan(["mrel","x-arrow"],[a],t)},mathmlBuilder:function(e,t){var i,n=Vt(e.label);if(n.setAttribute("minsize","x"===e.label.charAt(0)?"1.75em":"3.0em"),e.body){var o=Yt(Ot(e.body,t));if(e.below){var r=Yt(Ot(e.below,t));i=new Et.MathNode("munderover",[n,r,o])}else i=new Et.MathNode("mover",[n,o])}else if(e.below){var s=Yt(Ot(e.below,t));i=new Et.MathNode("munder",[n,s])}else i=Yt(),i=new Et.MathNode("mover",[n,i]);return i}});var Zt={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Xt=function(e){return"textord"===e.type&&"@"===e.text};function Qt(e,t,i){var n=Zt[e];switch(n){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return i.callFunction(n,[t[0]],[t[1]]);case"\\uparrow":case"\\downarrow":var o={type:"atom",text:n,mode:"math",family:"rel"},r={type:"ordgroup",mode:"math",body:[i.callFunction("\\\\cdleft",[t[0]],[]),i.callFunction("\\Big",[o],[]),i.callFunction("\\\\cdright",[t[1]],[])]};return i.callFunction("\\\\cdparent",[r],[]);case"\\\\cdlongequal":return i.callFunction("\\\\cdlongequal",[],[]);case"\\Vert":return i.callFunction("\\Big",[{type:"textord",text:"\\Vert",mode:"math"}],[]);default:return{type:"textord",text:" ",mode:"math"}}}lt({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler:function(e,t){var i=e.parser,n=e.funcName;return{type:"cdlabel",mode:i.mode,side:n.slice(4),label:t[0]}},htmlBuilder:function(e,t){var i=t.havingStyle(t.style.sup()),n=Je.wrapFragment(St(e.label,i,t),t);return n.classes.push("cd-label-"+e.side),n.style.bottom=.8-n.depth+"em",n.height=0,n.depth=0,n},mathmlBuilder:function(e,t){var i=new Et.MathNode("mrow",[Ot(e.label,t)]);return(i=new Et.MathNode("mpadded",[i])).setAttribute("width","0"),"left"===e.side&&i.setAttribute("lspace","-1width"),i.setAttribute("voffset","0.7em"),(i=new Et.MathNode("mstyle",[i])).setAttribute("displaystyle","false"),i.setAttribute("scriptlevel","1"),i}}),lt({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler:function(e,t){return{type:"cdlabelparent",mode:e.parser.mode,fragment:t[0]}},htmlBuilder:function(e,t){var i=Je.wrapFragment(St(e.fragment,t),t);return i.classes.push("cd-vert-arrow"),i},mathmlBuilder:function(e,t){return new Et.MathNode("mrow",[Ot(e.fragment,t)])}}),lt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){for(var i=e.parser,o=$t(t[0],"ordgroup").body,r="",s=0;s","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],bi=[0,1.2,1.8,2.4,3],yi=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],wi=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"stack"}],Ci=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Si=function(e){if("small"===e.type)return"Main-Regular";if("large"===e.type)return"Size"+e.size+"-Regular";if("stack"===e.type)return"Size4-Regular";throw new Error("Add support for delim type '"+e.type+"' here.")},xi=function(e,t,i,n){for(var o=Math.min(2,3-n.style.size);ot)return i[o]}return i[i.length-1]},ki=function(e,t,i,n,o,r){var s;"<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),s=l(vi,e)?yi:l(mi,e)?Ci:wi;var a=xi(e,t,s,n);return"small"===a.type?function(e,t,i,n,o,r){var s=Je.makeSymbol(e,"Main-Regular",o,n),a=ri(s,t,n,r);return i&&si(a,n,t),a}(e,a.style,i,n,o,r):"large"===a.type?ai(e,a.size,i,n,o,r):gi(e,t,i,n,o,r)},Di=function(e,t,i,o,r){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),l(mi,e)||l(vi,e))return ai(e,t,!1,i,o,r);if(l(_i,e))return gi(e,bi[t],!1,i,o,r);throw new n("Illegal delimiter: '"+e+"'")},Li=bi,Ni=ki,Ei=function(e,t,i,n,o,r){var s=n.fontMetrics().axisHeight*n.sizeMultiplier,a=5/n.fontMetrics().ptPerEm,l=Math.max(t-s,i+s),c=Math.max(l/500*901,2*l-a);return ki(e,c,!0,n,o,r)},Ai={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},Mi=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function Ii(e,t){var i=jt(e);if(i&&l(Mi,i.text))return i;throw new n(i?"Invalid delimiter '"+i.text+"' after '"+t.funcName+"'":"Invalid delimiter type '"+e.type+"'",e)}function Ti(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}lt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:function(e,t){var i=Ii(t[0],e);return{type:"delimsizing",mode:e.parser.mode,size:Ai[e.funcName].size,mclass:Ai[e.funcName].mclass,delim:i.text}},htmlBuilder:function(e,t){return"."===e.delim?Je.makeSpan([e.mclass]):Di(e.delim,e.size,t,e.mode,[e.mclass])},mathmlBuilder:function(e){var t=[];"."!==e.delim&&t.push(At(e.delim,e.mode));var i=new Et.MathNode("mo",t);return"mopen"===e.mclass||"mclose"===e.mclass?i.setAttribute("fence","true"):i.setAttribute("fence","false"),i.setAttribute("stretchy","true"),i.setAttribute("minsize",Li[e.size]+"em"),i.setAttribute("maxsize",Li[e.size]+"em"),i}}),lt({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:function(e,t){var i=e.parser.gullet.macros.get("\\current@color");if(i&&"string"!=typeof i)throw new n("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Ii(t[0],e).text,color:i}}}),lt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:function(e,t){var i=Ii(t[0],e),n=e.parser;++n.leftrightDepth;var o=n.parseExpression(!1);--n.leftrightDepth,n.expect("\\right",!1);var r=$t(n.parseFunction(),"leftright-right");return{type:"leftright",mode:n.mode,body:o,left:i.text,right:r.delim,rightColor:r.color}},htmlBuilder:function(e,t){Ti(e);for(var i,n,o=_t(e.body,t,!0,["mopen","mclose"]),r=0,s=0,a=!1,l=0;l-1?"mpadded":"menclose",[Ot(e.body,t)]);switch(e.label){case"\\cancel":n.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":n.setAttribute("notation","downdiagonalstrike");break;case"\\phase":n.setAttribute("notation","phasorangle");break;case"\\sout":n.setAttribute("notation","horizontalstrike");break;case"\\fbox":n.setAttribute("notation","box");break;case"\\angl":n.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(i=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,n.setAttribute("width","+"+2*i+"pt"),n.setAttribute("height","+"+2*i+"pt"),n.setAttribute("lspace",i+"pt"),n.setAttribute("voffset",i+"pt"),"\\fcolorbox"===e.label){var o=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);n.setAttribute("style","border: "+o+"em solid "+String(e.borderColor))}break;case"\\xcancel":n.setAttribute("notation","updiagonalstrike downdiagonalstrike")}return e.backgroundColor&&n.setAttribute("mathbackground",e.backgroundColor),n};lt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler:function(e,t,i){var n=e.parser,o=e.funcName,r=$t(t[0],"color-token").color,s=t[1];return{type:"enclose",mode:n.mode,label:o,backgroundColor:r,body:s}},htmlBuilder:Ri,mathmlBuilder:Oi}),lt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler:function(e,t,i){var n=e.parser,o=e.funcName,r=$t(t[0],"color-token").color,s=$t(t[1],"color-token").color,a=t[2];return{type:"enclose",mode:n.mode,label:o,backgroundColor:s,borderColor:r,body:a}},htmlBuilder:Ri,mathmlBuilder:Oi}),lt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(e,t){return{type:"enclose",mode:e.parser.mode,label:"\\fbox",body:t[0]}}}),lt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler:function(e,t){var i=e.parser,n=e.funcName,o=t[0];return{type:"enclose",mode:i.mode,label:n,body:o}},htmlBuilder:Ri,mathmlBuilder:Oi}),lt({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler:function(e,t){return{type:"enclose",mode:e.parser.mode,label:"\\angl",body:t[0]}}});var Fi={};function Pi(e){for(var t=e.type,i=e.names,n=e.props,o=e.handler,r=e.htmlBuilder,s=e.mathmlBuilder,a={type:t,numArgs:n.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:o},l=0;l0&&(b+=.25),u.push({pos:b,isDashed:e[t]})}for(y(s[0]),i=0;i0&&(S<(N+=v)&&(S=N),N=0),e.addJot&&(S+=p),k.height=C,k.depth=S,b+=C,k.pos=b,b+=S+N,l[i]=k,y(s[i+1])}var E,A,M=b/2+t.fontMetrics().axisHeight,I=e.cols||[],T=[],R=[];if(e.addEqnNum)for(i=0;i=a)){var H=void 0;(o>0||e.hskipBeforeAndAfter)&&0!==(H=c(B.pregap,g))&&((E=Je.makeSpan(["arraycolsep"],[])).style.width=H+"em",T.push(E));var $=[];for(i=0;i0){for(var K=Je.makeLineSpan("hline",t,h),G=Je.makeLineSpan("hdashline",t,h),Y=[{type:"elem",elem:l,shift:0}];u.length>0;){var Z=u.pop(),X=Z.pos-M;Z.isDashed?Y.push({type:"elem",elem:G,shift:X}):Y.push({type:"elem",elem:K,shift:X})}l=Je.makeVList({positionType:"individualShift",children:Y},t)}if(e.addEqnNum){var Q=Je.makeVList({positionType:"individualShift",children:R},t);return Q=Je.makeSpan(["tag"],[Q],t),Je.makeFragment([l,Q])}return Je.makeSpan(["mord"],[l],t)},$i={c:"center ",l:"left ",r:"right "},Ui=function(e,t){for(var i=[],n=new Et.MathNode("mtd",[],["mtr-glue"]),o=new Et.MathNode("mtd",[],["mml-eqn-num"]),r=0;r0){var g=e.cols,f="",p=!1,m=0,_=g.length;"separator"===g[0].type&&(h+="top ",m=1),"separator"===g[g.length-1].type&&(h+="bottom ",_-=1);for(var v=m;v<_;v++)"align"===g[v].type?(d+=$i[g[v].align],p&&(f+="none "),p=!0):"separator"===g[v].type&&p&&(f+="|"===g[v].separator?"solid ":"dashed ",p=!1);c.setAttribute("columnalign",d.trim()),/[sd]/.test(f)&&c.setAttribute("columnlines",f.trim())}if("align"===e.colSeparationType){for(var b=e.cols||[],y="",w=1;w0?"left ":"",h+=S[S.length-1].length>0?"right ":"";for(var x=1;x-1?"alignat":"align",s=Wi(e.parser,{cols:o,addJot:!0,addEqnNum:"align"===e.envName||"alignat"===e.envName,colSeparationType:r,maxNumCols:"split"===e.envName?2:void 0,leqno:e.parser.settings.leqno},"display"),a=0,l={type:"ordgroup",mode:e.mode,body:[]};if(t[0]&&"ordgroup"===t[0].type){for(var c="",u=0;u0&&h&&(f=1),o[d]={type:"align",align:g,pregap:f,postgap:0}}return s.colSeparationType=h?"align":"alignat",s};Pi({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(e,t){var i=(jt(t[0])?[t[0]]:$t(t[0],"ordgroup").body).map((function(e){var t=Ut(e).text;if(-1!=="lcr".indexOf(t))return{type:"align",align:t};if("|"===t)return{type:"separator",separator:"|"};if(":"===t)return{type:"separator",separator:":"};throw new n("Unknown column alignment: "+t,e)})),o={cols:i,hskipBeforeAndAfter:!0,maxNumCols:i.length};return Wi(e.parser,o,Vi(e.envName))},htmlBuilder:Hi,mathmlBuilder:Ui}),Pi({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler:function(e){var t={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[e.envName.replace("*","")],i="c",o={hskipBeforeAndAfter:!1,cols:[{type:"align",align:i}]};if("*"===e.envName.charAt(e.envName.length-1)){var r=e.parser;if(r.consumeSpaces(),"["===r.fetch().text){if(r.consume(),r.consumeSpaces(),i=r.fetch().text,-1==="lcr".indexOf(i))throw new n("Expected l or c or r",r.nextToken);r.consume(),r.consumeSpaces(),r.expect("]"),r.consume(),o.cols=[{type:"align",align:i}]}}var s=Wi(e.parser,o,Vi(e.envName));return s.cols=new Array(s.body[0].length).fill({type:"align",align:i}),t?{type:"leftright",mode:e.mode,body:[s],left:t[0],right:t[1],rightColor:void 0}:s},htmlBuilder:Hi,mathmlBuilder:Ui}),Pi({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(e){var t=Wi(e.parser,{arraystretch:.5},"script");return t.colSeparationType="small",t},htmlBuilder:Hi,mathmlBuilder:Ui}),Pi({type:"array",names:["subarray"],props:{numArgs:1},handler:function(e,t){var i=(jt(t[0])?[t[0]]:$t(t[0],"ordgroup").body).map((function(e){var t=Ut(e).text;if(-1!=="lc".indexOf(t))return{type:"align",align:t};throw new n("Unknown column alignment: "+t,e)}));if(i.length>1)throw new n("{subarray} can contain only one column");var o={cols:i,hskipBeforeAndAfter:!1,arraystretch:.5};if((o=Wi(e.parser,o,"script")).body.length>0&&o.body[0].length>1)throw new n("{subarray} can contain only one column");return o},htmlBuilder:Hi,mathmlBuilder:Ui}),Pi({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler:function(e){var t=Wi(e.parser,{arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},Vi(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.indexOf("r")>-1?".":"\\{",right:e.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:Hi,mathmlBuilder:Ui}),Pi({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:ji,htmlBuilder:Hi,mathmlBuilder:Ui}),Pi({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler:function(e){l(["gather","gather*"],e.envName)&&zi(e);var t={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",addEqnNum:"gather"===e.envName,leqno:e.parser.settings.leqno};return Wi(e.parser,t,"display")},htmlBuilder:Hi,mathmlBuilder:Ui}),Pi({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:ji,htmlBuilder:Hi,mathmlBuilder:Ui}),Pi({type:"array",names:["equation","equation*"],props:{numArgs:0},handler:function(e){zi(e);var t={addEqnNum:"equation"===e.envName,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return Wi(e.parser,t,"display")},htmlBuilder:Hi,mathmlBuilder:Ui}),Pi({type:"array",names:["CD"],props:{numArgs:0},handler:function(e){return zi(e),function(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set("\\cr","\\\\\\relax"),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,"\\\\")),e.gullet.endGroup(),e.gullet.beginGroup();var i=e.fetch().text;if("&"!==i&&"\\\\"!==i){if("\\end"===i){0===t[t.length-1].length&&t.pop();break}throw new n("Expected \\\\ or \\cr or \\end",e.nextToken)}e.consume()}for(var o,r,s=[],a=[s],l=0;l-1);else{if(!("<>AV".indexOf(d)>-1))throw new n('Expected one of "<>AV=|." after @',c[h]);for(var f=0;f<2;f++){for(var p=!0,m=h+1;m=x.SCRIPT.id?i.text():x.DISPLAY:"text"===e&&i.size===x.DISPLAY.size?i=x.TEXT:"script"===e?i=x.SCRIPT:"scriptscript"===e&&(i=x.SCRIPTSCRIPT),i},tn=function(e,t){var i,n=en(e.size,t.style),o=n.fracNum(),r=n.fracDen();i=t.havingStyle(o);var s=St(e.numer,i,t);if(e.continued){var a=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;s.height=s.height0?3*h:7*h,f=t.fontMetrics().denom1):(u>0?(d=t.fontMetrics().num2,g=h):(d=t.fontMetrics().num3,g=3*h),f=t.fontMetrics().denom2),c){var y=t.fontMetrics().axisHeight;d-s.depth-(y+.5*u)0&&(t="."===(t=e)?null:t),t};lt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler:function(e,t){var i,n=e.parser,o=t[4],r=t[5],s=ut(t[0]),a="atom"===s.type&&"open"===s.family?rn(s.text):null,l=ut(t[1]),c="atom"===l.type&&"close"===l.family?rn(l.text):null,u=$t(t[2],"size"),h=null;i=!!u.isBlank||(h=u.value).number>0;var d="auto",g=t[3];if("ordgroup"===g.type){if(g.body.length>0){var f=$t(g.body[0],"textord");d=on[Number(f.text)]}}else g=$t(g,"textord"),d=on[Number(g.text)];return{type:"genfrac",mode:n.mode,numer:o,denom:r,continued:!1,hasBarLine:i,barSize:h,leftDelim:a,rightDelim:c,size:d}},htmlBuilder:tn,mathmlBuilder:nn}),lt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(e,t){var i=e.parser,n=(e.funcName,e.token);return{type:"infix",mode:i.mode,replaceWith:"\\\\abovefrac",size:$t(t[0],"size").value,token:n}}}),lt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(e,t){var i=e.parser,n=(e.funcName,t[0]),o=function(e){if(!e)throw new Error("Expected non-null, but got "+String(e));return e}($t(t[1],"infix").size),r=t[2],s=o.number>0;return{type:"genfrac",mode:i.mode,numer:n,denom:r,continued:!1,hasBarLine:s,barSize:o,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:tn,mathmlBuilder:nn});var sn=function(e,t){var i,n,o=t.style;"supsub"===e.type?(i=e.sup?St(e.sup,t.havingStyle(o.sup()),t):St(e.sub,t.havingStyle(o.sub()),t),n=$t(e.base,"horizBrace")):n=$t(e,"horizBrace");var r,s=St(n.base,t.havingBaseStyle(x.DISPLAY)),a=Ht(n,t);if(n.isOver?(r=Je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:s},{type:"kern",size:.1},{type:"elem",elem:a}]},t)).children[0].children[0].children[1].classes.push("svg-align"):(r=Je.makeVList({positionType:"bottom",positionData:s.depth+.1+a.height,children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:s}]},t)).children[0].children[0].children[0].classes.push("svg-align"),i){var l=Je.makeSpan(["mord",n.isOver?"mover":"munder"],[r],t);r=n.isOver?Je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:l},{type:"kern",size:.2},{type:"elem",elem:i}]},t):Je.makeVList({positionType:"bottom",positionData:l.depth+.2+i.height+i.depth,children:[{type:"elem",elem:i},{type:"kern",size:.2},{type:"elem",elem:l}]},t)}return Je.makeSpan(["mord",n.isOver?"mover":"munder"],[r],t)};lt({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(e,t){var i=e.parser,n=e.funcName;return{type:"horizBrace",mode:i.mode,label:n,isOver:/^\\over/.test(n),base:t[0]}},htmlBuilder:sn,mathmlBuilder:function(e,t){var i=Vt(e.label);return new Et.MathNode(e.isOver?"mover":"munder",[Ot(e.base,t),i])}}),lt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(e,t){var i=e.parser,n=t[1],o=$t(t[0],"url").url;return i.settings.isTrusted({command:"\\href",url:o})?{type:"href",mode:i.mode,href:o,body:ht(n)}:i.formatUnsupportedCmd("\\href")},htmlBuilder:function(e,t){var i=_t(e.body,t,!1);return Je.makeAnchor(e.href,[],i,t)},mathmlBuilder:function(e,t){var i=Rt(e.body,t);return i instanceof Lt||(i=new Lt("mrow",[i])),i.setAttribute("href",e.href),i}}),lt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(e,t){var i=e.parser,n=$t(t[0],"url").url;if(!i.settings.isTrusted({command:"\\url",url:n}))return i.formatUnsupportedCmd("\\url");for(var o=[],r=0;r0&&(n=He(e.totalheight,t)-i,n=Number(n.toFixed(2)));var o=0;e.width.number>0&&(o=He(e.width,t));var r={height:i+n+"em"};o>0&&(r.width=o+"em"),n>0&&(r.verticalAlign=-n+"em");var s=new F(e.src,e.alt,r);return s.height=i,s.depth=n,s},mathmlBuilder:function(e,t){var i=new Et.MathNode("mglyph",[]);i.setAttribute("alt",e.alt);var n=He(e.height,t),o=0;if(e.totalheight.number>0&&(o=(o=He(e.totalheight,t)-n).toFixed(2),i.setAttribute("valign","-"+o+"em")),i.setAttribute("height",n+o+"em"),e.width.number>0){var r=He(e.width,t);i.setAttribute("width",r+"em")}return i.setAttribute("src",e.src),i}}),lt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler:function(e,t){var i=e.parser,n=e.funcName,o=$t(t[0],"size");if(i.settings.strict){var r="m"===n[1],s="mu"===o.value.unit;r?(s||i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" supports only mu units, not "+o.value.unit+" units"),"math"!==i.mode&&i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" works only in math mode")):s&&i.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+n+" doesn't support mu units")}return{type:"kern",mode:i.mode,dimension:o.value}},htmlBuilder:function(e,t){return Je.makeGlue(e.dimension,t)},mathmlBuilder:function(e,t){var i=He(e.dimension,t);return new Et.SpaceNode(i)}}),lt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){var i=e.parser,n=e.funcName,o=t[0];return{type:"lap",mode:i.mode,alignment:n.slice(5),body:o}},htmlBuilder:function(e,t){var i;"clap"===e.alignment?(i=Je.makeSpan([],[St(e.body,t)]),i=Je.makeSpan(["inner"],[i],t)):i=Je.makeSpan(["inner"],[St(e.body,t)]);var n=Je.makeSpan(["fix"],[]),o=Je.makeSpan([e.alignment],[i,n],t),r=Je.makeSpan(["strut"]);return r.style.height=o.height+o.depth+"em",r.style.verticalAlign=-o.depth+"em",o.children.unshift(r),o=Je.makeSpan(["thinbox"],[o],t),Je.makeSpan(["mord","vbox"],[o],t)},mathmlBuilder:function(e,t){var i=new Et.MathNode("mpadded",[Ot(e.body,t)]);if("rlap"!==e.alignment){var n="llap"===e.alignment?"-1":"-0.5";i.setAttribute("lspace",n+"width")}return i.setAttribute("width","0px"),i}}),lt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(e,t){var i=e.funcName,n=e.parser,o=n.mode;n.switchMode("math");var r="\\("===i?"\\)":"$",s=n.parseExpression(!1,r);return n.expect(r),n.switchMode(o),{type:"styling",mode:n.mode,style:"text",body:s}}}),lt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(e,t){throw new n("Mismatched "+e.funcName)}});var ln=function(e,t){switch(t.style.size){case x.DISPLAY.size:return e.display;case x.TEXT.size:return e.text;case x.SCRIPT.size:return e.script;case x.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};lt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:function(e,t){return{type:"mathchoice",mode:e.parser.mode,display:ht(t[0]),text:ht(t[1]),script:ht(t[2]),scriptscript:ht(t[3])}},htmlBuilder:function(e,t){var i=ln(e,t),n=_t(i,t,!1);return Je.makeFragment(n)},mathmlBuilder:function(e,t){var i=ln(e,t);return Rt(i,t)}});var cn=function(e,t,i,n,o,r,s){var a,l,c;if(e=Je.makeSpan([],[e]),t){var u=St(t,n.havingStyle(o.sup()),n);l={elem:u,kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-u.depth)}}if(i){var h=St(i,n.havingStyle(o.sub()),n);a={elem:h,kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-h.height)}}if(l&&a){var d=n.fontMetrics().bigOpSpacing5+a.elem.height+a.elem.depth+a.kern+e.depth+s;c=Je.makeVList({positionType:"bottom",positionData:d,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:a.elem,marginLeft:-r+"em"},{type:"kern",size:a.kern},{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:r+"em"},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}else if(a){var g=e.height-s;c=Je.makeVList({positionType:"top",positionData:g,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:a.elem,marginLeft:-r+"em"},{type:"kern",size:a.kern},{type:"elem",elem:e}]},n)}else{if(!l)return e;var f=e.depth+s;c=Je.makeVList({positionType:"bottom",positionData:f,children:[{type:"elem",elem:e},{type:"kern",size:l.kern},{type:"elem",elem:l.elem,marginLeft:r+"em"},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}return Je.makeSpan(["mop","op-limits"],[c],n)},un=["\\smallint"],hn=function(e,t){var i,n,o,r=!1;"supsub"===e.type?(i=e.sup,n=e.sub,o=$t(e.base,"op"),r=!0):o=$t(e,"op");var s,a=t.style,c=!1;if(a.size===x.DISPLAY.size&&o.symbol&&!l(un,o.name)&&(c=!0),o.symbol){var u=c?"Size2-Regular":"Size1-Regular",h="";if("\\oiint"!==o.name&&"\\oiiint"!==o.name||(h=o.name.substr(1),o.name="oiint"===h?"\\iint":"\\iiint"),s=Je.makeSymbol(o.name,u,"math",t,["mop","op-symbol",c?"large-op":"small-op"]),h.length>0){var d=s.italic,g=Je.staticSvg(h+"Size"+(c?"2":"1"),t);s=Je.makeVList({positionType:"individualShift",children:[{type:"elem",elem:s,shift:0},{type:"elem",elem:g,shift:c?.08:0}]},t),o.name="\\"+h,s.classes.unshift("mop"),s.italic=d}}else if(o.body){var f=_t(o.body,t,!0);1===f.length&&f[0]instanceof B?(s=f[0]).classes[0]="mop":s=Je.makeSpan(["mop"],f,t)}else{for(var p=[],m=1;m0){for(var a=o.body.map((function(e){var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e})),l=_t(a,t.withFont("mathrm"),!0),c=0;c=0?a.setAttribute("height","+"+o+"em"):(a.setAttribute("height",o+"em"),a.setAttribute("depth","+"+-o+"em")),a.setAttribute("voffset",o+"em"),a}});var _n=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"];lt({type:"sizing",names:_n,props:{numArgs:0,allowedInText:!0},handler:function(e,t){var i=e.breakOnTokenText,n=e.funcName,o=e.parser,r=o.parseExpression(!1,i);return{type:"sizing",mode:o.mode,size:_n.indexOf(n)+1,body:r}},htmlBuilder:function(e,t){var i=t.havingSize(e.size);return mn(e.body,i,t)},mathmlBuilder:function(e,t){var i=t.havingSize(e.size),n=Tt(e.body,i),o=new Et.MathNode("mstyle",n);return o.setAttribute("mathsize",i.sizeMultiplier+"em"),o}}),lt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(e,t,i){var n=e.parser,o=!1,r=!1,s=i[0]&&$t(i[0],"ordgroup");if(s)for(var a="",l=0;li.height+i.depth+r&&(r=(r+u-i.height-i.depth)/2);var h=a.height-i.height-r-l;i.style.paddingLeft=c+"em";var d=Je.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:i,wrapperClasses:["svg-align"]},{type:"kern",size:-(i.height+h)},{type:"elem",elem:a},{type:"kern",size:l}]},t);if(e.index){var g=t.havingStyle(x.SCRIPTSCRIPT),f=St(e.index,g,t),p=.6*(d.height-d.depth),m=Je.makeVList({positionType:"shift",positionData:-p,children:[{type:"elem",elem:f}]},t),_=Je.makeSpan(["root"],[m]);return Je.makeSpan(["mord","sqrt"],[_,d],t)}return Je.makeSpan(["mord","sqrt"],[d],t)},mathmlBuilder:function(e,t){var i=e.body,n=e.index;return n?new Et.MathNode("mroot",[Ot(i,t),Ot(n,t)]):new Et.MathNode("msqrt",[Ot(i,t)])}});var vn={display:x.DISPLAY,text:x.TEXT,script:x.SCRIPT,scriptscript:x.SCRIPTSCRIPT};lt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler:function(e,t){var i=e.breakOnTokenText,n=e.funcName,o=e.parser,r=o.parseExpression(!0,i),s=n.slice(1,n.length-5);return{type:"styling",mode:o.mode,style:s,body:r}},htmlBuilder:function(e,t){var i=vn[e.style],n=t.havingStyle(i).withFont("");return mn(e.body,n,t)},mathmlBuilder:function(e,t){var i=vn[e.style],n=t.havingStyle(i),o=Tt(e.body,n),r=new Et.MathNode("mstyle",o),s={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[e.style];return r.setAttribute("scriptlevel",s[0]),r.setAttribute("displaystyle",s[1]),r}});ct({type:"supsub",htmlBuilder:function(e,t){var i=function(e,t){var i=e.base;return i?"op"===i.type?i.limits&&(t.style.size===x.DISPLAY.size||i.alwaysHandleSupSub)?hn:null:"operatorname"===i.type?i.alwaysHandleSupSub&&(t.style.size===x.DISPLAY.size||i.limits)?pn:null:"accent"===i.type?g(i.base)?qt:null:"horizBrace"===i.type&&!e.sub===i.isOver?sn:null:null}(e,t);if(i)return i(e,t);var n,o,r,s=e.base,a=e.sup,l=e.sub,c=St(s,t),u=t.fontMetrics(),h=0,d=0,f=s&&g(s);if(a){var p=t.havingStyle(t.style.sup());n=St(a,p,t),f||(h=c.height-p.fontMetrics().supDrop*p.sizeMultiplier/t.sizeMultiplier)}if(l){var m=t.havingStyle(t.style.sub());o=St(l,m,t),f||(d=c.depth+m.fontMetrics().subDrop*m.sizeMultiplier/t.sizeMultiplier)}r=t.style===x.DISPLAY?u.sup1:t.style.cramped?u.sup3:u.sup2;var _,v=t.sizeMultiplier,b=.5/u.ptPerEm/v+"em",y=null;if(o){var w=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name);(c instanceof B||w)&&(y=-c.italic+"em")}if(n&&o){h=Math.max(h,r,n.depth+.25*u.xHeight),d=Math.max(d,u.sub2);var C=4*u.defaultRuleThickness;if(h-n.depth-(o.height-d)0&&(h+=S,d-=S)}_=Je.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:d,marginRight:b,marginLeft:y},{type:"elem",elem:n,shift:-h,marginRight:b}]},t)}else if(o){d=Math.max(d,u.sub1,o.height-.8*u.xHeight),_=Je.makeVList({positionType:"shift",positionData:d,children:[{type:"elem",elem:o,marginLeft:y,marginRight:b}]},t)}else{if(!n)throw new Error("supsub must have either sup or sub.");h=Math.max(h,r,n.depth+.25*u.xHeight),_=Je.makeVList({positionType:"shift",positionData:-h,children:[{type:"elem",elem:n,marginRight:b}]},t)}var k=wt(c,"right")||"mord";return Je.makeSpan([k],[c,Je.makeSpan(["msupsub"],[_])],t)},mathmlBuilder:function(e,t){var i,n=!1;e.base&&"horizBrace"===e.base.type&&!!e.sup===e.base.isOver&&(n=!0,i=e.base.isOver),!e.base||"op"!==e.base.type&&"operatorname"!==e.base.type||(e.base.parentIsSupSub=!0);var o,r=[Ot(e.base,t)];if(e.sub&&r.push(Ot(e.sub,t)),e.sup&&r.push(Ot(e.sup,t)),n)o=i?"mover":"munder";else if(e.sub)if(e.sup){var s=e.base;o=s&&"op"===s.type&&s.limits&&t.style===x.DISPLAY||s&&"operatorname"===s.type&&s.alwaysHandleSupSub&&(t.style===x.DISPLAY||s.limits)?"munderover":"msubsup"}else{var a=e.base;o=a&&"op"===a.type&&a.limits&&(t.style===x.DISPLAY||a.alwaysHandleSupSub)||a&&"operatorname"===a.type&&a.alwaysHandleSupSub&&(a.limits||t.style===x.DISPLAY)?"munder":"msub"}else{var l=e.base;o=l&&"op"===l.type&&l.limits&&(t.style===x.DISPLAY||l.alwaysHandleSupSub)||l&&"operatorname"===l.type&&l.alwaysHandleSupSub&&(l.limits||t.style===x.DISPLAY)?"mover":"msup"}return new Et.MathNode(o,r)}}),ct({type:"atom",htmlBuilder:function(e,t){return Je.mathsym(e.text,e.mode,t,["m"+e.family])},mathmlBuilder:function(e,t){var i=new Et.MathNode("mo",[At(e.text,e.mode)]);if("bin"===e.family){var n=It(e,t);"bold-italic"===n&&i.setAttribute("mathvariant",n)}else"punct"===e.family?i.setAttribute("separator","true"):"open"!==e.family&&"close"!==e.family||i.setAttribute("stretchy","false");return i}});var bn={mi:"italic",mn:"normal",mtext:"normal"};ct({type:"mathord",htmlBuilder:function(e,t){return Je.makeOrd(e,t,"mathord")},mathmlBuilder:function(e,t){var i=new Et.MathNode("mi",[At(e.text,e.mode,t)]),n=It(e,t)||"italic";return n!==bn[i.type]&&i.setAttribute("mathvariant",n),i}}),ct({type:"textord",htmlBuilder:function(e,t){return Je.makeOrd(e,t,"textord")},mathmlBuilder:function(e,t){var i,n=At(e.text,e.mode,t),o=It(e,t)||"normal";return i="text"===e.mode?new Et.MathNode("mtext",[n]):/[0-9]/.test(e.text)?new Et.MathNode("mn",[n]):"\\prime"===e.text?new Et.MathNode("mo",[n]):new Et.MathNode("mi",[n]),o!==bn[i.type]&&i.setAttribute("mathvariant",o),i}});var yn={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},wn={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};ct({type:"spacing",htmlBuilder:function(e,t){if(wn.hasOwnProperty(e.text)){var i=wn[e.text].className||"";if("text"===e.mode){var o=Je.makeOrd(e,t,"textord");return o.classes.push(i),o}return Je.makeSpan(["mspace",i],[Je.mathsym(e.text,e.mode,t)],t)}if(yn.hasOwnProperty(e.text))return Je.makeSpan(["mspace",yn[e.text]],[],t);throw new n('Unknown type of space "'+e.text+'"')},mathmlBuilder:function(e,t){if(!wn.hasOwnProperty(e.text)){if(yn.hasOwnProperty(e.text))return new Et.MathNode("mspace");throw new n('Unknown type of space "'+e.text+'"')}return new Et.MathNode("mtext",[new Et.TextNode(" ")])}});var Cn=function(){var e=new Et.MathNode("mtd",[]);return e.setAttribute("width","50%"),e};ct({type:"tag",mathmlBuilder:function(e,t){var i=new Et.MathNode("mtable",[new Et.MathNode("mtr",[Cn(),new Et.MathNode("mtd",[Rt(e.body,t)]),Cn(),new Et.MathNode("mtd",[Rt(e.tag,t)])])]);return i.setAttribute("width","100%"),i}});var Sn={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},xn={"\\textbf":"textbf","\\textmd":"textmd"},kn={"\\textit":"textit","\\textup":"textup"},Dn=function(e,t){var i=e.font;return i?Sn[i]?t.withTextFontFamily(Sn[i]):xn[i]?t.withTextFontWeight(xn[i]):t.withTextFontShape(kn[i]):t};lt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler:function(e,t){var i=e.parser,n=e.funcName,o=t[0];return{type:"text",mode:i.mode,body:ht(o),font:n}},htmlBuilder:function(e,t){var i=Dn(e,t),n=_t(e.body,i,!0);return Je.makeSpan(["mord","text"],n,i)},mathmlBuilder:function(e,t){var i=Dn(e,t);return Rt(e.body,i)}}),lt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(e,t){return{type:"underline",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var i=St(e.body,t),n=Je.makeLineSpan("underline-line",t),o=t.fontMetrics().defaultRuleThickness,r=Je.makeVList({positionType:"top",positionData:i.height,children:[{type:"kern",size:o},{type:"elem",elem:n},{type:"kern",size:3*o},{type:"elem",elem:i}]},t);return Je.makeSpan(["mord","underline"],[r],t)},mathmlBuilder:function(e,t){var i=new Et.MathNode("mo",[new Et.TextNode("‾")]);i.setAttribute("stretchy","true");var n=new Et.MathNode("munder",[Ot(e.body,t),i]);return n.setAttribute("accentunder","true"),n}}),lt({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler:function(e,t){return{type:"vcenter",mode:e.parser.mode,body:t[0]}},htmlBuilder:function(e,t){var i=St(e.body,t),n=t.fontMetrics().axisHeight,o=.5*(i.height-n-(i.depth+n));return Je.makeVList({positionType:"shift",positionData:o,children:[{type:"elem",elem:i}]},t)},mathmlBuilder:function(e,t){return new Et.MathNode("mpadded",[Ot(e.body,t)],["vcenter"])}}),lt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(e,t,i){throw new n("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(e,t){for(var i=Ln(e),n=[],o=t.havingStyle(t.style.text()),r=0;r0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var o=this.undefStack[this.undefStack.length-1];o&&!o.hasOwnProperty(e)&&(o[e]=this.current[e])}this.current[e]=t},e}(),On={},Fn=On;function Pn(e,t){On[e]=t}Pn("\\noexpand",(function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}})),Pn("\\expandafter",(function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}})),Pn("\\@firstoftwo",(function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}})),Pn("\\@secondoftwo",(function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}})),Pn("\\@ifnextchar",(function(e){var t=e.consumeArgs(3);e.consumeSpaces();var i=e.future();return 1===t[0].length&&t[0][0].text===i.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}})),Pn("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Pn("\\TextOrMath",(function(e){var t=e.consumeArgs(2);return"text"===e.mode?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}));var Bn={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Pn("\\char",(function(e){var t,i=e.popToken(),o="";if("'"===i.text)t=8,i=e.popToken();else if('"'===i.text)t=16,i=e.popToken();else if("`"===i.text)if("\\"===(i=e.popToken()).text[0])o=i.text.charCodeAt(1);else{if("EOF"===i.text)throw new n("\\char` missing argument");o=i.text.charCodeAt(0)}else t=10;if(t){if(null==(o=Bn[i.text])||o>=t)throw new n("Invalid base-"+t+" digit "+i.text);for(var r;null!=(r=Bn[e.future().text])&&r":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};Pn("\\dots",(function(e){var t="\\dotso",i=e.expandAfterFuture().text;return i in Wn?t=Wn[i]:("\\not"===i.substr(0,4)||i in X.math&&l(["bin","rel"],X.math[i].group))&&(t="\\dotsb"),t}));var Vn={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};Pn("\\dotso",(function(e){return e.future().text in Vn?"\\ldots\\,":"\\ldots"})),Pn("\\dotsc",(function(e){var t=e.future().text;return t in Vn&&","!==t?"\\ldots\\,":"\\ldots"})),Pn("\\cdots",(function(e){return e.future().text in Vn?"\\@cdots\\,":"\\@cdots"})),Pn("\\dotsb","\\cdots"),Pn("\\dotsm","\\cdots"),Pn("\\dotsi","\\!\\cdots"),Pn("\\dotsx","\\ldots\\,"),Pn("\\DOTSI","\\relax"),Pn("\\DOTSB","\\relax"),Pn("\\DOTSX","\\relax"),Pn("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Pn("\\,","\\tmspace+{3mu}{.1667em}"),Pn("\\thinspace","\\,"),Pn("\\>","\\mskip{4mu}"),Pn("\\:","\\tmspace+{4mu}{.2222em}"),Pn("\\medspace","\\:"),Pn("\\;","\\tmspace+{5mu}{.2777em}"),Pn("\\thickspace","\\;"),Pn("\\!","\\tmspace-{3mu}{.1667em}"),Pn("\\negthinspace","\\!"),Pn("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Pn("\\negthickspace","\\tmspace-{5mu}{.277em}"),Pn("\\enspace","\\kern.5em "),Pn("\\enskip","\\hskip.5em\\relax"),Pn("\\quad","\\hskip1em\\relax"),Pn("\\qquad","\\hskip2em\\relax"),Pn("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Pn("\\tag@paren","\\tag@literal{({#1})}"),Pn("\\tag@literal",(function(e){if(e.macros.get("\\df@tag"))throw new n("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"})),Pn("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Pn("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Pn("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Pn("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Pn("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),Pn("\\newline","\\\\\\relax"),Pn("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Hn=$["Main-Regular"]["T".charCodeAt(0)][1]-.7*$["Main-Regular"]["A".charCodeAt(0)][1]+"em";Pn("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+Hn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),Pn("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+Hn+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),Pn("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Pn("\\@hspace","\\hskip #1\\relax"),Pn("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Pn("\\ordinarycolon",":"),Pn("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Pn("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Pn("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Pn("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Pn("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Pn("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Pn("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Pn("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Pn("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Pn("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Pn("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Pn("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Pn("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Pn("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Pn("∷","\\dblcolon"),Pn("∹","\\eqcolon"),Pn("≔","\\coloneqq"),Pn("≕","\\eqqcolon"),Pn("⩴","\\Coloneqq"),Pn("\\ratio","\\vcentcolon"),Pn("\\coloncolon","\\dblcolon"),Pn("\\colonequals","\\coloneqq"),Pn("\\coloncolonequals","\\Coloneqq"),Pn("\\equalscolon","\\eqqcolon"),Pn("\\equalscoloncolon","\\Eqqcolon"),Pn("\\colonminus","\\coloneq"),Pn("\\coloncolonminus","\\Coloneq"),Pn("\\minuscolon","\\eqcolon"),Pn("\\minuscoloncolon","\\Eqcolon"),Pn("\\coloncolonapprox","\\Colonapprox"),Pn("\\coloncolonsim","\\Colonsim"),Pn("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Pn("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Pn("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Pn("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Pn("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),Pn("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Pn("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Pn("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),Pn("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),Pn("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),Pn("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),Pn("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),Pn("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),Pn("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),Pn("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),Pn("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),Pn("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),Pn("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),Pn("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),Pn("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),Pn("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),Pn("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),Pn("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),Pn("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),Pn("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),Pn("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),Pn("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),Pn("\\imath","\\html@mathml{\\@imath}{ı}"),Pn("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),Pn("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),Pn("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),Pn("⟦","\\llbracket"),Pn("⟧","\\rrbracket"),Pn("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),Pn("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),Pn("⦃","\\lBrace"),Pn("⦄","\\rBrace"),Pn("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),Pn("⦵","\\minuso"),Pn("\\darr","\\downarrow"),Pn("\\dArr","\\Downarrow"),Pn("\\Darr","\\Downarrow"),Pn("\\lang","\\langle"),Pn("\\rang","\\rangle"),Pn("\\uarr","\\uparrow"),Pn("\\uArr","\\Uparrow"),Pn("\\Uarr","\\Uparrow"),Pn("\\N","\\mathbb{N}"),Pn("\\R","\\mathbb{R}"),Pn("\\Z","\\mathbb{Z}"),Pn("\\alef","\\aleph"),Pn("\\alefsym","\\aleph"),Pn("\\Alpha","\\mathrm{A}"),Pn("\\Beta","\\mathrm{B}"),Pn("\\bull","\\bullet"),Pn("\\Chi","\\mathrm{X}"),Pn("\\clubs","\\clubsuit"),Pn("\\cnums","\\mathbb{C}"),Pn("\\Complex","\\mathbb{C}"),Pn("\\Dagger","\\ddagger"),Pn("\\diamonds","\\diamondsuit"),Pn("\\empty","\\emptyset"),Pn("\\Epsilon","\\mathrm{E}"),Pn("\\Eta","\\mathrm{H}"),Pn("\\exist","\\exists"),Pn("\\harr","\\leftrightarrow"),Pn("\\hArr","\\Leftrightarrow"),Pn("\\Harr","\\Leftrightarrow"),Pn("\\hearts","\\heartsuit"),Pn("\\image","\\Im"),Pn("\\infin","\\infty"),Pn("\\Iota","\\mathrm{I}"),Pn("\\isin","\\in"),Pn("\\Kappa","\\mathrm{K}"),Pn("\\larr","\\leftarrow"),Pn("\\lArr","\\Leftarrow"),Pn("\\Larr","\\Leftarrow"),Pn("\\lrarr","\\leftrightarrow"),Pn("\\lrArr","\\Leftrightarrow"),Pn("\\Lrarr","\\Leftrightarrow"),Pn("\\Mu","\\mathrm{M}"),Pn("\\natnums","\\mathbb{N}"),Pn("\\Nu","\\mathrm{N}"),Pn("\\Omicron","\\mathrm{O}"),Pn("\\plusmn","\\pm"),Pn("\\rarr","\\rightarrow"),Pn("\\rArr","\\Rightarrow"),Pn("\\Rarr","\\Rightarrow"),Pn("\\real","\\Re"),Pn("\\reals","\\mathbb{R}"),Pn("\\Reals","\\mathbb{R}"),Pn("\\Rho","\\mathrm{P}"),Pn("\\sdot","\\cdot"),Pn("\\sect","\\S"),Pn("\\spades","\\spadesuit"),Pn("\\sub","\\subset"),Pn("\\sube","\\subseteq"),Pn("\\supe","\\supseteq"),Pn("\\Tau","\\mathrm{T}"),Pn("\\thetasym","\\vartheta"),Pn("\\weierp","\\wp"),Pn("\\Zeta","\\mathrm{Z}"),Pn("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Pn("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Pn("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Pn("\\bra","\\mathinner{\\langle{#1}|}"),Pn("\\ket","\\mathinner{|{#1}\\rangle}"),Pn("\\braket","\\mathinner{\\langle{#1}\\rangle}"),Pn("\\Bra","\\left\\langle#1\\right|"),Pn("\\Ket","\\left|#1\\right\\rangle"),Pn("\\angln","{\\angl n}"),Pn("\\blue","\\textcolor{##6495ed}{#1}"),Pn("\\orange","\\textcolor{##ffa500}{#1}"),Pn("\\pink","\\textcolor{##ff00af}{#1}"),Pn("\\red","\\textcolor{##df0030}{#1}"),Pn("\\green","\\textcolor{##28ae7b}{#1}"),Pn("\\gray","\\textcolor{gray}{#1}"),Pn("\\purple","\\textcolor{##9d38bd}{#1}"),Pn("\\blueA","\\textcolor{##ccfaff}{#1}"),Pn("\\blueB","\\textcolor{##80f6ff}{#1}"),Pn("\\blueC","\\textcolor{##63d9ea}{#1}"),Pn("\\blueD","\\textcolor{##11accd}{#1}"),Pn("\\blueE","\\textcolor{##0c7f99}{#1}"),Pn("\\tealA","\\textcolor{##94fff5}{#1}"),Pn("\\tealB","\\textcolor{##26edd5}{#1}"),Pn("\\tealC","\\textcolor{##01d1c1}{#1}"),Pn("\\tealD","\\textcolor{##01a995}{#1}"),Pn("\\tealE","\\textcolor{##208170}{#1}"),Pn("\\greenA","\\textcolor{##b6ffb0}{#1}"),Pn("\\greenB","\\textcolor{##8af281}{#1}"),Pn("\\greenC","\\textcolor{##74cf70}{#1}"),Pn("\\greenD","\\textcolor{##1fab54}{#1}"),Pn("\\greenE","\\textcolor{##0d923f}{#1}"),Pn("\\goldA","\\textcolor{##ffd0a9}{#1}"),Pn("\\goldB","\\textcolor{##ffbb71}{#1}"),Pn("\\goldC","\\textcolor{##ff9c39}{#1}"),Pn("\\goldD","\\textcolor{##e07d10}{#1}"),Pn("\\goldE","\\textcolor{##a75a05}{#1}"),Pn("\\redA","\\textcolor{##fca9a9}{#1}"),Pn("\\redB","\\textcolor{##ff8482}{#1}"),Pn("\\redC","\\textcolor{##f9685d}{#1}"),Pn("\\redD","\\textcolor{##e84d39}{#1}"),Pn("\\redE","\\textcolor{##bc2612}{#1}"),Pn("\\maroonA","\\textcolor{##ffbde0}{#1}"),Pn("\\maroonB","\\textcolor{##ff92c6}{#1}"),Pn("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Pn("\\maroonD","\\textcolor{##ca337c}{#1}"),Pn("\\maroonE","\\textcolor{##9e034e}{#1}"),Pn("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Pn("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Pn("\\purpleC","\\textcolor{##aa87ff}{#1}"),Pn("\\purpleD","\\textcolor{##7854ab}{#1}"),Pn("\\purpleE","\\textcolor{##543b78}{#1}"),Pn("\\mintA","\\textcolor{##f5f9e8}{#1}"),Pn("\\mintB","\\textcolor{##edf2df}{#1}"),Pn("\\mintC","\\textcolor{##e0e5cc}{#1}"),Pn("\\grayA","\\textcolor{##f6f7f7}{#1}"),Pn("\\grayB","\\textcolor{##f0f1f2}{#1}"),Pn("\\grayC","\\textcolor{##e3e5e6}{#1}"),Pn("\\grayD","\\textcolor{##d6d8da}{#1}"),Pn("\\grayE","\\textcolor{##babec2}{#1}"),Pn("\\grayF","\\textcolor{##888d93}{#1}"),Pn("\\grayG","\\textcolor{##626569}{#1}"),Pn("\\grayH","\\textcolor{##3b3e40}{#1}"),Pn("\\grayI","\\textcolor{##21242c}{#1}"),Pn("\\kaBlue","\\textcolor{##314453}{#1}"),Pn("\\kaGreen","\\textcolor{##71B307}{#1}");var $n={"\\relax":!0,"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Un=function(){function e(e,t,i){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new Rn(Fn,t.macros),this.mode=i,this.stack=[]}var t=e.prototype;return t.feed=function(e){this.lexer=new Tn(e,this.settings)},t.switchMode=function(e){this.mode=e},t.beginGroup=function(){this.macros.beginGroup()},t.endGroup=function(){this.macros.endGroup()},t.future=function(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]},t.popToken=function(){return this.future(),this.stack.pop()},t.pushToken=function(e){this.stack.push(e)},t.pushTokens=function(e){var t;(t=this.stack).push.apply(t,e)},t.scanArgument=function(e){var t,i,n;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken();var o=this.consumeArg(["]"]);n=o.tokens,i=o.end}else{var r=this.consumeArg();n=r.tokens,t=r.start,i=r.end}return this.pushToken(new An("EOF",i.loc)),this.pushTokens(n),t.range(i,"")},t.consumeSpaces=function(){for(;" "===this.future().text;)this.stack.pop()},t.consumeArg=function(e){var t=[],i=e&&e.length>0;i||this.consumeSpaces();var o,r=this.future(),s=0,a=0;do{if(o=this.popToken(),t.push(o),"{"===o.text)++s;else if("}"===o.text){if(-1==--s)throw new n("Extra }",o)}else if("EOF"===o.text)throw new n("Unexpected end of input in a macro argument, expected '"+(e&&i?e[a]:"}")+"'",o);if(e&&i)if((0===s||1===s&&"{"===e[a])&&o.text===e[a]){if(++a===e.length){t.splice(-a,a);break}}else a=0}while(0!==s||i);return"{"===r.text&&"}"===t[t.length-1].text&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:r,end:o}},t.consumeArgs=function(e,t){if(t){if(t.length!==e+1)throw new n("The length of delimiters doesn't match the number of args!");for(var i=t[0],o=0;othis.settings.maxExpand)throw new n("Too many expansions: infinite loop or need to increase maxExpand setting");var r=o.tokens,s=this.consumeArgs(o.numArgs,o.delimiters);if(o.numArgs)for(var a=(r=r.slice()).length-1;a>=0;--a){var l=r[a];if("#"===l.text){if(0===a)throw new n("Incomplete placeholder at end of macro body",l);if("#"===(l=r[--a]).text)r.splice(a+1,1);else{if(!/^[1-9]$/.test(l.text))throw new n("Not a valid argument number",l);var c;(c=r).splice.apply(c,[a,2].concat(s[+l.text-1]))}}}return this.pushTokens(r),r},t.expandAfterFuture=function(){return this.expandOnce(),this.future()},t.expandNextToken=function(){for(;;){var e=this.expandOnce();if(e instanceof An){if("\\relax"!==e.text&&!e.treatAsRelax)return this.stack.pop();this.stack.pop()}}throw new Error},t.expandMacro=function(e){return this.macros.has(e)?this.expandTokens([new An(e)]):void 0},t.expandTokens=function(e){var t=[],i=this.stack.length;for(this.pushTokens(e);this.stack.length>i;){var n=this.expandOnce(!0);n instanceof An&&(n.treatAsRelax&&(n.noexpand=!1,n.treatAsRelax=!1),t.push(this.stack.pop()))}return t},t.expandMacroAsText=function(e){var t=this.expandMacro(e);return t?t.map((function(e){return e.text})).join(""):t},t._getExpansion=function(e){var t=this.macros.get(e);if(null==t)return t;var i="function"==typeof t?t(this):t;if("string"==typeof i){var n=0;if(-1!==i.indexOf("#"))for(var o=i.replace(/##/g,"");-1!==o.indexOf("#"+(n+1));)++n;for(var r=new Tn(i,this.settings),s=[],a=r.lex();"EOF"!==a.text;)s.push(a),a=r.lex();return s.reverse(),{tokens:s,numArgs:n}}return i},t.isDefined=function(e){return this.macros.has(e)||Nn.hasOwnProperty(e)||X.math.hasOwnProperty(e)||X.text.hasOwnProperty(e)||$n.hasOwnProperty(e)},t.isExpandable=function(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Nn.hasOwnProperty(e)&&!Nn[e].primitive},e}(),jn={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"}},qn={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",č:"č",ĉ:"ĉ",ċ:"ċ",ď:"ď",ḋ:"ḋ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ĺ:"ĺ",ľ:"ľ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ď:"Ď",Ḋ:"Ḋ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ĺ:"Ĺ",Ľ:"Ľ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ť:"Ť",Ṫ:"Ṫ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"},Kn=function(){function e(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Un(e,t,this.mode),this.settings=t,this.leftrightDepth=0}var t=e.prototype;return t.expect=function(e,t){if(void 0===t&&(t=!0),this.fetch().text!==e)throw new n("Expected '"+e+"', got '"+this.fetch().text+"'",this.fetch());t&&this.consume()},t.consume=function(){this.nextToken=null},t.fetch=function(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken},t.switchMode=function(e){this.mode=e,this.gullet.switchMode(e)},t.parse=function(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");var e=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),e},t.parseExpression=function(t,i){for(var n=[];;){"math"===this.mode&&this.consumeSpaces();var o=this.fetch();if(-1!==e.endOfExpression.indexOf(o.text))break;if(i&&o.text===i)break;if(t&&Nn[o.text]&&Nn[o.text].infix)break;var r=this.parseAtom(i);if(!r)break;"internal"!==r.type&&n.push(r)}return"text"===this.mode&&this.formLigatures(n),this.handleInfixNodes(n)},t.handleInfixNodes=function(e){for(var t,i=-1,o=0;o=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+t[0]+'" used in math mode',e);var a,l=X[this.mode][t].group,c=En.range(e);if(G.hasOwnProperty(l)){var u=l;a={type:"atom",mode:this.mode,family:u,loc:c,text:t}}else a={type:l,mode:this.mode,loc:c,text:t};r=a}else{if(!(t.charCodeAt(0)>=128))return null;this.settings.strict&&(L(t.charCodeAt(0))?"math"===this.mode&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+t[0]+'" used in math mode',e):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+t[0]+'" ('+t.charCodeAt(0)+")",e)),r={type:"textord",mode:"text",loc:En.range(e),text:t}}if(this.consume(),s)for(var h=0;h{"use strict";const n=i(4411),o=Symbol("max"),r=Symbol("length"),s=Symbol("lengthCalculator"),a=Symbol("allowStale"),l=Symbol("maxAge"),c=Symbol("dispose"),u=Symbol("noDisposeOnSet"),h=Symbol("lruList"),d=Symbol("cache"),g=Symbol("updateAgeOnGet"),f=()=>1,p=(e,t,i)=>{const n=e[d].get(t);if(n){const t=n.value;if(m(e,t)){if(v(e,n),!e[a])return}else i&&(e[g]&&(n.value.now=Date.now()),e[h].unshiftNode(n));return t.value}},m=(e,t)=>{if(!t||!t.maxAge&&!e[l])return!1;const i=Date.now()-t.now;return t.maxAge?i>t.maxAge:e[l]&&i>e[l]},_=e=>{if(e[r]>e[o])for(let t=e[h].tail;e[r]>e[o]&&null!==t;){const i=t.prev;v(e,t),t=i}},v=(e,t)=>{if(t){const i=t.value;e[c]&&e[c](i.key,i.value),e[r]-=i.length,e[d].delete(i.key),e[h].removeNode(t)}};class b{constructor(e,t,i,n,o){this.key=e,this.value=t,this.length=i,this.now=n,this.maxAge=o||0}}const y=(e,t,i,n)=>{let o=i.value;m(e,o)&&(v(e,i),e[a]||(o=void 0)),o&&t.call(n,o.value,o.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[o]=e.max||1/0;const t=e.length||f;if(this[s]="function"!=typeof t?f:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[l]=e.maxAge||0,this[c]=e.dispose,this[u]=e.noDisposeOnSet||!1,this[g]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[o]=e||1/0,_(this)}get max(){return this[o]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[l]=e,_(this)}get maxAge(){return this[l]}set lengthCalculator(e){"function"!=typeof e&&(e=f),e!==this[s]&&(this[s]=e,this[r]=0,this[h].forEach((e=>{e.length=this[s](e.value,e.key),this[r]+=e.length}))),_(this)}get lengthCalculator(){return this[s]}get length(){return this[r]}get itemCount(){return this[h].length}rforEach(e,t){t=t||this;for(let i=this[h].tail;null!==i;){const n=i.prev;y(this,e,i,t),i=n}}forEach(e,t){t=t||this;for(let i=this[h].head;null!==i;){const n=i.next;y(this,e,i,t),i=n}}keys(){return this[h].toArray().map((e=>e.key))}values(){return this[h].toArray().map((e=>e.value))}reset(){this[c]&&this[h]&&this[h].length&&this[h].forEach((e=>this[c](e.key,e.value))),this[d]=new Map,this[h]=new n,this[r]=0}dump(){return this[h].map((e=>!m(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[h]}set(e,t,i){if((i=i||this[l])&&"number"!=typeof i)throw new TypeError("maxAge must be a number");const n=i?Date.now():0,a=this[s](t,e);if(this[d].has(e)){if(a>this[o])return v(this,this[d].get(e)),!1;const s=this[d].get(e).value;return this[c]&&(this[u]||this[c](e,s.value)),s.now=n,s.maxAge=i,s.value=t,this[r]+=a-s.length,s.length=a,this.get(e),_(this),!0}const g=new b(e,t,a,n,i);return g.length>this[o]?(this[c]&&this[c](e,t),!1):(this[r]+=g.length,this[h].unshift(g),this[d].set(e,this[h].head),_(this),!0)}has(e){if(!this[d].has(e))return!1;const t=this[d].get(e).value;return!m(this,t)}get(e){return p(this,e,!0)}peek(e){return p(this,e,!1)}pop(){const e=this[h].tail;return e?(v(this,e),e.value):null}del(e){v(this,this[d].get(e))}load(e){this.reset();const t=Date.now();for(let i=e.length-1;i>=0;i--){const n=e[i],o=n.e||0;if(0===o)this.set(n.k,n.v);else{const e=o-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[d].forEach(((e,t)=>p(this,t,!1)))}}},8850:function(e){e.exports=function(){"use strict";function e(e,t){for(var i=0;ie.length)&&(t=e.length);for(var i=0,n=new Array(t);i=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var n=function(e){var t={exports:{}};return e(t,t.exports),t.exports}((function(e){function t(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1},getDefaults:t,changeDefaults:function(t){e.exports.defaults=t}}})),o=/[&<>"']/,r=/[&<>"']/g,s=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},c=function(e){return l[e]};var u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function h(e){return e.replace(u,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var d=/(^|[^\[])\^/g;var g=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;var p={},m=/^[^:]+:\/*[^/]*$/,_=/^([^:]+:)[\s\S]*$/,v=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(e,t){p[" "+e]||(m.test(e)?p[" "+e]=e+"/":p[" "+e]=y(e,"/",!0));var i=-1===(e=p[" "+e]).indexOf(":");return"//"===t.substring(0,2)?i?t:e.replace(_,"$1")+t:"/"===t.charAt(0)?i?t:e.replace(v,"$1")+t:e+t}function y(e,t,i){var n=e.length;if(0===n)return"";for(var o=0;o=0&&"\\"===i[o];)n=!n;return n?"|":" |"})).split(/ \|/),n=0;if(i.length>t)i.splice(t);else for(;i.length1;)1&t&&(i+=e),t>>=1,e+=e;return i+e},I=n.defaults,T=N,R=L,O=w,F=E;function P(e,t,i){var n=t.href,o=t.title?O(t.title):null,r=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:i,href:n,title:o,text:r}:{type:"image",raw:i,href:n,title:o,text:O(r)}}var B=function(){function e(e){this.options=e||I}var t=e.prototype;return t.space=function(e){var t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e){var t=this.rules.block.code.exec(e);if(t){var i=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?i:T(i,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var i=t[0],n=function(e,t){var i=e.match(/^(\s+)(?:```)/);if(null===i)return t;var n=i[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=n.length?e.slice(n.length):e})).join("\n")}(i,t[3]||"");return{type:"code",raw:i,lang:t[2]?t[2].trim():t[2],text:n}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var i=t[2].trim();if(/#$/.test(i)){var n=T(i,"#");this.options.pedantic?i=n.trim():n&&!/ $/.test(n)||(i=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:i}}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var i={type:"table",header:R(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(i.header.length===i.align.length){var n,o=i.align.length;for(n=0;n ?/gm,"");return{type:"blockquote",raw:t[0],text:i}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){var i,n,o,r,s,a,l,c,u=t[0],h=t[2],d=h.length>1,g={type:"list",raw:u,ordered:d,start:d?+h.slice(0,-1):"",loose:!1,items:[]},f=t[0].match(this.rules.block.item),p=!1,m=f.length;o=this.rules.block.listItemStart.exec(f[0]);for(var _=0;_o[1].length:r[1].length>o[0].length||r[1].length>3){f.splice(_,2,f[_]+"\n"+f[_+1]),_--,m--;continue}(!this.options.pedantic||this.options.smartLists?r[2][r[2].length-1]!==h[h.length-1]:d===(1===r[2].length))&&(s=f.slice(_+1).join("\n"),g.raw=g.raw.substring(0,g.raw.length-s.length),_=m-1),o=r}n=i.length,~(i=i.replace(/^ *([*+-]|\d+[.)]) ?/,"")).indexOf("\n ")&&(n-=i.length,i=this.options.pedantic?i.replace(/^ {1,4}/gm,""):i.replace(new RegExp("^ {1,"+n+"}","gm"),"")),a=p||/\n\n(?!\s*$)/.test(i),_!==m-1&&(p="\n"===i.charAt(i.length-1),a||(a=p)),a&&(g.loose=!0),this.options.gfm&&(c=void 0,(l=/^\[[ xX]\] /.test(i))&&(c=" "!==i[1],i=i.replace(/^\[[ xX]\] +/,""))),g.items.push({type:"list_item",raw:u,task:l,checked:c,loose:a,text:i})}return g}},t.html=function(e){var t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):O(t[0]):t[0]}},t.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},t.table=function(e){var t=this.rules.block.table.exec(e);if(t){var i={type:"table",header:R(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(i.header.length===i.align.length){i.raw=t[0];var n,o=i.align.length;for(n=0;n/i.test(n[0])&&(t=!1),!i&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?i=!0:i&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(i=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:t,inRawBlock:i,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):O(n[0]):n[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var i=t[2].trim();if(!this.options.pedantic&&/^$/.test(i))return;var n=T(i.slice(0,-1),"\\");if((i.length-n.length)%2==0)return}else{var o=F(t[2],"()");if(o>-1){var r=(0===t[0].indexOf("!")?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,r).trim(),t[3]=""}}var s=t[2],a="";if(this.options.pedantic){var l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s);l&&(s=l[1],a=l[3])}else a=t[3]?t[3].slice(1,-1):"";return s=s.trim(),/^$/.test(i)?s.slice(1):s.slice(1,-1)),P(t,{href:s?s.replace(this.rules.inline._escapes,"$1"):s,title:a?a.replace(this.rules.inline._escapes,"$1"):a},t[0])}},t.reflink=function(e,t){var i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){var n=(i[2]||i[1]).replace(/\s+/g," ");if(!(n=t[n.toLowerCase()])||!n.href){var o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return P(i,n,i[0])}},t.emStrong=function(e,t,i){void 0===i&&(i="");var n=this.rules.inline.emStrong.lDelim.exec(e);if(n&&(!n[3]||!i.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\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\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\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\u1369-\u137C\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\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\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\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\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-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\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-\uAB69\uAB70-\uABE2\uABF0-\uABF9\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\uFF10-\uFF19\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\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\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\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\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]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\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]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var o=n[1]||n[2]||"";if(!o||o&&(""===i||this.rules.inline.punctuation.exec(i))){var r,s,a=n[0].length-1,l=a,c=0,u="*"===n[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+a);null!=(n=u.exec(t));)if(r=n[1]||n[2]||n[3]||n[4]||n[5]||n[6])if(s=r.length,n[3]||n[4])l+=s;else if(!((n[5]||n[6])&&a%3)||(a+s)%3){if(!((l-=s)>0)){if(l+c-s<=0&&!t.slice(u.lastIndex).match(u)&&(s=Math.min(s,s+l+c)),Math.min(a,s)%2)return{type:"em",raw:e.slice(0,a+n.index+s+1),text:e.slice(1,a+n.index+s)};if(Math.min(a,s)%2==0)return{type:"strong",raw:e.slice(0,a+n.index+s+1),text:e.slice(2,a+n.index+s-1)}}}else c+=s}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var i=t[2].replace(/\n/g," "),n=/[^ ]/.test(i),o=/^ /.test(i)&&/ $/.test(i);return n&&o&&(i=i.substring(1,i.length-1)),i=O(i,!0),{type:"codespan",raw:t[0],text:i}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2]}},t.autolink=function(e,t){var i,n,o=this.rules.inline.autolink.exec(e);if(o)return n="@"===o[2]?"mailto:"+(i=O(this.options.mangle?t(o[1]):o[1])):i=O(o[1]),{type:"link",raw:o[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}},t.url=function(e,t){var i;if(i=this.rules.inline.url.exec(e)){var n,o;if("@"===i[2])o="mailto:"+(n=O(this.options.mangle?t(i[0]):i[0]));else{var r;do{r=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0]}while(r!==i[0]);n=O(i[0]),o="www."===i[1]?"http://"+n:n}return{type:"link",raw:i[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}},t.inlineText=function(e,t,i){var n,o=this.rules.inline.text.exec(e);if(o)return n=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(o[0]):O(o[0]):o[0]:O(this.options.smartypants?i(o[0]):o[0]),{type:"text",raw:o[0],text:n}},e}(),z=k,W=S,V=D,H={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:z,table:z,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};H.def=W(H.def).replace("label",H._label).replace("title",H._title).getRegex(),H.bullet=/(?:[*+-]|\d{1,9}[.)])/,H.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,H.item=W(H.item,"gm").replace(/bull/g,H.bullet).getRegex(),H.listItemStart=W(/^( *)(bull)/).replace("bull",H.bullet).getRegex(),H.list=W(H.list).replace(/bull/g,H.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+H.def.source+")").getRegex(),H._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",H._comment=/|$)/,H.html=W(H.html,"i").replace("comment",H._comment).replace("tag",H._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),H.paragraph=W(H._paragraph).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.blockquote=W(H.blockquote).replace("paragraph",H.paragraph).getRegex(),H.normal=V({},H),H.gfm=V({},H.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),H.gfm.nptable=W(H.gfm.nptable).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.gfm.table=W(H.gfm.table).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.pedantic=V({},H.normal,{html:W("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",H._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:z,paragraph:W(H.normal._paragraph).replace("hr",H.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",H.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var $={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:z,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/\_\_[^_]*?\*[^_]*?\_\_|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/\*\*[^*]*?\_[^*]*?\*\*|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:z,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};$.punctuation=W($.punctuation).replace(/punctuation/g,$._punctuation).getRegex(),$.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,$.escapedEmSt=/\\\*|\\_/g,$._comment=W(H._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),$.emStrong.lDelim=W($.emStrong.lDelim).replace(/punct/g,$._punctuation).getRegex(),$.emStrong.rDelimAst=W($.emStrong.rDelimAst,"g").replace(/punct/g,$._punctuation).getRegex(),$.emStrong.rDelimUnd=W($.emStrong.rDelimUnd,"g").replace(/punct/g,$._punctuation).getRegex(),$._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,$._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,$._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,$.autolink=W($.autolink).replace("scheme",$._scheme).replace("email",$._email).getRegex(),$._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,$.tag=W($.tag).replace("comment",$._comment).replace("attribute",$._attribute).getRegex(),$._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,$._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,$._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,$.link=W($.link).replace("label",$._label).replace("href",$._href).replace("title",$._title).getRegex(),$.reflink=W($.reflink).replace("label",$._label).getRegex(),$.reflinkSearch=W($.reflinkSearch,"g").replace("reflink",$.reflink).replace("nolink",$.nolink).getRegex(),$.normal=V({},$),$.pedantic=V({},$.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:W(/^!?\[(label)\]\((.*?)\)/).replace("label",$._label).getRegex(),reflink:W(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",$._label).getRegex()}),$.gfm=V({},$.normal,{escape:W($.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(i="x"+i.toString(16)),n+="&#"+i+";";return n}var X=function(){function t(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||j,this.options.tokenizer=this.options.tokenizer||new B,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:q.normal,inline:K.normal};this.options.pedantic?(t.block=q.pedantic,t.inline=K.pedantic):this.options.gfm&&(t.block=q.gfm,this.options.breaks?t.inline=K.breaks:t.inline=K.gfm),this.tokenizer.rules=t}t.lex=function(e,i){return new t(i).lex(e)},t.lexInline=function(e,i){return new t(i).inlineTokens(e)};var i,n,o,r=t.prototype;return r.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},r.blockTokens=function(e,t,i){var n,o,r,s;for(void 0===t&&(t=[]),void 0===i&&(i=!0),this.options.pedantic&&(e=e.replace(/^ +$/gm,""));e;)if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),n.type&&t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),(s=t[t.length-1])&&"paragraph"===s.type?(s.raw+="\n"+n.raw,s.text+="\n"+n.text):t.push(n);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.nptable(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),n.tokens=this.blockTokens(n.text,[],i),t.push(n);else if(n=this.tokenizer.list(e)){for(e=e.substring(n.raw.length),r=n.items.length,o=0;o0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(c));)u.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,s.index)+"["+G("a",s[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,s.index)+"["+G("a",s[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(s=this.tokenizer.rules.inline.escapedEmSt.exec(c));)c=c.slice(0,s.index)+"++"+c.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(a||(l=""),a=!1,o=this.tokenizer.escape(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.tag(e,i,n)){e=e.substring(o.raw.length),i=o.inLink,n=o.inRawBlock;var h=t[t.length-1];h&&"text"===o.type&&"text"===h.type?(h.raw+=o.raw,h.text+=o.text):t.push(o)}else if(o=this.tokenizer.link(e))e=e.substring(o.raw.length),"link"===o.type&&(o.tokens=this.inlineTokens(o.text,[],!0,n)),t.push(o);else if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);var d=t[t.length-1];"link"===o.type?(o.tokens=this.inlineTokens(o.text,[],!0,n),t.push(o)):d&&"text"===o.type&&"text"===d.type?(d.raw+=o.raw,d.text+=o.text):t.push(o)}else if(o=this.tokenizer.emStrong(e,c,l))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],i,n),t.push(o);else if(o=this.tokenizer.codespan(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.br(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.del(e))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],i,n),t.push(o);else if(o=this.tokenizer.autolink(e,Z))e=e.substring(o.raw.length),t.push(o);else if(i||!(o=this.tokenizer.url(e,Z))){if(o=this.tokenizer.inlineText(e,n,Y))e=e.substring(o.raw.length),"_"!==o.raw.slice(-1)&&(l=o.raw.slice(-1)),a=!0,(r=t[t.length-1])&&"text"===r.type?(r.raw+=o.raw,r.text+=o.text):t.push(o);else if(e){var g="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(g);break}throw new Error(g)}}else e=e.substring(o.raw.length),t.push(o);return t},i=t,o=[{key:"rules",get:function(){return{block:q,inline:K}}}],(n=null)&&e(i.prototype,n),o&&e(i,o),t}(),Q=n.defaults,J=x,ee=w,te=function(){function e(e){this.options=e||Q}var t=e.prototype;return t.code=function(e,t,i){var n=(t||"").match(/\S*/)[0];if(this.options.highlight){var o=this.options.highlight(e,n);null!=o&&o!==e&&(i=!0,e=o)}return e=e.replace(/\n$/,"")+"\n",n?'
    '+(i?e:ee(e,!0))+"
    \n":"
    "+(i?e:ee(e,!0))+"
    \n"},t.blockquote=function(e){return"
    \n"+e+"
    \n"},t.html=function(e){return e},t.heading=function(e,t,i,n){return this.options.headerIds?"'+e+"\n":""+e+"\n"},t.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},t.list=function(e,t,i){var n=t?"ol":"ul";return"<"+n+(t&&1!==i?' start="'+i+'"':"")+">\n"+e+"\n"},t.listitem=function(e){return"
  • "+e+"
  • \n"},t.checkbox=function(e){return" "},t.paragraph=function(e){return"

    "+e+"

    \n"},t.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},t.tablerow=function(e){return"\n"+e+"\n"},t.tablecell=function(e,t){var i=t.header?"th":"td";return(t.align?"<"+i+' align="'+t.align+'">':"<"+i+">")+e+"\n"},t.strong=function(e){return""+e+""},t.em=function(e){return""+e+""},t.codespan=function(e){return""+e+""},t.br=function(){return this.options.xhtml?"
    ":"
    "},t.del=function(e){return""+e+""},t.link=function(e,t,i){if(null===(e=J(this.options.sanitize,this.options.baseUrl,e)))return i;var n='"+i+""},t.image=function(e,t,i){if(null===(e=J(this.options.sanitize,this.options.baseUrl,e)))return i;var n=''+i+'":">")},t.text=function(e){return e},e}(),ie=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,i){return""+i},t.image=function(e,t,i){return""+i},t.br=function(){return""},e}(),ne=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var i=e,n=0;if(this.seen.hasOwnProperty(i)){n=this.seen[e];do{i=e+"-"+ ++n}while(this.seen.hasOwnProperty(i))}return t||(this.seen[e]=n,this.seen[i]=0),i},t.slug=function(e,t){void 0===t&&(t={});var i=this.serialize(e);return this.getNextSafeSlug(i,t.dryrun)},e}(),oe=n.defaults,re=C,se=function(){function e(e){this.options=e||oe,this.options.renderer=this.options.renderer||new te,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ie,this.slugger=new ne}e.parse=function(t,i){return new e(i).parse(t)},e.parseInline=function(t,i){return new e(i).parseInline(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var i,n,o,r,s,a,l,c,u,h,d,g,f,p,m,_,v,b,y="",w=e.length;for(i=0;i0&&"text"===m.tokens[0].type?(m.tokens[0].text=b+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&"text"===m.tokens[0].tokens[0].type&&(m.tokens[0].tokens[0].text=b+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:b}):p+=b),p+=this.parse(m.tokens,f),u+=this.renderer.listitem(p,v,_);y+=this.renderer.list(u,d,g);continue;case"html":y+=this.renderer.html(h.text);continue;case"paragraph":y+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(u=h.tokens?this.parseInline(h.tokens):h.text;i+1An error occurred:

    "+ce(e.message+"",!0)+"
    ";throw e}}return ge.options=ge.setOptions=function(e){return ae(ge.defaults,e),he(ge.defaults),ge},ge.getDefaults=ue,ge.defaults=de,ge.use=function(e){var t=ae({},e);if(e.renderer&&function(){var i=ge.defaults.renderer||new te,n=function(t){var n=i[t];i[t]=function(){for(var o=arguments.length,r=new Array(o),s=0;sAn error occurred:

    "+ce(e.message+"",!0)+"
    ";throw e}},ge.Parser=se,ge.parser=se.parse,ge.Renderer=te,ge.TextRenderer=ie,ge.Lexer=X,ge.lexer=X.lex,ge.Tokenizer=B,ge.Slugger=ne,ge.parse=ge,ge}()},158:(e,t,i)=>{var n;self.MonacoEnvironment=(n={editorWorkerService:"editor.worker.js"},{globalAPI:!1,getWorkerUrl:function(e,t){var o=i.p,r=(o?o.replace(/\/$/,"")+"/":"")+n[t];if(/^((http:)|(https:)|(file:)|(\/\/))/.test(r)){var s=String(window.location),a=s.substr(0,s.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(r.substring(0,a.length)!==a){var l=new Blob(["/*"+t+'*/importScripts("'+r+'");'],{type:"application/javascript"});return URL.createObjectURL(l)}}return r}}),i(9477),i(7355),i(7084),i(4594),i(2015),i(9093),i(3832),i(7956),i(9098),i(6522),i(8728),i(2834),i(7441),i(1372),i(3391),i(2943),i(3111),i(4818),i(2698),i(2097),i(2729),i(365),i(7043),i(9646),i(3554),i(638),i(2309),i(7586),i(7830),i(2408),i(674),i(4800),i(8486),i(517),i(7720),i(8944),i(8936),i(5048),i(4454),i(1955),i(3379),i(8250),i(5662),i(9720),i(7847),i(1725),i(185),i(3497),i(9453),i(661),e.exports=i(513),i(7365),i(3709)},6268:(e,t,i)=>{"use strict";i.d(t,{px:()=>r,WP:()=>s,fX:()=>a,ie:()=>l,mX:()=>c,vU:()=>h,Pf:()=>d,i7:()=>g,G6:()=>f,MG:()=>p,Dt:()=>m,$W:()=>_});var n=i(4669);class o{constructor(){this._zoomLevel=0,this._lastZoomLevelChangeTime=0,this._onDidChangeZoomLevel=new n.Q5,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this._zoomFactor=1}getZoomLevel(){return this._zoomLevel}getTimeSinceLastZoomLevelChanged(){return Date.now()-this._lastZoomLevelChangeTime}getZoomFactor(){return this._zoomFactor}getPixelRatio(){let e=document.createElement("canvas").getContext("2d");return(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}}function r(){return o.INSTANCE.getZoomLevel()}function s(){return o.INSTANCE.getTimeSinceLastZoomLevelChanged()}function a(e){return o.INSTANCE.onDidChangeZoomLevel(e)}function l(){return o.INSTANCE.getZoomFactor()}function c(){return o.INSTANCE.getPixelRatio()}o.INSTANCE=new o;const u=navigator.userAgent,h=u.indexOf("Firefox")>=0,d=u.indexOf("AppleWebKit")>=0,g=u.indexOf("Chrome")>=0,f=!g&&u.indexOf("Safari")>=0,p=!g&&!f&&d,m=u.indexOf("Android")>=0,_=window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches},161:(e,t,i)=>{"use strict";i.d(t,{D:()=>r});var n=i(6268),o=i(1432);const r={clipboard:{writeText:o.tY||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:o.tY||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:o.tY||n.$W?0:navigator.keyboard||n.G6?1:2,touch:"ontouchstart"in window||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0)}},3547:(e,t,i)=>{"use strict";i.d(t,{go:()=>n,TN:()=>o,P$:()=>r});const n={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:"text/plain"};class o{constructor(e){this.data=e}update(){}getData(){return this.data}}const r={CurrentDragAndDropData:void 0}},5321:(e,t,i)=>{"use strict";i.d(t,{PO:()=>f,Uw:()=>p,nm:()=>_,mu:()=>b,Gw:()=>y,Lo:()=>w,qV:()=>C,j_:()=>S,RE:()=>x,lI:()=>k,jL:()=>D,Y_:()=>M,Dx:()=>I,D6:()=>T,Ro:()=>O,xQ:()=>F,dp:()=>P,i:()=>B,DI:()=>z,w:()=>W,FK:()=>V,If:()=>H,wn:()=>$,jg:()=>U,Fx:()=>j,uU:()=>q,OO:()=>G,Ay:()=>Y,vY:()=>Z,dS:()=>X,fk:()=>ee,uN:()=>te,Re:()=>ie,tw:()=>ne,zB:()=>oe,vL:()=>re,_0:()=>se,go:()=>le,R3:()=>ce,mc:()=>ue,$:()=>fe,$Z:()=>pe,Cp:()=>me,H$:()=>_e,Uh:()=>ve,V3:()=>be,jt:()=>ye,wY:()=>we,_h:()=>Ce,_q:()=>Se,uB:()=>xe});var n=i(6268),o=i(4850),r=i(9069),s=i(3938),a=i(5393),l=i(7301),c=i(4669),u=i(5976),h=i(1432),d=i(6663),g=i(161);function f(e){for(;e.firstChild;)e.firstChild.remove()}function p(e){var t;return null!==(t=null==e?void 0:e.isConnected)&&void 0!==t&&t}class m{constructor(e,t,i,n){this._node=e,this._type=t,this._handler=i,this._options=n||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function _(e,t,i,n){return new m(e,t,i,n)}function v(e){return function(t){return e(new s.n(t))}}let b=function(e,t,i,n){let o=i;return"click"===t||"mousedown"===t?o=v(i):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(o=function(e){return function(t){return e(new r.y(t))}}(i)),_(e,t,o,n)},y=function(e,t,i){return w(e,v(t),i)};function w(e,t,i){return _(e,h.gn&&g.D.pointerEvents?ne.POINTER_DOWN:ne.MOUSE_DOWN,t,i)}function C(e,t,i){return _(e,h.gn&&g.D.pointerEvents?ne.POINTER_UP:ne.MOUSE_UP,t,i)}function S(e,t){return _(e,"mouseout",(i=>{let n=i.relatedTarget;for(;n&&n!==e;)n=n.parentNode;n!==e&&t(i)}))}function x(e,t){return _(e,"pointerout",(i=>{let n=i.relatedTarget;for(;n&&n!==e;)n=n.parentNode;n!==e&&t(i)}))}let k,D,L=null;class N{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){(0,l.dL)(e)}}static sort(e,t){return t.priority-e.priority}}!function(){let e=[],t=null,i=!1,n=!1,o=()=>{for(i=!1,t=e,e=[],n=!0;t.length>0;)t.sort(N.sort),t.shift().execute();n=!1};D=(t,n=0)=>{let r=new N(t,n);return e.push(r),i||(i=!0,function(e){if(!L){const e=e=>setTimeout((()=>e((new Date).getTime())),0);L=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||e}L.call(self,e)}(o)),r},k=(e,i)=>{if(n){let n=new N(e,i);return t.push(n),n}return D(e,i)}}();const E=function(e,t){return t};class A extends u.JT{constructor(e,t,i,n=E,o=8){super();let r=null,s=0,l=this._register(new a._F),c=()=>{s=(new Date).getTime(),i(r),r=null};this._register(_(e,t,(e=>{r=n(r,e);let t=(new Date).getTime()-s;t>=o?(l.cancel(),c()):l.setIfNotSet(c,o-t)})))}}function M(e,t,i,n,o){return new A(e,t,i,n,o)}function I(e){return document.defaultView.getComputedStyle(e,null)}function T(e){if(e!==document.body)return new O(e.clientWidth,e.clientHeight);if(h.gn&&window.visualViewport)return new O(window.visualViewport.width,window.visualViewport.height);if(window.innerWidth&&window.innerHeight)return new O(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new O(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new O(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}class R{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,i){let n=I(e),o="0";return n&&(o=n.getPropertyValue?n.getPropertyValue(t):n.getAttribute(i)),R.convertToPixels(e,o)}static getBorderLeftWidth(e){return R.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return R.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return R.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return R.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return R.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return R.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return R.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return R.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return R.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return R.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return R.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return R.getDimension(e,"margin-bottom","marginBottom")}}class O{constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new O(e,t):this}static is(e){return"object"==typeof e&&"number"==typeof e.height&&"number"==typeof e.width}static lift(e){return e instanceof O?e:new O(e.width,e.height)}static equals(e,t){return e===t||!(!e||!t)&&e.width===t.width&&e.height===t.height}}function F(e){let t=e.offsetParent,i=e.offsetTop,n=e.offsetLeft;for(;null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement;){i-=e.scrollTop;const o=K(e)?null:I(e);o&&(n-="rtl"!==o.direction?e.scrollLeft:-e.scrollLeft),e===t&&(n+=R.getBorderLeftWidth(e),i+=R.getBorderTopWidth(e),i+=e.offsetTop,n+=e.offsetLeft,t=e.offsetParent)}return{left:n,top:i}}function P(e,t,i){"number"==typeof t&&(e.style.width=`${t}px`),"number"==typeof i&&(e.style.height=`${i}px`)}function B(e){let t=e.getBoundingClientRect();return{left:t.left+z.scrollX,top:t.top+z.scrollY,width:t.width,height:t.height}}const z=new class{get scrollX(){return"number"==typeof window.scrollX?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft}get scrollY(){return"number"==typeof window.scrollY?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop}};function W(e){let t=R.getMarginLeft(e)+R.getMarginRight(e);return e.offsetWidth+t}function V(e){let t=R.getBorderLeftWidth(e)+R.getBorderRightWidth(e),i=R.getPaddingLeft(e)+R.getPaddingRight(e);return e.offsetWidth-t-i}function H(e){let t=R.getBorderTopWidth(e)+R.getBorderBottomWidth(e),i=R.getPaddingTop(e)+R.getPaddingBottom(e);return e.offsetHeight-t-i}function $(e){let t=R.getMarginTop(e)+R.getMarginBottom(e);return e.offsetHeight+t}function U(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function j(e,t,i){for(;e&&e.nodeType===e.ELEMENT_NODE;){if(e.classList.contains(t))return e;if(i)if("string"==typeof i){if(e.classList.contains(i))return null}else if(e===i)return null;e=e.parentNode}return null}function q(e,t,i){return!!j(e,t,i)}function K(e){return e&&!!e.host&&!!e.mode}function G(e){return!!Y(e)}function Y(e){for(;e.parentNode;){if(e===document.body)return null;e=e.parentNode}return K(e)?e:null}function Z(){let e=document.activeElement;for(;null==e?void 0:e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function X(e=document.getElementsByTagName("head")[0]){let t=document.createElement("style");return t.type="text/css",t.media="screen",e.appendChild(t),t}let Q=null;function J(){return Q||(Q=X()),Q}function ee(e,t,i=J()){i&&t&&i.sheet.insertRule(e+"{"+t+"}",0)}function te(e,t=J()){if(!t)return;let i=function(e){var t,i;return(null===(t=null==e?void 0:e.sheet)||void 0===t?void 0:t.rules)?e.sheet.rules:(null===(i=null==e?void 0:e.sheet)||void 0===i?void 0:i.cssRules)?e.sheet.cssRules:[]}(t),n=[];for(let t=0;t=0;e--)t.sheet.deleteRule(n[e])}function ie(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName}const ne={CLICK:"click",AUXCLICK:"auxclick",DBLCLICK:"dblclick",MOUSE_UP:"mouseup",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_MOVE:"mousemove",MOUSE_OUT:"mouseout",MOUSE_ENTER:"mouseenter",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",SELECT:"select",CHANGE:"change",SUBMIT:"submit",RESET:"reset",FOCUS:"focus",FOCUS_IN:"focusin",FOCUS_OUT:"focusout",BLUR:"blur",INPUT:"input",STORAGE:"storage",DRAG_START:"dragstart",DRAG:"drag",DRAG_ENTER:"dragenter",DRAG_LEAVE:"dragleave",DRAG_OVER:"dragover",DROP:"drop",DRAG_END:"dragend",ANIMATION_START:n.Pf?"webkitAnimationStart":"animationstart",ANIMATION_END:n.Pf?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:n.Pf?"webkitAnimationIteration":"animationiteration"},oe={stop:function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)}};function re(e){let t=[];for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)t[i]=e.scrollTop,e=e.parentNode;return t}function se(e,t){for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)e.scrollTop!==t[i]&&(e.scrollTop=t[i]),e=e.parentNode}class ae extends u.JT{constructor(e){super(),this._onDidFocus=this._register(new c.Q5),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new c.Q5),this.onDidBlur=this._onDidBlur.event;let t=U(document.activeElement,e),i=!1;const n=()=>{i=!1,t||(t=!0,this._onDidFocus.fire())},r=()=>{t&&(i=!0,window.setTimeout((()=>{i&&(i=!1,t=!1,this._onDidBlur.fire())}),0))};this._refreshStateHandler=()=>{U(document.activeElement,e)!==t&&(t?r():n())},this._register((0,o.jt)(e,ne.FOCUS,!0)(n)),this._register((0,o.jt)(e,ne.BLUR,!0)(r))}}function le(e){return new ae(e)}function ce(e,...t){if(e.append(...t),1===t.length&&"string"!=typeof t[0])return t[0]}function ue(e,...t){e.innerText="",ce(e,...t)}const he=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var de;function ge(e,t,i,...n){let o=he.exec(t);if(!o)throw new Error("Bad use of emmet");i=Object.assign({},i||{});let r,s=o[1]||"div";return r=e!==de.HTML?document.createElementNS(e,s):document.createElement(s),o[3]&&(r.id=o[3]),o[4]&&(r.className=o[4].replace(/\./g," ").trim()),Object.keys(i).forEach((e=>{const t=i[e];void 0!==t&&(/^on\w+$/.test(e)?r[e]=t:"selected"===e?t&&r.setAttribute(e,"true"):r.setAttribute(e,t))})),r.append(...n),r}function fe(e,t,...i){return ge(de.HTML,e,t,...i)}function pe(...e){for(let t of e)t.style.display="",t.removeAttribute("aria-hidden")}function me(...e){for(let t of e)t.style.display="none",t.setAttribute("aria-hidden","true")}function _e(e){return Array.prototype.slice.call(document.getElementsByTagName(e),0)}function ve(e){const t=window.devicePixelRatio*e;return Math.max(1,Math.floor(t))/window.devicePixelRatio}function be(e){window.open(e,"_blank","noopener")}function ye(e){const t=()=>{e(),i=D(t)};let i=D(t);return(0,u.OF)((()=>i.dispose()))}function we(e){return e?`url('${d.Gi.asBrowserUri(e).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function Ce(e){return`'${e.replace(/'/g,"%27")}'`}!function(e){e.HTML="http://www.w3.org/1999/xhtml",e.SVG="http://www.w3.org/2000/svg"}(de||(de={})),fe.SVG=function(e,t,...i){return ge(de.SVG,e,t,...i)},d.WX.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");class Se extends c.Q5{constructor(){super(),this._subscriptions=new u.SL,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add((0,o.jt)(window,"keydown",!0)((e=>{if(e.defaultPrevented)return;const t=new r.y(e);if(6!==t.keyCode||!e.repeat){if(e.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(e.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(e.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(e.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else{if(6===t.keyCode)return;this._keyStatus.lastKeyPressed=void 0}this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=e,this.fire(this._keyStatus))}}))),this._subscriptions.add((0,o.jt)(window,"keyup",!0)((e=>{e.defaultPrevented||(!e.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!e.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!e.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!e.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=e,this.fire(this._keyStatus)))}))),this._subscriptions.add((0,o.jt)(document.body,"mousedown",!0)((e=>{this._keyStatus.lastKeyPressed=void 0}))),this._subscriptions.add((0,o.jt)(document.body,"mouseup",!0)((e=>{this._keyStatus.lastKeyPressed=void 0}))),this._subscriptions.add((0,o.jt)(document.body,"mousemove",!0)((e=>{e.buttons&&(this._keyStatus.lastKeyPressed=void 0)}))),this._subscriptions.add((0,o.jt)(window,"blur")((e=>{this.resetKeyStatus()})))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return Se.instance||(Se.instance=new Se),Se.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}function xe(e,t){const i=window.matchMedia(e);"function"==typeof i.addEventListener?i.addEventListener("change",t):i.addListener(t)}},4850:(e,t,i)=>{"use strict";i.d(t,{jt:()=>o,Yp:()=>r,p7:()=>s,sT:()=>a});var n=i(4669);const o=(e,t,i)=>{const o=e=>r.fire(e),r=new n.Q5({onFirstListenerAdd:()=>{e.addEventListener(t,o,i)},onLastListenerRemove:()=>{e.removeEventListener(t,o,i)}});return r.event};class r{constructor(e,t,i){const o=e=>this.emitter.fire(e);this.emitter=new n.Q5({onFirstListenerAdd:()=>e.addEventListener(t,o,i),onLastListenerRemove:()=>e.removeEventListener(t,o,i)})}get event(){return this.emitter.event}dispose(){this.emitter.dispose()}}function s(e){return e.preventDefault(),e.stopPropagation(),e}function a(e){return n.ju.map(e,s)}},8626:(e,t,i)=>{"use strict";i.d(t,{Z:()=>n,X:()=>o});class n{constructor(e){this.domNode=e,this._maxWidth=-1,this._width=-1,this._height=-1,this._top=-1,this._left=-1,this._bottom=-1,this._right=-1,this._fontFamily="",this._fontWeight="",this._fontSize=-1,this._fontFeatureSettings="",this._lineHeight=-1,this._letterSpacing=-100,this._className="",this._display="",this._position="",this._visibility="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){this._maxWidth!==e&&(this._maxWidth=e,this.domNode.style.maxWidth=this._maxWidth+"px")}setWidth(e){this._width!==e&&(this._width=e,this.domNode.style.width=this._width+"px")}setHeight(e){this._height!==e&&(this._height=e,this.domNode.style.height=this._height+"px")}setTop(e){this._top!==e&&(this._top=e,this.domNode.style.top=this._top+"px")}unsetTop(){-1!==this._top&&(this._top=-1,this.domNode.style.top="")}setLeft(e){this._left!==e&&(this._left=e,this.domNode.style.left=this._left+"px")}setBottom(e){this._bottom!==e&&(this._bottom=e,this.domNode.style.bottom=this._bottom+"px")}setRight(e){this._right!==e&&(this._right=e,this.domNode.style.right=this._right+"px")}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){this._fontSize!==e&&(this._fontSize=e,this.domNode.style.fontSize=this._fontSize+"px")}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setLineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.domNode.style.lineHeight=this._lineHeight+"px")}setLetterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.domNode.style.letterSpacing=this._letterSpacing+"px")}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}function o(e){return new n(e)}},8764:(e,t,i)=>{"use strict";i.d(t,{IY:()=>o,BO:()=>r,az:()=>s});var n=i(5321);function o(e,t={}){const i=s(t);return i.textContent=e,i}function r(e,t={}){const i=s(t);return l(i,function(e,t){const i={type:1,children:[]};let n=0,o=i;const r=[],s=new a(e);for(;!s.eos();){let e=s.next();const i="\\"===e&&0!==c(s.peek(),t);if(i&&(e=s.next()),i||0===c(e,t)||e!==s.peek())if("\n"===e)2===o.type&&(o=r.pop()),o.children.push({type:8});else if(2!==o.type){const t={type:2,content:e};o.children.push(t),r.push(o),o=t}else o.content+=e;else{s.advance(),2===o.type&&(o=r.pop());const i=c(e,t);if(o.type===i||5===o.type&&6===i)o=r.pop();else{const e={type:i,children:[]};5===i&&(e.index=n,n++),o.children.push(e),r.push(o),o=e}}}return 2===o.type&&(o=r.pop()),r.length,i}(e,!!t.renderCodeSegements),t.actionHandler,t.renderCodeSegements),i}function s(e){const t=e.inline?"span":"div",i=document.createElement(t);return e.className&&(i.className=e.className),i}class a{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function l(e,t,i,o){let r;if(2===t.type)r=document.createTextNode(t.content||"");else if(3===t.type)r=document.createElement("b");else if(4===t.type)r=document.createElement("i");else if(7===t.type&&o)r=document.createElement("code");else if(5===t.type&&i){const e=document.createElement("a");e.href="#",i.disposeables.add(n.mu(e,"click",(e=>{i.callback(String(t.index),e)}))),r=e}else 8===t.type?r=document.createElement("br"):1===t.type&&(r=e);r&&e!==r&&e.appendChild(r),r&&Array.isArray(t.children)&&t.children.forEach((e=>{l(r,e,i,o)}))}function c(e,t){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return t?7:0;default:return 0}}},7974:(e,t,i)=>{"use strict";i.d(t,{e:()=>l,Z:()=>c});var n=i(5321),o=i(262),r=i(3938),s=i(5976),a=i(1432);function l(e,t){let i=new r.n(t);return i.preventDefault(),{leftButton:i.leftButton,buttons:i.buttons,posx:i.posx,posy:i.posy}}class c{constructor(){this._hooks=new s.SL,this._mouseMoveEventMerger=null,this._mouseMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._mouseMoveEventMerger=null,this._mouseMoveCallback=null;const i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(t)}isMonitoring(){return!!this._mouseMoveEventMerger}startMonitoring(e,t,i,s,l){if(this.isMonitoring())return;this._mouseMoveEventMerger=i,this._mouseMoveCallback=s,this._onStopCallback=l;const c=o.E.getSameOriginWindowChain(),u=a.gn?"pointermove":"mousemove",h=c.map((e=>e.window.document)),d=n.Ay(e);d&&h.unshift(d);for(const e of h)this._hooks.add(n.Y_(e,u,(e=>{e.buttons===t?this._mouseMoveCallback(e):this.stopMonitoring(!0)}),((e,t)=>this._mouseMoveEventMerger(e,t)))),this._hooks.add(n.nm(e,"mouseup",(e=>this.stopMonitoring(!0))));if(o.E.hasDifferentOriginAncestor()){let e=c[c.length-1];this._hooks.add(n.nm(e.window.document,"mouseout",(e=>{"html"===new r.n(e).target.tagName.toLowerCase()&&this.stopMonitoring(!0)}))),this._hooks.add(n.nm(e.window.document,"mouseover",(e=>{"html"===new r.n(e).target.tagName.toLowerCase()&&this.stopMonitoring(!0)}))),this._hooks.add(n.nm(e.window.document.body,"mouseleave",(e=>{this.stopMonitoring(!0)})))}}}},262:(e,t,i)=>{"use strict";i.d(t,{E:()=>s});let n=!1,o=null;function r(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,i=e.parent.location;if("null"!==t.origin&&"null"!==i.origin&&(t.protocol!==i.protocol||t.hostname!==i.hostname||t.port!==i.port))return n=!0,null}catch(e){return n=!0,null}return e.parent}class s{static getSameOriginWindowChain(){if(!o){o=[];let e,t=window;do{e=r(t),e?o.push({window:t,iframeElement:t.frameElement||null}):o.push({window:t,iframeElement:null}),t=e}while(t)}return o.slice(0)}static hasDifferentOriginAncestor(){return o||this.getSameOriginWindowChain(),n}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,n=0,o=this.getSameOriginWindowChain();for(const e of o){if(i+=e.window.scrollY,n+=e.window.scrollX,e.window===t)break;if(!e.iframeElement)break;let o=e.iframeElement.getBoundingClientRect();i+=o.top,n+=o.left}return{top:i,left:n}}}},9069:(e,t,i)=>{"use strict";i.d(t,{y:()=>u});var n=i(6268),o=i(2258),r=i(1432);let s=new Array(230),a=new Array(112);!function(){for(let e=0;e{"use strict";i.d(t,{n:()=>s,q:()=>a});var n=i(6268),o=i(262),r=i(1432);class s{constructor(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=0===e.button,this.middleButton=1===e.button,this.rightButton=2===e.button,this.buttons=e.buttons,this.target=e.target,this.detail=e.detail||1,"dblclick"===e.type&&(this.detail=2),this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,"number"==typeof e.pageX?(this.posx=e.pageX,this.posy=e.pageY):(this.posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);let t=o.E.getPositionOfChildWindowRelativeToAncestorWindow(self,e.view);this.posx-=t.left,this.posy-=t.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class a{constructor(e,t=0,i=0){if(this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t,e){let t=e,i=e;if(void 0!==t.wheelDeltaY)this.deltaY=t.wheelDeltaY/120;else if(void 0!==i.VERTICAL_AXIS&&i.axis===i.VERTICAL_AXIS)this.deltaY=-i.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?n.vU&&!r.dz?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(void 0!==t.wheelDeltaX)n.G6&&r.ED?this.deltaX=-t.wheelDeltaX/120:this.deltaX=t.wheelDeltaX/120;else if(void 0!==i.HORIZONTAL_AXIS&&i.axis===i.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?n.vU&&!r.dz?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation()}}},553:(e,t,i)=>{"use strict";i.d(t,{t:()=>n,o:()=>l});var n,o=i(9488),r=i(5976),s=i(5321),a=i(9898);!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(n||(n={}));class l extends r.JT{constructor(){super(),this.dispatched=!1,this.activeTouches={},this.handle=null,this.targets=[],this.ignoreTargets=[],this._lastSetTapCountTime=0,this._register(s.nm(document,"touchstart",(e=>this.onTouchStart(e)),{passive:!1})),this._register(s.nm(document,"touchend",(e=>this.onTouchEnd(e)))),this._register(s.nm(document,"touchmove",(e=>this.onTouchMove(e)),{passive:!1}))}static addTarget(e){return l.isTouchDevice()?(l.INSTANCE||(l.INSTANCE=new l),l.INSTANCE.targets.push(e),{dispose:()=>{l.INSTANCE.targets=l.INSTANCE.targets.filter((t=>t!==e))}}):r.JT.None}static ignoreTarget(e){return l.isTouchDevice()?(l.INSTANCE||(l.INSTANCE=new l),l.INSTANCE.ignoreTargets.push(e),{dispose:()=>{l.INSTANCE.ignoreTargets=l.INSTANCE.ignoreTargets.filter((t=>t!==e))}}):r.JT.None}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0||window.navigator.msMaxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){let t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let i=0,o=e.targetTouches.length;i=l.HOLD_DELAY&&Math.abs(a.initialPageX-o.Gb(a.rollingPageX))<30&&Math.abs(a.initialPageY-o.Gb(a.rollingPageY))<30){let e=this.newGestureEvent(n.Contextmenu,a.initialTarget);e.pageX=o.Gb(a.rollingPageX),e.pageY=o.Gb(a.rollingPageY),this.dispatchEvent(e)}else if(1===i){let e=o.Gb(a.rollingPageX),i=o.Gb(a.rollingPageY),n=o.Gb(a.rollingTimestamps)-a.rollingTimestamps[0],r=e-a.rollingPageX[0],s=i-a.rollingPageY[0];const l=this.targets.filter((e=>a.initialTarget instanceof Node&&e.contains(a.initialTarget)));this.inertia(l,t,Math.abs(r)/n,r>0?1:-1,e,Math.abs(s)/n,s>0?1:-1,i)}this.dispatchEvent(this.newGestureEvent(n.End,a.initialTarget)),delete this.activeTouches[s.identifier]}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){let i=document.createEvent("CustomEvent");return i.initEvent(e,!1,!0),i.initialTarget=t,i.tapCount=0,i}dispatchEvent(e){if(e.type===n.Tap){const t=(new Date).getTime();let i=0;i=t-this._lastSetTapCountTime>l.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=t,e.tapCount=i}else e.type!==n.Change&&e.type!==n.Contextmenu||(this._lastSetTapCountTime=0);for(let t=0;t{e.initialTarget instanceof Node&&t.contains(e.initialTarget)&&(t.dispatchEvent(e),this.dispatched=!0)}))}inertia(e,t,i,o,r,a,c,u){this.handle=s.jL((()=>{let s=Date.now(),h=s-t,d=0,g=0,f=!0;i+=l.SCROLL_FRICTION*h,a+=l.SCROLL_FRICTION*h,i>0&&(f=!1,d=o*i*h),a>0&&(f=!1,g=c*a*h);let p=this.newGestureEvent(n.Change);p.translationX=d,p.translationY=g,e.forEach((e=>e.dispatchEvent(p))),f||this.inertia(e,s,i,o,r+d,a,c,u+g)}))}onTouchMove(e){let t=Date.now();for(let i=0,r=e.changedTouches.length;i3&&(s.rollingPageX.shift(),s.rollingPageY.shift(),s.rollingTimestamps.shift()),s.rollingPageX.push(r.pageX),s.rollingPageY.push(r.pageY),s.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}l.SCROLL_FRICTION=-.005,l.HOLD_DELAY=700,l.CLEAR_TAP_COUNT_TIME=400,function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([a.H],l,"isTouchDevice",null)},6033:(e,t,i)=>{"use strict";i.d(t,{Y:()=>d,g:()=>g});var n=i(1432),o=i(3580),r=i(5976),s=i(4741),a=i(8401),l=i(553),c=i(3547),u=i(6268),h=i(5321);class d extends r.JT{constructor(e,t,i={}){super(),this.options=i,this._context=e||this,this._action=t,t instanceof s.aU&&this._register(t.onDidChange((e=>{this.element&&this.handleActionChangeEvent(e)})))}handleActionChangeEvent(e){void 0!==e.enabled&&this.updateEnabled(),void 0!==e.checked&&this.updateChecked(),void 0!==e.class&&this.updateClass(),void 0!==e.label&&(this.updateLabel(),this.updateTooltip()),void 0!==e.tooltip&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new s.Wi)),this._actionRunner}set actionRunner(e){this._actionRunner=e}getAction(){return this._action}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(l.o.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,u.vU&&this._register((0,h.nm)(e,h.tw.DRAG_START,(e=>{var t;return null===(t=e.dataTransfer)||void 0===t?void 0:t.setData(c.go.TEXT,this._action.label)})))),this._register((0,h.nm)(t,l.t.Tap,(e=>this.onClick(e)))),this._register((0,h.nm)(t,h.tw.MOUSE_DOWN,(e=>{i||h.zB.stop(e,!0),this._action.enabled&&0===e.button&&t.classList.add("active")}))),n.dz&&this._register((0,h.nm)(t,h.tw.CONTEXT_MENU,(e=>{0===e.button&&!0===e.ctrlKey&&this.onClick(e)}))),this._register((0,h.nm)(t,h.tw.CLICK,(e=>{h.zB.stop(e,!0),this.options&&this.options.isMenu||n.xS((()=>this.onClick(e)))}))),this._register((0,h.nm)(t,h.tw.DBLCLICK,(e=>{h.zB.stop(e,!0)}))),[h.tw.MOUSE_UP,h.tw.MOUSE_OUT].forEach((e=>{this._register((0,h.nm)(t,e,(e=>{h.zB.stop(e),t.classList.remove("active")})))}))}onClick(e){var t;h.zB.stop(e,!0);const i=a.Jp(this._context)?(null===(t=this.options)||void 0===t?void 0:t.useEventAsContext)?e:void 0:this._context;this.actionRunner.run(this._action,i)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}updateTooltip(){}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),super.dispose()}}class g extends d{constructor(e,t,i={}){super(e,t,i),this.options=i,this.options.icon=void 0!==i.icon&&i.icon,this.options.label=void 0===i.label||i.label,this.cssClass=""}render(e){super.render(e),this.element&&(this.label=(0,h.R3)(this.element,(0,h.$)("a.action-label"))),this.label&&(this._action.id===s.Z0.ID?this.label.setAttribute("role","presentation"):this.options.isMenu?this.label.setAttribute("role","menuitem"):this.label.setAttribute("role","button")),this.options.label&&this.options.keybinding&&this.element&&((0,h.R3)(this.element,(0,h.$)("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.getAction().label)}updateTooltip(){let e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=o.N({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.label&&(this.label.title=e)}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getAction().class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label&&this.label.classList.remove("codicon")}updateEnabled(){this.getAction().enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element&&this.element.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element&&this.element.classList.add("disabled"))}updateChecked(){this.label&&(this.getAction().checked?this.label.classList.add("checked"):this.label.classList.remove("checked"))}}},317:(e,t,i)=>{"use strict";i.d(t,{o:()=>u});var n=i(5976),o=i(4741),r=i(5321),s=i(8401),a=i(9069),l=i(4669),c=i(6033);class u extends n.JT{constructor(e,t={}){var i,n,s,u,h,d;let g,f;switch(super(),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new l.Q5),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new l.Q5({onFirstListenerAdd:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new l.Q5),this.onDidRun=this._onDidRun.event,this._onBeforeRun=this._register(new l.Q5),this.onBeforeRun=this._onBeforeRun.event,this.options=t,this._context=null!==(i=t.context)&&void 0!==i?i:null,this._orientation=null!==(n=this.options.orientation)&&void 0!==n?n:0,this._triggerKeys={keyDown:null!==(u=null===(s=this.options.triggerKeys)||void 0===s?void 0:s.keyDown)&&void 0!==u&&u,keys:null!==(d=null===(h=this.options.triggerKeys)||void 0===h?void 0:h.keys)&&void 0!==d?d:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new o.Wi,this._register(this._actionRunner)),this._register(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e)))),this._register(this._actionRunner.onBeforeRun((e=>this._onBeforeRun.fire(e)))),this._actionIds=[],this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",!1!==t.animated&&this.domNode.classList.add("animated"),this._orientation){case 0:g=[15],f=[17];break;case 1:g=[16],f=[18],this.domNode.className+=" vertical"}this._register(r.nm(this.domNode,r.tw.KEY_DOWN,(e=>{const t=new a.y(e);let i=!0;const n="number"==typeof this.focusedItem?this.viewItems[this.focusedItem]:void 0;g&&(t.equals(g[0])||t.equals(g[1]))?i=this.focusPrevious():f&&(t.equals(f[0])||t.equals(f[1]))?i=this.focusNext():t.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():t.equals(14)?i=this.focusFirst():t.equals(13)?i=this.focusLast():t.equals(2)&&n instanceof c.Y&&n.trapsArrowNavigation?i=this.focusNext():this.isTriggerKeyEvent(t)?this._triggerKeys.keyDown?this.doTrigger(t):this.triggerKeyDown=!0:i=!1,i&&(t.preventDefault(),t.stopPropagation())}))),this._register(r.nm(this.domNode,r.tw.KEY_UP,(e=>{const t=new a.y(e);this.isTriggerKeyEvent(t)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(t)),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026))&&this.updateFocusedItem()}))),this.focusTracker=this._register(r.go(this.domNode)),this._register(this.focusTracker.onDidBlur((()=>{r.vY()!==this.domNode&&r.jg(r.vY(),this.domNode)||(this._onDidBlur.fire(),this.focusedItem=void 0,this.triggerKeyDown=!1)}))),this._register(this.focusTracker.onDidFocus((()=>this.updateFocusedItem()))),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.actionsList.setAttribute("role","toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach((i=>{t=t||e.equals(i)})),t}updateFocusedItem(){for(let e=0;et.setActionContext(e)))}get actionRunner(){return this._actionRunner}set actionRunner(e){e&&(this._actionRunner=e,this.viewItems.forEach((t=>t.actionRunner=e)))}getContainer(){return this.domNode}push(e,t={}){const i=Array.isArray(e)?e:[e];let n=s.hj(t.index)?t.index:null;i.forEach((e=>{const i=document.createElement("li");let o;i.className="action-item",i.setAttribute("role","presentation"),this.options.allowContextMenu||this._register(r.nm(i,r.tw.CONTEXT_MENU,(e=>{r.zB.stop(e,!0)}))),this.options.actionViewItemProvider&&(o=this.options.actionViewItemProvider(e)),o||(o=new c.g(this.context,e,t)),o.actionRunner=this._actionRunner,o.setActionContext(this.context),o.render(i),this.focusable&&o instanceof c.Y&&0===this.viewItems.length&&o.setFocusable(!0),null===n||n<0||n>=this.actionsList.children.length?(this.actionsList.appendChild(i),this.viewItems.push(o),this._actionIds.push(e.id)):(this.actionsList.insertBefore(i,this.actionsList.children[n]),this.viewItems.splice(n,0,o),this._actionIds.splice(n,0,e.id),n++)})),"number"==typeof this.focusedItem&&this.focus(this.focusedItem)}clear(){(0,n.B9)(this.viewItems),this.viewItems=[],this._actionIds=[],r.PO(this.actionsList)}length(){return this.viewItems.length}focus(e){let t,i=!1;if(void 0===e?i=!0:"number"==typeof e?t=e:"boolean"==typeof e&&(i=e),i&&void 0===this.focusedItem){const e=this.viewItems.findIndex((e=>e.isEnabled()));this.focusedItem=-1===e?void 0:e,this.updateFocus()}else void 0!==t&&(this.focusedItem=t),this.updateFocus()}focusFirst(){return this.focusedItem=this.length()>1?1:0,this.focusPrevious()}focusLast(){return this.focusedItem=this.length()<2?0:this.length()-2,this.focusNext()}focusNext(){if(void 0===this.focusedItem)this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const e=this.focusedItem;let t;do{if(this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=e,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,t=this.viewItems[this.focusedItem]}while(this.focusedItem!==e&&this.options.focusOnlyEnabledItems&&!t.isEnabled());return this.updateFocus(),!0}focusPrevious(){if(void 0===this.focusedItem)this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const e=this.focusedItem;let t;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(this.options.preventLoopNavigation)return this.focusedItem=e,!1;this.focusedItem=this.viewItems.length-1}t=this.viewItems[this.focusedItem]}while(this.focusedItem!==e&&this.options.focusOnlyEnabledItems&&!t.isEnabled());return this.updateFocus(!0),!0}updateFocus(e,t){void 0===this.focusedItem&&this.actionsList.focus({preventScroll:t});for(let i=0;i{"use strict";i.d(t,{wW:()=>u,Z9:()=>h,i7:()=>d});var n=i(1432),o=i(5321);let r,s,a,l,c;function u(e){r=document.createElement("div"),r.className="monaco-aria-container";const t=()=>{const e=document.createElement("div");return e.className="monaco-alert",e.setAttribute("role","alert"),e.setAttribute("aria-atomic","true"),r.appendChild(e),e};s=t(),a=t();const i=()=>{const e=document.createElement("div");return e.className="monaco-status",e.setAttribute("role","complementary"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),r.appendChild(e),e};l=i(),c=i(),e.appendChild(r)}function h(e){r&&(s.textContent!==e?(o.PO(a),g(s,e)):(o.PO(s),g(a,e)))}function d(e){r&&(n.dz?h(e):l.textContent!==e?(o.PO(c),g(l,e)):(o.PO(l),g(c,e)))}function g(e,t){o.PO(e),t.length>2e4&&(t=t.substr(0,2e4)),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}},8609:(e,t,i)=>{"use strict";i.d(t,{a:()=>o});var n=i(3046);function o(e){let t=e.definition;for(;t instanceof n.lA;)t=t.definition;return`.codicon-${e.id}:before { content: '${t.fontCharacter}'; }`}},7488:(e,t,i)=>{"use strict";i.d(t,{Z:()=>l});var n=i(5321),o=i(7295),r=i(1264),s=i(6248);const a={badgeBackground:r.Il.fromHex("#4D4D4D"),badgeForeground:r.Il.fromHex("#FFFFFF")};class l{constructor(e,t){this.count=0,this.options=t||Object.create(null),(0,s.jB)(this.options,a,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=(0,n.R3)(e,(0,n.$)(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){this.element.textContent=(0,o.WU)(this.countFormat,this.count),this.element.title=(0,o.WU)(this.titleFormat,this.count),this.applyStyles()}style(e){this.badgeBackground=e.badgeBackground,this.badgeForeground=e.badgeForeground,this.badgeBorder=e.badgeBorder,this.applyStyles()}applyStyles(){if(this.element){const e=this.badgeBackground?this.badgeBackground.toString():"",t=this.badgeForeground?this.badgeForeground.toString():"",i=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}}}},4650:(e,t,i)=>{"use strict";i.d(t,{q:()=>s});var n=i(6248),o=i(5321),r=i(6811);class s{constructor(e,t){this.supportIcons=t,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.domNode=document.createElement("span"),this.domNode.className="monaco-highlighted-label",e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t=[],i="",o){e||(e=""),o&&(e=s.escapeNewLines(e,t)),this.didEverRender&&this.text===e&&this.title===i&&n.fS(this.highlights,t)||(this.text=e,this.title=i,this.highlights=t,this.render())}render(){const e=[];let t=0;for(const i of this.highlights){if(i.end===i.start)continue;if(t{n="\r\n"===e?-1:0,o+=i;for(const e of t)e.end<=o||(e.start>=o&&(e.start+=n),e.end>=o&&(e.end+=n));return i+=n,"⏎"}))}}},8801:(e,t,i)=>{"use strict";i.d(t,{g:()=>p});var n=i(5321),o=i(4650),r=i(5976),s=i(1134),a=i(6248),l=i(8401),c=i(1050),u=i(4850),h=i(3580),d=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function g(e,t,i,n){if(e&&n)return void 0===t||void 0!==i.placement&&"mouse"!==i.placement||(e.target.x=t+10),i.showHover(e)}class f{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class p extends r.JT{constructor(e,t){super(),this.customHovers=new Map,this.domNode=this._register(new f(n.R3(e,n.$(".monaco-icon-label")))),this.labelContainer=n.R3(this.domNode.element,n.$(".monaco-icon-label-container"));const i=n.R3(this.labelContainer,n.$("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new f(n.R3(this.labelContainer,n.$("span.monaco-icon-description-container")))),(null==t?void 0:t.supportHighlights)||(null==t?void 0:t.supportIcons)?this.nameNode=new _(i,!!t.supportIcons):this.nameNode=new m(i),(null==t?void 0:t.supportDescriptionHighlights)?this.descriptionNodeFactory=()=>new o.q(n.R3(this.descriptionContainer.element,n.$("span.label-description")),!!t.supportIcons):this.descriptionNodeFactory=()=>this._register(new f(n.R3(this.descriptionContainer.element,n.$("span.label-description")))),this.hoverDelegate=null==t?void 0:t.hoverDelegate}setLabel(e,t,i){const n=["monaco-icon-label"];i&&(i.extraClasses&&n.push(...i.extraClasses),i.italic&&n.push("italic"),i.strikethrough&&n.push("strikethrough")),this.domNode.className=n.join(" "),this.setupHover(this.labelContainer,null==i?void 0:i.title),this.nameNode.setLabel(e,i),(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof o.q?(this.descriptionNode.set(t||"",i?i.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,null==i?void 0:i.descriptionTitle)):(this.descriptionNode.textContent=t||"",this.setupHover(this.descriptionNode.element,(null==i?void 0:i.descriptionTitle)||""),this.descriptionNode.empty=!t))}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),t)if(this.hoverDelegate){const i=function(e,t,i){if(!i)return;const o=function(e){if((0,l.HD)(e))return()=>d(this,void 0,void 0,(function*(){return e}));if((0,l.mf)(e.markdown))return e.markdown;{const t=e.markdown;return()=>d(this,void 0,void 0,(function*(){return t}))}}(i);let r,s,a,f,p=!1;const m=new u.Yp(t,n.tw.MOUSE_OVER,!0);return m.event((m=>{if(p)return;function _(e){const i=e.type===n.tw.MOUSE_DOWN;i&&(null==f||f.dispose(),f=void 0),(i||e.fromElement===t)&&(p=!1,r=void 0,a.dispose(!0),v.dispose(),b.dispose())}a=new c.A;const v=new u.Yp(t,n.tw.MOUSE_LEAVE,!0);v.event(_);const b=new u.Yp(t,n.tw.MOUSE_DOWN,!0);b.event(_),p=!0;const y=new u.Yp(t,n.tw.MOUSE_MOVE,!0);y.event((function(e){s=e.x})),setTimeout((()=>d(this,void 0,void 0,(function*(){var n;if(p&&o&&!r){const c={targetElements:[t],dispose:()=>{}};r={text:(0,h.N)("iconLabel.loading","Loading..."),target:c,hoverPosition:2},f=g(r,s,e,p);const u=null!==(n=yield o(a.token))&&void 0!==n?n:(0,l.HD)(i)?void 0:i.markdownNotSupportedFallback;u?(r={text:u,target:c,showPointer:"element"===e.placement,hoverPosition:2},f=g(r,s,e,p)):f&&(f.dispose(),f=void 0)}y.dispose()}))),e.delay)})),m}(this.hoverDelegate,e,t);i&&this.customHovers.set(e,i)}else!function(e,t){(0,l.HD)(t)?e.title=t:(null==t?void 0:t.markdownNotSupportedFallback)?e.title=t.markdownNotSupportedFallback:e.removeAttribute("title")}(e,t);else e.removeAttribute("title")}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}}class m{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!(0,a.fS)(this.options,t))if(this.label=e,this.options=t,"string"==typeof e)this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=n.R3(this.container,n.$("a.label-name",{id:null==t?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i{const o={start:n,end:n+e.length},r=i.map((e=>s.e.intersect(o,e))).filter((e=>!s.e.isEmpty(e))).map((({start:e,end:t})=>({start:e-n,end:t-n})));return n=o.end+t.length,r}))}(e,i,null==t?void 0:t.matches);for(let s=0;s{"use strict";i.d(t,{T:()=>s});var n=i(5321),o=i(3046);const r=new RegExp(`(\\\\)?\\$\\((${o.dT.iconNameExpression}(?:${o.dT.iconModifierExpression})?)\\)`,"g");function s(e){const t=new Array;let i,n=0,o=0;for(;null!==(i=r.exec(e));){o=i.index||0,t.push(e.substring(n,o)),n=(i.index||0)+i[0].length;const[,r,s]=i;t.push(r?`$(${s})`:a({id:s}))}return n{"use strict";i.d(t,{p:()=>b,W:()=>v});var n=i(3580),o=i(5321),r=i(8764),s=i(5152),a=i(317),l=i(4669),c=i(3794),u=i(1264),h=i(6248);class d{constructor(e,t=0,i=e.length,n=t-1){this.items=e,this.start=t,this.end=i,this.index=n}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class g{constructor(e=[],t=10){this._initialize(e),this._limit=t,this._onChange()}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._currentPosition()!==this._elements.length-1?this._navigator.next():null}previous(){return 0!==this._currentPosition()?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new d(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const t of e)this._history.add(t)}get _elements(){const e=[];return this._history.forEach((t=>e.push(t))),e}}var f=i(9802),p=i(4850);const m=o.$,_={inputBackground:u.Il.fromHex("#3C3C3C"),inputForeground:u.Il.fromHex("#CCCCCC"),inputValidationInfoBorder:u.Il.fromHex("#55AAFF"),inputValidationInfoBackground:u.Il.fromHex("#063B49"),inputValidationWarningBorder:u.Il.fromHex("#B89500"),inputValidationWarningBackground:u.Il.fromHex("#352A05"),inputValidationErrorBorder:u.Il.fromHex("#BE1100"),inputValidationErrorBackground:u.Il.fromHex("#5A1D1D")};class v extends c.${constructor(e,t,i){var n;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new l.Q5),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new l.Q5),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i||Object.create(null),(0,h.jB)(this.options,_,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=null!==(n=this.options.tooltip)&&void 0!==n?n:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.inputBackground=this.options.inputBackground,this.inputForeground=this.options.inputForeground,this.inputBorder=this.options.inputBorder,this.inputValidationInfoBorder=this.options.inputValidationInfoBorder,this.inputValidationInfoBackground=this.options.inputValidationInfoBackground,this.inputValidationInfoForeground=this.options.inputValidationInfoForeground,this.inputValidationWarningBorder=this.options.inputValidationWarningBorder,this.inputValidationWarningBackground=this.options.inputValidationWarningBackground,this.inputValidationWarningForeground=this.options.inputValidationWarningForeground,this.inputValidationErrorBorder=this.options.inputValidationErrorBorder,this.inputValidationErrorBackground=this.options.inputValidationErrorBackground,this.inputValidationErrorForeground=this.options.inputValidationErrorForeground,this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=o.R3(e,m(".monaco-inputbox.idle"));let r=this.options.flexibleHeight?"textarea":"input",s=o.R3(this.element,m(".ibwrapper"));if(this.input=o.R3(s,m(r+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,(()=>this.element.classList.add("synthetic-focus"))),this.onblur(this.input,(()=>this.element.classList.remove("synthetic-focus"))),this.options.flexibleHeight){this.maxHeight="number"==typeof this.options.flexibleMaxHeight?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=o.R3(s,m("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new f.NB(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),o.R3(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll((e=>this.input.scrollTop=e.scrollTop)));const t=l.ju.filter((0,p.jt)(document,"selectionchange"),(()=>{const e=document.getSelection();return(null==e?void 0:e.anchorNode)===s}));this._register(t(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,(()=>this.onValueChange())),this.onblur(this.input,(()=>this.onBlur())),this.onfocus(this.input,(()=>this.onFocus())),this.ignoreGesture(this.input),setTimeout((()=>this.updateMirror()),0),this.options.actions&&(this.actionbar=this._register(new a.o(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage()}onFocus(){this._showMessage()}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.input.title=e}setAriaLabel(e){this.ariaLabel=e,e?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}getAriaLabel(){return this.ariaLabel}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return"number"==typeof this.cachedHeight?this.cachedHeight:o.wn(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}get width(){return o.w(this.input)}set width(e){if(this.options.flexibleHeight&&this.options.flexibleWidth){let t=0;this.mirror&&(t=(parseFloat(this.mirror.style.paddingLeft||"")||0)+(parseFloat(this.mirror.style.paddingRight||"")||0)),this.input.style.width=e-t+"px"}else this.input.style.width=e+"px";this.mirror&&(this.mirror.style.width=e+"px")}set paddingRight(e){this.options.flexibleHeight&&this.options.flexibleWidth?this.input.style.width=`calc(100% - ${e}px)`:this.input.style.paddingRight=e+"px",this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if("number"!=typeof this.cachedContentHeight||"number"!=typeof this.cachedHeight||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,i=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:i})}showMessage(e,t){this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const i=this.stylesForType(this.message.type);this.element.style.border=i.border?`1px solid ${i.border}`:"",(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),null==e?void 0:e.type}stylesForType(e){switch(e){case 1:return{border:this.inputValidationInfoBorder,background:this.inputValidationInfoBackground,foreground:this.inputValidationInfoForeground};case 2:return{border:this.inputValidationWarningBorder,background:this.inputValidationWarningBackground,foreground:this.inputValidationWarningForeground};default:return{border:this.inputValidationErrorBorder,background:this.inputValidationErrorBackground,foreground:this.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e,t,i=()=>e.style.width=o.w(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:t=>{if(!this.message)return null;e=o.R3(t,m(".monaco-inputbox-container")),i();const n={inline:!0,className:"monaco-inputbox-message"},s=this.message.formatContent?(0,r.BO)(this.message.content,n):(0,r.IY)(this.message.content,n);s.classList.add(this.classForType(this.message.type));const a=this.stylesForType(this.message.type);return s.style.backgroundColor=a.background?a.background.toString():"",s.style.color=a.foreground?a.foreground.toString():"",s.style.border=a.border?`1px solid ${a.border}`:"",o.R3(e,s),null},onHide:()=>{this.state="closed"},layout:i}),t=3===this.message.type?n.N("alertErrorMessage","Error: {0}",this.message.content):2===this.message.type?n.N("alertWarningMessage","Warning: {0}",this.message.content):n.N("alertInfoMessage","Info: {0}",this.message.content),s.Z9(t),this.state="open"}_hideMessage(){this.contextViewProvider&&("open"===this.state&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),"open"===this.state&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,t=10===e.charCodeAt(e.length-1)?" ":"";e+t?this.mirror.textContent=e+t:this.mirror.innerText=" ",this.layout()}style(e){this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){const e=this.inputBackground?this.inputBackground.toString():"",t=this.inputForeground?this.inputForeground.toString():"",i=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.input.style.backgroundColor="inherit",this.input.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=o.wn(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const t=this.inputElement,i=t.selectionStart,n=t.selectionEnd,o=t.value;null!==i&&null!==n&&(this.value=o.substr(0,i)+e+o.substr(n),t.setSelectionRange(i+1,i+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar&&this.actionbar.dispose(),super.dispose()}}class b extends v{constructor(e,t,i){super(e,t,i),this.history=new g(i.history,100)}addToHistory(){this.value&&this.value!==this.getCurrentValue()&&this.history.add(this.value)}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),e&&(this.value=e,s.i7(this.value))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,s.i7(this.value))}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()||this.history.last()}}},5707:(e,t,i)=>{"use strict";i.d(t,{kX:()=>S,Bv:()=>L});var n=i(6248),o=i(5976),r=i(553),s=i(4669),a=i(4850),l=i(9802),c=i(6633),u=i(1134);function h(e,t){const i=[];for(let n of t){if(e.start>=n.range.end)continue;if(e.end({range:d(e.range,n),size:e.size}))),s=i.map(((t,i)=>({range:{start:e+i,end:e+i+1},size:t.size})));this.groups=function(...e){return function(e){const t=[];let i=null;for(let n of e){const e=n.range.start,o=n.range.end,r=n.size;i&&r===i.size?i.range.end=o:(i={range:{start:e,end:o},size:r},t.push(i))}return t}(e.reduce(((e,t)=>e.concat(t)),[]))}(o,s,r),this._size=this.groups.reduce(((e,t)=>e+t.size*(t.range.end-t.range.start)),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;let t=0,i=0;for(let n of this.groups){const o=n.range.end-n.range.start,r=i+o*n.size;if(e{for(const i of e)this.getRenderer(t).disposeTemplate(i.templateData),i.templateData=null})),this.cache.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}var m=i(9898),_=i(9488),v=i(3547),b=i(5393),y=i(6268),w=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const C={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements:e=>[e],getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class S{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class x{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class k{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;ti,(null==e?void 0:e.getPosInSet)?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(e,t)=>t+1,(null==e?void 0:e.getRole)?this.getRole=e.getRole.bind(e):this.getRole=e=>"listitem",(null==e?void 0:e.isChecked)?this.isChecked=e.isChecked.bind(e):this.isChecked=e=>{}}}class L{constructor(e,t,i,u=C){if(this.virtualDelegate=t,this.domId="list_id_"+ ++L.InstanceCount,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new b.vp(50),this.splicing=!1,this.dragOverAnimationStopDisposable=o.JT.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=o.JT.None,this.onDragLeaveTimeout=o.JT.None,this.disposables=new o.SL,this._onDidChangeContentHeight=new s.Q5,this._horizontalScrolling=!1,u.horizontalScrolling&&u.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new g;for(const e of i)this.renderers.set(e.templateId,e);this.cache=this.disposables.add(new p(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support","boolean"!=typeof u.mouseSupport||u.mouseSupport),this._horizontalScrolling=(0,n.CJ)(u,(e=>e.horizontalScrolling),C.horizontalScrolling),this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight=void 0===u.additionalScrollHeight?0:u.additionalScrollHeight,this.accessibilityProvider=new D(u.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",(0,n.CJ)(u,(e=>e.transformOptimization),C.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(r.o.addTarget(this.rowsContainer)),this.scrollable=new c.Rm((0,n.CJ)(u,(e=>e.smoothScrolling),!1)?125:0,(e=>(0,f.jL)(e))),this.scrollableElement=this.disposables.add(new l.$Z(this.rowsContainer,{alwaysConsumeMouseWheel:(0,n.CJ)(u,(e=>e.alwaysConsumeMouseWheel),C.alwaysConsumeMouseWheel),horizontal:1,vertical:(0,n.CJ)(u,(e=>e.verticalScrollMode),C.verticalScrollMode),useShadows:(0,n.CJ)(u,(e=>e.useShadows),C.useShadows)},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),(0,a.jt)(this.rowsContainer,r.t.Change)((e=>this.onTouchChange(e)),this,this.disposables),(0,a.jt)(this.scrollableElement.getDomNode(),"scroll")((e=>e.target.scrollTop=0),null,this.disposables),s.ju.map((0,a.jt)(this.domNode,"dragover"),(e=>this.toDragEvent(e)))(this.onDragOver,this,this.disposables),s.ju.map((0,a.jt)(this.domNode,"drop"),(e=>this.toDragEvent(e)))(this.onDrop,this,this.disposables),(0,a.jt)(this.domNode,"dragleave")(this.onDragLeave,this,this.disposables),(0,a.jt)(window,"dragend")(this.onDragEnd,this,this.disposables),this.setRowLineHeight=(0,n.CJ)(u,(e=>e.setRowLineHeight),C.setRowLineHeight),this.setRowHeight=(0,n.CJ)(u,(e=>e.setRowHeight),C.setRowHeight),this.supportDynamicHeights=(0,n.CJ)(u,(e=>e.supportDynamicHeights),C.supportDynamicHeights),this.dnd=(0,n.CJ)(u,(e=>e.dnd),C.dnd),this.layout()}get contentHeight(){return this.rangeMap.size}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const e of this.items)this.measureItemWidth(e);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:(0,f.FK)(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}updateOptions(e){void 0!==e.additionalScrollHeight&&(this.additionalScrollHeight=e.additionalScrollHeight,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),void 0!==e.smoothScrolling&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),void 0!==e.horizontalScrolling&&(this.horizontalScrolling=e.horizontalScrolling)}splice(e,t,i=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,i)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,i=[]){const n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),r={start:e,end:e+t},s=u.e.intersect(n,r),a=new Map;for(let e=s.start;e({id:String(this.itemId++),element:e,templateId:this.virtualDelegate.getTemplateId(e),size:this.virtualDelegate.getHeight(e),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(e),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:o.JT.None})));let p;0===e&&t>=this.items.length?(this.rangeMap=new g,this.rangeMap.splice(0,0,f),p=this.items,this.items=f):(this.rangeMap.splice(e,t,f),p=this.items.splice(e,t,...f));const m=i.length-t,_=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),v=d(c,m),b=u.e.intersect(_,v);for(let e=b.start;ed(e,m))),C=[{start:e,end:e+i.length},...w].map((e=>u.e.intersect(_,e))),S=this.getNextToLastElement(C);for(const e of C)for(let t=e.start;te.element))}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=(0,f.jL)((()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null})))}eventuallyUpdateScrollWidth(){this.horizontalScrolling?this.scrollableElementWidthDelayer.trigger((()=>this.updateScrollWidth())):this.scrollableElementWidthDelayer.cancel()}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)void 0!==t.width&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:0===e?0:e+10})}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}element(e){return this.items[e].element}domElement(e){const t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){let i={height:"number"==typeof e?e:(0,f.If)(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,i.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(i),void 0!==t&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:"number"==typeof t?t:(0,f.FK)(this.domNode)})}render(e,t,i,n,o,r=!1){const s=this.getRenderRange(t,i),a=u.e.relativeComplement(s,e),l=u.e.relativeComplement(e,s),c=this.getNextToLastElement(a);if(r){const t=u.e.intersect(e,s);for(let e=t.start;ethis.onDragStart(n.element,l,e)))}this.horizontalScrolling&&(this.measureItemWidth(n),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width=y.vU?"-moz-fit-content":"fit-content",e.width=(0,f.FK)(e.row.domNode);const t=window.getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.row){const i=this.renderers.get(t.templateId);i&&i.disposeElement&&i.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.additionalScrollHeight}get onMouseClick(){return s.ju.map((0,a.jt)(this.domNode,"click"),(e=>this.toMouseEvent(e)))}get onMouseDblClick(){return s.ju.map((0,a.jt)(this.domNode,"dblclick"),(e=>this.toMouseEvent(e)))}get onMouseMiddleClick(){return s.ju.filter(s.ju.map((0,a.jt)(this.domNode,"auxclick"),(e=>this.toMouseEvent(e))),(e=>1===e.browserEvent.button))}get onMouseDown(){return s.ju.map((0,a.jt)(this.domNode,"mousedown"),(e=>this.toMouseEvent(e)))}get onContextMenu(){return s.ju.any(s.ju.map((0,a.jt)(this.domNode,"contextmenu"),(e=>this.toMouseEvent(e))),s.ju.map((0,a.jt)(this.domNode,r.t.Contextmenu),(e=>this.toGestureEvent(e))))}get onTouchStart(){return s.ju.map((0,a.jt)(this.domNode,"touchstart"),(e=>this.toTouchEvent(e)))}get onTap(){return s.ju.map((0,a.jt)(this.rowsContainer,r.t.Tap),(e=>this.toGestureEvent(e)))}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,i){if(!i.dataTransfer)return;const n=this.dnd.getDragElements(e);if(i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(v.go.RESOURCES,JSON.stringify([t])),i.dataTransfer.setDragImage){let e;this.dnd.getDragLabel&&(e=this.dnd.getDragLabel(n,i)),void 0===e&&(e=String(n.length));const t=(0,f.$)(".monaco-drag-image");t.textContent=e,document.body.appendChild(t),i.dataTransfer.setDragImage(t,-10,-10),setTimeout((()=>document.body.removeChild(t)),0)}this.currentDragData=new S(n),v.P$.CurrentDragAndDropData=new x(n),this.dnd.onDragStart&&this.dnd.onDragStart(this.currentDragData,i)}onDragOver(e){if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),v.P$.CurrentDragAndDropData&&"vscode-ui"===v.P$.CurrentDragAndDropData.getData())return!1;if(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer)return!1;if(!this.currentDragData)if(v.P$.CurrentDragAndDropData)this.currentDragData=v.P$.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new k}const t=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.browserEvent);if(this.canDrop="boolean"==typeof t?t:t.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;let i;if(e.browserEvent.dataTransfer.dropEffect="boolean"!=typeof t&&0===t.effect?"copy":"move",i="boolean"!=typeof t&&t.feedback?t.feedback:void 0===e.index?[-1]:[e.index],i=(0,_.EB)(i).filter((e=>e>=-1&&ee-t)),i=-1===i[0]?[-1]:i,n=this.currentDragFeedback,r=i,Array.isArray(n)&&Array.isArray(r)?(0,_.fS)(n,r):n===r)return!0;var n,r;if(this.currentDragFeedback=i,this.currentDragFeedbackDisposable.dispose(),-1===i[0])this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=(0,o.OF)((()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")}));else{for(const e of i){const t=this.items[e];t.dropTarget=!0,t.row&&t.row.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=(0,o.OF)((()=>{for(const e of i){const t=this.items[e];t.dropTarget=!1,t.row&&t.row.domNode.classList.remove("drop-target")}}))}return!0}onDragLeave(){this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=(0,b.Vg)((()=>this.clearDragOverFeedback()),100)}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,v.P$.CurrentDragAndDropData=void 0,t&&e.browserEvent.dataTransfer&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.browserEvent))}onDragEnd(e){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,v.P$.CurrentDragAndDropData=void 0,this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=o.JT.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const e=(0,f.xQ)(this.domNode).top;this.dragOverAnimationDisposable=(0,f.jt)(this.animateDragAndDropScrollTop.bind(this,e))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=(0,b.Vg)((()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}),1e3),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(void 0===this.dragOverMouseY)return;const t=this.dragOverMouseY-e,i=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>i&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-i))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let i=e;for(;i instanceof HTMLElement&&i!==this.rowsContainer&&t.contains(i);){const e=i.getAttribute("data-index");if(e){const t=Number(e);if(!isNaN(t))return t}i=i.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,i){const n=this.getRenderRange(e,t);let o,r;e===this.elementTop(n.start)?(o=n.start,r=0):n.end-n.start>1&&(o=n.start+1,r=this.elementTop(o)-e);let s=0;for(;;){const a=this.getRenderRange(e,t);let l=!1;for(let e=a.start;e{"use strict";i.d(t,{WK:()=>I,wD:()=>z,aV:()=>K,sx:()=>B,cK:()=>E,hD:()=>A,wn:()=>F,Zo:()=>O});var n=i(5976),o=i(8401),r=i(9488),s=i(9898),a=i(1432),l=i(553),c=i(9069),u=i(4669),h=i(4850);class d extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}var g=i(5707),f=i(1264),p=i(6248);class m{constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach((n=>n.splice(e,t,i)))}}var _,v=i(9870),b=i(5392),y=i(5152),w=i(5321),C=i(5393),S=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},x=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class k{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.trait}`}renderTemplate(e){return e}renderElement(e,t,i){const n=this.renderedElements.findIndex((e=>e.templateData===i));if(n>=0){const e=this.renderedElements[n];this.trait.unrender(i),e.index=t}else{const e={index:t,templateData:i};this.renderedElements.push(e)}this.trait.renderIndex(t,i)}splice(e,t,i){const n=[];for(const o of this.renderedElements)o.index=e+t&&n.push({index:o.index+i-t,templateData:o.templateData});this.renderedElements=n}renderIndexes(e){for(const{index:t,templateData:i}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,i)}disposeTemplate(e){const t=this.renderedElements.findIndex((t=>t.templateData===e));t<0||this.renderedElements.splice(t,1)}}class D{constructor(e){this._trait=e,this.indexes=[],this.sortedIndexes=[],this._onChange=new u.Q5,this.onChange=this._onChange.event}get trait(){return this._trait}get renderer(){return new k(this)}splice(e,t,i){const n=i.length-t,o=e+t,r=[...this.sortedIndexes.filter((t=>tt?i+e:-1)).filter((e=>-1!==e)),...this.sortedIndexes.filter((e=>e>=o)).map((e=>e+n))];this.renderer.splice(e,t,i.length),this._set(r,r)}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort($),t)}_set(e,t,i){const n=this.indexes,o=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const r=H(o,e);return this.renderer.renderIndexes(r),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return(0,r.ry)(this.sortedIndexes,e,$)>=0}dispose(){(0,n.B9)(this._onChange)}}S([s.H],D.prototype,"renderer",null);class L extends D{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}class N{constructor(e,t,i){this.trait=e,this.view=t,this.identityProvider=i}splice(e,t,i){if(!this.identityProvider)return this.trait.splice(e,t,i.map((()=>!1)));const n=this.trait.get().map((e=>this.identityProvider.getId(this.view.element(e)).toString())),o=i.map((e=>n.indexOf(this.identityProvider.getId(e).toString())>-1));this.trait.splice(e,t,o)}}function E(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function A(e){return!!e.classList.contains("monaco-editor")||!e.classList.contains("monaco-list")&&!!e.parentElement&&A(e.parentElement)}class M{constructor(e,t,i){this.list=e,this.view=t,this.disposables=new n.SL;const o=!1!==i.multipleSelectionSupport,r=u.ju.chain((0,h.jt)(t.domNode,"keydown")).filter((e=>!E(e.target))).map((e=>new c.y(e)));r.filter((e=>3===e.keyCode)).on(this.onEnter,this,this.disposables),r.filter((e=>16===e.keyCode)).on(this.onUpArrow,this,this.disposables),r.filter((e=>18===e.keyCode)).on(this.onDownArrow,this,this.disposables),r.filter((e=>11===e.keyCode)).on(this.onPageUpArrow,this,this.disposables),r.filter((e=>12===e.keyCode)).on(this.onPageDownArrow,this,this.disposables),r.filter((e=>9===e.keyCode)).on(this.onEscape,this,this.disposables),o&&r.filter((e=>(a.dz?e.metaKey:e.ctrlKey)&&31===e.keyCode)).on(this.onCtrlA,this,this.disposables)}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent),this.list.reveal(this.list.getFocus()[0]),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection((0,r.w6)(this.list.length),e.browserEvent),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.view.domNode.focus())}dispose(){this.disposables.dispose()}}!function(e){e[e.Idle=0]="Idle",e[e.Typing=1]="Typing"}(_||(_={}));const I=new class{mightProducePrintableCharacter(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30||e.keyCode>=93&&e.keyCode<=102||e.keyCode>=80&&e.keyCode<=90)}};class T{constructor(e,t,i,o){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.delegate=o,this.enabled=!1,this.state=_.Idle,this.automaticKeyboardNavigation=!0,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new n.SL,this.disposables=new n.SL,this.updateOptions(e.options)}updateOptions(e){void 0===e.enableKeyboardNavigation||e.enableKeyboardNavigation?this.enable():this.disable(),void 0!==e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation)}enable(){if(this.enabled)return;const e=u.ju.chain((0,h.jt)(this.view.domNode,"keydown")).filter((e=>!E(e.target))).filter((()=>this.automaticKeyboardNavigation||this.triggered)).map((e=>new c.y(e))).filter((e=>this.delegate.mightProducePrintableCharacter(e))).forEach((e=>{e.stopPropagation(),e.preventDefault()})).map((e=>e.browserEvent.key)).event,t=u.ju.debounce(e,(()=>null),800);u.ju.reduce(u.ju.any(e,t),((e,t)=>null===t?null:(e||"")+t))(this.onInput,this,this.enabledDisposables),t(this.onClear,this,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var e;const t=this.list.getFocus();if(t.length>0&&t[0]===this.previouslyFocused){const i=null===(e=this.list.options.accessibilityProvider)||void 0===e?void 0:e.getAriaLabel(this.list.element(t[0]));i&&(0,y.Z9)(i)}this.previouslyFocused=-1}onInput(e){if(!e)return this.state=_.Idle,void(this.triggered=!1);const t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===_.Idle?1:0;this.state=_.Typing;for(let t=0;t!E(e.target))).map((e=>new c.y(e))).filter((e=>!(2!==e.keyCode||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey))).on(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(0===t.length)return;const i=this.view.domElement(t[0]);if(!i)return;const n=i.querySelector("[tabIndex]");if(!(n&&n instanceof HTMLElement&&-1!==n.tabIndex))return;const o=window.getComputedStyle(n);"hidden"!==o.visibility&&"none"!==o.display&&(e.preventDefault(),e.stopPropagation(),n.focus())}dispose(){this.disposables.dispose()}}function O(e){return a.dz?e.browserEvent.metaKey:e.browserEvent.ctrlKey}function F(e){return e.browserEvent.shiftKey}const P={isSelectionSingleChangeEvent:O,isSelectionRangeChangeEvent:F};class B{constructor(e){this.list=e,this.disposables=new n.SL,this._onPointer=new u.Q5,this.onPointer=this._onPointer.event,this.multipleSelectionSupport=!(!1===e.options.multipleSelectionSupport),this.multipleSelectionSupport&&(this.multipleSelectionController=e.options.multipleSelectionController||P),this.mouseSupport=void 0===e.options.mouseSupport||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(l.o.addTarget(e.getHTMLElement()))),u.ju.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}isSelectionSingleChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):a.dz?e.browserEvent.metaKey:e.browserEvent.ctrlKey}isSelectionRangeChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):e.browserEvent.shiftKey}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){A(e.browserEvent.target)||document.activeElement!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(A(e.browserEvent.target))return;const t=void 0===e.index?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport)return;if(E(e.browserEvent.target)||A(e.browserEvent.target))return;const t=e.index;return void 0===t?(this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),void this.list.setAnchor(void 0)):this.multipleSelectionSupport&&this.isSelectionRangeChangeEvent(e)||this.multipleSelectionSupport&&this.isSelectionChangeEvent(e)?this.changeSelection(e):(this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),(i=e.browserEvent)instanceof MouseEvent&&2===i.button||this.list.setSelection([t],e.browserEvent),void this._onPointer.fire(e));var i}onDoubleClick(e){if(E(e.browserEvent.target)||A(e.browserEvent.target))return;if(this.multipleSelectionSupport&&this.isSelectionChangeEvent(e))return;const t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){const t=e.index;let i=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){if(void 0===i){const e=this.list.getFocus()[0];i=null!=e?e:t,this.list.setAnchor(i)}const n=Math.min(i,t),o=Math.max(i,t),s=(0,r.w6)(n,o+1),a=this.list.getSelection(),l=function(e,t){const i=e.indexOf(t);if(-1===i)return[];const n=[];let o=i-1;for(;o>=0&&e[o]===t-(i-o);)n.push(e[o--]);for(n.reverse(),o=i;o=e.length)i.push(t[o++]);else if(o>=t.length)i.push(e[n++]);else{if(e[n]===t[o]){n++,o++;continue}e[n]e!==t));this.list.setFocus([t]),this.list.setAnchor(t),i.length===n.length?this.list.setSelection([...n,t],e.browserEvent):this.list.setSelection(n,e.browserEvent)}}dispose(){this.disposables.dispose()}}class z{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){const t=this.selectorSuffix&&`.${this.selectorSuffix}`,i=[];e.listBackground&&(e.listBackground.isOpaque()?i.push(`.monaco-list${t} .monaco-list-rows { background: ${e.listBackground}; }`):a.dz||console.warn(`List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),e.listFocusBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listFocusAndSelectionBackground&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }\n\t\t\t`),e.listFocusAndSelectionForeground&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }\n\t\t\t`),e.listInactiveFocusForeground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveFocusBackground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(i.push(`.monaco-list${t} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&i.push(`.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&i.push(`.monaco-list${t}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&i.push(`.monaco-list${t} .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`),e.listSelectionOutline&&i.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listFocusOutline&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t`),e.listInactiveFocusOutline&&i.push(`.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&i.push(`.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropBackground&&i.push(`\n\t\t\t\t.monaco-list${t}.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-rows.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-row.drop-target { background-color: ${e.listDropBackground} !important; color: inherit !important; }\n\t\t\t`),e.listFilterWidgetBackground&&i.push(`.monaco-list-type-filter { background-color: ${e.listFilterWidgetBackground} }`),e.listFilterWidgetOutline&&i.push(`.monaco-list-type-filter { border: 1px solid ${e.listFilterWidgetOutline}; }`),e.listFilterWidgetNoMatchesOutline&&i.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${e.listFilterWidgetNoMatchesOutline}; }`),e.listMatchesShadow&&i.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${e.listMatchesShadow}; }`),e.tableColumnsBorder&&i.push(`\n\t\t\t\t.monaco-table:hover > .monaco-split-view2,\n\t\t\t\t.monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: ${e.tableColumnsBorder};\n\t\t\t}`),this.styleElement.textContent=i.join("\n")}}const W={listFocusBackground:f.Il.fromHex("#7FB0D0"),listActiveSelectionBackground:f.Il.fromHex("#0E639C"),listActiveSelectionForeground:f.Il.fromHex("#FFFFFF"),listFocusAndSelectionBackground:f.Il.fromHex("#094771"),listFocusAndSelectionForeground:f.Il.fromHex("#FFFFFF"),listInactiveSelectionBackground:f.Il.fromHex("#3F3F46"),listHoverBackground:f.Il.fromHex("#2A2D2E"),listDropBackground:f.Il.fromHex("#383B3D"),treeIndentGuidesStroke:f.Il.fromHex("#a9a9a9"),tableColumnsBorder:f.Il.fromHex("#cccccc").transparent(.2)},V={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){}}};function H(e,t){const i=[];let n=0,o=0;for(;n=e.length)i.push(t[o++]);else if(o>=t.length)i.push(e[n++]);else{if(e[n]===t[o]){i.push(e[n]),n++,o++;continue}e[n]e-t;class U{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map((t=>t.renderTemplate(e)))}renderElement(e,t,i,n){let o=0;for(const r of this.renderers)r.renderElement(e,t,i[o++],n)}disposeElement(e,t,i,n){let o=0;for(const r of this.renderers)r.disposeElement&&r.disposeElement(e,t,i[o],n),o+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class j{constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return e}renderElement(e,t,i){const n=this.accessibilityProvider.getAriaLabel(e);n?i.setAttribute("aria-label",n):i.removeAttribute("aria-label");const o=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);"number"==typeof o?i.setAttribute("aria-level",`${o}`):i.removeAttribute("aria-level")}disposeTemplate(e){}}class q{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(e,t)}onDragOver(e,t,i,n){return this.dnd.onDragOver(e,t,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}drop(e,t,i,n){this.dnd.drop(e,t,i,n)}}class K{constructor(e,t,i,o,r=V){var s;this.user=e,this._options=r,this.focus=new D("focused"),this.anchor=new D("anchor"),this.eventBufferer=new u.E7,this._ariaLabel="",this.disposables=new n.SL,this._onDidDispose=new u.Q5,this.onDidDispose=this._onDidDispose.event;const a=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?null===(s=this._options.accessibilityProvider)||void 0===s?void 0:s.getWidgetRole():"list";this.selection=new L("listbox"!==a),(0,p.jB)(r,W,!1);const l=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=r.accessibilityProvider,this.accessibilityProvider&&(l.push(new j(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant&&this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant,this,this.disposables)),o=o.map((e=>new U(e.templateId,[...l,e])));const c=Object.assign(Object.assign({},r),{dnd:r.dnd&&new q(this,r.dnd)});if(this.view=new g.Bv(t,i,o,c),this.view.domNode.setAttribute("role",a),r.styleController)this.styleController=r.styleController(this.view.domId);else{const e=(0,w.dS)(this.view.domNode);this.styleController=new z(e,this.view.domId)}if(this.spliceable=new m([new N(this.focus,this.view,r.identityProvider),new N(this.selection,this.view,r.identityProvider),new N(this.anchor,this.view,r.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.onDidFocus=u.ju.map((0,h.jt)(this.view.domNode,"focus",!0),(()=>null)),this.onDidBlur=u.ju.map((0,h.jt)(this.view.domNode,"blur",!0),(()=>null)),this.disposables.add(new R(this,this.view)),"boolean"!=typeof r.keyboardSupport||r.keyboardSupport){const e=new M(this,this.view,r);this.disposables.add(e)}if(r.keyboardNavigationLabelProvider){const e=r.keyboardNavigationDelegate||I;this.typeLabelController=new T(this,this.view,r.keyboardNavigationLabelProvider,e),this.disposables.add(this.typeLabelController)}this.mouseController=this.createMouseController(r),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),r.multipleSelectionSupport&&this.view.domNode.setAttribute("aria-multiselectable","true")}get onDidChangeFocus(){return u.ju.map(this.eventBufferer.wrapEvent(this.focus.onChange),(e=>this.toListEvent(e)))}get onDidChangeSelection(){return u.ju.map(this.eventBufferer.wrapEvent(this.selection.onChange),(e=>this.toListEvent(e)))}get domId(){return this.view.domId}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=u.ju.chain((0,h.jt)(this.view.domNode,"keydown")).map((e=>new c.y(e))).filter((t=>e=58===t.keyCode||t.shiftKey&&68===t.keyCode)).map(h.p7).filter((()=>!1)).event,i=u.ju.chain((0,h.jt)(this.view.domNode,"keyup")).forEach((()=>e=!1)).map((e=>new c.y(e))).filter((e=>58===e.keyCode||e.shiftKey&&68===e.keyCode)).map(h.p7).map((({browserEvent:e})=>{const t=this.getFocus(),i=t.length?t[0]:void 0;return{index:i,element:void 0!==i?this.view.element(i):void 0,anchor:void 0!==i?this.view.domElement(i):this.view.domNode,browserEvent:e}})).event,n=u.ju.chain(this.view.onContextMenu).filter((t=>!e)).map((({element:e,index:t,browserEvent:i})=>({element:e,index:t,anchor:{x:i.pageX+1,y:i.pageY},browserEvent:i}))).event;return u.ju.any(t,i,n)}get onKeyDown(){return(0,h.jt)(this.view.domNode,"keydown")}createMouseController(e){return new B(this)}updateOptions(e={}){this._options=Object.assign(Object.assign({},this._options),e),this.typeLabelController&&this.typeLabelController.updateOptions(this._options),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new d(this.user,`Invalid start index: ${e}`);if(t<0)throw new d(this.user,`Invalid delete count: ${t}`);0===t&&0===i.length||this.eventBufferer.bufferEvents((()=>this.spliceable.splice(e,t,i)))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(const t of e)if(t<0||t>=this.length)throw new d(this.user,`Invalid index ${t}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map((e=>this.view.element(e)))}setAnchor(e){if(void 0!==e){if(e<0||e>=this.length)throw new d(this.user,`Invalid index ${e}`);this.anchor.set([e])}else this.anchor.set([])}getAnchor(){return(0,r.Xh)(this.anchor.get(),void 0)}setFocus(e,t){for(const t of e)if(t<0||t>=this.length)throw new d(this.user,`Invalid index ${t}`);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(0===this.length)return;const o=this.focus.get(),r=this.findNextIndex(o.length>0?o[0]+e:0,t,n);r>-1&&this.setFocus([r],i)}focusPrevious(e=1,t=!1,i,n){if(0===this.length)return;const o=this.focus.get(),r=this.findPreviousIndex(o.length>0?o[0]-e:0,t,n);r>-1&&this.setFocus([r],i)}focusNextPage(e,t){return x(this,void 0,void 0,(function*(){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=0===i?0:i-1;const n=this.view.element(i),o=this.getFocusedElements()[0];if(o!==n){const n=this.findPreviousIndex(i,!1,t);n>-1&&o!==this.view.element(n)?this.setFocus([n],e):this.setFocus([i],e)}else{const n=this.view.getScrollTop();this.view.setScrollTop(n+this.view.renderHeight-this.view.elementHeight(i)),this.view.getScrollTop()!==n&&(this.setFocus([]),yield(0,C.Vs)(0),yield this.focusNextPage(e,t))}}))}focusPreviousPage(e,t){return x(this,void 0,void 0,(function*(){let i;const n=this.view.getScrollTop();i=0===n?this.view.indexAt(n):this.view.indexAfter(n-1);const o=this.view.element(i),r=this.getFocusedElements()[0];if(r!==o){const n=this.findNextIndex(i,!1,t);n>-1&&r!==this.view.element(n)?this.setFocus([n],e):this.setFocus([i],e)}else{const i=n;this.view.setScrollTop(n-this.view.renderHeight),this.view.getScrollTop()!==i&&(this.setFocus([]),yield(0,C.Vs)(0),yield this.focusPreviousPage(e,t))}}))}focusLast(e,t){if(0===this.length)return;const i=this.findPreviousIndex(this.length-1,!1,t);i>-1&&this.setFocus([i],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,i){if(0===this.length)return;const n=this.findNextIndex(e,!1,i);n>-1&&this.setFocus([n],t)}findNextIndex(e,t=!1,i){for(let n=0;n=this.length&&!t)return-1;if(e%=this.length,!i||i(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,i){for(let n=0;nthis.view.element(e)))}reveal(e,t){if(e<0||e>=this.length)throw new d(this.user,`Invalid index ${e}`);const i=this.view.getScrollTop(),n=this.view.elementTop(e),r=this.view.elementHeight(e);if((0,o.hj)(t)){const e=r-this.view.renderHeight;this.view.setScrollTop(e*(0,v.u)(t,0,1)+n)}else{const e=n+r,t=i+this.view.renderHeight;n=t||(n=t&&r>=this.view.renderHeight?this.view.setScrollTop(n):e>=t&&this.view.setScrollTop(e-this.view.renderHeight))}}getRelativeTop(e){if(e<0||e>=this.length)throw new d(this.user,`Invalid index ${e}`);const t=this.view.getScrollTop(),i=this.view.elementTop(e),n=this.view.elementHeight(e);if(it+this.view.renderHeight)return null;const o=n-this.view.renderHeight;return Math.abs((t-i)/o)}getHTMLElement(){return this.view.domNode}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map((e=>this.view.element(e))),browserEvent:t}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var e;const t=this.focus.get();if(t.length>0){let i;(null===(e=this.accessibilityProvider)||void 0===e?void 0:e.getActiveDescendantId)&&(i=this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),this.view.domNode.setAttribute("aria-activedescendant",i||this.view.getElementDomId(t[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",0===e.length),this.view.domNode.classList.toggle("selection-single",1===e.length),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}S([s.H],K.prototype,"onDidChangeFocus",null),S([s.H],K.prototype,"onDidChangeSelection",null),S([s.H],K.prototype,"onContextMenu",null)},6542:(e,t,i)=>{"use strict";i.d(t,{S:()=>n});const n="monaco-mouse-cursor-text"},3098:(e,t,i)=>{"use strict";i.d(t,{l:()=>n,g:()=>v});var n,o=i(5976),r=i(1432),s=i(553),a=i(4669),l=i(5321),c=i(4850),u=i(5393),h=i(9898),d=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};!function(e){e.North="north",e.South="south",e.East="east",e.West="west"}(n||(n={}));const g=new a.Q5,f=new a.Q5;class p{constructor(){this.disposables=new o.SL}get onPointerMove(){return this.disposables.add(new c.Yp(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new c.Yp(window,"mouseup")).event}dispose(){this.disposables.dispose()}}d([h.H],p.prototype,"onPointerMove",null),d([h.H],p.prototype,"onPointerUp",null);class m{constructor(e){this.el=e,this.disposables=new o.SL}get onPointerMove(){return this.disposables.add(new c.Yp(this.el,s.t.Change)).event}get onPointerUp(){return this.disposables.add(new c.Yp(this.el,s.t.End)).event}dispose(){this.disposables.dispose()}}d([h.H],m.prototype,"onPointerMove",null),d([h.H],m.prototype,"onPointerUp",null);class _{constructor(e){this.factory=e}get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}dispose(){}}d([h.H],_.prototype,"onPointerMove",null),d([h.H],_.prototype,"onPointerUp",null);class v extends o.JT{constructor(e,t,i){super(),this.hoverDelay=300,this.hoverDelayer=this._register(new u.vp(this.hoverDelay)),this._state=3,this._onDidEnablementChange=this._register(new a.Q5),this.onDidEnablementChange=this._onDidEnablementChange.event,this._onDidStart=this._register(new a.Q5),this.onDidStart=this._onDidStart.event,this._onDidChange=this._register(new a.Q5),this.onDidChange=this._onDidChange.event,this._onDidReset=this._register(new a.Q5),this.onDidReset=this._onDidReset.event,this._onDidEnd=this._register(new a.Q5),this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.orthogonalStartSashDisposables=this._register(new o.SL),this.orthogonalStartDragHandleDisposables=this._register(new o.SL),this.orthogonalEndSashDisposables=this._register(new o.SL),this.orthogonalEndDragHandleDisposables=this._register(new o.SL),this.el=(0,l.R3)(e,(0,l.$)(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),r.dz&&this.el.classList.add("mac");const n=this._register(new c.Yp(this.el,"mousedown")).event;this._register(n((e=>this.onPointerStart(e,new p)),this));const h=this._register(new c.Yp(this.el,"dblclick")).event;this._register(h(this.onPointerDoublePress,this));const d=this._register(new c.Yp(this.el,"mouseenter")).event;this._register(d((()=>v.onMouseEnter(this))));const _=this._register(new c.Yp(this.el,"mouseleave")).event;this._register(_((()=>v.onMouseLeave(this)))),this._register(s.o.addTarget(this.el));const b=a.ju.map(this._register(new c.Yp(this.el,s.t.Start)).event,(e=>{var t;return Object.assign(Object.assign({},e),{target:null!==(t=e.initialTarget)&&void 0!==t?t:null})}));this._register(b((e=>this.onPointerStart(e,new m(this.el))),this));const y=this._register(new c.Yp(this.el,s.t.Tap)).event,w=a.ju.map(a.ju.filter(a.ju.debounce(y,((e,t)=>{var i;return{event:t,count:(null!==(i=null==e?void 0:e.count)&&void 0!==i?i:0)+1}}),250),(({count:e})=>2===e)),(({event:e})=>{var t;return Object.assign(Object.assign({},e),{target:null!==(t=e.initialTarget)&&void 0!==t?t:null})}));this._register(w(this.onPointerDoublePress,this)),"number"==typeof i.size?(this.size=i.size,0===i.orientation?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=4,this._register(g.event((e=>{this.size=e,this.layout()})))),this._register(f.event((e=>this.hoverDelay=e))),this.hidden=!1,this.layoutProvider=t,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,1===this.orientation?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",!1),this.layout()}get state(){return this._state}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",0===e),this.el.classList.toggle("minimum",1===e),this.el.classList.toggle("maximum",2===e),this._state=e,this._onDidEnablementChange.fire(e))}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=t=>{this.orthogonalStartDragHandleDisposables.clear(),0!==t&&(this._orthogonalStartDragHandle=(0,l.R3)(this.el,(0,l.$)(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add((0,o.OF)((()=>this._orthogonalStartDragHandle.remove()))),this.orthogonalEndDragHandleDisposables.add(new c.Yp(this._orthogonalStartDragHandle,"mouseenter")).event((()=>v.onMouseEnter(e)),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new c.Yp(this._orthogonalStartDragHandle,"mouseleave")).event((()=>v.onMouseLeave(e)),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange(t,this)),t(e.state)}this._orthogonalStartSash=e}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=t=>{this.orthogonalEndDragHandleDisposables.clear(),0!==t&&(this._orthogonalEndDragHandle=(0,l.R3)(this.el,(0,l.$)(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add((0,o.OF)((()=>this._orthogonalEndDragHandle.remove()))),this.orthogonalEndDragHandleDisposables.add(new c.Yp(this._orthogonalEndDragHandle,"mouseenter")).event((()=>v.onMouseEnter(e)),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new c.Yp(this._orthogonalEndDragHandle,"mouseleave")).event((()=>v.onMouseLeave(e)),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange(t,this)),t(e.state)}this._orthogonalEndSash=e}onPointerStart(e,t){l.zB.stop(e);let i=!1;if(!e.__orthogonalSashEvent){const n=this.getOrthogonalSash(e);n&&(i=!0,e.__orthogonalSashEvent=!0,n.onPointerStart(e,new _(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new _(t))),!this.state)return;const n=[...(0,l.H$)("iframe"),...(0,l.H$)("webview")];for(const e of n)e.style.pointerEvents="none";const s=e.pageX,a=e.pageY,c=e.altKey,u={startX:s,currentX:s,startY:a,currentY:a,altKey:c};this.el.classList.add("active"),this._onDidStart.fire(u);const h=(0,l.dS)(this.el),d=()=>{let e="";e=i?"all-scroll":1===this.orientation?1===this.state?"s-resize":2===this.state?"n-resize":r.dz?"row-resize":"ns-resize":1===this.state?"e-resize":2===this.state?"w-resize":r.dz?"col-resize":"ew-resize",h.textContent=`* { cursor: ${e} !important; }`},g=new o.SL;d(),i||this.onDidEnablementChange(d,null,g),t.onPointerMove((e=>{l.zB.stop(e,!1);const t={startX:s,currentX:e.pageX,startY:a,currentY:e.pageY,altKey:c};this._onDidChange.fire(t)}),null,g),t.onPointerUp((e=>{l.zB.stop(e,!1),this.el.removeChild(h),this.el.classList.remove("active"),this._onDidEnd.fire(),g.dispose();for(const e of n)e.style.pointerEvents="auto"}),null,g),g.add(t)}onPointerDoublePress(e){const t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger((()=>e.el.classList.add("hover")),e.hoverDelay).then(void 0,(()=>{})),!t&&e.linkedSash&&v.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&v.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){v.onMouseLeave(this)}layout(){if(0===this.orientation){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}hide(){this.hidden=!0,this.el.style.display="none",this.el.setAttribute("aria-hidden","true")}getOrthogonalSash(e){if(e.target&&e.target instanceof HTMLElement)return e.target.classList.contains("orthogonal-drag-handle")?e.target.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash:void 0}dispose(){super.dispose(),this.el.remove()}}},9802:(e,t,i)=>{"use strict";i.d(t,{s$:()=>A,NB:()=>N,$Z:()=>E});var n=i(5321),o=i(8626),r=i(3938),s=i(7974),a=i(3794),l=i(5393);class c extends a.${constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",void 0!==e.top&&(this.bgDomNode.style.top="0px"),void 0!==e.left&&(this.bgDomNode.style.left="0px"),void 0!==e.bottom&&(this.bgDomNode.style.bottom="0px"),void 0!==e.right&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...e.icon.classNamesArray),this.domNode.style.position="absolute",this.domNode.style.width="11px",this.domNode.style.height="11px",void 0!==e.top&&(this.domNode.style.top=e.top+"px"),void 0!==e.left&&(this.domNode.style.left=e.left+"px"),void 0!==e.bottom&&(this.domNode.style.bottom=e.bottom+"px"),void 0!==e.right&&(this.domNode.style.right=e.right+"px"),this._mouseMoveMonitor=this._register(new s.Z),this.onmousedown(this.bgDomNode,(e=>this._arrowMouseDown(e))),this.onmousedown(this.domNode,(e=>this._arrowMouseDown(e))),this._mousedownRepeatTimer=this._register(new l.zh),this._mousedownScheduleRepeatTimer=this._register(new l._F)}_arrowMouseDown(e){this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet((()=>{this._mousedownRepeatTimer.cancelAndSet((()=>this._onActivate()),1e3/24)}),200),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,s.e,(e=>{}),(()=>{this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancel()})),e.preventDefault()}}var u=i(5976);class h extends u.JT{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new l._F)}applyVisibilitySetting(e){return 2!==this._visibility&&(3===this._visibility||e)}setShouldBeVisible(e){const t=this.applyVisibilitySetting(e);this._shouldBeVisible!==t&&(this._shouldBeVisible=t,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet((()=>{this._domNode&&this._domNode.setClassName(this._visibleClassName)}),0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(e?" fade":"")))}}var d=i(1432);class g extends a.${constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new h(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._mouseMoveMonitor=this._register(new s.Z),this._shouldRender=!0,this.domNode=(0,o.X)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this.onmousedown(this.domNode.domNode,(e=>this._domNodeMouseDown(e)))}_createArrow(e){const t=this._register(new c(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=(0,o.X)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),"number"==typeof i&&this.slider.setWidth(i),"number"==typeof n&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,(e=>{e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(()=>{})))})),this.onclick(this.slider.domNode,(e=>{e.leftButton&&e.stopPropagation()}))}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodeMouseDown(e){e.target===this.domNode.domNode&&this._onMouseDown(e)}delegateMouseDown(e){const t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),o=this._sliderMousePosition(e);i<=o&&o<=n?e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(()=>{}))):this._onMouseDown(e)}_onMouseDown(e){let t,i;if(e.target===this.domNode.domNode&&"number"==typeof e.browserEvent.offsetX&&"number"==typeof e.browserEvent.offsetY)t=e.browserEvent.offsetX,i=e.browserEvent.offsetY;else{const o=n.i(this.domNode.domNode);t=e.posx-o.left,i=e.posy-o.top}const o=this._mouseDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(o):this._scrollbarState.getDesiredScrollPositionFromOffset(o)),e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(()=>{})))}_sliderMouseDown(e,t){const i=this._sliderMousePosition(e),n=this._sliderOrthogonalMousePosition(e),o=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,s.e,(e=>{const t=this._sliderOrthogonalMousePosition(e),r=Math.abs(t-n);if(d.ED&&r>140)return void this._setDesiredScrollPositionNow(o.getScrollPosition());const s=this._sliderMousePosition(e)-i;this._setDesiredScrollPositionNow(o.getDesiredScrollPositionFromDelta(s))}),(()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd(),t()})),this._host.onDragStart()}_setDesiredScrollPositionNow(e){const t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}class f{constructor(e,t,i,n,o,r){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(i),this._arrowSize=Math.round(e),this._visibleSize=n,this._scrollSize=o,this._scrollPosition=r,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new f(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){const t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)}setScrollSize(e){const t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)}setScrollPosition(e){const t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)}setScrollbarSize(e){this._scrollbarSize=e}static _computeValues(e,t,i,n,o){const r=Math.max(0,i-e),s=Math.max(0,r-2*t),a=n>0&&n>i;if(!a)return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(s),computedSliderRatio:0,computedSliderPosition:0};const l=Math.round(Math.max(20,Math.floor(i*s/n))),c=(s-l)/(n-i),u=o*c;return{computedAvailableSize:Math.round(r),computedIsNeeded:a,computedSliderSize:Math.round(l),computedSliderRatio:c,computedSliderPosition:Math.round(u)}}_refreshComputedValues(){const e=f._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize;let i=this._scrollPosition;return tthis._host.onMouseWheel(new r.q(null,1,0))}),this._createArrow({className:"scra",icon:_,top:i,left:void 0,bottom:void 0,right:e,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new r.q(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(e,t){return e}_sliderMousePosition(e){return e.posx}_sliderOrthogonalMousePosition(e){return e.posy}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}}const b=(0,p.CM)("scrollbar-button-up",p.lA.triangleUp),y=(0,p.CM)("scrollbar-button-down",p.lA.triangleDown);class w extends g{constructor(e,t,i){const n=e.getScrollDimensions(),o=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new f(t.verticalHasArrows?t.arrowSize:0,2===t.vertical?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,o.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){const e=(t.arrowSize-11)/2,i=(t.verticalScrollbarSize-11)/2;this._createArrow({className:"scra",icon:b,top:e,left:i,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new r.q(null,0,1))}),this._createArrow({className:"scra",icon:y,top:void 0,left:i,bottom:e,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new r.q(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_mouseDownRelativePosition(e,t){return t}_sliderMousePosition(e){return e.posy}_sliderOrthogonalMousePosition(e){return e.posx}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}}var C=i(4669),S=i(6633),x=i(6268);class k{constructor(e,t,i){this.timestamp=e,this.deltaX=t,this.deltaY=i,this.score=0}}class D{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(-1===this._front&&-1===this._rear)return!1;let e=1,t=0,i=1,n=this._rear;for(;;){const o=n===this._front?e:Math.pow(2,-i);if(e-=o,t+=this._memory[n].score*o,n===this._front)break;n=(this._capacity+n-1)%this._capacity,i++}return t<=.5}accept(e,t,i){const n=new k(e,t,i);n.score=this._computeScore(n),-1===this._front&&-1===this._rear?(this._memory[0]=n,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=n)}_computeScore(e){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let t=.5;return-1===this._front&&-1===this._rear||this._memory[this._rear],this._isAlmostInt(e.deltaX)&&this._isAlmostInt(e.deltaY)||(t+=.25),Math.min(Math.max(t,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}}D.INSTANCE=new D;class L extends a.${constructor(e,t,i){super(),this._onScroll=this._register(new C.Q5),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new C.Q5),e.style.overflow="hidden",this._options=function(e){const t={lazyRender:void 0!==e.lazyRender&&e.lazyRender,className:void 0!==e.className?e.className:"",useShadows:void 0===e.useShadows||e.useShadows,handleMouseWheel:void 0===e.handleMouseWheel||e.handleMouseWheel,flipAxes:void 0!==e.flipAxes&&e.flipAxes,consumeMouseWheelIfScrollbarIsNeeded:void 0!==e.consumeMouseWheelIfScrollbarIsNeeded&&e.consumeMouseWheelIfScrollbarIsNeeded,alwaysConsumeMouseWheel:void 0!==e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:void 0!==e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:void 0!==e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:void 0!==e.fastScrollSensitivity?e.fastScrollSensitivity:5,scrollPredominantAxis:void 0===e.scrollPredominantAxis||e.scrollPredominantAxis,mouseWheelSmoothScroll:void 0===e.mouseWheelSmoothScroll||e.mouseWheelSmoothScroll,arrowSize:void 0!==e.arrowSize?e.arrowSize:11,listenOnDomNode:void 0!==e.listenOnDomNode?e.listenOnDomNode:null,horizontal:void 0!==e.horizontal?e.horizontal:1,horizontalScrollbarSize:void 0!==e.horizontalScrollbarSize?e.horizontalScrollbarSize:10,horizontalSliderSize:void 0!==e.horizontalSliderSize?e.horizontalSliderSize:0,horizontalHasArrows:void 0!==e.horizontalHasArrows&&e.horizontalHasArrows,vertical:void 0!==e.vertical?e.vertical:1,verticalScrollbarSize:void 0!==e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:void 0!==e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:void 0!==e.verticalSliderSize?e.verticalSliderSize:0,scrollByPage:void 0!==e.scrollByPage&&e.scrollByPage};return t.horizontalSliderSize=void 0!==e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=void 0!==e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,d.dz&&(t.className+=" mac"),t}(t),this._scrollable=i,this._register(this._scrollable.onScroll((e=>{this._onWillScroll.fire(e),this._onDidScroll(e),this._onScroll.fire(e)})));const n={onMouseWheel:e=>this._onMouseWheel(e),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new w(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new v(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=(0,o.X)(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=(0,o.X)(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=(0,o.X)(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,(e=>this._onMouseOver(e))),this.onnonbubblingmouseout(this._listenOnDomNode,(e=>this._onMouseOut(e))),this._hideTimeout=this._register(new l._F),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=(0,u.B9)(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarMouseDown(e){this._verticalScrollbar.delegateMouseDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,d.dz&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){void 0!==e.handleMouseWheel&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),void 0!==e.mouseWheelScrollSensitivity&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),void 0!==e.fastScrollSensitivity&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),void 0!==e.scrollPredominantAxis&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),void 0!==e.horizontalScrollbarSize&&this._horizontalScrollbar.updateScrollbarSize(e.horizontalScrollbarSize),this._options.lazyRender||this._render()}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=(0,u.B9)(this._mouseWheelToDispose),e)){const e=e=>{this._onMouseWheel(new r.q(e))};this._mouseWheelToDispose.push(n.nm(this._listenOnDomNode,n.tw.MOUSE_WHEEL,e,{passive:!1}))}}_onMouseWheel(e){const t=D.INSTANCE;{const i=window.devicePixelRatio/(0,x.ie)();d.ED||d.IJ?t.accept(Date.now(),e.deltaX/i,e.deltaY/i):t.accept(Date.now(),e.deltaX,e.deltaY)}let i=!1;if(e.deltaY||e.deltaX){let n=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(Math.abs(n)>=Math.abs(o)?o=0:n=0),this._options.flipAxes&&([n,o]=[o,n]);const r=!d.dz&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!r||o||(o=n,n=0),e.browserEvent&&e.browserEvent.altKey&&(o*=this._options.fastScrollSensitivity,n*=this._options.fastScrollSensitivity);const s=this._scrollable.getFutureScrollPosition();let a={};if(n){const e=s.scrollTop-50*n;this._verticalScrollbar.writeScrollPosition(a,e)}if(o){const e=s.scrollLeft-50*o;this._horizontalScrollbar.writeScrollPosition(a,e)}a=this._scrollable.validateScrollPosition(a),(s.scrollLeft!==a.scrollLeft||s.scrollTop!==a.scrollTop)&&(this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),i=!0)}let n=i;!n&&this._options.alwaysConsumeMouseWheel&&(n=!0),!n&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(n=!0),n&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,n=i?" left":"",o=t?" top":"",r=i||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${o}`),this._topLeftShadowDomNode.setClassName(`shadow${r}${o}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseOut(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet((()=>this._hide()),500)}}class N extends L{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new S.Rm(0,(e=>n.jL(e)));super(e,t,i),this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class E extends L{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class A extends N{constructor(e,t){super(e,t),this._element=e,this.onScroll((e=>{e.scrollTopChanged&&(this._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this._element.scrollLeft=e.scrollLeft)})),this.scanDomNode()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}},3937:(e,t,i)=>{"use strict";i.d(t,{M:()=>b,z:()=>y});var n=i(5976),o=i(4669),r=i(8401),s=i(9870),a=i(9488),l=i(3098),c=i(1264),u=i(4850),h=i(5321),d=i(9802),g=i(6633);const f={separatorBorder:c.Il.transparent};class p{constructor(e,t,i,n){this.container=e,this.view=t,this.disposable=n,this._cachedVisibleSize=void 0,"number"==typeof i?(this._size=i,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=i.cachedVisibleSize)}set size(e){this._size=e}get size(){return this._size}get visible(){return void 0===this._cachedVisibleSize}setVisible(e,t){e!==this.visible&&(e?(this.size=(0,s.u)(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize="number"==typeof t?t:this.size,this.size=0),this.container.classList.toggle("visible",e),this.view.setVisible&&this.view.setVisible(e))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}layout(e,t){this.layoutContainer(e),this.view.layout(this.size,e,t)}dispose(){return this.disposable.dispose(),this.view}}class m extends p{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class _ extends p{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var v,b;!function(e){e[e.Idle=0]="Idle",e[e.Busy=1]="Busy"}(v||(v={})),function(e){e.Distribute={type:"distribute"},e.Split=function(e){return{type:"split",index:e}},e.Invisible=function(e){return{type:"invisible",cachedVisibleSize:e}}}(b||(b={}));class y extends n.JT{constructor(e,t={}){var i,n;super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=v.Idle,this._onDidSashChange=this._register(new o.Q5),this.onDidSashChange=this._onDidSashChange.event,this._onDidSashReset=this._register(new o.Q5),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.orientation=r.o8(t.orientation)?0:t.orientation,this.inverseAltBehavior=!!t.inverseAltBehavior,this.proportionalLayout=!!r.o8(t.proportionalLayout)||!!t.proportionalLayout,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(0===this.orientation?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=(0,h.R3)(this.el,(0,h.$)(".sash-container")),this.viewContainer=(0,h.$)(".split-view-container"),this.scrollable=new g.Rm(125,h.jL),this.scrollableElement=this._register(new d.$Z(this.viewContainer,{vertical:0===this.orientation?null!==(i=t.scrollbarVisibility)&&void 0!==i?i:1:2,horizontal:1===this.orientation?null!==(n=t.scrollbarVisibility)&&void 0!==n?n:1:2},this.scrollable)),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll((e=>{this.viewContainer.scrollTop=e.scrollTop,this.viewContainer.scrollLeft=e.scrollLeft}))),(0,h.R3)(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||f),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach(((e,t)=>{const i=r.o8(e.visible)||e.visible?e.size:{type:"invisible",cachedVisibleSize:e.size},n=e.view;this.doAddView(n,i,t,!0)})),this.contentSize=this.viewItems.reduce(((e,t)=>e+t.size),0),this.saveProportions())}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(e){for(const t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(e){for(const t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}get startSnappingEnabled(){return this._startSnappingEnabled}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}get endSnappingEnabled(){return this._endSnappingEnabled}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,i=this.viewItems.length,n){this.doAddView(e,t,i,n)}layout(e,t){const i=Math.max(this.size,this.contentSize);if(this.size=e,this.layoutContext=t,this.proportions)for(let t=0;t1===this.viewItems[e].priority)),o=t.filter((e=>2===this.viewItems[e].priority));this.resize(this.viewItems.length-1,e-i,void 0,n,o)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map((e=>e.size/this.contentSize)))}onSashStart({sash:e,start:t,alt:i}){for(const e of this.viewItems)e.enabled=!1;const o=this.sashItems.findIndex((t=>t.sash===e)),r=(0,n.F8)((0,u.jt)(document.body,"keydown")((e=>s(this.sashDragState.current,e.altKey))),(0,u.jt)(document.body,"keyup")((()=>s(this.sashDragState.current,!1)))),s=(e,t)=>{const i=this.viewItems.map((e=>e.size));let n,s,l=Number.NEGATIVE_INFINITY,c=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(t=!t),t)if(o===this.sashItems.length-1){const e=this.viewItems[o];l=(e.minimumSize-e.size)/2,c=(e.maximumSize-e.size)/2}else{const e=this.viewItems[o+1];l=(e.size-e.maximumSize)/2,c=(e.size-e.minimumSize)/2}if(!t){const e=(0,a.w6)(o,-1),t=(0,a.w6)(o+1,this.viewItems.length),r=e.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),l=e.reduce(((e,t)=>e+(this.viewItems[t].viewMaximumSize-i[t])),0),c=0===t.length?Number.POSITIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),u=0===t.length?Number.NEGATIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].viewMaximumSize)),0),h=Math.max(r,u),d=Math.min(c,l),g=this.findFirstSnapIndex(e),f=this.findFirstSnapIndex(t);if("number"==typeof g){const e=this.viewItems[g],t=Math.floor(e.viewMinimumSize/2);n={index:g,limitDelta:e.visible?h-t:h+t,size:e.size}}if("number"==typeof f){const e=this.viewItems[f],t=Math.floor(e.viewMinimumSize/2);s={index:f,limitDelta:e.visible?d+t:d-t,size:e.size}}}this.sashDragState={start:e,current:e,index:o,sizes:i,minDelta:l,maxDelta:c,alt:t,snapBefore:n,snapAfter:s,disposable:r}};s(t,i)}onSashChange({current:e}){const{index:t,start:i,sizes:n,alt:o,minDelta:r,maxDelta:s,snapBefore:a,snapAfter:l}=this.sashDragState;this.sashDragState.current=e;const c=e-i,u=this.resize(t,c,n,void 0,void 0,r,s,a,l);if(o){const e=t===this.sashItems.length-1,i=this.viewItems.map((e=>e.size)),n=e?t:t+1,o=this.viewItems[n],r=o.size-o.maximumSize,s=o.size-o.minimumSize,a=e?t-1:t+1;this.resize(a,-u,i,void 0,void 0,r,s)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const e of this.viewItems)e.enabled=!0}onViewChange(e,t){const i=this.viewItems.indexOf(e);i<0||i>=this.viewItems.length||(t="number"==typeof t?t:e.size,t=(0,s.u)(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&i>0?(this.resize(i-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([i],void 0)))}resizeView(e,t){if(this.state!==v.Idle)throw new Error("Cant modify splitview");if(this.state=v.Busy,e<0||e>=this.viewItems.length)return;const i=(0,a.w6)(this.viewItems.length).filter((t=>t!==e)),n=[...i.filter((e=>1===this.viewItems[e].priority)),e],o=i.filter((e=>2===this.viewItems[e].priority)),r=this.viewItems[e];t=Math.round(t),t=(0,s.u)(t,r.minimumSize,Math.min(r.maximumSize,this.size)),r.size=t,this.relayout(n,o),this.state=v.Idle}distributeViewSizes(){const e=[];let t=0;for(const i of this.viewItems)i.maximumSize-i.minimumSize>0&&(e.push(i),t+=i.size);const i=Math.floor(t/e.length);for(const t of e)t.size=(0,s.u)(i,t.minimumSize,t.maximumSize);const n=(0,a.w6)(this.viewItems.length),o=n.filter((e=>1===this.viewItems[e].priority)),r=n.filter((e=>2===this.viewItems[e].priority));this.relayout(o,r)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,i=this.viewItems.length,r){if(this.state!==v.Idle)throw new Error("Cant modify splitview");this.state=v.Busy;const s=(0,h.$)(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(s):this.viewContainer.insertBefore(s,this.viewContainer.children.item(i));const c=e.onDidChange((e=>this.onViewChange(f,e))),u=(0,n.OF)((()=>this.viewContainer.removeChild(s))),d=(0,n.F8)(c,u);let g;g="number"==typeof t?t:"split"===t.type?this.getViewSize(t.index)/2:"invisible"===t.type?{cachedVisibleSize:t.cachedVisibleSize}:e.minimumSize;const f=0===this.orientation?new m(s,e,g,d):new _(s,e,g,d);if(this.viewItems.splice(i,0,f),this.viewItems.length>1){let e={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash};const t=0===this.orientation?new l.g(this.sashContainer,{getHorizontalSashTop:e=>this.getSashPosition(e),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},e),{orientation:1})):new l.g(this.sashContainer,{getVerticalSashLeft:e=>this.getSashPosition(e),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},e),{orientation:0})),r=0===this.orientation?e=>({sash:t,start:e.startY,current:e.currentY,alt:e.altKey}):e=>({sash:t,start:e.startX,current:e.currentX,alt:e.altKey}),s=o.ju.map(t.onDidStart,r)(this.onSashStart,this),c=o.ju.map(t.onDidChange,r)(this.onSashChange,this),u=o.ju.map(t.onDidEnd,(()=>this.sashItems.findIndex((e=>e.sash===t))))(this.onSashEnd,this),h=t.onDidReset((()=>{const e=this.sashItems.findIndex((e=>e.sash===t)),i=(0,a.w6)(e,-1),n=(0,a.w6)(e+1,this.viewItems.length),o=this.findFirstSnapIndex(i),r=this.findFirstSnapIndex(n);("number"!=typeof o||this.viewItems[o].visible)&&("number"!=typeof r||this.viewItems[r].visible)&&this._onDidSashReset.fire(e)})),d=(0,n.F8)(s,c,u,h,t),g={sash:t,disposable:d};this.sashItems.splice(i-1,0,g)}let p;s.appendChild(e.element),"number"!=typeof t&&"split"===t.type&&(p=[t.index]),r||this.relayout([i],p),this.state=v.Idle,r||"number"==typeof t||"distribute"!==t.type||this.distributeViewSizes()}relayout(e,t){const i=this.viewItems.reduce(((e,t)=>e+t.size),0);this.resize(this.viewItems.length-1,this.size-i,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,i=this.viewItems.map((e=>e.size)),n,o,r=Number.NEGATIVE_INFINITY,l=Number.POSITIVE_INFINITY,c,u){if(e<0||e>=this.viewItems.length)return 0;const h=(0,a.w6)(e,-1),d=(0,a.w6)(e+1,this.viewItems.length);if(o)for(const e of o)(0,a.zI)(h,e),(0,a.zI)(d,e);if(n)for(const e of n)(0,a.al)(h,e),(0,a.al)(d,e);const g=h.map((e=>this.viewItems[e])),f=h.map((e=>i[e])),p=d.map((e=>this.viewItems[e])),m=d.map((e=>i[e])),_=h.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),v=h.reduce(((e,t)=>e+(this.viewItems[t].maximumSize-i[t])),0),b=0===d.length?Number.POSITIVE_INFINITY:d.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),y=0===d.length?Number.NEGATIVE_INFINITY:d.reduce(((e,t)=>e+(i[t]-this.viewItems[t].maximumSize)),0),w=Math.max(_,y,r),C=Math.min(b,v,l);let S=!1;if(c){const e=this.viewItems[c.index],i=t>=c.limitDelta;S=i!==e.visible,e.setVisible(i,c.size)}if(!S&&u){const e=this.viewItems[u.index],i=te+t.size),0);let i=this.size-t;const n=(0,a.w6)(this.viewItems.length-1,-1),o=n.filter((e=>1===this.viewItems[e].priority)),r=n.filter((e=>2===this.viewItems[e].priority));for(const e of r)(0,a.zI)(n,e);for(const e of o)(0,a.al)(n,e);"number"==typeof e&&(0,a.al)(n,e);for(let e=0;0!==i&&ee+t.size),0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach((e=>e.sash.layout())),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){0===this.orientation?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this.contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this.contentSize})}updateSashEnablement(){let e=!1;const t=this.viewItems.map((t=>e=t.size-t.minimumSize>0||e));e=!1;const i=this.viewItems.map((t=>e=t.maximumSize-t.size>0||e)),n=[...this.viewItems].reverse();e=!1;const o=n.map((t=>e=t.size-t.minimumSize>0||e)).reverse();e=!1;const r=n.map((t=>e=t.maximumSize-t.size>0||e)).reverse();let s=0;for(let e=0;e0||this.startSnappingEnabled)?n.state=1:h&&t[e]&&(s0)return;if(!e.visible&&e.snap)return t}}dispose(){super.dispose(),this.viewItems.forEach((e=>e.dispose())),this.viewItems=[],this.sashItems.forEach((e=>e.disposable.dispose())),this.sashItems=[]}}},3794:(e,t,i)=>{"use strict";i.d(t,{$:()=>l});var n=i(5321),o=i(9069),r=i(3938),s=i(5976),a=i(553);class l extends s.JT{onclick(e,t){this._register(n.nm(e,n.tw.CLICK,(e=>t(new r.n(e)))))}onmousedown(e,t){this._register(n.nm(e,n.tw.MOUSE_DOWN,(e=>t(new r.n(e)))))}onmouseover(e,t){this._register(n.nm(e,n.tw.MOUSE_OVER,(e=>t(new r.n(e)))))}onnonbubblingmouseout(e,t){this._register(n.j_(e,(e=>t(new r.n(e)))))}onkeydown(e,t){this._register(n.nm(e,n.tw.KEY_DOWN,(e=>t(new o.y(e)))))}onkeyup(e,t){this._register(n.nm(e,n.tw.KEY_UP,(e=>t(new o.y(e)))))}oninput(e,t){this._register(n.nm(e,n.tw.INPUT,t))}onblur(e,t){this._register(n.nm(e,n.tw.BLUR,t))}onfocus(e,t){this._register(n.nm(e,n.tw.FOCUS,t))}ignoreGesture(e){a.o.ignoreTarget(e)}}},4741:(e,t,i)=>{"use strict";i.d(t,{aU:()=>a,Wi:()=>l,Z0:()=>c,wY:()=>u,eZ:()=>h});var n=i(3580),o=i(5976),r=i(4669),s=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class a extends o.JT{constructor(e,t="",i="",n=!0,o){super(),this._onDidChange=this._register(new r.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._checked=!1,this._id=e,this._label=t,this._cssClass=i,this._enabled=n,this._actionCallback=o}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}run(e,t){return s(this,void 0,void 0,(function*(){this._actionCallback&&(yield this._actionCallback(e))}))}}class l extends o.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new r.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new r.Q5),this.onDidRun=this._onDidRun.event}run(e,t){return s(this,void 0,void 0,(function*(){if(!e.enabled)return;let i;this._onBeforeRun.fire({action:e});try{yield this.runAction(e,t)}catch(e){i=e}this._onDidRun.fire({action:e,error:i})}))}runAction(e,t){return s(this,void 0,void 0,(function*(){yield e.run(t)}))}}class c extends a{constructor(e){super(c.ID,e,e?"separator text":"separator"),this.checked=!1,this.enabled=!1}}c.ID="vs.actions.separator";class u{constructor(e,t,i,n){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=e,this.label=t,this.class=n,this._actions=i}get actions(){return this._actions}dispose(){}run(){return s(this,void 0,void 0,(function*(){}))}}class h extends a{constructor(){super(h.ID,n.N("submenu.empty","(empty)"),void 0,!1)}}h.ID="vs.actions.empty"},9488:(e,t,i)=>{"use strict";function n(e,t=0){return e[e.length-(1+t)]}function o(e){if(0===e.length)throw new Error("Invalid tail call");return[e.slice(0,e.length-1),e[e.length-1]]}function r(e,t,i=((e,t)=>e===t)){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let n=0,o=e.length;n0))return r;o=r-1}}return-(n+1)}function a(e,t){let i=0,n=e.length;if(0===n)return 0;for(;i=t.length)throw new TypeError("invalid index");let n=t[Math.floor(t.length*Math.random())],o=[],r=[],s=[];for(let e of t){const t=i(e,n);t<0?o.push(e):t>0?r.push(e):s.push(e)}return e!!e))}function h(e){return!Array.isArray(e)||0===e.length}function d(e){return Array.isArray(e)&&e.length>0}function g(e,t){if(!t)return e.filter(((t,i)=>e.indexOf(t)===i));const i=Object.create(null);return e.filter((e=>{const n=t(e);return!i[n]&&(i[n]=!0,!0)}))}function f(e){const t=new Set;return e.filter((e=>!t.has(e)&&(t.add(e),!0)))}function p(e,t){return e.length>0?e[0]:t}function m(e){return[].concat(...e)}function _(e,t){let i="number"==typeof t?e:0;"number"==typeof t?i=e:(i=0,t=e);const n=[];if(i<=t)for(let e=i;et;e--)n.push(e);return n}function v(e,t,i){const n=e.slice(0,t),o=e.slice(t);return n.concat(i,o)}function b(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.unshift(t))}function y(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.push(t))}function w(e){return Array.isArray(e)?e:[e]}i.d(t,{Gb:()=>n,JH:()=>o,fS:()=>r,ry:()=>s,lG:()=>a,HW:()=>l,vM:()=>c,kX:()=>u,XY:()=>h,Of:()=>d,EB:()=>g,cU:()=>f,Xh:()=>p,xH:()=>m,w6:()=>_,Zv:()=>v,zI:()=>b,al:()=>y,_2:()=>w})},5146:(e,t,i)=>{"use strict";function n(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}i.d(t,{ok:()=>n})},5393:(e,t,i)=>{"use strict";i.d(t,{J8:()=>a,PG:()=>l,eP:()=>c,vp:()=>h,rH:()=>d,Vs:()=>g,Vg:()=>f,Ps:()=>p,_F:()=>m,zh:()=>_,pY:()=>v,To:()=>b,Ue:()=>y,jT:()=>w});var n=i(1050),o=i(7301),r=i(5976),s=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function a(e){return!!e&&"function"==typeof e.then}function l(e){const t=new n.A,i=e(t.token),r=new Promise(((e,n)=>{t.token.onCancellationRequested((()=>{n((0,o.F0)())})),Promise.resolve(i).then((i=>{t.dispose(),e(i)}),(e=>{t.dispose(),n(e)}))}));return new class{cancel(){t.cancel()}then(e,t){return r.then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return r.finally(e)}}}function c(e,t,i){return Promise.race([e,new Promise((e=>t.onCancellationRequested((()=>e(i)))))])}class u{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const e=()=>{this.queuedPromise=null;const e=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,e};this.queuedPromise=new Promise((t=>{this.activePromise.then(e,e).then(t)}))}return new Promise(((e,t)=>{this.queuedPromise.then(e,t)}))}return this.activePromise=e(),new Promise(((e,t)=>{this.activePromise.then((t=>{this.activePromise=null,e(t)}),(e=>{this.activePromise=null,t(e)}))}))}}class h{constructor(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){return this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(((e,t)=>{this.doResolve=e,this.doReject=t})).then((()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const e=this.task;return this.task=null,e()}}))),this.timeout=setTimeout((()=>{this.timeout=null,this.doResolve&&this.doResolve(null)}),t),this.completionPromise}isTriggered(){return null!==this.timeout}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject&&this.doReject((0,o.F0)()),this.completionPromise=null)}cancelTimeout(){null!==this.timeout&&(clearTimeout(this.timeout),this.timeout=null)}dispose(){this.cancelTimeout()}}class d{constructor(e){this.delayer=new h(e),this.throttler=new u}trigger(e,t){return this.delayer.trigger((()=>this.throttler.queue(e)),t)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose()}}function g(e,t){return t?new Promise(((i,n)=>{const r=setTimeout(i,e);t.onCancellationRequested((()=>{clearTimeout(r),n((0,o.F0)())}))})):l((t=>g(e,t)))}function f(e,t=0){const i=setTimeout(e,t);return(0,r.OF)((()=>clearTimeout(i)))}function p(e,t=(e=>!!e),i=null){let n=0;const o=e.length,r=()=>{if(n>=o)return Promise.resolve(i);const s=e[n++];return Promise.resolve(s()).then((e=>t(e)?Promise.resolve(e):r()))};return r()}class m{constructor(e,t){this._token=-1,"function"==typeof e&&"number"==typeof t&&this.setIfNotSet(e,t)}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setTimeout((()=>{this._token=-1,e()}),t)}setIfNotSet(e,t){-1===this._token&&(this._token=setTimeout((()=>{this._token=-1,e()}),t))}}class _{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearInterval(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setInterval((()=>{e()}),t)}}class v{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner&&this.runner()}}let b;!function(){if("function"!=typeof requestIdleCallback||"function"!=typeof cancelIdleCallback){const e=Object.freeze({didTimeout:!0,timeRemaining:()=>15});b=t=>{const i=setTimeout((()=>t(e)));let n=!1;return{dispose(){n||(n=!0,clearTimeout(i))}}}}else b=(e,t)=>{const i=requestIdleCallback(e,"number"==typeof t?{timeout:t}:void 0);let n=!1;return{dispose(){n||(n=!0,cancelIdleCallback(i))}}}}();class y{constructor(e){this._didRun=!1,this._executor=()=>{try{this._value=e()}catch(e){this._error=e}finally{this._didRun=!0}},this._handle=b((()=>this._executor()))}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}}var w;!function(e){e.allSettled=function(e){return s(this,void 0,void 0,(function*(){return"function"==typeof Promise.allSettled?function(e){return s(this,void 0,void 0,(function*(){return Promise.allSettled(e)}))}(e):function(e){return s(this,void 0,void 0,(function*(){return Promise.all(e.map((e=>e.then((e=>({status:"fulfilled",value:e})),(e=>({status:"rejected",reason:e}))))))}))}(e)}))},e.settled=function(e){return s(this,void 0,void 0,(function*(){let t;const i=yield Promise.all(e.map((e=>e.then((e=>e),(e=>{t||(t=e)})))));if(void 0!==t)throw t;return i}))}}(w||(w={}))},3060:(e,t,i)=>{"use strict";i.d(t,{KN:()=>a,mP:()=>l,oq:()=>c,Ag:()=>u,T4:()=>h,Q$:()=>d,Cg:()=>g});var n=i(7295);const o="undefined"!=typeof Buffer,r="undefined"!=typeof TextDecoder;let s;class a{constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}static wrap(e){return o&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new a(e)}toString(){return o?this.buffer.toString():r?(s||(s=new TextDecoder),s.decode(this.buffer)):n.CZ(this.buffer)}}function l(e,t){return e[t+0]<<0>>>0|e[t+1]<<8>>>0}function c(e,t,i){e[i+0]=255&t,t>>>=8,e[i+1]=255&t}function u(e,t){return e[t]*Math.pow(2,24)+e[t+1]*Math.pow(2,16)+e[t+2]*Math.pow(2,8)+e[t+3]}function h(e,t,i){e[i+3]=t,t>>>=8,e[i+2]=t,t>>>=8,e[i+1]=t,t>>>=8,e[i]=t}function d(e,t){return e[t]}function g(e,t,i){e[i]=t}},1050:(e,t,i)=>{"use strict";i.d(t,{T:()=>r,A:()=>a});var n=i(4669);const o=Object.freeze((function(e,t){const i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}));var r;!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||t instanceof s||!(!t||"object"!=typeof t)&&"boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.ju.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:o})}(r||(r={}));class s{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?o:(this._emitter||(this._emitter=new n.Q5),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class a{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new s),this._token}cancel(){this._token?this._token instanceof s&&this._token.cancel():this._token=r.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof s&&this._token.dispose():this._token=r.None}}},3046:(e,t,i)=>{"use strict";i.d(t,{fK:()=>r,CM:()=>s,JL:()=>a,lA:()=>l,dT:()=>c});var n=i(4669);const o=new class{constructor(){this._icons=new Map,this._onDidRegister=new n.Q5}add(e){const t=this._icons.get(e.id);t?e.description?t.description=e.description:console.error(`Duplicate registration of codicon ${e.id}`):(this._icons.set(e.id,e),this._onDidRegister.fire(e))}get(e){return this._icons.get(e)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}},r=o;function s(e,t){return new l(e,t)}function a(e){return e?e.replace(/\$\((.*?)\)/g,((e,t)=>` ${t} `)).trim():""}class l{constructor(e,t,i){this.id=e,this.definition=t,this.description=i,o.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var c;!function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9\\-]+",e.iconModifierExpression="~[A-Za-z]+";const t=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function i(e){if(e instanceof l)return["codicon","codicon-"+e.id];const n=t.exec(e.id);if(!n)return i(l.error);let[,o,r]=n;const s=["codicon","codicon-"+o];return r&&s.push("codicon-modifier-"+r.substr(1)),s}e.asClassNameArray=i,e.asClassName=function(e){return i(e).join(" ")},e.asCSSSelector=function(e){return"."+i(e).join(".")}}(c||(c={})),function(e){e.add=new e("add",{fontCharacter:"\\ea60"}),e.plus=new e("plus",{fontCharacter:"\\ea60"}),e.gistNew=new e("gist-new",{fontCharacter:"\\ea60"}),e.repoCreate=new e("repo-create",{fontCharacter:"\\ea60"}),e.lightbulb=new e("lightbulb",{fontCharacter:"\\ea61"}),e.lightBulb=new e("light-bulb",{fontCharacter:"\\ea61"}),e.repo=new e("repo",{fontCharacter:"\\ea62"}),e.repoDelete=new e("repo-delete",{fontCharacter:"\\ea62"}),e.gistFork=new e("gist-fork",{fontCharacter:"\\ea63"}),e.repoForked=new e("repo-forked",{fontCharacter:"\\ea63"}),e.gitPullRequest=new e("git-pull-request",{fontCharacter:"\\ea64"}),e.gitPullRequestAbandoned=new e("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),e.recordKeys=new e("record-keys",{fontCharacter:"\\ea65"}),e.keyboard=new e("keyboard",{fontCharacter:"\\ea65"}),e.tag=new e("tag",{fontCharacter:"\\ea66"}),e.tagAdd=new e("tag-add",{fontCharacter:"\\ea66"}),e.tagRemove=new e("tag-remove",{fontCharacter:"\\ea66"}),e.person=new e("person",{fontCharacter:"\\ea67"}),e.personFollow=new e("person-follow",{fontCharacter:"\\ea67"}),e.personOutline=new e("person-outline",{fontCharacter:"\\ea67"}),e.personFilled=new e("person-filled",{fontCharacter:"\\ea67"}),e.gitBranch=new e("git-branch",{fontCharacter:"\\ea68"}),e.gitBranchCreate=new e("git-branch-create",{fontCharacter:"\\ea68"}),e.gitBranchDelete=new e("git-branch-delete",{fontCharacter:"\\ea68"}),e.sourceControl=new e("source-control",{fontCharacter:"\\ea68"}),e.mirror=new e("mirror",{fontCharacter:"\\ea69"}),e.mirrorPublic=new e("mirror-public",{fontCharacter:"\\ea69"}),e.star=new e("star",{fontCharacter:"\\ea6a"}),e.starAdd=new e("star-add",{fontCharacter:"\\ea6a"}),e.starDelete=new e("star-delete",{fontCharacter:"\\ea6a"}),e.starEmpty=new e("star-empty",{fontCharacter:"\\ea6a"}),e.comment=new e("comment",{fontCharacter:"\\ea6b"}),e.commentAdd=new e("comment-add",{fontCharacter:"\\ea6b"}),e.alert=new e("alert",{fontCharacter:"\\ea6c"}),e.warning=new e("warning",{fontCharacter:"\\ea6c"}),e.search=new e("search",{fontCharacter:"\\ea6d"}),e.searchSave=new e("search-save",{fontCharacter:"\\ea6d"}),e.logOut=new e("log-out",{fontCharacter:"\\ea6e"}),e.signOut=new e("sign-out",{fontCharacter:"\\ea6e"}),e.logIn=new e("log-in",{fontCharacter:"\\ea6f"}),e.signIn=new e("sign-in",{fontCharacter:"\\ea6f"}),e.eye=new e("eye",{fontCharacter:"\\ea70"}),e.eyeUnwatch=new e("eye-unwatch",{fontCharacter:"\\ea70"}),e.eyeWatch=new e("eye-watch",{fontCharacter:"\\ea70"}),e.circleFilled=new e("circle-filled",{fontCharacter:"\\ea71"}),e.primitiveDot=new e("primitive-dot",{fontCharacter:"\\ea71"}),e.closeDirty=new e("close-dirty",{fontCharacter:"\\ea71"}),e.debugBreakpoint=new e("debug-breakpoint",{fontCharacter:"\\ea71"}),e.debugBreakpointDisabled=new e("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),e.debugHint=new e("debug-hint",{fontCharacter:"\\ea71"}),e.primitiveSquare=new e("primitive-square",{fontCharacter:"\\ea72"}),e.edit=new e("edit",{fontCharacter:"\\ea73"}),e.pencil=new e("pencil",{fontCharacter:"\\ea73"}),e.info=new e("info",{fontCharacter:"\\ea74"}),e.issueOpened=new e("issue-opened",{fontCharacter:"\\ea74"}),e.gistPrivate=new e("gist-private",{fontCharacter:"\\ea75"}),e.gitForkPrivate=new e("git-fork-private",{fontCharacter:"\\ea75"}),e.lock=new e("lock",{fontCharacter:"\\ea75"}),e.mirrorPrivate=new e("mirror-private",{fontCharacter:"\\ea75"}),e.close=new e("close",{fontCharacter:"\\ea76"}),e.removeClose=new e("remove-close",{fontCharacter:"\\ea76"}),e.x=new e("x",{fontCharacter:"\\ea76"}),e.repoSync=new e("repo-sync",{fontCharacter:"\\ea77"}),e.sync=new e("sync",{fontCharacter:"\\ea77"}),e.clone=new e("clone",{fontCharacter:"\\ea78"}),e.desktopDownload=new e("desktop-download",{fontCharacter:"\\ea78"}),e.beaker=new e("beaker",{fontCharacter:"\\ea79"}),e.microscope=new e("microscope",{fontCharacter:"\\ea79"}),e.vm=new e("vm",{fontCharacter:"\\ea7a"}),e.deviceDesktop=new e("device-desktop",{fontCharacter:"\\ea7a"}),e.file=new e("file",{fontCharacter:"\\ea7b"}),e.fileText=new e("file-text",{fontCharacter:"\\ea7b"}),e.more=new e("more",{fontCharacter:"\\ea7c"}),e.ellipsis=new e("ellipsis",{fontCharacter:"\\ea7c"}),e.kebabHorizontal=new e("kebab-horizontal",{fontCharacter:"\\ea7c"}),e.mailReply=new e("mail-reply",{fontCharacter:"\\ea7d"}),e.reply=new e("reply",{fontCharacter:"\\ea7d"}),e.organization=new e("organization",{fontCharacter:"\\ea7e"}),e.organizationFilled=new e("organization-filled",{fontCharacter:"\\ea7e"}),e.organizationOutline=new e("organization-outline",{fontCharacter:"\\ea7e"}),e.newFile=new e("new-file",{fontCharacter:"\\ea7f"}),e.fileAdd=new e("file-add",{fontCharacter:"\\ea7f"}),e.newFolder=new e("new-folder",{fontCharacter:"\\ea80"}),e.fileDirectoryCreate=new e("file-directory-create",{fontCharacter:"\\ea80"}),e.trash=new e("trash",{fontCharacter:"\\ea81"}),e.trashcan=new e("trashcan",{fontCharacter:"\\ea81"}),e.history=new e("history",{fontCharacter:"\\ea82"}),e.clock=new e("clock",{fontCharacter:"\\ea82"}),e.folder=new e("folder",{fontCharacter:"\\ea83"}),e.fileDirectory=new e("file-directory",{fontCharacter:"\\ea83"}),e.symbolFolder=new e("symbol-folder",{fontCharacter:"\\ea83"}),e.logoGithub=new e("logo-github",{fontCharacter:"\\ea84"}),e.markGithub=new e("mark-github",{fontCharacter:"\\ea84"}),e.github=new e("github",{fontCharacter:"\\ea84"}),e.terminal=new e("terminal",{fontCharacter:"\\ea85"}),e.console=new e("console",{fontCharacter:"\\ea85"}),e.repl=new e("repl",{fontCharacter:"\\ea85"}),e.zap=new e("zap",{fontCharacter:"\\ea86"}),e.symbolEvent=new e("symbol-event",{fontCharacter:"\\ea86"}),e.error=new e("error",{fontCharacter:"\\ea87"}),e.stop=new e("stop",{fontCharacter:"\\ea87"}),e.variable=new e("variable",{fontCharacter:"\\ea88"}),e.symbolVariable=new e("symbol-variable",{fontCharacter:"\\ea88"}),e.array=new e("array",{fontCharacter:"\\ea8a"}),e.symbolArray=new e("symbol-array",{fontCharacter:"\\ea8a"}),e.symbolModule=new e("symbol-module",{fontCharacter:"\\ea8b"}),e.symbolPackage=new e("symbol-package",{fontCharacter:"\\ea8b"}),e.symbolNamespace=new e("symbol-namespace",{fontCharacter:"\\ea8b"}),e.symbolObject=new e("symbol-object",{fontCharacter:"\\ea8b"}),e.symbolMethod=new e("symbol-method",{fontCharacter:"\\ea8c"}),e.symbolFunction=new e("symbol-function",{fontCharacter:"\\ea8c"}),e.symbolConstructor=new e("symbol-constructor",{fontCharacter:"\\ea8c"}),e.symbolBoolean=new e("symbol-boolean",{fontCharacter:"\\ea8f"}),e.symbolNull=new e("symbol-null",{fontCharacter:"\\ea8f"}),e.symbolNumeric=new e("symbol-numeric",{fontCharacter:"\\ea90"}),e.symbolNumber=new e("symbol-number",{fontCharacter:"\\ea90"}),e.symbolStructure=new e("symbol-structure",{fontCharacter:"\\ea91"}),e.symbolStruct=new e("symbol-struct",{fontCharacter:"\\ea91"}),e.symbolParameter=new e("symbol-parameter",{fontCharacter:"\\ea92"}),e.symbolTypeParameter=new e("symbol-type-parameter",{fontCharacter:"\\ea92"}),e.symbolKey=new e("symbol-key",{fontCharacter:"\\ea93"}),e.symbolText=new e("symbol-text",{fontCharacter:"\\ea93"}),e.symbolReference=new e("symbol-reference",{fontCharacter:"\\ea94"}),e.goToFile=new e("go-to-file",{fontCharacter:"\\ea94"}),e.symbolEnum=new e("symbol-enum",{fontCharacter:"\\ea95"}),e.symbolValue=new e("symbol-value",{fontCharacter:"\\ea95"}),e.symbolRuler=new e("symbol-ruler",{fontCharacter:"\\ea96"}),e.symbolUnit=new e("symbol-unit",{fontCharacter:"\\ea96"}),e.activateBreakpoints=new e("activate-breakpoints",{fontCharacter:"\\ea97"}),e.archive=new e("archive",{fontCharacter:"\\ea98"}),e.arrowBoth=new e("arrow-both",{fontCharacter:"\\ea99"}),e.arrowDown=new e("arrow-down",{fontCharacter:"\\ea9a"}),e.arrowLeft=new e("arrow-left",{fontCharacter:"\\ea9b"}),e.arrowRight=new e("arrow-right",{fontCharacter:"\\ea9c"}),e.arrowSmallDown=new e("arrow-small-down",{fontCharacter:"\\ea9d"}),e.arrowSmallLeft=new e("arrow-small-left",{fontCharacter:"\\ea9e"}),e.arrowSmallRight=new e("arrow-small-right",{fontCharacter:"\\ea9f"}),e.arrowSmallUp=new e("arrow-small-up",{fontCharacter:"\\eaa0"}),e.arrowUp=new e("arrow-up",{fontCharacter:"\\eaa1"}),e.bell=new e("bell",{fontCharacter:"\\eaa2"}),e.bold=new e("bold",{fontCharacter:"\\eaa3"}),e.book=new e("book",{fontCharacter:"\\eaa4"}),e.bookmark=new e("bookmark",{fontCharacter:"\\eaa5"}),e.debugBreakpointConditionalUnverified=new e("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),e.debugBreakpointConditional=new e("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),e.debugBreakpointConditionalDisabled=new e("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),e.debugBreakpointDataUnverified=new e("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),e.debugBreakpointData=new e("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),e.debugBreakpointDataDisabled=new e("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),e.debugBreakpointLogUnverified=new e("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),e.debugBreakpointLog=new e("debug-breakpoint-log",{fontCharacter:"\\eaab"}),e.debugBreakpointLogDisabled=new e("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),e.briefcase=new e("briefcase",{fontCharacter:"\\eaac"}),e.broadcast=new e("broadcast",{fontCharacter:"\\eaad"}),e.browser=new e("browser",{fontCharacter:"\\eaae"}),e.bug=new e("bug",{fontCharacter:"\\eaaf"}),e.calendar=new e("calendar",{fontCharacter:"\\eab0"}),e.caseSensitive=new e("case-sensitive",{fontCharacter:"\\eab1"}),e.check=new e("check",{fontCharacter:"\\eab2"}),e.checklist=new e("checklist",{fontCharacter:"\\eab3"}),e.chevronDown=new e("chevron-down",{fontCharacter:"\\eab4"}),e.chevronLeft=new e("chevron-left",{fontCharacter:"\\eab5"}),e.chevronRight=new e("chevron-right",{fontCharacter:"\\eab6"}),e.chevronUp=new e("chevron-up",{fontCharacter:"\\eab7"}),e.chromeClose=new e("chrome-close",{fontCharacter:"\\eab8"}),e.chromeMaximize=new e("chrome-maximize",{fontCharacter:"\\eab9"}),e.chromeMinimize=new e("chrome-minimize",{fontCharacter:"\\eaba"}),e.chromeRestore=new e("chrome-restore",{fontCharacter:"\\eabb"}),e.circleOutline=new e("circle-outline",{fontCharacter:"\\eabc"}),e.debugBreakpointUnverified=new e("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),e.circleSlash=new e("circle-slash",{fontCharacter:"\\eabd"}),e.circuitBoard=new e("circuit-board",{fontCharacter:"\\eabe"}),e.clearAll=new e("clear-all",{fontCharacter:"\\eabf"}),e.clippy=new e("clippy",{fontCharacter:"\\eac0"}),e.closeAll=new e("close-all",{fontCharacter:"\\eac1"}),e.cloudDownload=new e("cloud-download",{fontCharacter:"\\eac2"}),e.cloudUpload=new e("cloud-upload",{fontCharacter:"\\eac3"}),e.code=new e("code",{fontCharacter:"\\eac4"}),e.collapseAll=new e("collapse-all",{fontCharacter:"\\eac5"}),e.colorMode=new e("color-mode",{fontCharacter:"\\eac6"}),e.commentDiscussion=new e("comment-discussion",{fontCharacter:"\\eac7"}),e.compareChanges=new e("compare-changes",{fontCharacter:"\\eafd"}),e.creditCard=new e("credit-card",{fontCharacter:"\\eac9"}),e.dash=new e("dash",{fontCharacter:"\\eacc"}),e.dashboard=new e("dashboard",{fontCharacter:"\\eacd"}),e.database=new e("database",{fontCharacter:"\\eace"}),e.debugContinue=new e("debug-continue",{fontCharacter:"\\eacf"}),e.debugDisconnect=new e("debug-disconnect",{fontCharacter:"\\ead0"}),e.debugPause=new e("debug-pause",{fontCharacter:"\\ead1"}),e.debugRestart=new e("debug-restart",{fontCharacter:"\\ead2"}),e.debugStart=new e("debug-start",{fontCharacter:"\\ead3"}),e.debugStepInto=new e("debug-step-into",{fontCharacter:"\\ead4"}),e.debugStepOut=new e("debug-step-out",{fontCharacter:"\\ead5"}),e.debugStepOver=new e("debug-step-over",{fontCharacter:"\\ead6"}),e.debugStop=new e("debug-stop",{fontCharacter:"\\ead7"}),e.debug=new e("debug",{fontCharacter:"\\ead8"}),e.deviceCameraVideo=new e("device-camera-video",{fontCharacter:"\\ead9"}),e.deviceCamera=new e("device-camera",{fontCharacter:"\\eada"}),e.deviceMobile=new e("device-mobile",{fontCharacter:"\\eadb"}),e.diffAdded=new e("diff-added",{fontCharacter:"\\eadc"}),e.diffIgnored=new e("diff-ignored",{fontCharacter:"\\eadd"}),e.diffModified=new e("diff-modified",{fontCharacter:"\\eade"}),e.diffRemoved=new e("diff-removed",{fontCharacter:"\\eadf"}),e.diffRenamed=new e("diff-renamed",{fontCharacter:"\\eae0"}),e.diff=new e("diff",{fontCharacter:"\\eae1"}),e.discard=new e("discard",{fontCharacter:"\\eae2"}),e.editorLayout=new e("editor-layout",{fontCharacter:"\\eae3"}),e.emptyWindow=new e("empty-window",{fontCharacter:"\\eae4"}),e.exclude=new e("exclude",{fontCharacter:"\\eae5"}),e.extensions=new e("extensions",{fontCharacter:"\\eae6"}),e.eyeClosed=new e("eye-closed",{fontCharacter:"\\eae7"}),e.fileBinary=new e("file-binary",{fontCharacter:"\\eae8"}),e.fileCode=new e("file-code",{fontCharacter:"\\eae9"}),e.fileMedia=new e("file-media",{fontCharacter:"\\eaea"}),e.filePdf=new e("file-pdf",{fontCharacter:"\\eaeb"}),e.fileSubmodule=new e("file-submodule",{fontCharacter:"\\eaec"}),e.fileSymlinkDirectory=new e("file-symlink-directory",{fontCharacter:"\\eaed"}),e.fileSymlinkFile=new e("file-symlink-file",{fontCharacter:"\\eaee"}),e.fileZip=new e("file-zip",{fontCharacter:"\\eaef"}),e.files=new e("files",{fontCharacter:"\\eaf0"}),e.filter=new e("filter",{fontCharacter:"\\eaf1"}),e.flame=new e("flame",{fontCharacter:"\\eaf2"}),e.foldDown=new e("fold-down",{fontCharacter:"\\eaf3"}),e.foldUp=new e("fold-up",{fontCharacter:"\\eaf4"}),e.fold=new e("fold",{fontCharacter:"\\eaf5"}),e.folderActive=new e("folder-active",{fontCharacter:"\\eaf6"}),e.folderOpened=new e("folder-opened",{fontCharacter:"\\eaf7"}),e.gear=new e("gear",{fontCharacter:"\\eaf8"}),e.gift=new e("gift",{fontCharacter:"\\eaf9"}),e.gistSecret=new e("gist-secret",{fontCharacter:"\\eafa"}),e.gist=new e("gist",{fontCharacter:"\\eafb"}),e.gitCommit=new e("git-commit",{fontCharacter:"\\eafc"}),e.gitCompare=new e("git-compare",{fontCharacter:"\\eafd"}),e.gitMerge=new e("git-merge",{fontCharacter:"\\eafe"}),e.githubAction=new e("github-action",{fontCharacter:"\\eaff"}),e.githubAlt=new e("github-alt",{fontCharacter:"\\eb00"}),e.globe=new e("globe",{fontCharacter:"\\eb01"}),e.grabber=new e("grabber",{fontCharacter:"\\eb02"}),e.graph=new e("graph",{fontCharacter:"\\eb03"}),e.gripper=new e("gripper",{fontCharacter:"\\eb04"}),e.heart=new e("heart",{fontCharacter:"\\eb05"}),e.home=new e("home",{fontCharacter:"\\eb06"}),e.horizontalRule=new e("horizontal-rule",{fontCharacter:"\\eb07"}),e.hubot=new e("hubot",{fontCharacter:"\\eb08"}),e.inbox=new e("inbox",{fontCharacter:"\\eb09"}),e.issueClosed=new e("issue-closed",{fontCharacter:"\\eb0a"}),e.issueReopened=new e("issue-reopened",{fontCharacter:"\\eb0b"}),e.issues=new e("issues",{fontCharacter:"\\eb0c"}),e.italic=new e("italic",{fontCharacter:"\\eb0d"}),e.jersey=new e("jersey",{fontCharacter:"\\eb0e"}),e.json=new e("json",{fontCharacter:"\\eb0f"}),e.kebabVertical=new e("kebab-vertical",{fontCharacter:"\\eb10"}),e.key=new e("key",{fontCharacter:"\\eb11"}),e.law=new e("law",{fontCharacter:"\\eb12"}),e.lightbulbAutofix=new e("lightbulb-autofix",{fontCharacter:"\\eb13"}),e.linkExternal=new e("link-external",{fontCharacter:"\\eb14"}),e.link=new e("link",{fontCharacter:"\\eb15"}),e.listOrdered=new e("list-ordered",{fontCharacter:"\\eb16"}),e.listUnordered=new e("list-unordered",{fontCharacter:"\\eb17"}),e.liveShare=new e("live-share",{fontCharacter:"\\eb18"}),e.loading=new e("loading",{fontCharacter:"\\eb19"}),e.location=new e("location",{fontCharacter:"\\eb1a"}),e.mailRead=new e("mail-read",{fontCharacter:"\\eb1b"}),e.mail=new e("mail",{fontCharacter:"\\eb1c"}),e.markdown=new e("markdown",{fontCharacter:"\\eb1d"}),e.megaphone=new e("megaphone",{fontCharacter:"\\eb1e"}),e.mention=new e("mention",{fontCharacter:"\\eb1f"}),e.milestone=new e("milestone",{fontCharacter:"\\eb20"}),e.mortarBoard=new e("mortar-board",{fontCharacter:"\\eb21"}),e.move=new e("move",{fontCharacter:"\\eb22"}),e.multipleWindows=new e("multiple-windows",{fontCharacter:"\\eb23"}),e.mute=new e("mute",{fontCharacter:"\\eb24"}),e.noNewline=new e("no-newline",{fontCharacter:"\\eb25"}),e.note=new e("note",{fontCharacter:"\\eb26"}),e.octoface=new e("octoface",{fontCharacter:"\\eb27"}),e.openPreview=new e("open-preview",{fontCharacter:"\\eb28"}),e.package_=new e("package",{fontCharacter:"\\eb29"}),e.paintcan=new e("paintcan",{fontCharacter:"\\eb2a"}),e.pin=new e("pin",{fontCharacter:"\\eb2b"}),e.play=new e("play",{fontCharacter:"\\eb2c"}),e.run=new e("run",{fontCharacter:"\\eb2c"}),e.plug=new e("plug",{fontCharacter:"\\eb2d"}),e.preserveCase=new e("preserve-case",{fontCharacter:"\\eb2e"}),e.preview=new e("preview",{fontCharacter:"\\eb2f"}),e.project=new e("project",{fontCharacter:"\\eb30"}),e.pulse=new e("pulse",{fontCharacter:"\\eb31"}),e.question=new e("question",{fontCharacter:"\\eb32"}),e.quote=new e("quote",{fontCharacter:"\\eb33"}),e.radioTower=new e("radio-tower",{fontCharacter:"\\eb34"}),e.reactions=new e("reactions",{fontCharacter:"\\eb35"}),e.references=new e("references",{fontCharacter:"\\eb36"}),e.refresh=new e("refresh",{fontCharacter:"\\eb37"}),e.regex=new e("regex",{fontCharacter:"\\eb38"}),e.remoteExplorer=new e("remote-explorer",{fontCharacter:"\\eb39"}),e.remote=new e("remote",{fontCharacter:"\\eb3a"}),e.remove=new e("remove",{fontCharacter:"\\eb3b"}),e.replaceAll=new e("replace-all",{fontCharacter:"\\eb3c"}),e.replace=new e("replace",{fontCharacter:"\\eb3d"}),e.repoClone=new e("repo-clone",{fontCharacter:"\\eb3e"}),e.repoForcePush=new e("repo-force-push",{fontCharacter:"\\eb3f"}),e.repoPull=new e("repo-pull",{fontCharacter:"\\eb40"}),e.repoPush=new e("repo-push",{fontCharacter:"\\eb41"}),e.report=new e("report",{fontCharacter:"\\eb42"}),e.requestChanges=new e("request-changes",{fontCharacter:"\\eb43"}),e.rocket=new e("rocket",{fontCharacter:"\\eb44"}),e.rootFolderOpened=new e("root-folder-opened",{fontCharacter:"\\eb45"}),e.rootFolder=new e("root-folder",{fontCharacter:"\\eb46"}),e.rss=new e("rss",{fontCharacter:"\\eb47"}),e.ruby=new e("ruby",{fontCharacter:"\\eb48"}),e.saveAll=new e("save-all",{fontCharacter:"\\eb49"}),e.saveAs=new e("save-as",{fontCharacter:"\\eb4a"}),e.save=new e("save",{fontCharacter:"\\eb4b"}),e.screenFull=new e("screen-full",{fontCharacter:"\\eb4c"}),e.screenNormal=new e("screen-normal",{fontCharacter:"\\eb4d"}),e.searchStop=new e("search-stop",{fontCharacter:"\\eb4e"}),e.server=new e("server",{fontCharacter:"\\eb50"}),e.settingsGear=new e("settings-gear",{fontCharacter:"\\eb51"}),e.settings=new e("settings",{fontCharacter:"\\eb52"}),e.shield=new e("shield",{fontCharacter:"\\eb53"}),e.smiley=new e("smiley",{fontCharacter:"\\eb54"}),e.sortPrecedence=new e("sort-precedence",{fontCharacter:"\\eb55"}),e.splitHorizontal=new e("split-horizontal",{fontCharacter:"\\eb56"}),e.splitVertical=new e("split-vertical",{fontCharacter:"\\eb57"}),e.squirrel=new e("squirrel",{fontCharacter:"\\eb58"}),e.starFull=new e("star-full",{fontCharacter:"\\eb59"}),e.starHalf=new e("star-half",{fontCharacter:"\\eb5a"}),e.symbolClass=new e("symbol-class",{fontCharacter:"\\eb5b"}),e.symbolColor=new e("symbol-color",{fontCharacter:"\\eb5c"}),e.symbolConstant=new e("symbol-constant",{fontCharacter:"\\eb5d"}),e.symbolEnumMember=new e("symbol-enum-member",{fontCharacter:"\\eb5e"}),e.symbolField=new e("symbol-field",{fontCharacter:"\\eb5f"}),e.symbolFile=new e("symbol-file",{fontCharacter:"\\eb60"}),e.symbolInterface=new e("symbol-interface",{fontCharacter:"\\eb61"}),e.symbolKeyword=new e("symbol-keyword",{fontCharacter:"\\eb62"}),e.symbolMisc=new e("symbol-misc",{fontCharacter:"\\eb63"}),e.symbolOperator=new e("symbol-operator",{fontCharacter:"\\eb64"}),e.symbolProperty=new e("symbol-property",{fontCharacter:"\\eb65"}),e.wrench=new e("wrench",{fontCharacter:"\\eb65"}),e.wrenchSubaction=new e("wrench-subaction",{fontCharacter:"\\eb65"}),e.symbolSnippet=new e("symbol-snippet",{fontCharacter:"\\eb66"}),e.tasklist=new e("tasklist",{fontCharacter:"\\eb67"}),e.telescope=new e("telescope",{fontCharacter:"\\eb68"}),e.textSize=new e("text-size",{fontCharacter:"\\eb69"}),e.threeBars=new e("three-bars",{fontCharacter:"\\eb6a"}),e.thumbsdown=new e("thumbsdown",{fontCharacter:"\\eb6b"}),e.thumbsup=new e("thumbsup",{fontCharacter:"\\eb6c"}),e.tools=new e("tools",{fontCharacter:"\\eb6d"}),e.triangleDown=new e("triangle-down",{fontCharacter:"\\eb6e"}),e.triangleLeft=new e("triangle-left",{fontCharacter:"\\eb6f"}),e.triangleRight=new e("triangle-right",{fontCharacter:"\\eb70"}),e.triangleUp=new e("triangle-up",{fontCharacter:"\\eb71"}),e.twitter=new e("twitter",{fontCharacter:"\\eb72"}),e.unfold=new e("unfold",{fontCharacter:"\\eb73"}),e.unlock=new e("unlock",{fontCharacter:"\\eb74"}),e.unmute=new e("unmute",{fontCharacter:"\\eb75"}),e.unverified=new e("unverified",{fontCharacter:"\\eb76"}),e.verified=new e("verified",{fontCharacter:"\\eb77"}),e.versions=new e("versions",{fontCharacter:"\\eb78"}),e.vmActive=new e("vm-active",{fontCharacter:"\\eb79"}),e.vmOutline=new e("vm-outline",{fontCharacter:"\\eb7a"}),e.vmRunning=new e("vm-running",{fontCharacter:"\\eb7b"}),e.watch=new e("watch",{fontCharacter:"\\eb7c"}),e.whitespace=new e("whitespace",{fontCharacter:"\\eb7d"}),e.wholeWord=new e("whole-word",{fontCharacter:"\\eb7e"}),e.window=new e("window",{fontCharacter:"\\eb7f"}),e.wordWrap=new e("word-wrap",{fontCharacter:"\\eb80"}),e.zoomIn=new e("zoom-in",{fontCharacter:"\\eb81"}),e.zoomOut=new e("zoom-out",{fontCharacter:"\\eb82"}),e.listFilter=new e("list-filter",{fontCharacter:"\\eb83"}),e.listFlat=new e("list-flat",{fontCharacter:"\\eb84"}),e.listSelection=new e("list-selection",{fontCharacter:"\\eb85"}),e.selection=new e("selection",{fontCharacter:"\\eb85"}),e.listTree=new e("list-tree",{fontCharacter:"\\eb86"}),e.debugBreakpointFunctionUnverified=new e("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),e.debugBreakpointFunction=new e("debug-breakpoint-function",{fontCharacter:"\\eb88"}),e.debugBreakpointFunctionDisabled=new e("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),e.debugStackframeActive=new e("debug-stackframe-active",{fontCharacter:"\\eb89"}),e.debugStackframeDot=new e("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),e.debugStackframe=new e("debug-stackframe",{fontCharacter:"\\eb8b"}),e.debugStackframeFocused=new e("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),e.debugBreakpointUnsupported=new e("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),e.symbolString=new e("symbol-string",{fontCharacter:"\\eb8d"}),e.debugReverseContinue=new e("debug-reverse-continue",{fontCharacter:"\\eb8e"}),e.debugStepBack=new e("debug-step-back",{fontCharacter:"\\eb8f"}),e.debugRestartFrame=new e("debug-restart-frame",{fontCharacter:"\\eb90"}),e.callIncoming=new e("call-incoming",{fontCharacter:"\\eb92"}),e.callOutgoing=new e("call-outgoing",{fontCharacter:"\\eb93"}),e.menu=new e("menu",{fontCharacter:"\\eb94"}),e.expandAll=new e("expand-all",{fontCharacter:"\\eb95"}),e.feedback=new e("feedback",{fontCharacter:"\\eb96"}),e.groupByRefType=new e("group-by-ref-type",{fontCharacter:"\\eb97"}),e.ungroupByRefType=new e("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),e.account=new e("account",{fontCharacter:"\\eb99"}),e.bellDot=new e("bell-dot",{fontCharacter:"\\eb9a"}),e.debugConsole=new e("debug-console",{fontCharacter:"\\eb9b"}),e.library=new e("library",{fontCharacter:"\\eb9c"}),e.output=new e("output",{fontCharacter:"\\eb9d"}),e.runAll=new e("run-all",{fontCharacter:"\\eb9e"}),e.syncIgnored=new e("sync-ignored",{fontCharacter:"\\eb9f"}),e.pinned=new e("pinned",{fontCharacter:"\\eba0"}),e.githubInverted=new e("github-inverted",{fontCharacter:"\\eba1"}),e.debugAlt=new e("debug-alt",{fontCharacter:"\\eb91"}),e.serverProcess=new e("server-process",{fontCharacter:"\\eba2"}),e.serverEnvironment=new e("server-environment",{fontCharacter:"\\eba3"}),e.pass=new e("pass",{fontCharacter:"\\eba4"}),e.stopCircle=new e("stop-circle",{fontCharacter:"\\eba5"}),e.playCircle=new e("play-circle",{fontCharacter:"\\eba6"}),e.record=new e("record",{fontCharacter:"\\eba7"}),e.debugAltSmall=new e("debug-alt-small",{fontCharacter:"\\eba8"}),e.vmConnect=new e("vm-connect",{fontCharacter:"\\eba9"}),e.cloud=new e("cloud",{fontCharacter:"\\ebaa"}),e.merge=new e("merge",{fontCharacter:"\\ebab"}),e.exportIcon=new e("export",{fontCharacter:"\\ebac"}),e.graphLeft=new e("graph-left",{fontCharacter:"\\ebad"}),e.magnet=new e("magnet",{fontCharacter:"\\ebae"}),e.notebook=new e("notebook",{fontCharacter:"\\ebaf"}),e.redo=new e("redo",{fontCharacter:"\\ebb0"}),e.checkAll=new e("check-all",{fontCharacter:"\\ebb1"}),e.pinnedDirty=new e("pinned-dirty",{fontCharacter:"\\ebb2"}),e.passFilled=new e("pass-filled",{fontCharacter:"\\ebb3"}),e.circleLargeFilled=new e("circle-large-filled",{fontCharacter:"\\ebb4"}),e.circleLargeOutline=new e("circle-large-outline",{fontCharacter:"\\ebb5"}),e.combine=new e("combine",{fontCharacter:"\\ebb6"}),e.gather=new e("gather",{fontCharacter:"\\ebb6"}),e.table=new e("table",{fontCharacter:"\\ebb7"}),e.variableGroup=new e("variable-group",{fontCharacter:"\\ebb8"}),e.typeHierarchy=new e("type-hierarchy",{fontCharacter:"\\ebb9"}),e.typeHierarchySub=new e("type-hierarchy-sub",{fontCharacter:"\\ebba"}),e.typeHierarchySuper=new e("type-hierarchy-super",{fontCharacter:"\\ebbb"}),e.gitPullRequestCreate=new e("git-pull-request-create",{fontCharacter:"\\ebbc"}),e.runAbove=new e("run-above",{fontCharacter:"\\ebbd"}),e.runBelow=new e("run-below",{fontCharacter:"\\ebbe"}),e.notebookTemplate=new e("notebook-template",{fontCharacter:"\\ebbf"}),e.debugRerun=new e("debug-rerun",{fontCharacter:"\\ebc0"}),e.workspaceTrusted=new e("workspace-trusted",{fontCharacter:"\\ebc1"}),e.workspaceUntrusted=new e("workspace-untrusted",{fontCharacter:"\\ebc2"}),e.workspaceUnspecified=new e("workspace-unspecified",{fontCharacter:"\\ebc3"}),e.terminalCmd=new e("terminal-cmd",{fontCharacter:"\\ebc4"}),e.terminalDebian=new e("terminal-debian",{fontCharacter:"\\ebc5"}),e.terminalLinux=new e("terminal-linux",{fontCharacter:"\\ebc6"}),e.terminalPowershell=new e("terminal-powershell",{fontCharacter:"\\ebc7"}),e.terminalTmux=new e("terminal-tmux",{fontCharacter:"\\ebc8"}),e.terminalUbuntu=new e("terminal-ubuntu",{fontCharacter:"\\ebc9"}),e.terminalBash=new e("terminal-bash",{fontCharacter:"\\ebca"}),e.arrowSwap=new e("arrow-swap",{fontCharacter:"\\ebcb"}),e.copy=new e("copy",{fontCharacter:"\\ebcc"}),e.personAdd=new e("person-add",{fontCharacter:"\\ebcd"}),e.filterFilled=new e("filter-filled",{fontCharacter:"\\ebce"}),e.wand=new e("wand",{fontCharacter:"\\ebcf"}),e.debugLineByLine=new e("debug-line-by-line",{fontCharacter:"\\ebd0"}),e.inspect=new e("inspect",{fontCharacter:"\\ebd1"}),e.dropDownButton=new e("drop-down-button",e.chevronDown.definition)}(l||(l={}))},6626:(e,t,i)=>{"use strict";i.d(t,{E:()=>o,r:()=>r});const n=Object.prototype.hasOwnProperty;function o(e,t){for(let i in e)if(n.call(e,i)&&!1===t({key:i,value:e[i]},(function(){delete e[i]})))return}class r{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){const i=this.map.get(e);i&&(i.delete(t),0===i.size&&this.map.delete(e))}forEach(e,t){const i=this.map.get(e);i&&i.forEach(t)}}},1264:(e,t,i)=>{"use strict";function n(e,t){const i=Math.pow(10,t);return Math.round(e*i)/i}i.d(t,{VS:()=>o,tx:()=>s,Il:()=>a});class o{constructor(e,t,i,o=1){this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,i)),this.a=n(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class r{constructor(e,t,i,o){this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.l=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,o=e.a,s=Math.max(t,i,n),a=Math.min(t,i,n);let l=0,c=0;const u=(a+s)/2,h=s-a;if(h>0){switch(c=Math.min(u<=.5?h/(2*u):h/(2-2*u),1),s){case t:l=(i-n)/h+(i1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}static toRGBA(e){const t=e.h/360,{s:i,l:n,a:s}=e;let a,l,c;if(0===i)a=l=c=n;else{const e=n<.5?n*(1+i):n+i-n*i,o=2*n-e;a=r._hue2rgb(o,e,t+1/3),l=r._hue2rgb(o,e,t),c=r._hue2rgb(o,e,t-1/3)}return new o(Math.round(255*a),Math.round(255*l),Math.round(255*c),s)}}class s{constructor(e,t,i,o){this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.v=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,o),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,o=Math.max(t,i,n),r=o-Math.min(t,i,n),a=0===o?0:r/o;let l;return l=0===r?0:o===t?((i-n)/r%6+6)%6:o===i?(n-t)/r+2:(t-i)/r+4,new s(Math.round(60*l),a,o,e.a)}static toRGBA(e){const{h:t,s:i,v:n,a:r}=e,s=n*i,a=s*(1-Math.abs(t/60%2-1)),l=n-s;let[c,u,h]=[0,0,0];return t<60?(c=s,u=a):t<120?(c=a,u=s):t<180?(u=s,h=a):t<240?(u=a,h=s):t<300?(c=a,h=s):t<=360&&(c=s,h=a),c=Math.round(255*(c+l)),u=Math.round(255*(u+l)),h=Math.round(255*(h+l)),new o(c,u,h,r)}}class a{constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof o)this.rgba=e;else if(e instanceof r)this._hsla=e,this.rgba=r.toRGBA(e);else{if(!(e instanceof s))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=s.toRGBA(e)}}static fromHex(e){return a.Format.CSS.parseHex(e)||a.red}get hsla(){return this._hsla?this._hsla:r.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:s.fromRGBA(this.rgba)}equals(e){return!!e&&o.equals(this.rgba,e.rgba)&&r.equals(this.hsla,e.hsla)&&s.equals(this.hsva,e.hsva)}getRelativeLuminance(){return n(.2126*a._relativeLuminanceForComponent(this.rgba.r)+.7152*a._relativeLuminanceForComponent(this.rgba.g)+.0722*a._relativeLuminanceForComponent(this.rgba.b),4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128}isLighterThan(e){return this.getRelativeLuminance()>e.getRelativeLuminance()}isDarkerThan(e){return this.getRelativeLuminance(){"use strict";function n(e,t,i){let n=null,o=null;if("function"==typeof i.value?(n="value",o=i.value,0!==o.length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"==typeof i.get&&(n="get",o=i.get),!o)throw new Error("not supported");const r=`$memoize$${t}`;i[n]=function(...e){return this.hasOwnProperty(r)||Object.defineProperty(this,r,{configurable:!1,enumerable:!1,writable:!1,value:o.apply(this,e)}),this[r]}}i.d(t,{H:()=>n})},2484:(e,t,i)=>{"use strict";i.d(t,{Hs:()=>u,a$:()=>s});class n{constructor(e,t,i,n){this.originalStart=e,this.originalLength=t,this.modifiedStart=i,this.modifiedLength=n}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}var o=i(9954);class r{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let i=0,n=e.length;i0||this.m_modifiedCount>0)&&this.m_changes.push(new n(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class u{constructor(e,t,i=null){this.ContinueProcessingPredicate=i;const[n,o,r]=u._getElements(e),[s,a,l]=u._getElements(t);this._hasStrings=r&&l,this._originalStringElements=n,this._originalElementsOrHash=o,this._modifiedStringElements=s,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"==typeof e[0]}static _getElements(e){const t=e.getElements();if(u._isStringArray(t)){const e=new Int32Array(t.length);for(let i=0,n=t.length;i=e&&o>=i&&this.ElementsAreEqual(t,o);)t--,o--;if(e>t||i>o){let r;return i<=o?(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),r=[new n(e,0,i,o-i+1)]):e<=t?(a.Assert(i===o+1,"modifiedStart should only be one more than modifiedEnd"),r=[new n(e,t-e+1,i,0)]):(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a.Assert(i===o+1,"modifiedStart should only be one more than modifiedEnd"),r=[]),r}const s=[0],l=[0],c=this.ComputeRecursionPoint(e,t,i,o,s,l,r),u=s[0],h=l[0];if(null!==c)return c;if(!r[0]){const s=this.ComputeDiffRecursive(e,u,i,h,r);let a=[];return a=r[0]?[new n(u+1,t-(u+1)+1,h+1,o-(h+1)+1)]:this.ComputeDiffRecursive(u+1,t,h+1,o,r),this.ConcatenateChanges(s,a)}return[new n(e,t-e+1,i,o-i+1)]}WALKTRACE(e,t,i,o,r,s,a,l,u,h,d,g,f,p,m,_,v,b){let y=null,w=null,C=new c,S=t,x=i,k=f[0]-_[0]-o,D=-1073741824,L=this.m_forwardHistory.length-1;do{const t=k+e;t===S||t=0&&(e=(u=this.m_forwardHistory[L])[0],S=1,x=u.length-1)}while(--L>=-1);if(y=C.getReverseChanges(),b[0]){let e=f[0]+1,t=_[0]+1;if(null!==y&&y.length>0){const i=y[y.length-1];e=Math.max(e,i.getOriginalEnd()),t=Math.max(t,i.getModifiedEnd())}w=[new n(e,g-e+1,t,m-t+1)]}else{C=new c,S=s,x=a,k=f[0]-_[0]-l,D=1073741824,L=v?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=k+r;e===S||e=h[e+1]?(p=(d=h[e+1]-1)-k-l,d>D&&C.MarkNextChange(),D=d+1,C.AddOriginalElement(d+1,p+1),k=e+1-r):(p=(d=h[e-1])-k-l,d>D&&C.MarkNextChange(),D=d,C.AddModifiedElement(d+1,p+1),k=e-1-r),L>=0&&(r=(h=this.m_reverseHistory[L])[0],S=1,x=h.length-1)}while(--L>=-1);w=C.getChanges()}return this.ConcatenateChanges(y,w)}ComputeRecursionPoint(e,t,i,o,r,s,a){let c=0,u=0,h=0,d=0,g=0,f=0;e--,i--,r[0]=0,s[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const p=t-e+(o-i),m=p+1,_=new Int32Array(m),v=new Int32Array(m),b=o-i,y=t-e,w=e-i,C=t-o,S=(y-b)%2==0;_[b]=e,v[y]=t,a[0]=!1;for(let x=1;x<=p/2+1;x++){let p=0,k=0;h=this.ClipDiagonalBound(b-x,x,b,m),d=this.ClipDiagonalBound(b+x,x,b,m);for(let e=h;e<=d;e+=2){c=e===h||ep+k&&(p=c,k=u),!S&&Math.abs(e-y)<=x-1&&c>=v[e])return r[0]=c,s[0]=u,i<=v[e]&&x<=1448?this.WALKTRACE(b,h,d,w,y,g,f,C,_,v,c,t,r,u,o,s,S,a):null}const D=(p-e+(k-i)-x)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(p,D))return a[0]=!0,r[0]=p,s[0]=k,D>0&&x<=1448?this.WALKTRACE(b,h,d,w,y,g,f,C,_,v,c,t,r,u,o,s,S,a):(e++,i++,[new n(e,t-e+1,i,o-i+1)]);g=this.ClipDiagonalBound(y-x,x,y,m),f=this.ClipDiagonalBound(y+x,x,y,m);for(let n=g;n<=f;n+=2){c=n===g||n=v[n+1]?v[n+1]-1:v[n-1],u=c-(n-y)-C;const l=c;for(;c>e&&u>i&&this.ElementsAreEqual(c,u);)c--,u--;if(v[n]=c,S&&Math.abs(n-b)<=x&&c<=_[n])return r[0]=c,s[0]=u,l>=_[n]&&x<=1448?this.WALKTRACE(b,h,d,w,y,g,f,C,_,v,c,t,r,u,o,s,S,a):null}if(x<=1447){let e=new Int32Array(d-h+2);e[0]=b-h+1,l.Copy2(_,h,e,1,d-h+1),this.m_forwardHistory.push(e),e=new Int32Array(f-g+2),e[0]=y-g+1,l.Copy2(v,g,e,1,f-g+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(b,h,d,w,y,g,f,C,_,v,c,t,r,u,o,s,S,a)}PrettifyChanges(e){for(let t=0;t0,s=i.modifiedLength>0;for(;i.originalStart+i.originalLength=0;t--){const i=e[t];let n=0,o=0;if(t>0){const i=e[t-1];n=i.originalStart+i.originalLength,o=i.modifiedStart+i.modifiedLength}const r=i.originalLength>0,s=i.modifiedLength>0;let a=0,l=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let e=1;;e++){const t=i.originalStart-e,c=i.modifiedStart-e;if(tl&&(l=u,a=e)}i.originalStart-=a,i.modifiedStart-=a;const c=[null];t>0&&this.ChangesOverlap(e[t-1],e[t],c)&&(e[t-1]=c[0],e.splice(t,1),t++)}if(this._hasStrings)for(let t=1,i=e.length;t0&&i>a&&(a=i,l=t,c=e)}return a>0?[l,c]:null}_contiguousSequenceScore(e,t,i){let n=0;for(let o=0;o=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(e,t,i,n){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(i,n)?1:0)}ConcatenateChanges(e,t){let i=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],i)){const n=new Array(e.length+t.length-1);return l.Copy(e,0,n,0,e.length-1),n[e.length-1]=i[0],l.Copy(t,1,n,e.length,t.length-1),n}{const i=new Array(e.length+t.length);return l.Copy(e,0,i,0,e.length),l.Copy(t,0,i,e.length,t.length),i}}ChangesOverlap(e,t,i){if(a.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),a.Assert(e.modifiedStart<=t.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=t.originalStart||e.modifiedStart+e.modifiedLength>=t.modifiedStart){const o=e.originalStart;let r=e.originalLength;const s=e.modifiedStart;let a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(r=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),i[0]=new n(o,r,s,a),!0}return i[0]=null,!1}ClipDiagonalBound(e,t,i,n){if(e>=0&&e{"use strict";i.d(t,{dL:()=>o,Cp:()=>r,ri:()=>s,VV:()=>l,F0:()=>c,b1:()=>u,L6:()=>h});const n=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((()=>{if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e}),0)}}emit(e){this.listeners.forEach((t=>{t(e)}))}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function o(e){l(e)||n.onUnexpectedError(e)}function r(e){l(e)||n.onUnexpectedExternalError(e)}function s(e){if(e instanceof Error){let{name:t,message:i}=e;return{$isError:!0,name:t,message:i,stack:e.stacktrace||e.stack}}return e}const a="Canceled";function l(e){return e instanceof Error&&e.name===a&&e.message===a}function c(){const e=new Error(a);return e.name=e.message,e}function u(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}function h(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")}},4669:(e,t,i)=>{"use strict";i.d(t,{ju:()=>n,Q5:()=>c,K3:()=>u,E7:()=>h,ZD:()=>d});var n,o=i(7301),r=i(5976),s=i(1741),a=i(4013);!function(e){function t(e){return(t,i=null,n)=>{let o,r=!1;return o=e((e=>{if(!r)return o?o.dispose():r=!0,t.call(i,e)}),null,n),r&&o.dispose(),o}}function i(e,t){return a(((i,n=null,o)=>e((e=>i.call(n,t(e))),null,o)))}function n(e,t){return a(((i,n=null,o)=>e((e=>{t(e),i.call(n,e)}),null,o)))}function o(e,t){return a(((i,n=null,o)=>e((e=>t(e)&&i.call(n,e)),null,o)))}function s(e,t,n){let o=n;return i(e,(e=>(o=t(o,e),o)))}function a(e){let t;const i=new c({onFirstListenerAdd(){t=e(i.fire,i)},onLastListenerRemove(){t.dispose()}});return i.event}function l(e,t,i=100,n=!1,o){let r,s,a,l=0;const u=new c({leakWarningThreshold:o,onFirstListenerAdd(){r=e((e=>{l++,s=t(s,e),n&&!a&&(u.fire(s),s=void 0),clearTimeout(a),a=setTimeout((()=>{const e=s;s=void 0,a=void 0,(!n||l>1)&&u.fire(e),l=0}),i)}))},onLastListenerRemove(){r.dispose()}});return u.event}function u(e,t=((e,t)=>e===t)){let i,n=!0;return o(e,(e=>{const o=n||!t(e,i);return n=!1,i=e,o}))}e.None=()=>r.JT.None,e.once=t,e.map=i,e.forEach=n,e.filter=o,e.signal=function(e){return e},e.any=function(...e){return(t,i=null,n)=>(0,r.F8)(...e.map((e=>e((e=>t.call(i,e)),null,n))))},e.reduce=s,e.snapshot=a,e.debounce=l,e.stopwatch=function(e){const n=(new Date).getTime();return i(t(e),(e=>(new Date).getTime()-n))},e.latch=u,e.split=function(t,i){return[e.filter(t,i),e.filter(t,(e=>!i(e)))]},e.buffer=function(e,t=!1,i=[]){let n=i.slice(),o=e((e=>{n?n.push(e):s.fire(e)}));const r=()=>{n&&n.forEach((e=>s.fire(e))),n=null},s=new c({onFirstListenerAdd(){o||(o=e((e=>s.fire(e))))},onFirstListenerDidAdd(){n&&(t?setTimeout(r):r())},onLastListenerRemove(){o&&o.dispose(),o=null}});return s.event};class h{constructor(e){this.event=e}map(e){return new h(i(this.event,e))}forEach(e){return new h(n(this.event,e))}filter(e){return new h(o(this.event,e))}reduce(e,t){return new h(s(this.event,e,t))}latch(){return new h(u(this.event))}debounce(e,t=100,i=!1,n){return new h(l(this.event,e,t,i,n))}on(e,t,i){return this.event(e,t,i)}once(e,i,n){return t(this.event)(e,i,n)}}e.chain=function(e){return new h(e)},e.fromNodeEventEmitter=function(e,t,i=(e=>e)){const n=(...e)=>o.fire(i(...e)),o=new c({onFirstListenerAdd:()=>e.on(t,n),onLastListenerRemove:()=>e.removeListener(t,n)});return o.event},e.fromDOMEventEmitter=function(e,t,i=(e=>e)){const n=(...e)=>o.fire(i(...e)),o=new c({onFirstListenerAdd:()=>e.addEventListener(t,n),onLastListenerRemove:()=>e.removeEventListener(t,n)});return o.event},e.fromPromise=function(e){const t=new c;let i=!1;return e.then(void 0,(()=>null)).then((()=>{i?t.fire(void 0):setTimeout((()=>t.fire(void 0)),0)})),i=!0,t.event},e.toPromise=function(e){return new Promise((i=>t(e)(i)))}}(n||(n={}));class l{constructor(e){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${e}_${l._idPool++}`}start(e){this._stopWatch=new a.G(!0),this._listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this._elapsedOverall+=e,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${e.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}l._idPool=0;class c{constructor(e){var t;this._disposed=!1,this._options=e,this._leakageMon=void 0,this._perfMon=(null===(t=this._options)||void 0===t?void 0:t._profName)?new l(this._options._profName):void 0}get event(){return this._event||(this._event=(e,t,i)=>{var n;this._listeners||(this._listeners=new s.S);const o=this._listeners.isEmpty();o&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const a=this._listeners.push(t?[e,t]:e);o&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,e,t);const l=null===(n=this._leakageMon)||void 0===n?void 0:n.check(this._listeners.size);let u;return u={dispose:()=>{l&&l(),u.dispose=c._noop,!this._disposed&&(a(),this._options&&this._options.onLastListenerRemove)&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this))}},i instanceof r.SL?i.add(u):Array.isArray(i)&&i.push(u),u}),this._event}fire(e){var t,i;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new s.S);for(let t of this._listeners)this._deliveryQueue.push([t,e]);for(null===(t=this._perfMon)||void 0===t||t.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[e,t]=this._deliveryQueue.shift();try{"function"==typeof e?e.call(void 0,t):e[0].call(e[1],t)}catch(e){(0,o.dL)(e)}}null===(i=this._perfMon)||void 0===i||i.stop()}}dispose(){var e,t,i,n,o;this._disposed||(this._disposed=!0,null===(e=this._listeners)||void 0===e||e.clear(),null===(t=this._deliveryQueue)||void 0===t||t.clear(),null===(n=null===(i=this._options)||void 0===i?void 0:i.onLastListenerRemove)||void 0===n||n.call(i),null===(o=this._leakageMon)||void 0===o||o.dispose())}}c._noop=function(){};class u extends c{constructor(e){super(e),this._isPaused=0,this._eventQueue=new s.S,this._mergeFn=null==e?void 0:e.merge}pause(){this._isPaused++}resume(){if(0!==this._isPaused&&0==--this._isPaused)if(this._mergeFn){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}else for(;!this._isPaused&&0!==this._eventQueue.size;)super.fire(this._eventQueue.shift())}fire(e){this._listeners&&(0!==this._isPaused?this._eventQueue.push(e):super.fire(e))}}class h{constructor(){this.buffers=[]}wrapEvent(e){return(t,i,n)=>e((e=>{const n=this.buffers[this.buffers.length-1];n?n.push((()=>t.call(i,e))):t.call(i,e)}),void 0,n)}bufferEvents(e){const t=[];this.buffers.push(t);const i=e();return this.buffers.pop(),t.forEach((e=>e())),i}}class d{constructor(){this.listening=!1,this.inputEvent=n.None,this.inputEventListener=r.JT.None,this.emitter=new c({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},5527:(e,t,i)=>{"use strict";i.d(t,{fn:()=>s,KM:()=>a,vY:()=>l,oP:()=>c});var n=i(1432),o=i(7295),r=i(8721);function s(e){return-1===e.indexOf("/")&&(e=function(e){return e.replace(/[\\/]/g,r.KR.sep)}(e)),/^[a-zA-Z]:(\/|$)/.test(e)&&(e="/"+e),e}function a(e,t,i,n=r.ir){if(e===t)return!0;if(!e||!t)return!1;if(t.length>e.length)return!1;if(i){if(!(0,o.ok)(e,t))return!1;if(t.length===e.length)return!0;let i=t.length;return t.charAt(t.length-1)===n&&i--,e.charAt(i)===n}return t.charAt(t.length-1)!==n&&(t+=n),0===e.indexOf(t)}function l(e){const t=(0,r.Fv)(e);return n.ED?!(e.length>3)&&c(t)&&(2===e.length||92===t.charCodeAt(2)):t===r.KR.sep}function c(e){return!!n.ED&&((t=e.charCodeAt(0))>=65&&t<=90||t>=97&&t<=122)&&58===e.charCodeAt(1);var t}},5392:(e,t,i)=>{"use strict";i.d(t,{or:()=>r,Ji:()=>s,ir:()=>a,KZ:()=>y,Oh:()=>D,jB:()=>L,mB:()=>N,CL:()=>W,EW:()=>V,l7:()=>$});var n=i(3702),o=i(7295);function r(...e){return function(t,i){for(let n=0,o=e.length;n0?[{start:0,end:t.length}]:[]:null}.bind(void 0,!0);function a(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1===i?null:[{start:i,end:i+e.length}]}function l(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]===t[n]){let o=null;return(o=l(e,t,i+1,n+1))?m({start:n,end:n+1},o):null}return l(e,t,i,n+1)}function c(e){return 97<=e&&e<=122}function u(e){return 65<=e&&e<=90}function h(e){return 48<=e&&e<=57}function d(e){return 32===e||9===e||10===e||13===e}const g=new Set;function f(e){return d(e)||g.has(e)}function p(e){return c(e)||u(e)||h(e)}function m(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function _(e,t){for(let i=t;i0&&!p(e.charCodeAt(i-1)))return i}return e.length}function v(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]!==t[n].toLowerCase())return null;{let o=null,r=n+1;for(o=v(e,t,i+1,n+1);!o&&(r=_(t,r))60)return null;const i=function(e){let t=0,i=0,n=0,o=0,r=0;for(let s=0;s.2&&t<.8&&n>.6&&o<.2}(i)){if(!function(e){const{upperPercent:t,lowerPercent:i}=e;return 0===i&&t>.6}(i))return null;t=t.toLowerCase()}let n=null,o=0;for(e=e.toLowerCase();o0&&f(e.charCodeAt(i-1)))return i;return e.length}"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?".split("").forEach((e=>g.add(e.charCodeAt(0))));const S=r(s,b,a),x=r(s,b,(function(e,t){return l(e.toLowerCase(),t.toLowerCase(),0,0)})),k=new n.z6(1e4);function D(e,t,i=!1){if("string"!=typeof e||"string"!=typeof t)return null;let n=k.get(e);n||(n=new RegExp(o.un(e),"i"),k.set(e,n));const r=n.exec(t);return r?[{start:r.index,end:r.index+r[0].length}]:i?x(e,t):S(e,t)}function L(e,t,i,n,o,r){const s=Math.min(13,e.length);for(;i1;n--){const o=e[n]+i,r=t[t.length-1];r&&r.end===o?r.end=o+1:t.push({start:o,end:o+1})}return t}const E=128;function A(){const e=[],t=[];for(let e=0;e<=E;e++)t[e]=0;for(let i=0;i<=E;i++)e.push(t.slice(0));return e}function M(e){const t=[];for(let i=0;i<=e;i++)t[i]=0;return t}const I=M(256),T=M(256),R=A(),O=A(),F=A();function P(e,t){if(t<0||t>=e.length)return!1;const i=e.codePointAt(t);switch(i){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 40:case 91:return!0;case void 0:return!1;default:return!!o.C8(i)}}function B(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}function z(e,t,i){return t[e]!==i[e]}var W;function V(e,t,i,n,o,r,s){const a=e.length>E?E:e.length,l=n.length>E?E:n.length;if(i>=a||r>=l||a-i>l-r)return;if(!function(e,t,i,n,o,r,s=!1){for(;t=i&&a>=n;)o[s]===r[a]&&(T[s]=a,s--),a--}(a,l,i,r,t,o);let c=1,u=1,h=i,d=r;const g=[!1];for(c=1,h=i;hs,v=_?O[c][u-1]+(R[c][u-1]>0?-5:0):0,b=d>s+1&&R[c][u-1]>0,y=b?O[c][u-2]+(R[c][u-2]>0?-5:0):0;if(b&&(!_||y>=v)&&(!p||y>=m))O[c][u]=y,F[c][u]=3,R[c][u]=0;else if(_&&(!p||v>=m))O[c][u]=v,F[c][u]=2,R[c][u]=0;else{if(!p)throw new Error("not possible");O[c][u]=m,F[c][u]=1,R[c][u]=R[c-1][u-1]+1}}}if(!g[0]&&!s)return;c--,u--;const f=[O[c][u],r];let p=0,m=0;for(;c>=1;){let e=u;do{const t=F[c][e];if(3===t)e-=2;else{if(2!==t)break;e-=1}}while(e>=1);p>1&&t[i+c-1]===o[r+u-1]&&!z(e+r-1,n,o)&&p+1>R[c][e]&&(e=u),e===u?p++:p=1,m||(m=e),c--,u=e-1,f.push(u)}l===a&&(f[0]+=2);const _=m-a;return f[0]-=_,f}function H(e,t,i,n,o,r,s,a,l,c,u){if(t[i]!==r[s])return Number.MIN_SAFE_INTEGER;let h=1,d=!1;return s===i-n?h=e[i]===o[s]?7:5:!z(s,o,r)||0!==s&&z(s-1,o,r)?!P(r,s)||0!==s&&P(r,s-1)?(P(r,s-1)||B(r,s-1))&&(h=5,d=!0):h=5:(h=e[i]===o[s]?7:5,d=!0),h>1&&i===n&&(u[0]=!0),d||(d=z(s,o,r)||P(r,s-1)||B(r,s-1)),i===n?s>l&&(h-=d?3:5):h+=c?d?2:0:d?0:1,s+1===a&&(h-=d?3:5),h}function $(e,t,i,n,o,r,s){return function(e,t,i,n,o,r,s,a){let l=V(e,t,i,n,o,r,a);if(e.length>=3){const t=Math.min(7,e.length-1);for(let s=i+1;sl[0])&&(l=e))}}}return l}(e,t,i,n,o,r,0,s)}function U(e,t){if(t+1>=e.length)return;const i=e[t],n=e[t+1];return i!==n?e.slice(0,t)+n+i+e.slice(t+2):void 0}!function(e){e.Default=[-100,0],e.isDefault=function(e){return!e||2===e.length&&-100===e[0]&&0===e[1]}}(W||(W={}))},8289:(e,t,i)=>{"use strict";function n(e){const t=this;let i,n=!1;return function(){return n||(n=!0,i=e.apply(t,arguments)),i}}i.d(t,{I:()=>n})},4118:(e,t,i)=>{"use strict";i.d(t,{EQ:()=>D});var n=i(7295),o=i(5527),r=i(8721),s=i(3702),a=i(5393);const l="**",c=/\//g;function u(e){switch(e){case 0:return"";case 1:return"[^/\\\\]*?";default:return"(?:[/\\\\]|[^/\\\\]+[/\\\\]|[/\\\\][^/\\\\]+)*?"}}function h(e,t){if(!e)return[];const i=[];let n=!1,o=!1,r="";for(const s of e){switch(s){case t:if(!n&&!o){i.push(r),r="";continue}break;case"{":n=!0;break;case"}":n=!1;break;case"[":o=!0;break;case"]":o=!1}r+=s}return r&&i.push(r),i}function d(e){if(!e)return"";let t="";const i=h(e,"/");if(i.every((e=>e===l)))t=".*";else{let e=!1;i.forEach(((o,r)=>{if(o===l)return void(e||(t+=u(2),e=!0));let s=!1,a="",c=!1,g="";for(const e of o)if("}"!==e&&s)a+=e;else if(!c||"]"===e&&g)switch(e){case"{":s=!0;continue;case"[":c=!0;continue;case"}":const i=`(?:${h(a,",").map((e=>d(e))).join("|")})`;t+=i,s=!1,a="";break;case"]":t+="["+g+"]",c=!1,g="";break;case"?":t+="[^/\\\\]";continue;case"*":t+=u(1);continue;default:t+=n.ec(e)}else{let t;t="-"===e?e:"^"!==e&&"!"!==e||g?"/"===e?"":n.ec(e):"^",g+=t}rC(e,t))).filter((e=>e!==w)),e),n=i.length;if(!n)return w;if(1===n)return i[0];const o=function(t,n){for(let o=0,r=i.length;o!!e.allBasenames));r&&(o.allBasenames=r.allBasenames);const s=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return s.length&&(o.allPaths=s),o}(i,t):(o=_.exec(x(i,t)))?k(o[1].substr(1),i,!0):(o=v.exec(x(i,t)))?k(o[1],i,!1):function(e){try{const t=new RegExp(`^${d(e)}$`);return function(i){return t.lastIndex=0,"string"==typeof i&&t.test(i)?e:null}}catch(e){return w}}(i);return b.set(n,r),S(r,e)}function S(e,t){return"string"==typeof t?e:function(i,n){return o.KM(i,t.base)?e(r.Gf(t.base,i),n):null}}function x(e,t){return t.trimForExclusions&&e.endsWith("/**")?e.substr(0,e.length-2):e}function k(e,t,i){const n=r.ir===r.KR.sep,o=n?e:e.replace(c,r.ir),s=r.ir+o,a=r.KR.sep+e,l=i?function(i,r){return"string"!=typeof i||i!==o&&!i.endsWith(s)&&(n||i!==e&&!i.endsWith(a))?null:t}:function(i,r){return"string"!=typeof i||i!==o&&(n||i!==e)?null:t};return l.allPaths=[(i?"*/":"./")+e],l}function D(e,t,i){return!(!e||"string"!=typeof t)&&function(e,t={}){if(!e)return y;if("string"==typeof e||function(e){const t=e;return t&&"string"==typeof t.base&&"string"==typeof t.pattern}(e)){const i=C(e,t);if(i===w)return y;const n=function(e,t){return!!i(e,t)};return i.allBasenames&&(n.allBasenames=i.allBasenames),i.allPaths&&(n.allPaths=i.allPaths),n}return function(e,t){const i=L(Object.getOwnPropertyNames(e).map((i=>function(e,t,i){if(!1===t)return w;const n=C(e,i);if(n===w)return w;if("boolean"==typeof t)return n;if(t){const i=t.when;if("string"==typeof i){const t=(t,o,r,s)=>{if(!s||!n(t,o))return null;const l=s(i.replace("$(basename)",r));return(0,a.J8)(l)?l.then((t=>t?e:null)):l?e:null};return t.requiresSiblings=!0,t}}return n}(i,e[i],t))).filter((e=>e!==w))),n=i.length;if(!n)return w;if(!i.some((e=>!!e.requiresSiblings))){if(1===n)return i[0];const e=function(e,t){for(let n=0,o=i.length;n!!e.allBasenames));t&&(e.allBasenames=t.allBasenames);const o=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return o.length&&(e.allPaths=o),e}const o=function(e,t,n){let o;for(let s=0,a=i.length;s!!e.allBasenames));s&&(o.allBasenames=s.allBasenames);const l=i.reduce(((e,t)=>t.allPaths?e.concat(t.allPaths):e),[]);return l.length&&(o.allPaths=l),o}(e,t)}(e)(t,void 0,i)}function L(e,t){const i=e.filter((e=>!!e.basenames));if(i.length<2)return e;const n=i.reduce(((e,t)=>{const i=t.basenames;return i?e.concat(i):e}),[]);let o;if(t){o=[];for(let e=0,i=n.length;e{const i=t.patterns;return i?e.concat(i):e}),[]);const r=function(e,t){if("string"!=typeof e)return null;if(!t){let i;for(i=e.length;i>0;i--){const t=e.charCodeAt(i-1);if(47===t||92===t)break}t=e.substr(i)}const i=n.indexOf(t);return-1!==i?o[i]:null};r.basenames=n,r.patterns=o,r.allBasenames=n;const s=e.filter((e=>!e.basenames));return s.push(r),s}},9954:(e,t,i)=>{"use strict";i.d(t,{vp:()=>o,Cv:()=>a,yP:()=>h});var n=i(7295);function o(e){return r(e,0)}function r(e,t){switch(typeof e){case"object":return null===e?s(349,t):Array.isArray(e)?(i=e,n=s(104579,n=t),i.reduce(((e,t)=>r(t,e)),n)):function(e,t){return t=s(181387,t),Object.keys(e).sort().reduce(((t,i)=>(t=a(i,t),r(e[i],t))),t)}(e,t);case"string":return a(e,t);case"boolean":return function(e,t){return s(e?433:863,t)}(e,t);case"number":return s(e,t);case"undefined":return s(937,t);default:return s(617,t)}var i,n}function s(e,t){return(t<<5)-t+e|0}function a(e,t){t=s(149417,t);for(let i=0,n=e.length;i>>n)>>>0}function c(e,t=0,i=e.byteLength,n=0){for(let o=0;oe.toString(16).padStart(2,"0"))).join(""):function(e,t,i="0"){for(;e.length>>0).toString(16),t/4)}class h{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const i=this._buff;let o,r,s=this._buffLen,a=this._leftoverHighSurrogate;for(0!==a?(o=a,r=-1,a=0):(o=e.charCodeAt(0),r=0);;){let l=o;if(n.ZG(o)){if(!(r+1>>6,e[t++]=128|(63&i)>>>0):i<65536?(e[t++]=224|(61440&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0):(e[t++]=240|(1835008&i)>>>18,e[t++]=128|(258048&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),u(this._h0)+u(this._h1)+u(this._h2)+u(this._h3)+u(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,c(this._buff,this._buffLen),this._buffLen>56&&(this._step(),c(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=h._bigBlock32,t=this._buffDV;for(let i=0;i<64;i+=4)e.setUint32(i,t.getUint32(i,!1),!1);for(let t=64;t<320;t+=4)e.setUint32(t,l(e.getUint32(t-12,!1)^e.getUint32(t-32,!1)^e.getUint32(t-56,!1)^e.getUint32(t-64,!1),1),!1);let i,n,o,r=this._h0,s=this._h1,a=this._h2,c=this._h3,u=this._h4;for(let t=0;t<80;t++)t<20?(i=s&a|~s&c,n=1518500249):t<40?(i=s^a^c,n=1859775393):t<60?(i=s&a|s&c|a&c,n=2400959708):(i=s^a^c,n=3395469782),o=l(r,5)+i+u+n+e.getUint32(4*t,!1)&4294967295,u=c,c=a,a=l(s,30),s=r,r=o;this._h0=this._h0+r&4294967295,this._h1=this._h1+s&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+c&4294967295,this._h4=this._h4+u&4294967295}}h._bigBlock32=new DataView(new ArrayBuffer(320))},9365:(e,t,i)=>{"use strict";i.d(t,{W5:()=>r,CP:()=>s,oR:()=>a,v1:()=>l});var n=i(1212),o=i(7301);class r{constructor(e="",t=!1){var i,n;if(this.value=e,"string"!=typeof this.value)throw(0,o.b1)("value");"boolean"==typeof t?(this.isTrusted=t,this.supportThemeIcons=!1):(this.isTrusted=null!==(i=t.isTrusted)&&void 0!==i?i:void 0,this.supportThemeIcons=null!==(n=t.supportThemeIcons)&&void 0!==n&&n)}appendText(e,t=0){var i;return this.value+=(i=this.supportThemeIcons?(0,n.Qo)(e):e,i.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")).replace(/([ \t]+)/g,((e,t)=>" ".repeat(t.length))).replace(/^>/gm,"\\>").replace(/\n/g,1===t?"\\\n":"\n\n"),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+="\n```",this.value+=e,this.value+="\n",this.value+=t,this.value+="\n```\n",this}}function s(e){return(t=e)instanceof r||t&&"object"==typeof t&&!("string"!=typeof t.value||"boolean"!=typeof t.isTrusted&&void 0!==t.isTrusted||"boolean"!=typeof t.supportThemeIcons&&void 0!==t.supportThemeIcons)?!e.value:!Array.isArray(e)||e.every(s);var t}function a(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1"):e}function l(e){const t=[],i=e.split("|").map((e=>e.trim()));e=i[0];const n=i[1];if(n){const e=/height=(\d+)/.exec(n),i=/width=(\d+)/.exec(n),o=e?e[1]:"",r=i?i[1]:"",s=isFinite(parseInt(r)),a=isFinite(parseInt(o));s&&t.push(`width="${r}"`),a&&t.push(`height="${o}"`)}return{href:e,dimensions:t}}},1212:(e,t,i)=>{"use strict";i.d(t,{Qo:()=>c,f$:()=>h,x$:()=>g,Ho:()=>f,Gt:()=>p});var n=i(3046),o=i(5392),r=i(7295);const s="$(",a=new RegExp(`\\$\\(${n.dT.iconNameExpression}(?:${n.dT.iconModifierExpression})?\\)`,"g"),l=new RegExp(`(\\\\)?${a.source}`,"g");function c(e){return e.replace(l,((e,t)=>t?e:`\\${e}`))}const u=new RegExp(`\\\\${a.source}`,"g");function h(e){return e.replace(u,(e=>`\\${e}`))}const d=new RegExp(`(\\s)?(\\\\)?${a.source}(\\s)?`,"g");function g(e){return-1===e.indexOf(s)?e:e.replace(d,((e,t,i,n)=>i?e:t||n||""))}function f(e){const t=e.indexOf(s);return-1===t?{text:e}:function(e,t){const i=[];let n="";function o(e){if(e){n+=e;for(const t of e)i.push(u)}}let r,a,l=-1,c="",u=0,h=t;const d=e.length;for(o(e.substr(0,t));h{"use strict";i.d(t,{R:()=>n,a:()=>o});class n{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const o=new n("id#")},3725:(e,t,i)=>{"use strict";var n;i.d(t,{$:()=>n}),function(e){e.is=function(e){return e&&"object"==typeof e&&"function"==typeof e[Symbol.iterator]};const t=Object.freeze([]);e.empty=function(){return t},e.single=function*(e){yield e},e.from=function(e){return e||t},e.isEmpty=function(e){return!e||!0===e[Symbol.iterator]().next().done},e.first=function(e){return e[Symbol.iterator]().next().value},e.some=function(e,t){for(const i of e)if(t(i))return!0;return!1},e.find=function(e,t){for(const i of e)if(t(i))return i},e.filter=function*(e,t){for(const i of e)t(i)&&(yield i)},e.map=function*(e,t){let i=0;for(const n of e)yield t(n,i++)},e.concat=function*(...e){for(const t of e)for(const e of t)yield e},e.concatNested=function*(e){for(const t of e)for(const e of t)yield e},e.reduce=function(e,t,i){let n=i;for(const i of e)n=t(n,i);return n},e.slice=function*(e,t,i=e.length){for(t<0&&(t+=e.length),i<0?i+=e.length:i>e.length&&(i=e.length);to}]},e.equals=function(e,t,i=((e,t)=>e===t)){const n=e[Symbol.iterator](),o=t[Symbol.iterator]();for(;;){const e=n.next(),t=o.next();if(e.done!==t.done)return!1;if(e.done)return!0;if(!i(e.value,t.value))return!1}}}(n||(n={}))},2258:(e,t,i)=>{"use strict";i.d(t,{kL:()=>l,gx:()=>c,gm:()=>u,QC:()=>d,BQ:()=>f,f1:()=>p});var n=i(7301);class o{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const r=new o,s=new o,a=new o;var l;function c(e,t){return(e|(65535&t)<<16>>>0)>>>0}function u(e,t){if(0===e)return null;const i=(65535&e)>>>0,n=(4294901760&e)>>>16;return new g(0!==n?[h(i,t),h(n,t)]:[h(i,t)])}function h(e,t){const i=!!(2048&e),n=!!(256&e);return new d(2===t?n:i,!!(1024&e),!!(512&e),2===t?i:n,255&e)}!function(){function e(e,t,i=t,n=i){r.define(e,t),s.define(e,i),a.define(e,n)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")}(),function(e){e.toString=function(e){return r.keyCodeToStr(e)},e.fromString=function(e){return r.strToKeyCode(e)},e.toUserSettingsUS=function(e){return s.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return a.keyCodeToStr(e)},e.fromUserSettings=function(e){return s.strToKeyCode(e)||a.strToKeyCode(e)}}(l||(l={}));class d{constructor(e,t,i,n,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyCode=o}equals(e){return this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode}toChord(){return new g([this])}isDuplicateModifierCase(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode}}class g{constructor(e){if(0===e.length)throw(0,n.b1)("parts");this.parts=e}}class f{constructor(e,t,i,n,o,r){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyLabel=o,this.keyAriaLabel=r}}class p{}},8030:(e,t,i)=>{"use strict";i.d(t,{xo:()=>r,X4:()=>s});var n=i(3580);class o{constructor(e,t,i=t){this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=i}toLabel(e,t,i){if(0===t.length)return null;const n=[];for(let o=0,r=t.length;o{"use strict";i.d(t,{p:()=>l,D:()=>c});var n=i(666),o=i(6663),r=i(1432),s=i(5935),a=i(5527);function l(e){if(!e)return;"string"==typeof e&&(e=n.o.file(e));const t=(0,s.EZ)(e)||(e.scheme===o.lg.file?e.fsPath:e.path);return r.ED&&(0,a.vY)(t)?c(t):t}function c(e){return(0,a.oP)(e)?e.charAt(0).toUpperCase()+e.slice(1):e}},5976:(e,t,i)=>{"use strict";i.d(t,{wi:()=>r,Wf:()=>a,B9:()=>l,F8:()=>c,OF:()=>u,SL:()=>h,JT:()=>d,XK:()=>g,Jz:()=>f});var n=i(3725);function o(e){}function r(e){return e}class s extends Error{constructor(e){super(`Encountered errors while disposing of store. Errors: [${e.join(", ")}]`),this.errors=e}}function a(e){return"function"==typeof e.dispose&&0===e.dispose.length}function l(e){if(n.$.is(e)){let t=[];for(const i of e)if(i)try{i.dispose()}catch(e){t.push(e)}if(1===t.length)throw t[0];if(t.length>1)throw new s(t);return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function c(...e){return e.forEach(o),u((()=>l(e)))}function u(e){const t={dispose:()=>{e()}};return t}class h{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){try{l(this._toDispose.values())}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?h.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}}h.DISABLE_DISPOSED_WARNING=!1;class d{constructor(){this._store=new h}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}d.None=Object.freeze({dispose(){}});class g{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||(null===(t=this._value)||void 0===t||t.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,null===(e=this._value)||void 0===e||e.dispose(),this._value=void 0}}class f{constructor(e){this.object=e}dispose(){}}},1741:(e,t,i)=>{"use strict";i.d(t,{S:()=>o});class n{constructor(e){this.element=e,this.next=n.Undefined,this.prev=n.Undefined}}n.Undefined=new n(void 0);class o{constructor(){this._first=n.Undefined,this._last=n.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===n.Undefined}clear(){let e=this._first;for(;e!==n.Undefined;){const t=e.next;e.prev=n.Undefined,e.next=n.Undefined,e=t}this._first=n.Undefined,this._last=n.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new n(e);if(this._first===n.Undefined)this._first=i,this._last=i;else if(t){const e=this._last;this._last=i,i.prev=e,e.next=i}else{const e=this._first;this._first=i,i.next=e,e.prev=i}this._size+=1;let o=!1;return()=>{o||(o=!0,this._remove(i))}}shift(){if(this._first!==n.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==n.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==n.Undefined&&e.next!==n.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===n.Undefined&&e.next===n.Undefined?(this._first=n.Undefined,this._last=n.Undefined):e.next===n.Undefined?(this._last=this._last.prev,this._last.next=n.Undefined):e.prev===n.Undefined&&(this._first=this._first.next,this._first.prev=n.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==n.Undefined;)yield e.element,e=e.next}}},3702:(e,t,i)=>{"use strict";i.d(t,{Id:()=>d,Y9:()=>g,z6:()=>p});var n,o,r=i(666),s=i(7295);class a{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos!1)){return new d(new u(e))}static forStrings(){return new d(new a)}static forConfigKeys(){return new d(new l)}clear(){this._root=void 0}set(e,t){const i=this._iter.reset(e);let n;for(this._root||(this._root=new h,this._root.segment=i.value()),n=this._root;;){const e=i.cmp(n.segment);if(e>0)n.left||(n.left=new h,n.left.segment=i.value()),n=n.left;else if(e<0)n.right||(n.right=new h,n.right.segment=i.value()),n=n.right;else{if(!i.hasNext())break;i.next(),n.mid||(n.mid=new h,n.mid.segment=i.value()),n=n.mid}}const o=n.value;return n.value=t,n.key=e,o}get(e){var t;return null===(t=this._getNode(e))||void 0===t?void 0:t.value}_getNode(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else{if(!t.hasNext())break;t.next(),i=i.mid}}return i}has(e){const t=this._getNode(e);return!(void 0===(null==t?void 0:t.value)&&void 0===(null==t?void 0:t.mid))}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){const i=this._iter.reset(e),n=[];let o=this._root;for(;o;){const e=i.cmp(o.segment);if(e>0)n.push([1,o]),o=o.left;else if(e<0)n.push([-1,o]),o=o.right;else{if(!i.hasNext()){for(t?(o.left=void 0,o.mid=void 0,o.right=void 0):o.value=void 0;n.length>0&&o.isEmpty();){let[e,t]=n.pop();switch(e){case 1:t.left=void 0;break;case 0:t.mid=void 0;break;case-1:t.right=void 0}o=t}break}i.next(),n.push([0,o]),o=o.mid}}}findSubstr(e){const t=this._iter.reset(e);let i,n=this._root;for(;n;){const e=t.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!t.hasNext())break;t.next(),i=n.value||i,n=n.mid}}return n&&n.value||i}findSuperstr(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else{if(!t.hasNext())return i.mid?this._entries(i.mid):void 0;t.next(),i=i.mid}}}forEach(e){for(const[t,i]of this)e(i,t)}*[Symbol.iterator](){yield*this._entries(this._root)}*_entries(e,t=0){t>5e3?console.log("potential CYCLE detected",(new Error).stack):e&&(yield*this._entries(e.left,t++),e.value&&(yield[e.key,e.value]),yield*this._entries(e.mid,t++),yield*this._entries(e.right,t++))}}class g{constructor(e,t){this[n]="ResourceMap",e instanceof g?(this.map=new Map(e.map),this.toKey=null!=t?t:g.defaultToKey):(this.map=new Map,this.toKey=null!=e?e:g.defaultToKey)}set(e,t){return this.map.set(this.toKey(e),t),this}get(e){return this.map.get(this.toKey(e))}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){void 0!==t&&(e=e.bind(t));for(let[t,i]of this.map)e(i,r.o.parse(t),this)}values(){return this.map.values()}*keys(){for(let e of this.map.keys())yield r.o.parse(e)}*entries(){for(let e of this.map.entries())yield[r.o.parse(e[0]),e[1]]}*[(n=Symbol.toStringTag,Symbol.iterator)](){for(let e of this.map)yield[r.o.parse(e[0]),e[1]]}}g.defaultToKey=e=>e.toString();class f{constructor(){this[o]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}has(e){return this._map.has(e)}get(e,t=0){const i=this._map.get(e);if(i)return 0!==t&&this.touch(i,t),i.value}set(e,t,i=0){let n=this._map.get(e);if(n)n.value=t,0!==i&&this.touch(n,i);else{switch(n={key:e,value:t,next:void 0,previous:void 0},i){case 0:this.addItemLast(n);break;case 1:this.addItemFirst(n);break;case 2:default:this.addItemLast(n)}this._map.set(e,n),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const i=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.key,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.value,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:[i.key,i.value],done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}[(o=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.next,i--;this._head=t,this._size=i,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,i=e.previous;if(!t||!i)throw new Error("Invalid list");t.previous=i,i.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(t.previous=i,i.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,i=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=i,i.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,i)=>{e.push([i,t])})),e}fromJSON(e){this.clear();for(const[t,i]of e)this.set(t,i)}}class p extends f{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},3720:function(e){e.exports=function(){"use strict";function e(e,t){for(var i=0;ie.length)&&(t=e.length);for(var i=0,n=new Array(t);i=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}var n=function(e){var t={exports:{}};return e(t,t.exports),t.exports}((function(e){function t(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1},getDefaults:t,changeDefaults:function(t){e.exports.defaults=t}}})),o=/[&<>"']/,r=/[&<>"']/g,s=/[<>"']|&(?!#?\w+;)/,a=/[<>"']|&(?!#?\w+;)/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},c=function(e){return l[e]};var u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function h(e){return e.replace(u,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var d=/(^|[^\[])\^/g;var g=/[^\w:]/g,f=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;var p={},m=/^[^:]+:\/*[^/]*$/,_=/^([^:]+:)[\s\S]*$/,v=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(e,t){p[" "+e]||(m.test(e)?p[" "+e]=e+"/":p[" "+e]=y(e,"/",!0));var i=-1===(e=p[" "+e]).indexOf(":");return"//"===t.substring(0,2)?i?t:e.replace(_,"$1")+t:"/"===t.charAt(0)?i?t:e.replace(v,"$1")+t:e+t}function y(e,t,i){var n=e.length;if(0===n)return"";for(var o=0;o=0&&"\\"===i[o];)n=!n;return n?"|":" |"})).split(/ \|/),n=0;if(i.length>t)i.splice(t);else for(;i.length1;)1&t&&(i+=e),t>>=1,e+=e;return i+e},I=n.defaults,T=N,R=L,O=w,F=E;function P(e,t,i){var n=t.href,o=t.title?O(t.title):null,r=e[1].replace(/\\([\[\]])/g,"$1");return"!"!==e[0].charAt(0)?{type:"link",raw:i,href:n,title:o,text:r}:{type:"image",raw:i,href:n,title:o,text:O(r)}}var B=function(){function e(e){this.options=e||I}var t=e.prototype;return t.space=function(e){var t=this.rules.block.newline.exec(e);if(t)return t[0].length>1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e){var t=this.rules.block.code.exec(e);if(t){var i=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?i:T(i,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var i=t[0],n=function(e,t){var i=e.match(/^(\s+)(?:```)/);if(null===i)return t;var n=i[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=n.length?e.slice(n.length):e})).join("\n")}(i,t[3]||"");return{type:"code",raw:i,lang:t[2]?t[2].trim():t[2],text:n}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t){var i=t[2].trim();if(/#$/.test(i)){var n=T(i,"#");this.options.pedantic?i=n.trim():n&&!/ $/.test(n)||(i=n.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:i}}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var i={type:"table",header:R(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(i.header.length===i.align.length){var n,o=i.align.length;for(n=0;n ?/gm,"");return{type:"blockquote",raw:t[0],text:i}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){var i,n,o,r,s,a,l,c,u=t[0],h=t[2],d=h.length>1,g={type:"list",raw:u,ordered:d,start:d?+h.slice(0,-1):"",loose:!1,items:[]},f=t[0].match(this.rules.block.item),p=!1,m=f.length;o=this.rules.block.listItemStart.exec(f[0]);for(var _=0;_o[1].length:r[1].length>o[0].length||r[1].length>3){f.splice(_,2,f[_]+"\n"+f[_+1]),_--,m--;continue}(!this.options.pedantic||this.options.smartLists?r[2][r[2].length-1]!==h[h.length-1]:d===(1===r[2].length))&&(s=f.slice(_+1).join("\n"),g.raw=g.raw.substring(0,g.raw.length-s.length),_=m-1),o=r}n=i.length,~(i=i.replace(/^ *([*+-]|\d+[.)]) ?/,"")).indexOf("\n ")&&(n-=i.length,i=this.options.pedantic?i.replace(/^ {1,4}/gm,""):i.replace(new RegExp("^ {1,"+n+"}","gm"),"")),a=p||/\n\n(?!\s*$)/.test(i),_!==m-1&&(p="\n"===i.charAt(i.length-1),a||(a=p)),a&&(g.loose=!0),this.options.gfm&&(c=void 0,(l=/^\[[ xX]\] /.test(i))&&(c=" "!==i[1],i=i.replace(/^\[[ xX]\] +/,""))),g.items.push({type:"list_item",raw:u,task:l,checked:c,loose:a,text:i})}return g}},t.html=function(e){var t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):O(t[0]):t[0]}},t.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},t.table=function(e){var t=this.rules.block.table.exec(e);if(t){var i={type:"table",header:R(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(i.header.length===i.align.length){i.raw=t[0];var n,o=i.align.length;for(n=0;n/i.test(n[0])&&(t=!1),!i&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?i=!0:i&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(i=!1),{type:this.options.sanitize?"text":"html",raw:n[0],inLink:t,inRawBlock:i,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):O(n[0]):n[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var i=t[2].trim();if(!this.options.pedantic&&/^$/.test(i))return;var n=T(i.slice(0,-1),"\\");if((i.length-n.length)%2==0)return}else{var o=F(t[2],"()");if(o>-1){var r=(0===t[0].indexOf("!")?5:4)+t[1].length+o;t[2]=t[2].substring(0,o),t[0]=t[0].substring(0,r).trim(),t[3]=""}}var s=t[2],a="";if(this.options.pedantic){var l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(s);l&&(s=l[1],a=l[3])}else a=t[3]?t[3].slice(1,-1):"";return s=s.trim(),/^$/.test(i)?s.slice(1):s.slice(1,-1)),P(t,{href:s?s.replace(this.rules.inline._escapes,"$1"):s,title:a?a.replace(this.rules.inline._escapes,"$1"):a},t[0])}},t.reflink=function(e,t){var i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){var n=(i[2]||i[1]).replace(/\s+/g," ");if(!(n=t[n.toLowerCase()])||!n.href){var o=i[0].charAt(0);return{type:"text",raw:o,text:o}}return P(i,n,i[0])}},t.emStrong=function(e,t,i){void 0===i&&(i="");var n=this.rules.inline.emStrong.lDelim.exec(e);if(n&&(!n[3]||!i.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\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\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\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\u1369-\u137C\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\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\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\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\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-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\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-\uAB69\uAB70-\uABE2\uABF0-\uABF9\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\uFF10-\uFF19\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\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\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\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\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]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\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]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var o=n[1]||n[2]||"";if(!o||o&&(""===i||this.rules.inline.punctuation.exec(i))){var r,s,a=n[0].length-1,l=a,c=0,u="*"===n[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+a);null!=(n=u.exec(t));)if(r=n[1]||n[2]||n[3]||n[4]||n[5]||n[6])if(s=r.length,n[3]||n[4])l+=s;else if(!((n[5]||n[6])&&a%3)||(a+s)%3){if(!((l-=s)>0)){if(l+c-s<=0&&!t.slice(u.lastIndex).match(u)&&(s=Math.min(s,s+l+c)),Math.min(a,s)%2)return{type:"em",raw:e.slice(0,a+n.index+s+1),text:e.slice(1,a+n.index+s)};if(Math.min(a,s)%2==0)return{type:"strong",raw:e.slice(0,a+n.index+s+1),text:e.slice(2,a+n.index+s-1)}}}else c+=s}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var i=t[2].replace(/\n/g," "),n=/[^ ]/.test(i),o=/^ /.test(i)&&/ $/.test(i);return n&&o&&(i=i.substring(1,i.length-1)),i=O(i,!0),{type:"codespan",raw:t[0],text:i}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2]}},t.autolink=function(e,t){var i,n,o=this.rules.inline.autolink.exec(e);if(o)return n="@"===o[2]?"mailto:"+(i=O(this.options.mangle?t(o[1]):o[1])):i=O(o[1]),{type:"link",raw:o[0],text:i,href:n,tokens:[{type:"text",raw:i,text:i}]}},t.url=function(e,t){var i;if(i=this.rules.inline.url.exec(e)){var n,o;if("@"===i[2])o="mailto:"+(n=O(this.options.mangle?t(i[0]):i[0]));else{var r;do{r=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0]}while(r!==i[0]);n=O(i[0]),o="www."===i[1]?"http://"+n:n}return{type:"link",raw:i[0],text:n,href:o,tokens:[{type:"text",raw:n,text:n}]}}},t.inlineText=function(e,t,i){var n,o=this.rules.inline.text.exec(e);if(o)return n=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(o[0]):O(o[0]):o[0]:O(this.options.smartypants?i(o[0]):o[0]),{type:"text",raw:o[0],text:n}},e}(),z=k,W=S,V=D,H={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:z,table:z,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};H.def=W(H.def).replace("label",H._label).replace("title",H._title).getRegex(),H.bullet=/(?:[*+-]|\d{1,9}[.)])/,H.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,H.item=W(H.item,"gm").replace(/bull/g,H.bullet).getRegex(),H.listItemStart=W(/^( *)(bull)/).replace("bull",H.bullet).getRegex(),H.list=W(H.list).replace(/bull/g,H.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+H.def.source+")").getRegex(),H._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",H._comment=/|$)/,H.html=W(H.html,"i").replace("comment",H._comment).replace("tag",H._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),H.paragraph=W(H._paragraph).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.blockquote=W(H.blockquote).replace("paragraph",H.paragraph).getRegex(),H.normal=V({},H),H.gfm=V({},H.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),H.gfm.nptable=W(H.gfm.nptable).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.gfm.table=W(H.gfm.table).replace("hr",H.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",H._tag).getRegex(),H.pedantic=V({},H.normal,{html:W("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",H._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:z,paragraph:W(H.normal._paragraph).replace("hr",H.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",H.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var $={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:z,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/\_\_[^_]*?\*[^_]*?\_\_|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/\*\*[^*]*?\_[^*]*?\*\*|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:z,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};$.punctuation=W($.punctuation).replace(/punctuation/g,$._punctuation).getRegex(),$.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,$.escapedEmSt=/\\\*|\\_/g,$._comment=W(H._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),$.emStrong.lDelim=W($.emStrong.lDelim).replace(/punct/g,$._punctuation).getRegex(),$.emStrong.rDelimAst=W($.emStrong.rDelimAst,"g").replace(/punct/g,$._punctuation).getRegex(),$.emStrong.rDelimUnd=W($.emStrong.rDelimUnd,"g").replace(/punct/g,$._punctuation).getRegex(),$._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,$._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,$._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,$.autolink=W($.autolink).replace("scheme",$._scheme).replace("email",$._email).getRegex(),$._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,$.tag=W($.tag).replace("comment",$._comment).replace("attribute",$._attribute).getRegex(),$._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,$._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,$._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,$.link=W($.link).replace("label",$._label).replace("href",$._href).replace("title",$._title).getRegex(),$.reflink=W($.reflink).replace("label",$._label).getRegex(),$.reflinkSearch=W($.reflinkSearch,"g").replace("reflink",$.reflink).replace("nolink",$.nolink).getRegex(),$.normal=V({},$),$.pedantic=V({},$.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:W(/^!?\[(label)\]\((.*?)\)/).replace("label",$._label).getRegex(),reflink:W(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",$._label).getRegex()}),$.gfm=V({},$.normal,{escape:W($.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(i="x"+i.toString(16)),n+="&#"+i+";";return n}var X=function(){function t(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||j,this.options.tokenizer=this.options.tokenizer||new B,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:q.normal,inline:K.normal};this.options.pedantic?(t.block=q.pedantic,t.inline=K.pedantic):this.options.gfm&&(t.block=q.gfm,this.options.breaks?t.inline=K.breaks:t.inline=K.gfm),this.tokenizer.rules=t}t.lex=function(e,i){return new t(i).lex(e)},t.lexInline=function(e,i){return new t(i).inlineTokens(e)};var i,n,o,r=t.prototype;return r.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},r.blockTokens=function(e,t,i){var n,o,r,s;for(void 0===t&&(t=[]),void 0===i&&(i=!0),this.options.pedantic&&(e=e.replace(/^ +$/gm,""));e;)if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),n.type&&t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),(s=t[t.length-1])&&"paragraph"===s.type?(s.raw+="\n"+n.raw,s.text+="\n"+n.text):t.push(n);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.nptable(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),n.tokens=this.blockTokens(n.text,[],i),t.push(n);else if(n=this.tokenizer.list(e)){for(e=e.substring(n.raw.length),r=n.items.length,o=0;o0)for(;null!=(s=this.tokenizer.rules.inline.reflinkSearch.exec(c));)u.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,s.index)+"["+G("a",s[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(s=this.tokenizer.rules.inline.blockSkip.exec(c));)c=c.slice(0,s.index)+"["+G("a",s[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;null!=(s=this.tokenizer.rules.inline.escapedEmSt.exec(c));)c=c.slice(0,s.index)+"++"+c.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(a||(l=""),a=!1,o=this.tokenizer.escape(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.tag(e,i,n)){e=e.substring(o.raw.length),i=o.inLink,n=o.inRawBlock;var h=t[t.length-1];h&&"text"===o.type&&"text"===h.type?(h.raw+=o.raw,h.text+=o.text):t.push(o)}else if(o=this.tokenizer.link(e))e=e.substring(o.raw.length),"link"===o.type&&(o.tokens=this.inlineTokens(o.text,[],!0,n)),t.push(o);else if(o=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(o.raw.length);var d=t[t.length-1];"link"===o.type?(o.tokens=this.inlineTokens(o.text,[],!0,n),t.push(o)):d&&"text"===o.type&&"text"===d.type?(d.raw+=o.raw,d.text+=o.text):t.push(o)}else if(o=this.tokenizer.emStrong(e,c,l))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],i,n),t.push(o);else if(o=this.tokenizer.codespan(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.br(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.del(e))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],i,n),t.push(o);else if(o=this.tokenizer.autolink(e,Z))e=e.substring(o.raw.length),t.push(o);else if(i||!(o=this.tokenizer.url(e,Z))){if(o=this.tokenizer.inlineText(e,n,Y))e=e.substring(o.raw.length),"_"!==o.raw.slice(-1)&&(l=o.raw.slice(-1)),a=!0,(r=t[t.length-1])&&"text"===r.type?(r.raw+=o.raw,r.text+=o.text):t.push(o);else if(e){var g="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(g);break}throw new Error(g)}}else e=e.substring(o.raw.length),t.push(o);return t},i=t,o=[{key:"rules",get:function(){return{block:q,inline:K}}}],(n=null)&&e(i.prototype,n),o&&e(i,o),t}(),Q=n.defaults,J=x,ee=w,te=function(){function e(e){this.options=e||Q}var t=e.prototype;return t.code=function(e,t,i){var n=(t||"").match(/\S*/)[0];if(this.options.highlight){var o=this.options.highlight(e,n);null!=o&&o!==e&&(i=!0,e=o)}return e=e.replace(/\n$/,"")+"\n",n?'
    '+(i?e:ee(e,!0))+"
    \n":"
    "+(i?e:ee(e,!0))+"
    \n"},t.blockquote=function(e){return"
    \n"+e+"
    \n"},t.html=function(e){return e},t.heading=function(e,t,i,n){return this.options.headerIds?"'+e+"\n":""+e+"\n"},t.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},t.list=function(e,t,i){var n=t?"ol":"ul";return"<"+n+(t&&1!==i?' start="'+i+'"':"")+">\n"+e+"\n"},t.listitem=function(e){return"
  • "+e+"
  • \n"},t.checkbox=function(e){return" "},t.paragraph=function(e){return"

    "+e+"

    \n"},t.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},t.tablerow=function(e){return"\n"+e+"\n"},t.tablecell=function(e,t){var i=t.header?"th":"td";return(t.align?"<"+i+' align="'+t.align+'">':"<"+i+">")+e+"\n"},t.strong=function(e){return""+e+""},t.em=function(e){return""+e+""},t.codespan=function(e){return""+e+""},t.br=function(){return this.options.xhtml?"
    ":"
    "},t.del=function(e){return""+e+""},t.link=function(e,t,i){if(null===(e=J(this.options.sanitize,this.options.baseUrl,e)))return i;var n='"+i+""},t.image=function(e,t,i){if(null===(e=J(this.options.sanitize,this.options.baseUrl,e)))return i;var n=''+i+'":">")},t.text=function(e){return e},e}(),ie=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,i){return""+i},t.image=function(e,t,i){return""+i},t.br=function(){return""},e}(),ne=function(){function e(){this.seen={}}var t=e.prototype;return t.serialize=function(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},t.getNextSafeSlug=function(e,t){var i=e,n=0;if(this.seen.hasOwnProperty(i)){n=this.seen[e];do{i=e+"-"+ ++n}while(this.seen.hasOwnProperty(i))}return t||(this.seen[e]=n,this.seen[i]=0),i},t.slug=function(e,t){void 0===t&&(t={});var i=this.serialize(e);return this.getNextSafeSlug(i,t.dryrun)},e}(),oe=n.defaults,re=C,se=function(){function e(e){this.options=e||oe,this.options.renderer=this.options.renderer||new te,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ie,this.slugger=new ne}e.parse=function(t,i){return new e(i).parse(t)},e.parseInline=function(t,i){return new e(i).parseInline(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var i,n,o,r,s,a,l,c,u,h,d,g,f,p,m,_,v,b,y="",w=e.length;for(i=0;i0&&"text"===m.tokens[0].type?(m.tokens[0].text=b+" "+m.tokens[0].text,m.tokens[0].tokens&&m.tokens[0].tokens.length>0&&"text"===m.tokens[0].tokens[0].type&&(m.tokens[0].tokens[0].text=b+" "+m.tokens[0].tokens[0].text)):m.tokens.unshift({type:"text",text:b}):p+=b),p+=this.parse(m.tokens,f),u+=this.renderer.listitem(p,v,_);y+=this.renderer.list(u,d,g);continue;case"html":y+=this.renderer.html(h.text);continue;case"paragraph":y+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(u=h.tokens?this.parseInline(h.tokens):h.text;i+1An error occurred:

    "+ce(e.message+"",!0)+"
    ";throw e}}return ge.options=ge.setOptions=function(e){return ae(ge.defaults,e),he(ge.defaults),ge},ge.getDefaults=ue,ge.defaults=de,ge.use=function(e){var t=ae({},e);if(e.renderer&&function(){var i=ge.defaults.renderer||new te,n=function(t){var n=i[t];i[t]=function(){for(var o=arguments.length,r=new Array(o),s=0;sAn error occurred:

    "+ce(e.message+"",!0)+"
    ";throw e}},ge.Parser=se,ge.parser=se.parse,ge.Renderer=te,ge.TextRenderer=ie,ge.Lexer=X,ge.lexer=X.lex,ge.Tokenizer=B,ge.Slugger=ne,ge.parse=ge,ge}()},3897:(e,t,i)=>{"use strict";i.d(t,{Q:()=>r});var n=i(3060),o=i(666);function r(e){let t=JSON.parse(e);return t=s(t),t}function s(e,t=0){if(!e||t>200)return e;if("object"==typeof e){switch(e.$mid){case 1:return o.o.revive(e);case 2:return new RegExp(e.source,e.flags)}if(e instanceof n.KN||e instanceof Uint8Array)return e;if(Array.isArray(e))for(let i=0;i{"use strict";i.d(t,{lg:()=>n,WX:()=>s,Gi:()=>a});var n,o=i(666),r=i(1432);!function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.userData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebook="vscode-notebook",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp"}(n||(n={}));const s=new class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null}setPreferredWebSchema(e){this._preferredWebSchema=e}rewrite(e){if(this._delegate)return this._delegate(e);const t=e.authority;let i=this._hosts[t];i&&-1!==i.indexOf(":")&&(i=`[${i}]`);const s=this._ports[t],a=this._connectionTokens[t];let l=`path=${encodeURIComponent(e.path)}`;return"string"==typeof a&&(l+=`&tkn=${encodeURIComponent(a)}`),o.o.from({scheme:r.$L?this._preferredWebSchema:n.vscodeRemoteResource,authority:`${i}:${s}`,path:"/vscode-remote-resource",query:l})}},a=new class{constructor(){this.FALLBACK_AUTHORITY="vscode-app"}asBrowserUri(e,t,i){const o=this.toUri(e,t);return o.scheme===n.vscodeRemote?s.rewrite(o):r.tY&&(i||r.MM)&&o.scheme===n.file?o.with({scheme:n.vscodeFileResource,authority:o.authority||this.FALLBACK_AUTHORITY,query:null,fragment:null}):o}toUri(e,t){return o.o.isUri(e)?e:o.o.parse(t.toUrl(e))}}},9870:(e,t,i)=>{"use strict";function n(e,t,i){return Math.min(Math.max(e,t),i)}i.d(t,{u:()=>n,n:()=>o});class o{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this}get value(){return this._val}}},6248:(e,t,i)=>{"use strict";i.d(t,{I8:()=>o,_A:()=>r,rs:()=>a,jB:()=>c,fS:()=>u,CJ:()=>h});var n=i(8401);function o(e){if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach((i=>{e[i]&&"object"==typeof e[i]?t[i]=o(e[i]):t[i]=e[i]})),t}function r(e){if(!e||"object"!=typeof e)return e;const t=[e];for(;t.length>0;){const e=t.shift();Object.freeze(e);for(const i in e)if(s.call(e,i)){const n=e[i];"object"!=typeof n||Object.isFrozen(n)||t.push(n)}}return e}const s=Object.prototype.hasOwnProperty;function a(e,t){return l(e,t,new Set)}function l(e,t,i){if((0,n.Jp)(e))return e;const o=t(e);if(void 0!==o)return o;if((0,n.kJ)(e)){const n=[];for(const o of e)n.push(l(o,t,i));return n}if((0,n.Kn)(e)){if(i.has(e))throw new Error("Cannot clone recursive data-structure");i.add(e);const n={};for(let o in e)s.call(e,o)&&(n[o]=l(e[o],t,i));return i.delete(e),n}return e}function c(e,t,i=!0){return(0,n.Kn)(e)?((0,n.Kn)(t)&&Object.keys(t).forEach((o=>{o in e?i&&((0,n.Kn)(e[o])&&(0,n.Kn)(t[o])?c(e[o],t[o],i):e[o]=t[o]):e[o]=t[o]})),e):t}function u(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let i,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(i=0;i{"use strict";i.d(t,{EZ:()=>k,XX:()=>x,DZ:()=>D,Fv:()=>w,KR:()=>y,Gf:()=>S,DB:()=>C,ir:()=>L,Ku:()=>b});var n=i(1432);let o;if(void 0!==n.li.vscode&&void 0!==n.li.vscode.process){const e=n.li.vscode.process;o={get platform(){return e.platform},get env(){return e.env},cwd:()=>e.cwd(),nextTick:e=>(0,n.xS)(e)}}else o="undefined"!=typeof process?{get platform(){return process.platform},get env(){return process.env},cwd:()=>process.env.VSCODE_CWD||process.cwd(),nextTick:e=>process.nextTick(e)}:{get platform(){return n.ED?"win32":n.dz?"darwin":"linux"},nextTick:e=>(0,n.xS)(e),get env(){return{}},cwd:()=>"/"};const r=o.cwd,s=o.env,a=o.platform,l=46,c=47,u=92,h=58;class d extends Error{constructor(e,t,i){let n;"string"==typeof t&&0===t.indexOf("not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";const o=-1!==e.indexOf(".")?"property":"argument";let r=`The "${e}" ${o} ${n} of type ${t}`;r+=". Received type "+typeof i,super(r),this.code="ERR_INVALID_ARG_TYPE"}}function g(e,t){if("string"!=typeof e)throw new d(t,"string",e)}function f(e){return e===c||e===u}function p(e){return e===c}function m(e){return e>=65&&e<=90||e>=97&&e<=122}function _(e,t,i,n){let o="",r=0,s=-1,a=0,u=0;for(let h=0;h<=e.length;++h){if(h2){const e=o.lastIndexOf(i);-1===e?(o="",r=0):(o=o.slice(0,e),r=o.length-1-o.lastIndexOf(i)),s=h,a=0;continue}if(0!==o.length){o="",r=0,s=h,a=0;continue}}t&&(o+=o.length>0?`${i}..`:"..",r=2)}else o.length>0?o+=`${i}${e.slice(s+1,h)}`:o=e.slice(s+1,h),r=h-s-1;s=h,a=0}else u===l&&-1!==a?++a:a=-1}return o}function v(e,t){if(null===t||"object"!=typeof t)throw new d("pathObject","Object",t);const i=t.dir||t.root,n=t.base||`${t.name||""}${t.ext||""}`;return i?i===t.root?`${i}${n}`:`${i}${e}${n}`:n}const b={resolve(...e){let t="",i="",n=!1;for(let o=e.length-1;o>=-1;o--){let a;if(o>=0){if(a=e[o],g(a,"path"),0===a.length)continue}else 0===t.length?a=r():(a=s[`=${t}`]||r(),(void 0===a||a.slice(0,2).toLowerCase()!==t.toLowerCase()&&a.charCodeAt(2)===u)&&(a=`${t}\\`));const l=a.length;let c=0,d="",p=!1;const _=a.charCodeAt(0);if(1===l)f(_)&&(c=1,p=!0);else if(f(_))if(p=!0,f(a.charCodeAt(1))){let e=2,t=e;for(;e2&&f(a.charCodeAt(2))&&(p=!0,c=3));if(d.length>0)if(t.length>0){if(d.toLowerCase()!==t.toLowerCase())continue}else t=d;if(n){if(t.length>0)break}else if(i=`${a.slice(c)}\\${i}`,n=p,p&&t.length>0)break}return i=_(i,!n,"\\",f),n?`${t}\\${i}`:`${t}${i}`||"."},normalize(e){g(e,"path");const t=e.length;if(0===t)return".";let i,n=0,o=!1;const r=e.charCodeAt(0);if(1===t)return p(r)?"\\":e;if(f(r))if(o=!0,f(e.charCodeAt(1))){let o=2,r=o;for(;o2&&f(e.charCodeAt(2))&&(o=!0,n=3));let s=n0&&f(e.charCodeAt(t-1))&&(s+="\\"),void 0===i?o?`\\${s}`:s:o?`${i}\\${s}`:`${i}${s}`},isAbsolute(e){g(e,"path");const t=e.length;if(0===t)return!1;const i=e.charCodeAt(0);return f(i)||t>2&&m(i)&&e.charCodeAt(1)===h&&f(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,i;for(let n=0;n0&&(void 0===t?t=i=o:t+=`\\${o}`)}if(void 0===t)return".";let n=!0,o=0;if("string"==typeof i&&f(i.charCodeAt(0))){++o;const e=i.length;e>1&&f(i.charCodeAt(1))&&(++o,e>2&&(f(i.charCodeAt(2))?++o:n=!1))}if(n){for(;o=2&&(t=`\\${t.slice(o)}`)}return b.normalize(t)},relative(e,t){if(g(e,"from"),g(t,"to"),e===t)return"";const i=b.resolve(e),n=b.resolve(t);if(i===n)return"";if((e=i.toLowerCase())===(t=n.toLowerCase()))return"";let o=0;for(;oo&&e.charCodeAt(r-1)===u;)r--;const s=r-o;let a=0;for(;aa&&t.charCodeAt(l-1)===u;)l--;const c=l-a,h=sh){if(t.charCodeAt(a+f)===u)return n.slice(a+f+1);if(2===f)return n.slice(a+f)}s>h&&(e.charCodeAt(o+f)===u?d=f:2===f&&(d=3)),-1===d&&(d=0)}let p="";for(f=o+d+1;f<=r;++f)f!==r&&e.charCodeAt(f)!==u||(p+=0===p.length?"..":"\\..");return a+=d,p.length>0?`${p}${n.slice(a,l)}`:(n.charCodeAt(a)===u&&++a,n.slice(a,l))},toNamespacedPath(e){if("string"!=typeof e)return e;if(0===e.length)return"";const t=b.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===u){if(t.charCodeAt(1)===u){const e=t.charCodeAt(2);if(63!==e&&e!==l)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(m(t.charCodeAt(0))&&t.charCodeAt(1)===h&&t.charCodeAt(2)===u)return`\\\\?\\${t}`;return e},dirname(e){g(e,"path");const t=e.length;if(0===t)return".";let i=-1,n=0;const o=e.charCodeAt(0);if(1===t)return f(o)?e:".";if(f(o)){if(i=n=1,f(e.charCodeAt(1))){let o=2,r=o;for(;o2&&f(e.charCodeAt(2))?3:2,n=i);let r=-1,s=!0;for(let i=t-1;i>=n;--i)if(f(e.charCodeAt(i))){if(!s){r=i;break}}else s=!1;if(-1===r){if(-1===i)return".";r=i}return e.slice(0,r)},basename(e,t){void 0!==t&&g(t,"ext"),g(e,"path");let i,n=0,o=-1,r=!0;if(e.length>=2&&m(e.charCodeAt(0))&&e.charCodeAt(1)===h&&(n=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let s=t.length-1,a=-1;for(i=e.length-1;i>=n;--i){const l=e.charCodeAt(i);if(f(l)){if(!r){n=i+1;break}}else-1===a&&(r=!1,a=i+1),s>=0&&(l===t.charCodeAt(s)?-1==--s&&(o=i):(s=-1,o=a))}return n===o?o=a:-1===o&&(o=e.length),e.slice(n,o)}for(i=e.length-1;i>=n;--i)if(f(e.charCodeAt(i))){if(!r){n=i+1;break}}else-1===o&&(r=!1,o=i+1);return-1===o?"":e.slice(n,o)},extname(e){g(e,"path");let t=0,i=-1,n=0,o=-1,r=!0,s=0;e.length>=2&&e.charCodeAt(1)===h&&m(e.charCodeAt(0))&&(t=n=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(f(t)){if(!r){n=a+1;break}}else-1===o&&(r=!1,o=a+1),t===l?-1===i?i=a:1!==s&&(s=1):-1!==i&&(s=-1)}return-1===i||-1===o||0===s||1===s&&i===o-1&&i===n+1?"":e.slice(i,o)},format:v.bind(null,"\\"),parse(e){g(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.length;let n=0,o=e.charCodeAt(0);if(1===i)return f(o)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(f(o)){if(n=1,f(e.charCodeAt(1))){let t=2,o=t;for(;t0&&(t.root=e.slice(0,n));let r=-1,s=n,a=-1,c=!0,u=e.length-1,d=0;for(;u>=n;--u)if(o=e.charCodeAt(u),f(o)){if(!c){s=u+1;break}}else-1===a&&(c=!1,a=u+1),o===l?-1===r?r=u:1!==d&&(d=1):-1!==r&&(d=-1);return-1!==a&&(-1===r||0===d||1===d&&r===a-1&&r===s+1?t.base=t.name=e.slice(s,a):(t.name=e.slice(s,r),t.base=e.slice(s,a),t.ext=e.slice(r,a))),t.dir=s>0&&s!==n?e.slice(0,s-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},y={resolve(...e){let t="",i=!1;for(let n=e.length-1;n>=-1&&!i;n--){const o=n>=0?e[n]:r();g(o,"path"),0!==o.length&&(t=`${o}/${t}`,i=o.charCodeAt(0)===c)}return t=_(t,!i,"/",p),i?`/${t}`:t.length>0?t:"."},normalize(e){if(g(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===c,i=e.charCodeAt(e.length-1)===c;return 0===(e=_(e,!t,"/",p)).length?t?"/":i?"./":".":(i&&(e+="/"),t?`/${e}`:e)},isAbsolute:e=>(g(e,"path"),e.length>0&&e.charCodeAt(0)===c),join(...e){if(0===e.length)return".";let t;for(let i=0;i0&&(void 0===t?t=n:t+=`/${n}`)}return void 0===t?".":y.normalize(t)},relative(e,t){if(g(e,"from"),g(t,"to"),e===t)return"";if((e=y.resolve(e))===(t=y.resolve(t)))return"";const i=e.length,n=i-1,o=t.length-1,r=nr){if(t.charCodeAt(1+a)===c)return t.slice(1+a+1);if(0===a)return t.slice(1+a)}else n>r&&(e.charCodeAt(1+a)===c?s=a:0===a&&(s=0));let l="";for(a=1+s+1;a<=i;++a)a!==i&&e.charCodeAt(a)!==c||(l+=0===l.length?"..":"/..");return`${l}${t.slice(1+s)}`},toNamespacedPath:e=>e,dirname(e){if(g(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===c;let i=-1,n=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===c){if(!n){i=t;break}}else n=!1;return-1===i?t?"/":".":t&&1===i?"//":e.slice(0,i)},basename(e,t){void 0!==t&&g(t,"ext"),g(e,"path");let i,n=0,o=-1,r=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let s=t.length-1,a=-1;for(i=e.length-1;i>=0;--i){const l=e.charCodeAt(i);if(l===c){if(!r){n=i+1;break}}else-1===a&&(r=!1,a=i+1),s>=0&&(l===t.charCodeAt(s)?-1==--s&&(o=i):(s=-1,o=a))}return n===o?o=a:-1===o&&(o=e.length),e.slice(n,o)}for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===c){if(!r){n=i+1;break}}else-1===o&&(r=!1,o=i+1);return-1===o?"":e.slice(n,o)},extname(e){g(e,"path");let t=-1,i=0,n=-1,o=!0,r=0;for(let s=e.length-1;s>=0;--s){const a=e.charCodeAt(s);if(a!==c)-1===n&&(o=!1,n=s+1),a===l?-1===t?t=s:1!==r&&(r=1):-1!==t&&(r=-1);else if(!o){i=s+1;break}}return-1===t||-1===n||0===r||1===r&&t===n-1&&t===i+1?"":e.slice(t,n)},format:v.bind(null,"/"),parse(e){g(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.charCodeAt(0)===c;let n;i?(t.root="/",n=1):n=0;let o=-1,r=0,s=-1,a=!0,u=e.length-1,h=0;for(;u>=n;--u){const t=e.charCodeAt(u);if(t!==c)-1===s&&(a=!1,s=u+1),t===l?-1===o?o=u:1!==h&&(h=1):-1!==o&&(h=-1);else if(!a){r=u+1;break}}if(-1!==s){const n=0===r&&i?1:r;-1===o||0===h||1===h&&o===s-1&&o===r+1?t.base=t.name=e.slice(n,s):(t.name=e.slice(n,o),t.base=e.slice(n,s),t.ext=e.slice(o,s))}return r>0?t.dir=e.slice(0,r-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};y.win32=b.win32=b,y.posix=b.posix=y;const w="win32"===a?b.normalize:y.normalize,C="win32"===a?b.resolve:y.resolve,S="win32"===a?b.relative:y.relative,x="win32"===a?b.dirname:y.dirname,k="win32"===a?b.basename:y.basename,D="win32"===a?b.extname:y.extname,L="win32"===a?b.sep:y.sep},1432:(e,t,i)=>{"use strict";var n;i.d(t,{li:()=>m,MM:()=>y,ED:()=>C,dz:()=>S,IJ:()=>x,tY:()=>k,$L:()=>D,gn:()=>L,WE:()=>N,xS:()=>E,OS:()=>A,r:()=>T});const o="en";let r,s,a,l=!1,c=!1,u=!1,h=!1,d=!1,g=!1,f=!1,p=null;const m="object"==typeof self?self:"object"==typeof i.g?i.g:{};let _;void 0!==m.vscode&&void 0!==m.vscode.process?_=m.vscode.process:"undefined"!=typeof process&&(_=process);const v="string"==typeof(null===(n=null==_?void 0:_.versions)||void 0===n?void 0:n.electron)&&"renderer"===_.type,b=v&&(null==_?void 0:_.sandboxed),y="string"==typeof(()=>{if(b)return"bypassHeatCheck";const e=null==_?void 0:_.env.VSCODE_BROWSER_CODE_LOADING;return"string"==typeof e?"none"===e||"code"===e||"bypassHeatCheck"===e||"bypassHeatCheckAndEagerCompile"===e?e:"bypassHeatCheck":void 0})();if("object"!=typeof navigator||v)if("object"==typeof _){l="win32"===_.platform,c="darwin"===_.platform,u="linux"===_.platform,h=u&&!!_.env.SNAP&&!!_.env.SNAP_REVISION,r=o,p=o;const e=_.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),i=t.availableLanguages["*"];r=t.locale,p=i||o,s=t._translationsConfigFile}catch(e){}d=!0}else console.error("Unable to resolve platform.");else a=navigator.userAgent,l=a.indexOf("Windows")>=0,c=a.indexOf("Macintosh")>=0,f=(a.indexOf("Macintosh")>=0||a.indexOf("iPad")>=0||a.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,u=a.indexOf("Linux")>=0,g=!0,r=navigator.language,p=r;let w=0;c?w=1:l?w=3:u&&(w=2);const C=l,S=c,x=u,k=d,D=g,L=f,N=a,E=function(){if(m.setImmediate)return m.setImmediate.bind(m);if("function"==typeof m.postMessage&&!m.importScripts){let e=[];m.addEventListener("message",(t=>{if(t.data&&t.data.vscodeSetImmediateId)for(let i=0,n=e.length;i{const n=++t;e.push({id:n,callback:i}),m.postMessage({vscodeSetImmediateId:n},"*")}}if("function"==typeof(null==_?void 0:_.nextTick))return _.nextTick.bind(_);const e=Promise.resolve();return t=>e.then(t)}(),A=c||f?2:l?1:3;let M=!0,I=!1;function T(){if(!I){I=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);M=513===t[0]}return M}},1134:(e,t,i)=>{"use strict";var n;i.d(t,{e:()=>n}),function(e){function t(e,t){if(e.start>=t.end||t.start>=e.end)return{start:0,end:0};const i=Math.max(e.start,t.start),n=Math.min(e.end,t.end);return n-i<=0?{start:0,end:0}:{start:i,end:n}}function i(e){return e.end-e.start<=0}e.intersect=t,e.isEmpty=i,e.intersects=function(e,n){return!i(t(e,n))},e.relativeComplement=function(e,t){const n=[],o={start:e.start,end:Math.min(t.start,e.end)},r={start:Math.max(t.end,e.start),end:e.end};return i(o)||n.push(o),i(r)||n.push(r),n}}(n||(n={}))},5935:(e,t,i)=>{"use strict";i.d(t,{z_:()=>l,SF:()=>c,Xy:()=>u,Hx:()=>h,EZ:()=>d,XX:()=>g,Vo:()=>f,AH:()=>p,i3:()=>m,Vb:()=>_});var n=i(5527),o=i(8721),r=i(666),s=i(7295),a=i(6663);function l(e){return(0,r.q)(e,!0)}const c=new class{constructor(e){this._ignorePathCasing=e}compare(e,t,i=!1){return e===t?0:(0,s.qu)(this.getComparisonKey(e,i),this.getComparisonKey(t,i))}isEqual(e,t,i=!1){return e===t||!(!e||!t)&&this.getComparisonKey(e,i)===this.getComparisonKey(t,i)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}joinPath(e,...t){return r.o.joinPath(e,...t)}basenameOrAuthority(e){return d(e)||e.authority}basename(e){return o.KR.basename(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===a.lg.file?t=r.o.file(o.XX(l(e))).path:(t=o.KR.dirname(e.path),e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===a.lg.file?r.o.file(o.Fv(l(e))).path:o.KR.normalize(e.path),e.with({path:t})}resolvePath(e,t){if(e.scheme===a.lg.file){const i=r.o.file(o.DB(l(e),t));return e.with({authority:i.authority,path:i.path})}return t=n.fn(t),e.with({path:o.KR.resolve(e.path,t)})}}((()=>!1)),u=c.isEqual.bind(c),h=c.basenameOrAuthority.bind(c),d=c.basename.bind(c),g=c.dirname.bind(c),f=c.joinPath.bind(c),p=c.normalizePath.bind(c),m=c.resolvePath.bind(c);var _;!function(e){e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=function(t){const i=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach((e=>{const[t,n]=e.split(":");t&&n&&i.set(t,n)}));const n=t.path.substring(0,t.path.indexOf(";"));return n&&i.set(e.META_DATA_MIME,n),i}}(_||(_={}))},6633:(e,t,i)=>{"use strict";i.d(t,{Rm:()=>s});var n=i(4669),o=i(5976);class r{constructor(e,t,i,n,o,r){e|=0,t|=0,i|=0,n|=0,o|=0,r|=0,this.rawScrollLeft=i,this.rawScrollTop=r,e<0&&(e=0),i+e>t&&(i=t-e),i<0&&(i=0),n<0&&(n=0),r+n>o&&(r=o-n),r<0&&(r=0),this.width=e,this.scrollWidth=t,this.scrollLeft=i,this.height=n,this.scrollHeight=o,this.scrollTop=r}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new r(void 0!==e.width?e.width:this.width,void 0!==e.scrollWidth?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,void 0!==e.height?e.height:this.height,void 0!==e.scrollHeight?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new r(this.width,this.scrollWidth,void 0!==e.scrollLeft?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,void 0!==e.scrollTop?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){const i=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,o=this.scrollLeft!==e.scrollLeft,r=this.height!==e.height,s=this.scrollHeight!==e.scrollHeight,a=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:i,scrollWidthChanged:n,scrollLeftChanged:o,heightChanged:r,scrollHeightChanged:s,scrollTopChanged:a}}}class s extends o.JT{constructor(e,t){super(),this._onScroll=this._register(new n.Q5),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e,this._scheduleAtNextAnimationFrame=t,this._state=new r(0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){const i=this._state.withScrollDimensions(e,t);this._setState(i,Boolean(this._smoothScrolling)),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(0===this._smoothScrollDuration)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:void 0===e.scrollLeft?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:void 0===e.scrollTop?this._smoothScrolling.to.scrollTop:e.scrollTop};const i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let n;n=t?new c(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{const t=this._state.withScrollPosition(e);this._smoothScrolling=c.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);return this._setState(t,!0),this._smoothScrolling?e.isDone?(this._smoothScrolling.dispose(),void(this._smoothScrolling=null)):void(this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))):void 0}_setState(e,t){const i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}}class a{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}function l(e,t){const i=t-e;return function(t){return e+i*(1-(n=1-t,Math.pow(n,3)));var n}}class c{constructor(e,t,i,n){this.from=e,this.to=t,this.duration=n,this.startTime=i,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(e,t,i){if(Math.abs(e-t)>2.5*i){let s,a;return e{"use strict";i.d(t,{Z:()=>r});var n,o=i(7295);!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(n||(n={})),function(e){const t="error",i="warning",n="info";e.fromValue=function(r){return r?o.qq(t,r)?e.Error:o.qq(i,r)||o.qq("warn",r)?e.Warning:o.qq(n,r)?e.Info:e.Ignore:e.Ignore},e.toString=function(o){switch(o){case e.Error:return t;case e.Warning:return i;case e.Info:return n;default:return"ignore"}}}(n||(n={}));const r=n},4013:(e,t,i)=>{"use strict";i.d(t,{G:()=>r});var n=i(1432);const o=n.li.performance&&"function"==typeof n.li.performance.now;class r{constructor(e){this._highResolution=o&&e,this._startTime=this._now(),this._stopTime=-1}static create(e=!0){return new r(e)}stop(){this._stopTime=this._now()}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?n.li.performance.now():Date.now()}}},7295:(e,t,i)=>{"use strict";function n(e){return!e||"string"!=typeof e||0===e.trim().length}i.d(t,{m5:()=>n,WU:()=>r,YU:()=>s,ec:()=>a,fy:()=>l,j3:()=>c,oL:()=>u,un:()=>h,R1:()=>d,GF:()=>g,IO:()=>f,mr:()=>p,uq:()=>m,LC:()=>_,V8:()=>v,ow:()=>b,qu:()=>y,TT:()=>w,zY:()=>C,j_:()=>S,mK:()=>x,df:()=>k,qq:()=>L,ok:()=>E,Mh:()=>A,P1:()=>M,ZG:()=>I,YK:()=>T,rL:()=>R,ZH:()=>O,vH:()=>P,HO:()=>B,CZ:()=>z,Ut:()=>V,RP:()=>$,$i:()=>j,Qe:()=>q,ab:()=>K,xe:()=>G,K7:()=>Y,C8:()=>Z,c1:()=>X,uS:()=>Q,Kw:()=>J,PJ:()=>ee,S6:()=>te,fi:()=>ie,oH:()=>oe});const o=/{(\d+)}/g;function r(e,...t){return 0===t.length?e:e.replace(o,(function(e,i){const n=parseInt(i,10);return isNaN(n)||n<0||n>=t.length?e:t[n]}))}function s(e){return e.replace(/[<>&]/g,(function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}}))}function a(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function l(e,t=" "){return u(c(e,t),t)}function c(e,t){if(!e||!t)return e;const i=t.length;if(0===i||0===e.length)return e;let n=0;for(;e.indexOf(t,n)===n;)n+=i;return e.substring(n)}function u(e,t){if(!e||!t)return e;const i=t.length,n=e.length;if(0===i||0===n)return e;let o=n,r=-1;for(;r=e.lastIndexOf(t,o-1),-1!==r&&r+i===o;){if(0===r)return"";o=r}return e.substring(0,o)}function h(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function d(e){return e.replace(/\*/g,"")}function g(e,t,i={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=a(e)),i.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let n="";return i.global&&(n+="g"),i.matchCase||(n+="i"),i.multiline&&(n+="m"),i.unicode&&(n+="u"),new RegExp(e,n)}function f(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&!(!e.exec("")||0!==e.lastIndex)}function p(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")}function m(e){return e.split(/\r\n|\r|\n/)}function _(e){for(let t=0,i=e.length;t=0;i--){const t=e.charCodeAt(i);if(32!==t&&9!==t)return i}return-1}function y(e,t){return et?1:0}function w(e,t,i=0,n=e.length,o=0,r=t.length){for(;ir)return 1}const s=n-i,a=r-o;return sa?1:0}function C(e,t){return S(e,t,0,e.length,0,t.length)}function S(e,t,i=0,n=e.length,o=0,r=t.length){for(;ia?1:0}function x(e){return e>=97&&e<=122}function k(e){return e>=65&&e<=90}function D(e){return x(e)||k(e)}function L(e,t){return e.length===t.length&&N(e,t)}function N(e,t,i=e.length){for(let n=0;ne.length)&&N(e,t,i)}function A(e,t){let i,n=Math.min(e.length,t.length);for(i=0;i1){const n=e.charCodeAt(t-2);if(I(n))return R(n,i)}return i}function P(e,t){const i=ne.getInstance(),n=t,o=e.length,r=O(e,o,t);t+=r>=65536?2:1;let s=i.getGraphemeBreakType(r);for(;t=65536?2:1,s=r}return t-n}function B(e,t){const i=ne.getInstance(),n=t,o=F(e,t);t-=o>=65536?2:1;let r=i.getGraphemeBreakType(o);for(;t>0;){const n=F(e,t),o=i.getGraphemeBreakType(n);if(ie(o,r))break;t-=n>=65536?2:1,r=o}return n-t}function z(e){const t=e.byteLength,i=[];let n=0;for(;n=240&&n+3>>0|(63&e[n++])<<12>>>0|(63&e[n++])<<6>>>0|(63&e[n++])<<0>>>0:o>=224&&n+2>>0|(63&e[n++])<<6>>>0|(63&e[n++])<<0>>>0:o>=192&&n+1>>0|(63&e[n++])<<0>>>0:e[n++],r>=0&&r<=55295||r>=57344&&r<=65535)i.push(String.fromCharCode(r));else if(r>=65536&&r<=1114111){const e=r-65536,t=55296+((1047552&e)>>>10),n=56320+((1023&e)>>>0);i.push(String.fromCharCode(t)),i.push(String.fromCharCode(n))}else i.push(String.fromCharCode(65533))}return i.join("")}const W=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function V(e){return W.test(e)}const H=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function $(e){return H.test(e)}const U=/^[\t\n\r\x20-\x7E]*$/;function j(e){return U.test(e)}const q=/[\u2028\u2029]/;function K(e){return q.test(e)}function G(e){for(let t=0,i=e.length;t=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function Z(e){return e>=127462&&e<=127487||8986===e||8987===e||9200===e||9203===e||e>=9728&&e<=10175||11088===e||11093===e||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129003||e>=129280&&e<=129535||e>=129648&&e<=129750}const X=String.fromCharCode(65279);function Q(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function J(e,t=!1){return!!e&&(t&&(e=e.replace(/\\./g,"")),e.toLowerCase()!==e)}function ee(e){return(e%=52)<26?String.fromCharCode(97+e):String.fromCharCode(65+e-26)}function te(e){return ne.getInstance().getGraphemeBreakType(e)}function ie(e,t){return 0===e?5!==t&&7!==t:!(2===e&&3===t||4!==e&&2!==e&&3!==e&&4!==t&&2!==t&&3!==t&&(8===e&&(8===t||9===t||11===t||12===t)||!(11!==e&&9!==e||9!==t&&10!==t)||(12===e||10===e)&&10===t||5===t||13===t||7===t||1===e||13===e&&14===t||6===e&&6===t))}class ne{constructor(){this._data=JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}static getInstance(){return ne._INSTANCE||(ne._INSTANCE=new ne),ne._INSTANCE}getGraphemeBreakType(e){if(e<32)return 10===e?3:13===e?2:4;if(e<127)return 0;const t=this._data,i=t.length/3;let n=1;for(;n<=i;)if(et[3*n+1]))return t[3*n+2];n=2*n+1}return 0}}function oe(e,t){if(0===e)return 0;const i=function(e,t){let i=F(t,e);for(e-=re(i);se(i)||65039===i||8419===i;){if(0===e)return;i=F(t,e),e-=re(i)}if(Z(i)){if(e>=0){const i=F(t,e);8205===i&&(e-=re(i))}return e}}(e,t);return void 0!==i?i:e-re(F(t,e))}function re(e){return e>=65536?2:1}function se(e){return 127995<=e&&e<=127999}ne._INSTANCE=null},8401:(e,t,i)=>{"use strict";function n(e){return Array.isArray(e)}function o(e){return"string"==typeof e}function r(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function s(e){return"number"==typeof e&&!isNaN(e)}function a(e){return!0===e||!1===e}function l(e){return void 0===e}function c(e){return l(e)||null===e}function u(e,t){if(!e)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function h(e){if(c(e))throw new Error("Assertion Failed: argument is undefined or null");return e}function d(e){return"function"==typeof e}function g(e,t){const i=Math.min(e.length,t.length);for(let n=0;nfunction(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)};let n={};for(const t of e)n[t]=i(t);return n}function _(e){return null===e?void 0:e}function v(e){throw new Error("Unreachable")}i.d(t,{kJ:()=>n,HD:()=>o,Kn:()=>r,hj:()=>s,jn:()=>a,o8:()=>l,Jp:()=>c,p_:()=>u,cW:()=>h,mf:()=>d,D8:()=>g,$E:()=>p,IU:()=>m,f6:()=>_,vE:()=>v})},5427:(e,t,i)=>{"use strict";function n(e){return e<0?0:e>255?255:0|e}function o(e){return e<0?0:e>4294967295?4294967295:0|e}i.d(t,{K:()=>n,A:()=>o})},666:(e,t,i)=>{"use strict";i.d(t,{o:()=>d,q:()=>v});var n=i(1432),o=i(8721);const r=/^\w[\w\d+.-]*$/,s=/^\//,a=/^\/\//;function l(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!r.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!s.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const c="",u="/",h=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{constructor(e,t,i,n,o,r=!1){"object"==typeof e?(this.scheme=e.scheme||c,this.authority=e.authority||c,this.path=e.path||c,this.query=e.query||c,this.fragment=e.fragment||c):(this.scheme=function(e,t){return e||t?e:"file"}(e,r),this.authority=t||c,this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==u&&(t=u+t):t=u}return t}(this.scheme,i||c),this.query=n||c,this.fragment=o||c,l(this,r))}static isUri(e){return e instanceof d||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}get fsPath(){return v(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:i,path:n,query:o,fragment:r}=e;return void 0===t?t=this.scheme:null===t&&(t=c),void 0===i?i=this.authority:null===i&&(i=c),void 0===n?n=this.path:null===n&&(n=c),void 0===o?o=this.query:null===o&&(o=c),void 0===r?r=this.fragment:null===r&&(r=c),t===this.scheme&&i===this.authority&&n===this.path&&o===this.query&&r===this.fragment?this:new f(t,i,n,o,r)}static parse(e,t=!1){const i=h.exec(e);return i?new f(i[2]||c,C(i[4]||c),C(i[5]||c),C(i[7]||c),C(i[9]||c),t):new f(c,c,c,c,c)}static file(e){let t=c;if(n.ED&&(e=e.replace(/\\/g,u)),e[0]===u&&e[1]===u){const i=e.indexOf(u,2);-1===i?(t=e.substring(2),e=u):(t=e.substring(2,i),e=e.substring(i)||u)}return new f("file",t,e,c,c)}static from(e){const t=new f(e.scheme,e.authority,e.path,e.query,e.fragment);return l(t,!0),t}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let i;return i=n.ED&&"file"===e.scheme?d.file(o.Ku.join(v(e,!0),...t)).path:o.KR.join(e.path,...t),e.with({path:i})}toString(e=!1){return b(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof d)return e;{const t=new f(e);return t._formatted=e.external,t._fsPath=e._sep===g?e.fsPath:null,t}}return e}}const g=n.ED?1:void 0;class f extends d{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath}toString(e=!1){return e?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=g),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const p={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function m(e,t){let i,n=-1;for(let o=0;o=97&&r<=122||r>=65&&r<=90||r>=48&&r<=57||45===r||46===r||95===r||126===r||t&&47===r)-1!==n&&(i+=encodeURIComponent(e.substring(n,o)),n=-1),void 0!==i&&(i+=e.charAt(o));else{void 0===i&&(i=e.substr(0,o));const t=p[r];void 0!==t?(-1!==n&&(i+=encodeURIComponent(e.substring(n,o)),n=-1),i+=t):-1===n&&(n=o)}}return-1!==n&&(i+=encodeURIComponent(e.substring(n))),void 0!==i?i:e}function _(e){let t;for(let i=0;i1&&"file"===e.scheme?`//${e.authority}${e.path}`:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,n.ED&&(i=i.replace(/\//g,"\\")),i}function b(e,t){const i=t?_:m;let n="",{scheme:o,authority:r,path:s,query:a,fragment:l}=e;if(o&&(n+=o,n+=":"),(r||"file"===o)&&(n+=u,n+=u),r){let e=r.indexOf("@");if(-1!==e){const t=r.substr(0,e);r=r.substr(e+1),e=t.indexOf(":"),-1===e?n+=i(t,!1):(n+=i(t.substr(0,e),!1),n+=":",n+=i(t.substr(e+1),!1)),n+="@"}r=r.toLowerCase(),e=r.indexOf(":"),-1===e?n+=i(r,!1):(n+=i(r.substr(0,e),!1),n+=r.substr(e))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const e=s.charCodeAt(1);e>=65&&e<=90&&(s=`/${String.fromCharCode(e+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const e=s.charCodeAt(0);e>=65&&e<=90&&(s=`${String.fromCharCode(e+32)}:${s.substr(2)}`)}n+=i(s,!0)}return a&&(n+="?",n+=i(a,!1)),l&&(n+="#",n+=t?l:m(l,!1)),n}function y(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+y(e.substr(3)):e}}const w=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function C(e){return e.match(w)?e.replace(w,(e=>y(e))):e}},7746:(e,t,i)=>{"use strict";i.d(t,{X5:()=>n,Jq:()=>o,jG:()=>r});const n={ctrlCmd:!1,alt:!1};var o,r;!function(e){e[e.Blur=1]="Blur",e[e.Gesture=2]="Gesture",e[e.Other=3]="Other"}(o||(o={})),function(e){e[e.NONE=0]="NONE",e[e.FIRST=1]="FIRST",e[e.SECOND=2]="SECOND",e[e.LAST=3]="LAST"}(r||(r={}))},272:(e,t,i)=>{"use strict";i.d(t,{H:()=>a});var n=i(158),o={},r={},s=function(){function e(e){var t=this;this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((function(e,i){t._lazyLoadPromiseResolve=e,t._lazyLoadPromiseReject=i}))}return e.getOrCreate=function(t){return r[t]||(r[t]=new e(t)),r[t]},e.prototype.whenLoaded=function(){return this._lazyLoadPromise},e.prototype.load=function(){var e=this;return this._loadingTriggered||(this._loadingTriggered=!0,o[this._languageId].loader().then((function(t){return e._lazyLoadPromiseResolve(t)}),(function(t){return e._lazyLoadPromiseReject(t)}))),this._lazyLoadPromise},e}();function a(e){var t=e.id;o[t]=e,n.languages.register(e);var i=s.getOrCreate(t);n.languages.setMonarchTokensProvider(t,i.whenLoaded().then((function(e){return e.language}))),n.languages.onLanguage(t,(function(){i.load().then((function(e){n.languages.setLanguageConfiguration(t,e.conf)}))}))}},3709:(e,t,i)=>{"use strict";i.r(t),(0,i(272).H)({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:function(){return i.e(240).then(i.bind(i,2240))}})},7365:(e,t,i)=>{"use strict";i.r(t),(0,i(272).H)({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:function(){return i.e(954).then(i.bind(i,2954))}})},9052:(e,t,i)=>{"use strict";i.d(t,{V:()=>m,P:()=>f});var n=i(6268),o=i(4669),r=i(5976),s=i(1432);class a{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class l{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";const t=document.createElement("div");t.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),t.style.fontWeight=this._bareFontInfo.fontWeight,t.style.fontSize=this._bareFontInfo.fontSize+"px",t.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,t.style.lineHeight=this._bareFontInfo.lineHeight+"px",t.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",e.appendChild(t);const i=document.createElement("div");i.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),i.style.fontWeight="bold",i.style.fontSize=this._bareFontInfo.fontSize+"px",i.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,i.style.lineHeight=this._bareFontInfo.lineHeight+"px",i.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",e.appendChild(i);const n=document.createElement("div");n.style.fontFamily=this._bareFontInfo.getMassagedFontFamily(),n.style.fontWeight=this._bareFontInfo.fontWeight,n.style.fontSize=this._bareFontInfo.fontSize+"px",n.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,n.style.lineHeight=this._bareFontInfo.lineHeight+"px",n.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",n.style.fontStyle="italic",e.appendChild(n);const o=[];for(const e of this._requests){let r;0===e.type&&(r=t),2===e.type&&(r=i),1===e.type&&(r=n),r.appendChild(document.createElement("br"));const s=document.createElement("span");l._render(s,e),r.appendChild(s),o.push(s)}this._container=e,this._testElements=o}static _render(e,t){if(" "===t.chr){let t=" ";for(let e=0;e<8;e++)t+=t;e.innerText=t}else{let i=t.chr;for(let e=0;e<8;e++)i+=i;e.textContent=i}}_readFromDomElements(){for(let e=0,t=this._requests.length;ethis._values[e]))}}function f(){p.INSTANCE.clearCache()}class p extends r.JT{constructor(){super(),this._onDidChange=this._register(new o.Q5),this.onDidChange=this._onDidChange.event,this._cache=new g,this._evictUntrustedReadingsTimeout=-1}dispose(){-1!==this._evictUntrustedReadingsTimeout&&(clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearCache(){this._cache=new g,this._onDidChange.fire()}_writeToCache(e,t){this._cache.put(e,t),t.isTrusted||-1!==this._evictUntrustedReadingsTimeout||(this._evictUntrustedReadingsTimeout=setTimeout((()=>{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()}),5e3))}_evictUntrustedReadings(){const e=this._cache.getValues();let t=!1;for(const i of e)i.isTrusted||(t=!0,this._cache.remove(i));t&&this._onDidChange.fire()}readConfiguration(e){if(!this._cache.has(e)){let t=p._actualReadConfiguration(e);(t.typicalHalfwidthCharacterWidth<=2||t.typicalFullwidthCharacterWidth<=2||t.spaceWidth<=2||t.maxDigitWidth<=2)&&(t=new d.pR({zoomLevel:n.px(),pixelRatio:n.mX(),fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:t.isMonospace,typicalHalfwidthCharacterWidth:Math.max(t.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(t.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:t.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(t.spaceWidth,5),middotWidth:Math.max(t.middotWidth,5),wsmiddotWidth:Math.max(t.wsmiddotWidth,5),maxDigitWidth:Math.max(t.maxDigitWidth,5)},!1)),this._writeToCache(e,t)}return this._cache.get(e)}static createRequest(e,t,i,n){const o=new a(e,t);return i.push(o),n&&n.push(o),o}static _actualReadConfiguration(e){const t=[],i=[],o=this.createRequest("n",0,t,i),r=this.createRequest("m",0,t,null),s=this.createRequest(" ",0,t,i),a=this.createRequest("0",0,t,i),c=this.createRequest("1",0,t,i),u=this.createRequest("2",0,t,i),g=this.createRequest("3",0,t,i),f=this.createRequest("4",0,t,i),p=this.createRequest("5",0,t,i),m=this.createRequest("6",0,t,i),_=this.createRequest("7",0,t,i),v=this.createRequest("8",0,t,i),b=this.createRequest("9",0,t,i),y=this.createRequest("→",0,t,i),w=this.createRequest("→",0,t,null),C=this.createRequest("·",0,t,i),S=this.createRequest(String.fromCharCode(11825),0,t,null);this.createRequest("|",0,t,i),this.createRequest("/",0,t,i),this.createRequest("-",0,t,i),this.createRequest("_",0,t,i),this.createRequest("i",0,t,i),this.createRequest("l",0,t,i),this.createRequest("m",0,t,i),this.createRequest("|",1,t,i),this.createRequest("_",1,t,i),this.createRequest("i",1,t,i),this.createRequest("l",1,t,i),this.createRequest("m",1,t,i),this.createRequest("n",1,t,i),this.createRequest("|",2,t,i),this.createRequest("_",2,t,i),this.createRequest("i",2,t,i),this.createRequest("l",2,t,i),this.createRequest("m",2,t,i),this.createRequest("n",2,t,i),function(e,t){new l(e,t).read()}(e,t);const x=Math.max(a.width,c.width,u.width,g.width,f.width,p.width,m.width,_.width,v.width,b.width);let k=e.fontFeatureSettings===h.n0.OFF;const D=i[0].width;for(let e=1,t=i.length;k&&e.001){k=!1;break}}let L=!0;k&&w.width!==D&&(L=!1),w.width>y.width&&(L=!1);const N=n.WP()>2e3;return new d.pR({zoomLevel:n.px(),pixelRatio:n.mX(),fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:k,typicalHalfwidthCharacterWidth:o.width,typicalFullwidthCharacterWidth:r.width,canUseHalfwidthRightwardsArrow:L,spaceWidth:s.width,middotWidth:C.width,wsmiddotWidth:S.width,maxDigitWidth:x},N)}}p.INSTANCE=new p;class m extends u.fv{constructor(e,t,i=null,o){super(e,t),this.accessibilityService=o,this._elementSizeObserver=this._register(new c.I(i,t.dimension,(()=>this._recomputeOptions()))),this._register(p.INSTANCE.onDidChange((()=>this._recomputeOptions()))),this._validatedOptions.get(10)&&this._elementSizeObserver.startObserving(),this._register(n.fX((e=>this._recomputeOptions()))),this._register(this.accessibilityService.onDidChangeScreenReaderOptimized((()=>this._recomputeOptions()))),this._recomputeOptions()}static applyFontInfoSlow(e,t){e.style.fontFamily=t.getMassagedFontFamily(),e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.fontFeatureSettings=t.fontFeatureSettings,e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px"}static applyFontInfo(e,t){e.setFontFamily(t.getMassagedFontFamily()),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setFontFeatureSettings(t.fontFeatureSettings),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)}observeReferenceElement(e){this._elementSizeObserver.observe(e)}updatePixelRatio(){this._recomputeOptions()}static _getExtraEditorClassName(){let e="";return n.G6||n.MG||(e+="no-user-select "),n.G6&&(e+="no-minimap-shadow "),s.dz&&(e+="mac "),e}_getEnvConfiguration(){return{extraEditorClassName:m._getExtraEditorClassName(),outerWidth:this._elementSizeObserver.getWidth(),outerHeight:this._elementSizeObserver.getHeight(),emptySelectionClipboard:n.Pf||n.vU,pixelRatio:n.mX(),zoomLevel:n.px(),accessibilitySupport:this.accessibilityService.isScreenReaderOptimized()?2:this.accessibilityService.getAccessibilitySupport()}}readConfiguration(e){return p.INSTANCE.readConfiguration(e)}}},4534:(e,t,i)=>{"use strict";i.d(t,{I:()=>o});var n=i(5976);class o extends n.JT{constructor(e,t,i){super(),this.referenceDomElement=e,this.changeCallback=i,this.width=-1,this.height=-1,this.resizeObserver=null,this.measureReferenceDomElementToken=-1,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this.width}getHeight(){return this.height}startObserving(){"undefined"!=typeof ResizeObserver?!this.resizeObserver&&this.referenceDomElement&&(this.resizeObserver=new ResizeObserver((e=>{e&&e[0]&&e[0].contentRect?this.observe({width:e[0].contentRect.width,height:e[0].contentRect.height}):this.observe()})),this.resizeObserver.observe(this.referenceDomElement)):-1===this.measureReferenceDomElementToken&&(this.measureReferenceDomElementToken=setInterval((()=>this.observe()),100))}stopObserving(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),-1!==this.measureReferenceDomElementToken&&(clearInterval(this.measureReferenceDomElementToken),this.measureReferenceDomElementToken=-1)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let i=0,n=0;t?(i=t.width,n=t.height):this.referenceDomElement&&(i=this.referenceDomElement.clientWidth,n=this.referenceDomElement.clientHeight),i=Math.max(5,i),n=Math.max(5,n),this.width===i&&this.height===n||(this.width=i,this.height=n,e&&this.changeCallback())}}},8728:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CoreEditingCommands:()=>L,CoreEditorCommand:()=>C,CoreNavigationCommands:()=>p,EditorScroll_:()=>g,RevealLine_:()=>f});var n=i(3580),o=i(6268),r=i(8401),s=i(5152),a=i(6830),l=i(1640),c=i(3181),u=i(187),h=i(4314);class d{static columnSelect(e,t,i,n,o,r){let s=Math.abs(o-i)+1,a=i>o,l=n>r,d=nr)continue;if(_n)continue;if(m0&&n--,d.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,n)}static columnSelectRight(e,t,i){let n=0;const o=Math.min(i.fromViewLineNumber,i.toViewLineNumber),r=Math.max(i.fromViewLineNumber,i.toViewLineNumber);for(let i=o;i<=r;i++){const o=t.getLineMaxColumn(i),r=c.io.visibleColumnFromColumn2(e,t,new u.L(i,o));n=Math.max(n,r)}let s=i.toViewVisualColumn;return s{const i=e.get(l.$).getFocusedCodeEditor();return!(!i||!i.hasTextFocus())&&this._runEditorCommand(e,i,t)})),e.addImplementation(1e3,"generic-dom-input-textarea",((e,t)=>{const i=document.activeElement;return!!(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)&&(this.runDOMCommand(),!0)})),e.addImplementation(0,"generic-dom",((e,t)=>{const i=e.get(l.$).getActiveCodeEditor();return!!i&&(i.focus(),this._runEditorCommand(e,i,t))}))}_runEditorCommand(e,t,i){return this.runEditorCommand(e,t,i)||!0}}!function(e){class t extends C{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[_.P.moveTo(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)]),e.revealPrimaryCursor(t.source,!0)}}e.MoveTo=(0,a.fK)(new t({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),e.MoveToSelect=(0,a.fK)(new t({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class i extends C{runCoreEditorCommand(e,t){e.model.pushStackElement();const i=this._getColumnSelectResult(e,e.getPrimaryCursorState(),e.getCursorColumnSelectData(),t);e.setCursorStates(t.source,3,i.viewStates.map((e=>c.Vi.fromViewState(e)))),e.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:i.fromLineNumber,fromViewVisualColumn:i.fromVisualColumn,toViewLineNumber:i.toLineNumber,toViewVisualColumn:i.toVisualColumn}),i.reversed?e.revealTopMostCursor(t.source):e.revealBottomMostCursor(t.source)}}e.ColumnSelect=(0,a.fK)(new class extends i{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(e,t,i,n){const o=e.model.validatePosition(n.position),r=e.coordinatesConverter.validateViewPosition(new u.L(n.viewPosition.lineNumber,n.viewPosition.column),o);let s=n.doColumnSelect?i.fromViewLineNumber:r.lineNumber,a=n.doColumnSelect?i.fromViewVisualColumn:n.mouseColumn-1;return d.columnSelect(e.cursorConfig,e,s,a,r.lineNumber,n.mouseColumn-1)}}),e.CursorColumnSelectLeft=(0,a.fK)(new class extends i{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return d.columnSelectLeft(e.cursorConfig,e,i)}}),e.CursorColumnSelectRight=(0,a.fK)(new class extends i{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return d.columnSelectRight(e.cursorConfig,e,i)}});class r extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return d.columnSelectUp(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectUp=(0,a.fK)(new r({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=(0,a.fK)(new r({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3595,linux:{primary:0}}}));class l extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return d.columnSelectDown(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectDown=(0,a.fK)(new l({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=(0,a.fK)(new l({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3596,linux:{primary:0}}}));class p extends C{constructor(){super({id:"cursorMove",precondition:void 0,description:_.N.description})}runCoreEditorCommand(e,t){const i=_.N.parse(t);i&&this._runCursorMove(e,t.source,i)}_runCursorMove(e,t,i){e.model.pushStackElement(),e.setCursorStates(t,3,p._move(e,e.getCursorStates(),i)),e.revealPrimaryCursor(t,!0)}static _move(e,t,i){const n=i.select,o=i.value;switch(i.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return _.P.simpleMove(e,t,i.direction,n,o,i.unit);case 11:case 13:case 12:case 14:return _.P.viewportMove(e,t,i.direction,n,o);default:return null}}}e.CursorMoveImpl=p,e.CursorMove=(0,a.fK)(new p);class m extends C{constructor(e){super(e),this._staticArgs=e.args}runCoreEditorCommand(e,t){let i=this._staticArgs;-1===this._staticArgs.value&&(i={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:e.cursorConfig.pageSize}),e.model.pushStackElement(),e.setCursorStates(t.source,3,_.P.simpleMove(e,e.getCursorStates(),i.direction,i.select,i.value,i.unit)),e.revealPrimaryCursor(t.source,!0)}}e.CursorLeft=(0,a.fK)(new m({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=(0,a.fK)(new m({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1039}})),e.CursorRight=(0,a.fK)(new m({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=(0,a.fK)(new m({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1041}})),e.CursorUp=(0,a.fK)(new m({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=(0,a.fK)(new m({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=(0,a.fK)(new m({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:11}})),e.CursorPageUpSelect=(0,a.fK)(new m({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1035}})),e.CursorDown=(0,a.fK)(new m({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=(0,a.fK)(new m({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=(0,a.fK)(new m({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:12}})),e.CursorPageDownSelect=(0,a.fK)(new m({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1036}})),e.CreateCursor=(0,a.fK)(new class extends C{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(e,t){let i;i=t.wholeLine?_.P.line(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition):_.P.moveTo(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition);const n=e.getCursorStates();if(n.length>1){const o=i.modelState?i.modelState.position:null,r=i.viewState?i.viewState.position:null;for(let i=0,s=n.length;ir&&(o=r);const s=new h.e(o,1,o,e.model.getLineMaxColumn(o));let a=0;if(i.at)switch(i.at){case f.RawAtArgument.Top:a=3;break;case f.RawAtArgument.Center:a=1;break;case f.RawAtArgument.Bottom:a=4}const l=e.coordinatesConverter.convertModelRangeToViewRange(s);e.revealRange(t.source,!1,l,a,0)}}),e.SelectAll=new class extends S{constructor(){super(a.Sq)}runDOMCommand(){o.vU&&(document.activeElement.focus(),document.activeElement.select()),document.execCommand("selectAll")}runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditorCommand(n,i)}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates("keyboard",3,[_.P.selectAll(e,e.getPrimaryCursorState())])}},e.SetSelection=(0,a.fK)(new class extends C{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[c.Vi.fromModelSelection(t.selection)])}})}(p||(p={}));const x=y.Ao.and(b.u.textInputFocus,b.u.columnSelection);function k(e,t){w.W.registerKeybindingRule({id:e,primary:t,when:x,weight:1})}function D(e){return e.register(),e}var L;k(p.CursorColumnSelectLeft.id,1039),k(p.CursorColumnSelectRight.id,1041),k(p.CursorColumnSelectUp.id,1040),k(p.CursorColumnSelectPageUp.id,1035),k(p.CursorColumnSelectDown.id,1042),k(p.CursorColumnSelectPageDown.id,1036),function(e){class t extends a._l{runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditingCommand(t,n,i||{})}}e.CoreEditingCommand=t,e.LineBreakInsert=(0,a.fK)(new class extends t{constructor(){super({id:"lineBreakInsert",precondition:b.u.writable,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,v.u.lineBreakInsert(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection))))}}),e.Outdent=(0,a.fK)(new class extends t{constructor(){super({id:"outdent",precondition:b.u.writable,kbOpts:{weight:0,kbExpr:y.Ao.and(b.u.editorTextFocus,b.u.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,v.u.outdent(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.Tab=(0,a.fK)(new class extends t{constructor(){super({id:"tab",precondition:b.u.writable,kbOpts:{weight:0,kbExpr:y.Ao.and(b.u.editorTextFocus,b.u.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,v.u.tab(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.DeleteLeft=(0,a.fK)(new class extends t{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(e,t,i){const[n,o]=m.A.deleteLeft(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)),t.getCursorAutoClosedCharacters());n&&e.pushUndoStop(),e.executeCommands(this.id,o),t.setPrevEditOperationType(2)}}),e.DeleteRight=(0,a.fK)(new class extends t{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(e,t,i){const[n,o]=m.A.deleteRight(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)));n&&e.pushUndoStop(),e.executeCommands(this.id,o),t.setPrevEditOperationType(3)}}),e.Undo=new class extends S{constructor(){super(a.n_)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(78))return t.getModel().undo()}},e.Redo=new class extends S{constructor(){super(a.kz)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(78))return t.getModel().redo()}}}(L||(L={}));class N extends a.mY{constructor(e,t,i){super({id:e,precondition:void 0,description:i}),this._handlerId=t}runCommand(e,t){const i=e.get(l.$).getFocusedCodeEditor();i&&i.trigger("keyboard",this._handlerId,t)}}function E(e,t){D(new N("default:"+e,e)),D(new N(e,e,t))}E("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),E("replacePreviousChar"),E("compositionType"),E("compositionStart"),E("compositionEnd"),E("paste"),E("cut")},5715:(e,t,i)=>{"use strict";i.d(t,{pd:()=>n,RA:()=>f,Nl:()=>p,Fz:()=>m});var n,o=i(6268),r=i(5321),s=i(5393),a=i(4669),l=i(5976),c=i(1432),u=i(7295),h=i(5887),d=i(187),g=i(3860);!function(e){e.Tap="-monaco-textarea-synthetic-tap"}(n||(n={}));const f={forceCopyWithSyntaxHighlighting:!1};class p{constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}}p.INSTANCE=new p;class m extends l.JT{constructor(e,t){super(),this.textArea=t,this._onFocus=this._register(new a.Q5),this.onFocus=this._onFocus.event,this._onBlur=this._register(new a.Q5),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new a.Q5),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new a.Q5),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new a.Q5),this.onCut=this._onCut.event,this._onPaste=this._register(new a.Q5),this.onPaste=this._onPaste.event,this._onType=this._register(new a.Q5),this.onType=this._onType.event,this._onCompositionStart=this._register(new a.Q5),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new a.Q5),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new a.Q5),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new a.Q5),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._host=e,this._textArea=this._register(new v(t)),this._asyncTriggerCut=this._register(new s.pY((()=>this._onCut.fire()),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new s.pY((()=>this.writeScreenReaderContent("asyncFocusGain")),0)),this._textAreaState=h.un.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._isDoingComposition=!1,this._nextCommand=0;let i=null;this._register(r.mu(t.domNode,"keydown",(e=>{(109===e.keyCode||this._isDoingComposition&&1===e.keyCode)&&e.stopPropagation(),e.equals(9)&&e.preventDefault(),i=e,this._onKeyDown.fire(e)}))),this._register(r.mu(t.domNode,"keyup",(e=>{this._onKeyUp.fire(e)}))),this._register(r.nm(t.domNode,"compositionstart",(e=>{if(h.al&&console.log("[compositionstart]",e),!this._isDoingComposition){if(this._isDoingComposition=!0,c.dz&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===e.data&&(i&&i.equals(109)&&("ArrowRight"===i.code||"ArrowLeft"===i.code)||o.vU))return h.al&&console.log("[compositionstart] Handling long press case on macOS + arrow key or Firefox",e),this._textAreaState=new h.un(this._textAreaState.value,this._textAreaState.selectionStart-1,this._textAreaState.selectionEnd,this._textAreaState.selectionStartPosition?new d.L(this._textAreaState.selectionStartPosition.lineNumber,this._textAreaState.selectionStartPosition.column-1):null,this._textAreaState.selectionEndPosition),void this._onCompositionStart.fire({revealDeltaColumns:-1});o.Dt?this._onCompositionStart.fire({revealDeltaColumns:-this._textAreaState.selectionStart}):(this._setAndWriteTextAreaState("compositionstart",h.un.EMPTY),this._onCompositionStart.fire({revealDeltaColumns:0}))}})));const l=e=>{const t=this._textAreaState,i=h.un.readFromTextArea(this._textArea);return[i,h.un.deduceInput(t,i,e)]},g=()=>{const e=this._textAreaState,t=h.un.readFromTextArea(this._textArea);return[t,h.un.deduceAndroidCompositionInput(e,t)]},f=e=>{const t=this._textAreaState,i=h.un.selectedText(e);return[i,{text:i.value,replacePrevCharCnt:t.selectionEnd-t.selectionStart,replaceNextCharCnt:0,positionDelta:0}]};this._register(r.nm(t.domNode,"compositionupdate",(e=>{if(h.al&&console.log("[compositionupdate]",e),o.Dt){const[t,i]=g();return this._textAreaState=t,this._onType.fire(i),void this._onCompositionUpdate.fire(e)}const[t,i]=f(e.data||"");this._textAreaState=t,this._onType.fire(i),this._onCompositionUpdate.fire(e)}))),this._register(r.nm(t.domNode,"compositionend",(e=>{if(h.al&&console.log("[compositionend]",e),!this._isDoingComposition)return;if(this._isDoingComposition=!1,o.Dt){const[e,t]=g();return this._textAreaState=e,this._onType.fire(t),void this._onCompositionEnd.fire()}const[t,i]=f(e.data||"");this._textAreaState=t,this._onType.fire(i),(o.i7||o.vU)&&(this._textAreaState=h.un.readFromTextArea(this._textArea)),this._onCompositionEnd.fire()}))),this._register(r.nm(t.domNode,"input",(()=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._isDoingComposition)return;const[e,t]=l(c.dz);0===t.replacePrevCharCnt&&1===t.text.length&&u.ZG(t.text.charCodeAt(0))||(this._textAreaState=e,0===this._nextCommand?""===t.text&&0===t.replacePrevCharCnt||this._onType.fire(t):(""===t.text&&0===t.replacePrevCharCnt||this._firePaste(t.text,null),this._nextCommand=0))}))),this._register(r.nm(t.domNode,"cut",(e=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(e),this._asyncTriggerCut.schedule()}))),this._register(r.nm(t.domNode,"copy",(e=>{this._ensureClipboardGetsEditorSelection(e)}))),this._register(r.nm(t.domNode,"paste",(e=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),_.canUseTextData(e)){const[t,i]=_.getTextData(e);""!==t&&this._firePaste(t,i)}else this._textArea.getSelectionStart()!==this._textArea.getSelectionEnd()&&this._setAndWriteTextAreaState("paste",h.un.EMPTY),this._nextCommand=1}))),this._register(r.nm(t.domNode,"focus",(()=>{const e=this._hasFocus;this._setHasFocus(!0),o.G6&&!e&&this._hasFocus&&this._asyncFocusGainWriteScreenReaderContent.schedule()}))),this._register(r.nm(t.domNode,"blur",(()=>{this._isDoingComposition&&(this._isDoingComposition=!1,this.writeScreenReaderContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)}))),this._register(r.nm(t.domNode,n.Tap,(()=>{o.Dt&&this._isDoingComposition&&(this._isDoingComposition=!1,this.writeScreenReaderContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())})))}_installSelectionChangeListener(){let e=0;return r.nm(document,"selectionchange",(t=>{if(!this._hasFocus)return;if(this._isDoingComposition)return;if(!o.i7)return;const i=Date.now(),n=i-e;if(e=i,n<5)return;const r=i-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),r<100)return;if(!this._textAreaState.selectionStartPosition||!this._textAreaState.selectionEndPosition)return;const s=this._textArea.getValue();if(this._textAreaState.value!==s)return;const a=this._textArea.getSelectionStart(),l=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===a&&this._textAreaState.selectionEnd===l)return;const c=this._textAreaState.deduceEditorPosition(a),u=this._host.deduceModelPosition(c[0],c[1],c[2]),h=this._textAreaState.deduceEditorPosition(l),d=this._host.deduceModelPosition(h[0],h[1],h[2]),f=new g.Y(u.lineNumber,u.column,d.lineNumber,d.column);this._onSelectionChangeRequest.fire(f)}))}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){const e=r.Ay(this.textArea.domNode);e?this._setHasFocus(e.activeElement===this.textArea.domNode):r.Uw(this.textArea.domNode)?this._setHasFocus(document.activeElement===this.textArea.domNode):this._setHasFocus(!1)}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeScreenReaderContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeScreenReaderContent(e){this._isDoingComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent(this._textAreaState))}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy(_.canUseTextData(e)),i={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};p.INSTANCE.set(o.vU?t.text.replace(/\r\n/g,"\n"):t.text,i),_.canUseTextData(e)?_.setTextData(e,t.text,t.html,i):this._setAndWriteTextAreaState("copy or cut",h.un.selectedText(t.text))}_firePaste(e,t){t||(t=p.INSTANCE.get(e)),this._onPaste.fire({text:e,metadata:t})}}class _{static canUseTextData(e){return!!e.clipboardData||!!window.clipboardData}static getTextData(e){if(e.clipboardData){e.preventDefault();const t=e.clipboardData.getData("text/plain");let i=null;const n=e.clipboardData.getData("vscode-editor-data");if("string"==typeof n)try{i=JSON.parse(n),1!==i.version&&(i=null)}catch(e){}return[t,i]}if(window.clipboardData)return e.preventDefault(),[window.clipboardData.getData("Text"),null];throw new Error("ClipboardEventUtils.getTextData: Cannot use text data!")}static setTextData(e,t,i,n){if(e.clipboardData)return e.clipboardData.setData("text/plain",t),"string"==typeof i&&e.clipboardData.setData("text/html",i),e.clipboardData.setData("vscode-editor-data",JSON.stringify(n)),void e.preventDefault();if(window.clipboardData)return window.clipboardData.setData("Text",t),void e.preventDefault();throw new Error("ClipboardEventUtils.setTextData: Cannot use text data!")}}class v extends l.JT{constructor(e){super(),this._actual=e,this._ignoreSelectionChangeTime=0}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.domNode.value}setValue(e,t){const i=this._actual.domNode;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return"backward"===this._actual.domNode.selectionDirection?this._actual.domNode.selectionEnd:this._actual.domNode.selectionStart}getSelectionEnd(){return"backward"===this._actual.domNode.selectionDirection?this._actual.domNode.selectionStart:this._actual.domNode.selectionEnd}setSelectionRange(e,t,i){const n=this._actual.domNode;let s=null;const a=r.Ay(n);s=a?a.activeElement:document.activeElement;const l=s===n,c=n.selectionStart,u=n.selectionEnd;if(l&&c===t&&u===i)o.vU&&window.parent!==window&&n.focus();else{if(l)return this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),void(o.vU&&window.parent!==window&&n.focus());try{const e=r.vL(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),r._0(n,e)}catch(e){}}}}},5887:(e,t,i)=>{"use strict";i.d(t,{al:()=>s,un:()=>a,ee:()=>l});var n=i(7295),o=i(187),r=i(4314);const s=!1;class a{constructor(e,t,i,n,o){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selectionStartPosition=n,this.selectionEndPosition=o}toString(){return"[ <"+this.value+">, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+"]"}static readFromTextArea(e){return new a(e.getValue(),e.getSelectionStart(),e.getSelectionEnd(),null,null)}collapseSelection(){return new a(this.value,this.value.length,this.value.length,null,null)}writeToTextArea(e,t,i){s&&console.log("writeToTextArea "+e+": "+this.toString()),t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){if(e<=this.selectionStart){const t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,t,-1)}if(e>=this.selectionEnd){const t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selectionEndPosition,t,1)}const t=this.value.substring(this.selectionStart,e);if(-1===t.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selectionStartPosition,t,1);const i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,i,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,o=-1;for(;-1!==(o=t.indexOf("\n",o+1));)n++;return[e,i*t.length,n]}static selectedText(e){return new a(e,0,e.length,null,null)}static deduceInput(e,t,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};s&&(console.log("------------------------deduceInput"),console.log("PREVIOUS STATE: "+e.toString()),console.log("CURRENT STATE: "+t.toString()));let o=e.value,r=e.selectionStart,a=e.selectionEnd,l=t.value,c=t.selectionStart,u=t.selectionEnd;const h=o.substring(a),d=l.substring(u),g=n.P1(h,d);l=l.substring(0,l.length-g),o=o.substring(0,o.length-g);const f=o.substring(0,r),p=l.substring(0,c),m=n.Mh(f,p);if(l=l.substring(m),o=o.substring(m),c-=m,r-=m,u-=m,a-=m,s&&(console.log("AFTER DIFFING PREVIOUS STATE: <"+o+">, selectionStart: "+r+", selectionEnd: "+a),console.log("AFTER DIFFING CURRENT STATE: <"+l+">, selectionStart: "+c+", selectionEnd: "+u)),i&&c===u&&o.length>0){let e=null;if(c===l.length?l.startsWith(o)&&(e=l.substring(o.length)):l.endsWith(o)&&(e=l.substring(0,l.length-o.length)),null!==e&&e.length>0&&(/\uFE0F/.test(e)||n.RP(e)))return{text:e,replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0}}if(c===u){if(o===l&&0===r&&a===o.length&&c===l.length&&-1===l.indexOf("\n")&&n.xe(l))return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};const e=f.length-m;return s&&console.log("REMOVE PREVIOUS: "+(f.length-m)+" chars"),{text:l,replacePrevCharCnt:e,replaceNextCharCnt:0,positionDelta:0}}return{text:l,replacePrevCharCnt:a-r,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(s&&(console.log("------------------------deduceAndroidCompositionInput"),console.log("PREVIOUS STATE: "+e.toString()),console.log("CURRENT STATE: "+t.toString())),e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};const i=Math.min(n.Mh(e.value,t.value),e.selectionEnd),o=Math.min(n.P1(e.value,t.value),e.value.length-e.selectionEnd),r=e.value.substring(i,e.value.length-o),a=t.value.substring(i,t.value.length-o),l=e.selectionStart-i,c=e.selectionEnd-i,u=t.selectionStart-i,h=t.selectionEnd-i;return s&&(console.log("AFTER DIFFING PREVIOUS STATE: <"+r+">, selectionStart: "+l+", selectionEnd: "+c),console.log("AFTER DIFFING CURRENT STATE: <"+a+">, selectionStart: "+u+", selectionEnd: "+h)),{text:a,replacePrevCharCnt:c,replaceNextCharCnt:r.length-c,positionDelta:h-a.length}}}a.EMPTY=new a("",0,0,null,null);class l{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const i=e*t,n=i+1,o=i+t;return new r.e(n,1,o+1,1)}static fromEditorSelection(e,t,i,n,s){const c=l._getPageOfLine(i.startLineNumber,n),u=l._getRangeForPage(c,n),h=l._getPageOfLine(i.endLineNumber,n),d=l._getRangeForPage(h,n),g=u.intersectRanges(new r.e(1,1,i.startLineNumber,i.startColumn));let f=t.getValueInRange(g,1);const p=t.getLineCount(),m=t.getLineMaxColumn(p),_=d.intersectRanges(new r.e(i.endLineNumber,i.endColumn,p,m));let v,b=t.getValueInRange(_,1);if(c===h||c+1===h)v=t.getValueInRange(i,1);else{const e=u.intersectRanges(i),n=d.intersectRanges(i);v=t.getValueInRange(e,1)+String.fromCharCode(8230)+t.getValueInRange(n,1)}if(s){const e=500;f.length>e&&(f=f.substring(f.length-e,f.length)),b.length>e&&(b=b.substring(0,e)),v.length>2*e&&(v=v.substring(0,e)+String.fromCharCode(8230)+v.substring(v.length-e,v.length))}return new a(f+v+b,f.length,f.length+v.length,new o.L(i.startLineNumber,i.startColumn),new o.L(i.endLineNumber,i.endColumn))}}},9925:(e,t,i)=>{"use strict";i.d(t,{yy:()=>m,Dl:()=>_,ZF:()=>b,YQ:()=>v});var n=i(7295),o=i(4314),r=i(1050),s=i(5976),a=i(6830),l=i(8819),c=i(1741),u=i(2065),h=i(5026),d=i(3580);const g=(0,u.yh)("IEditorCancelService"),f=new l.uy("cancellableOperation",!1,(0,d.N)("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));(0,h.z)(g,class{constructor(){this._tokens=new WeakMap}add(e,t){let i,n=this._tokens.get(e);return n||(n=e.invokeWithinContext((e=>({key:f.bindTo(e.get(l.i6)),tokens:new c.S}))),this._tokens.set(e,n)),n.key.set(!0),i=n.tokens.push(t),()=>{i&&(i(),n.key.set(!n.tokens.isEmpty()),i=void 0)}}cancel(e){const t=this._tokens.get(e);if(!t)return;const i=t.tokens.pop();i&&(i.cancel(),t.key.set(!t.tokens.isEmpty()))}},!0);class p extends r.A{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext((t=>t.get(g).add(e,this)))}dispose(){this._unregister(),super.dispose()}}(0,a.fK)(new class extends a._l{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:f})}runEditorCommand(e,t){e.get(g).cancel(t)}});class m{constructor(e,t){if(this.flags=t,0!=(1&this.flags)){const t=e.getModel();this.modelVersionId=t?n.WU("{0}#{1}",t.uri.toString(),t.getVersionId()):null}else this.modelVersionId=null;0!=(4&this.flags)?this.position=e.getPosition():this.position=null,0!=(2&this.flags)?this.selection=e.getSelection():this.selection=null,0!=(8&this.flags)?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof m))return!1;const t=e;return this.modelVersionId===t.modelVersionId&&this.scrollLeft===t.scrollLeft&&this.scrollTop===t.scrollTop&&!(!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position))&&!(!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))}validate(e){return this._equals(new m(e,this.flags))}}class _ extends p{constructor(e,t,i,n){super(e,n),this._listener=new s.SL,4&t&&this._listener.add(e.onDidChangeCursorPosition((e=>{i&&o.e.containsPosition(i,e.position)||this.cancel()}))),2&t&&this._listener.add(e.onDidChangeCursorSelection((e=>{i&&o.e.containsRange(i,e.selection)||this.cancel()}))),8&t&&this._listener.add(e.onDidScrollChange((e=>this.cancel()))),1&t&&(this._listener.add(e.onDidChangeModel((e=>this.cancel()))),this._listener.add(e.onDidChangeModelContent((e=>this.cancel()))))}dispose(){this._listener.dispose(),super.dispose()}}class v extends r.A{constructor(e,t){super(t),this._listener=e.onDidChangeContent((()=>this.cancel()))}dispose(){this._listener.dispose(),super.dispose()}}class b{constructor(e,t,i){this._visiblePosition=e,this._visiblePositionScrollDelta=t,this._cursorPosition=i}static capture(e){let t=null,i=0;if(0!==e.getScrollTop()){const n=e.getVisibleRanges();if(n.length>0){t=n[0].getStartPosition();const o=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-o}}return new b(t,i,e.getPosition())}restore(e){if(this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){const t=e.getPosition();if(!this._cursorPosition||!t)return;const i=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+i)}}},3947:(e,t,i)=>{"use strict";i.d(t,{$:()=>M});var n=i(5321),o=i(8764),r=i(7301),s=i(9365),a=i(4742),l=i(3720);let c;!function e(t,i,n){function o(s,a){if(!i[s]){if(!t[s]){if(r)return r(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=i[s]={exports:{}};t[s][0].call(c.exports,(function(e){return o(t[s][1][e]||e)}),c,c.exports,e,t,i,n)}return i[s].exports}for(var r=void 0,s=0;s\s]+))?)*)\s*(\/?)\s*>/,a=/^<\s*\/\s*([\w:-]+)[^>]*>/,l=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,c=/^=0&&(t.comment&&t.comment(e.substring(4,n)),e=e.substring(n+3),i=!1):u.test(e)?f(a,m):c.test(e)&&f(s,p),function(){if(i){var n,o=e.indexOf("<");o>=0?(n=e.substring(0,o),e=e.substring(o)):(n=e,e=""),t.chars&&t.chars(n)}}();var o=e===d;d=e,o&&(e="")}function f(t,n){var o=e.match(t);o&&(e=e.substring(o[0].length),o[0].replace(t,n),i=!1)}function p(e,i,s,a){var c={},u=o(i),d=r.voids[u]||!!a;s.replace(l,(function(e,t,i,o,r){c[t]=void 0===i&&void 0===o&&void 0===r?void 0:n.decode(i||o||r||"")})),d||h.push(u),t.start&&t.start(u,c,d)}function m(e,i){var n,r=0,s=o(i);if(s)for(r=h.length-1;r>=0&&h[r]!==s;r--);if(r>=0){for(n=h.length-1;n>=r;n--)t.end&&t.end(h[n]);h.length=r}}m()}},{"./attributes":1,"./elements":3,"./lowercase":5,he:9}],8:[function(e,t,i){var n=e("he"),o=e("./lowercase"),r=e("./attributes"),s=e("./elements");t.exports=function(e,t){var i,a=t||{};return u(),{start:function(e,t,s){var u=o(e);i.ignoring?c(u):-1!==(a.allowedTags||[]).indexOf(u)&&(!a.filter||a.filter({tag:u,attrs:t}))?(l("<"),l(u),Object.keys(t).forEach((function(e){var i=t[e],s=(a.allowedClasses||{})[u]||[],c=(a.allowedAttributes||{})[u]||[];c=c.concat((a.allowedAttributes||{})["*"]||[]);var h=o(e);("class"===h&&-1===c.indexOf(h)?(i=i.split(" ").filter((function(e){return s&&-1!==s.indexOf(e)})).join(" ").trim()).length:-1!==c.indexOf(h)&&(!0!==r.uris[h]||function(e){var t=e[0];if("#"===t||"/"===t)return!0;var i=e.indexOf(":");if(-1===i)return!0;var n=e.indexOf("?");if(-1!==n&&i>n)return!0;var o=e.indexOf("#");return-1!==o&&i>o||a.allowedSchemes.some((function(t){return 0===e.indexOf(t+":")}))}(i)))&&(l(" "),l(e),"string"==typeof i&&(l('="'),l(n.encode(i)),l('"')))})),l(s?"/>":">")):c(u)},end:function(e){var t=o(e);-1!==(a.allowedTags||[]).indexOf(t)&&!1===i.ignoring?(l("")):function(e){i.ignoring===e&&--i.depth<=0&&u()}(t)},chars:function(e){!1===i.ignoring&&l(a.transformText?a.transformText(e):e)}};function l(t){e.push(t)}function c(e){s.voids[e]||(!1===i.ignoring?i={ignoring:e,depth:1}:i.ignoring===e&&i.depth++)}function u(){i={ignoring:!1,depth:0}}}},{"./attributes":1,"./elements":3,"./lowercase":5,he:9}],9:[function(e,t,i){var n={"&":"&","<":"<",">":">",'"':""","'":"'"},o={"&":"&","<":"<",">":">",""":'"',"'":"'"},r=/(&|<|>|"|')/g,s=/[&<>"']/g;function a(e){return n[e]}function l(e){return o[e]}function c(e){return null==e?"":String(e).replace(s,a)}function u(e){return null==e?"":String(e).replace(r,l)}c.options=u.options={},t.exports={encode:c,escape:c,decode:u,unescape:u,version:"1.0.0-browser"}},{}],10:[function(e,t,i){function n(e,t){return e[t]=!0,e}t.exports=function(e){return e.reduce(n,{})}},{}]},{},[4]);var u,h=c,d=i(3897),g=i(6248),f=i(7295),p=i(666),m=i(6663),_=i(1212),v=i(5935),b=i(3938),y=i(6811),w=i(4669),C=i(4850);const S=null===(u=window.trustedTypes)||void 0===u?void 0:u.createPolicy("insane",{createHTML:(e,t)=>h(e,t)});var x,k=i(988),D=i(1531),L=i(5713),N=i(5976),E=i(4101),A=function(e,t){return function(i,n){t(i,n,e)}};let M=class e{constructor(e,t,i){this._options=e,this._modeService=t,this._openerService=i,this._onDidRenderAsync=new w.Q5,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,i){const c=new N.SL;let u;return u=e?function(e,t={},i={}){var c;const u=(0,o.az)(t),x=function(t){let i;try{i=(0,d.Q)(decodeURIComponent(t))}catch(e){}return i?(i=(0,g.rs)(i,(t=>e.uris&&e.uris[t]?p.o.revive(e.uris[t]):void 0)),encodeURIComponent(JSON.stringify(i))):t},k=function(t,i){const n=e.uris&&e.uris[t];if(!n)return t;let o=p.o.revive(n);return p.o.parse(t).toString()===o.toString()?t:i?m.Gi.asBrowserUri(o).toString(!0):(o.query&&(o=o.with({query:x(o.query)})),o.toString())};let D;const L=new Promise((e=>D=e)),N=new l.Renderer;N.image=(e,i,n)=>{let o=[],r=[];if(e){({href:e,dimensions:o}=(0,s.v1)(e)),e=k(e,!0);try{const i=p.o.parse(e);t.baseUrl&&i.scheme===m.lg.file&&(e=(0,v.i3)(t.baseUrl,e).toString())}catch(e){}r.push(`src="${e}"`)}return n&&r.push(`alt="${n}"`),i&&r.push(`title="${i}"`),o.length&&(r=r.concat(o)),""},N.link=(i,n,o)=>(i===o&&(o=(0,s.oR)(o)),i=k(i,!1),t.baseUrl&&(/^\w[\w\d+.-]*:/.test(i)||(i=(0,v.i3)(t.baseUrl,i).toString())),n=(0,s.oR)(n),!(i=(0,s.oR)(i))||i.match(/^data:|javascript:/i)||i.match(/^command:/i)&&!e.isTrusted||i.match(/^command:(\/\/\/)?_workbench\.downloadResource/i)?o:`/g,">").replace(/"/g,""").replace(/'/g,"'")}" title="${n||i}">${o}`),N.paragraph=t=>(e.supportThemeIcons&&(t=(0,y.T)(t).map((e=>"string"==typeof e?e:e.outerHTML)).join("")),`

    ${t}

    `),t.codeBlockRenderer&&(N.code=(e,i)=>{const o=t.codeBlockRenderer(i,e),r=a.a.nextId(),s=Promise.all([o,L]).then((e=>{const t=u.querySelector(`div[data-code="${r}"]`);t&&n.mc(t,e[0])})).catch((e=>{}));return t.asyncRenderCallback&&s.then(t.asyncRenderCallback),`
    ${(0,f.YU)(e)}
    `}),t.actionHandler&&t.actionHandler.disposeables.add(w.ju.any((0,C.jt)(u,"click"),(0,C.jt)(u,"auxclick"))((e=>{const i=new b.n(e);if(!i.leftButton&&!i.middleButton)return;let n=i.target;if("A"===n.tagName||(n=n.parentElement,n&&"A"===n.tagName))try{const e=n.dataset.href;e&&t.actionHandler.callback(e,i)}catch(e){(0,r.dL)(e)}finally{i.preventDefault()}}))),i.sanitizer=t=>(e.isTrusted?t.match(/^(]+>)|(<\/\s*span>)$/):void 0)?t:"",i.sanitize=!0,i.silent=!0,i.renderer=N;let E=null!==(c=e.value)&&void 0!==c?c:"";E.length>1e5&&(E=`${E.substr(0,1e5)}…`),e.supportThemeIcons&&(E=(0,_.f$)(E));const A=l.parse(E,i);if(u.innerHTML=function(e,t){var i;const n=function(e){const t=[m.lg.http,m.lg.https,m.lg.mailto,m.lg.data,m.lg.file,m.lg.vscodeRemote,m.lg.vscodeRemoteResource];return e.isTrusted&&t.push(m.lg.command),{allowedSchemes:t,allowedTags:["ul","li","p","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"],allowedAttributes:{a:["href","name","target","data-href"],img:["src","title","alt","width","height"],div:["class","data-code"],span:["class","style"],th:["align"],td:["align"]},filter:t=>!("span"===t.tag&&e.isTrusted&&(t.attrs.style&&1===Object.keys(t.attrs).length?!t.attrs.style.match(/^(color\:#[0-9a-fA-F]+;)?(background-color\:#[0-9a-fA-F]+;)?$/):!t.attrs.class||!t.attrs.class.match(/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/)))}}(e);return null!==(i=null==S?void 0:S.createHTML(t,n))&&void 0!==i?i:h(t,n)}(e,A),D(),t.asyncRenderCallback)for(const e of u.getElementsByTagName("img")){const i=n.nm(e,"load",(()=>{i.dispose(),t.asyncRenderCallback()}))}return u}(e,Object.assign(Object.assign({},this._getRenderOptions(e,c)),t),i):document.createElement("span"),{element:u,dispose:()=>c.dispose()}}_getRenderOptions(t,i){return{baseUrl:this._options.baseUrl,codeBlockRenderer:(t,i)=>{return n=this,o=void 0,s=function*(){var n,o,r,s;let a;t?a=this._modeService.getModeIdForLanguageName(t):this._options.editor&&(a=null===(n=this._options.editor.getModel())||void 0===n?void 0:n.getLanguageIdentifier().language),a||(a="plaintext"),this._modeService.triggerMode(a);const l=null!==(o=yield E.RW.getPromise(a))&&void 0!==o?o:void 0,c=document.createElement("span");c.innerHTML=null!==(s=null===(r=e._ttpTokenizer)||void 0===r?void 0:r.createHTML(i,l))&&void 0!==s?s:(0,L.C)(i,l);let u=this._options.codeBlockFontFamily;return this._options.editor&&(u=this._options.editor.getOption(40).fontFamily),u&&(c.style.fontFamily=u),c},new((r=void 0)||(r=Promise))((function(e,t){function i(e){try{l(s.next(e))}catch(e){t(e)}}function a(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(i,a)}l((s=s.apply(n,o||[])).next())}));var n,o,r,s},asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:e=>this._openerService.open(e,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:t.isTrusted}).catch(r.dL),disposeables:i}}}};M._ttpTokenizer=null===(x=window.trustedTypes)||void 0===x?void 0:x.createPolicy("tokenizeToString",{createHTML:(e,t)=>(0,L.C)(e,t)}),M=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([A(1,D.h),A(2,k.v4)],M)},5520:(e,t,i)=>{"use strict";i.d(t,{CL:()=>o,QI:()=>r,Pi:()=>s});var n=i(6518);function o(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===n.g.ICodeEditor}function r(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===n.g.IDiffEditor}function s(e){return o(e)?e:r(e)?e.getModifiedEditor():null}},6830:(e,t,i)=>{"use strict";i.d(t,{mY:()=>v,AJ:()=>b,_l:()=>w,R6:()=>C,jY:()=>S,sb:()=>x,f:()=>k,fK:()=>D,Qr:()=>L,rn:()=>N,QG:()=>E,_K:()=>A,Uc:()=>n,n_:()=>T,kz:()=>R,Sq:()=>O});var n,o=i(3580),r=i(666),s=i(1640),a=i(187),l=i(1200),c=i(8216),u=i(4144),h=i(4565),d=i(8819),g=i(9989),f=i(9872),p=i(829),m=i(8401),_=i(3557);class v{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this._description=e.description}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const e=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const t of e){let e=t.kbExpr;this.precondition&&(e=e?d.Ao.and(e,this.precondition):this.precondition);const i={id:this.id,weight:t.weight,args:t.args,when:e,primary:t.primary,secondary:t.secondary,win:t.win,linux:t.linux,mac:t.mac};g.W.registerKeybindingRule(i)}}h.P.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),description:this._description})}_registerMenuItem(e){u.BH.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}}class b extends v{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,i){return this._implementations.push({priority:e,name:t,implementation:i}),this._implementations.sort(((e,t)=>t.priority-e.priority)),{dispose:()=>{for(let e=0;e{if(e.get(d.i6).contextMatchesRules((0,m.f6)(this.precondition)))return this.runEditorCommand(e,n,t)}))}}class C extends w{constructor(e){super(C.convertOptions(e)),this.label=e.label,this.alias=e.alias}static convertOptions(e){let t;function i(t){return t.menuId||(t.menuId=u.eH.EditorContext),t.title||(t.title=e.label),t.when=d.Ao.and(e.precondition,t.when),t}return t=Array.isArray(e.menuOpts)?e.menuOpts:e.menuOpts?[e.menuOpts]:[],Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(i)):e.contextMenuOpts&&t.push(i(e.contextMenuOpts)),e.menuOpts=t,e}runEditorCommand(e,t,i){return this.reportTelemetry(e,t),this.run(e,t,i||{})}reportTelemetry(e,t){e.get(p.b).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class S extends C{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort(((e,t)=>t[0]-e[0])),{dispose:()=>{for(let e=0;enew Promise(((n,r)=>{try{n(t(e.object.textEditorModel,a.L.lift(o),i.slice(2)))}catch(e){r(e)}})).finally((()=>{e.dispose()}))))}))}function k(e,t){h.P.registerCommand(e,(function(e,...i){const[n]=i;(0,m.p_)(r.o.isUri(n));const o=e.get(l.q).getModel(n);return o?t(o,...i.slice(1)):e.get(c.S).createModelReference(n).then((e=>new Promise(((n,o)=>{try{n(t(e.object.textEditorModel,i.slice(1)))}catch(e){o(e)}})).finally((()=>{e.dispose()}))))}))}function D(e){return M.INSTANCE.registerEditorCommand(e),e}function L(e){const t=new e;return M.INSTANCE.registerEditorAction(t),t}function N(e){return M.INSTANCE.registerEditorAction(e),e}function E(e){M.INSTANCE.registerEditorAction(e)}function A(e,t){M.INSTANCE.registerEditorContribution(e,t)}!function(e){e.getEditorCommand=function(e){return M.INSTANCE.getEditorCommand(e)},e.getEditorActions=function(){return M.INSTANCE.getEditorActions()},e.getEditorContributions=function(){return M.INSTANCE.getEditorContributions()},e.getSomeEditorContributions=function(e){return M.INSTANCE.getEditorContributions().filter((t=>e.indexOf(t.id)>=0))},e.getDiffEditorContributions=function(){return M.INSTANCE.getDiffEditorContributions()}}(n||(n={}));class M{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t){this.editorContributions.push({id:e,ctor:t})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions.slice(0)}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}function I(e){return e.register(),e}M.INSTANCE=new M,f.B.add("editor.contributions",M.INSTANCE);const T=I(new b({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:u.eH.MenubarEditMenu,group:"1_do",title:o.N({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:u.eH.CommandPalette,group:"",title:o.N("undo","Undo"),order:1}]}));I(new y(T,{id:"default:undo",precondition:void 0}));const R=I(new b({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:u.eH.MenubarEditMenu,group:"1_do",title:o.N({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:u.eH.CommandPalette,group:"",title:o.N("redo","Redo"),order:1}]}));I(new y(R,{id:"default:redo",precondition:void 0}));const O=I(new b({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:u.eH.MenubarSelectionMenu,group:"1_basic",title:o.N({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:u.eH.CommandPalette,group:"",title:o.N("selectAll","Select All"),order:1}]}))},6007:(e,t,i)=>{"use strict";i.d(t,{vu:()=>s,fo:()=>a,Gl:()=>l});var n=i(2065),o=i(666),r=i(8401);const s=(0,n.yh)("IWorkspaceEditService");class a{constructor(e){this.metadata=e}static convert(e){return e.edits.map((e=>{if(t=e,(0,r.Kn)(t)&&o.o.isUri(t.resource)&&(0,r.Kn)(t.edit))return new l(e.resource,e.edit,e.modelVersionId,e.metadata);var t;if(function(e){return(0,r.Kn)(e)&&(Boolean(e.newUri)||Boolean(e.oldUri))}(e))return new c(e.oldUri,e.newUri,e.options,e.metadata);throw new Error("Unsupported edit")}))}}class l extends a{constructor(e,t,i,n){super(n),this.resource=e,this.textEdit=t,this.versionId=i}}class c extends a{constructor(e,t,i,n){super(n),this.oldResource=e,this.newResource=t,this.options=i}}},1640:(e,t,i)=>{"use strict";i.d(t,{$:()=>n});const n=(0,i(2065).yh)("codeEditorService")},2073:(e,t,i)=>{"use strict";i.d(t,{Gm:()=>Gn});var n=i(6479),o=i(6830);let r=class{constructor(e,t){}dispose(){}};var s,a;r.ID="editor.contrib.markerDecorations",r=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(s=1,a=n.i,function(e,t){a(e,t,s)})],r),(0,o._K)(r.ID,r);var l=i(3580),c=i(5321),u=i(7301),h=i(4669),d=i(5976),g=i(6663),f=i(9052),p=i(1640),m=i(6268),_=i(3860),v=i(8626),b=i(1432),y=i(553),w=i(3938),C=i(5393),S=i(7974);class x{constructor(e,t){this.x=e,this.y=t}toClientCoordinates(){return new k(this.x-c.DI.scrollX,this.y-c.DI.scrollY)}}class k{constructor(e,t){this.clientX=e,this.clientY=t}toPageCoordinates(){return new x(this.clientX+c.DI.scrollX,this.clientY+c.DI.scrollY)}}class D{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n}}function L(e){const t=c.i(e);return new D(t.left,t.top,t.width,t.height)}class N extends w.n{constructor(e,t){super(e),this.pos=new x(this.posx,this.posy),this.editorPos=L(t)}}class E{constructor(e){this._editorViewDomNode=e}_create(e){return new N(e,this._editorViewDomNode)}onContextMenu(e,t){return c.nm(e,"contextmenu",(e=>{t(this._create(e))}))}onMouseUp(e,t){return c.nm(e,"mouseup",(e=>{t(this._create(e))}))}onMouseDown(e,t){return c.nm(e,"mousedown",(e=>{t(this._create(e))}))}onMouseLeave(e,t){return c.j_(e,(e=>{t(this._create(e))}))}onMouseMoveThrottled(e,t,i,n){return c.Y_(e,"mousemove",t,((e,t)=>i(e,this._create(t))),n)}}class A{constructor(e){this._editorViewDomNode=e}_create(e){return new N(e,this._editorViewDomNode)}onPointerUp(e,t){return c.nm(e,"pointerup",(e=>{t(this._create(e))}))}onPointerDown(e,t){return c.nm(e,"pointerdown",(e=>{t(this._create(e))}))}onPointerLeave(e,t){return c.RE(e,(e=>{t(this._create(e))}))}onPointerMoveThrottled(e,t,i,n){return c.Y_(e,"pointermove",t,((e,t)=>i(e,this._create(t))),n)}}class M extends d.JT{constructor(e){super(),this._editorViewDomNode=e,this._globalMouseMoveMonitor=this._register(new S.Z),this._keydownListener=null}startMonitoring(e,t,i,n,o){this._keydownListener=c.mu(document,"keydown",(e=>{e.toKeybinding().isModifierKey()||this._globalMouseMoveMonitor.stopMonitoring(!0,e.browserEvent)}),!0),this._globalMouseMoveMonitor.startMonitoring(e,t,((e,t)=>i(e,new N(t,this._editorViewDomNode))),n,(e=>{this._keydownListener.dispose(),o(e)}))}stopMonitoring(){this._globalMouseMoveMonitor.stopMonitoring(!0)}}class I extends d.JT{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let i=0,n=e.length;i=a?o=Math.max(o,a+l-n):(t[i++]=new P(n,o),n=a,o=l)}return t[i++]=new P(n,o),t}static _createHorizontalRangesFromClientRects(e,t){if(!e||0===e.length)return null;const i=[];for(let n=0,o=e.length;na)return null;if((t=Math.min(a,Math.max(0,t)))===(n=Math.min(a,Math.max(0,n)))&&i===o&&0===i&&!e.children[t].firstChild){const i=e.children[t].getClientRects();return this._createHorizontalRangesFromClientRects(i,r)}t!==n&&n>0&&0===o&&(n--,o=1073741824);let l=e.children[t].firstChild,c=e.children[n].firstChild;if(l&&c||(!l&&0===i&&t>0&&(l=e.children[t-1].firstChild,i=1073741824),!c&&0===o&&n>0&&(c=e.children[n-1].firstChild,o=1073741824)),!l||!c)return null;i=Math.min(l.textContent.length,Math.max(0,i)),o=Math.min(c.textContent.length,Math.max(0,o));const u=this._readClientRects(l,i,c,o,s);return this._createHorizontalRangesFromClientRects(u,r)}}var H=i(2550),$=i(7736),U=i(2321),j=i(4141);const q=!!b.tY||!(b.IJ||m.vU||m.G6);let K=!0;class G{constructor(e,t){this._domNode=e,this._clientRectDeltaLeft=0,this._clientRectDeltaLeftRead=!1,this.endNode=t}get clientRectDeltaLeft(){return this._clientRectDeltaLeftRead||(this._clientRectDeltaLeftRead=!0,this._clientRectDeltaLeft=this._domNode.getBoundingClientRect().left),this._clientRectDeltaLeft}}class Y{constructor(e,t){this.themeType=t;const i=e.options,n=i.get(40);this.renderWhitespace=i.get(86),this.renderControlCharacters=i.get(80),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(27),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(56),this.stopRenderingLineAfter=i.get(103),this.fontLigatures=i.get(41)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}}class Z{constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=(0,v.X)(e)}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return(this._options.themeType===U.e.HIGH_CONTRAST||"selection"===this._options.renderWhitespace)&&(this._isMaybeInvalid=!0,!0)}renderLine(e,t,i,n){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;const o=i.getViewLineRenderingData(e),r=this._options,s=H.Kp.filter(o.inlineDecorations,e,o.minColumn,o.maxColumn);let a=null;if(r.themeType===U.e.HIGH_CONTRAST||"selection"===this._options.renderWhitespace){const t=i.selections;for(const i of t){if(i.endLineNumbere)continue;const t=i.startLineNumber===e?i.startColumn:o.minColumn,n=i.endLineNumber===e?i.endColumn:o.maxColumn;t');const c=(0,$.d1)(l,n);n.appendASCIIString("");let u=null;return K&&q&&o.isBasicASCII&&r.useMonospaceOptimizations&&0===c.containsForeignElements&&o.content.length<300&&l.lineTokens.getCount()<100&&(u=new X(this._renderedViewLine?this._renderedViewLine.domNode:null,l,c.characterMapping)),u||(u=ee(this._renderedViewLine?this._renderedViewLine.domNode:null,l,c.characterMapping,c.containsRTL,c.containsForeignElements)),this._renderedViewLine=u,!0}layoutLine(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(){return this._renderedViewLine?this._renderedViewLine.getWidth():0}getWidthIsFast(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()}needsMonospaceFontCheck(){return!!this._renderedViewLine&&this._renderedViewLine instanceof X}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof X?this._renderedViewLine.monospaceAssumptionsAreValid():K}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof X&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,i){if(!this._renderedViewLine)return null;e|=0,t|=0,e=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,e)),t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t));const n=0|this._renderedViewLine.input.stopRenderingLineAfter;let o=!1;-1!==n&&e>n+1&&t>n+1&&(o=!0),-1!==n&&e>n+1&&(e=n+1),-1!==n&&t>n+1&&(t=n+1);const r=this._renderedViewLine.getVisibleRangesForRange(e,t,i);return r&&r.length>0?new z(o,r):null}getColumnOfNodeOffset(e,t,i){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t,i):1}}Z.CLASS_NAME="view-line";class X{constructor(e,t,i){this.domNode=e,this.input=t,this._characterMapping=i,this._charWidth=t.spaceWidth}getWidth(){return this._getCharPosition(this._characterMapping.length)}getWidthIsFast(){return!0}monospaceAssumptionsAreValid(){if(!this.domNode)return K;const e=this.getWidth(),t=this.domNode.domNode.firstChild.offsetWidth;return Math.abs(e-t)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),K=!1),K}toSlowRenderedLine(){return ee(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,i){const n=this._getCharPosition(e),o=this._getCharPosition(t);return[new P(n,o-n)]}_getCharPosition(e){const t=this._characterMapping.getAbsoluteOffsets();return 0===t.length?0:Math.round(this._charWidth*t[e-1])}getColumnOfNodeOffset(e,t,i){const n=t.textContent.length;let o=-1;for(;t;)t=t.previousSibling,o++;return this._characterMapping.partDataToCharOffset(o,n,i)+1}}class Q{constructor(e,t,i,n,o){if(this.domNode=e,this.input=t,this._characterMapping=i,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=o,this._cachedWidth=-1,this._pixelOffsetCache=null,!n||0===this._characterMapping.length){this._pixelOffsetCache=new Int32Array(Math.max(2,this._characterMapping.length+1));for(let e=0,t=this._characterMapping.length;e<=t;e++)this._pixelOffsetCache[e]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),this._cachedWidth):0}getWidthIsFast(){return-1!==this._cachedWidth}getVisibleRangesForRange(e,t,i){if(!this.domNode)return null;if(null!==this._pixelOffsetCache){const n=this._readPixelOffset(this.domNode,e,i);if(-1===n)return null;const o=this._readPixelOffset(this.domNode,t,i);return-1===o?null:[new P(n,o-n)]}return this._readVisibleRangesForRange(this.domNode,e,t,i)}_readVisibleRangesForRange(e,t,i,n){if(t===i){const i=this._readPixelOffset(e,t,n);return-1===i?null:[new P(i,0)]}return this._readRawVisibleRangesForRange(e,t,i,n)}_readPixelOffset(e,t,i){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth();const t=this._getReadingTarget(e);return t.firstChild?t.firstChild.offsetWidth:0}if(null!==this._pixelOffsetCache){const n=this._pixelOffsetCache[t];if(-1!==n)return n;const o=this._actualReadPixelOffset(e,t,i);return this._pixelOffsetCache[t]=o,o}return this._actualReadPixelOffset(e,t,i)}_actualReadPixelOffset(e,t,i){if(0===this._characterMapping.length){const t=V.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,i.clientRectDeltaLeft,i.endNode);return t&&0!==t.length?t[0].left:-1}if(t===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth();const n=this._characterMapping.charOffsetToPartData(t-1),o=$.fH.getPartIndex(n),r=$.fH.getCharIndex(n),s=V.readHorizontalRanges(this._getReadingTarget(e),o,r,o,r,i.clientRectDeltaLeft,i.endNode);if(!s||0===s.length)return-1;const a=s[0].left;if(this.input.isBasicASCII){const e=this._characterMapping.getAbsoluteOffsets(),i=Math.round(this.input.spaceWidth*e[t-1]);if(Math.abs(i-a)<=1)return i}return a}_readRawVisibleRangesForRange(e,t,i,n){if(1===t&&i===this._characterMapping.length)return[new P(0,this.getWidth())];const o=this._characterMapping.charOffsetToPartData(t-1),r=$.fH.getPartIndex(o),s=$.fH.getCharIndex(o),a=this._characterMapping.charOffsetToPartData(i-1),l=$.fH.getPartIndex(a),c=$.fH.getCharIndex(a);return V.readHorizontalRanges(this._getReadingTarget(e),r,s,l,c,n.clientRectDeltaLeft,n.endNode)}getColumnOfNodeOffset(e,t,i){const n=t.textContent.length;let o=-1;for(;t;)t=t.previousSibling,o++;return this._characterMapping.partDataToCharOffset(o,n,i)+1}}class J extends Q{_readVisibleRangesForRange(e,t,i,n){const o=super._readVisibleRangesForRange(e,t,i,n);if(!o||0===o.length||t===i||1===t&&i===this._characterMapping.length)return o;if(!this.input.containsRTL){const t=this._readPixelOffset(e,i,n);if(-1!==t){const e=o[o.length-1];e.left=4&&3===e[0]&&7===e[3]}static isStrictChildOfViewLines(e){return e.length>4&&3===e[0]&&7===e[3]}static isChildOfScrollableElement(e){return e.length>=2&&3===e[0]&&5===e[1]}static isChildOfMinimap(e){return e.length>=2&&3===e[0]&&8===e[1]}static isChildOfContentWidgets(e){return e.length>=4&&3===e[0]&&1===e[3]}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&2===e[0]}static isChildOfOverlayWidgets(e){return e.length>=2&&3===e[0]&&4===e[1]}}class he{constructor(e,t,i){this.model=e.model;const n=e.configuration.options;this.layoutInfo=n.get(128),this.viewDomNode=t.viewDomNode,this.lineHeight=n.get(56),this.stickyTabStops=n.get(102),this.typicalHalfwidthCharacterWidth=n.get(40).typicalHalfwidthCharacterWidth,this.lastRenderData=i,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return he.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){const i=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(i){const n=i.verticalOffset+i.height/2,o=e.model.getLineCount();let r,s=null,a=null;return i.afterLineNumber!==o&&(a=new ie.L(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(s=new ie.L(i.afterLineNumber,e.model.getLineMaxColumn(i.afterLineNumber))),r=null===a?s:null===s?a:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,pe._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}{constructor(e,t,i,n){super(e,t,i),this._ctx=e,n?(this.target=n,this.targetPath=R.collect(n,e.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\n\ttarget: ${this.target?this.target.outerHTML:null}`}fulfill(e,t=null,i=null,n=null){let o=this.mouseColumn;return t&&t.columnr.contentLeft+r.width)continue;const i=e.getVerticalOffsetForLineNumber(r.position.lineNumber);if(i<=o&&o<=i+r.height)return t.fulfill(6,r.position,null,{mightBeForeignElement:!1})}}return null}static _hitTestViewZone(e,t){const i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){const e=t.isInContentArea?8:5;return t.fulfill(e,i.position,null,i)}return null}static _hitTestTextArea(e,t){return ue.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfill(6,e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1}):t.fulfill(1,e.lastRenderData.lastTextareaPosition):null}static _hitTestMargin(e,t){if(t.isInMarginArea){const i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition();let o=Math.abs(t.pos.x-t.editorPos.x);const r={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:o};return o-=e.layoutInfo.glyphMarginLeft,o<=e.layoutInfo.glyphMarginWidth?t.fulfill(2,n,i.range,r):(o-=e.layoutInfo.glyphMarginWidth,o<=e.layoutInfo.lineNumbersWidth?t.fulfill(3,n,i.range,r):(o-=e.layoutInfo.lineNumbersWidth,t.fulfill(4,n,i.range,r)))}return null}static _hitTestViewLines(e,t,i){if(!ue.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfill(7,new ie.L(1,1),null,ge);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const i=e.model.getLineCount(),n=e.model.getLineMaxColumn(i);return t.fulfill(7,new ie.L(i,n),null,ge)}if(i){if(ue.isStrictChildOfViewLines(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(0===e.model.getLineLength(i)){const n=e.getLineWidth(i),o=fe(t.mouseContentHorizontalOffset-n);return t.fulfill(7,new ie.L(i,1),null,o)}const n=e.getLineWidth(i);if(t.mouseContentHorizontalOffset>=n){const o=fe(t.mouseContentHorizontalOffset-n),r=new ie.L(i,e.model.getLineMaxColumn(i));return t.fulfill(7,r,null,o)}}return t.fulfill(0)}const n=pe._doHitTest(e,t);return 1===n.type?pe.createMouseTargetFromHitTestPosition(e,t,n.spanNode,n.position):this._createMouseTarget(e,t.withTarget(n.hitTarget),!0)}static _hitTestMinimap(e,t){if(ue.isChildOfMinimap(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(i);return t.fulfill(11,new ie.L(i,n))}return null}static _hitTestScrollbarSlider(e,t){if(ue.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){const i=t.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(i);return t.fulfill(11,new ie.L(i,n))}}return null}static _hitTestScrollbar(e,t){if(ue.isChildOfScrollableElement(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(i);return t.fulfill(11,new ie.L(i,n))}return null}getMouseColumn(e,t){const i=this._context.configuration.options,n=i.get(128),o=this._context.viewLayout.getCurrentScrollLeft()+t.x-e.x-n.contentLeft;return pe._getMouseColumn(o,i.get(40).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){return e<0?1:Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,i,n){const o=n.lineNumber,r=n.column,s=e.getLineWidth(o);if(t.mouseContentHorizontalOffset>s){const e=fe(t.mouseContentHorizontalOffset-s);return t.fulfill(7,n,null,e)}const a=e.visibleRangeForPosition(o,r);if(!a)return t.fulfill(0,n);const l=a.left;if(t.mouseContentHorizontalOffset===l)return t.fulfill(6,n,null,{mightBeForeignElement:!1});const c=[];if(c.push({offset:a.left,column:r}),r>1){const t=e.visibleRangeForPosition(o,r-1);t&&c.push({offset:t.left,column:r-1})}if(re.offset-t.offset));const u=t.pos.toClientCoordinates(),h=i.getBoundingClientRect(),d=h.left<=u.clientX&&u.clientX<=h.right;for(let e=1;e=t.editorPos.y+e.layoutInfo.height&&(o=t.editorPos.y+e.layoutInfo.height-1);const r=new x(t.pos.x,o),s=this._actualDoHitTestWithCaretRangeFromPoint(e,r.toClientCoordinates());return 1===s.type?s:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const i=c.Ay(e.viewDomNode);let n;if(n=i?void 0===i.caretRangeFromPoint?function(e,t,i){const n=document.createRange();let o=e.elementFromPoint(t,i);if(null!==o){for(;o&&o.firstChild&&o.firstChild.nodeType!==o.firstChild.TEXT_NODE&&o.lastChild&&o.lastChild.firstChild;)o=o.lastChild;const e=o.getBoundingClientRect(),i=window.getComputedStyle(o,null).getPropertyValue("font"),r=o.innerText;let s,a=e.left,l=0;if(t>e.left+e.width)l=r.length;else{const e=me.getInstance();for(let n=0;nthis._createMouseTarget(e,t)),(e=>this._getMouseColumn(e)))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(128).height;const n=new E(this.viewHelper.viewDomNode);this._register(n.onContextMenu(this.viewHelper.viewDomNode,(e=>this._onContextMenu(e,!0)))),this._register(n.onMouseMoveThrottled(this.viewHelper.viewDomNode,(e=>this._onMouseMove(e)),ve(this.mouseTargetFactory),be.MOUSE_MOVE_MINIMUM_TIME)),this._register(n.onMouseUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onMouseLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e)))),this._register(n.onMouseDown(this.viewHelper.viewDomNode,(e=>this._onMouseDown(e)))),this._register(c.nm(this.viewHelper.viewDomNode,c.tw.MOUSE_WHEEL,(e=>{if(this.viewController.emitMouseWheel(e),!this._context.configuration.options.get(65))return;const t=new w.q(e);if(b.dz?(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey:e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey){const e=_e.C.getZoomLevel(),i=t.deltaY>0?1:-1;_e.C.setZoomLevel(e+i),t.preventDefault(),t.stopPropagation()}}),{capture:!0,passive:!1})),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(128)){const e=this._context.configuration.options.get(128).height;this._height!==e&&(this._height=e,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}onScrollChanged(e){return this._mouseDownOperation.onScrollChanged(),!1}getTargetAtClientPoint(e,t){const i=new k(e,t).toPageCoordinates(),n=L(this.viewHelper.viewDomNode);return i.yn.y+n.height||i.xn.x+n.width?null:this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),n,i,null)}_createMouseTarget(e,t){return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,t?e.target:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.editorPos,e.pos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){this._mouseDownOperation.isActive()||e.timestamp{e.preventDefault(),this.viewHelper.focusTextArea()};if(l&&(i||o&&r))c(),this._mouseDownOperation.start(t.type,e);else if(n)e.preventDefault();else if(s){const i=t.detail;this.viewHelper.shouldSuppressMouseDownOnViewZone(i.viewZoneId)&&(c(),this._mouseDownOperation.start(t.type,e),e.preventDefault())}else a&&this.viewHelper.shouldSuppressMouseDownOnWidget(t.detail)&&(c(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:t})}}be.MOUSE_MOVE_MINIMUM_TIME=100;class ye extends d.JT{constructor(e,t,i,n,o){super(),this._context=e,this._viewController=t,this._viewHelper=i,this._createMouseTarget=n,this._getMouseColumn=o,this._mouseMoveMonitor=this._register(new M(this._viewHelper.viewDomNode)),this._onScrollTimeout=this._register(new C._F),this._mouseState=new we,this._currentSelection=new _.Y(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);const t=this._findMousePosition(e,!0);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):this._dispatchMouse(t,!0))}start(e,t){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(3===e),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const i=this._findMousePosition(t,!0);if(!i||!i.position)return;this._mouseState.trySetCount(t.detail,i.position),t.detail=this._mouseState.count;const n=this._context.configuration.options;if(!n.get(78)&&n.get(29)&&!n.get(16)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&6===i.type&&i.position&&this._currentSelection.containsPosition(i.position))return this._mouseState.isDragAndDrop=!0,this._isActive=!0,void this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,ve(null),(e=>this._onMouseDownThenMove(e)),(e=>{const t=this._findMousePosition(this._lastMouseEvent,!0);e&&e instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:t?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()}));this._mouseState.isDragAndDrop=!1,this._dispatchMouse(i,t.shiftKey),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,ve(null),(e=>this._onMouseDownThenMove(e)),(()=>this._stop())))}_stop(){this._isActive=!1,this._onScrollTimeout.cancel()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onScrollChanged(){this._isActive&&this._onScrollTimeout.setIfNotSet((()=>{if(!this._lastMouseEvent)return;const e=this._findMousePosition(this._lastMouseEvent,!1);e&&(this._mouseState.isDragAndDrop||this._dispatchMouse(e,!0))}),10)}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const t=e.editorPos,i=this._context.model,n=this._context.viewLayout,o=this._getMouseColumn(e);if(e.posyt.y+t.height){const r=n.getCurrentScrollTop()+(e.posy-t.y),s=he.getZoneAtCoord(this._context,r);if(s){const e=this._helpPositionJumpOverViewZone(s);if(e)return new ce(null,13,o,e)}const a=n.getLineNumberAtVerticalOffset(r);return new ce(null,13,o,new ie.L(a,i.getLineMaxColumn(a)))}const r=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+(e.posy-t.y));return e.posxt.x+t.width?new ce(null,13,o,new ie.L(r,i.getLineMaxColumn(r))):null}_findMousePosition(e,t){const i=this._getPositionOutsideEditor(e);if(i)return i;const n=this._createMouseTarget(e,t);if(!n.position)return null;if(8===n.type||5===n.type){const e=this._helpPositionJumpOverViewZone(n.detail);if(e)return new ce(n.element,n.type,n.mouseColumn,e,null,n.detail)}return n}_helpPositionJumpOverViewZone(e){const t=new ie.L(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,n=e.positionAfter;return i&&n?i.isBefore(t)?i:n:null}_dispatchMouse(e,t){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton})}}class we{constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){const i=(new Date).getTime();i-this._lastSetMouseDownCountTime>we.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=i,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}we.CLEAR_MOUSE_DOWN_COUNT_TIME=400;var Ce=i(161),Se=i(5715);class xe extends be{constructor(e,t,i){super(e,t,i),this._register(y.o.addTarget(this.viewHelper.linesContentDomNode)),this._register(c.nm(this.viewHelper.linesContentDomNode,y.t.Tap,(e=>this.onTap(e)))),this._register(c.nm(this.viewHelper.linesContentDomNode,y.t.Change,(e=>this.onChange(e)))),this._register(c.nm(this.viewHelper.linesContentDomNode,y.t.Contextmenu,(e=>this._onContextMenu(new N(e,this.viewHelper.viewDomNode),!1)))),this._lastPointerType="mouse",this._register(c.nm(this.viewHelper.linesContentDomNode,"pointerdown",(e=>{const t=e.pointerType;this._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"})));const n=new A(this.viewHelper.viewDomNode);this._register(n.onPointerMoveThrottled(this.viewHelper.viewDomNode,(e=>this._onMouseMove(e)),ve(this.mouseTargetFactory),be.MOUSE_MOVE_MINIMUM_TIME)),this._register(n.onPointerUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e)))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,(e=>this._onMouseDown(e))))}onTap(e){if(!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget))return;e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new N(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1})}onChange(e){"touch"===this._lastPointerType&&this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}_onMouseDown(e){"touch"!==e.browserEvent.pointerType&&super._onMouseDown(e)}}class ke extends be{constructor(e,t,i){super(e,t,i),this._register(y.o.addTarget(this.viewHelper.linesContentDomNode)),this._register(c.nm(this.viewHelper.linesContentDomNode,y.t.Tap,(e=>this.onTap(e)))),this._register(c.nm(this.viewHelper.linesContentDomNode,y.t.Change,(e=>this.onChange(e)))),this._register(c.nm(this.viewHelper.linesContentDomNode,y.t.Contextmenu,(e=>this._onContextMenu(new N(e,this.viewHelper.viewDomNode),!1))))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new N(e,this.viewHelper.viewDomNode),!1);if(t.position){const e=document.createEvent("CustomEvent");e.initEvent(Se.pd.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(e),this.viewController.moveTo(t.position)}}onChange(e){this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}}class De extends d.JT{constructor(e,t,i){super(),b.gn&&Ce.D.pointerEvents?this.handler=this._register(new xe(e,t,i)):window.TouchEvent?this.handler=this._register(new ke(e,t,i)):this.handler=this._register(new be(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}var Le=i(7295),Ne=i(5887);class Ee extends I{}var Ae=i(7869),Me=i(7781);class Ie extends Ee{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new ie.L(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(56);const t=e.get(57);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(82);const i=e.get(128);this._lineNumbersLeft=i.lineNumbersLeft,this._lineNumbersWidth=i.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(t);let i=!1;return this._activeLineNumber!==t.lineNumber&&(this._activeLineNumber=t.lineNumber,i=!0),2!==this._renderLineNumbers&&3!==this._renderLineNumbers||(i=!0),i}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getLineRenderLineNumber(e){const t=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new ie.L(e,1));if(1!==t.column)return"";const i=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(2===this._renderLineNumbers){const e=Math.abs(this._lastCursorModelPosition.lineNumber-i);return 0===e?''+i+"":String(e)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===i||i%10==0?String(i):"":String(i)}prepareRender(e){if(0===this._renderLineNumbers)return void(this._renderResult=null);const t=b.IJ?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,o='
    ',r=this._context.model.getLineCount(),s=[];for(let e=i;e<=n;e++){const n=e-i;if(!this._renderFinalNewline&&e===r&&0===this._context.model.getLineLength(e)){s[n]="";continue}const a=this._getLineRenderLineNumber(e);a?e===this._activeLineNumber?s[n]='
    '+a+"
    ":s[n]=o+a+"
    ":s[n]=""}this._renderResult=s}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}Ie.CLASS_NAME="line-numbers",(0,Me.Ic)(((e,t)=>{const i=e.getColor(Ae.hw);i&&t.addRule(`.monaco-editor .line-numbers { color: ${i}; }`);const n=e.getColor(Ae.DD);n&&t.addRule(`.monaco-editor .line-numbers.active-line-number { color: ${n}; }`)}));class Te extends T{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(128);this._canUseLayerHinting=!t.get(26),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._domNode=(0,v.X)(document.createElement("div")),this._domNode.setClassName(Te.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=(0,v.X)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(Te.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(128);return this._canUseLayerHinting=!t.get(26),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);const i=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(i),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(i)}}Te.CLASS_NAME="glyph-margin",Te.OUTER_CLASS_NAME="margin";var Re=i(9410),Oe=i(6542);class Fe{constructor(e,t,i){this.top=e,this.left=t,this.width=i}setWidth(e){return new Fe(this.top,this.left,e)}}const Pe=m.vU;class Be extends T{constructor(e,t,i){super(e),this._primaryCursorPosition=new ie.L(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._viewHelper=i,this._scrollLeft=0,this._scrollTop=0;const n=this._context.configuration.options,o=n.get(128);this._setAccessibilityOptions(n),this._contentLeft=o.contentLeft,this._contentWidth=o.contentWidth,this._contentHeight=o.height,this._fontInfo=n.get(40),this._lineHeight=n.get(56),this._emptySelectionClipboard=n.get(30),this._copyWithSyntaxHighlighting=n.get(19),this._visibleTextArea=null,this._selections=[new _.Y(1,1,1,1)],this._modelSelections=[new _.Y(1,1,1,1)],this._lastRenderPosition=null,this.textArea=(0,v.X)(document.createElement("textarea")),R.write(this.textArea,6),this.textArea.setClassName(`inputarea ${Oe.S}`),this.textArea.setAttribute("wrap","off"),this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(n)),this.textArea.setAttribute("tabindex",String(n.get(110))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",l.N("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),n.get(28)&&n.get(78)&&this.textArea.setAttribute("readonly","true"),this.textAreaCover=(0,v.X)(document.createElement("div")),this.textAreaCover.setPosition("absolute");const r={getLineCount:()=>this._context.model.getLineCount(),getLineMaxColumn:e=>this._context.model.getLineMaxColumn(e),getValueInRange:(e,t)=>this._context.model.getValueInRange(e,t)},s={getDataToCopy:e=>{const t=this._context.model.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,b.ED),i=this._context.model.getEOL(),n=this._emptySelectionClipboard&&1===this._modelSelections.length&&this._modelSelections[0].isEmpty(),o=Array.isArray(t)?t:null,r=Array.isArray(t)?t.join(i):t;let s,a=null;if(e&&(Se.RA.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&r.length<65536)){const e=this._context.model.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);e&&(s=e.html,a=e.mode)}return{isFromEmptySelection:n,multicursorText:o,text:r,html:s,mode:a}},getScreenReaderContent:e=>{if(1===this._accessibilitySupport){if(b.dz){const e=this._selections[0];if(e.isEmpty()){const t=e.getStartPosition();let i=this._getWordBeforePosition(t);if(0===i.length&&(i=this._getCharacterBeforePosition(t)),i.length>0)return new Ne.un(i,i.length,i.length,t,t)}}return Ne.un.EMPTY}if(m.Dt){const e=this._selections[0];if(e.isEmpty()){const t=e.getStartPosition(),[i,n]=this._getAndroidWordAtPosition(t);if(i.length>0)return new Ne.un(i,n,n,t,t)}return Ne.un.EMPTY}return Ne.ee.fromEditorSelection(e,r,this._selections[0],this._accessibilityPageSize,0===this._accessibilitySupport)},deduceModelPosition:(e,t,i)=>this._context.model.deduceModelPositionRelativeToViewPosition(e,t,i)};this._textAreaInput=this._register(new Se.Fz(s,this.textArea)),this._register(this._textAreaInput.onKeyDown((e=>{this._viewController.emitKeyDown(e)}))),this._register(this._textAreaInput.onKeyUp((e=>{this._viewController.emitKeyUp(e)}))),this._register(this._textAreaInput.onPaste((e=>{let t=!1,i=null,n=null;e.metadata&&(t=this._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection,i=void 0!==e.metadata.multicursorText?e.metadata.multicursorText:null,n=e.metadata.mode),this._viewController.paste(e.text,t,i,n)}))),this._register(this._textAreaInput.onCut((()=>{this._viewController.cut()}))),this._register(this._textAreaInput.onType((e=>{e.replacePrevCharCnt||e.replaceNextCharCnt||e.positionDelta?(Ne.al&&console.log(` => compositionType: <<${e.text}>>, ${e.replacePrevCharCnt}, ${e.replaceNextCharCnt}, ${e.positionDelta}`),this._viewController.compositionType(e.text,e.replacePrevCharCnt,e.replaceNextCharCnt,e.positionDelta)):(Ne.al&&console.log(` => type: <<${e.text}>>`),this._viewController.type(e.text))}))),this._register(this._textAreaInput.onSelectionChangeRequest((e=>{this._viewController.setSelection(e)}))),this._register(this._textAreaInput.onCompositionStart((e=>{const t=this._selections[0].startLineNumber,i=this._selections[0].startColumn+e.revealDeltaColumns;this._context.model.revealRange("keyboard",!0,new ne.e(t,i,t,i),0,1);const n=this._viewHelper.visibleRangeForPositionRelativeToEditor(t,i);n&&(this._visibleTextArea=new Fe(this._context.viewLayout.getVerticalOffsetForLineNumber(t),n.left,Pe?0:1),this._render()),this.textArea.setClassName(`inputarea ${Oe.S} ime-input`),this._viewController.compositionStart(),this._context.model.onCompositionStart()}))),this._register(this._textAreaInput.onCompositionUpdate((e=>{this._visibleTextArea&&(this._visibleTextArea=this._visibleTextArea.setWidth(function(e,t){const i=document.createElement("canvas").getContext("2d");var n;i.font=("normal",`normal normal ${(n=t).fontWeight} ${n.fontSize}px / ${n.lineHeight}px ${n.fontFamily}`);const o=i.measureText(e);return m.vU?o.width+2:o.width}(e.data,this._fontInfo)),this._render())}))),this._register(this._textAreaInput.onCompositionEnd((()=>{this._visibleTextArea=null,this._render(),this.textArea.setClassName(`inputarea ${Oe.S}`),this._viewController.compositionEnd(),this._context.model.onCompositionEnd()}))),this._register(this._textAreaInput.onFocus((()=>{this._context.model.setHasFocus(!0)}))),this._register(this._textAreaInput.onBlur((()=>{this._context.model.setHasFocus(!1)})))}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t=this._context.model.getLineContent(e.lineNumber),i=(0,Re.u)('`~!@#$%^&*()-=+[{]}\\|;:",.<>/?');let n=!0,o=e.column,r=!0,s=e.column,a=0;for(;a<50&&(n||r);){if(n&&o<=1&&(n=!1),n){const e=t.charCodeAt(o-2);0!==i.get(e)?n=!1:o--}if(r&&s>t.length&&(r=!1),r){const e=t.charCodeAt(s-1);0!==i.get(e)?r=!1:s++}a++}return[t.substring(o-1,s-1),e.column-o]}_getWordBeforePosition(e){const t=this._context.model.getLineContent(e.lineNumber),i=(0,Re.u)(this._context.configuration.options.get(114));let n=e.column,o=0;for(;n>1;){const r=t.charCodeAt(n-2);if(0!==i.get(r)||o>50)return t.substring(n-1,e.column-1);o++,n--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const t=this._context.model.getLineContent(e.lineNumber).charAt(e.column-2);if(!Le.ZG(t.charCodeAt(0)))return t}return""}_getAriaLabel(e){return 1===e.get(2)?l.N("accessibilityOffAriaLabel","The editor is not accessible at this time. Press {0} for options.",b.IJ?"Shift+Alt+F1":"Alt+F1"):e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);2===this._accessibilitySupport&&t===j.BH.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(128);return this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(40),this._lineHeight=t.get(56),this._emptySelectionClipboard=t.get(30),this._copyWithSyntaxHighlighting=t.get(19),this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("tabindex",String(t.get(110))),(e.hasChanged(28)||e.hasChanged(78))&&(t.get(28)&&t.get(78)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),e.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}prepareRender(e){this._primaryCursorPosition=new ie.L(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition)}render(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){if(this._visibleTextArea)return void this._renderInsideEditor(null,this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight);if(!this._primaryCursorVisibleRange)return void this._renderAtTopLeft();const e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth)return void this._renderAtTopLeft();const t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;t<0||t>this._contentHeight?this._renderAtTopLeft():b.dz?this._renderInsideEditor(this._primaryCursorPosition,t,e,Pe?0:1,this._lineHeight):this._renderInsideEditor(this._primaryCursorPosition,t,e,Pe?0:1,Pe?0:1)}_renderInsideEditor(e,t,i,n,o){this._lastRenderPosition=e;const r=this.textArea,s=this.textAreaCover;f.V.applyFontInfo(r,this._fontInfo),r.setTop(t),r.setLeft(i),r.setWidth(n),r.setHeight(o),s.setTop(0),s.setLeft(0),s.setWidth(0),s.setHeight(0)}_renderAtTopLeft(){this._lastRenderPosition=null;const e=this.textArea,t=this.textAreaCover;if(f.V.applyFontInfo(e,this._fontInfo),e.setTop(0),e.setLeft(0),t.setTop(0),t.setLeft(0),Pe)return e.setWidth(0),e.setHeight(0),t.setWidth(0),void t.setHeight(0);e.setWidth(1),e.setHeight(1),t.setWidth(1),t.setHeight(1);const i=this._context.configuration.options;i.get(46)?t.setClassName("monaco-editor-background textAreaCover "+Te.OUTER_CLASS_NAME):0!==i.get(57).renderType?t.setClassName("monaco-editor-background textAreaCover "+Ie.CLASS_NAME):t.setClassName("monaco-editor-background textAreaCover")}}var ze=i(8728);class We{constructor(e,t,i,n){this.configuration=e,this.viewModel=t,this.userInputEvents=i,this.commandDelegate=n}paste(e,t,i,n){this.commandDelegate.paste(e,t,i,n)}type(e){this.commandDelegate.type(e)}compositionType(e,t,i,n){this.commandDelegate.compositionType(e,t,i,n)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){ze.CoreNavigationCommands.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column=4?this._selectAll():3===e.mouseDownCount?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position):this._lastCursorLineSelect(e.position):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):2===e.mouseDownCount?this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position):e.inSelectionMode?this._wordSelectDrag(e.position):this._wordSelect(e.position):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey||n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position):this.moveTo(e.position)}_usualArgs(e){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e}}moveTo(e){ze.CoreNavigationCommands.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_moveToSelect(e){ze.CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_columnSelect(e,t,i){e=this._validateViewColumn(e),ze.CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),ze.CoreNavigationCommands.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e){ze.CoreNavigationCommands.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelect(e){ze.CoreNavigationCommands.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelectDrag(e){ze.CoreNavigationCommands.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorWordSelect(e){ze.CoreNavigationCommands.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelect(e){ze.CoreNavigationCommands.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelectDrag(e){ze.CoreNavigationCommands.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelect(e){ze.CoreNavigationCommands.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelectDrag(e){ze.CoreNavigationCommands.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_selectAll(){ze.CoreNavigationCommands.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}class Ve{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){this.onKeyDown&&this.onKeyDown(e)}emitKeyUp(e){this.onKeyUp&&this.onKeyUp(e)}emitContextMenu(e){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(e))}emitMouseMove(e){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(e))}emitMouseDown(e){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(e))}emitMouseUp(e){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){this.onMouseDropCanceled&&this.onMouseDropCanceled()}emitMouseWheel(e){this.onMouseWheel&&this.onMouseWheel(e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return Ve.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){return new He(e.element,e.type,e.mouseColumn,e.position?t.convertViewPositionToModelPosition(e.position):null,e.range?t.convertViewRangeToModelRange(e.range):null,e.detail)}}class He{constructor(e,t,i,n,o,r){this.element=e,this.type=t,this.mouseColumn=i,this.position=n,this.range=o,this.detail=r}toString(){return ce.toString(this)}}var $e,Ue=i(72);class je{constructor(e){this._createLine=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(0===this.getCount())return null;const i=this.getStartLineNumber(),n=this.getEndLineNumber();if(tn)return null;let o=0,r=0;for(let s=i;s<=n;s++){const i=s-this._rendLineNumberStart;e<=s&&s<=t&&(0===r?(o=i,r=1):r++)}if(e=i&&r<=n&&(this._lines[r-this._rendLineNumberStart].onContentChanged(),o=!0);return o}onLinesInserted(e,t){if(0===this.getCount())return null;const i=t-e+1,n=this.getStartLineNumber(),o=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=i,null;if(e>o)return null;if(i+e>o)return this._lines.splice(e-this._rendLineNumberStart,o-e+1);const r=[];for(let e=0;ei)continue;const s=Math.max(t,r.fromLineNumber),a=Math.min(i,r.toLineNumber);for(let e=s;e<=a;e++){const t=e-this._rendLineNumberStart;this._lines[t].onTokensChanged(),n=!0}}return n}}class qe{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new je((()=>this._host.createVisibleLine()))}_createDomNode(){const e=(0,v.X)(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(128)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let e=0,i=t.length;et){const e=t,r=Math.min(i,o.rendLineNumberStart-1);e<=r&&(this._insertLinesBefore(o,e,r,n,t),o.linesLength+=r-e+1)}else if(o.rendLineNumberStart0&&(this._removeLinesBefore(o,e),o.linesLength-=e)}if(o.rendLineNumberStart=t,o.rendLineNumberStart+o.linesLength-1i){const e=Math.max(0,i-o.rendLineNumberStart+1),t=o.linesLength-1-e+1;t>0&&(this._removeLinesAfter(o,t),o.linesLength-=t)}return this._finishRendering(o,!1,n),o}_renderUntouchedLines(e,t,i,n,o){const r=e.rendLineNumberStart,s=e.lines;for(let e=t;e<=i;e++){const t=r+e;s[e].layoutLine(t,n[t-o])}}_insertLinesBefore(e,t,i,n,o){const r=[];let s=0;for(let e=t;e<=i;e++)r[s++]=this.host.createVisibleLine();e.lines=r.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i=0;t--){const i=e.lines[t];n[t]&&(i.setDomNode(r),r=r.previousSibling)}}_finishRenderingInvalidLines(e,t,i){const n=document.createElement("div");Ke._ttPolicy&&(t=Ke._ttPolicy.createHTML(t)),n.innerHTML=t;for(let t=0;te}),Ke._sb=(0,Ue.l$)(1e5);class Ge extends T{constructor(e){super(e),this._visibleLines=new qe(this),this.domNode=this._visibleLines.domNode,this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;ee.shouldRender()));for(let i=0,n=t.length;i'),n.appendASCIIString(o),n.appendASCIIString(""),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}class Ze extends Ge{constructor(e){super(e);const t=this._context.configuration.options.get(128);this._contentWidth=t.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const t=this._context.configuration.options.get(128);return this._contentWidth=t.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class Xe extends Ge{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(128);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),f.V.applyFontInfo(this.domNode,t.get(40))}onConfigurationChanged(e){const t=this._context.configuration.options;f.V.applyFontInfo(this.domNode,t.get(40));const i=t.get(128);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class Qe{constructor(e,t){this.top=e,this.left=t}}class Je extends T{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=(0,v.X)(document.createElement("div")),R.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=(0,v.X)(document.createElement("div")),R.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onLineMappingChanged(e);return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}addWidget(e){const t=new et(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,i){this._widgets[e.getId()].setPosition(t,i),this.setShouldRender()}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t];delete this._widgets[t];const i=e.domNode.domNode;i.parentNode.removeChild(i),i.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return!!this._widgets.hasOwnProperty(e)&&this._widgets[e].suppressMouseDown}onBeforeRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onBeforeRender(e)}prepareRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].prepareRender(e)}render(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].render(e)}}class et{constructor(e,t,i){this._context=e,this._viewDomNode=t,this._actual=i,this.domNode=(0,v.X)(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const n=this._context.configuration.options,o=n.get(128);this._fixedOverflowWidgets=n.get(34),this._contentWidth=o.contentWidth,this._contentLeft=o.contentLeft,this._lineHeight=n.get(56),this._range=null,this._viewRange=null,this._preference=[],this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){const t=this._context.configuration.options;if(this._lineHeight=t.get(56),e.hasChanged(128)){const e=t.get(128);this._contentLeft=e.contentLeft,this._contentWidth=e.contentWidth,this._maxWidth=this._getMaxWidth()}}onLineMappingChanged(e){this._setPosition(this._range)}_setPosition(e){if(this._range=e,this._viewRange=null,this._range){const e=this._context.model.validateModelRange(this._range);(this._context.model.coordinatesConverter.modelPositionIsVisible(e.getStartPosition())||this._context.model.coordinatesConverter.modelPositionIsVisible(e.getEndPosition()))&&(this._viewRange=this._context.model.coordinatesConverter.convertModelRangeToViewRange(e))}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth:this._contentWidth}setPosition(e,t){this._setPosition(e),this._preference=t,this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1}_layoutBoxInViewport(e,t,i,n,o){const r=e.top,s=r,a=t.top+this._lineHeight,l=r-n,c=s>=n,u=a,h=o.viewportHeight-a>=n;let d=e.left,g=t.left;return d+i>o.scrollLeft+o.viewportWidth&&(d=o.scrollLeft+o.viewportWidth-i),g+i>o.scrollLeft+o.viewportWidth&&(g=o.scrollLeft+o.viewportWidth-i),dr){const e=s-(r-n);s-=e,i-=e}if(s=22,_=u+n<=h.height-22;return this._fixedOverflowWidgets?{fitsAbove:m,aboveTop:Math.max(l,22),aboveLeft:g,fitsBelow:_,belowTop:u,belowLeft:p}:{fitsAbove:m,aboveTop:r,aboveLeft:d,fitsBelow:_,belowTop:s,belowLeft:f}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new Qe(e.top,e.left+this._contentLeft)}_getTopAndBottomLeft(e){if(!this._viewRange)return[null,null];const t=e.linesVisibleRangesForRange(this._viewRange,!1);if(!t||0===t.length)return[null,null];let i=t[0],n=t[0];for(const e of t)e.lineNumbern.lineNumber&&(n=e);let o=1073741824;for(const e of i.ranges)e.lefte.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData)return this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),void("function"==typeof this._actual.afterRender&&tt(this._actual.afterRender,this._actual,null));this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),"function"==typeof this._actual.afterRender&&tt(this._actual.afterRender,this._actual,this._renderData.position)}}function tt(e,t,...i){try{return e.call(t,...i)}catch(e){return null}}var it=i(9488);let nt=!0;class ot extends Ee{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(128);this._lineHeight=t.get(56),this._renderLineHighlight=t.get(83),this._renderLineHighlightOnlyWhenFocus=t.get(84),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new _.Y(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=nt?this._selections.slice(0,1):this._selections,i=t.map((e=>e.positionLineNumber));i.sort(((e,t)=>e-t)),it.fS(this._cursorLineNumbers,i)||(this._cursorLineNumbers=i,e=!0);const n=t.every((e=>e.isEmpty()));return this._selectionIsEmpty!==n&&(this._selectionIsEmpty=n,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(128);return this._lineHeight=t.get(56),this._renderLineHighlight=t.get(83),this._renderLineHighlightOnlyWhenFocus=t.get(84),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return!!this._renderLineHighlightOnlyWhenFocus&&(this._focused=e.isFocused,!0)}prepareRender(e){if(!this._shouldRenderThis())return void(this._renderData=null);const t=this._renderOne(e),i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,o=this._cursorLineNumbers.length;let r=0;const s=[];for(let e=i;e<=n;e++){const n=e-i;for(;r=this._renderData.length?"":this._renderData[i]}}class rt extends ot{_renderOne(e){return`
    `}_shouldRenderThis(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderOther(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class st extends ot{_renderOne(e){return`
    `}_shouldRenderMargin(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderThis(){return!0}_shouldRenderOther(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}(0,Me.Ic)(((e,t)=>{nt=!1;const i=e.getColor(Ae.Kh);if(i&&(t.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }`)),!i||i.isTransparent()||e.defines(Ae.Mm)){const i=e.getColor(Ae.Mm);i&&(nt=!0,t.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${i}; }`),"hc"===e.type&&(t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}}));class at extends Ee{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(56),this._typicalHalfwidthCharacterWidth=t.get(40).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(56),this._typicalHalfwidthCharacterWidth=t.get(40).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let e=0,o=t.length;e{if(e.options.zIndext.options.zIndex)return 1;const i=e.options.className,n=t.options.className;return in?1:ne.e.compareRangesUsingStarts(e.range,t.range)}));const o=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber,s=[];for(let e=o;e<=r;e++)s[e-o]="";this._renderWholeLineDecorations(e,i,s),this._renderNormalDecorations(e,i,s),this._renderResult=s}_renderWholeLineDecorations(e,t,i){const n=String(this._lineHeight),o=e.visibleRange.startLineNumber,r=e.visibleRange.endLineNumber;for(let e=0,s=t.length;e',l=Math.max(s.range.startLineNumber,o),c=Math.min(s.range.endLineNumber,r);for(let e=l;e<=c;e++)i[e-o]+=a}}_renderNormalDecorations(e,t,i){const n=String(this._lineHeight),o=e.visibleRange.startLineNumber;let r=null,s=!1,a=null;for(let l=0,c=t.length;l';s[l]+=r}}}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}var lt=i(9802);class ct extends T{constructor(e,t,i,n){super(e);const o=this._context.configuration.options,r=o.get(90),s=o.get(64),a=o.get(32),l=o.get(93),u={listenOnDomNode:i.domNode,className:"editor-scrollable "+(0,Me.m6)(e.theme.type),useShadows:!1,lazyRender:!0,vertical:r.vertical,horizontal:r.horizontal,verticalHasArrows:r.verticalHasArrows,horizontalHasArrows:r.horizontalHasArrows,verticalScrollbarSize:r.verticalScrollbarSize,verticalSliderSize:r.verticalSliderSize,horizontalScrollbarSize:r.horizontalScrollbarSize,horizontalSliderSize:r.horizontalSliderSize,handleMouseWheel:r.handleMouseWheel,alwaysConsumeMouseWheel:r.alwaysConsumeMouseWheel,arrowSize:r.arrowSize,mouseWheelScrollSensitivity:s,fastScrollSensitivity:a,scrollPredominantAxis:l,scrollByPage:r.scrollByPage};this.scrollbar=this._register(new lt.$Z(t.domNode,u,this._context.viewLayout.getScrollable())),R.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=(0,v.X)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const h=(e,t,i)=>{const n={};if(t){const t=e.scrollTop;t&&(n.scrollTop=this._context.viewLayout.getCurrentScrollTop()+t,e.scrollTop=0)}if(i){const t=e.scrollLeft;t&&(n.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+t,e.scrollLeft=0)}this._context.model.setScrollPosition(n,1)};this._register(c.nm(i.domNode,"scroll",(e=>h(i.domNode,!0,!0)))),this._register(c.nm(t.domNode,"scroll",(e=>h(t.domNode,!0,!1)))),this._register(c.nm(n.domNode,"scroll",(e=>h(n.domNode,!0,!1)))),this._register(c.nm(this.scrollbarDomNode.domNode,"scroll",(e=>h(this.scrollbarDomNode.domNode,!0,!1))))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(128);this.scrollbarDomNode.setLeft(t.contentLeft),"right"===e.get(62).side?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarMouseDown(e){this.scrollbar.delegateVerticalScrollbarMouseDown(e)}onConfigurationChanged(e){if(e.hasChanged(90)||e.hasChanged(64)||e.hasChanged(32)){const e=this._context.configuration.options,t=e.get(90),i=e.get(64),n=e.get(32),o=e.get(93),r={handleMouseWheel:t.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:n,scrollPredominantAxis:o};this.scrollbar.updateOptions(r)}return e.hasChanged(128)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+(0,Me.m6)(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}class ut{constructor(e,t,i){this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(i)}}class ht extends Ee{_render(e,t,i){const n=[];for(let i=e;i<=t;i++)n[i-e]=[];if(0===i.length)return n;i.sort(((e,t)=>e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className',s=[];for(let e=t;e<=i;e++){const i=e-t,o=n[i];0===o.length?s[i]="":s[i]='
    =this._renderResult.length?"":this._renderResult[i]}}class gt extends Ee{constructor(e){super(),this._context=e,this._primaryLineNumber=0;const t=this._context.configuration.options,i=t.get(129),n=t.get(40);this._lineHeight=t.get(56),this._spaceWidth=n.spaceWidth,this._enabled=t.get(81),this._activeIndentEnabled=t.get(49),this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(129),n=t.get(40);return this._lineHeight=t.get(56),this._spaceWidth=n.spaceWidth,this._enabled=t.get(81),this._activeIndentEnabled=t.get(49),this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){const t=e.selections[0],i=t.isEmpty()?t.positionLineNumber:0;return this._primaryLineNumber!==i&&(this._primaryLineNumber=i,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){if(!this._enabled)return void(this._renderResult=null);const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,{indentSize:n}=this._context.model.getTextModelOptions(),o=n*this._spaceWidth,r=e.scrollWidth,s=this._lineHeight,a=this._context.model.getLinesIndentGuides(t,i);let l=0,c=0,u=0;if(this._activeIndentEnabled&&this._primaryLineNumber){const e=this._context.model.getActiveIndentGuide(this._primaryLineNumber,t,i);l=e.startLineNumber,c=e.endLineNumber,u=e.indent}const h=[];for(let n=t;n<=i;n++){const i=l<=n&&n<=c,d=n-t,g=a[d];let f="";if(g>=1){const t=e.visibleRangeForPosition(new ie.L(n,1));let a=t?t.left:0;for(let e=1;e<=g&&(f+=`
    `,a+=o,!(a>r||this._maxIndentLeft>0&&a>this._maxIndentLeft));e++);}h[d]=f}this._renderResult=h}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}(0,Me.Ic)(((e,t)=>{const i=e.getColor(Ae.tR);i&&t.addRule(`.monaco-editor .lines-content .cigr { box-shadow: 1px 0 0 0 ${i} inset; }`);const n=e.getColor(Ae.Ym)||i;n&&t.addRule(`.monaco-editor .lines-content .cigra { box-shadow: 1px 0 0 0 ${n} inset; }`)}));class ft{constructor(){this._currentVisibleRange=new ne.e(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class pt{constructor(e,t,i,n,o,r){this.lineNumber=e,this.startColumn=t,this.endColumn=i,this.startScrollTop=n,this.stopScrollTop=o,this.scrollType=r,this.type="range",this.minLineNumber=e,this.maxLineNumber=e}}class mt{constructor(e,t,i,n){this.selections=e,this.startScrollTop=t,this.stopScrollTop=i,this.scrollType=n,this.type="selections";let o=e[0].startLineNumber,r=e[0].endLineNumber;for(let t=1,i=e.length;t{this._updateLineWidthsSlow()}),200),this._asyncCheckMonospaceFontAssumptions=new C.pY((()=>{this._checkMonospaceFontAssumptions()}),2e3),this._lastRenderedData=new ft,this._horizontalRevealRequest=null}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new Z(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(129)&&(this._maxLineWidth=0);const t=this._context.configuration.options,i=t.get(40),n=t.get(129);return this._lineHeight=t.get(56),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(87),this._cursorSurroundingLines=t.get(23),this._cursorSurroundingLinesStyle=t.get(24),this._canUseLayerHinting=!t.get(26),f.V.applyFontInfo(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(128)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new Y(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const e=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let t=e;t<=i;t++)this._visibleLines.getVisibleLine(t).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=!1;for(let e=t;e<=i;e++)n=this._visibleLines.getVisibleLine(e).onSelectionChanged()||n;return n}onDecorationsChanged(e){{const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.range,e.selections,e.verticalType);if(-1===t)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new pt(e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new mt(e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const n=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.model.setScrollPosition(i,n),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),i=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopi)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.model.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const i=this._getViewLineDomNode(e);if(null===i)return null;const n=this._getLineNumberFor(i);if(-1===n)return null;if(n<1||n>this._context.model.getLineCount())return null;if(1===this._context.model.getLineMaxColumn(n))return new ie.L(n,1);const o=this._visibleLines.getStartLineNumber(),r=this._visibleLines.getEndLineNumber();if(nr)return null;let s=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(n,e,t);const a=this._context.model.getLineMinColumn(n);return si?-1:this._visibleLines.getVisibleLine(e).getWidth()}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const i=e.endLineNumber,n=ne.e.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;let o=[],r=0;const s=new G(this.domNode.domNode,this._textRangeRestingSpot);let a=0;t&&(a=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new ie.L(n.startLineNumber,1)).lineNumber);const l=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let e=n.startLineNumber;e<=n.endLineNumber;e++){if(ec)continue;const u=e===n.startLineNumber?n.startColumn:1,h=e===n.endLineNumber?n.endColumn:this._context.model.getLineMaxColumn(e),d=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(u,h,s);if(d){if(t&&ethis._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(t,i,new G(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new B(t.outsideRenderedLine,t.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=1,o=!0;for(let r=t;r<=i;r++){const t=this._visibleLines.getVisibleLine(r);!e||t.getWidthIsFast()?n=Math.max(n,t.getWidth()):o=!1}return o&&1===t&&i===this._context.model.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),o}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let o=i;o<=n;o++){const i=this._visibleLines.getVisibleLine(o);if(i.needsMonospaceFontCheck()){const n=i.getWidth();n>t&&(t=n,e=o)}}if(-1!==e&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let e=i;e<=n;e++)this._visibleLines.getVisibleLine(e).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(e){if(this._visibleLines.renderLines(e),this._lastRenderedData.setCurrentVisibleRange(e.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const t=this._horizontalRevealRequest;if(e.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const e=this._computeScrollLeftToReveal(t);e&&(this._isViewportWrapping||this._ensureMaxLineWidth(e.maxHorizontalOffset),this._context.model.setScrollPosition({scrollLeft:e.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),b.IJ&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)if(this._visibleLines.getVisibleLine(i).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const t=Math.ceil(e);this._maxLineWidth0){let e=n[0].startLineNumber,t=n[0].endLineNumber;for(let i=1,o=n.length;is){if(!l)return-1;h=c}else if(5===o||6===o)if(6===o&&r<=c&&u<=a)h=r;else{const e=c-Math.max(5*this._lineHeight,.2*s),t=u-s;h=Math.max(t,e)}else if(1===o||2===o)if(2===o&&r<=c&&u<=a)h=r;else{const e=(c+u)/2;h=Math.max(0,e-s/2)}else h=this._computeMinimumScrolling(r,a,c,u,3===o,4===o);return h}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),i=t.left,n=i+t.width;let o=1073741824,r=0;if("range"===e.type){const t=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!t)return null;for(const e of t.ranges)o=Math.min(o,e.left),r=Math.max(r,e.left+e.width)}else for(const t of e.selections){if(t.startLineNumber!==t.endLineNumber)return null;const e=this._visibleRangesForLineRange(t.startLineNumber,t.startColumn,t.endColumn);if(!e)return null;for(const t of e.ranges)o=Math.min(o,t.left),r=Math.max(r,t.left+t.width)}return o=Math.max(0,o-_t.HORIZONTAL_EXTRA_PX),r+=this._revealHorizontalRightPadding,"selections"===e.type&&r-o>t.width?null:{scrollLeft:this._computeMinimumScrolling(i,n,o,r),maxHorizontalOffset:r}}_computeMinimumScrolling(e,t,i,n,o,r){o=!!o,r=!!r;const s=(t|=0)-(e|=0);return(n|=0)-(i|=0)t?Math.max(0,n-s):e:i}}_t.HORIZONTAL_EXTRA_PX=30;class vt extends ht{constructor(e){super(),this._context=e;const t=this._context.configuration.options.get(128);this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options.get(128);return this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let e=0,o=t.length;e
    ',r=[];for(let e=t;e<=i;e++){const i=e-t,s=n[i];let a="";for(let e=0,t=s.length;e';o[i]=s}this._renderResult=o}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}class yt{constructor(e,t,i,n){this.r=yt._clamp(e),this.g=yt._clamp(t),this.b=yt._clamp(i),this.a=yt._clamp(n)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:0|e}}yt.Empty=new yt(0,0,0,0);var wt=i(4101);class Ct{constructor(){this._onDidChange=new h.Q5,this.onDidChange=this._onDidChange.event,this._updateColorMap(),wt.RW.onDidChange((e=>{e.changedColorMap&&this._updateColorMap()}))}static getInstance(){return this._INSTANCE||(this._INSTANCE=new Ct),this._INSTANCE}_updateColorMap(){const e=wt.RW.getColorMap();if(!e)return this._colors=[yt.Empty],void(this._backgroundIsLight=!0);this._colors=[yt.Empty];for(let t=1;t=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}Ct._INSTANCE=null;var St=i(3824),xt=i(3910);const kt=(()=>{const e=[];for(let t=32;t<=126;t++)e.push(t);return e.push(65533),e})();var Dt=i(5427);class Lt{constructor(e,t){this.scale=t,this.charDataNormal=Lt.soften(e,.8),this.charDataLight=Lt.soften(e,50/60)}static soften(e,t){let i=new Uint8ClampedArray(e.length);for(let n=0,o=e.length;ne.width||i+h>e.height)return void console.warn("bad render request outside image data");const d=a?this.charDataLight:this.charDataNormal,g=((e,t)=>(e-=32)<0||e>96?t<=2?(e+96)%96:95:e)(n,s),f=4*e.width,p=r.r,m=r.g,_=r.b,v=o.r-p,b=o.g-m,y=o.b-_,w=e.data;let C=g*c*u,S=i*f+4*t;for(let e=0;ee.width||i+c>e.height)return void console.warn("bad render request outside image data");const u=4*e.width,h=o.r,d=o.g,g=o.b,f=h+.5*(n.r-h),p=d+.5*(n.g-d),m=g+.5*(n.b-g),_=e.data;let v=i*u+4*t;for(let e=0;e{const t=new Uint8ClampedArray(e.length/2);for(let i=0;i>1]=Et[e[i]]<<4|15&Et[e[i+1]];return t},Mt={1:(0,Nt.I)((()=>At("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792"))),2:(0,Nt.I)((()=>At("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")))};class It{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let i;return i=Mt[e]?new Lt(Mt[e](),e):It.createFromSampleData(It.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=i,i}static createSampleData(e){const t=document.createElement("canvas"),i=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",i.fillStyle="#ffffff",i.font=`bold 16px ${e}`,i.textBaseline="middle";let n=0;for(const e of kt)i.fillText(String.fromCharCode(e),n,8),n+=10;return i.getImageData(0,0,960,16)}static createFromSampleData(e,t){if(61440!==e.length)throw new Error("Unexpected source in MinimapCharRenderer");let i=It._downsample(e,t);return new Lt(i,t)}static _downsampleChar(e,t,i,n,o){const r=1*o,s=2*o;let a=n,l=0;for(let n=0;n0){const e=255/a;for(let t=0;tIt.create(this.fontScale,a.fontFamily))),this.backgroundColor=Rt._getMinimapBackground(t,i)}static _getMinimapBackground(e,t){const i=e.getColor(xt.kV);return i?new yt(i.rgba.r,i.rgba.g,i.rgba.b,i.rgba.a):t.getColor(2)}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.showSlider===e.showSlider&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)}}class Ot{constructor(e,t,i,n,o,r,s,a){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=o,this.sliderHeight=r,this.startLineNumber=s,this.endLineNumber=a}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}static create(e,t,i,n,o,r,s,a,l,c,u){const h=e.pixelRatio,d=e.minimapLineHeight,g=Math.floor(e.canvasInnerHeight/d),f=e.lineHeight;if(e.minimapHeightIsEditorHeight){const t=a*e.lineHeight+(e.scrollBeyondLastLine?o-e.lineHeight:0),i=Math.max(1,Math.floor(o*o/t)),n=Math.max(0,e.minimapHeight-i),r=n/(c-o),u=l*r,h=n>0,d=Math.floor(e.canvasInnerHeight/e.minimapLineHeight);return new Ot(l,c,h,r,u,i,1,Math.min(s,d))}let p,m;if(r&&i!==s){const e=i-t+1;p=Math.floor(e*d/h)}else{const e=o/f;p=Math.floor(e*d/h)}m=e.scrollBeyondLastLine?(s-1)*d/h:Math.max(0,s*d/h-p),m=Math.min(e.minimapHeight-p,m);const _=m/(c-o),v=l*_;let b=0;if(e.scrollBeyondLastLine&&(b=o/f-1),g>=s+b)return new Ot(l,c,m>0,_,v,p,1,s);{let e=Math.max(1,Math.floor(t-v*h/d));u&&u.scrollHeight===c&&(u.scrollTop>l&&(e=Math.min(e,u.startLineNumber)),u.scrollTopFt.INVALID)),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;const t=this._renderedLines._get().lines;for(let e=0,i=t.length;e1){for(let t=0,i=s-1;t0&&this.minimapLines[i-1]>=e;)i--;let n=this.modelLineToMinimapLine(t)-1;for(;n+1t)return null}return[i+1,n+1]}decorationLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e),n=this.modelLineToMinimapLine(t);return e!==t&&n===i&&(n===this.minimapLines.length?i>1&&i--:n++),[i,n]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let i=this.minimapLines.length,n=0;for(let o=this.minimapLines.length-1;o>=0&&!(this.minimapLines[o]=0&&!(this.minimapLines[i]0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:i,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(n)}_recreateLineSampling(){this._minimapSelections=null;const e=Boolean(this._samplingState),[t,i]=zt.compute(this.options,this._context.model.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const e of i)switch(e.type){case"deleted":this._actual.onLinesDeleted(e.deleteFromLineNumber,e.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(e.insertFromLineNumber,e.insertToLineNumber);break;case"flush":this._actual.onFlushed()}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.model.getLineCount()}getRealLineCount(){return this._context.model.getLineCount()}getLineContent(e){return this._samplingState?this._context.model.getLineContent(this._samplingState.minimapLines[e-1]):this._context.model.getLineContent(e)}getMinimapLinesRenderingData(e,t,i){if(this._samplingState){let n=[];for(let o=0,r=t-e+1;o{if(e.preventDefault(),0===this._model.options.renderMinimap)return;if(!this._lastRenderData)return;if("proportional"!==this._model.options.size){if(e.leftButton&&this._lastRenderData){const t=c.i(this._slider.domNode),i=t.top+t.height/2;this._startSliderDragging(e.buttons,e.posx,i,e.posy,this._lastRenderData.renderedLayout)}return}const t=this._model.options.minimapLineHeight,i=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*e.browserEvent.offsetY;let n=Math.floor(i/t)+this._lastRenderData.renderedLayout.startLineNumber;n=Math.min(n,this._model.getLineCount()),this._model.revealLineNumber(n)})),this._sliderMouseMoveMonitor=new S.Z,this._sliderMouseDownListener=c.mu(this._slider.domNode,"mousedown",(e=>{e.preventDefault(),e.stopPropagation(),e.leftButton&&this._lastRenderData&&this._startSliderDragging(e.buttons,e.posx,e.posy,e.posy,this._lastRenderData.renderedLayout)})),this._gestureDisposable=y.o.addTarget(this._domNode.domNode),this._sliderTouchStartListener=c.nm(this._domNode.domNode,y.t.Start,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(e))}),{passive:!1}),this._sliderTouchMoveListener=c.nm(this._domNode.domNode,y.t.Change,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(e)}),{passive:!1}),this._sliderTouchEndListener=c.mu(this._domNode.domNode,y.t.End,(e=>{e.preventDefault(),e.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)}))}_startSliderDragging(e,t,i,n,o){this._slider.toggleClassName("active",!0);const r=(e,n)=>{const r=Math.abs(n-t);if(b.ED&&r>140)return void this._model.setScrollTop(o.scrollTop);const s=e-i;this._model.setScrollTop(o.getDesiredScrollTopFromDelta(s))};n!==i&&r(n,t),this._sliderMouseMoveMonitor.startMonitoring(this._slider.domNode,e,S.e,(e=>r(e.posy,e.posx)),(()=>{this._slider.toggleClassName("active",!1)}))}scrollDueToTouchEvent(e){const t=this._domNode.domNode.getBoundingClientRect().top,i=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(i)}dispose(){this._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){return"always"===this._model.options.showSlider?"minimap slider-always":"minimap slider-mouseover"}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new Bt(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e,t)}onLinesDeleted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e,t),!0}onLinesInserted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(xt.ov),this._renderDecorations=!0,!0}onTokensChanged(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(0===this._model.options.renderMinimap)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const t=Ot.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(t.sliderNeeded?"block":"none"),this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight);const i=e.scrollLeft/this._model.options.typicalHalfwidthCharacterWidth,n=Math.min(this._model.options.minimapWidth,Math.round(i*this._model.options.minimapCharWidth/this._model.options.pixelRatio));this._sliderHorizontal.setLeft(n),this._sliderHorizontal.setWidth(this._model.options.minimapWidth-n),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this.renderDecorations(t),this._lastRenderData=this.renderLines(t)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections(),i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber),{canvasInnerWidth:n,canvasInnerHeight:o}=this._model.options,r=this._model.options.minimapLineHeight,s=this._model.options.minimapCharWidth,a=this._model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,n,o);const c=new Map;for(let i=0;ithis._model.options.canvasInnerHeight)return;let h=t.get(r);const d=!h;if(!h){const e=this._model.getLineContent(r);h=[j.y0];for(let t=1;tr?h.length-1:f-1;if(v>0){const t=h[v]-_||2;this.renderDecoration(e,n,_,u,t,s)}d&&this.renderLineHighlight(e,n,u,s)}renderLineHighlight(e,t,i,n){e.fillStyle=t&&t.transparent(.5).toString()||"",e.fillRect(j.y0,i,e.canvas.width,n)}renderDecoration(e,t,i,n,o,r){e.fillStyle=t&&t.toString()||"",e.fillRect(i,n,o,r)}renderLines(e){const t=e.startLineNumber,i=e.endLineNumber,n=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){const t=this._lastRenderData._get();return new Pt(e,t.imageData,t.lines)}const o=this._getBuffer();if(!o)return null;let[r,s,a]=Vt._renderUntouchedLines(o,t,i,n,this._lastRenderData);const l=this._model.getMinimapLinesRenderingData(t,i,a),c=this._model.getOptions().tabSize,u=this._model.options.backgroundColor,h=this._model.tokensColorTracker,d=h.backgroundIsLight(),g=this._model.options.renderMinimap,f=this._model.options.charRenderer(),p=this._model.options.fontScale,m=this._model.options.minimapCharWidth,_=(1===g?2:3)*p,v=n>_?Math.floor((n-_)/2):0;let b=0;const y=[];for(let e=0,r=i-t+1;e=0&&op)return;const r=g.charCodeAt(v);if(9===r){const e=c-(v+b)%c;b+=e-1,_+=e*o}else if(32===r)_+=o;else{const c=Le.K7(r)?2:1;for(let u=0;up)return}}}}}(0,Me.Ic)(((e,t)=>{const i=e.getColor(xt.kV);i&&t.addRule(`.monaco-editor .minimap > canvas { opacity: ${i.rgba.a}; will-change: opacity; }`);const n=e.getColor(xt.CA);n&&t.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${n}; }`);const o=e.getColor(xt.Xy);o&&t.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${o}; }`);const r=e.getColor(xt.br);r&&t.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${r}; }`);const s=e.getColor(xt._w);s&&t.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${s} -6px 0 6px -6px inset; }`)}));class Ht extends T{constructor(e){super(e);const t=this._context.configuration.options.get(128);this._widgets={},this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,this._domNode=(0,v.X)(document.createElement("div")),R.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options.get(128);return this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,!0}addWidget(e){const t=(0,v.X)(e.getDomNode());this._widgets[e.getId()]={widget:e,preference:null,domNode:t},t.setPosition("absolute"),t.setAttribute("widgetId",e.getId()),this._domNode.appendChild(t),this.setShouldRender()}setWidgetPosition(e,t){const i=this._widgets[e.getId()];return i.preference!==t&&(i.preference=t,this.setShouldRender(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t].domNode.domNode;delete this._widgets[t],e.parentNode.removeChild(e),this.setShouldRender()}}_renderWidget(e){const t=e.domNode;if(null!==e.preference)if(0===e.preference)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(1===e.preference){const e=t.domNode.clientHeight;t.setTop(this._editorHeight-e-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else 2===e.preference&&(t.setTop(0),t.domNode.style.right="50%");else t.unsetTop()}prepareRender(e){}render(e){this._domNode.setWidth(this._editorWidth);const t=Object.keys(this._widgets);for(let e=0,i=t.length;e=3){const t=Math.floor(n/3),i=Math.floor(n/3),o=n-t-i,r=e+t;return[[0,e,r,e,e+t+o,e,r,e],[0,t,o,t+o,i,t+o+i,o+i,t+o+i]]}if(2===i){const t=Math.floor(n/2),i=n-t;return[[0,e,e,e,e+t,e,e,e],[0,t,t,t,i,t+i,t+i,t+i]]}return[[0,e,e,e,e,e,e,e],[0,n,n,n,n,n,n,n]]}equals(e){return this.lineHeight===e.lineHeight&&this.pixelRatio===e.pixelRatio&&this.overviewRulerLanes===e.overviewRulerLanes&&this.renderBorder===e.renderBorder&&this.borderColor===e.borderColor&&this.hideCursor===e.hideCursor&&this.cursorColor===e.cursorColor&&this.themeType===e.themeType&&this.backgroundColor===e.backgroundColor&&this.top===e.top&&this.right===e.right&&this.domWidth===e.domWidth&&this.domHeight===e.domHeight&&this.canvasWidth===e.canvasWidth&&this.canvasHeight===e.canvasHeight}}class jt extends T{constructor(e){super(e),this._domNode=(0,v.X)(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=wt.RW.onDidChange((e=>{e.changedColorMap&&this._updateSettings(!0)})),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new Ut(this._context.configuration,this._context.theme);return!(this._settings&&this._settings.equals(t)||(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),0))}onConfigurationChanged(e){return this._updateSettings(!1)}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;tt&&(e=t-a),_=e-a,v=e+a}_>m+1||r!==f?(0!==e&&l.fillRect(c[f],p,u[f],m-p),f=r,p=_,m=v):v>m&&(m=v)}l.fillRect(c[f],p,u[f],m-p)}if(!this._settings.hideCursor&&this._settings.cursorColor){const e=2*this._settings.pixelRatio|0,i=e/2|0,r=this._settings.x[7],s=this._settings.w[7];l.fillStyle=this._settings.cursorColor;let a=-100,c=-100;for(let u=0,h=this._cursorPositions.length;ut&&(d=t-i);const g=d-i,f=g+e;g>c+1?(0!==u&&l.fillRect(r,a,s,c-a),a=g,c=f):f>c&&(c=f)}l.fillRect(r,a,s,c-a)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(l.beginPath(),l.lineWidth=1,l.strokeStyle=this._settings.borderColor,l.moveTo(0,0),l.lineTo(0,t),l.stroke(),l.moveTo(0,0),l.lineTo(e,0),l.stroke())}}var qt=i(2003);class Kt extends I{constructor(e,t){super(),this._context=e;const i=this._context.configuration.options;this._domNode=(0,v.X)(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new qt.Tj((e=>this._context.viewLayout.getVerticalOffsetForLineNumber(e))),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(56)),this._zoneManager.setPixelRatio(i.get(126)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(56)&&(this._zoneManager.setLineHeight(t.get(56)),this._render()),e.hasChanged(126)&&(this._zoneManager.setPixelRatio(t.get(126)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,t&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(0===this._zoneManager.getOuterHeight())return!1;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),o=this._domNode.domNode.getContext("2d");return o.clearRect(0,0,e,t),i.length>0&&this._renderOneLane(o,i,n,e),!0}_renderOneLane(e,t,i,n){let o=0,r=0,s=0;for(const a of t){const t=a.colorId,l=a.from,c=a.to;t!==o?(e.fillRect(0,r,n,s-r),o=t,e.fillStyle=i[o],r=l,s=c):s>=l?s=Math.max(s,c):(e.fillRect(0,r,n,s-r),r=l,s=c)}e.fillRect(0,r,n,s-r)}}class Gt extends T{constructor(e){super(e),this.domNode=(0,v.X)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(89),this._typicalHalfwidthCharacterWidth=t.get(40).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(89),this._typicalHalfwidthCharacterWidth=t.get(40).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e0;){const e=(0,v.X)(document.createElement("div"));e.setClassName("view-ruler"),e.setWidth(n),this.domNode.appendChild(e),this._renderedRulers.push(e),o--}return}let i=e-t;for(;i>0;){const e=this._renderedRulers.pop();this.domNode.removeChild(e),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t{const i=e.getColor(Ae.zk);i&&t.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${i} inset; }`)}));class Yt extends T{constructor(e){super(e),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const t=this._context.configuration.options.get(90);this._useShadows=t.useShadows,this._domNode=(0,v.X)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e&&(this._shouldShow=e,!0)}getDomNode(){return this._domNode}_updateWidth(){const e=this._context.configuration.options.get(128);0===e.minimap.renderMinimap||e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?this._width=e.width:this._width=e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}onConfigurationChanged(e){const t=this._context.configuration.options.get(90);return this._useShadows=t.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}(0,Me.Ic)(((e,t)=>{const i=e.getColor(xt._w);i&&t.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${i} 0 6px 6px -6px inset; }`)}));class Zt{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class Xt{constructor(e,t){this.lineNumber=e,this.ranges=t}}function Qt(e){return new Zt(e)}function Jt(e){return new Xt(e.lineNumber,e.ranges.map(Qt))}class ei extends Ee{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(56),this._roundedSelection=t.get(88),this._typicalHalfwidthCharacterWidth=t.get(40).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(56),this._roundedSelection=t.get(88),this._typicalHalfwidthCharacterWidth=t.get(40).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,i=e.length;t1)return!0;return!1}_enrichVisibleRangesWithStyle(e,t,i){const n=this._typicalHalfwidthCharacterWidth/4;let o=null,r=null;if(i&&i.length>0&&t.length>0){const n=t[0].lineNumber;if(n===e.startLineNumber)for(let e=0;!o&&e=0;e--)i[e].lineNumber===s&&(r=i[e].ranges[0]);o&&!o.startStyle&&(o=null),r&&!r.startStyle&&(r=null)}for(let e=0,i=t.length;e0){const i=t[e-1].ranges[0].left,o=t[e-1].ranges[0].left+t[e-1].ranges[0].width;ti(a-i)i&&(c.top=1),ti(l-o)'}_actualRenderOneSelection(e,t,i,n){if(0===n.length)return;const o=!!n[0].ranges[0].startStyle,r=this._lineHeight.toString(),s=(this._lineHeight-1).toString(),a=n[0].lineNumber,l=n[n.length-1].lineNumber;for(let c=0,u=n.length;c1,s)}this._previousFrameVisibleRangesWithStyle=o,this._renderResult=t.map((([e,t])=>e+t))}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function ti(e){return e<0?-e:e}ei.SELECTION_CLASS_NAME="selected-text",ei.SELECTION_TOP_LEFT="top-left-radius",ei.SELECTION_BOTTOM_LEFT="bottom-left-radius",ei.SELECTION_TOP_RIGHT="top-right-radius",ei.SELECTION_BOTTOM_RIGHT="bottom-right-radius",ei.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",ei.ROUNDED_PIECE_WIDTH=10,(0,Me.Ic)(((e,t)=>{const i=e.getColor(xt.hE);i&&t.addRule(`.monaco-editor .focused .selected-text { background-color: ${i}; }`);const n=e.getColor(xt.ES);n&&t.addRule(`.monaco-editor .selected-text { background-color: ${n}; }`);const o=e.getColor(xt.yb);o&&!o.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${o}; }`)}));class ii{constructor(e,t,i,n,o,r){this.top=e,this.left=t,this.width=i,this.height=n,this.textContent=o,this.textContentClassName=r}}class ni{constructor(e){this._context=e;const t=this._context.configuration.options,i=t.get(40);this._cursorStyle=t.get(22),this._lineHeight=t.get(56),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(25),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=(0,v.X)(document.createElement("div")),this._domNode.setClassName(`cursor ${Oe.S}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),f.V.applyFontInfo(this._domNode,i),this._domNode.setDisplay("none"),this._position=new ie.L(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(40);return this._cursorStyle=t.get(22),this._lineHeight=t.get(56),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(25),this._typicalHalfwidthCharacterWidth),f.V.applyFontInfo(this._domNode,i),!0}onCursorPositionChanged(e){return this._position=e,!0}_prepareRender(e){let t="";if(this._cursorStyle===j.d2.Line||this._cursorStyle===j.d2.LineThin){const i=e.visibleRangeForPosition(this._position);if(!i||i.outsideRenderedLine)return null;let n;if(this._cursorStyle===j.d2.Line){if(n=c.Uh(this._lineCursorWidth>0?this._lineCursorWidth:2),n>2){const e=this._context.model.getLineContent(this._position.lineNumber),i=Le.vH(e,this._position.column-1);t=e.substr(this._position.column-1,i)}}else n=c.Uh(1);let o=i.left;n>=2&&o>=1&&(o-=1);const r=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta;return new ii(r,o,n,this._lineHeight,t,"")}const i=this._context.model.getLineContent(this._position.lineNumber),n=Le.vH(i,this._position.column-1),o=e.linesVisibleRangesForRange(new ne.e(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+n),!1);if(!o||0===o.length)return null;const r=o[0];if(r.outsideRenderedLine||0===r.ranges.length)return null;const s=r.ranges[0],a=s.width<1?this._typicalHalfwidthCharacterWidth:s.width;let l="";if(this._cursorStyle===j.d2.Block){const e=this._context.model.getViewLineData(this._position.lineNumber);t=i.substr(this._position.column-1,n);const o=e.tokens.findTokenIndexAtOffset(this._position.column-1);l=e.tokens.getClassName(o)}let u=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta,h=this._lineHeight;return this._cursorStyle!==j.d2.Underline&&this._cursorStyle!==j.d2.UnderlineThin||(u+=this._lineHeight-2,h=2),new ii(u,s.left,a,h,t,l)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${Oe.S} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setWidth(this._renderData.width),this._domNode.setLineHeight(this._renderData.height),this._domNode.setHeight(this._renderData.height),{domNode:this._domNode.domNode,position:this._position,contentLeft:this._renderData.left,height:this._renderData.height,width:2}):(this._domNode.setDisplay("none"),null)}}class oi extends T{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(78),this._cursorBlinking=t.get(20),this._cursorStyle=t.get(22),this._cursorSmoothCaretAnimation=t.get(21),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new ni(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=(0,v.X)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new C._F,this._cursorFlatBlinkInterval=new C.zh,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const t=this._context.configuration.options;this._readOnly=t.get(78),this._cursorBlinking=t.get(20),this._cursorStyle=t.get(22),this._cursorSmoothCaretAnimation=t.get(21),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let t=0,i=this._secondaryCursors.length;tt.length){const e=this._secondaryCursors.length-t.length;for(let t=0;t{for(let i=0,n=e.ranges.length;i{this._isVisible?this._hide():this._show()}),oi.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet((()=>{this._blinkingEnabled=!0,this._updateDomClassName()}),oi.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case j.d2.Line:e+=" cursor-line-style";break;case j.d2.Block:e+=" cursor-block-style";break;case j.d2.Underline:e+=" cursor-underline-style";break;case j.d2.LineThin:e+=" cursor-line-thin-style";break;case j.d2.BlockOutline:e+=" cursor-block-outline-style";break;case j.d2.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return this._cursorSmoothCaretAnimation&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{const i=e.getColor(Ae.n0);if(i){let n=e.getColor(Ae.fY);n||(n=i.opposite()),t.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${i}; border-color: ${i}; color: ${n}; }`),"hc"===e.type&&t.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${n}; border-right: 1px solid ${n}; }`)}}));const ri=()=>{throw new Error("Invalid change accessor")};class si extends T{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(128);this._lineHeight=t.get(56),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=(0,v.X)(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=(0,v.X)(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const i of e)t.set(i.id,i);let i=!1;return this._context.model.changeWhitespace((e=>{const n=Object.keys(this._zones);for(let o=0,r=n.length;o{const n={addZone:e=>(t=!0,this._addZone(i,e)),removeZone:e=>{e&&(t=this._removeZone(i,e)||t)},layoutZone:e=>{e&&(t=this._layoutZone(i,e)||t)}};!function(e,t){try{e(t)}catch(e){(0,u.dL)(e)}}(e,n),n.addZone=ri,n.removeZone=ri,n.layoutZone=ri})),t}_addZone(e,t){const i=this._computeWhitespaceProps(t),n={whitespaceId:e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),delegate:t,isVisible:!1,domNode:(0,v.X)(t.domNode),marginDomNode:t.marginDomNode?(0,v.X)(t.marginDomNode):null};return this._safeCallOnComputedHeight(n.delegate,i.heightInPx),n.domNode.setPosition("absolute"),n.domNode.domNode.style.width="100%",n.domNode.setDisplay("none"),n.domNode.setAttribute("monaco-view-zone",n.whitespaceId),this.domNode.appendChild(n.domNode),n.marginDomNode&&(n.marginDomNode.setPosition("absolute"),n.marginDomNode.domNode.style.width="100%",n.marginDomNode.setDisplay("none"),n.marginDomNode.setAttribute("monaco-view-zone",n.whitespaceId),this.marginDomNode.appendChild(n.marginDomNode)),this._zones[n.whitespaceId]=n,this.setShouldRender(),n.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t];return delete this._zones[t],e.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.parentNode.removeChild(i.domNode.domNode),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.parentNode.removeChild(i.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t],n=this._computeWhitespaceProps(i.delegate);return e.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){if(this._zones.hasOwnProperty(e)){const t=this._zones[e];return Boolean(t.delegate.suppressMouseDown)}return!1}_heightInPixels(e){return"number"==typeof e.heightInPx?e.heightInPx:"number"==typeof e.heightInLines?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return"number"==typeof e.minWidthInPx?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if("function"==typeof e.onComputedHeight)try{e.onComputedHeight(t)}catch(e){(0,u.dL)(e)}}_safeCallOnDomNodeTop(e,t){if("function"==typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(e){(0,u.dL)(e)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,i={};let n=!1;for(let e=0,o=t.length;e{this._context.theme.update(e),this._context.model.onDidColorThemeChange(),this.render(!0,!1)}))),this._viewParts=[],this._textAreaHandler=new Be(this._context,s,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=(0,v.X)(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=(0,v.X)(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=(0,v.X)(document.createElement("div")),R.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new ct(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new _t(this._context,this._linesContent),this._viewZones=new si(this._context),this._viewParts.push(this._viewZones);const a=new jt(this._context);this._viewParts.push(a);const l=new Yt(this._context);this._viewParts.push(l);const c=new Ze(this._context);this._viewParts.push(c),c.addDynamicOverlay(new rt(this._context)),c.addDynamicOverlay(new ei(this._context)),c.addDynamicOverlay(new gt(this._context)),c.addDynamicOverlay(new at(this._context));const u=new Xe(this._context);this._viewParts.push(u),u.addDynamicOverlay(new st(this._context)),u.addDynamicOverlay(new dt(this._context)),u.addDynamicOverlay(new bt(this._context)),u.addDynamicOverlay(new vt(this._context)),u.addDynamicOverlay(new Ie(this._context));const h=new Te(this._context);h.getDomNode().appendChild(this._viewZones.marginDomNode),h.getDomNode().appendChild(u.getDomNode()),this._viewParts.push(h),this._contentWidgets=new Je(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new oi(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new Ht(this._context),this._viewParts.push(this._overlayWidgets);const d=new Gt(this._context);this._viewParts.push(d);const g=new Wt(this._context);if(this._viewParts.push(g),a){const e=this._scrollbar.getOverviewRulerLayoutInfo();e.parent.insertBefore(a.getDomNode(),e.insertBefore)}this._linesContent.appendChild(c.getDomNode()),this._linesContent.appendChild(d.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(h.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(l.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(g.getDomNode()),this.domNode.appendChild(this._overflowGuardContainer),r?r.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new De(this._context,s,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._renderNow()}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new le(e,t)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new ie.L(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPositionRelativeToEditor:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new ie.L(e,t)))}}_applyLayout(){const e=this._context.configuration.options.get(128);this.domNode.setWidth(e.width),this.domNode.setHeight(e.height),this._overflowGuardContainer.setWidth(e.width),this._overflowGuardContainer.setHeight(e.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(125)+" "+(0,Me.m6)(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this._configPixelRatio=this._context.configuration.options.get(126),this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){null===this._renderAnimationFrame&&(this._renderAnimationFrame=c.lI(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){!function(e){try{e()}catch(e){(0,u.dL)(e)}}((()=>this._actualRender()))}_getViewPartsToRender(){let e=[],t=0;for(const i of this._viewParts)i.shouldRender()&&(e[t++]=i);return e}_actualRender(){if(!c.Uw(this.domNode.domNode))return;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&0===e.length)return;const t=this._context.viewLayout.getLinesViewportData();this._context.model.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const i=new ci(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.model);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(i),this._viewLines.shouldRender()&&(this._viewLines.renderText(i),this._viewLines.onDidRender(),e=this._getViewPartsToRender());const n=new O(this._context.viewLayout,i,this._viewLines);for(const t of e)t.prepareRender(n);for(const t of e)t.render(n),t.onDidRender();Math.abs(m.mX()-this._configPixelRatio)>.001&&this._context.configuration.updatePixelRatio()}delegateVerticalScrollbarMouseDown(e){this._scrollbar.delegateVerticalScrollbarMouseDown(e)}restoreState(e){this._context.model.setScrollPosition({scrollTop:e.scrollTop},1),this._context.model.tokenizeViewport(),this._renderNow(),this._viewLines.updateLineWidths(),this._context.model.setScrollPosition({scrollLeft:e.scrollLeft},1)}getOffsetForColumn(e,t){const i=this._context.model.validateModelPosition({lineNumber:e,column:t}),n=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(i);this._flushAccumulatedAndRenderNow();const o=this._viewLines.visibleRangeForPosition(new ie.L(n.lineNumber,n.column));return o?o.left:-1}getTargetAtClientPoint(e,t){const i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?Ve.convertViewToModelMouseTarget(i,this._context.model.coordinatesConverter):null}createOverviewRuler(e){return new Kt(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(const e of this._viewParts)e.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){let t=e.position&&e.position.range||null;if(null===t){const i=e.position?e.position.position:null;null!==i&&(t=new ne.e(i.lineNumber,i.column,i.lineNumber,i.column))}const i=e.position?e.position.preference:null;this._contentWidgets.setWidgetPosition(e.widget,t,i),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){const t=e.position?e.position.preference:null;this._overlayWidgets.setWidgetPosition(e.widget,t)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}}class hi{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new oe.rS(new ne.e(1,1,1,1),0,new ie.L(1,1),0),new oe.rS(new ne.e(1,1,1,1),0,new ie.L(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new oe.Vi(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return 0===this.modelState.selection.getDirection()?new _.Y(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new _.Y(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,i){this._setState(e,t,i)}_setState(e,t,i){if(t){const i=e.model.validateRange(t.selectionStart),n=t.selectionStart.equalsRange(i)?t.selectionStartLeftoverVisibleColumns:0,o=e.model.validatePosition(t.position),r=t.position.equals(o)?t.leftoverVisibleColumns:0;t=new oe.rS(i,n,o,r)}else{if(!i)return;const n=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(i.selectionStart)),o=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(i.position));t=new oe.rS(n,i.selectionStartLeftoverVisibleColumns,o,i.leftoverVisibleColumns)}if(i){const n=e.coordinatesConverter.validateViewRange(i.selectionStart,t.selectionStart),o=e.coordinatesConverter.validateViewPosition(i.position,t.position);i=new oe.rS(n,t.selectionStartLeftoverVisibleColumns,o,t.leftoverVisibleColumns)}else{const n=e.coordinatesConverter.convertModelPositionToViewPosition(new ie.L(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),o=e.coordinatesConverter.convertModelPositionToViewPosition(new ie.L(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),r=new ne.e(n.lineNumber,n.column,o.lineNumber,o.column),s=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new oe.rS(r,t.selectionStartLeftoverVisibleColumns,s,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}class di{constructor(e){this.context=e,this.primaryCursor=new hi(e),this.secondaryCursors=[],this.lastAddedCursorIndex=0}dispose(){this.primaryCursor.dispose(this.context),this.killSecondaryCursors()}startTrackingSelections(){this.primaryCursor.startTrackingSelection(this.context);for(let e=0,t=this.secondaryCursors.length;ei){let e=t-i;for(let t=0;t=e+1&&this.lastAddedCursorIndex--,this.secondaryCursors[e].dispose(this.context),this.secondaryCursors.splice(e,1)}_getAll(){let e=[];e[0]=this.primaryCursor;for(let t=0,i=this.secondaryCursors.length;te.selection.startLineNumber===t.selection.startLineNumber?e.selection.startColumn-t.selection.startColumn:e.selection.startLineNumber-t.selection.startLineNumber));for(let i=0;ia&&e.index--;e.splice(a,1),t.splice(s,1),this._removeSecondaryCursor(a-1),i--}}}}var gi=i(1380),fi=i(3582);class pi{constructor(){this.type=0}}class mi{constructor(){this.type=1}}class _i{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class vi{constructor(e,t){this.type=3,this.selections=e,this.modelSelections=t}}class bi{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0)}}class yi{constructor(){this.type=5}}class wi{constructor(e){this.type=6,this.isFocused=e}}class Ci{constructor(){this.type=7}}class Si{constructor(){this.type=8}}class xi{constructor(e,t){this.type=9,this.fromLineNumber=e,this.toLineNumber=t}}class ki{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}}class Di{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}}class Li{constructor(e,t,i,n,o,r){this.type=12,this.source=e,this.range=t,this.selections=i,this.verticalType=n,this.revealHorizontal=o,this.scrollType=r}}class Ni{constructor(e){this.type=13,this.scrollWidth=e.scrollWidth,this.scrollLeft=e.scrollLeft,this.scrollHeight=e.scrollHeight,this.scrollTop=e.scrollTop,this.scrollWidthChanged=e.scrollWidthChanged,this.scrollLeftChanged=e.scrollLeftChanged,this.scrollHeightChanged=e.scrollHeightChanged,this.scrollTopChanged=e.scrollTopChanged}}class Ei{constructor(){this.type=14}}class Ai{constructor(e){this.type=15,this.ranges=e}}class Mi{constructor(){this.type=16}}class Ii{constructor(){this.type=17}}class Ti extends d.JT{constructor(){super(),this._onEvent=this._register(new h.Q5),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOugoingEvents()}_addOutgoingEvent(e){for(let t=0,i=this._outgoingEvents.length;t0;){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,i=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOugoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const i of t)i.handleEvents(e)}}}class Ri{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class Oi{constructor(e,t,i,n){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=i,this.contentHeight=n,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}merge(e){return 0!==e.kind?this:new Oi(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class Fi{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}merge(e){return 1!==e.kind?this:new Fi(this.oldHasFocus,e.hasFocus)}}class Pi{constructor(e,t,i,n,o,r,s,a){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=i,this._oldScrollTop=n,this.scrollWidth=o,this.scrollLeft=r,this.scrollHeight=s,this.scrollTop=a,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!(this.scrollWidthChanged||this.scrollLeftChanged||this.scrollHeightChanged||this.scrollTopChanged)}merge(e){return 2!==e.kind?this:new Pi(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class Bi{constructor(){this.kind=3}isNoOp(){return!1}merge(e){return this}}class zi{constructor(e,t,i,n,o,r,s){this.kind=5,this.oldSelections=e,this.selections=t,this.oldModelVersionId=i,this.modelVersionId=n,this.source=o,this.reason=r,this.reachedMaxCursorCount=s}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const i=e.length;if(i!==t.length)return!1;for(let n=0;n=t.length)return!1;if(!t[i].strictContainsRange(e[i]))return!1}return!0}}class $i extends d.JT{constructor(e,t,i,n){super(),this._model=e,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=t,this._coordinatesConverter=i,this.context=new oe.zp(this._model,this._coordinatesConverter,n),this._cursors=new di(this.context),this._hasFocus=!1,this._isHandling=!1,this._isDoingComposition=!1,this._selectionsWhenCompositionStarted=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=(0,d.B9)(this._autoClosedActions),super.dispose()}updateConfiguration(e){this.context=new oe.zp(this._model,this._coordinatesConverter,e),this._cursors.updateContext(this.context)}onLineMappingChanged(e){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(e,"viewModel",0,this.getCursorStates())}setHasFocus(e){this._hasFocus=e}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){let e=this._cursors.getSelections();for(let t=0;t$i.MAX_CURSOR_COUNT&&(n=n.slice(0,$i.MAX_CURSOR_COUNT),o=!0);const r=new Vi(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,r,o)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,i,n){const o=this._cursors.getViewPositions();if(o.length>1)this._emitCursorRevealRange(e,t,null,this._cursors.getViewSelections(),0,i,n);else{const r=o[0],s=new ne.e(r.lineNumber,r.column,r.lineNumber,r.column);this._emitCursorRevealRange(e,t,s,null,0,i,n)}}_revealPrimaryCursor(e,t,i,n,o){const r=this._cursors.getViewPositions();if(r.length>1)this._emitCursorRevealRange(e,t,null,this._cursors.getViewSelections(),i,n,o);else{const s=r[0],a=new ne.e(s.lineNumber,s.column,s.lineNumber,s.column);this._emitCursorRevealRange(e,t,a,null,i,n,o)}}_emitCursorRevealRange(e,t,i,n,o,r,s){e.emitViewEvent(new Li(t,i,n,o,r,s))}saveState(){let e=[];const t=this._cursors.getSelections();for(let i=0,n=t.length;i0){const i=oe.Vi.fromModelSelections(t.resultingSelection);this.setStates(e,"modelChange",t.isUndoing?5:t.isRedoing?6:2,i)&&this._revealPrimaryCursor(e,"modelChange",0,!0,0)}else{const t=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,oe.Vi.fromModelSelections(t))}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),i=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:oe.io.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,t),toViewLineNumber:i.lineNumber,toViewVisualColumn:oe.io.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,i)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,i,n){this.setStates(e,t,n,oe.Vi.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){let i=[],n=[];for(let o=0,r=e.length;o0&&(r[0]._isTracked=!0);let s=e.model.pushEditOperations(e.selectionsBefore,r,(i=>{let n=[];for(let t=0;te.identifier.minor-t.identifier.minor;let r=[];for(let i=0;i0?(n[i].sort(o),r[i]=t[i].computeCursorState(e.model,{getInverseEditOperations:()=>n[i],getTrackedSelection:t=>{const i=parseInt(t,10),n=e.model._getTrackedRange(e.trackedRanges[i]);return 0===e.trackedRangesDirection[i]?new _.Y(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new _.Y(n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn)}})):r[i]=e.selectionsBefore[i];return r}));s||(s=e.selectionsBefore);let a=[];for(let e in o)o.hasOwnProperty(e)&&a.push(parseInt(e,10));a.sort(((e,t)=>t-e));for(const e of a)s.splice(e,1);return s}static _arrayIsEmpty(e){for(let t=0,i=e.length;t{ne.e.isEmpty(e)&&""===r||n.push({identifier:{major:t,minor:o++},range:e,text:r,forceMoveMarkers:s,isAutoWhitespaceEdit:i.insertsAutoWhitespace})};let s=!1;const a={addEditOperation:r,addTrackedEditOperation:(e,t,i)=>{s=!0,r(e,t,i)},trackSelection:(t,i)=>{const n=_.Y.liftSelection(t);let o;if(n.isEmpty())if("boolean"==typeof i)o=i?2:3;else{const t=e.model.getLineMaxColumn(n.startLineNumber);o=n.startColumn===t?2:3}else o=1;const r=e.trackedRanges.length,s=e.model._setTrackedRange(null,n,o);return e.trackedRanges[r]=s,e.trackedRangesDirection[r]=n.getDirection(),r.toString()}};try{i.getEditOperations(e.model,a)}catch(e){return(0,u.dL)(e),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:s}}static _getLoserCursorMap(e){(e=e.slice(0)).sort(((e,t)=>-ne.e.compareRangesUsingEnds(e.range,t.range)));let t={};for(let i=1;io.identifier.major?n.identifier.major:o.identifier.major,t[r.toString()]=!0;for(let t=0;t0&&i--}}return t}}.executeCommands(this._model,this._cursors.getSelections(),e.commands);if(t){this._interpretCommandResult(t);let i=[],n=[];for(let t=0;t0&&this._pushAutoClosedAction(i,n),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){e&&0!==e.length||(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,i,n,o){const r=new Vi(this._model,this);if(r.equals(n))return!1;const s=this._cursors.getSelections(),a=this._cursors.getViewSelections();if(e.emitViewEvent(new vi(a,s)),!n||n.cursorState.length!==r.cursorState.length||r.cursorState.some(((e,t)=>!e.modelState.equals(n.cursorState[t].modelState)))){const a=n?n.cursorState.map((e=>e.modelState.selection)):null,l=n?n.modelVersionId:0;e.emitOutgoingEvent(new zi(a,s,l,r.modelVersionId,t||"keyboard",i,o))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;let t=[];for(let i=0,n=e.length;i=0)return null;const o=n.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!o)return null;const r=o[1],s=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(r);if(!s||1!==s.length)return null;const a=s[0].open,l=n.text.length-o[2].length-1,c=n.text.lastIndexOf(a,l-1);if(-1===c)return null;t.push([c,l])}return t}executeEdits(e,t,i,n){let o=null;"snippet"===t&&(o=this._findAutoClosingPairs(i)),o&&(i[0]._isTracked=!0);let r=[],s=[];const a=this._model.pushEditOperations(this.getSelections(),i,(e=>{if(o)for(let t=0,i=o.length;t0&&this._pushAutoClosedAction(r,s)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const o=new Vi(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(e){(0,u.dL)(e)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,o,!1)&&this._revealPrimaryCursor(t,i,0,!0,0)}setIsDoingComposition(e){this._isDoingComposition=e}getAutoClosedCharacters(){return Hi.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._selectionsWhenCompositionStarted=this.getSelections().slice(0)}endComposition(e,t){this._executeEdit((()=>{"keyboard"===t&&(this._executeEditOperation(fi.u.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this._selectionsWhenCompositionStarted,this.getSelections(),this.getAutoClosedCharacters())),this._selectionsWhenCompositionStarted=null)}),e,t)}type(e,t,i){this._executeEdit((()=>{if("keyboard"===i){const e=t.length;let i=0;for(;i{this._executeEditOperation(fi.u.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,o))}),e,r);else if(0!==o){const t=this.getSelections().map((e=>{const t=e.getPosition();return new _.Y(t.lineNumber,t.column+o,t.lineNumber,t.column+o)}));this.setSelections(e,r,t,0)}}paste(e,t,i,n,o){this._executeEdit((()=>{this._executeEditOperation(fi.u.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))}),e,o,4)}cut(e,t){this._executeEdit((()=>{this._executeEditOperation(gi.A.cut(this.context.cursorConfig,this._model,this.getSelections()))}),e,t)}executeCommand(e,t,i){this._executeEdit((()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new oe.Tp(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}executeCommands(e,t,i){this._executeEdit((()=>{this._executeEditOperation(new oe.Tp(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}}$i.MAX_CURSOR_COUNT=1e4;var Ui=i(653),ji=i(6518),qi=i(9102),Ki=i(5713),Gi=i(6633);class Yi{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;const t=this._inserts,i=this._changes,n=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,i,n)}}class Zi{constructor(e,t,i,n,o){this.id=e,this.afterLineNumber=t,this.ordinal=i,this.height=n,this.minWidth=o,this.prefixSum=0}}class Xi{constructor(e,t,i,n){this._instanceId=Le.PJ(++Xi.INSTANCE_COUNT),this._pendingChanges=new Yi,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=t,this._paddingTop=i,this._paddingBottom=n}static findInsertionIndex(e,t,i){let n=0,o=e.length;for(;n>>1;t===e[r].afterLineNumber?i{t=!0,e|=0,i|=0,n|=0,o|=0;const r=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new Zi(r,e,i,n,o)),r},changeOneWhitespace:(e,i,n)=>{t=!0,i|=0,n|=0,this._pendingChanges.change({id:e,newAfterLineNumber:i,newHeight:n})},removeWhitespace:e=>{t=!0,this._pendingChanges.remove({id:e})}})}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,i){if((e.length>0||i.length>0)&&(this._minWidth=-1),e.length+t.length+i.length<=1){for(const t of e)this._insertWhitespace(t);for(const e of t)this._changeOneWhitespace(e.id,e.newAfterLineNumber,e.newHeight);for(const e of i){const t=this._findWhitespaceIndex(e.id);-1!==t&&this._removeWhitespace(t)}return}const n=new Set;for(const e of i)n.add(e.id);const o=new Map;for(const e of t)o.set(e.id,e);const r=e=>{let t=[];for(const i of e)if(!n.has(i.id)){if(o.has(i.id)){const e=o.get(i.id);i.afterLineNumber=e.newAfterLineNumber,i.height=e.newHeight}t.push(i)}return t},s=r(this._arr).concat(r(e));s.sort(((e,t)=>e.afterLineNumber===t.afterLineNumber?e.ordinal-t.ordinal:e.afterLineNumber-t.afterLineNumber)),this._arr=s,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=Xi.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){const t=this._arr;for(let i=0,n=t.length;it&&(this._arr[i].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount+=t-e+1;for(let i=0,n=this._arr.length;i=t.length||t[o+1].afterLineNumber>=e)return o;i=o+1|0}else n=o-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t1?this._lineHeight*(e-1):0,t+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e)+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),-1===this._minWidth){let e=0;for(let t=0,i=this._arr.length;tthis.getLinesTotalHeight()}isInTopPadding(e){return 0!==this._paddingTop&&(this._checkPendingChanges(),e=this.getLinesTotalHeight()-this._paddingBottom)}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),(e|=0)<0)return 1;const t=0|this._lineCount,i=this._lineHeight;let n=1,o=t;for(;n=r+i)n=t+1;else{if(e>=r)return t;o=t}}return n>t?t:n}getLinesViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this._lineHeight,n=0|this.getLineNumberAtOrAfterVerticalOffset(e),o=0|this.getVerticalOffsetForLineNumber(n);let r=0|this._lineCount,s=0|this.getFirstWhitespaceIndexAfterLineNumber(n);const a=0|this.getWhitespacesCount();let l,c;-1===s?(s=a,c=r+1,l=0):(c=0|this.getAfterLineNumberForWhitespaceIndex(s),l=0|this.getHeightForWhitespaceIndex(s));let u=o,h=u;const d=5e5;let g=0;o>=d&&(g=Math.floor(o/d)*d,g=Math.floor(g/i)*i,h-=g);const f=[],p=e+(t-e)/2;let m=-1;for(let e=n;e<=r;e++){if(-1===m){const t=u,n=u+i;(t<=p&&pp)&&(m=e)}for(u+=i,f[e-n]=h,h+=i;c===e;)h+=l,u+=l,s++,s>=a?c=r+1:(c=0|this.getAfterLineNumberForWhitespaceIndex(s),l=0|this.getHeightForWhitespaceIndex(s));if(u>=t){r=e;break}}-1===m&&(m=r);const _=0|this.getVerticalOffsetForLineNumber(r);let v=n,b=r;return vt&&b--,{bigNumbersDelta:g,startLineNumber:n,endLineNumber:r,relativeVerticalOffset:f,centeredLineNumber:m,completelyVisibleStartLineNumber:v,completelyVisibleEndLineNumber:b}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e|=0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let i,n;return i=t>=1?this._lineHeight*t:0,n=e>0?this.getWhitespacesAccumulatedHeight(e-1):0,i+n+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e|=0;let t=0,i=this.getWhitespacesCount()-1;if(i<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(i)+this.getHeightForWhitespaceIndex(i))return-1;for(;t=o+this.getHeightForWhitespaceIndex(n))t=n+1;else{if(e>=o)return n;i=n}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e|=0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this.getWhitespacesCount())return null;const i=this.getVerticalOffsetForWhitespaceIndex(t);if(i>e)return null;const n=this.getHeightForWhitespaceIndex(t);return{id:this.getIdForWhitespaceIndex(t),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:i,height:n}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this.getWhitespacesCount()-1;if(i<0)return[];let o=[];for(let e=i;e<=n;e++){const i=this.getVerticalOffsetForWhitespaceIndex(e),n=this.getHeightForWhitespaceIndex(e);if(i>=t)break;o.push({id:this.getIdForWhitespaceIndex(e),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(e),verticalOffset:i,height:n})}return o}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].height}}Xi.INSTANCE_COUNT=0;class Qi{constructor(e,t,i,n){(e|=0)<0&&(e=0),(t|=0)<0&&(t=0),(i|=0)<0&&(i=0),(n|=0)<0&&(n=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=i,this.contentHeight=n,this.scrollHeight=Math.max(i,n)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class Ji extends d.JT{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new h.Q5),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new Qi(0,0,0,0),this._scrollable=this._register(new Gi.Rm(e,t)),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const i=t.contentWidth!==e.contentWidth,n=t.contentHeight!==e.contentHeight;(i||n)&&this._onDidContentSizeChange.fire(new Oi(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}}class en extends d.JT{constructor(e,t,i){super(),this._configuration=e;const n=this._configuration.options,o=n.get(128),r=n.get(72);this._linesLayout=new Xi(t,n.get(56),r.top,r.bottom),this._scrollable=this._register(new Ji(0,i)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new Qi(o.contentWidth,0,o.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(101)?125:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(56)&&this._linesLayout.setLineHeight(t.get(56)),e.hasChanged(72)){const e=t.get(72);this._linesLayout.setPadding(e.top,e.bottom)}if(e.hasChanged(128)){const e=t.get(128),i=e.contentWidth,n=e.height,o=this._scrollable.getScrollDimensions(),r=o.contentWidth;this._scrollable.setScrollDimensions(new Qi(i,o.contentWidth,n,this._getContentHeight(i,n,r)))}else this._updateHeight();e.hasChanged(101)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){const i=this._configuration.options.get(90);return 2===i.horizontal||e>=t?0:i.horizontalScrollbarSize}_getContentHeight(e,t,i){const n=this._configuration.options;let o=this._linesLayout.getLinesTotalHeight();return n.get(92)?o+=Math.max(0,t-n.get(56)-n.get(72).bottom):o+=this._getHorizontalScrollbarHeight(e,i),o}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,i=e.height,n=e.contentWidth;this._scrollable.setScrollDimensions(new Qi(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new St.l_(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new St.l_(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(e){const t=this._configuration.options,i=t.get(129),n=t.get(40);if(i.isViewportWrapping){const i=t.get(128),o=t.get(62);return e>i.contentWidth+n.typicalHalfwidthCharacterWidth&&o.enabled&&"right"===o.side?e+i.verticalScrollbarWidth:e}{const i=t.get(91)*n.typicalHalfwidthCharacterWidth,o=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+i,o)}}setMaxLineWidth(e){const t=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new Qi(t.width,this._computeContentWidth(e),t.height,t.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition();let t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i),scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e){return this._linesLayout.getVerticalOffsetForLineNumber(e)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const t=this._scrollable.getScrollDimensions();return e+t.height>t.scrollHeight&&(e=t.scrollHeight-t.height),e<0&&(e=0),this._linesLayout.getLinesViewportData(e,e+t.height)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){1===t?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}deltaScrollNow(e,t){const i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})}}var tn=i(3411),nn=i(3544);class on{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column)}convertModelRangeToViewRange(e){return this._lines.convertModelRangeToViewRange(e)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}}class rn{constructor(e){this._counts=e,this._isValid=!1,this._validEndIndex=-1,this._modelToView=[],this._viewToModel=[]}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._counts.length;e0?this._modelToView[e-1]:0;this._modelToView[e]=i+t;for(let n=0;n0?this._modelToView[t-1]:0;return new nn.T(t,e-i)}}class sn{constructor(e,t,i,n,o,r,s,a){this.model=e,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=t,this._monospaceLineBreaksComputerFactory=i,this.fontInfo=n,this.tabSize=o,this.wrappingStrategy=r,this.wrappingColumn=s,this.wrappingIndent=a,this._constructLines(!0,null)}dispose(){this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,[])}createCoordinatesConverter(){return new on(this)}_constructLines(e,t){this.lines=[],e&&(this.hiddenAreasIds=[]);let i=this.model.getLinesContent();const n=i.length,o=this.createLineBreaksComputer();for(let e=0;ethis.model.getDecorationRange(e))).sort(ne.e.compareRangesUsingStarts),l=1,c=0,u=-1,h=u+1=l&&t<=c,o=gn(r[e],!i);s[e]=o.getViewLineCount(),this.lines[e]=o}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new rn(s)}getHiddenAreas(){return this.hiddenAreasIds.map((e=>this.model.getDecorationRange(e)))}_reduceRanges(e){if(0===e.length)return[];let t=e.map((e=>this.model.validateRange(e))).sort(ne.e.compareRangesUsingStarts),i=[],n=t[0].startLineNumber,o=t[0].endLineNumber;for(let e=1,r=t.length;eo+1?(i.push(new ne.e(n,1,o,1)),n=r.startLineNumber,o=r.endLineNumber):r.endLineNumber>o&&(o=r.endLineNumber)}return i.push(new ne.e(n,1,o,1)),i}setHiddenAreas(e){let t=this._reduceRanges(e),i=this.hiddenAreasIds.map((e=>this.model.getDecorationRange(e))).sort(ne.e.compareRangesUsingStarts);if(t.length===i.length){let e=!1;for(let n=0;n=r&&t<=s?this.lines[e].isVisible()&&(this.lines[e]=this.lines[e].setVisible(!1),i=!0):(c=!0,this.lines[e].isVisible()||(this.lines[e]=this.lines[e].setVisible(!0),i=!0)),i){let t=this.lines[e].getViewLineCount();this.prefixSumComputer.changeValue(e,t)}}return c||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return!(e<1||e>this.lines.length)&&this.lines[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.lines.length?1:this.lines[e-1].getViewLineCount()}setTabSize(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,i,n){const o=this.fontInfo.equals(e),r=this.wrappingStrategy===t,s=this.wrappingColumn===i,a=this.wrappingIndent===n;if(o&&r&&s&&a)return!1;const l=o&&r&&!s&&a;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n;let c=null;if(l){c=[];for(let e=0,t=this.lines.length;e2&&!this.lines[t-2].isVisible();let r=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,s=0,a=[],l=[];for(let e=0,t=n.length;es?(l=1===t?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,c=l+s-1,d=c+1,g=d+(o-s)-1,a=!0):ot?t:0|e}getActiveIndentGuide(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),i=this._toValidViewLineNumber(i);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),o=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),r=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),s=this.model.getActiveIndentGuide(n.lineNumber,o.lineNumber,r.lineNumber),a=this.convertModelPositionToViewPosition(s.startLineNumber,1),l=this.convertModelPositionToViewPosition(s.endLineNumber,this.model.getLineMaxColumn(s.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:l.lineNumber,indent:s.indent}}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),n=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let o=[],r=[],s=[];const a=i.lineNumber-1,l=n.lineNumber-1;let c=null;for(let e=a;e<=l;e++){const t=this.lines[e];if(t.isVisible()){let n=t.getViewLineNumberOfModelPosition(0,e===a?i.column:1),o=t.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(e+1)),l=o-n+1,u=0;l>1&&1===t.getViewLineMinColumn(this.model,e+1,o)&&(u=0===n?1:2),r.push(l),s.push(u),null===c&&(c=new ie.L(e+1,0))}else null!==c&&(o=o.concat(this.model.getLinesIndentGuides(c.lineNumber,e)),c=null)}null!==c&&(o=o.concat(this.model.getLinesIndentGuides(c.lineNumber,n.lineNumber)),c=null);const u=t-e+1;let h=new Array(u),d=0;for(let e=0,t=o.length;et&&(h=!0,u=t-o+1);let d=c+u;if(l.getViewLinesData(this.model,n+1,c,d,o-e,i,a),o+=u,h)break}return a}validateViewPosition(e,t,i){e=this._toValidViewLineNumber(e);let n=this.prefixSumComputer.getIndexOf(e-1),o=n.index,r=n.remainder,s=this.lines[o],a=s.getViewLineMinColumn(this.model,o+1,r),l=s.getViewLineMaxColumn(this.model,o+1,r);tl&&(t=l);let c=s.getModelColumnOfViewPosition(r,t);return this.model.validatePosition(new ie.L(o+1,c)).equals(i)?new ie.L(e,t):this.convertModelPositionToViewPosition(i.lineNumber,i.column)}validateViewRange(e,t){const i=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),n=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new ne.e(i.lineNumber,i.column,n.lineNumber,n.column)}convertViewPositionToModelPosition(e,t){e=this._toValidViewLineNumber(e);let i=this.prefixSumComputer.getIndexOf(e-1),n=i.index,o=i.remainder,r=this.lines[n].getModelColumnOfViewPosition(o,t);return this.model.validatePosition(new ie.L(n+1,r))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new ne.e(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t){const i=this.model.validatePosition(new ie.L(e,t)),n=i.lineNumber,o=i.column;let r=n-1,s=!1;for(;r>0&&!this.lines[r].isVisible();)r--,s=!0;if(0===r&&!this.lines[r].isVisible())return new ie.L(1,1);const a=1+(0===r?0:this.prefixSumComputer.getAccumulatedValue(r-1));let l;return l=s?this.lines[r].getViewPositionOfModelPosition(a,this.model.getLineMaxColumn(r+1)):this.lines[n-1].getViewPositionOfModelPosition(a,o),l}convertModelRangeToViewRange(e){let t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn),i=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn);return e.startLineNumber===e.endLineNumber&&t.lineNumber!==i.lineNumber&&i.column===this.getViewLineMinColumn(i.lineNumber)?new ne.e(t.lineNumber,t.column,i.lineNumber-1,this.getViewLineMaxColumn(i.lineNumber-1)):new ne.e(t.lineNumber,t.column,i.lineNumber,i.column)}_getViewLineNumberForModelPosition(e,t){let i=e-1;if(this.lines[i].isVisible()){const e=1+(0===i?0:this.prefixSumComputer.getAccumulatedValue(i-1));return this.lines[i].getViewLineNumberOfModelPosition(e,t)}for(;i>0&&!this.lines[i].isVisible();)i--;if(0===i&&!this.lines[i].isVisible())return 1;const n=1+(0===i?0:this.prefixSumComputer.getAccumulatedValue(i-1));return this.lines[i].getViewLineNumberOfModelPosition(n,this.model.getLineMaxColumn(i+1))}getAllOverviewRulerDecorations(e,t,i){const n=this.model.getOverviewRulerDecorations(e,t),o=new mn;for(const e of n){const t=e.options.overviewRuler,n=t?t.position:0;if(0===n)continue;const r=t.getColor(i),s=this._getViewLineNumberForModelPosition(e.range.startLineNumber,e.range.startColumn),a=this._getViewLineNumberForModelPosition(e.range.endLineNumber,e.range.endColumn);o.accept(r,s,a,n)}return o.result}getDecorationsInRange(e,t,i){const n=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),o=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(o.lineNumber-n.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new ne.e(n.lineNumber,1,o.lineNumber,o.column),t,i);let r=[];const s=n.lineNumber-1,a=o.lineNumber-1;let l=null;for(let e=s;e<=a;e++)if(this.lines[e].isVisible())null===l&&(l=new ie.L(e+1,e===s?n.column:1));else if(null!==l){const n=this.model.getLineMaxColumn(e);r=r.concat(this.model.getDecorationsInRange(new ne.e(l.lineNumber,l.column,e,n),t,i)),l=null}null!==l&&(r=r.concat(this.model.getDecorationsInRange(new ne.e(l.lineNumber,l.column,o.lineNumber,o.column),t,i)),l=null),r.sort(((e,t)=>{const i=ne.e.compareRangesUsingStarts(e.range,t.range);return 0===i?e.idt.id?1:0:i}));let c=[],u=0,h=null;for(const e of r){const t=e.id;h!==t&&(h=t,c[u++]=e)}return c}normalizePosition(e,t){const i=this._toValidViewLineNumber(e.lineNumber),n=this.prefixSumComputer.getIndexOf(i-1),o=n.index,r=n.remainder;return this.lines[o].normalizePosition(this.model,o+1,r,e,t)}getLineIndentColumn(e){const t=this._toValidViewLineNumber(e),i=this.prefixSumComputer.getIndexOf(t-1),n=i.index;return 0===i.remainder?this.model.getLineIndentColumn(n+1):0}}class an{constructor(){}isVisible(){return!0}setVisible(e){return e?this:ln.INSTANCE}getLineBreakData(){return null}getViewLineCount(){return 1}getViewLineContent(e,t,i){return e.getLineContent(t)}getViewLineLength(e,t,i){return e.getLineLength(t)}getViewLineMinColumn(e,t,i){return e.getLineMinColumn(t)}getViewLineMaxColumn(e,t,i){return e.getLineMaxColumn(t)}getViewLineData(e,t,i){let n=e.getLineTokens(t),o=n.getLineContent();return new St.IP(o,!1,1,o.length+1,0,n.inflate())}getViewLinesData(e,t,i,n,o,r,s){r[o]?s[o]=this.getViewLineData(e,t,0):s[o]=null}getModelColumnOfViewPosition(e,t){return t}getViewPositionOfModelPosition(e,t){return new ie.L(e,t)}getViewLineNumberOfModelPosition(e,t){return e}normalizePosition(e,t,i,n,o){return n}}an.INSTANCE=new an;class ln{constructor(){}isVisible(){return!1}setVisible(e){return e?an.INSTANCE:this}getLineBreakData(){return null}getViewLineCount(){return 0}getViewLineContent(e,t,i){throw new Error("Not supported")}getViewLineLength(e,t,i){throw new Error("Not supported")}getViewLineMinColumn(e,t,i){throw new Error("Not supported")}getViewLineMaxColumn(e,t,i){throw new Error("Not supported")}getViewLineData(e,t,i){throw new Error("Not supported")}getViewLinesData(e,t,i,n,o,r,s){throw new Error("Not supported")}getModelColumnOfViewPosition(e,t){throw new Error("Not supported")}getViewPositionOfModelPosition(e,t){throw new Error("Not supported")}getViewLineNumberOfModelPosition(e,t){throw new Error("Not supported")}normalizePosition(e,t,i,n,o){throw new Error("Not supported")}}ln.INSTANCE=new ln;class cn{constructor(e,t){this._lineBreakData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getLineBreakData(){return this._lineBreakData}getViewLineCount(){return this._isVisible?this._lineBreakData.breakOffsets.length:0}getInputStartOffsetOfOutputLineIndex(e){return St.le.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets,e,0)}getInputEndOffsetOfOutputLineIndex(e,t,i){return i+1===this._lineBreakData.breakOffsets.length?e.getLineMaxColumn(t)-1:St.le.getInputOffsetOfOutputPosition(this._lineBreakData.breakOffsets,i+1,0)}getViewLineContent(e,t,i){if(!this._isVisible)throw new Error("Not supported");let n=this.getInputStartOffsetOfOutputLineIndex(i),o=this.getInputEndOffsetOfOutputLineIndex(e,t,i),r=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:o+1});return i>0&&(r=hn(this._lineBreakData.wrappedTextIndentLength)+r),r}getViewLineLength(e,t,i){if(!this._isVisible)throw new Error("Not supported");let n=this.getInputStartOffsetOfOutputLineIndex(i),o=this.getInputEndOffsetOfOutputLineIndex(e,t,i)-n;return i>0&&(o=this._lineBreakData.wrappedTextIndentLength+o),o}getViewLineMinColumn(e,t,i){if(!this._isVisible)throw new Error("Not supported");return this._getViewLineMinColumn(i)}_getViewLineMinColumn(e){return e>0?this._lineBreakData.wrappedTextIndentLength+1:1}getViewLineMaxColumn(e,t,i){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineLength(e,t,i)+1}getViewLineData(e,t,i){if(!this._isVisible)throw new Error("Not supported");let n=this.getInputStartOffsetOfOutputLineIndex(i),o=this.getInputEndOffsetOfOutputLineIndex(e,t,i),r=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:o+1});i>0&&(r=hn(this._lineBreakData.wrappedTextIndentLength)+r);let s=i>0?this._lineBreakData.wrappedTextIndentLength+1:1,a=r.length+1,l=i+10&&(c=this._lineBreakData.wrappedTextIndentLength);let u=e.getLineTokens(t);const h=0===i?0:this._lineBreakData.breakOffsetsVisibleColumn[i-1];return new St.IP(r,l,s,a,h,u.sliceAndInflate(n,o,c))}getViewLinesData(e,t,i,n,o,r,s){if(!this._isVisible)throw new Error("Not supported");for(let a=i;a0&&(i0&&(o+=this._lineBreakData.wrappedTextIndentLength),new ie.L(e+n,o)}getViewLineNumberOfModelPosition(e,t){if(!this._isVisible)throw new Error("Not supported");return e+St.le.getOutputPositionOfInputOffset(this._lineBreakData.breakOffsets,t-1).outputLineIndex}normalizePosition(e,t,i,n,o){if(0===o){if(i>0&&n.column===this._getViewLineMinColumn(i))return new ie.L(n.lineNumber-1,this.getViewLineMaxColumn(e,t,i-1))}else if(1===o&&i=un.length)for(let t=1;t<=e;t++)un[t]=dn(t);return un[e]}function dn(e){return new Array(e+1).join(" ")}function gn(e,t){return null===e?t?an.INSTANCE:ln.INSTANCE:new cn(e,t)}class fn{constructor(e){this._lines=e}_validPosition(e){return this._lines.model.validatePosition(e)}_validRange(e){return this._lines.model.validateRange(e)}convertViewPositionToModelPosition(e){return this._validPosition(e)}convertViewRangeToModelRange(e){return this._validRange(e)}validateViewPosition(e,t){return this._validPosition(t)}validateViewRange(e,t){return this._validRange(t)}convertModelPositionToViewPosition(e){return this._validPosition(e)}convertModelRangeToViewRange(e){return this._validRange(e)}modelPositionIsVisible(e){const t=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t)}getModelLineViewLineCount(e){return 1}}class pn{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new fn(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,i,n){return!1}createLineBreaksComputer(){let e=[];return{addRequest:(t,i)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,i){return new ki(t,i)}onModelLinesInserted(e,t,i,n){return new Di(t,i)}onModelLineChanged(e,t,i){return[!1,new xi(t,t),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,i){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesIndentGuides(e,t){const i=t-e+1;let n=new Array(i);for(let e=0;e=t)return void(i>r&&(o[o.length-1]=i));o.push(n,t,i)}else this.result[e]=[n,t,i]}}class _n{constructor(e,t,i,n,o){this.editorId=e,this.model=t,this.configuration=i,this._linesCollection=n,this._coordinatesConverter=o,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const t=e.id;let i=this._decorationsCache[t];if(!i){const n=e.range,o=e.options;let r;if(o.isWholeLine){const e=this._coordinatesConverter.convertModelPositionToViewPosition(new ie.L(n.startLineNumber,1)),t=this._coordinatesConverter.convertModelPositionToViewPosition(new ie.L(n.endLineNumber,this.model.getLineMaxColumn(n.endLineNumber)));r=new ne.e(e.lineNumber,e.column,t.lineNumber,t.column)}else r=this._coordinatesConverter.convertModelRangeToViewRange(n);i=new St.$l(r,o),this._decorationsCache[t]=i}return i}getDecorationsViewportData(e){let t=null!==this._cachedModelDecorationsResolver;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}_getDecorationsViewportData(e){const t=this._linesCollection.getDecorationsInRange(e,this.editorId,(0,j.$J)(this.configuration.options)),i=e.startLineNumber,n=e.endLineNumber;let o=[],r=0,s=[];for(let e=i;e<=n;e++)s[e-i]=[];for(let e=0,a=t.length;ethis.tokenizeViewport()),50)),this._updateConfigurationViewLineCount=this._register(new C.pY((()=>this._updateConfigurationViewLineCountNow()),0)),this._hasFocus=!1,this._viewportStartLine=-1,this._viewportStartLineTrackedRange=null,this._viewportStartLineDelta=0,this.model.isTooLargeForTokenization())this._lines=new pn(this.model);else{const e=this._configuration.options,t=e.get(40),i=e.get(122),r=e.get(129),s=e.get(121);this._lines=new sn(this.model,n,o,t,this.model.getOptions().tabSize,i,r.wrappingColumn,s)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new $i(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new en(this._configuration,this.getLineCount(),r)),this._register(this.viewLayout.onDidScroll((e=>{e.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),this._eventDispatcher.emitSingleViewEvent(new Ni(e)),this._eventDispatcher.emitOutgoingEvent(new Pi(e.oldScrollWidth,e.oldScrollLeft,e.oldScrollHeight,e.oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop))}))),this._register(this.viewLayout.onDidContentSizeChange((e=>{this._eventDispatcher.emitOutgoingEvent(e)}))),this._decorations=new _n(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}}))),this._register(Ct.getInstance().onDidChange((()=>{this._eventDispatcher.emitSingleViewEvent(new Mi)}))),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this.invalidateMinimapColorCache(),this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,null,1),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}tokenizeViewport(){const e=this.viewLayout.getLinesViewportData(),t=this.coordinatesConverter.convertViewPositionToModelPosition(new ie.L(e.startLineNumber,1)),i=this.coordinatesConverter.convertViewPositionToModelPosition(new ie.L(e.endLineNumber,1));this.model.tokenizeViewport(t.lineNumber,i.lineNumber)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new wi(e)),this._eventDispatcher.emitOutgoingEvent(new Fi(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new pi)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new mi)}onDidColorThemeChange(){this._eventDispatcher.emitSingleViewEvent(new Ei)}_onConfigurationChanged(e,t){let i=null;if(-1!==this._viewportStartLine){let e=new ie.L(this._viewportStartLine,this.getLineMinColumn(this._viewportStartLine));i=this.coordinatesConverter.convertViewPositionToModelPosition(e)}let n=!1;const o=this._configuration.options,r=o.get(40),s=o.get(122),a=o.get(129),l=o.get(121);if(this._lines.setWrappingSettings(r,s,a.wrappingColumn,l)&&(e.emitViewEvent(new yi),e.emitViewEvent(new Si),e.emitViewEvent(new bi(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),0!==this.viewLayout.getCurrentScrollTop()&&(n=!0),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(78)&&(this._decorations.reset(),e.emitViewEvent(new bi(null))),e.emitViewEvent(new _i(t)),this.viewLayout.onConfigurationChanged(t),n&&i){const e=this.coordinatesConverter.convertModelPositionToViewPosition(i),t=this.viewLayout.getVerticalOffsetForLineNumber(e.lineNumber);this.viewLayout.setScrollPosition({scrollTop:t+this._viewportStartLineDelta},1)}oe.LM.shouldRecreate(t)&&(this.cursorConfig=new oe.LM(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeRawContentFast((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();let i=!1,n=!1;const o=e.changes,r=e.versionId,s=this._lines.createLineBreaksComputer();for(const e of o)switch(e.changeType){case 4:for(const t of e.detail)s.addRequest(t,null);break;case 2:s.addRequest(e.detail,null)}const a=s.finalize();let l=0;for(const e of o)switch(e.changeType){case 1:this._lines.onModelFlushed(),t.emitViewEvent(new yi),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),i=!0;break;case 3:{const n=this._lines.onModelLinesDeleted(r,e.fromLineNumber,e.toLineNumber);null!==n&&(t.emitViewEvent(n),this.viewLayout.onLinesDeleted(n.fromLineNumber,n.toLineNumber)),i=!0;break}case 4:{const n=a.slice(l,l+e.detail.length);l+=e.detail.length;const o=this._lines.onModelLinesInserted(r,e.fromLineNumber,e.toLineNumber,n);null!==o&&(t.emitViewEvent(o),this.viewLayout.onLinesInserted(o.fromLineNumber,o.toLineNumber)),i=!0;break}case 2:{const i=a[l];l++;const[o,s,c,u]=this._lines.onModelLineChanged(r,e.lineNumber,i);n=o,s&&t.emitViewEvent(s),c&&(t.emitViewEvent(c),this.viewLayout.onLinesInserted(c.fromLineNumber,c.toLineNumber)),u&&(t.emitViewEvent(u),this.viewLayout.onLinesDeleted(u.fromLineNumber,u.toLineNumber));break}}this._lines.acceptVersionId(r),this.viewLayout.onHeightMaybeChanged(),!i&&n&&(t.emitViewEvent(new Si),t.emitViewEvent(new bi(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}if(this._viewportStartLine=-1,this._configuration.setMaxLineNumber(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&this._viewportStartLineTrackedRange){const e=this.model._getTrackedRange(this._viewportStartLineTrackedRange);if(e){const t=this.coordinatesConverter.convertModelPositionToViewPosition(e.getStartPosition()),i=this.viewLayout.getVerticalOffsetForLineNumber(t.lineNumber);this.viewLayout.setScrollPosition({scrollTop:i+this._viewportStartLineDelta},1)}}try{const t=this._eventDispatcher.beginEmitViewEvents();this._cursor.onModelContentChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}}))),this._register(this.model.onDidChangeTokens((e=>{let t=[];for(let i=0,n=e.ranges.length;i{this._eventDispatcher.emitSingleViewEvent(new Ci),this.cursorConfig=new oe.LM(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)}))),this._register(this.model.onDidChangeLanguage((e=>{this.cursorConfig=new oe.LM(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)}))),this._register(this.model.onDidChangeOptions((e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const e=this._eventDispatcher.beginEmitViewEvents();e.emitViewEvent(new yi),e.emitViewEvent(new Si),e.emitViewEvent(new bi(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new oe.LM(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)}))),this._register(this.model.onDidChangeDecorations((e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new bi(e))})))}setHiddenAreas(e){try{const t=this._eventDispatcher.beginEmitViewEvents();this._lines.setHiddenAreas(e)&&(t.emitViewEvent(new yi),t.emitViewEvent(new Si),t.emitViewEvent(new bi(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(128),t=this._configuration.options.get(56),i=Math.max(20,Math.round(e.height/t)),n=this.viewLayout.getLinesViewportData(),o=Math.max(1,n.completelyVisibleStartLineNumber-i),r=Math.min(this.getLineCount(),n.completelyVisibleEndLineNumber+i);return this._toModelVisibleRanges(new ne.e(o,this.getLineMinColumn(o),r,this.getLineMaxColumn(r)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),i=this._lines.getHiddenAreas();if(0===i.length)return[t];let n=[],o=0,r=t.startLineNumber,s=t.startColumn,a=t.endLineNumber,l=t.endColumn;for(let e=0,t=i.length;ea||(re.startLineNumber));let o="";for(let e=0;e0&&i[e-1]===i[e]||(o+=this.model.getLineContent(i[e])+n);return o}if(o&&t){let t=[],n=0;for(const o of e){const e=o.startLineNumber;o.isEmpty()?e!==n&&t.push(this.model.getLineContent(e)):t.push(this.model.getValueInRange(o,i?2:0)),n=e}return 1===t.length?t[0]:t}let s=[];for(const t of e)t.isEmpty()||s.push(this.model.getValueInRange(t,i?2:0));return 1===s.length?s[0]:s}getRichTextToCopy(e,t){const i=this.model.getLanguageIdentifier();if(1===i.id)return null;if(1!==e.length)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const e=n.startLineNumber;n=new ne.e(e,this.model.getLineMinColumn(e),e,this.model.getLineMaxColumn(e))}const o=this._configuration.options.get(40),r=this._getColorMap();let s;return/[:;\\\/<>]/.test(o.fontFamily)||o.fontFamily===j.hL.fontFamily?s=j.hL.fontFamily:(s=o.fontFamily,s=s.replace(/"/g,"'"),/[,']/.test(s)||/[+ ]/.test(s)&&(s=`'${s}'`),s=`${s}, ${j.hL.fontFamily}`),{mode:i.language,html:`
    `+this._getHTMLToCopy(n,r)+"
    "}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,r=e.endColumn,s=this.getTabSize();let a="";for(let e=i;e<=o;e++){const l=this.model.getLineTokens(e),c=l.getLineContent(),u=e===i?n-1:0,h=e===o?r-1:c.length;a+=""===c?"
    ":(0,Ki.F)(c,l.inflate(),t,u,h,s,b.ED)}return a}_getColorMap(){let e=wt.RW.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;ithis._cursor.setStates(n,e,t,i)))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,i=0){this._withViewEventsCollector((n=>this._cursor.setSelections(n,e,t,i)))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector((t=>this._cursor.restoreState(t,e)))}_executeCursorEdit(e){this._cursor.context.cursorConfig.readOnly?this._eventDispatcher.emitOutgoingEvent(new Wi):this._withViewEventsCollector(e)}executeEdits(e,t,i){this._executeCursorEdit((n=>this._cursor.executeEdits(n,e,t,i)))}startComposition(){this._cursor.setIsDoingComposition(!0),this._executeCursorEdit((e=>this._cursor.startComposition(e)))}endComposition(e){this._cursor.setIsDoingComposition(!1),this._executeCursorEdit((t=>this._cursor.endComposition(t,e)))}type(e,t){this._executeCursorEdit((i=>this._cursor.type(i,e,t)))}compositionType(e,t,i,n,o){this._executeCursorEdit((r=>this._cursor.compositionType(r,e,t,i,n,o)))}paste(e,t,i,n){this._executeCursorEdit((o=>this._cursor.paste(o,e,t,i,n)))}cut(e){this._executeCursorEdit((t=>this._cursor.cut(t,e)))}executeCommand(e,t){this._executeCursorEdit((i=>this._cursor.executeCommand(i,e,t)))}executeCommands(e,t){this._executeCursorEdit((i=>this._cursor.executeCommands(i,e,t)))}revealPrimaryCursor(e,t){this._withViewEventsCollector((i=>this._cursor.revealPrimary(i,e,t,0)))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),i=new ne.e(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new Li(e,i,null,0,!0,0))))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new ne.e(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new Li(e,i,null,0,!0,0))))}revealRange(e,t,i,n,o){this._withViewEventsCollector((r=>r.emitViewEvent(new Li(e,i,null,n,t,o))))}getVerticalOffsetForLineNumber(e){return this.viewLayout.getVerticalOffsetForLineNumber(e)}getScrollTop(){return this.viewLayout.getCurrentScrollTop()}setScrollTop(e,t){this.viewLayout.setScrollPosition({scrollTop:e},t)}setScrollPosition(e,t){this.viewLayout.setScrollPosition(e,t)}deltaScrollNow(e,t){this.viewLayout.deltaScrollNow(e,t)}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new Ii),this._eventDispatcher.emitOutgoingEvent(new Bi))}setMaxLineWidth(e){this.viewLayout.setMaxLineWidth(e)}_withViewEventsCollector(e){try{e(this._eventDispatcher.beginEmitViewEvents())}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}}var bn=i(4565),yn=i(8819),wn=i(2065),Cn=i(972),Sn=i(9422),xn=i(1106),kn=i(8401),Dn=i(4906);class Ln extends Dn.N{constructor(e,t){super(0);for(let t=0;t=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let Nn=[],En=[];class An{constructor(e,t){this.classifier=new Ln(e,t)}static create(e){return new An(e.get(117),e.get(116))}createLineBreaksComputer(e,t,i,n){t|=0,i=+i;let o=[],r=[];return{addRequest:(e,t)=>{o.push(e),r.push(t)},finalize:()=>{const s=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth;let a=[];for(let e=0,l=o.length;e=0){let e=Math.abs(c[b]-_);for(;b+1=e)break;e=t,b++}}for(;bt&&(t=p,o=m);let s=0,u=0,y=0,w=0;if(o<=_){let m=o,v=0===t?0:i.charCodeAt(t-1),b=0===t?0:e.get(v),C=!0;for(let o=t;op&&On(0,b,a,l)&&(s=t,u=m),m+=c,m>_){t>p?(y=t,w=m-c):(y=o+1,w=m),m-u>h&&(s=0),C=!1;break}v=a,b=l}if(C){f>0&&(d[f]=l[l.length-1],g[f]=c[l.length-1],f++);break}}if(0===s){let a=o,l=i.charCodeAt(t),c=e.get(l),d=!1;for(let n=t-1;n>=p;n--){const t=n+1,o=i.charCodeAt(n);if(9===o){d=!0;break}let g,f;if(Le.YK(o)?(n--,g=0,f=2):(g=e.get(o),f=Le.K7(o)?r:1),a<=_){if(0===y&&(y=t,w=a),a<=_-h)break;if(On(0,g,l,c)){s=t,u=a;break}}a-=f,l=o,c=g}if(0!==s){const e=h-(w-u);if(e<=n){const t=i.charCodeAt(y);let o;o=Le.ZG(t)?2:Tn(t,w,n,r),e-o<0&&(s=0)}}if(d){b--;continue}}if(0===s&&(s=y,u=w),s<=p){const e=i.charCodeAt(p);Le.ZG(e)?(s=p+2,u=m+2):(s=p+1,u=m+Tn(e,m,n,r))}for(p=s,d[f]=s,m=u,g[f]=u,f++,_=u+h;b<0||b=C)break;C=e,b++}}return 0===f?null:(d.length=f,g.length=f,Nn=t.breakOffsets,En=t.breakOffsetsVisibleColumn,t.breakOffsets=d,t.breakOffsetsVisibleColumn=g,t.wrappedTextIndentLength=u,t)}function In(e,t,i,n,o,r){if(-1===n)return null;const s=t.length;if(s<=1)return null;const a=Fn(t,i,n,o,r),l=n-a;let c=[],u=[],h=0,d=0,g=0,f=n,p=t.charCodeAt(0),m=e.get(p),_=Tn(p,0,i,o),v=1;Le.ZG(p)&&(_+=1,p=t.charCodeAt(1),m=e.get(p),v++);for(let n=v;nf&&((0===d||_-g>l)&&(d=r,g=_-v),c[h]=d,u[h]=g,h++,f=g+l,d=0),p=s,m=a}return 0===h?null:(c[h]=s,u[h]=_,new St.le(c,u,a))}function Tn(e,t,i,n){return 9===e?i-t%i:Le.K7(e)||e<32?n:1}function Rn(e,t){return t-e%t}function On(e,t,i,n){return 32!==i&&(2===t||3===t&&2!==n||1===n||3===n&&1!==t)}function Fn(e,t,i,n,o){let r=0;if(0!==o){const s=Le.LC(e);if(-1!==s){for(let i=0;ii&&(r=0)}}return r}var Pn;const Bn=null===(Pn=window.trustedTypes)||void 0===Pn?void 0:Pn.createPolicy("domLineBreaksComputer",{createHTML:e=>e});class zn{static create(){return new zn}constructor(){}createLineBreaksComputer(e,t,i,n){t|=0,i=+i;let o=[];return{addRequest:(e,t)=>{o.push(e)},finalize:()=>function(e,t,i,n,o){var r;if(-1===n){const t=[];for(let i=0,n=e.length;is?(a=0,f=0):p=s-e}const m=r.substr(a),_=Wn(m,f,i,p,l);c[n]=a,u[n]=f,h[n]=m,d[n]=_[0],g[n]=_[1]}const p=l.build(),m=null!==(r=null==Bn?void 0:Bn.createHTML(p))&&void 0!==r?r:p;a.innerHTML=m,a.style.position="absolute",a.style.top="10000",a.style.wordWrap="break-word",document.body.appendChild(a);let _=document.createRange();const v=Array.prototype.slice.call(a.children,0);let b=[];for(let t=0;t');const r=e.length;let s=t,a=0,l=[],c=[],u=0");for(let t=0;t"),l[t]=a,c[t]=s;const n=u;u=t+1"),l[e.length]=a,c[e.length]=s,o.appendASCIIString(""),[l,c]}function Vn(e,t,i,n){if(i.length<=1)return null;const o=Array.prototype.slice.call(t.children,0),r=[];try{Hn(e,o,n,0,null,i.length-1,null,r)}catch(e){return console.log(e),null}return 0===r.length?null:(r.push(i.length),r)}function Hn(e,t,i,n,o,r,s,a){if(n===r)return;if(o=o||$n(e,t,i[n],i[n+1]),s=s||$n(e,t,i[r],i[r+1]),Math.abs(o[0].top-s[0].top)<=.1)return;if(n+1===r)return void a.push(r);const l=n+(r-n)/2|0,c=$n(e,t,i[l],i[l+1]);Hn(e,t,i,n,o,l,c,a),Hn(e,t,i,l,c,r,s,a)}function $n(e,t,i,n){return e.setStart(t[i/16384|0].firstChild,i%16384),e.setEnd(t[n/16384|0].firstChild,n%16384),e.getClientRects()}var Un=i(5795),jn=function(e,t){return function(i,n){t(i,n,e)}};let qn=0;class Kn{constructor(e,t,i,n,o){this.model=e,this.viewModel=t,this.view=i,this.hasRealView=n,this.listenersToRemove=o}dispose(){(0,d.B9)(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let Gn=class e extends d.JT{constructor(e,t,i,n,r,s,a,l,c,d){super(),this._onDidDispose=this._register(new h.Q5),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new h.Q5),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new h.Q5),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new h.Q5),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new h.Q5),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new h.Q5),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeConfiguration=this._register(new h.Q5),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new h.Q5),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new h.Q5),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new h.Q5),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new h.Q5),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new h.Q5),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new Yn),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new Yn),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new h.Q5),this.onWillType=this._onWillType.event,this._onDidType=this._register(new h.Q5),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new h.Q5),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new h.Q5),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new h.Q5),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new h.Q5),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new h.Q5),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new h.Q5),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new h.Q5),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new h.Q5),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onContextMenu=this._register(new h.Q5),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new h.Q5),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new h.Q5),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new h.Q5),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new h.Q5),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new h.Q5),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new h.Q5),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new h.Q5),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new h.Q5),this.onDidChangeViewZones=this._onDidChangeViewZones.event;const g=Object.assign({},t);let f;this._domElement=e,this._overflowWidgetsDomNode=g.overflowWidgetsDomNode,delete g.overflowWidgetsDomNode,this._id=++qn,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this.isSimpleWidget=i.isSimpleWidget||!1,this._telemetryData=i.telemetryData,this._configuration=this._register(this._createConfiguration(g,d)),this._register(this._configuration.onDidChange((e=>{this._onDidChangeConfiguration.fire(e);const t=this._configuration.options;if(e.hasChanged(128)){const e=t.get(128);this._onDidLayoutChange.fire(e)}}))),this._contextKeyService=this._register(a.createScoped(this._domElement)),this._notificationService=c,this._codeEditorService=r,this._commandService=s,this._themeService=l,this._register(new Zn(this,this._contextKeyService)),this._register(new Xn(this,this._contextKeyService)),this._instantiationService=n.createChild(new Cn.y([yn.i6,this._contextKeyService])),this._modelData=null,this._contributions={},this._actions={},this._focusTracker=new Qn(e),this._focusTracker.onChange((()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={},f=Array.isArray(i.contributions)?i.contributions:o.Uc.getEditorContributions();for(const e of f)if(this._contributions[e.id])(0,u.dL)(new Error(`Cannot have two contributions with the same id ${e.id}`));else try{const t=this._instantiationService.createInstance(e.ctor,this);this._contributions[e.id]=t}catch(e){(0,u.dL)(e)}o.Uc.getEditorActions().forEach((e=>{if(this._actions[e.id])return void(0,u.dL)(new Error(`Cannot have two actions with the same id ${e.id}`));const t=new Ui.p(e.id,e.label,e.alias,(0,kn.f6)(e.precondition),(()=>this._instantiationService.invokeFunction((t=>Promise.resolve(e.runEditorCommand(t,this,null))))),this._contextKeyService);this._actions[t.id]=t})),this._codeEditorService.addCodeEditor(this)}_createConfiguration(e,t){return new f.V(this.isSimpleWidget,e,this._domElement,t)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return ji.g.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();const e=Object.keys(this._contributions);for(let t=0,i=e.length;tne.e.lift(e))))}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return oe.io.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e){if(this._modelData){if(!ie.L.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections("api",[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!ne.e.isIRange(e))throw new Error("Invalid arguments");const o=this._modelData.model.validateRange(e),r=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(o);this._modelData.viewModel.revealRange("api",i,r,t,n)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,i){if("number"!=typeof e)throw new Error("Invalid arguments");this._sendRevealRange(new ne.e(e,1,e,1),t,!1,i)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,i,n){if(!ie.L.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new ne.e(e.lineNumber,e.column,e.lineNumber,e.column),t,i,n)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e){const t=_.Y.isISelection(e),i=ne.e.isIRange(e);if(!t&&!i)throw new Error("Invalid arguments");if(t)this._setSelectionImpl(e);else if(i){const t={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(t)}}_setSelectionImpl(e){if(!this._modelData)return;const t=new _.Y(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections("api",[t])}revealLines(e,t,i=0){this._revealLines(e,t,0,i)}revealLinesInCenter(e,t,i=0){this._revealLines(e,t,1,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._revealLines(e,t,2,i)}revealLinesNearTop(e,t,i=0){this._revealLines(e,t,5,i)}_revealLines(e,t,i,n){if("number"!=typeof e||"number"!=typeof t)throw new Error("Invalid arguments");this._sendRevealRange(new ne.e(e,1,t,1),i,!1,n)}revealRange(e,t=0,i=!1,n=!0){this._revealRange(e,i?1:0,n,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,i,n){if(!ne.e.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(ne.e.lift(e),t,i,n)}setSelections(e,t="api",i=0){if(this._modelData){if(!e||0===e.length)throw new Error("Invalid arguments");for(let t=0,i=e.length;te.isSupported())),e}getAction(e){return this._actions[e]||null}trigger(e,t,i){switch(i=i||{},t){case"compositionStart":return void this._startComposition();case"compositionEnd":return void this._endComposition(e);case"type":{const t=i;return void this._type(e,t.text||"")}case"replacePreviousChar":{const t=i;return void this._compositionType(e,t.text||"",t.replaceCharCnt||0,0,0)}case"compositionType":{const t=i;return void this._compositionType(e,t.text||"",t.replacePrevCharCnt||0,t.replaceNextCharCnt||0,t.positionDelta||0)}case"paste":{const t=i;return void this._paste(e,t.text||"",t.pasteOnNewLine||!1,t.multicursorText||null,t.mode||null)}case"cut":return void this._cut(e)}const n=this.getAction(t);n?Promise.resolve(n.run()).then(void 0,u.dL):this._modelData&&(this._triggerEditorCommand(e,t,i)||this._triggerCommand(t,i))}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){this._modelData&&0!==t.length&&("keyboard"===e&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),"keyboard"===e&&this._onDidType.fire(t))}_compositionType(e,t,i,n,o){this._modelData&&this._modelData.viewModel.compositionType(t,i,n,o,e)}_paste(e,t,i,n,o){if(!this._modelData||0===t.length)return;const r=this._modelData.viewModel.getSelection().getStartPosition();this._modelData.viewModel.paste(t,i,n,e);const s=this._modelData.viewModel.getSelection().getStartPosition();"keyboard"===e&&this._onDidPaste.fire({range:new ne.e(r.lineNumber,r.column,s.lineNumber,s.column),mode:o})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){const n=o.Uc.getEditorCommand(t);return!!n&&((i=i||{}).source=e,this._instantiationService.invokeFunction((e=>{Promise.resolve(n.runEditorCommand(e,this,i)).then(void 0,u.dL)})),!0)}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!!this._modelData&&!this._configuration.options.get(78)&&(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!!this._modelData&&!this._configuration.options.get(78)&&(this._modelData.model.popStackElement(),!0)}executeEdits(e,t,i){if(!this._modelData)return!1;if(this._configuration.options.get(78))return!1;let n;return n=i?Array.isArray(i)?()=>i:i:()=>null,this._modelData.viewModel.executeEdits(e,t,n),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,(0,j.$J)(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?0===e.length&&0===t.length?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){const t=this._decorationTypeKeysToIds[e];t&&this.deltaDecorations(t,[]),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(128)}createOverviewRuler(e){return this._modelData&&this._modelData.hasRealView?this._modelData.view.createOverviewRuler(e):null}getContainerDomNode(){return this._domElement}getDomNode(){return this._modelData&&this._modelData.hasRealView?this._modelData.view.domNode.domNode:null}delegateVerticalScrollbarMouseDown(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateVerticalScrollbarMouseDown(e)}layout(e){this._configuration.observeReferenceElement(e),this.render()}focus(){this._modelData&&this._modelData.hasRealView&&this._modelData.view.focus()}hasTextFocus(){return!(!this._modelData||!this._modelData.hasRealView)&&this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const i=this._contentWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(i)}}removeContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const e=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(e)}}addOverlayWidget(e){const t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const i=this._overlayWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(i)}}removeOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const e=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(e)}}changeViewZones(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getTargetAtClientPoint(e,t):null}getScrolledVisiblePosition(t){if(!this._modelData||!this._modelData.hasRealView)return null;const i=this._modelData.model.validatePosition(t),n=this._configuration.options,o=n.get(128);return{top:e._getVerticalOffsetForPosition(this._modelData,i.lineNumber,i.column)-this.getScrollTop(),left:this._modelData.view.getOffsetForColumn(i.lineNumber,i.column)+o.glyphMarginWidth+o.lineNumbersWidth+o.decorationsWidth-this.getScrollLeft(),height:n.get(56)}}getOffsetForColumn(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getOffsetForColumn(e,t):-1}render(e=!1){this._modelData&&this._modelData.hasRealView&&this._modelData.view.render(!0,e)}setAriaOptions(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.setAriaOptions(e)}applyFontInfo(e){f.V.applyFontInfoSlow(e,this._configuration.options.get(40))}_attachModel(e){if(!e)return void(this._modelData=null);const t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageIdentifier().language),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setMaxLineNumber(e.getLineCount()),e.onBeforeAttached();const i=new vn(this._id,this._configuration,e,zn.create(),An.create(this._configuration.options),(e=>c.jL(e)));t.push(e.onDidChangeDecorations((e=>this._onDidChangeModelDecorations.fire(e)))),t.push(e.onDidChangeLanguage((t=>{this._domElement.setAttribute("data-mode-id",e.getLanguageIdentifier().language),this._onDidChangeModelLanguage.fire(t)}))),t.push(e.onDidChangeLanguageConfiguration((e=>this._onDidChangeModelLanguageConfiguration.fire(e)))),t.push(e.onDidChangeContent((e=>this._onDidChangeModelContent.fire(e)))),t.push(e.onDidChangeOptions((e=>this._onDidChangeModelOptions.fire(e)))),t.push(e.onWillDispose((()=>this.setModel(null)))),t.push(i.onEvent((e=>{switch(e.kind){case 0:this._onDidContentSizeChange.fire(e);break;case 1:this._editorTextFocus.setValue(e.hasFocus);break;case 2:this._onDidScrollChange.fire(e);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidAttemptReadOnlyEdit.fire();break;case 5:{e.reachedMaxCursorCount&&this._notificationService.warn(l.N("cursors.maximum","The number of cursors has been limited to {0}.",$i.MAX_CURSOR_COUNT));const t=[];for(let i=0,n=e.selections.length;i{this._paste("keyboard",e,t,i,n)},type:e=>{this._type("keyboard",e)},compositionType:(e,t,i,n)=>{this._compositionType("keyboard",e,t,i,n)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:{paste:(e,t,i,n)=>{const o={text:e,pasteOnNewLine:t,multicursorText:i,mode:n};this._commandService.executeCommand("paste",o)},type:e=>{const t={text:e};this._commandService.executeCommand("type",t)},compositionType:(e,t,i,n)=>{if(i||n){const o={text:e,replacePrevCharCnt:t,replaceNextCharCnt:i,positionDelta:n};this._commandService.executeCommand("compositionType",o)}else{const i={text:e,replaceCharCnt:t};this._commandService.executeCommand("replacePreviousChar",i)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const i=new Ve(e.coordinatesConverter);return i.onKeyDown=e=>this._onKeyDown.fire(e),i.onKeyUp=e=>this._onKeyUp.fire(e),i.onContextMenu=e=>this._onContextMenu.fire(e),i.onMouseMove=e=>this._onMouseMove.fire(e),i.onMouseLeave=e=>this._onMouseLeave.fire(e),i.onMouseDown=e=>this._onMouseDown.fire(e),i.onMouseUp=e=>this._onMouseUp.fire(e),i.onMouseDrag=e=>this._onMouseDrag.fire(e),i.onMouseDrop=e=>this._onMouseDrop.fire(e),i.onMouseDropCanceled=e=>this._onMouseDropCanceled.fire(e),i.onMouseWheel=e=>this._onMouseWheel.fire(e),[new ui(t,this._configuration,this._themeService,e,i,this._overflowWidgetsDomNode),!0]}_postDetachModelCleanup(e){e&&e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&this._domElement.removeChild(t),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return null!==this._modelData}};Gn=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([jn(3,wn.TG),jn(4,p.$),jn(5,bn.H),jn(6,yn.i6),jn(7,Me.XE),jn(8,Sn.lT),jn(9,xn.F)],Gn);class Yn extends d.JT{constructor(){super(),this._onDidChangeToTrue=this._register(new h.Q5),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new h.Q5),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,2===this._value?this._onDidChangeToTrue.fire():1===this._value&&this._onDidChangeToFalse.fire())}}class Zn extends d.JT{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=qi.u.editorSimpleInput.bindTo(t),this._editorFocus=qi.u.focus.bindTo(t),this._textInputFocus=qi.u.textInputFocus.bindTo(t),this._editorTextFocus=qi.u.editorTextFocus.bindTo(t),this._editorTabMovesFocus=qi.u.tabMovesFocus.bindTo(t),this._editorReadonly=qi.u.readOnly.bindTo(t),this._inDiffEditor=qi.u.inDiffEditor.bindTo(t),this._editorColumnSelection=qi.u.columnSelection.bindTo(t),this._hasMultipleSelections=qi.u.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=qi.u.hasNonEmptySelection.bindTo(t),this._canUndo=qi.u.canUndo.bindTo(t),this._canRedo=qi.u.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromConfig()))),this._register(this._editor.onDidChangeCursorSelection((()=>this._updateFromSelection()))),this._register(this._editor.onDidFocusEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidFocusEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidChangeModel((()=>this._updateFromModel()))),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromModel()))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._editorTabMovesFocus.set(e.get(127)),this._editorReadonly.set(e.get(78)),this._inDiffEditor.set(e.get(51)),this._editorColumnSelection.set(e.get(16))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some((e=>!e.isEmpty())))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))}}class Xn extends d.JT{constructor(e,t){super(),this._editor=e,this._contextKeyService=t,this._langId=qi.u.languageId.bindTo(t),this._hasCompletionItemProvider=qi.u.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=qi.u.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=qi.u.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=qi.u.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=qi.u.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=qi.u.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=qi.u.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=qi.u.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=qi.u.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=qi.u.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=qi.u.hasReferenceProvider.bindTo(t),this._hasRenameProvider=qi.u.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=qi.u.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=qi.u.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=qi.u.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=qi.u.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=qi.u.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=qi.u.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=qi.u.isInWalkThroughSnippet.bindTo(t);const i=()=>this._update();this._register(e.onDidChangeModel(i)),this._register(e.onDidChangeModelLanguage(i)),this._register(wt.KZ.onDidChange(i)),this._register(wt.H9.onDidChange(i)),this._register(wt.He.onDidChange(i)),this._register(wt.Ct.onDidChange(i)),this._register(wt.RN.onDidChange(i)),this._register(wt.vI.onDidChange(i)),this._register(wt.tA.onDidChange(i)),this._register(wt.xp.onDidChange(i)),this._register(wt.vH.onDidChange(i)),this._register(wt.vJ.onDidChange(i)),this._register(wt.FL.onDidChange(i)),this._register(wt.G0.onDidChange(i)),this._register(wt.Az.onDidChange(i)),this._register(wt.vN.onDidChange(i)),this._register(wt.nD.onDidChange(i)),this._register(wt.mX.onDidChange(i)),i()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents((()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInWalkThrough.reset()}))}_update(){const e=this._editor.getModel();e?this._contextKeyService.bufferChangeEvents((()=>{this._langId.set(e.getLanguageIdentifier().language),this._hasCompletionItemProvider.set(wt.KZ.has(e)),this._hasCodeActionsProvider.set(wt.H9.has(e)),this._hasCodeLensProvider.set(wt.He.has(e)),this._hasDefinitionProvider.set(wt.Ct.has(e)),this._hasDeclarationProvider.set(wt.RN.has(e)),this._hasImplementationProvider.set(wt.vI.has(e)),this._hasTypeDefinitionProvider.set(wt.tA.has(e)),this._hasHoverProvider.set(wt.xp.has(e)),this._hasDocumentHighlightProvider.set(wt.vH.has(e)),this._hasDocumentSymbolProvider.set(wt.vJ.has(e)),this._hasReferenceProvider.set(wt.FL.has(e)),this._hasRenameProvider.set(wt.G0.has(e)),this._hasSignatureHelpProvider.set(wt.nD.has(e)),this._hasInlayHintsProvider.set(wt.mX.has(e)),this._hasDocumentFormattingProvider.set(wt.Az.has(e)||wt.vN.has(e)),this._hasDocumentSelectionFormattingProvider.set(wt.vN.has(e)),this._hasMultipleDocumentFormattingProvider.set(wt.Az.all(e).length+wt.vN.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(wt.vN.all(e).length>1),this._isInWalkThrough.set(e.uri.scheme===g.lg.walkThroughSnippet)})):this.reset()}}class Qn extends d.JT{constructor(e){super(),this._onChange=this._register(new h.Q5),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(c.go(e)),this._register(this._domFocusTracker.onDidFocus((()=>{this._hasFocus=!0,this._onChange.fire(void 0)}))),this._register(this._domFocusTracker.onDidBlur((()=>{this._hasFocus=!1,this._onChange.fire(void 0)})))}hasFocus(){return this._hasFocus}}const Jn=encodeURIComponent("");function to(e){return Jn+encodeURIComponent(e.toString())+eo}const io=encodeURIComponent('');(0,Me.Ic)(((e,t)=>{const i=e.getColor(xt.b6);i&&t.addRule(`.monaco-editor .squiggly-error { border-bottom: 4px double ${i}; }`);const n=e.getColor(xt.lX);n&&t.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${to(n)}") repeat-x bottom left; }`);const o=e.getColor(xt.A2);o&&t.addRule(`.monaco-editor .squiggly-error::before { display: block; content: ''; width: 100%; height: 100%; background: ${o}; }`);const r=e.getColor(xt.pW);r&&t.addRule(`.monaco-editor .squiggly-warning { border-bottom: 4px double ${r}; }`);const s=e.getColor(xt.uo);s&&t.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${to(s)}") repeat-x bottom left; }`);const a=e.getColor(xt.gp);a&&t.addRule(`.monaco-editor .squiggly-warning::before { display: block; content: ''; width: 100%; height: 100%; background: ${a}; }`);const l=e.getColor(xt.T8);l&&t.addRule(`.monaco-editor .squiggly-info { border-bottom: 4px double ${l}; }`);const c=e.getColor(xt.c6);c&&t.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${to(c)}") repeat-x bottom left; }`);const u=e.getColor(xt.fe);u&&t.addRule(`.monaco-editor .squiggly-info::before { display: block; content: ''; width: 100%; height: 100%; background: ${u}; }`);const h=e.getColor(xt.fE);h&&t.addRule(`.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${h}; }`);const d=e.getColor(xt.Du);d&&t.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${function(e){return io+encodeURIComponent(e.toString())+no}(d)}") no-repeat bottom left; }`);const g=e.getColor(Ae.zu);g&&t.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${g.rgba.a}; }`);const f=e.getColor(Ae.kp);f&&t.addRule(`.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${f}; }`);const p=e.getColor(xt.NO)||"inherit";t.addRule(`.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${p}}`)}))},4527:(e,t,i)=>{"use strict";i.d(t,{H:()=>g});var n=i(6248),o=i(1640),r=i(2073),s=i(4565),a=i(8819),l=i(2065),c=i(9422),u=i(7781),h=i(1106),d=function(e,t){return function(i,n){t(i,n,e)}};let g=class extends r.Gm{constructor(e,t,i,n,o,r,s,a,l,c){super(e,Object.assign(Object.assign({},i.getRawOptions()),{overflowWidgetsDomNode:i.getOverflowWidgetsDomNode()}),{},n,o,r,s,a,l,c),this._parentEditor=i,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(i.onDidChangeConfiguration((e=>this._onParentConfigurationChanged(e))))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){n.jB(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};g=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([d(3,l.TG),d(4,o.$),d(5,s.H),d(6,a.i6),d(7,u.XE),d(8,c.lT),d(9,h.F)],g)},1329:(e,t,i)=>{"use strict";i.d(t,{T4:()=>o,OY:()=>r,Sj:()=>s,Uo:()=>a,hP:()=>l});var n=i(3860);class o{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return new n.Y(i.endLineNumber,i.endColumn,i.endLineNumber,i.endColumn)}}class r{constructor(e,t){this._range=e,this._text=t}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return new n.Y(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)}}class s{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return new n.Y(i.startLineNumber,i.startColumn,i.startLineNumber,i.startColumn)}}class a{constructor(e,t,i,n,o=!1){this._range=e,this._text=t,this._columnDeltaOffset=n,this._lineNumberDeltaOffset=i,this.insertsAutoWhitespace=o}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let i=t.getInverseEditOperations()[0].range;return new n.Y(i.endLineNumber+this._lineNumberDeltaOffset,i.endColumn+this._columnDeltaOffset,i.endLineNumber+this._lineNumberDeltaOffset,i.endColumn+this._columnDeltaOffset)}}class l{constructor(e,t,i,n=!1){this._range=e,this._text=t,this._initialSelection=i,this._forceMoveMarkers=n,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}},291:(e,t,i)=>{"use strict";i.d(t,{U:()=>u});var n=i(7295),o=i(3181),r=i(4314),s=i(3860),a=i(3831);const l=Object.create(null);function c(e,t){if(t<=0)return"";l[e]||(l[e]=["",e]);const i=l[e];for(let n=i.length;n<=t;n++)i[n]=i[n-1]+e;return i[t]}class u{constructor(e,t){this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}static unshiftIndent(e,t,i,n,r){const s=o.io.visibleColumnFromColumn(e,t,i);if(r){const e=c(" ",n);return c(e,o.io.prevIndentTabStop(s,n)/n)}return c("\t",o.io.prevRenderTabStop(s,i)/i)}static shiftIndent(e,t,i,n,r){const s=o.io.visibleColumnFromColumn(e,t,i);if(r){const e=c(" ",n);return c(e,o.io.nextIndentTabStop(s,n)/n)}return c("\t",o.io.nextRenderTabStop(s,i)/i)}_addEditOperation(e,t,i){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,i):e.addEditOperation(t,i)}getEditOperations(e,t){const i=this._selection.startLineNumber;let s=this._selection.endLineNumber;1===this._selection.endColumn&&i!==s&&(s-=1);const{tabSize:l,indentSize:h,insertSpaces:d}=this._opts,g=i===s;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(i))&&(this._useLastEditRangeForCursorEndPosition=!0);let c=0,f=0;for(let p=i;p<=s;p++,c=f){f=0;let s,m=e.getLineContent(p),_=n.LC(m);if((!this._opts.isUnshift||0!==m.length&&0!==_)&&(g||this._opts.isUnshift||0!==m.length)){if(-1===_&&(_=m.length),p>1&&o.io.visibleColumnFromColumn(m,_+1,l)%h!=0&&e.isCheapToTokenize(p-1)){let t=a.zu.getEnterAction(this._opts.autoIndent,e,new r.e(p-1,e.getLineMaxColumn(p-1),p-1,e.getLineMaxColumn(p-1)));if(t){if(f=c,t.appendText)for(let e=0,i=t.appendText.length;e{"use strict";i.d(t,{nG:()=>f,fv:()=>y,ei:()=>L,Pe:()=>N});var n=i(3580),o=i(4669),r=i(5976),s=i(6248),a=i(9488),l=i(4141),c=i(2334),u=i(7374),h=i(3193),d=i(9872),g=i(6626);const f=new class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new o.Q5,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus!==e&&(this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus))}},p=Object.hasOwnProperty;class m{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class _{constructor(){this._values=[]}_read(e){return this._values[e]}_write(e,t){this._values[e]=t}}class v{static readOptions(e){const t=e,i=new _;for(const e of l.Bc){const n="_never_"===e.name?void 0:t[e.name];i._write(e.id,n)}return i}static validateOptions(e){const t=new l.hu;for(const i of l.Bc)t._write(i.id,i.validate(e._read(i.id)));return t}static computeOptions(e,t){const i=new m;for(const n of l.Bc)i._write(n.id,n.compute(t,i,e._read(n.id)));return i}static _deepEquals(e,t){if("object"!=typeof e||"object"!=typeof t)return e===t;if(Array.isArray(e)||Array.isArray(t))return!(!Array.isArray(e)||!Array.isArray(t))&&a.fS(e,t);for(let i in e)if(!v._deepEquals(e[i],t[i]))return!1;return!0}static checkEquals(e,t){const i=[];let n=!1;for(const o of l.Bc){const r=!v._deepEquals(e._read(o.id),t._read(o.id));i[o.id]=r,r&&(n=!0)}return n?new l.Bb(i):null}}function b(e){const t=s.I8(e);return function(e){const t=e.wordWrap;!0===t?e.wordWrap="on":!1===t&&(e.wordWrap="off");const i=e.lineNumbers;!0===i?e.lineNumbers="on":!1===i&&(e.lineNumbers="off"),!1===e.autoClosingBrackets&&(e.autoClosingBrackets="never",e.autoClosingQuotes="never",e.autoSurround="never"),"visible"===e.cursorBlinking&&(e.cursorBlinking="solid");const n=e.renderWhitespace;!0===n?e.renderWhitespace="boundary":!1===n&&(e.renderWhitespace="none");const o=e.renderLineHighlight;!0===o?e.renderLineHighlight="line":!1===o&&(e.renderLineHighlight="none");const r=e.acceptSuggestionOnEnter;!0===r?e.acceptSuggestionOnEnter="on":!1===r&&(e.acceptSuggestionOnEnter="off");const s=e.tabCompletion;!1===s?e.tabCompletion="off":!0===s&&(e.tabCompletion="onlySnippets");const a=e.suggest;if(a&&"object"==typeof a.filteredTypes&&a.filteredTypes){const e={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};(0,g.E)(e,(e=>{const t=a.filteredTypes[e.key];!1===t&&(a[e.value]=t)}))}const l=e.hover;!0===l?e.hover={enabled:!0}:!1===l&&(e.hover={enabled:!1});const c=e.parameterHints;!0===c?e.parameterHints={enabled:!0}:!1===c&&(e.parameterHints={enabled:!1});const u=e.autoIndent;!0===u?e.autoIndent="full":!1===u&&(e.autoIndent="advanced");const h=e.matchBrackets;!0===h?e.matchBrackets="always":!1===h&&(e.matchBrackets="never")}(t),t}class y extends r.JT{constructor(e,t){super(),this._onDidChange=this._register(new o.Q5),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new o.Q5),this.onDidChangeFast=this._onDidChangeFast.event,this.isSimpleWidget=e,this._isDominatedByLongLines=!1,this._computeOptionsMemory=new l.LJ,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._rawOptions=b(t),this._readOptions=v.readOptions(this._rawOptions),this._validatedOptions=v.validateOptions(this._readOptions),this._register(c.C.onDidChangeZoomLevel((e=>this._recomputeOptions()))),this._register(f.onDidChangeTabFocus((e=>this._recomputeOptions())))}observeReferenceElement(e){}updatePixelRatio(){}_recomputeOptions(){const e=this.options,t=this._computeInternalOptions();if(e){const i=v.checkEquals(e,t);if(null===i)return;this.options=t,this._onDidChangeFast.fire(i),this._onDidChange.fire(i)}else this.options=t}getRawOptions(){return this._rawOptions}_computeInternalOptions(){const e=this._getEnvConfiguration(),t=u.E4.createFromValidatedSettings(this._validatedOptions,e.zoomLevel,e.pixelRatio,this.isSimpleWidget),i={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,fontInfo:this.readConfiguration(t),extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:f.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport};return v.computeOptions(this._validatedOptions,i)}static _subsetEquals(e,t){for(const i in t)if(p.call(t,i)){const n=t[i],o=e[i];if(o===n)continue;if(Array.isArray(o)&&Array.isArray(n)){if(!a.fS(o,n))return!1;continue}if(o&&"object"==typeof o&&n&&"object"==typeof n){if(!this._subsetEquals(o,n))return!1;continue}return!1}return!0}updateOptions(e){if(void 0===e)return;const t=b(e);y._subsetEquals(this._rawOptions,t)||(this._rawOptions=s.jB(this._rawOptions,t||{}),this._readOptions=v.readOptions(this._rawOptions),this._validatedOptions=v.validateOptions(this._readOptions),this._recomputeOptions())}setIsDominatedByLongLines(e){this._isDominatedByLongLines=e,this._recomputeOptions()}setMaxLineNumber(e){const t=y._digitCount(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}static _digitCount(e){let t=0;for(;e;)e=Math.floor(e/10),t++;return t||1}}const w=Object.freeze({id:"editor",order:5,type:"object",title:n.N("editorConfigurationTitle","Editor"),scope:5}),C=d.B.as(h.IP.Configuration),S=Object.assign(Object.assign({},w),{properties:{"editor.tabSize":{type:"number",default:l.DB.tabSize,minimum:1,markdownDescription:n.N("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.insertSpaces":{type:"boolean",default:l.DB.insertSpaces,markdownDescription:n.N("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.detectIndentation":{type:"boolean",default:l.DB.detectIndentation,markdownDescription:n.N("detectIndentation","Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.")},"editor.trimAutoWhitespace":{type:"boolean",default:l.DB.trimAutoWhitespace,description:n.N("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:l.DB.largeFileOptimizations,description:n.N("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:n.N("wordBasedSuggestions","Controls whether completions should be computed based on words in the document.")},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[n.N("wordBasedSuggestionsMode.currentDocument","Only suggest words from the active document."),n.N("wordBasedSuggestionsMode.matchingDocuments","Suggest words from all open documents of the same language."),n.N("wordBasedSuggestionsMode.allDocuments","Suggest words from all open documents.")],description:n.N("wordBasedSuggestionsMode","Controls from which documents word based completions are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[n.N("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),n.N("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),n.N("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:n.N("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:n.N("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:n.N("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:n.N("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:n.N("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:n.N("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:n.N("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:!1,description:n.N("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[n.N("wordWrap.off","Lines will never wrap."),n.N("wordWrap.on","Lines will wrap at the viewport width."),n.N("wordWrap.inherit","Lines will wrap according to the `#editor.wordWrap#` setting.")]}}});for(const e of l.Bc){const t=e.schema;if(void 0!==t)if(void 0!==(x=t).type||void 0!==x.anyOf)S.properties[`editor.${e.name}`]=t;else for(let e in t)p.call(t,e)&&(S.properties[e]=t[e])}var x;let k=null;function D(){return null===k&&(k=Object.create(null),Object.keys(S.properties).forEach((e=>{k[e]=!0}))),k}function L(e){return D()[`editor.${e}`]||!1}function N(e){return D()[`diffEditor.${e}`]||!1}C.registerConfiguration(S)},4141:(e,t,i)=>{"use strict";i.d(t,{y0:()=>s,Bb:()=>a,hu:()=>l,LJ:()=>c,O7:()=>g,NY:()=>v,d2:()=>w,n0:()=>C,gk:()=>x,$J:()=>k,hL:()=>L,DB:()=>N,Bc:()=>E,BH:()=>M});var n=i(3580),o=i(1432),r=i(7461);const s=8;class a{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class l{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class c{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class u{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}compute(e,t,i){return i}}class h{constructor(e,t=null){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0,this.deps=t}validate(e){return this.defaultValue}}class d{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}validate(e){return void 0===e?this.defaultValue:e}compute(e,t,i){return i}}function g(e,t){return void 0===e?t:"false"!==e&&Boolean(e)}class f extends d{constructor(e,t,i,n){void 0!==n&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return g(e,this.defaultValue)}}class p extends d{constructor(e,t,i,n,o,r){void 0!==r&&(r.type="integer",r.default=i,r.minimum=n,r.maximum=o),super(e,t,i,r),this.minimum=n,this.maximum=o}static clampedInt(e,t,i,n){if(void 0===e)return t;let o=parseInt(e,10);return isNaN(o)?t:(o=Math.max(i,o),o=Math.min(n,o),0|o)}validate(e){return p.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}class m extends d{constructor(e,t,i,n,o){void 0!==o&&(o.type="number",o.default=i),super(e,t,i,o),this.validationFn=n}static clamp(e,t,i){return ei?i:e}static float(e,t){if("number"==typeof e)return e;if(void 0===e)return t;const i=parseFloat(e);return isNaN(i)?t:i}validate(e){return this.validationFn(m.float(e,this.defaultValue))}}class _ extends d{static string(e,t){return"string"!=typeof e?t:e}constructor(e,t,i,n){void 0!==n&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return _.string(e,this.defaultValue)}}function v(e,t,i){return"string"!=typeof e||-1===i.indexOf(e)?t:e}class b extends d{constructor(e,t,i,n,o){void 0!==o&&(o.type="string",o.enum=n,o.default=i),super(e,t,i,o),this._allowedValues=n}validate(e){return v(e,this.defaultValue,this._allowedValues)}}class y extends u{constructor(e,t,i,n,o,r,s){void 0!==s&&(s.type="string",s.enum=o,s.default=n),super(e,t,i,s),this._allowedValues=o,this._convert=r}validate(e){return"string"!=typeof e||-1===this._allowedValues.indexOf(e)?this.defaultValue:this._convert(e)}}var w;!function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(w||(w={}));class C extends u{constructor(){super(41,"fontLigatures",C.OFF,{anyOf:[{type:"boolean",description:n.N("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:n.N("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:n.N("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return void 0===e?this.defaultValue:"string"==typeof e?"false"===e?C.OFF:"true"===e?C.ON:e:Boolean(e)?C.ON:C.OFF}}C.OFF='"liga" off, "calt" off',C.ON='"liga" on, "calt" on';class S extends u{constructor(){super(43,"fontWeight",L.fontWeight,{anyOf:[{type:"number",minimum:S.MINIMUM_VALUE,maximum:S.MAXIMUM_VALUE,errorMessage:n.N("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:S.SUGGESTION_VALUES}],default:L.fontWeight,description:n.N("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return"normal"===e||"bold"===e?e:String(p.clampedInt(e,L.fontWeight,S.MINIMUM_VALUE,S.MAXIMUM_VALUE))}}S.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],S.MINIMUM_VALUE=1,S.MAXIMUM_VALUE=1e3;class x extends h{constructor(){super(128,[46,55,35,62,90,57,58,92,115,118,119,120,2])}compute(e,t,i){return x.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=e.scrollBeyondLastLine?t-1:0,n=(e.viewLineCount+i)/(e.pixelRatio*e.height);return{typicalViewportLineCount:t,extraLinesBeyondLastLine:i,desiredRatio:n,minimapLineCount:Math.floor(e.viewLineCount/n)}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,o=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(o*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const r=t.stableMinimapLayoutInput,a=r&&e.outerHeight===r.outerHeight&&e.lineHeight===r.lineHeight&&e.typicalHalfwidthCharacterWidth===r.typicalHalfwidthCharacterWidth&&e.pixelRatio===r.pixelRatio&&e.scrollBeyondLastLine===r.scrollBeyondLastLine&&e.minimap.enabled===r.minimap.enabled&&e.minimap.side===r.minimap.side&&e.minimap.size===r.minimap.size&&e.minimap.showSlider===r.minimap.showSlider&&e.minimap.renderCharacters===r.minimap.renderCharacters&&e.minimap.maxColumn===r.minimap.maxColumn&&e.minimap.scale===r.minimap.scale&&e.verticalScrollbarWidth===r.verticalScrollbarWidth&&e.isViewportWrapping===r.isViewportWrapping,l=e.lineHeight,c=e.typicalHalfwidthCharacterWidth,u=e.scrollBeyondLastLine,h=e.minimap.renderCharacters;let d=o>=2?Math.round(2*e.minimap.scale):e.minimap.scale;const g=e.minimap.maxColumn,f=e.minimap.size,p=e.minimap.side,m=e.verticalScrollbarWidth,_=e.viewLineCount,v=e.remainingWidth,b=e.isViewportWrapping,y=h?2:3;let w=Math.floor(o*n);const C=w/o;let S=!1,k=!1,D=y*d,L=d/o,N=1;if("fill"===f||"fit"===f){const{typicalViewportLineCount:i,extraLinesBeyondLastLine:r,desiredRatio:s,minimapLineCount:c}=x.computeContainedMinimapLineCount({viewLineCount:_,scrollBeyondLastLine:u,height:n,lineHeight:l,pixelRatio:o});if(_/c>1)S=!0,k=!0,d=1,D=1,L=d/o;else{let n=!1,c=d+1;if("fit"===f){const i=Math.ceil((_+r)*D);b&&a&&v<=t.stableFitRemainingWidth?(n=!0,c=t.stableFitMaxMinimapScale):(n=i>w,b&&n?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=v):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0))}if("fill"===f||n){S=!0;const e=d;D=Math.min(l*o,Math.max(1,Math.floor(1/s))),d=Math.min(c,Math.max(1,Math.floor(D/y))),d>e&&(N=Math.min(2,d/e)),L=d/o/N,w=Math.ceil(Math.max(i,_+r)*D),b&&n&&(t.stableFitMaxMinimapScale=d)}}}const E=Math.floor(g*L),A=Math.min(E,Math.max(0,Math.floor((v-m-2)*L/(c+L)))+s);let M=Math.floor(o*A);const I=M/o;return M=Math.floor(M*N),{renderMinimap:h?1:2,minimapLeft:"left"===p?0:i-A-m,minimapWidth:A,minimapHeightIsEditorHeight:S,minimapIsSampling:k,minimapScale:d,minimapLineHeight:D,minimapCanvasInnerWidth:M,minimapCanvasInnerHeight:w,minimapCanvasOuterWidth:I,minimapCanvasOuterHeight:C}}static computeLayout(e,t){const i=0|t.outerWidth,n=0|t.outerHeight,o=0|t.lineHeight,r=0|t.lineNumbersDigitCount,s=t.typicalHalfwidthCharacterWidth,a=t.maxDigitWidth,l=t.pixelRatio,u=t.viewLineCount,h=e.get(120),d="inherit"===h?e.get(119):h,g="inherit"===d?e.get(115):d,f=e.get(118),m=e.get(2),_=t.isDominatedByLongLines,v=e.get(46),b=0!==e.get(57).renderType,y=e.get(58),w=e.get(92),C=e.get(62),S=e.get(90),k=S.verticalScrollbarSize,D=S.verticalHasArrows,L=S.arrowSize,N=S.horizontalScrollbarSize,E=e.get(55),A=e.get(35);let M;if("string"==typeof E&&/^\d+(\.\d+)?ch$/.test(E)){const e=parseFloat(E.substr(0,E.length-2));M=p.clampedInt(e*s,0,0,1e3)}else M=p.clampedInt(E,0,0,1e3);A&&(M+=16);let I=0;if(b){const e=Math.max(r,y);I=Math.round(e*a)}let T=0;v&&(T=o);let R=0,O=R+T,F=O+I,P=F+M;const B=i-T-I-M;let z=!1,W=!1,V=-1;2!==m&&("inherit"===d&&_?(z=!0,W=!0):"on"===g||"bounded"===g?W=!0:"wordWrapColumn"===g&&(V=f));const H=x._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:o,typicalHalfwidthCharacterWidth:s,pixelRatio:l,scrollBeyondLastLine:w,minimap:C,verticalScrollbarWidth:k,viewLineCount:u,remainingWidth:B,isViewportWrapping:W},t.memory||new c);0!==H.renderMinimap&&0===H.minimapLeft&&(R+=H.minimapWidth,O+=H.minimapWidth,F+=H.minimapWidth,P+=H.minimapWidth);const $=B-H.minimapWidth,U=Math.max(1,Math.floor(($-k-2)/s)),j=D?L:0;return W&&(V=Math.max(1,U),"bounded"===g&&(V=Math.min(V,f))),{width:i,height:n,glyphMarginLeft:R,glyphMarginWidth:T,lineNumbersLeft:O,lineNumbersWidth:I,decorationsLeft:F,decorationsWidth:M,contentLeft:P,contentWidth:$,minimap:H,viewportColumn:U,isWordWrapMinified:z,isViewportWrapping:W,wrappingColumn:V,verticalScrollbarWidth:k,horizontalScrollbarHeight:N,overviewRuler:{top:j,width:k,height:n-2*j,right:0}}}}function k(e){const t=e.get(85);return"editable"===t?e.get(78):"on"!==t}function D(e,t){if("string"!=typeof e)return t;switch(e){case"hidden":return 2;case"visible":return 3;default:return 1}}const L={fontFamily:o.dz?"Menlo, Monaco, 'Courier New', monospace":o.IJ?"'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:o.dz?12:14,lineHeight:0,letterSpacing:0},N={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0},E=[];function A(e){return E[e.id]=e,e}const M={acceptSuggestionOnCommitCharacter:A(new f(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:n.N("acceptSuggestionOnCommitCharacter","Controls whether suggestions should be accepted on commit characters. For example, in JavaScript, the semi-colon (`;`) can be a commit character that accepts a suggestion and types that character.")})),acceptSuggestionOnEnter:A(new b(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",n.N("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:n.N("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:A(new class extends u{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[n.N("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),n.N("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled."),n.N("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:n.N("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return 0===i?e.accessibilitySupport:i}}),accessibilityPageSize:A(new p(3,"accessibilityPageSize",10,1,1073741824,{description:n.N("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default.")})),ariaLabel:A(new _(4,"ariaLabel",n.N("editorViewAccessibleLabel","Editor content"))),autoClosingBrackets:A(new b(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",n.N("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),n.N("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:n.N("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingDelete:A(new b(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",n.N("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:n.N("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:A(new b(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",n.N("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:n.N("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:A(new b(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",n.N("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),n.N("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:n.N("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:A(new y(9,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],(function(e){switch(e){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}),{enumDescriptions:[n.N("editor.autoIndent.none","The editor will not insert indentation automatically."),n.N("editor.autoIndent.keep","The editor will keep the current line's indentation."),n.N("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),n.N("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),n.N("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:n.N("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:A(new f(10,"automaticLayout",!1)),autoSurround:A(new b(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[n.N("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),n.N("editor.autoSurround.quotes","Surround with quotes but not brackets."),n.N("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:n.N("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),stickyTabStops:A(new f(102,"stickyTabStops",!1,{description:n.N("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:A(new f(12,"codeLens",!0,{description:n.N("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:A(new _(13,"codeLensFontFamily","",{description:n.N("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:A(new p(14,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,description:n.N("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to `0`, the 90% of `#editor.fontSize#` is used.")})),colorDecorators:A(new f(15,"colorDecorators",!0,{description:n.N("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),columnSelection:A(new f(16,"columnSelection",!1,{description:n.N("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:A(new class extends u{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(17,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:n.N("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:n.N("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertSpace:g(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:g(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}),contextmenu:A(new f(18,"contextmenu",!0)),copyWithSyntaxHighlighting:A(new f(19,"copyWithSyntaxHighlighting",!0,{description:n.N("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:A(new y(20,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],(function(e){switch(e){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}),{description:n.N("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:A(new f(21,"cursorSmoothCaretAnimation",!1,{description:n.N("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:A(new y(22,"cursorStyle",w.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],(function(e){switch(e){case"line":return w.Line;case"block":return w.Block;case"underline":return w.Underline;case"line-thin":return w.LineThin;case"block-outline":return w.BlockOutline;case"underline-thin":return w.UnderlineThin}}),{description:n.N("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:A(new p(23,"cursorSurroundingLines",0,0,1073741824,{description:n.N("cursorSurroundingLines","Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:A(new b(24,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[n.N("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),n.N("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],description:n.N("cursorSurroundingLinesStyle","Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:A(new p(25,"cursorWidth",0,0,1073741824,{markdownDescription:n.N("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:A(new f(26,"disableLayerHinting",!1)),disableMonospaceOptimizations:A(new f(27,"disableMonospaceOptimizations",!1)),domReadOnly:A(new f(28,"domReadOnly",!1)),dragAndDrop:A(new f(29,"dragAndDrop",!0,{description:n.N("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:A(new class extends f{constructor(){super(30,"emptySelectionClipboard",!0,{description:n.N("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}),extraEditorClassName:A(new _(31,"extraEditorClassName","")),fastScrollSensitivity:A(new m(32,"fastScrollSensitivity",5,(e=>e<=0?5:e),{markdownDescription:n.N("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:A(new class extends u{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:!0,autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(33,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:n.N("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"boolean",default:e.seedSearchStringFromSelection,description:n.N("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[n.N("editor.find.autoFindInSelection.never","Never turn on Find in selection automatically (default)."),n.N("editor.find.autoFindInSelection.always","Always turn on Find in selection automatically."),n.N("editor.find.autoFindInSelection.multiline","Turn on Find in selection automatically when multiple lines of content are selected.")],description:n.N("find.autoFindInSelection","Controls the condition for turning on find in selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:n.N("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:o.dz},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:n.N("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:n.N("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{cursorMoveOnType:g(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:g(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection),autoFindInSelection:"boolean"==typeof e.autoFindInSelection?e.autoFindInSelection?"always":"never":v(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:g(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:g(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:g(t.loop,this.defaultValue.loop)}}}),fixedOverflowWidgets:A(new f(34,"fixedOverflowWidgets",!1)),folding:A(new f(35,"folding",!0,{description:n.N("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:A(new b(36,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[n.N("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),n.N("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:n.N("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:A(new f(37,"foldingHighlight",!0,{description:n.N("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),unfoldOnClickAfterEndOfLine:A(new f(38,"unfoldOnClickAfterEndOfLine",!1,{description:n.N("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:A(new _(39,"fontFamily",L.fontFamily,{description:n.N("fontFamily","Controls the font family.")})),fontInfo:A(new class extends h{constructor(){super(40)}compute(e,t,i){return e.fontInfo}}),fontLigatures2:A(new C),fontSize:A(new class extends d{constructor(){super(42,"fontSize",L.fontSize,{type:"number",minimum:6,maximum:100,default:L.fontSize,description:n.N("fontSize","Controls the font size in pixels.")})}validate(e){let t=m.float(e,this.defaultValue);return 0===t?L.fontSize:m.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}),fontWeight:A(new S),formatOnPaste:A(new f(44,"formatOnPaste",!1,{description:n.N("formatOnPaste","Controls whether the editor should automatically format the pasted content. A formatter must be available and the formatter should be able to format a range in a document.")})),formatOnType:A(new f(45,"formatOnType",!1,{description:n.N("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:A(new f(46,"glyphMargin",!0,{description:n.N("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:A(new class extends u{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[n.N("editor.gotoLocation.multiple.peek","Show peek view of the results (default)"),n.N("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),n.N("editor.gotoLocation.multiple.goto","Go to the primary result and enable peek-less navigation to others")]},i=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(47,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:n.N("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:n.N("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:n.N("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:n.N("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:n.N("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:n.N("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist.")},t),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:n.N("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:n.N("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:i,description:n.N("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:n.N("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:n.N("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,i,n,o,r;if(!e||"object"!=typeof e)return this.defaultValue;const s=e;return{multiple:v(s.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:null!==(t=s.multipleDefinitions)&&void 0!==t?t:v(s.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:null!==(i=s.multipleTypeDefinitions)&&void 0!==i?i:v(s.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:null!==(n=s.multipleDeclarations)&&void 0!==n?n:v(s.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:null!==(o=s.multipleImplementations)&&void 0!==o?o:v(s.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:null!==(r=s.multipleReferences)&&void 0!==r?r:v(s.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:_.string(s.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:_.string(s.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:_.string(s.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:_.string(s.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:_.string(s.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}),hideCursorInOverviewRuler:A(new f(48,"hideCursorInOverviewRuler",!1,{description:n.N("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),highlightActiveIndentGuide:A(new f(49,"highlightActiveIndentGuide",!0,{description:n.N("highlightActiveIndentGuide","Controls whether the editor should highlight the active indent guide.")})),hover:A(new class extends u{constructor(){const e={enabled:!0,delay:300,sticky:!0};super(50,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:n.N("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,description:n.N("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:n.N("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:g(t.enabled,this.defaultValue.enabled),delay:p.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:g(t.sticky,this.defaultValue.sticky)}}}),inDiffEditor:A(new f(51,"inDiffEditor",!1)),letterSpacing:A(new m(53,"letterSpacing",L.letterSpacing,(e=>m.clamp(e,-5,20)),{description:n.N("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:A(new class extends u{constructor(){const e={enabled:!0};super(54,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:n.N("codeActions","Enables the code action lightbulb in the editor.")}})}validate(e){return e&&"object"==typeof e?{enabled:g(e.enabled,this.defaultValue.enabled)}:this.defaultValue}}),lineDecorationsWidth:A(new d(55,"lineDecorationsWidth",10)),lineHeight:A(new class extends p{constructor(){super(56,"lineHeight",L.lineHeight,0,150,{description:n.N("lineHeight","Controls the line height. Use 0 to compute the line height from the font size.")})}compute(e,t,i){return e.fontInfo.lineHeight}}),lineNumbers:A(new class extends u{constructor(){super(57,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[n.N("lineNumbers.off","Line numbers are not rendered."),n.N("lineNumbers.on","Line numbers are rendered as absolute number."),n.N("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),n.N("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:n.N("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return void 0!==e&&("function"==typeof e?(t=4,i=e):t="interval"===e?3:"relative"===e?2:"on"===e?1:0),{renderType:t,renderFn:i}}}),lineNumbersMinChars:A(new p(58,"lineNumbersMinChars",5,1,300)),linkedEditing:A(new f(59,"linkedEditing",!1,{description:n.N("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols, e.g. HTML tags, are updated while editing.")})),links:A(new f(60,"links",!0,{description:n.N("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:A(new b(61,"matchBrackets","always",["always","near","never"],{description:n.N("matchBrackets","Highlight matching brackets.")})),minimap:A(new class extends u{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120,scale:1};super(62,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:n.N("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[n.N("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),n.N("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),n.N("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:n.N("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:n.N("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:n.N("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:n.N("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:n.N("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:n.N("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:g(t.enabled,this.defaultValue.enabled),size:v(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:v(t.side,this.defaultValue.side,["right","left"]),showSlider:v(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:g(t.renderCharacters,this.defaultValue.renderCharacters),scale:p.clampedInt(t.scale,1,1,3),maxColumn:p.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}),mouseStyle:A(new b(63,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:A(new m(64,"mouseWheelScrollSensitivity",1,(e=>0===e?1:e),{markdownDescription:n.N("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:A(new f(65,"mouseWheelZoom",!1,{markdownDescription:n.N("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:A(new f(66,"multiCursorMergeOverlapping",!0,{description:n.N("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:A(new y(67,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],(function(e){return"ctrlCmd"===e?o.dz?"metaKey":"ctrlKey":"altKey"}),{markdownEnumDescriptions:[n.N("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),n.N("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:n.N({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add multiple cursors with the mouse. The Go To Definition and Open Link mouse gestures will adapt such that they do not conflict with the multicursor modifier. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:A(new b(68,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[n.N("multiCursorPaste.spread","Each cursor pastes a single line of the text."),n.N("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:n.N("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),occurrencesHighlight:A(new f(69,"occurrencesHighlight",!0,{description:n.N("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:A(new f(70,"overviewRulerBorder",!0,{description:n.N("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:A(new p(71,"overviewRulerLanes",3,0,3)),padding:A(new class extends u{constructor(){super(72,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:n.N("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:n.N("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{top:p.clampedInt(t.top,0,0,1e3),bottom:p.clampedInt(t.bottom,0,0,1e3)}}}),parameterHints:A(new class extends u{constructor(){const e={enabled:!0,cycle:!1};super(73,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:n.N("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:n.N("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:g(t.enabled,this.defaultValue.enabled),cycle:g(t.cycle,this.defaultValue.cycle)}}}),peekWidgetDefaultFocus:A(new b(74,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[n.N("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),n.N("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:n.N("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:A(new f(75,"definitionLinkOpensInPeek",!1,{description:n.N("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:A(new class extends u{constructor(){const e={other:!0,comments:!1,strings:!1};super(76,"quickSuggestions",e,{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:e.strings,description:n.N("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{type:"boolean",default:e.comments,description:n.N("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{type:"boolean",default:e.other,description:n.N("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}}}],default:e,description:n.N("quickSuggestions","Controls whether suggestions should automatically show up while typing.")}),this.defaultValue=e}validate(e){if("boolean"==typeof e)return e;if(e&&"object"==typeof e){const t=e,i={other:g(t.other,this.defaultValue.other),comments:g(t.comments,this.defaultValue.comments),strings:g(t.strings,this.defaultValue.strings)};return!!(i.other&&i.comments&&i.strings)||!!(i.other||i.comments||i.strings)&&i}return this.defaultValue}}),quickSuggestionsDelay:A(new p(77,"quickSuggestionsDelay",10,0,1073741824,{description:n.N("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:A(new f(78,"readOnly",!1)),renameOnType:A(new f(79,"renameOnType",!1,{description:n.N("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:n.N("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:A(new f(80,"renderControlCharacters",!1,{description:n.N("renderControlCharacters","Controls whether the editor should render control characters.")})),renderIndentGuides:A(new f(81,"renderIndentGuides",!0,{description:n.N("renderIndentGuides","Controls whether the editor should render indent guides.")})),renderFinalNewline:A(new f(82,"renderFinalNewline",!0,{description:n.N("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:A(new b(83,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",n.N("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:n.N("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:A(new f(84,"renderLineHighlightOnlyWhenFocus",!1,{description:n.N("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:A(new b(85,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:A(new b(86,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",n.N("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),n.N("renderWhitespace.selection","Render whitespace characters only on selected text."),n.N("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:n.N("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:A(new p(87,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:A(new f(88,"roundedSelection",!0,{description:n.N("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:A(new class extends u{constructor(){const e=[],t={type:"number",description:n.N("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(89,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:n.N("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:n.N("rulers","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.")})}validate(e){if(Array.isArray(e)){let t=[];for(let i of e)if("number"==typeof i)t.push({column:p.clampedInt(i,0,0,1e4),color:null});else if(i&&"object"==typeof i){const e=i;t.push({column:p.clampedInt(e.column,0,0,1e4),color:e.color})}return t.sort(((e,t)=>e.column-t.column)),t}return this.defaultValue}}),scrollbar:A(new class extends u{constructor(){super(90,"scrollbar",{vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e,i=p.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=p.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:p.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:D(t.vertical,this.defaultValue.vertical),horizontal:D(t.horizontal,this.defaultValue.horizontal),useShadows:g(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:g(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:g(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:g(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:g(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:p.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:p.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:g(t.scrollByPage,this.defaultValue.scrollByPage)}}}),scrollBeyondLastColumn:A(new p(91,"scrollBeyondLastColumn",5,0,1073741824,{description:n.N("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:A(new f(92,"scrollBeyondLastLine",!0,{description:n.N("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:A(new f(93,"scrollPredominantAxis",!0,{description:n.N("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:A(new f(94,"selectionClipboard",!0,{description:n.N("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:o.IJ})),selectionHighlight:A(new f(95,"selectionHighlight",!0,{description:n.N("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:A(new f(96,"selectOnLineNumbers",!0)),showFoldingControls:A(new b(97,"showFoldingControls","mouseover",["always","mouseover"],{enumDescriptions:[n.N("showFoldingControls.always","Always show the folding controls."),n.N("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:n.N("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:A(new f(98,"showUnused",!0,{description:n.N("showUnused","Controls fading out of unused code.")})),showDeprecated:A(new f(123,"showDeprecated",!0,{description:n.N("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:A(new class extends u{constructor(){const e={enabled:!0,fontSize:0,fontFamily:L.fontFamily};super(124,"inlayHints",e,{"editor.inlayHints.enabled":{type:"boolean",default:e.enabled,description:n.N("inlayHints.enable","Enables the inlay hints in the editor.")},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,description:n.N("inlayHints.fontSize","Controls font size of inlay hints in the editor. When set to `0`, the 90% of `#editor.fontSize#` is used.")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,description:n.N("inlayHints.fontFamily","Controls font family of inlay hints in the editor.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:g(t.enabled,this.defaultValue.enabled),fontSize:p.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:_.string(t.fontFamily,this.defaultValue.fontFamily)}}}),snippetSuggestions:A(new b(99,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[n.N("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),n.N("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),n.N("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),n.N("snippetSuggestions.none","Do not show snippet suggestions.")],description:n.N("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:A(new class extends u{constructor(){super(100,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:n.N("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"}})}validate(e){return e&&"object"==typeof e?{selectLeadingAndTrailingWhitespace:g(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}:this.defaultValue}}),smoothScrolling:A(new f(101,"smoothScrolling",!1,{description:n.N("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:A(new p(103,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:A(new class extends u{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,showStatusBar:!1,preview:!1,showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(104,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[n.N("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),n.N("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:n.N("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:n.N("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:n.N("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:n.N("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:n.N("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:n.N("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:n.N("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:n.N("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:n.N("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:n.N("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:n.N("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertMode:v(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:g(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:g(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:g(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:g(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:g(t.showIcons,this.defaultValue.showIcons),showStatusBar:g(t.showStatusBar,this.defaultValue.showStatusBar),preview:g(t.preview,this.defaultValue.preview),showInlineDetails:g(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:g(t.showMethods,this.defaultValue.showMethods),showFunctions:g(t.showFunctions,this.defaultValue.showFunctions),showConstructors:g(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:g(t.showDeprecated,this.defaultValue.showDeprecated),showFields:g(t.showFields,this.defaultValue.showFields),showVariables:g(t.showVariables,this.defaultValue.showVariables),showClasses:g(t.showClasses,this.defaultValue.showClasses),showStructs:g(t.showStructs,this.defaultValue.showStructs),showInterfaces:g(t.showInterfaces,this.defaultValue.showInterfaces),showModules:g(t.showModules,this.defaultValue.showModules),showProperties:g(t.showProperties,this.defaultValue.showProperties),showEvents:g(t.showEvents,this.defaultValue.showEvents),showOperators:g(t.showOperators,this.defaultValue.showOperators),showUnits:g(t.showUnits,this.defaultValue.showUnits),showValues:g(t.showValues,this.defaultValue.showValues),showConstants:g(t.showConstants,this.defaultValue.showConstants),showEnums:g(t.showEnums,this.defaultValue.showEnums),showEnumMembers:g(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:g(t.showKeywords,this.defaultValue.showKeywords),showWords:g(t.showWords,this.defaultValue.showWords),showColors:g(t.showColors,this.defaultValue.showColors),showFiles:g(t.showFiles,this.defaultValue.showFiles),showReferences:g(t.showReferences,this.defaultValue.showReferences),showFolders:g(t.showFolders,this.defaultValue.showFolders),showTypeParameters:g(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:g(t.showSnippets,this.defaultValue.showSnippets),showUsers:g(t.showUsers,this.defaultValue.showUsers),showIssues:g(t.showIssues,this.defaultValue.showIssues)}}}),inlineSuggest:A(new class extends u{constructor(){const e={enabled:!1};super(52,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:n.N("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")}})}validate(e){return e&&"object"==typeof e?{enabled:g(e.enabled,this.defaultValue.enabled)}:this.defaultValue}}),suggestFontSize:A(new p(105,"suggestFontSize",0,0,1e3,{markdownDescription:n.N("suggestFontSize","Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.")})),suggestLineHeight:A(new p(106,"suggestLineHeight",0,0,1e3,{markdownDescription:n.N("suggestLineHeight","Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used. The minimum value is 8.")})),suggestOnTriggerCharacters:A(new f(107,"suggestOnTriggerCharacters",!0,{description:n.N("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:A(new b(108,"suggestSelection","recentlyUsed",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[n.N("suggestSelection.first","Always select the first suggestion."),n.N("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),n.N("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:n.N("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:A(new b(109,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[n.N("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),n.N("tabCompletion.off","Disable tab completions."),n.N("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:n.N("tabCompletion","Enables tab completions.")})),tabIndex:A(new p(110,"tabIndex",0,-1,1073741824)),unusualLineTerminators:A(new b(111,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[n.N("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),n.N("unusualLineTerminators.off","Unusual line terminators are ignored."),n.N("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:n.N("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:A(new f(112,"useShadowDOM",!0)),useTabStops:A(new f(113,"useTabStops",!0,{description:n.N("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordSeparators:A(new _(114,"wordSeparators",r.vu,{description:n.N("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:A(new b(115,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[n.N("wordWrap.off","Lines will never wrap."),n.N("wordWrap.on","Lines will wrap at the viewport width."),n.N({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),n.N({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:n.N({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:A(new _(116,"wordWrapBreakAfterCharacters"," \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:A(new _(117,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:A(new p(118,"wordWrapColumn",80,1,1073741824,{markdownDescription:n.N({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:A(new b(119,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:A(new b(120,"wordWrapOverride2","inherit",["off","on","inherit"])),wrappingIndent:A(new y(121,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],(function(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}),{enumDescriptions:[n.N("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),n.N("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),n.N("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),n.N("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:n.N("wrappingIndent","Controls the indentation of wrapped lines.")})),wrappingStrategy:A(new b(122,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[n.N("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),n.N("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],description:n.N("wrappingStrategy","Controls the algorithm that computes wrapping points.")})),editorClassName:A(new class extends h{constructor(){super(125,[63,31])}compute(e,t,i){const n=["monaco-editor"];return t.get(31)&&n.push(t.get(31)),e.extraEditorClassName&&n.push(e.extraEditorClassName),"default"===t.get(63)?n.push("mouse-default"):"copy"===t.get(63)&&n.push("mouse-copy"),t.get(98)&&n.push("showUnused"),t.get(123)&&n.push("showDeprecated"),n.join(" ")}}),pixelRatio:A(new class extends h{constructor(){super(126)}compute(e,t,i){return e.pixelRatio}}),tabFocusMode:A(new class extends h{constructor(){super(127,[78])}compute(e,t,i){return!!t.get(78)||e.tabFocusMode}}),layoutInfo:A(new x),wrappingInfo:A(new class extends h{constructor(){super(129,[128])}compute(e,t,i){const n=t.get(128);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}})}},2334:(e,t,i)=>{"use strict";i.d(t,{C:()=>o});var n=i(4669);const o=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new n.Q5,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(e){e=Math.min(Math.max(-5,e),20),this._zoomLevel!==e&&(this._zoomLevel=e,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}},7374:(e,t,i)=>{"use strict";i.d(t,{E4:()=>s,pR:()=>a});var n=i(1432),o=i(2334);const r=n.dz?1.5:1.35;class s{constructor(e){this.zoomLevel=e.zoomLevel,this.pixelRatio=e.pixelRatio,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.fontFeatureSettings=e.fontFeatureSettings,this.lineHeight=0|e.lineHeight,this.letterSpacing=e.letterSpacing}static createFromValidatedSettings(e,t,i,n){const o=e.get(39),r=e.get(43),a=e.get(42),l=e.get(41),c=e.get(56),u=e.get(53);return s._create(o,r,a,l,c,u,t,i,n)}static _create(e,t,i,n,a,l,c,u,h){0===a?a=Math.round(r*i):a<8&&(a=8);const d=1+(h?0:.1*o.C.getZoomLevel());return new s({zoomLevel:c,pixelRatio:u,fontFamily:e,fontWeight:t,fontSize:i*=d,fontFeatureSettings:n,lineHeight:a*=d,letterSpacing:l})}getId(){return this.zoomLevel+"-"+this.pixelRatio+"-"+this.fontFamily+"-"+this.fontWeight+"-"+this.fontSize+"-"+this.fontFeatureSettings+"-"+this.lineHeight+"-"+this.letterSpacing}getMassagedFontFamily(){return/[,"']/.test(this.fontFamily)?this.fontFamily:/[+ ]/.test(this.fontFamily)?`"${this.fontFamily}"`:this.fontFamily}}class a extends s{constructor(e,t){super(e),this.version=1,this.isTrusted=t,this.isMonospace=e.isMonospace,this.typicalHalfwidthCharacterWidth=e.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=e.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=e.canUseHalfwidthRightwardsArrow,this.spaceWidth=e.spaceWidth,this.middotWidth=e.middotWidth,this.wsmiddotWidth=e.wsmiddotWidth,this.maxDigitWidth=e.maxDigitWidth}equals(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.fontFeatureSettings===e.fontFeatureSettings&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.maxDigitWidth===e.maxDigitWidth}}},3675:(e,t,i)=>{"use strict";i.d(t,{l:()=>o});var n=i(3181);class o{static whitespaceVisibleColumn(e,t,i){const o=e.length;let r=0,s=-1,a=-1;for(let l=0;l{"use strict";i.d(t,{LM:()=>g,rS:()=>f,zp:()=>p,Vi:()=>v,Tp:()=>b,io:()=>y,LN:()=>w});var n=i(7301),o=i(7295),r=i(187),s=i(4314),a=i(3860),l=i(3411),c=i(3831);const u=()=>!0,h=()=>!1,d=e=>" "===e||"\t"===e;class g{constructor(e,t,i){this._languageIdentifier=e;const n=i.options,o=n.get(128);this.readOnly=n.get(78),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=n.get(102),this.lineHeight=n.get(56),this.pageSize=Math.max(1,Math.floor(o.height/this.lineHeight)-2),this.useTabStops=n.get(113),this.wordSeparators=n.get(114),this.emptySelectionClipboard=n.get(30),this.copyWithSyntaxHighlighting=n.get(19),this.multiCursorMergeOverlapping=n.get(66),this.multiCursorPaste=n.get(68),this.autoClosingBrackets=n.get(5),this.autoClosingQuotes=n.get(8),this.autoClosingDelete=n.get(6),this.autoClosingOvertype=n.get(7),this.autoSurround=n.get(11),this.autoIndent=n.get(9),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:g._getShouldAutoClose(e,this.autoClosingQuotes),bracket:g._getShouldAutoClose(e,this.autoClosingBrackets)},this.autoClosingPairs=c.zu.getAutoClosingPairs(e.id);let r=g._getSurroundingPairs(e);if(r)for(const e of r)this.surroundingPairs[e.open]=e.close}static shouldRecreate(e){return e.hasChanged(128)||e.hasChanged(114)||e.hasChanged(30)||e.hasChanged(66)||e.hasChanged(68)||e.hasChanged(5)||e.hasChanged(8)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(113)||e.hasChanged(56)||e.hasChanged(78)}get electricChars(){if(!this._electricChars){this._electricChars={};let e=g._getElectricCharacters(this._languageIdentifier);if(e)for(const t of e)this._electricChars[t]=!0}return this._electricChars}normalizeIndentation(e){return l.yO.normalizeIndentation(e,this.indentSize,this.insertSpaces)}static _getElectricCharacters(e){try{return c.zu.getElectricCharacters(e.id)}catch(e){return(0,n.dL)(e),null}}static _getShouldAutoClose(e,t){switch(t){case"beforeWhitespace":return d;case"languageDefined":return g._getLanguageDefinedShouldAutoClose(e);case"always":return u;case"never":return h}}static _getLanguageDefinedShouldAutoClose(e){try{const t=c.zu.getAutoCloseBeforeSet(e.id);return e=>-1!==t.indexOf(e)}catch(e){return(0,n.dL)(e),h}}static _getSurroundingPairs(e){try{return c.zu.getSurroundingPairs(e.id)}catch(e){return(0,n.dL)(e),null}}}class f{constructor(e,t,i,n){this.selectionStart=e,this.selectionStartLeftoverVisibleColumns=t,this.position=i,this.leftoverVisibleColumns=n,this.selection=f._computeSelection(this.selectionStart,this.position)}equals(e){return this.selectionStartLeftoverVisibleColumns===e.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===e.leftoverVisibleColumns&&this.position.equals(e.position)&&this.selectionStart.equalsRange(e.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(e,t,i,n){return e?new f(this.selectionStart,this.selectionStartLeftoverVisibleColumns,new r.L(t,i),n):new f(new s.e(t,i,t,i),n,new r.L(t,i),n)}static _computeSelection(e,t){let i,n,o,r;return e.isEmpty()?(i=e.startLineNumber,n=e.startColumn,o=t.lineNumber,r=t.column):t.isBeforeOrEqual(e.getStartPosition())?(i=e.endLineNumber,n=e.endColumn,o=t.lineNumber,r=t.column):(i=e.startLineNumber,n=e.startColumn,o=t.lineNumber,r=t.column),new a.Y(i,n,o,r)}}class p{constructor(e,t,i){this.model=e,this.coordinatesConverter=t,this.cursorConfig=i}}class m{constructor(e){this.modelState=e,this.viewState=null}}class _{constructor(e){this.modelState=null,this.viewState=e}}class v{constructor(e,t){this.modelState=e,this.viewState=t}static fromModelState(e){return new m(e)}static fromViewState(e){return new _(e)}static fromModelSelection(e){const t=e.selectionStartLineNumber,i=e.selectionStartColumn,n=e.positionLineNumber,o=e.positionColumn,a=new f(new s.e(t,i,t,i),0,new r.L(n,o),0);return v.fromModelState(a)}static fromModelSelections(e){let t=[];for(let i=0,n=e.length;i=65536?2:1,9===t)s=y.nextRenderTabStop(s,i);else{let i=o.S6(t);for(;a=65536?2:1,i=n}o.K7(t)||o.C8(t)?s+=2:s+=1}}return s}static visibleColumnsByColumns(e,t){const i=e.length;let n=new Array;n.push(-1);let r=0,s=0;for(;s=65536?2:1,n.push(r),a>=65536&&n.push(r),9===a)r=y.nextRenderTabStop(r,t);else{let t=o.S6(a);for(;s=65536?2:1,n.push(r),a>=65536&&n.push(r),t=c}o.K7(a)||o.C8(a)?r+=2:r+=1}}return n.push(r),n}static visibleColumnFromColumn2(e,t,i){return this.visibleColumnFromColumn(t.getLineContent(i.lineNumber),i.column,e.tabSize)}static columnFromVisibleColumn(e,t,i){if(t<=0)return 1;const n=e.length;let r=0,s=1,a=0;for(;a=65536?2:1,9===l)c=y.nextRenderTabStop(r,i);else{let t=o.S6(l);for(;a=65536?2:1,t=r}c=o.K7(l)||o.C8(l)?r+2:r+1}const u=a+1;if(c>=t)return c-ts?s:o}static nextRenderTabStop(e,t){return e+t-e%t}static nextIndentTabStop(e,t){return e+t-e%t}static prevRenderTabStop(e,t){return Math.max(0,e-1-(e-1)%t)}static prevIndentTabStop(e,t){return Math.max(0,e-1-(e-1)%t)}}function w(e){return"'"===e||'"'===e||"`"===e}},1380:(e,t,i)=>{"use strict";i.d(t,{A:()=>c});var n=i(7295),o=i(1329),r=i(3181),s=i(8784),a=i(4314),l=i(187);class c{static deleteRight(e,t,i,n){let r=[],l=3!==e;for(let e=0,c=n.length;e=h.length+1)return!1;const d=h.charAt(u.column-2),g=n.get(d);if(!g)return!1;if((0,r.LN)(d)){if("never"===i)return!1}else if("never"===t)return!1;const f=h.charAt(u.column-1);let p=!1;for(const e of g)e.open===d&&e.close===f&&(p=!0);if(!p)return!1;if("auto"===e){let e=!1;for(let t=0,i=a.length;t1){const e=t.getLineContent(o.lineNumber),s=n.LC(e),l=-1===s?e.length+1:s+1;if(o.column<=l){const e=r.io.visibleColumnFromColumn2(i,t,o),n=r.io.prevIndentTabStop(e,i.indentSize),s=r.io.columnFromVisibleColumn2(i,t,o.lineNumber,n);return new a.e(o.lineNumber,s,o.lineNumber,o.column)}}return a.e.fromPositions(c.getPositionAfterDeleteLeft(o,t),o)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){const i=n.oH(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,i+1)}if(e.lineNumber>1){const i=e.lineNumber-1;return new l.L(i,t.getLineMaxColumn(i))}return e}static cut(e,t,i){let n=[];for(let r=0,s=i.length;r1?(e=u.lineNumber-1,i=t.getLineMaxColumn(u.lineNumber-1),l=u.lineNumber,c=t.getLineMaxColumn(u.lineNumber)):(e=u.lineNumber,i=1,l=u.lineNumber,c=t.getLineMaxColumn(u.lineNumber));let h=new a.e(e,i,l,c);h.isEmpty()?n[r]=null:n[r]=new o.T4(h,"")}else n[r]=null;else n[r]=new o.T4(s,"")}return new r.Tp(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}},3814:(e,t,i)=>{"use strict";i.d(t,{P:()=>u,N:()=>n});var n,o=i(8401),r=i(3181),s=i(8784),a=i(5795),l=i(187),c=i(4314);class u{static addCursorDown(e,t,i){let n=[],o=0;for(let a=0,l=t.length;at&&(i=t,n=e.model.getLineMaxColumn(i)),r.Vi.fromModelState(new r.rS(new c.e(s.lineNumber,1,i,n),0,new l.L(i,n),0))}const u=t.modelState.selectionStart.getStartPosition().lineNumber;if(s.lineNumberu){const i=e.getLineCount();let n=a.lineNumber+1,o=1;return n>i&&(n=i,o=e.getLineMaxColumn(n)),r.Vi.fromViewState(t.viewState.move(t.modelState.hasSelection(),n,o,0))}{const e=t.modelState.selectionStart.getEndPosition();return r.Vi.fromModelState(t.modelState.move(t.modelState.hasSelection(),e.lineNumber,e.column,0))}}static word(e,t,i,n){const o=e.model.validatePosition(n);return r.Vi.fromModelState(a.w.word(e.cursorConfig,e.model,t.modelState,i,o))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new r.Vi(t.modelState,t.viewState);const i=t.viewState.position.lineNumber,n=t.viewState.position.column;return r.Vi.fromViewState(new r.rS(new c.e(i,n,i,n),0,new l.L(i,n),0))}static moveTo(e,t,i,n,o){const s=e.model.validatePosition(n),a=o?e.coordinatesConverter.validateViewPosition(new l.L(o.lineNumber,o.column),s):e.coordinatesConverter.convertModelPositionToViewPosition(s);return r.Vi.fromViewState(t.viewState.move(i,a.lineNumber,a.column,0))}static simpleMove(e,t,i,n,o,a){switch(i){case 0:return 4===a?this._moveHalfLineLeft(e,t,n):this._moveLeft(e,t,n,o);case 1:return 4===a?this._moveHalfLineRight(e,t,n):this._moveRight(e,t,n,o);case 2:return 2===a?this._moveUpByViewLines(e,t,n,o):this._moveUpByModelLines(e,t,n,o);case 3:return 2===a?this._moveDownByViewLines(e,t,n,o):this._moveDownByModelLines(e,t,n,o);case 4:return 2===a?t.map((t=>r.Vi.fromViewState(s.o.moveToPrevBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>r.Vi.fromModelState(s.o.moveToPrevBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 5:return 2===a?t.map((t=>r.Vi.fromViewState(s.o.moveToNextBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>r.Vi.fromModelState(s.o.moveToNextBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 6:return this._moveToViewMinColumn(e,t,n);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,n);case 8:return this._moveToViewCenterColumn(e,t,n);case 9:return this._moveToViewMaxColumn(e,t,n);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,n);default:return null}}static viewportMove(e,t,i,n,o){const r=e.getCompletelyVisibleViewRange(),s=e.coordinatesConverter.convertViewRangeToModelRange(r);switch(i){case 11:{const i=this._firstLineNumberInRange(e.model,s,o),r=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,r)]}case 13:{const i=this._lastLineNumberInRange(e.model,s,o),r=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,r)]}case 12:{const i=Math.round((s.startLineNumber+s.endLineNumber)/2),o=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,o)]}case 14:{let i=[];for(let o=0,s=t.length;oi.endLineNumber-1&&(o=i.endLineNumber-1),or.Vi.fromViewState(s.o.moveLeft(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineLeft(e,t,i){let n=[];for(let o=0,a=t.length;or.Vi.fromViewState(s.o.moveRight(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineRight(e,t,i){let n=[];for(let o=0,a=t.length;o{"use strict";i.d(t,{o:()=>c});var n=i(3181),o=i(187),r=i(4314),s=i(7295),a=i(3675);class l{constructor(e,t,i){this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=i}}class c{static leftPosition(e,t){if(t.column>e.getLineMinColumn(t.lineNumber))return t.delta(void 0,-s.HO(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const i=t.lineNumber-1;return new o.L(i,e.getLineMaxColumn(i))}return t}static leftPositionAtomicSoftTabs(e,t,i){if(t.column<=e.getLineIndentColumn(t.lineNumber)){const n=e.getLineMinColumn(t.lineNumber),r=e.getLineContent(t.lineNumber),s=a.l.atomicPosition(r,t.column-1,i,0);if(-1!==s&&s+1>=n)return new o.L(t.lineNumber,s+1)}return this.leftPosition(e,t)}static left(e,t,i){const n=e.stickyTabStops?c.leftPositionAtomicSoftTabs(t,i,e.tabSize):c.leftPosition(t,i);return new l(n.lineNumber,n.column,0)}static moveLeft(e,t,i,n,o){let r,s;if(i.hasSelection()&&!n)r=i.selection.startLineNumber,s=i.selection.startColumn;else{const n=i.position.delta(void 0,-(o-1)),a=t.normalizePosition(c.clipPositionColumn(n,t),0),l=c.left(e,t,a);r=l.lineNumber,s=l.column}return i.move(n,r,s,0)}static clipPositionColumn(e,t){return new o.L(e.lineNumber,c.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,i){return ei?i:e}static rightPosition(e,t,i){return iu?(i=u,o=a?t.getLineMaxColumn(i):Math.min(t.getLineMaxColumn(i),o)):o=n.io.columnFromVisibleColumn2(e,t,i,c),r=h?0:c-n.io.visibleColumnFromColumn(t.getLineContent(i),o,e.tabSize),new l(i,o,r)}static moveDown(e,t,i,n,o){let r,s;i.hasSelection()&&!n?(r=i.selection.endLineNumber,s=i.selection.endColumn):(r=i.position.lineNumber,s=i.position.column);let a=c.down(e,t,r,s,i.leftoverVisibleColumns,o,!0);return i.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateDown(e,t,i){let s=i.selection,a=c.down(e,t,s.selectionStartLineNumber,s.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),l=c.down(e,t,s.positionLineNumber,s.positionColumn,i.leftoverVisibleColumns,1,!1);return new n.rS(new r.e(a.lineNumber,a.column,a.lineNumber,a.column),a.leftoverVisibleColumns,new o.L(l.lineNumber,l.column),l.leftoverVisibleColumns)}static up(e,t,i,o,r,s,a){const c=n.io.visibleColumnFromColumn(t.getLineContent(i),o,e.tabSize)+r,u=1===i&&1===o;return(i-=s)<1?(i=1,o=a?t.getLineMinColumn(i):Math.min(t.getLineMaxColumn(i),o)):o=n.io.columnFromVisibleColumn2(e,t,i,c),r=u?0:c-n.io.visibleColumnFromColumn(t.getLineContent(i),o,e.tabSize),new l(i,o,r)}static moveUp(e,t,i,n,o){let r,s;i.hasSelection()&&!n?(r=i.selection.startLineNumber,s=i.selection.startColumn):(r=i.position.lineNumber,s=i.position.column);let a=c.up(e,t,r,s,i.leftoverVisibleColumns,o,!0);return i.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateUp(e,t,i){let s=i.selection,a=c.up(e,t,s.selectionStartLineNumber,s.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),l=c.up(e,t,s.positionLineNumber,s.positionColumn,i.leftoverVisibleColumns,1,!1);return new n.rS(new r.e(a.lineNumber,a.column,a.lineNumber,a.column),a.leftoverVisibleColumns,new o.L(l.lineNumber,l.column),l.leftoverVisibleColumns)}static _isBlankLine(e,t){return 0===e.getLineFirstNonWhitespaceColumn(t)}static moveToPrevBlankLine(e,t,i,n){let o=i.position.lineNumber;for(;o>1&&this._isBlankLine(t,o);)o--;for(;o>1&&!this._isBlankLine(t,o);)o--;return i.move(n,o,t.getLineMinColumn(o),0)}static moveToNextBlankLine(e,t,i,n){const o=t.getLineCount();let r=i.position.lineNumber;for(;r{"use strict";i.d(t,{u:()=>f,g:()=>p});var n=i(7301),o=i(7295),r=i(1329),s=i(291),a=i(4314),l=i(3860);class c{constructor(e,t,i){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=i}getEditOperations(e,t){t.addTrackedEditOperation(new a.e(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new a.e(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(e,t){let i=t.getInverseEditOperations(),n=i[0].range,o=i[1].range;return new l.Y(n.endLineNumber,n.endColumn,o.endLineNumber,o.endColumn-this._charAfterSelection.length)}}var u=i(3181),h=i(9410),d=i(7354),g=i(3831);class f{static indent(e,t,i){if(null===t||null===i)return[];let n=[];for(let t=0,o=i.length;t1){let n;for(n=i-1;n>=1;n--){const e=t.getLineContent(n);if(o.ow(e)>=0)break}if(n<1)return null;const s=t.getLineMaxColumn(n),l=g.zu.getEnterAction(e.autoIndent,t,new a.e(n,s,n,s));l&&(r=l.indentation+l.appendText)}return n&&(n===d.wU.Indent&&(r=f.shiftIndent(e,r)),n===d.wU.Outdent&&(r=f.unshiftIndent(e,r)),r=e.normalizeIndentation(r)),r||null}static _replaceJumpToNextIndent(e,t,i,n){let o="",s=i.getStartPosition();if(e.insertSpaces){let i=u.io.visibleColumnFromColumn2(e,t,s),n=e.indentSize,r=n-i%n;for(let e=0;ethis._compositionType(i,e,o,r,s,a)));return new u.Tp(4,l,{shouldPushStackElementBefore:_(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,o,s){if(!t.isEmpty())return null;const l=t.getPosition(),c=Math.max(1,l.column-n),u=Math.min(e.getLineMaxColumn(l.lineNumber),l.column+o),h=new a.e(l.lineNumber,c,l.lineNumber,u);return e.getValueInRange(h)===i&&0===s?null:new r.Uo(h,i,0,s)}static _typeCommand(e,t,i){return i?new r.Sj(e,t,!0):new r.T4(e,t,!0)}static _enter(e,t,i,n){if(0===e.autoIndent)return f._typeCommand(n,"\n",i);if(!t.isCheapToTokenize(n.getStartPosition().lineNumber)||1===e.autoIndent){let r=t.getLineContent(n.startLineNumber),s=o.V8(r).substring(0,n.startColumn-1);return f._typeCommand(n,"\n"+e.normalizeIndentation(s),i)}const s=g.zu.getEnterAction(e.autoIndent,t,n);if(s){if(s.indentAction===d.wU.None)return f._typeCommand(n,"\n"+e.normalizeIndentation(s.indentation+s.appendText),i);if(s.indentAction===d.wU.Indent)return f._typeCommand(n,"\n"+e.normalizeIndentation(s.indentation+s.appendText),i);if(s.indentAction===d.wU.IndentOutdent){const t=e.normalizeIndentation(s.indentation),o=e.normalizeIndentation(s.indentation+s.appendText),a="\n"+o+"\n"+t;return i?new r.Sj(n,a,!0):new r.Uo(n,a,-1,o.length-t.length,!0)}if(s.indentAction===d.wU.Outdent){const t=f.unshiftIndent(e,s.indentation);return f._typeCommand(n,"\n"+e.normalizeIndentation(t+s.appendText),i)}}const a=t.getLineContent(n.startLineNumber),l=o.V8(a).substring(0,n.startColumn-1);if(e.autoIndent>=4){const s=g.zu.getIndentForEnter(e.autoIndent,t,n,{unshiftIndent:t=>f.unshiftIndent(e,t),shiftIndent:t=>f.shiftIndent(e,t),normalizeIndentation:t=>e.normalizeIndentation(t)});if(s){let a=u.io.visibleColumnFromColumn2(e,t,n.getEndPosition());const l=n.endColumn,c=t.getLineContent(n.endLineNumber),h=o.LC(c);if(n=h>=0?n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,h+1)):n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new r.Sj(n,"\n"+e.normalizeIndentation(s.afterEnter),!0);{let t=0;return l<=h+1&&(e.insertSpaces||(a=Math.ceil(a/e.indentSize)),t=Math.min(a+1-e.normalizeIndentation(s.afterEnter).length-1,0)),new r.Uo(n,"\n"+e.normalizeIndentation(s.afterEnter),0,t,!0)}}}return f._typeCommand(n,"\n"+e.normalizeIndentation(l),i)}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let e=0,n=i.length;ef.shiftIndent(e,t),unshiftIndent:t=>f.unshiftIndent(e,t)});if(null===r)return null;if(r!==e.normalizeIndentation(o)){const o=t.getLineFirstNonWhitespaceColumn(i.startLineNumber);return 0===o?f._typeCommand(new a.e(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(r)+n,!1):f._typeCommand(new a.e(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(r)+t.getLineContent(i.startLineNumber).substring(o-1,i.startColumn-1)+n,!1)}return null}static _isAutoClosingOvertype(e,t,i,n,o){if("never"===e.autoClosingOvertype)return!1;if(!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(o))return!1;for(let r=0,s=i.length;r2?l.charCodeAt(a.column-2):0)&&c)return!1;if("auto"===e.autoClosingOvertype){let e=!1;for(let t=0,i=n.length;tt.startsWith(e.open))),s=o.some((e=>t.startsWith(e.close)));return!r&&s}static _findAutoClosingPairOpen(e,t,i,n){const o=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!o)return null;let r=null;for(const e of o)if(null===r||e.open.length>r.open.length){let o=!0;for(const r of i)if(t.getValueInRange(new a.e(r.lineNumber,r.column-e.open.length+1,r.lineNumber,r.column))+n!==e.open){o=!1;break}o&&(r=e)}return r}static _findSubAutoClosingPairClose(e,t){if(t.open.length<=1)return"";const i=t.close.charAt(t.close.length-1),n=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i)||[];let o=null;for(const e of n)e.open!==t.open&&t.open.includes(e.open)&&t.close.endsWith(e.close)&&(!o||e.open.length>o.open.length)&&(o=e);return o?o.close:""}static _getAutoClosingPairClose(e,t,i,o,r){const s=(0,u.LN)(o),a=s?e.autoClosingQuotes:e.autoClosingBrackets;if("never"===a)return null;const l=this._findAutoClosingPairOpen(e,t,i.map((e=>e.getPosition())),o);if(!l)return null;const c=this._findSubAutoClosingPairClose(e,l);let d=!0;const p=s?e.shouldAutoCloseBefore.quote:e.shouldAutoCloseBefore.bracket;for(let o=0,u=i.length;om.column-1){const t=_.charAt(m.column-1);if(!f._isBeforeClosingBrace(e,v)&&!p(t))return null}if(!t.isCheapToTokenize(m.lineNumber))return null;if(1===l.open.length&&s&&"always"!==a){const t=(0,h.u)(e.wordSeparators);if(r&&m.column>1&&0===t.get(_.charCodeAt(m.column-2)))return null;if(!r&&m.column>2&&0===t.get(_.charCodeAt(m.column-3)))return null}t.forceTokenization(m.lineNumber);const b=t.getLineTokens(m.lineNumber);let y=!1;try{y=g.zu.shouldAutoClosePair(l,b,r?m.column:m.column-1)}catch(e){(0,n.dL)(e)}if(!y)return null}return d?l.close.substring(0,l.close.length-c.length):l.close}static _runAutoClosingOpenCharType(e,t,i,n,o,r,s){let a=[];for(let e=0,t=n.length;enew r.T4(new a.e(e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1)));return new u.Tp(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const h=this._getAutoClosingPairClose(t,i,o,c,!1);return null!==h?this._runAutoClosingOpenCharType(e,t,i,o,c,!1,h):null}static typeWithInterceptors(e,t,i,n,o,s,a){if(!e&&"\n"===a){let e=[];for(let t=0,r=o.length;t{"use strict";i.d(t,{w:()=>c,L:()=>u});var n=i(7295),o=i(3181),r=i(1380),s=i(9410),a=i(187),l=i(4314);class c{static _createWord(e,t,i,n,o){return{start:n,end:o,wordType:t,nextCharClass:i}}static _findPreviousWordOnLine(e,t,i){let n=t.getLineContent(i.lineNumber);return this._doFindPreviousWordOnLine(n,e,i)}static _doFindPreviousWordOnLine(e,t,i){let n=0;for(let o=i.column-2;o>=0;o--){let i=e.charCodeAt(o),r=t.get(i);if(0===r){if(2===n)return this._createWord(e,n,r,o+1,this._findEndOfWord(e,t,n,o+1));n=1}else if(2===r){if(1===n)return this._createWord(e,n,r,o+1,this._findEndOfWord(e,t,n,o+1));n=2}else if(1===r&&0!==n)return this._createWord(e,n,r,o+1,this._findEndOfWord(e,t,n,o+1))}return 0!==n?this._createWord(e,n,1,0,this._findEndOfWord(e,t,n,0)):null}static _findEndOfWord(e,t,i,n){let o=e.length;for(let r=n;r=0;o--){let n=e.charCodeAt(o),r=t.get(n);if(1===r)return o+1;if(1===i&&2===r)return o+1;if(2===i&&0===r)return o+1}return 0}static moveWordLeft(e,t,i,n){let o=i.lineNumber,r=i.column;1===r&&o>1&&(o-=1,r=t.getLineMaxColumn(o));let s=c._findPreviousWordOnLine(e,t,new a.L(o,r));if(0===n)return new a.L(o,s?s.start+1:1);if(1===n)return s&&2===s.wordType&&s.end-s.start==1&&0===s.nextCharClass&&(s=c._findPreviousWordOnLine(e,t,new a.L(o,s.start+1))),new a.L(o,s?s.start+1:1);if(3===n){for(;s&&2===s.wordType;)s=c._findPreviousWordOnLine(e,t,new a.L(o,s.start+1));return new a.L(o,s?s.start+1:1)}return s&&r<=s.end+1&&(s=c._findPreviousWordOnLine(e,t,new a.L(o,s.start+1))),new a.L(o,s?s.end+1:1)}static _moveWordPartLeft(e,t){const i=t.lineNumber,o=e.getLineMaxColumn(i);if(1===t.column)return i>1?new a.L(i-1,e.getLineMaxColumn(i-1)):t;const r=e.getLineContent(i);for(let e=t.column-1;e>1;e--){const t=r.charCodeAt(e-2),s=r.charCodeAt(e-1);if(95===t&&95!==s)return new a.L(i,e);if(n.mK(t)&&n.df(s))return new a.L(i,e);if(n.df(t)&&n.df(s)&&e+1=l.start+1&&(l=c._findNextWordOnLine(e,t,new a.L(o,l.end+1))),r=l?l.start+1:t.getLineMaxColumn(o);return new a.L(o,r)}static _moveWordPartRight(e,t){const i=t.lineNumber,o=e.getLineMaxColumn(i);if(t.column===o)return i1?d=1:(h--,d=n.getLineMaxColumn(h)):(g&&d<=g.end+1&&(g=c._findPreviousWordOnLine(i,n,new a.L(h,g.start+1))),g?d=g.end+1:d>1?d=1:(h--,d=n.getLineMaxColumn(h))),new l.e(h,d,u.lineNumber,u.column)}static deleteInsideWord(e,t,i){if(!i.isEmpty())return i;const n=new a.L(i.positionLineNumber,i.positionColumn);return this._deleteInsideWordWhitespace(t,n)||this._deleteInsideWordDetermineDeleteRange(e,t,n)}static _charAtIsWhitespace(e,t){const i=e.charCodeAt(t);return 32===i||9===i}static _deleteInsideWordWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=i.length;if(0===n)return null;let o=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(i,o))return null;let r=Math.min(t.column-1,n-1);if(!this._charAtIsWhitespace(i,r))return null;for(;o>0&&this._charAtIsWhitespace(i,o-1);)o--;for(;r+11?new l.e(i.lineNumber-1,t.getLineMaxColumn(i.lineNumber-1),i.lineNumber,1):i.lineNumbere.start+1<=i.column&&i.column<=e.end+1,s=(e,t)=>(e=Math.min(e,i.column),t=Math.max(t,i.column),new l.e(i.lineNumber,e,i.lineNumber,t)),a=e=>{let t=e.start+1,i=e.end+1,r=!1;for(;i-11&&this._charAtIsWhitespace(n,t-2);)t--;return s(t,i)},u=c._findPreviousWordOnLine(e,t,i);if(u&&r(u))return a(u);const h=c._findNextWordOnLine(e,t,i);return h&&r(h)?a(h):u&&h?s(u.end+1,h.start+1):u?s(u.start+1,u.end+1):h?s(h.start+1,h.end+1):s(1,o+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=c._moveWordPartLeft(e,i);return new l.e(i.lineNumber,i.column,n.lineNumber,n.column)}static _findFirstNonWhitespaceChar(e,t){let i=e.length;for(let n=t;n=f.start+1&&(f=c._findNextWordOnLine(i,n,new a.L(u,f.end+1))),f?h=f.start+1:hBoolean(e)))}},9410:(e,t,i)=>{"use strict";i.d(t,{u:()=>r});var n=i(4906);class o extends n.N{constructor(e){super(0);for(let t=0,i=e.length;t(t.hasOwnProperty(e)||(t[e]=(e=>new o(e))(e)),t[e])}()},4906:(e,t,i)=>{"use strict";i.d(t,{N:()=>o,q:()=>r});var n=i(5427);class o{constructor(e){let t=(0,n.K)(e);this._defaultValue=t,this._asciiMap=o._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){let t=new Uint8Array(256);for(let i=0;i<256;i++)t[i]=e;return t}set(e,t){let i=(0,n.K)(t);e>=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}}class r{constructor(){this._actual=new o(0)}add(e){this._actual.set(e,1)}has(e){return 1===this._actual.get(e)}}},9386:(e,t,i)=>{"use strict";i.d(t,{h:()=>o});var n=i(4314);class o{static insert(e,t){return{range:new n.e(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}},8411:(e,t,i)=>{"use strict";i.d(t,{A:()=>o});var n=i(4101);class o{constructor(e,t){this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t}static createEmpty(e){const t=new Uint32Array(2);return t[0]=e.length,t[1]=16793600,new o(t,e)}equals(e){return e instanceof o&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,i){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;const n=t<<1,o=n+(i<<1);for(let t=n;t0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[1+(e<<1)]}getLanguageId(e){const t=this._tokens[1+(e<<1)];return n.NX.getLanguageId(t)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return n.NX.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return n.NX.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return n.NX.getClassNameFromMetadata(t)}getInlineStyle(e,t){const i=this._tokens[1+(e<<1)];return n.NX.getInlineStyleFromMetadata(i,t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return o.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new r(this,e,t,i)}static convertToEndOffset(e,t){const i=(e.length>>>1)-1;for(let t=0;t>>1)-1;for(;it&&(n=o)}return i}}class r{constructor(e,t,i,n){this._source=e,this._startOffset=t,this._endOffset=i,this._deltaOffset=n,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(let t=this._firstTokenIndex,n=e.getCount();t=i);t++)this._tokensCount++}equals(e){return e instanceof r&&this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount)}getCount(){return this._tokensCount}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}},187:(e,t,i)=>{"use strict";i.d(t,{L:()=>n});class n{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new n(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return n.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return n.isBefore(this,e)}static isBefore(e,t){return e.lineNumber{"use strict";i.d(t,{e:()=>o});var n=i(187);class o{constructor(e,t,i,n){e>i||e===i&&t>n?(this.startLineNumber=i,this.startColumn=n,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=i,this.endColumn=n)}isEmpty(){return o.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return o.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.columne.endColumn)}containsRange(e){return o.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)}strictContainsRange(e){return o.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)}plusRange(e){return o.plusRange(this,e)}static plusRange(e,t){let i,n,r,s;return t.startLineNumbere.endLineNumber?(r=t.endLineNumber,s=t.endColumn):t.endLineNumber===e.endLineNumber?(r=t.endLineNumber,s=Math.max(t.endColumn,e.endColumn)):(r=e.endLineNumber,s=e.endColumn),new o(i,n,r,s)}intersectRanges(e){return o.intersectRanges(this,e)}static intersectRanges(e,t){let i=e.startLineNumber,n=e.startColumn,r=e.endLineNumber,s=e.endColumn,a=t.startLineNumber,l=t.startColumn,c=t.endLineNumber,u=t.endColumn;return ic?(r=c,s=u):r===c&&(s=Math.min(s,u)),i>r||i===r&&n>s?null:new o(i,n,r,s)}equalsRange(e){return o.equalsRange(this,e)}static equalsRange(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return o.getEndPosition(this)}static getEndPosition(e){return new n.L(e.endLineNumber,e.endColumn)}getStartPosition(){return o.getStartPosition(this)}static getStartPosition(e){return new n.L(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new o(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new o(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return o.collapseToStart(this)}static collapseToStart(e){return new o(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}static fromPositions(e,t=e){return new o(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new o(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}}},3860:(e,t,i)=>{"use strict";i.d(t,{Y:()=>r});var n=i(187),o=i(4314);class r extends o.e{constructor(e,t,i,n){super(e,t,i,n),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=i,this.positionColumn=n}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return r.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new r(this.startLineNumber,this.startColumn,e,t):new r(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new n.L(this.positionLineNumber,this.positionColumn)}setStartPosition(e,t){return 0===this.getDirection()?new r(e,t,this.endLineNumber,this.endColumn):new r(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new r(e.lineNumber,e.column,t.lineNumber,t.column)}static liftSelection(e){return new r(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let i=0,n=e.length;i{"use strict";i.d(t,{oe:()=>u,lZ:()=>h,l$:()=>d,kH:()=>g});var n=i(7295),o=i(1432),r=i(3060);let s,a,l;function c(){return s||(s=new TextDecoder("UTF-16LE")),s}function u(){return l||(l=o.r()?c():(a||(a=new TextDecoder("UTF-16BE")),a)),l}const h="undefined"!=typeof TextDecoder;let d,g;function f(e,t,i){let n=[],o=0;for(let s=0;snew p(e),g=function(e,t,i){const n=new Uint16Array(e.buffer,t,i);return i>0&&(65279===n[0]||65534===n[0])?f(e,t,i):c().decode(n)}):(d=e=>new m,g=f);class p{constructor(e){this._capacity=0|e,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return null!==this._completedStrings?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(0===this._bufferLength)return"";const e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return u().decode(e)}_flushBuffer(){const e=this._buildBuffer();this._bufferLength=0,null===this._completedStrings?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}write1(e){const t=this._capacity-this._bufferLength;t<=1&&(0===t||n.ZG(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCII(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIIString(e){const t=e.length;if(this._bufferLength+t>=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(let i=0;i{"use strict";i.d(t,{WU:()=>n,hG:()=>o,Hi:()=>r});class n{constructor(e,t,i){this.offset=0|e,this.type=t,this.language=i}toString(){return"("+this.offset+", "+this.type+")"}}class o{constructor(e,t){this.tokens=e,this.endState=t}}class r{constructor(e,t){this.tokens=e,this.endState=t}}},653:(e,t,i)=>{"use strict";i.d(t,{p:()=>n});class n{constructor(e,t,i,n,o,r){this.id=e,this.label=t,this.alias=i,this._precondition=n,this._run=o,this._contextKeyService=r}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(){return this.isSupported()?this._run():Promise.resolve(void 0)}}},6518:(e,t,i)=>{"use strict";function n(e){return e&&"string"==typeof e.id}i.d(t,{I:()=>n,g:()=>o});const o={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}},9102:(e,t,i)=>{"use strict";i.d(t,{u:()=>n});var n,o=i(3580),r=i(8819);!function(e){e.editorSimpleInput=new r.uy("editorSimpleInput",!1,!0),e.editorTextFocus=new r.uy("editorTextFocus",!1,o.N("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),e.focus=new r.uy("editorFocus",!1,o.N("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),e.textInputFocus=new r.uy("textInputFocus",!1,o.N("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),e.readOnly=new r.uy("editorReadonly",!1,o.N("editorReadonly","Whether the editor is read only")),e.inDiffEditor=new r.uy("inDiffEditor",!1,o.N("inDiffEditor","Whether the context is a diff editor")),e.columnSelection=new r.uy("editorColumnSelection",!1,o.N("editorColumnSelection","Whether `editor.columnSelection` is enabled")),e.writable=e.readOnly.toNegated(),e.hasNonEmptySelection=new r.uy("editorHasSelection",!1,o.N("editorHasSelection","Whether the editor has text selected")),e.hasOnlyEmptySelection=e.hasNonEmptySelection.toNegated(),e.hasMultipleSelections=new r.uy("editorHasMultipleSelections",!1,o.N("editorHasMultipleSelections","Whether the editor has multiple selections")),e.hasSingleSelection=e.hasMultipleSelections.toNegated(),e.tabMovesFocus=new r.uy("editorTabMovesFocus",!1,o.N("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),e.tabDoesNotMoveFocus=e.tabMovesFocus.toNegated(),e.isInWalkThroughSnippet=new r.uy("isInEmbeddedEditor",!1,!0),e.canUndo=new r.uy("canUndo",!1,!0),e.canRedo=new r.uy("canRedo",!1,!0),e.hoverVisible=new r.uy("editorHoverVisible",!1,o.N("editorHoverVisible","Whether the editor hover is visible")),e.inCompositeEditor=new r.uy("inCompositeEditor",void 0,o.N("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),e.notInCompositeEditor=e.inCompositeEditor.toNegated(),e.languageId=new r.uy("editorLangId","",o.N("editorLangId","The language identifier of the editor")),e.hasCompletionItemProvider=new r.uy("editorHasCompletionItemProvider",!1,o.N("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),e.hasCodeActionsProvider=new r.uy("editorHasCodeActionsProvider",!1,o.N("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),e.hasCodeLensProvider=new r.uy("editorHasCodeLensProvider",!1,o.N("editorHasCodeLensProvider","Whether the editor has a code lens provider")),e.hasDefinitionProvider=new r.uy("editorHasDefinitionProvider",!1,o.N("editorHasDefinitionProvider","Whether the editor has a definition provider")),e.hasDeclarationProvider=new r.uy("editorHasDeclarationProvider",!1,o.N("editorHasDeclarationProvider","Whether the editor has a declaration provider")),e.hasImplementationProvider=new r.uy("editorHasImplementationProvider",!1,o.N("editorHasImplementationProvider","Whether the editor has an implementation provider")),e.hasTypeDefinitionProvider=new r.uy("editorHasTypeDefinitionProvider",!1,o.N("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),e.hasHoverProvider=new r.uy("editorHasHoverProvider",!1,o.N("editorHasHoverProvider","Whether the editor has a hover provider")),e.hasDocumentHighlightProvider=new r.uy("editorHasDocumentHighlightProvider",!1,o.N("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),e.hasDocumentSymbolProvider=new r.uy("editorHasDocumentSymbolProvider",!1,o.N("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),e.hasReferenceProvider=new r.uy("editorHasReferenceProvider",!1,o.N("editorHasReferenceProvider","Whether the editor has a reference provider")),e.hasRenameProvider=new r.uy("editorHasRenameProvider",!1,o.N("editorHasRenameProvider","Whether the editor has a rename provider")),e.hasSignatureHelpProvider=new r.uy("editorHasSignatureHelpProvider",!1,o.N("editorHasSignatureHelpProvider","Whether the editor has a signature help provider")),e.hasInlayHintsProvider=new r.uy("editorHasInlayHintsProvider",!1,o.N("editorHasInlayHintsProvider","Whether the editor has an inline hints provider")),e.hasDocumentFormattingProvider=new r.uy("editorHasDocumentFormattingProvider",!1,o.N("editorHasDocumentFormattingProvider","Whether the editor has a document formatting provider")),e.hasDocumentSelectionFormattingProvider=new r.uy("editorHasDocumentSelectionFormattingProvider",!1,o.N("editorHasDocumentSelectionFormattingProvider","Whether the editor has a document selection formatting provider")),e.hasMultipleDocumentFormattingProvider=new r.uy("editorHasMultipleDocumentFormattingProvider",!1,o.N("editorHasMultipleDocumentFormattingProvider","Whether the editor has multiple document formatting providers")),e.hasMultipleDocumentSelectionFormattingProvider=new r.uy("editorHasMultipleDocumentSelectionFormattingProvider",!1,o.N("editorHasMultipleDocumentSelectionFormattingProvider","Whether the editor has multiple document selection formatting providers"))}(n||(n={}))},4973:(e,t,i)=>{"use strict";var n,o;i.d(t,{sh:()=>n,F5:()=>o,dJ:()=>r,tk:()=>s,Qi:()=>a,je:()=>l}),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(n||(n={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(o||(o={}));class r{constructor(e){this.tabSize=Math.max(1,0|e.tabSize),this.indentSize=0|e.tabSize,this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace)}equals(e){return this.tabSize===e.tabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class s{constructor(e,t){this.range=e,this.matches=t}}class a{constructor(e,t,i,n,o,r){this.identifier=e,this.range=t,this.text=i,this.forceMoveMarkers=n,this.isAutoWhitespaceEdit=o,this._isTracked=r}}class l{constructor(e,t,i){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=i}}},5215:(e,t,i)=>{"use strict";i.d(t,{e9:()=>f,NL:()=>p});var n=i(3580),o=i(7301),r=i(3860),s=i(666),a=i(962),l=i(3060),c=i(5935);function u(e){return e.toString()}class h{constructor(e,t,i,n,o,r,s){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=i,this.afterEOL=n,this.beforeCursorState=o,this.afterCursorState=r,this.changes=s}static create(e,t){const i=e.getAlternativeVersionId(),n=g(e);return new h(i,i,n,n,t,t,[])}append(e,t,i,n,o){t.length>0&&(this.changes=(0,a.b)(this.changes,t)),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=o}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,i){if(l.T4(e,t?t.length:0,i),i+=4,t)for(const n of t)l.T4(e,n.selectionStartLineNumber,i),i+=4,l.T4(e,n.selectionStartColumn,i),i+=4,l.T4(e,n.positionLineNumber,i),i+=4,l.T4(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){const n=l.Ag(e,t);t+=4;for(let o=0;oe.toString())).join(", ")}matchesResource(e){return(s.o.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof h}append(e,t,i,n,o){this._data instanceof h&&this._data.append(e,t,i,n,o)}close(){this._data instanceof h&&(this._data=this._data.serialize())}open(){this._data instanceof h||(this._data=h.deserialize(this._data))}undo(){if(s.o.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof h&&(this._data=this._data.serialize());const e=h.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(s.o.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof h&&(this._data=this._data.serialize());const e=h.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof h&&(this._data=this._data.serialize()),this._data.byteLength+168}}function g(e){return"\n"===e.getEOL()?0:1}function f(e){return!!e&&(e instanceof d||e instanceof class{constructor(e,t){this.type=1,this.label=e,this._isOpen=!0,this._editStackElementsArr=t.slice(0),this._editStackElementsMap=new Map;for(const e of this._editStackElementsArr){const t=u(e.resource);this._editStackElementsMap.set(t,e)}this._delegate=null}get resources(){return this._editStackElementsArr.map((e=>e.resource))}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=u(e);return this._editStackElementsMap.has(t)}setModel(e){const t=u(s.o.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=u(e.uri);return!!this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).canAppend(e)}append(e,t,i,n,o){const r=u(e.uri);this._editStackElementsMap.get(r).append(e,t,i,n,o)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=u(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){let e=[];for(const t of this._editStackElementsArr)e.push(`${(0,c.EZ)(t.resource)}: ${t}`);return`{${e.join(", ")}}`}})}class p{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);f(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);f(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e){const t=this._undoRedoService.getLastElement(this._model.uri);if(f(t)&&t.canAppend(this._model))return t;const i=new d(this._model,e);return this._undoRedoService.pushElement(i),i}pushEOL(e){const t=this._getOrCreateEditStackElement(null);this._model.setEOL(e),t.append(this._model,[],g(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i){const n=this._getOrCreateEditStackElement(e),o=this._model.applyEdits(t,!0),r=p._computeCursorState(i,o),s=o.map(((e,t)=>({index:t,textChange:e.textChange})));return s.sort(((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition)),n.append(this._model,s.map((e=>e.textChange)),g(this._model),this._model.getAlternativeVersionId(),r),r}static _computeCursorState(e,t){try{return e?e(t):null}catch(e){return(0,o.dL)(e),null}}}},962:(e,t,i)=>{"use strict";i.d(t,{q:()=>s,b:()=>a});var n=i(3060),o=i(72);function r(e){return e.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class s{constructor(e,t,i,n){this.oldPosition=e,this.oldText=t,this.newPosition=i,this.newText=n}get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}toString(){return 0===this.oldText.length?`(insert@${this.oldPosition} "${r(this.newText)}")`:0===this.newText.length?`(delete@${this.oldPosition} "${r(this.oldText)}")`:`(replace@${this.oldPosition} "${r(this.oldText)}" with "${r(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,i){const o=t.length;n.T4(e,o,i),i+=4;for(let r=0;r{"use strict";i.d(t,{qx:()=>Ke,yO:()=>Ve});var n=i(7301),o=i(4669),r=i(5976),s=i(7295),a=i(666),l=i(4141),c=i(187),u=i(4314),h=i(3860),d=i(4973),g=i(5215);class f{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function p(e,t,i,n,o){let r;for(o.spacesDiff=0,o.looksLikeAlignment=!1,r=0;r0&&a>0)return;if(l>0&&c>0)return;let u=Math.abs(a-c),h=Math.abs(s-l);if(0===u)return o.spacesDiff=h,void(h>0&&0<=l-1&&l-10?o++:m>1&&r++,p(s,a,h,f,u),u.looksLikeAlignment&&(!i||t!==u.spacesDiff))continue;let v=u.spacesDiff;v<=8&&c[v]++,s=h,a=f}let h=i;o!==r&&(h=o{let i=c[t];i>e&&(e=i,d=t)})),4===d&&c[4]>0&&c[2]>0&&c[2]>=c[4]/2&&(d=2)}return{insertSpaces:h,tabSize:d}}function _(e){return(1&e.metadata)>>>0}function v(e,t){e.metadata=254&e.metadata|t<<0}function b(e){return(2&e.metadata)>>>1==1}function y(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function w(e){return(4&e.metadata)>>>2==1}function C(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function S(e){return(8&e.metadata)>>>3==1}function x(e,t){e.metadata=247&e.metadata|(t?1:0)<<3}function k(e,t){e.metadata=207&e.metadata|t<<4}function D(e,t){e.metadata=191&e.metadata|(t?1:0)<<6}class L{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,v(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,C(this,!1),k(this,1),x(this,!1),D(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,y(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;let t=this.options.className;C(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),k(this,this.options.stickiness),x(this,!(!this.options.overviewRuler||!this.options.overviewRuler.color)),D(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const N=new L(null,0,0);N.parent=N,N.left=N,N.right=N,v(N,0);class E{constructor(){this.root=N,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,o){return this.root===N?[]:function(e,t,i,n,o,r){let s=e.root,a=0,l=0,c=0,u=0,h=[],d=0;for(;s!==N;)if(b(s))y(s.left,!1),y(s.right,!1),s===s.parent.right&&(a-=s.parent.delta),s=s.parent;else{if(!b(s.left)){if(l=a+s.maxEnd,li)y(s,!0);else{if(u=a+s.end,u>=t){s.setCachedOffsets(c,u,r);let e=!0;n&&s.ownerId&&s.ownerId!==n&&(e=!1),o&&w(s)&&(e=!1),e&&(h[d++]=s)}y(s,!0),s.right===N||b(s.right)||(a+=s.delta,s=s.right)}}return y(e.root,!1),h}(this,e,t,i,n,o)}search(e,t,i){return this.root===N?[]:function(e,t,i,n){let o=e.root,r=0,s=0,a=0,l=[],c=0;for(;o!==N;){if(b(o)){y(o.left,!1),y(o.right,!1),o===o.parent.right&&(r-=o.parent.delta),o=o.parent;continue}if(o.left!==N&&!b(o.left)){o=o.left;continue}s=r+o.start,a=r+o.end,o.setCachedOffsets(s,a,n);let e=!0;t&&o.ownerId&&o.ownerId!==t&&(e=!1),i&&w(o)&&(e=!1),e&&(l[c++]=o),y(o,!0),o.right===N||b(o.right)||(r+=o.delta,o=o.right)}return y(e.root,!1),l}(this,e,t,i)}collectNodesFromOwner(e){return function(e,t){let i=e.root,n=[],o=0;for(;i!==N;)b(i)?(y(i.left,!1),y(i.right,!1),i=i.parent):i.left===N||b(i.left)?(i.ownerId===t&&(n[o++]=i),y(i,!0),i.right===N||b(i.right)||(i=i.right)):i=i.left;return y(e.root,!1),n}(this,e)}collectNodesPostOrder(){return function(e){let t=e.root,i=[],n=0;for(;t!==N;)b(t)?(y(t.left,!1),y(t.right,!1),t=t.parent):t.left===N||b(t.left)?t.right===N||b(t.right)?(i[n++]=t,y(t,!0)):t=t.right:t=t.left;return y(e.root,!1),i}(this)}insert(e){I(this,e),this._normalizeDeltaIfNecessary()}delete(e){T(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const i=e;let n=0;for(;e!==this.root;)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;const o=i.start+n,r=i.end+n;i.setCachedOffsets(o,r,t)}acceptReplace(e,t,i,n){const o=function(e,t,i){let n=e.root,o=0,r=0,s=0,a=0,l=[],c=0;for(;n!==N;)if(b(n))y(n.left,!1),y(n.right,!1),n===n.parent.right&&(o-=n.parent.delta),n=n.parent;else{if(!b(n.left)){if(r=o+n.maxEnd,ri?y(n,!0):(a=o+n.end,a>=t&&(n.setCachedOffsets(s,a,0),l[c++]=n),y(n,!0),n.right===N||b(n.right)||(o+=n.delta,n=n.right))}return y(e.root,!1),l}(this,e,e+t);for(let e=0,t=o.length;ei?(o.start+=l,o.end+=l,o.delta+=l,(o.delta<-1073741824||o.delta>1073741824)&&(e.requestNormalizeDelta=!0),y(o,!0)):(y(o,!0),o.right===N||b(o.right)||(r+=o.delta,o=o.right))}y(e.root,!1)}(this,e,e+t,i),this._normalizeDeltaIfNecessary();for(let r=0,s=o.length;ri)&&1!==n&&(2===n||t)}function M(e,t,i,n,o){const r=function(e){return(48&e.metadata)>>>4}(e),s=0===r||2===r,a=1===r||2===r,l=i-t,c=n,u=Math.min(l,c),h=e.start;let d=!1;const g=e.end;let f=!1;t<=h&&g<=i&&function(e){return(64&e.metadata)>>>6==1}(e)&&(e.start=t,d=!0,e.end=t,f=!0);{const e=o?1:l>0?2:0;!d&&A(h,s,t,e)&&(d=!0),!f&&A(g,a,t,e)&&(f=!0)}if(u>0&&!o){const e=l>c?2:0;!d&&A(h,s,t+u,e)&&(d=!0),!f&&A(g,a,t+u,e)&&(f=!0)}{const n=o?1:0;!d&&A(h,s,i,n)&&(e.start=t+c,d=!0),!f&&A(g,a,i,n)&&(e.end=t+c,f=!0)}const p=c-l;d||(e.start=Math.max(0,h+p)),f||(e.end=Math.max(0,g+p)),e.start>e.end&&(e.end=e.start)}function I(e,t){if(e.root===N)return t.parent=N,t.left=N,t.right=N,v(t,0),e.root=t,e.root;!function(e,t){let i=0,n=e.root;const o=t.start,r=t.end;for(;;)if(s=o,a=r,l=n.start+i,c=n.end+i,(s===l?a-c:s-l)<0){if(n.left===N){t.start-=i,t.end-=i,t.maxEnd-=i,n.left=t;break}n=n.left}else{if(n.right===N){t.start-=i+n.delta,t.end-=i+n.delta,t.maxEnd-=i+n.delta,n.right=t;break}i+=n.delta,n=n.right}var s,a,l,c;t.parent=n,t.left=N,t.right=N,v(t,1)}(e,t),z(t.parent);let i=t;for(;i!==e.root&&1===_(i.parent);)if(i.parent===i.parent.parent.left){const t=i.parent.parent.right;1===_(t)?(v(i.parent,0),v(t,0),v(i.parent.parent,1),i=i.parent.parent):(i===i.parent.right&&(i=i.parent,O(e,i)),v(i.parent,0),v(i.parent.parent,1),F(e,i.parent.parent))}else{const t=i.parent.parent.left;1===_(t)?(v(i.parent,0),v(t,0),v(i.parent.parent,1),i=i.parent.parent):(i===i.parent.left&&(i=i.parent,F(e,i)),v(i.parent,0),v(i.parent.parent,1),O(e,i.parent.parent))}return v(e.root,0),t}function T(e,t){let i,n;if(t.left===N?(i=t.right,n=t,i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta):t.right===N?(i=t.left,n=t):(n=function(e){for(;e.left!==N;)e=e.left;return e}(t.right),i=n.right,i.start+=n.delta,i.end+=n.delta,i.delta+=n.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,n.delta=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0)),n===e.root)return e.root=i,v(i,0),t.detach(),R(),B(i),void(e.root.parent=N);let o,r=1===_(n);if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?i.parent=n.parent:(n.parent===t?i.parent=n:i.parent=n.parent,n.left=t.left,n.right=t.right,n.parent=t.parent,v(n,_(t)),t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==N&&(n.left.parent=n),n.right!==N&&(n.right.parent=n)),t.detach(),r)return z(i.parent),n!==t&&(z(n),z(n.parent)),void R();for(z(i),z(i.parent),n!==t&&(z(n),z(n.parent));i!==e.root&&0===_(i);)i===i.parent.left?(o=i.parent.right,1===_(o)&&(v(o,0),v(i.parent,1),O(e,i.parent),o=i.parent.right),0===_(o.left)&&0===_(o.right)?(v(o,1),i=i.parent):(0===_(o.right)&&(v(o.left,0),v(o,1),F(e,o),o=i.parent.right),v(o,_(i.parent)),v(i.parent,0),v(o.right,0),O(e,i.parent),i=e.root)):(o=i.parent.left,1===_(o)&&(v(o,0),v(i.parent,1),F(e,i.parent),o=i.parent.left),0===_(o.left)&&0===_(o.right)?(v(o,1),i=i.parent):(0===_(o.left)&&(v(o.right,0),v(o,1),O(e,o),o=i.parent.left),v(o,_(i.parent)),v(i.parent,0),v(o.left,0),F(e,i.parent),i=e.root));v(i,0),R()}function R(){N.parent=N,N.delta=0,N.start=0,N.end=0}function O(e,t){const i=t.right;i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,t.right=i.left,i.left!==N&&(i.left.parent=t),i.parent=t.parent,t.parent===N?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i,B(t),B(i)}function F(e,t){const i=t.left;t.delta-=i.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=i.delta,t.end-=i.delta,t.left=i.right,i.right!==N&&(i.right.parent=t),i.parent=t.parent,t.parent===N?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i,B(t),B(i)}function P(e){let t=e.end;if(e.left!==N){const i=e.left.maxEnd;i>t&&(t=i)}if(e.right!==N){const i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function B(e){e.maxEnd=P(e)}function z(e){for(;e!==N;){const t=P(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}class W{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==V)return H(this.right);let e=this;for(;e.parent!==V&&e.parent.left!==e;)e=e.parent;return e.parent===V?V:e.parent}prev(){if(this.left!==V)return $(this.left);let e=this;for(;e.parent!==V&&e.parent.right!==e;)e=e.parent;return e.parent===V?V:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const V=new W(null,0);function H(e){for(;e.left!==V;)e=e.left;return e}function $(e){for(;e.right!==V;)e=e.right;return e}function U(e){return e===V?0:e.size_left+e.piece.length+U(e.right)}function j(e){return e===V?0:e.lf_left+e.piece.lineFeedCnt+j(e.right)}function q(){V.parent=V}function K(e,t){let i=t.right;i.size_left+=t.size_left+(t.piece?t.piece.length:0),i.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=i.left,i.left!==V&&(i.left.parent=t),i.parent=t.parent,t.parent===V?e.root=i:t.parent.left===t?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i}function G(e,t){let i=t.left;t.left=i.right,i.right!==V&&(i.right.parent=t),i.parent=t.parent,t.size_left-=i.size_left+(i.piece?i.piece.length:0),t.lf_left-=i.lf_left+(i.piece?i.piece.lineFeedCnt:0),t.parent===V?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i}function Y(e,t){let i,n;if(t.left===V?(n=t,i=n.right):t.right===V?(n=t,i=n.left):(n=H(t.right),i=n.right),n===e.root)return e.root=i,i.color=0,t.detach(),q(),void(e.root.parent=V);let o,r=1===n.color;if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?(i.parent=n.parent,Q(e,i)):(n.parent===t?i.parent=n:i.parent=n.parent,Q(e,i),n.left=t.left,n.right=t.right,n.parent=t.parent,n.color=t.color,t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==V&&(n.left.parent=n),n.right!==V&&(n.right.parent=n),n.size_left=t.size_left,n.lf_left=t.lf_left,Q(e,n)),t.detach(),i.parent.left===i){let t=U(i),n=j(i);if(t!==i.parent.size_left||n!==i.parent.lf_left){let o=t-i.parent.size_left,r=n-i.parent.lf_left;i.parent.size_left=t,i.parent.lf_left=n,X(e,i.parent,o,r)}}if(Q(e,i.parent),r)q();else{for(;i!==e.root&&0===i.color;)i===i.parent.left?(o=i.parent.right,1===o.color&&(o.color=0,i.parent.color=1,K(e,i.parent),o=i.parent.right),0===o.left.color&&0===o.right.color?(o.color=1,i=i.parent):(0===o.right.color&&(o.left.color=0,o.color=1,G(e,o),o=i.parent.right),o.color=i.parent.color,i.parent.color=0,o.right.color=0,K(e,i.parent),i=e.root)):(o=i.parent.left,1===o.color&&(o.color=0,i.parent.color=1,G(e,i.parent),o=i.parent.left),0===o.left.color&&0===o.right.color?(o.color=1,i=i.parent):(0===o.left.color&&(o.right.color=0,o.color=1,K(e,o),o=i.parent.left),o.color=i.parent.color,i.parent.color=0,o.left.color=0,G(e,i.parent),i=e.root));i.color=0,q()}}function Z(e,t){for(Q(e,t);t!==e.root&&1===t.parent.color;)if(t.parent===t.parent.parent.left){const i=t.parent.parent.right;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&K(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,G(e,t.parent.parent))}else{const i=t.parent.parent.left;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&G(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,K(e,t.parent.parent))}e.root.color=0}function X(e,t,i,n){for(;t!==e.root&&t!==V;)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}function Q(e,t){let i=0,n=0;if(t!==e.root){if(0===i){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t===e.root)return;i=U((t=t.parent).left)-t.size_left,n=j(t.left)-t.lf_left,t.size_left+=i,t.lf_left+=n}for(;t!==e.root&&(0!==i||0!==n);)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}}V.parent=V,V.left=V,V.right=V,V.color=0;var J=i(7277);const ee=65535;function te(e){let t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}class ie{constructor(e,t,i,n,o){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=o}}function ne(e,t=!0){let i=[0],n=1;for(let t=0,o=e.length;t(e!==V&&this._pieces.push(e.piece),!0)))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class ae{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){let i=this._cache[t];if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){let i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1,i=this._cache;for(let n=0;n=e)&&(i[n]=null,t=!0)}if(t){let e=[];for(const t of i)null!==t&&e.push(t);this._cache=e}}}class le{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new re("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=V,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=i;let n=null;for(let t=0,i=e.length;t0){e[t].lineStarts||(e[t].lineStarts=ne(e[t].buffer));let i=new oe(t+1,{line:0,column:0},{line:e[t].lineStarts.length-1,column:e[t].buffer.length-e[t].lineStarts[e[t].lineStarts.length-1]},e[t].lineStarts.length-1,e[t].buffer.length);this._buffers.push(e[t]),n=this.rbInsertRight(n,i)}this._searchCache=new ae(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){let t=65535-Math.floor(21845),i=2*t,n="",o=0,r=[];if(this.iterate(this.root,(s=>{let a=this.getNodeContent(s),l=a.length;if(o<=t||o+l0){let t=n.replace(/\r\n|\r|\n/g,e);r.push(new re(t,ne(t)))}this.create(r,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new se(this,e)}getOffsetAt(e,t){let i=0,n=this.root;for(;n!==V;)if(n.left!==V&&n.lf_left+1>=e)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt+1>=e)return i+=n.size_left,i+(this.getAccumulatedValue(n,e-n.lf_left-2)+t-1);e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}return i}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,i=0,n=e;for(;t!==V;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){let o=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+o.index,0===o.index){let e=n-this.getOffsetAt(i+1,1);return new c.L(i+1,e+1)}return new c.L(i+1,o.remainder+1)}if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===V){let t=n-e-this.getOffsetAt(i+1,1);return new c.L(i+1,t+1)}t=t.right}return new c.L(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";let i=this.nodeAt2(e.startLineNumber,e.startColumn),n=this.nodeAt2(e.endLineNumber,e.endColumn),o=this.getValueInRange2(i,n);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?o:o.replace(/\r\n|\r|\n/g,t):o}getValueInRange2(e,t){if(e.node===t.node){let i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n.substring(o+e.remainder,o+t.remainder)}let i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start),r=n.substring(o+e.remainder,o+i.piece.length);for(i=i.next();i!==V;){let e=this._buffers[i.piece.bufferIndex].buffer,n=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){r+=e.substring(n,n+t.remainder);break}r+=e.substr(n,i.piece.length),i=i.next()}return r}getLinesContent(){let e=[],t=0,i="",n=!1;return this.iterate(this.root,(o=>{if(o===V)return!0;const r=o.piece;let s=r.length;if(0===s)return!0;const a=this._buffers[r.bufferIndex].buffer,l=this._buffers[r.bufferIndex].lineStarts,c=r.start.line,u=r.end.line;let h=l[c]+r.start.column;if(n&&(10===a.charCodeAt(h)&&(h++,s--),e[t++]=i,i="",n=!1,0===s))return!0;if(c===u)return this._EOLNormalized||13!==a.charCodeAt(h+s-1)?i+=a.substr(h,s):(n=!0,i+=a.substr(h,s-1)),!0;i+=this._EOLNormalized?a.substring(h,Math.max(h,l[c+1]-this._EOLLength)):a.substring(h,l[c+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let n=c+1;ne+_,t.reset(0)):(g=p.buffer,f=e=>e,t.reset(_));do{if(d=t.next(g),d){if(f(d.index)>=v)return c;this.positionInBuffer(e,f(d.index)-m,b);let t=this.getLineFeedCnt(e.piece.bufferIndex,o,b),r=b.line===o.line?b.column-o.column+n:b.column+1,s=r+d[0].length;if(h[c++]=(0,J.iE)(new u.e(i+t,r,i+t,s),d,a),f(d.index)+d[0].length>=v)return c;if(c>=l)return c}}while(d);return c}findMatchesLineByLine(e,t,i,n){const o=[];let r=0;const s=new J.sz(t.wordSeparators,t.regex);let a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];let l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let c=this.positionInBuffer(a.node,a.remainder),u=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,s,e.startLineNumber,e.startColumn,c,u,t,i,n,r,o),o;let h=e.startLineNumber,d=a.node;for(;d!==l.node;){let l=this.getLineFeedCnt(d.piece.bufferIndex,c,d.piece.end);if(l>=1){let a=this._buffers[d.piece.bufferIndex].lineStarts,u=this.offsetInBuffer(d.piece.bufferIndex,d.piece.start),g=a[c.line+l],f=h===e.startLineNumber?e.startColumn:1;if(r=this.findMatchesInNode(d,s,h,f,c,this.positionInBuffer(d,g-u),t,i,n,r,o),r>=n)return o;h+=l}let u=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){const a=this.getLineContent(h).substring(u,e.endColumn-1);return r=this._findMatchesInLine(t,s,a,e.endLineNumber,u,r,o,i,n),o}if(r=this._findMatchesInLine(t,s,this.getLineContent(h).substr(u),h,u,r,o,i,n),r>=n)return o;h++,a=this.nodeAt2(h,1),d=a.node,c=this.positionInBuffer(a.node,a.remainder)}if(h===e.endLineNumber){let a=h===e.startLineNumber?e.startColumn-1:0;const l=this.getLineContent(h).substring(a,e.endColumn-1);return r=this._findMatchesInLine(t,s,l,e.endLineNumber,a,r,o,i,n),o}let g=h===e.startLineNumber?e.startColumn:1;return r=this.findMatchesInNode(l.node,s,h,g,c,u,t,i,n,r,o),o}_findMatchesInLine(e,t,i,n,o,r,s,a,l){const c=e.wordSeparators;if(!a&&e.simpleSearch){const t=e.simpleSearch,a=t.length,h=i.length;let g=-a;for(;-1!==(g=i.indexOf(t,g+a));)if((!c||(0,J.cM)(c,i,h,g,a))&&(s[r++]=new d.tk(new u.e(n,g+1+o,n,g+1+a+o),null),r>=l))return r;return r}let h;t.reset(0);do{if(h=t.next(i),h&&(s[r++]=(0,J.iE)(new u.e(n,h.index+1+o,n,h.index+1+h[0].length+o),h,a),r>=l))return r}while(h);return r}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==V){let{node:i,remainder:n,nodeStartOffset:o}=this.nodeAt(e),r=i.piece,s=r.bufferIndex,a=this.positionInBuffer(i,n);if(0===i.piece.bufferIndex&&r.end.line===this._lastChangeBufferPos.line&&r.end.column===this._lastChangeBufferPos.column&&o+r.length===e&&t.lengthe){let e=[],o=new oe(r.bufferIndex,a,r.end,this.getLineFeedCnt(r.bufferIndex,a,r.end),this.offsetInBuffer(s,r.end)-this.offsetInBuffer(s,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&10===this.nodeCharCodeAt(i,n)){let e={line:o.start.line+1,column:0};o=new oe(o.bufferIndex,e,o.end,this.getLineFeedCnt(o.bufferIndex,e,o.end),o.length-1),t+="\n"}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(13===this.nodeCharCodeAt(i,n-1)){let o=this.positionInBuffer(i,n-1);this.deleteNodeTail(i,o),t="\r"+t,0===i.piece.length&&e.push(i)}else this.deleteNodeTail(i,a);else this.deleteNodeTail(i,a);let l=this.createNewPieces(t);o.length>0&&this.rbInsertRight(i,o);let c=i;for(let e=0;e=0;e--)o=this.rbInsertLeft(o,n[e]);this.validateCRLFWithPrevNode(o),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");let i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]),o=n;for(let e=1;e=u))break;a=c+1}return i?(i.line=c,i.column=s-h,null):{line:c,column:s-h}}getLineFeedCnt(e,t,i){if(0===i.column)return i.line-t.line;let n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;let o=n[i.line+1],r=n[i.line]+i.column;if(o>r+1)return i.line-t.line;let s=r-1;return 13===this._buffers[e].buffer.charCodeAt(s)?i.line-t.line+1:i.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;tee){let t=[];for(;e.length>ee;){const i=e.charCodeAt(65534);let n;13===i||i>=55296&&i<=56319?(n=e.substring(0,65534),e=e.substring(65534)):(n=e.substring(0,ee),e=e.substring(ee));let o=ne(n);t.push(new oe(this._buffers.length,{line:0,column:0},{line:o.length-1,column:n.length-o[o.length-1]},o.length-1,n.length)),this._buffers.push(new re(n,o))}let i=ne(e);return t.push(new oe(this._buffers.length,{line:0,column:0},{line:i.length-1,column:e.length-i[i.length-1]},i.length-1,e.length)),this._buffers.push(new re(e,i)),t}let t=this._buffers[0].buffer.length;const i=ne(e,!1);let n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&0!==t&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},n=this._lastChangeBufferPos;for(let e=0;e=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){let n=this.getAccumulatedValue(i,e-i.lf_left-2),s=this.getAccumulatedValue(i,e-i.lf_left-1),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return o+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:o,nodeStartLineNumber:r-(e-1-i.lf_left)}),a.substring(l+n,l+s-t)}if(i.lf_left+i.piece.lineFeedCnt===e-1){let t=this.getAccumulatedValue(i,e-i.lf_left-2),o=this._buffers[i.piece.bufferIndex].buffer,r=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=o.substring(r+t,r+i.piece.length);break}e-=i.lf_left+i.piece.lineFeedCnt,o+=i.size_left+i.piece.length,i=i.right}}for(i=i.next();i!==V;){let e=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){let o=this.getAccumulatedValue(i,0),r=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=e.substring(r,r+o-t),n}{let t=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=e.substr(t,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;for(;e!==V;)t+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=i,this._searchCache.validate(this._length)}getIndexOf(e,t){let i=e.piece,n=this.positionInBuffer(e,t),o=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){let t=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(t!==o)return{index:t,remainder:0}}return{index:o,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;let i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,o=i.start.line+t+1;return o>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[o]-n[i.start.line]-i.start.column}deleteNodeTail(e,t){const i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.end),r=t,s=this.offsetInBuffer(i.bufferIndex,r),a=this.getLineFeedCnt(i.bufferIndex,i.start,r),l=a-n,c=s-o,u=i.length+c;e.piece=new oe(i.bufferIndex,i.start,r,a,u),X(this,e,c,l)}deleteNodeHead(e,t){const i=e.piece,n=i.lineFeedCnt,o=this.offsetInBuffer(i.bufferIndex,i.start),r=t,s=this.getLineFeedCnt(i.bufferIndex,r,i.end),a=s-n,l=o-this.offsetInBuffer(i.bufferIndex,r),c=i.length+l;e.piece=new oe(i.bufferIndex,r,i.end,s,c),X(this,e,l,a)}shrinkNode(e,t,i){const n=e.piece,o=n.start,r=n.end,s=n.length,a=n.lineFeedCnt,l=t,c=this.getLineFeedCnt(n.bufferIndex,n.start,l),u=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,o);e.piece=new oe(n.bufferIndex,n.start,l,c,u),X(this,e,u-s,c-a);let h=new oe(n.bufferIndex,i,r,this.getLineFeedCnt(n.bufferIndex,i,r),this.offsetInBuffer(n.bufferIndex,r)-this.offsetInBuffer(n.bufferIndex,i)),d=this.rbInsertRight(e,h);this.validateCRLFWithPrevNode(d)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");const i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const o=ne(t,!1);for(let e=0;ee)t=t.left;else{if(t.size_left+t.piece.length>=e){n+=t.size_left;let i={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(i),i}e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right}return null}nodeAt2(e,t){let i=this.root,n=0;for(;i!==V;)if(i.left!==V&&i.lf_left>=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){let o=this.getAccumulatedValue(i,e-i.lf_left-2),r=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(o+t-1,r),nodeStartOffset:n}}if(i.lf_left+i.piece.lineFeedCnt===e-1){let o=this.getAccumulatedValue(i,e-i.lf_left-2);if(o+t-1<=i.piece.length)return{node:i,remainder:o+t-1,nodeStartOffset:n};t-=i.piece.length-o;break}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==V;){if(i.piece.lineFeedCnt>0){let e=this.getAccumulatedValue(i,0),n=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,e),nodeStartOffset:n}}if(i.piece.length>=t-1)return{node:i,remainder:t-1,nodeStartOffset:this.offsetOfNode(i)};t-=i.piece.length,i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;let i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return i.buffer.charCodeAt(n)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&"\n"===this._EOL)}startWithLF(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===V||0===e.piece.lineFeedCnt)return!1;let t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,o=i[n]+t.start.column;return n!==i.length-1&&!(i[n+1]>o+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(o)}endWithCR(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==V&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){let t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){let t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){let i,n=[],o=this._buffers[e.piece.bufferIndex].lineStarts;i=0===e.piece.end.column?{line:e.piece.end.line-1,column:o[e.piece.end.line]-o[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};const r=e.piece.length-1,s=e.piece.lineFeedCnt-1;e.piece=new oe(e.piece.bufferIndex,e.piece.start,i,s,r),X(this,e,-1,-1),0===e.piece.length&&n.push(e);let a={line:t.piece.start.line+1,column:0};const l=t.piece.length-1,c=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new oe(t.piece.bufferIndex,a,t.piece.end,c,l),X(this,t,-1,-1),0===t.piece.length&&n.push(t);let u=this.createNewPieces("\r\n");this.rbInsertRight(e,u[0]);for(let e=0;ee.sortIndex-t.sortIndex))}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=o,this._mightContainNonBasicASCII=r;const f=this._doApplyEdits(l);let p=null;if(t&&h.length>0){h.sort(((e,t)=>t.lineNumber-e.lineNumber)),p=[];for(let e=0,t=h.length;e0&&h[e-1].lineNumber===t)continue;let i=h[e].oldContent,n=this.getLineContent(t);0!==n.length&&n!==i&&-1===s.LC(n)&&p.push(t)}}return this._onDidChangeContent.fire(),new d.je(g,f,p)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const i=e[0].range,n=e[e.length-1].range,o=new u.e(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let r=i.startLineNumber,s=i.startColumn;const a=[];for(let i=0,n=e.length;i0&&a.push(n.text),r=o.endLineNumber,s=o.endColumn}const l=a.join(""),[c,h,d]=(0,ce.QZ)(l);return{sortIndex:0,identifier:e[0].identifier,range:o,rangeOffset:this.getOffsetAt(o.startLineNumber,o.startColumn),rangeLength:this.getValueLengthInRange(o,0),text:l,eolCount:c,firstLineLength:h,lastLineLength:d,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(he._sortOpsDescending);let t=[];for(let i=0;i0){const e=c.eolCount+1;l=1===e?new u.e(s,a,s,a+c.firstLineLength):new u.e(s,a,s+e-1,c.lastLineLength+1)}else l=new u.e(s,a,s,a);i=l.endLineNumber,n=l.endColumn,t.push(l),o=c}return t}static _sortOpsAscending(e,t){let i=u.e.compareRangesUsingEnds(e.range,t.range);return 0===i?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){let i=u.e.compareRangesUsingEnds(e.range,t.range);return 0===i?t.sortIndex-e.sortIndex:-i}}class de{constructor(e,t,i,n,o,r,s,a,l){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=o,this._containsRTL=r,this._containsUnusualLineTerminators=s,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":i>t/2?"\r\n":"\n"}create(e){const t=this._getEOL(e);let i=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let e=0,n=i.length;e=55296&&t<=56319?(this._acceptChunk1(e.substr(0,e.length-1),!1),this._hasPreviousChar=!0,this._previousChar=t):(this._acceptChunk1(e,!1),this._hasPreviousChar=!1,this._previousChar=t)}_acceptChunk1(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=function(e,t){e.length=0,e[0]=0;let i=1,n=0,o=0,r=0,s=!0;for(let a=0,l=t.length;a126)&&(s=!1)}const a=new ie(te(e),n,o,r,s);return e.length=0,a}(this._tmpLineStarts,e);this.chunks.push(new re(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),this.isBasicASCII||this.containsRTL||(this.containsRTL=s.Ut(e)),this.isBasicASCII||this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=s.ab(e))}finish(e=!0){return this._finish(),new de(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;let e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);let t=ne(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}class fe{constructor(){this.changeType=1}}class pe{constructor(e,t){this.changeType=2,this.lineNumber=e,this.detail=t}}class me{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class _e{constructor(e,t,i){this.changeType=4,this.fromLineNumber=e,this.toLineNumber=t,this.detail=i}}class ve{constructor(){this.changeType=5}}class be{constructor(e,t,i,n){this.changes=e,this.versionId=t,this.isUndoing=i,this.isRedoing=n,this.resultingSelection=null}containsEvent(e){for(let t=0,i=this.changes.length;t=this._len;)this._beginState[this._len]=null,this._valid[this._len]=!1,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._beginState.splice(e,t),this._valid.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;let i=[],n=[];for(let e=0;e=0;t--)this._invalidateLine(e.startLineNumber+t-1);this._acceptDeleteRange(e),this._acceptInsertText(new c.L(e.startLineNumber,e.startColumn),t)}_acceptDeleteRange(e){e.startLineNumber-1>=this._len||this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,t){e.lineNumber-1>=this._len||this._insertLines(e.lineNumber,t)}}class Ne extends r.JT{constructor(e){super(),this._isDisposed=!1,this._textModel=e,this._tokenizationStateStore=new Le,this._tokenizationSupport=null,this._register(Se.RW.onDidChange((e=>{const t=this._textModel.getLanguageIdentifier();-1!==e.changedLanguages.indexOf(t.language)&&(this._resetTokenizationState(),this._textModel.clearTokens())}))),this._register(this._textModel.onDidChangeRawContentFast((e=>{e.containsEvent(1)&&this._resetTokenizationState()}))),this._register(this._textModel.onDidChangeContentFast((e=>{for(let t=0,i=e.changes.length;t{this._beginBackgroundTokenization()}))),this._register(this._textModel.onDidChangeLanguage((()=>{this._resetTokenizationState(),this._textModel.clearTokens()}))),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}_resetTokenizationState(){const[e,t]=function(e){const t=e.getLanguageIdentifier();let i=e.isTooLargeForTokenization()?null:Se.RW.get(t.language),o=null;if(i)try{o=i.getInitialState()}catch(e){(0,n.dL)(e),i=null}return[i,o]}(this._textModel);this._tokenizationSupport=e,this._tokenizationStateStore.flush(t),this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&De.xS((()=>{this._isDisposed||this._revalidateTokensNow()}))}_revalidateTokensNow(e=this._textModel.getLineCount()){const t=new ce.DA,i=ke.G.create(!1);for(;this._hasLinesToTokenize()&&!(i.elapsed()>1)&&!(this._tokenizeOneInvalidLine(t)>=e););this._beginBackgroundTokenization(),this._textModel.setTokens(t.tokens)}tokenizeViewport(e,t){const i=new ce.DA;this._tokenizeViewport(i,e,t),this._textModel.setTokens(i.tokens)}reset(){this._resetTokenizationState(),this._textModel.clearTokens()}forceTokenization(e){const t=new ce.DA;this._updateTokensUntilLine(t,e),this._textModel.setTokens(t.tokens)}isCheapToTokenize(e){if(!this._tokenizationSupport)return!0;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return!(e>t)&&(e0&&e>=1;e--){let t=this._textModel.getLineFirstNonWhitespaceColumn(e);if(0!==t&&t=0;e--)a=Ee(s,this._tokenizationSupport,o[e],!1,a).endState;for(let n=t;n<=i;n++){let t=this._textModel.getLineContent(n),i=Ee(s,this._tokenizationSupport,t,!0,a);e.add(n,i.tokens),this._tokenizationStateStore.setFakeTokens(n-1),a=i.endState}}}function Ee(e,t,i,o,r){let s=null;if(t)try{s=t.tokenize2(i,o,r.clone(),0)}catch(e){(0,n.dL)(e)}return s||(s=(0,xe.mh)(e.id,i,r,0)),Ce.A.convertToEndOffset(s.tokens,i.length),s}var Ae=i(7461),Me=i(3831),Ie=i(764),Te=i(4227),Re=i(1264);function Oe(e,t){return("string"==typeof e?function(e){const t=new ge;return t.acceptChunk(e),t.finish()}(e):e).create(t)}let Fe=0;class Pe{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;let e=[],t=0,i=0;for(;;){let n=this._source.read();if(null===n)return this._eos=!0,0===t?null:e.join("");if(n.length>0&&(e[t++]=n,i+=n.length),i>=65536)return e.join("")}}}const Be=()=>{throw new Error("Invalid change accessor")};class ze{constructor(){this._searchCanceledBrand=void 0}}function We(e){return e instanceof ze?null:e}ze.INSTANCE=new ze;class Ve extends r.JT{constructor(e,t,i,n=null,r){super(),this._onWillDispose=this._register(new o.Q5),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new Ze),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeLanguage=this._register(new o.Q5),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new o.Q5),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new o.Q5),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeOptions=this._register(new o.Q5),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new o.Q5),this.onDidChangeAttached=this._onDidChangeAttached.event,this._eventEmitter=this._register(new Xe),Fe++,this.id="$model"+Fe,this.isForSimpleWidget=t.isForSimpleWidget,this._associatedResource=null==n?a.o.parse("inmemory://model/"+Fe):n,this._undoRedoService=r,this._attachedEditorCount=0;const{textBuffer:l,disposable:c}=Oe(e,t.defaultEOL);this._buffer=l,this._bufferDisposable=c,this._options=Ve.resolveOptions(this._buffer,t);const h=this._buffer.getLineCount(),d=this._buffer.getValueLengthInRange(new u.e(1,1,h,this._buffer.getLineLength(h)+1),0);t.largeFileOptimizations?this._isTooLargeForTokenization=d>Ve.LARGE_FILE_SIZE_THRESHOLD||h>Ve.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=d>Ve.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this._isDisposing=!1,this._languageIdentifier=i||xe.pA,this._languageRegistryListener=Me.zu.onDidChange((e=>{e.languageIdentifier.id===this._languageIdentifier.id&&this._onDidChangeLanguageConfiguration.fire({})})),this._instanceId=s.PJ(Fe),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new He,this._commandManager=new g.NL(this,r),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._tokens=new ce.Rl,this._tokens2=new ce.cx,this._tokenization=new Ne(this)}static resolveOptions(e,t){if(t.detectIndentation){const i=m(e,t.tabSize,t.insertSpaces);return new d.dJ({tabSize:i.tabSize,indentSize:i.tabSize,insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}return new d.dJ({tabSize:t.tabSize,indentSize:t.indentSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL})}onDidChangeRawContentFast(e){return this._eventEmitter.fastEvent((t=>e(t.rawContentChangedEvent)))}onDidChangeContentFast(e){return this._eventEmitter.fastEvent((t=>e(t.contentChangedEvent)))}onDidChangeContent(e){return this._eventEmitter.slowEvent((t=>e(t.contentChangedEvent)))}dispose(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(),this._tokenization.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this._isDisposing=!1;const e=new he([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this._isDisposing||this._eventEmitter.fire(new ye(e,t))}setValue(e){if(this._assertNotDisposed(),null===e)return;const{textBuffer:t,disposable:i}=Oe(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,o,r,s){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:o,isRedoing:r,isFlush:s}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),r=this.getLineMaxColumn(o);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._tokens.flush(),this._tokens2.flush(),this._decorations=Object.create(null),this._decorationsTree=new He,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new be([new fe],this._versionId,!1,!1),this._createContentChanged2(new u.e(1,1,o,r),0,n,this.getValue(),!1,!1,!0))}setEOL(e){this._assertNotDisposed();const t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),o=this.getLineCount(),r=this.getLineMaxColumn(o);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new be([new ve],this._versionId,!1,!1),this._createContentChanged2(new u.e(1,1,o,r),0,n,this.getValue(),!1,!1,!1))}_onBeforeEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.search(0,!1,!1,e);this._ensureNodesHaveRanges(t)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const i=this._buffer.getLineCount();for(let n=1;n<=i;n++){const i=this._buffer.getLineLength(n);i>=1e4?t+=i:e+=i}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();let t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,i=void 0!==e.indentSize?e.indentSize:this._options.indentSize,n=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,o=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,r=new d.dJ({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:o});if(this._options.equals(r))return;let s=this._options.createChangeEvent(r);this._options=r,this._onDidChangeOptions.fire(s)}detectIndentation(e,t){this._assertNotDisposed();let i=m(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}static _normalizeIndentationFromWhitespace(e,t,i){let n=0;for(let i=0;i({range:e.range,text:null}))),(()=>null))}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();let t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();let t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new Pe(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i,e);return t?this._buffer.getBOM().length+n:n}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),"\n"===this._buffer.getEOL()?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),i=e.startLineNumber,n=e.startColumn;let o=Math.floor("number"!=typeof i||isNaN(i)?1:i),r=Math.floor("number"!=typeof n||isNaN(n)?1:n);if(o<1)o=1,r=1;else if(o>t)o=t,r=this.getLineMaxColumn(o);else if(r<=1)r=1;else{const e=this.getLineMaxColumn(o);r>=e&&(r=e)}const s=e.endLineNumber,a=e.endColumn;let l=Math.floor("number"!=typeof s||isNaN(s)?1:s),c=Math.floor("number"!=typeof a||isNaN(a)?1:a);if(l<1)l=1,c=1;else if(l>t)l=t,c=this.getLineMaxColumn(l);else if(c<=1)c=1;else{const e=this.getLineMaxColumn(l);c>=e&&(c=e)}return i===o&&n===r&&s===l&&a===c&&e instanceof u.e&&!(e instanceof h.Y)?e:new u.e(o,r,l,c)}_isValidPosition(e,t,i){if("number"!=typeof e||"number"!=typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;if(e>this._buffer.getLineCount())return!1;if(1===t)return!0;if(t>this.getLineMaxColumn(e))return!1;if(1===i){const i=this._buffer.getLineCharCode(e,t-2);if(s.ZG(i))return!1}return!0}_validatePosition(e,t,i){const n=Math.floor("number"!=typeof e||isNaN(e)?1:e),o=Math.floor("number"!=typeof t||isNaN(t)?1:t),r=this._buffer.getLineCount();if(n<1)return new c.L(1,1);if(n>r)return new c.L(r,this.getLineMaxColumn(r));if(o<=1)return new c.L(n,1);const a=this.getLineMaxColumn(n);if(o>=a)return new c.L(n,a);if(1===i){const e=this._buffer.getLineCharCode(n,o-2);if(s.ZG(e))return new c.L(n,o-1)}return new c.L(n,o)}validatePosition(e){return this._assertNotDisposed(),e instanceof c.L&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){const i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,r=e.endColumn;if(!this._isValidPosition(i,n,0))return!1;if(!this._isValidPosition(o,r,0))return!1;if(1===t){const e=n>1?this._buffer.getLineCharCode(i,n-2):0,t=r>1&&r<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,r-2):0,a=s.ZG(e),l=s.ZG(t);return!a&&!l}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof u.e&&!(e instanceof h.Y)&&this._isValidRange(e,1))return e;const t=this._validatePosition(e.startLineNumber,e.startColumn,0),i=this._validatePosition(e.endLineNumber,e.endColumn,0),n=t.lineNumber,o=t.column,r=i.lineNumber,a=i.column;{const e=o>1?this._buffer.getLineCharCode(n,o-2):0,t=a>1&&a<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,a-2):0,i=s.ZG(e),l=s.ZG(t);return i||l?n===r&&o===a?new u.e(n,o-1,r,a-1):i&&l?new u.e(n,o-1,r,a+1):i?new u.e(n,o-1,r,a):new u.e(n,o,r,a+1):new u.e(n,o,r,a)}}modifyPosition(e,t){this._assertNotDisposed();let i=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,i)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new u.e(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,o,r,s=999){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every((e=>u.e.isIRange(e)))&&(a=t.map((e=>this.validateRange(e))))),null===a&&(a=[this.getFullModelRange()]),a=a.sort(((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn));const l=[];let c;if(l.push(a.reduce(((e,t)=>u.e.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t)))),!i&&e.indexOf("\n")<0){const t=new J.bc(e,i,n,o).parseSearchRequest();if(!t)return[];c=e=>this.findMatchesLineByLine(e,t,r,s)}else c=t=>J.pM.findMatches(this,new J.bc(e,i,n,o),t,r,s);return l.map(c).reduce(((e,t)=>e.concat(t)),[])}findNextMatch(e,t,i,n,o,r){this._assertNotDisposed();const s=this.validatePosition(t);if(!i&&e.indexOf("\n")<0){const t=new J.bc(e,i,n,o).parseSearchRequest();if(!t)return null;const a=this.getLineCount();let l=new u.e(s.lineNumber,s.column,a,this.getLineMaxColumn(a)),c=this.findMatchesLineByLine(l,t,r,1);return J.pM.findNextMatch(this,new J.bc(e,i,n,o),s,r),c.length>0?c[0]:(l=new u.e(1,1,s.lineNumber,this.getLineMaxColumn(s.lineNumber)),c=this.findMatchesLineByLine(l,t,r,1),c.length>0?c[0]:null)}return J.pM.findNextMatch(this,new J.bc(e,i,n,o),s,r)}findPreviousMatch(e,t,i,n,o,r){this._assertNotDisposed();const s=this.validatePosition(t);return J.pM.findPreviousMatch(this,new J.bc(e,i,n,o),s,r)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if(("\n"===this.getEOL()?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof d.Qi?e:new d.Qi(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let i=0,n=e.length;i({range:this.validateRange(e.range),text:e.text}))),n=!0;if(e)for(let t=0,o=e.length;to.endLineNumber,s=o.startLineNumber>t.endLineNumber;if(!n&&!s){r=!0;break}}if(!r){n=!1;break}}if(n)for(let e=0,n=this._trimAutoWhitespaceLines.length;et.endLineNumber||n===t.startLineNumber&&t.startColumn===o&&t.isEmpty()&&s&&s.length>0&&"\n"===s.charAt(0)||n===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&s&&s.length>0&&"\n"===s.charAt(s.length-1))){r=!1;break}}if(r){const e=new u.e(n,1,n,o);t.push(new d.Qi(null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i)}_applyUndo(e,t,i,n){const o=e.map((e=>{const t=this.getPositionAt(e.newPosition),i=this.getPositionAt(e.newEnd);return{range:new u.e(t.lineNumber,t.column,i.lineNumber,i.column),text:e.oldText}}));this._applyUndoRedoEdits(o,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const o=e.map((e=>{const t=this.getPositionAt(e.oldPosition),i=this.getPositionAt(e.oldEnd);return{range:new u.e(t.lineNumber,t.column,i.lineNumber,i.column),text:e.newText}}));this._applyUndoRedoEdits(o,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,o,r){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(o)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(r),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const i=this._validateEditOperations(e);return this._doApplyEdits(i,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const i=this._buffer.getLineCount(),n=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),o=this._buffer.getLineCount(),r=n.changes;if(this._trimAutoWhitespaceLines=n.trimAutoWhitespaceLineNumbers,0!==r.length){let e=[],t=i;for(let i=0,n=r.length;i0?n.text.charCodeAt(0):0),this._onDidChangeDecorations.fire(),this._decorationsTree.acceptReplace(n.rangeOffset,n.rangeLength,n.text.length,n.forceMoveMarkers);const c=n.range.startLineNumber,u=n.range.endLineNumber,h=u-c,d=s,g=Math.min(h,d),f=d-h;for(let i=g;i>=0;i--){const n=c+i,r=o-t-f+n;e.push(new pe(n,this.getLineContent(r)))}if(gthis._deltaDecorationsImpl(e,[],[{range:t,options:i}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,Ye(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,i)=>0===t.length&&0===i.length?[]:this._deltaDecorationsImpl(e,t,i)},o=null;try{o=t(i)}catch(e){(0,n.dL)(e)}return i.addDecoration=Be,i.changeDecoration=Be,i.changeDecorationOptions=Be,i.removeDecoration=Be,i.deltaDecorations=Be,o}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,i){const n=e?this._decorations[e]:null;if(!n)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:Ge[i]}])[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;const o=this._validateRangeRelaxedNoAllocations(t),r=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),s=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),r,s,o),n.setOptions(Ge[i]),this._decorationsTree.insert(n),n.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let e=0,i=t.length;ethis.getLineCount()?[]:this.getLinesDecorations(e,e,t,i)}getLinesDecorations(e,t,i=0,n=!1){let o=this.getLineCount(),r=Math.min(o,Math.max(1,e)),s=Math.min(o,Math.max(1,t)),a=this.getLineMaxColumn(s);return this._getDecorationsInRange(new u.e(r,1,s,a),i,n)}getDecorationsInRange(e,t=0,i=!1){let n=this.validateRange(e);return this._getDecorationsInRange(n,t,i)}getOverviewRulerDecorations(e=0,t=!1){const i=this.getVersionId(),n=this._decorationsTree.search(e,t,!0,i);return this._ensureNodesHaveRanges(n)}getAllDecorations(e=0,t=!1){const i=this.getVersionId(),n=this._decorationsTree.search(e,t,!1,i);return this._ensureNodesHaveRanges(n)}_getDecorationsInRange(e,t,i){const n=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),o=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn),r=this.getVersionId(),s=this._decorationsTree.intervalSearch(n,o,t,i,r);return this._ensureNodesHaveRanges(s)}_ensureNodesHaveRanges(e){for(let t=0,i=e.length;t0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:t})}setSemanticTokens(e,t){this._tokens2.set(e,t),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]})}hasCompleteSemanticTokens(){return this._tokens2.isComplete()}hasSomeSemanticTokens(){return!this._tokens2.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const i=this._tokens2.setPartial(e,t);this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}tokenizeViewport(e,t){e=Math.max(1,e),t=Math.min(this._buffer.getLineCount(),t),this._tokenization.tokenizeViewport(e,t)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._buffer.getLineCount()}]})}_emitModelTokensChangedEvent(e){this._isDisposing||this._onDidChangeTokens.fire(e)}resetTokenization(){this._tokenization.reset()}forceTokenization(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)}isCheapToTokenize(e){return this._tokenization.isCheapToTokenize(e)}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)}_getLineTokens(e){const t=this.getLineContent(e),i=this._tokens.getTokens(this._languageIdentifier.id,e-1,t);return this._tokens2.addSemanticTokens(e,i)}getLanguageIdentifier(){return this._languageIdentifier}getModeId(){return this._languageIdentifier.language}setMode(e){if(this._languageIdentifier.id===e.id)return;let t={oldLanguage:this._languageIdentifier.language,newLanguage:e.language};this._languageIdentifier=e,this._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({})}getLanguageIdAtPosition(e,t){const i=this.validatePosition(new c.L(e,t)),n=this.getLineTokens(i.lineNumber);return n.getLanguageId(n.findTokenIndexAtOffset(i.column-1))}getWordAtPosition(e){this._assertNotDisposed();const t=this.validatePosition(e),i=this.getLineContent(t.lineNumber),n=this._getLineTokens(t.lineNumber),o=n.findTokenIndexAtOffset(t.column-1),[r,s]=Ve._findLanguageBoundaries(n,o),a=(0,Ae.t2)(t.column,Me.zu.getWordDefinition(n.getLanguageId(o)),i.substring(r,s),r);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a;if(o>0&&r===t.column-1){const[r,s]=Ve._findLanguageBoundaries(n,o-1),a=(0,Ae.t2)(t.column,Me.zu.getWordDefinition(n.getLanguageId(o-1)),i.substring(r,s),r);if(a&&a.startColumn<=e.column&&e.column<=a.endColumn)return a}return null}static _findLanguageBoundaries(e,t){const i=e.getLanguageId(t);let n=0;for(let o=t;o>=0&&e.getLanguageId(o)===i;o--)n=e.getStartOffset(o);let o=e.getLineContent().length;for(let n=t,r=e.getCount();n=0;e--){const i=t.getEndOffset(e);if(i<=s)break;if((0,Ie.Bu)(t.getStandardTokenType(e))||t.getLanguageId(e)!==r){s=i;break}}let a=Math.min(t.getLineContent().length,e.column-1+i.maxBracketLength);for(let e=n+1;e=a)break;if((0,Ie.Bu)(t.getStandardTokenType(e))||t.getLanguageId(e)!==r){a=i;break}}return{searchStartOffset:s,searchEndOffset:a}}_matchBracket(e){const t=e.lineNumber,i=this._getLineTokens(t),n=this._buffer.getLineContent(t),o=i.findTokenIndexAtOffset(e.column-1);if(o<0)return null;const r=Me.zu.getBracketsSupport(i.getLanguageId(o));if(r&&!(0,Ie.Bu)(i.getStandardTokenType(o))){let{searchStartOffset:s,searchEndOffset:a}=this._establishBracketSearchOffsets(e,i,r,o),l=null;for(;;){const i=Te.Vr.findNextBracketInRange(r.forwardRegex,t,n,s,a);if(!i)break;if(i.startColumn<=e.column&&e.column<=i.endColumn){const e=n.substring(i.startColumn-1,i.endColumn-1).toLowerCase(),t=this._matchFoundBracket(i,r.textIsBracket[e],r.textIsOpenBracket[e],null);if(t){if(t instanceof ze)return null;l=t}}s=i.endColumn-1}if(l)return l}if(o>0&&i.getStartOffset(o)===e.column-1){const r=o-1,s=Me.zu.getBracketsSupport(i.getLanguageId(r));if(s&&!(0,Ie.Bu)(i.getStandardTokenType(r))){let{searchStartOffset:o,searchEndOffset:a}=this._establishBracketSearchOffsets(e,i,s,r);const l=Te.Vr.findPrevBracketInRange(s.reversedRegex,t,n,o,a);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn){const e=n.substring(l.startColumn-1,l.endColumn-1).toLowerCase(),t=this._matchFoundBracket(l,s.textIsBracket[e],s.textIsOpenBracket[e],null);if(t)return t instanceof ze?null:t}}}return null}_matchFoundBracket(e,t,i,n){if(!t)return null;const o=i?this._findMatchingBracketDown(t,e.getEndPosition(),n):this._findMatchingBracketUp(t,e.getStartPosition(),n);return o?o instanceof ze?o:[e,o]:null}_findMatchingBracketUp(e,t,i){const n=e.languageIdentifier.id,o=e.reversedRegex;let r=-1,s=0;const a=(t,n,a,l)=>{for(;;){if(i&&++s%100==0&&!i())return ze.INSTANCE;const c=Te.Vr.findPrevBracketInRange(o,t,n,a,l);if(!c)break;const u=n.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(u)?r++:e.isClose(u)&&r--,0===r)return c;l=c.startColumn-1}return null};for(let e=t.lineNumber;e>=1;e--){const i=this._getLineTokens(e),o=i.getCount(),r=this._buffer.getLineContent(e);let s=o-1,l=r.length,c=r.length;e===t.lineNumber&&(s=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1);let u=!0;for(;s>=0;s--){const t=i.getLanguageId(s)===n&&!(0,Ie.Bu)(i.getStandardTokenType(s));if(t)u?l=i.getStartOffset(s):(l=i.getStartOffset(s),c=i.getEndOffset(s));else if(u&&l!==c){const t=a(e,r,l,c);if(t)return t}u=t}if(u&&l!==c){const t=a(e,r,l,c);if(t)return t}}return null}_findMatchingBracketDown(e,t,i){const n=e.languageIdentifier.id,o=e.forwardRegex;let r=1,s=0;const a=(t,n,a,l)=>{for(;;){if(i&&++s%100==0&&!i())return ze.INSTANCE;const c=Te.Vr.findNextBracketInRange(o,t,n,a,l);if(!c)break;const u=n.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(u)?r++:e.isClose(u)&&r--,0===r)return c;a=c.endColumn-1}return null},l=this.getLineCount();for(let e=t.lineNumber;e<=l;e++){const i=this._getLineTokens(e),o=i.getCount(),r=this._buffer.getLineContent(e);let s=0,l=0,c=0;e===t.lineNumber&&(s=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1);let u=!0;for(;s=1;e--){const o=this._getLineTokens(e),r=o.getCount(),s=this._buffer.getLineContent(e);let a=r-1,l=s.length,c=s.length;if(e===t.lineNumber){a=o.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1;const e=o.getLanguageId(a);i!==e&&(i=e,n=Me.zu.getBracketsSupport(i))}let u=!0;for(;a>=0;a--){const t=o.getLanguageId(a);if(i!==t){if(n&&u&&l!==c){const t=Te.Vr.findPrevBracketInRange(n.reversedRegex,e,s,l,c);if(t)return this._toFoundBracket(n,t);u=!1}i=t,n=Me.zu.getBracketsSupport(i)}const r=!!n&&!(0,Ie.Bu)(o.getStandardTokenType(a));if(r)u?l=o.getStartOffset(a):(l=o.getStartOffset(a),c=o.getEndOffset(a));else if(n&&u&&l!==c){const t=Te.Vr.findPrevBracketInRange(n.reversedRegex,e,s,l,c);if(t)return this._toFoundBracket(n,t)}u=r}if(n&&u&&l!==c){const t=Te.Vr.findPrevBracketInRange(n.reversedRegex,e,s,l,c);if(t)return this._toFoundBracket(n,t)}}return null}findNextBracket(e){const t=this.validatePosition(e),i=this.getLineCount();let n=-1,o=null;for(let e=t.lineNumber;e<=i;e++){const i=this._getLineTokens(e),r=i.getCount(),s=this._buffer.getLineContent(e);let a=0,l=0,c=0;if(e===t.lineNumber){a=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1;const e=i.getLanguageId(a);n!==e&&(n=e,o=Me.zu.getBracketsSupport(n))}let u=!0;for(;aDate.now()-e<=t}const n=this.validatePosition(e),o=this.getLineCount(),r=new Map;let s=[];const a=(e,t)=>{if(!r.has(e)){let i=[];for(let e=0,n=t?t.brackets.length:0;e{for(;;){if(i&&++l%100==0&&!i())return ze.INSTANCE;const a=Te.Vr.findNextBracketInRange(e.forwardRegex,t,n,o,r);if(!a)break;const c=n.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),u=e.textIsBracket[c];if(u&&(u.isOpen(c)?s[u.index]++:u.isClose(c)&&s[u.index]--,-1===s[u.index]))return this._matchFoundBracket(a,u,!1,i);o=a.endColumn-1}return null};let u=-1,h=null;for(let e=n.lineNumber;e<=o;e++){const t=this._getLineTokens(e),i=t.getCount(),o=this._buffer.getLineContent(e);let r=0,s=0,l=0;if(e===n.lineNumber){r=t.findTokenIndexAtOffset(n.column-1),s=n.column-1,l=n.column-1;const e=t.getLanguageId(r);u!==e&&(u=e,h=Me.zu.getBracketsSupport(u),a(u,h))}let d=!0;for(;rn)throw new Error("Illegal value for lineNumber");const o=Me.zu.getFoldingRules(this._languageIdentifier.id),r=Boolean(o&&o.offSide);let s=-2,a=-1,l=-2,c=-1;const u=e=>{if(-1!==s&&(-2===s||s>e-1)){s=-1,a=-1;for(let t=e-2;t>=0;t--){let e=this._computeIndentLevel(t);if(e>=0){s=t,a=e;break}}}if(-2===l){l=-1,c=-1;for(let t=e;t=0){l=t,c=e;break}}}};let h=-2,d=-1,g=-2,f=-1;const p=e=>{if(-2===h){h=-1,d=-1;for(let t=e-2;t>=0;t--){let e=this._computeIndentLevel(t);if(e>=0){h=t,d=e;break}}}if(-1!==g&&(-2===g||g=0){g=t,f=e;break}}}};let m=0,_=!0,v=0,b=!0,y=0,w=0;for(let o=0;_||b;o++){const s=e-o,g=e+o;o>1&&(s<1||s1&&(g>n||g>i)&&(b=!1),o>5e4&&(_=!1,b=!1);let C=-1;if(_){const e=this._computeIndentLevel(s-1);e>=0?(l=s-1,c=e,C=Math.ceil(e/this._options.indentSize)):(u(s),C=this._getIndentLevelForWhitespaceLine(r,a,c))}let S=-1;if(b){const e=this._computeIndentLevel(g-1);e>=0?(h=g-1,d=e,S=Math.ceil(e/this._options.indentSize)):(p(g),S=this._getIndentLevelForWhitespaceLine(r,d,f))}if(0!==o){if(1===o){if(g<=n&&S>=0&&w+1===S){_=!1,m=g,v=g,y=S;continue}if(s>=1&&C>=0&&C-1===w){b=!1,m=s,v=s,y=C;continue}if(m=e,v=e,y=w,0===y)return{startLineNumber:m,endLineNumber:v,indent:y}}_&&(C>=y?m=s:_=!1),b&&(S>=y?v=g:b=!1)}else w=C}return{startLineNumber:m,endLineNumber:v,indent:y}}getLinesIndentGuides(e,t){this._assertNotDisposed();const i=this.getLineCount();if(e<1||e>i)throw new Error("Illegal value for startLineNumber");if(t<1||t>i)throw new Error("Illegal value for endLineNumber");const n=Me.zu.getFoldingRules(this._languageIdentifier.id),o=Boolean(n&&n.offSide);let r=new Array(t-e+1),s=-2,a=-1,l=-2,c=-1;for(let n=e;n<=t;n++){let t=n-e;const u=this._computeIndentLevel(n-1);if(u>=0)s=n-1,a=u,r[t]=Math.ceil(u/this._options.indentSize);else{if(-2===s){s=-1,a=-1;for(let e=n-2;e>=0;e--){let t=this._computeIndentLevel(e);if(t>=0){s=e,a=t;break}}}if(-1!==l&&(-2===l||l=0){l=e,c=t;break}}}r[t]=this._getIndentLevelForWhitespaceLine(o,a,c)}}return r}_getIndentLevelForWhitespaceLine(e,t,i){return-1===t||-1===i?0:t0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}},7277:(e,t,i)=>{"use strict";i.d(t,{bc:()=>l,iE:()=>u,pM:()=>d,cM:()=>g,sz:()=>f});var n=i(7295),o=i(9410),r=i(187),s=i(4314),a=i(4973);class l{constructor(e,t,i,n){this.searchString=e,this.isRegex=t,this.matchCase=i,this.wordSeparators=n}parseSearchRequest(){if(""===this.searchString)return null;let e;e=this.isRegex?function(e){if(!e||0===e.length)return!1;for(let t=0,i=e.length;t=i)break;const n=e.charCodeAt(t);if(110===n||114===n||87===n||119===n)return!0}return!1}(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=n.GF(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(e){return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new c(t,this.wordSeparators?(0,o.u)(this.wordSeparators):null,i?this.searchString:null)}}class c{constructor(e,t,i){this.regex=e,this.wordSeparators=t,this.simpleSearch=i}}function u(e,t,i){if(!i)return new a.tk(e,null);let n=[];for(let e=0,i=t.length;e>0);t[o]>=e?n=o-1:t[o+1]>=e?(i=o,n=o):i=o+1}return i+1}}class d{static findMatches(e,t,i,n,o){const r=t.parseSearchRequest();return r?r.regex.multiline?this._doFindMatchesMultiline(e,i,new f(r.wordSeparators,r.regex),n,o):this._doFindMatchesLineByLine(e,i,r,n,o):[]}static _getMultilineMatchRange(e,t,i,n,o,r){let a,l,c=0;if(n?(c=n.findLineFeedCountBeforeOffset(o),a=t+o+c):a=t+o,n){let e=n.findLineFeedCountBeforeOffset(o+r.length)-c;l=a+r.length+e}else l=a+r.length;const u=e.getPositionAt(a),h=e.getPositionAt(l);return new s.e(u.lineNumber,u.column,h.lineNumber,h.column)}static _doFindMatchesMultiline(e,t,i,n,o){const r=e.getOffsetAt(t.getStartPosition()),s=e.getValueInRange(t,1),a="\r\n"===e.getEOL()?new h(s):null,l=[];let c,d=0;for(i.reset(0);c=i.next(s);)if(l[d++]=u(this._getMultilineMatchRange(e,r,s,a,c.index,c[0]),c,n),d>=o)return l;return l}static _doFindMatchesLineByLine(e,t,i,n,o){const r=[];let s=0;if(t.startLineNumber===t.endLineNumber){const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return s=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,s,r,n,o),r}const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);s=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,s,r,n,o);for(let a=t.startLineNumber+1;a=c))return o;return o}const d=new f(e.wordSeparators,e.regex);let p;d.reset(0);do{if(p=d.next(t),p&&(r[o++]=u(new s.e(i,p.index+1+n,i,p.index+1+p[0].length+n),p,l),o>=c))return o}while(p);return o}static findNextMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const r=new f(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindNextMatchMultiline(e,i,r,n):this._doFindNextMatchLineByLine(e,i,r,n)}static _doFindNextMatchMultiline(e,t,i,n){const o=new r.L(t.lineNumber,1),a=e.getOffsetAt(o),l=e.getLineCount(),c=e.getValueInRange(new s.e(o.lineNumber,o.column,l,e.getLineMaxColumn(l)),1),d="\r\n"===e.getEOL()?new h(c):null;i.reset(t.column-1);let g=i.next(c);return g?u(this._getMultilineMatchRange(e,a,c,d,g.index,g[0]),g,n):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new r.L(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){const o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r),a=this._findFirstMatchInLine(i,s,r,t.column,n);if(a)return a;for(let t=1;t<=o;t++){const s=(r+t-1)%o,a=e.getLineContent(s+1),l=this._findFirstMatchInLine(i,a,s+1,1,n);if(l)return l}return null}static _findFirstMatchInLine(e,t,i,n,o){e.reset(n-1);const r=e.next(t);return r?u(new s.e(i,r.index+1,i,r.index+1+r[0].length),r,o):null}static findPreviousMatch(e,t,i,n){const o=t.parseSearchRequest();if(!o)return null;const r=new f(o.wordSeparators,o.regex);return o.regex.multiline?this._doFindPreviousMatchMultiline(e,i,r,n):this._doFindPreviousMatchLineByLine(e,i,r,n)}static _doFindPreviousMatchMultiline(e,t,i,n){const o=this._doFindMatchesMultiline(e,new s.e(1,1,t.lineNumber,t.column),i,n,9990);if(o.length>0)return o[o.length-1];const a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new r.L(a,e.getLineMaxColumn(a)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){const o=e.getLineCount(),r=t.lineNumber,s=e.getLineContent(r).substring(0,t.column-1),a=this._findLastMatchInLine(i,s,r,n);if(a)return a;for(let t=1;t<=o;t++){const s=(o+r-t-1)%o,a=e.getLineContent(s+1),l=this._findLastMatchInLine(i,a,s+1,n);if(l)return l}return null}static _findLastMatchInLine(e,t,i,n){let o,r=null;for(e.reset(0);o=e.next(t);)r=u(new s.e(i,o.index+1,i,o.index+1+o[0].length),o,n);return r}}function g(e,t,i,n,o){return function(e,t,i,n,o){if(0===n)return!0;const r=t.charCodeAt(n-1);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(o>0){const i=t.charCodeAt(n);if(0!==e.get(i))return!0}return!1}(e,t,0,n,o)&&function(e,t,i,n,o){if(n+o===i)return!0;const r=t.charCodeAt(n+o);if(0!==e.get(r))return!0;if(13===r||10===r)return!0;if(o>0){const i=t.charCodeAt(n+o-1);if(0!==e.get(i))return!0}return!1}(e,t,i,n,o)}class f{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let i;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(i=this._searchRegex.exec(e),!i)return null;const o=i.index,r=i[0].length;if(o===this._prevMatchStartIndex&&r===this._prevMatchLength){if(0===r){n.ZH(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=o,this._prevMatchLength=r,!this._wordSeparators||g(this._wordSeparators,e,t,o,r))return i}while(i);return null}}},8409:(e,t,i)=>{"use strict";i.d(t,{QZ:()=>l,DA:()=>h,OU:()=>d,Wz:()=>f,cx:()=>_,Rl:()=>v});var n=i(9488),o=i(8411),r=i(187),s=i(4314),a=i(4101);function l(e){let t=0,i=0,n=0,o=0;for(let r=0,s=e.length;r>>0}const u=new Uint32Array(0).buffer;class h{constructor(){this.tokens=[]}add(e,t){if(this.tokens.length>0){const i=this.tokens[this.tokens.length-1];if(i.startLineNumber+i.tokens.length-1+1===e)return void i.tokens.push(t)}this.tokens.push(new p(e,[t]))}}class d{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){let t=[];for(let i=0;ie)){let o=n;for(;o>t&&this._getDeltaLine(o-1)===e;)o--;let r=n;for(;re||u===e&&d>=t)&&(ue||h===e&&g>=t){if(ho?f-=o-i:f=i;else if(d===t&&g===i){if(!(d===n&&f>o)){c=!0;continue}f-=o-i}else if(do)){c=!0;continue}d===t?(g=i,f=g+(f-o)):(g=0,f=g+(f-o))}else if(d>n){if(0===a&&!c){l=s;break}d-=a}else{if(!(d===n&&g>=o))throw new Error("Not possible!");e&&0===d&&(g+=e,f+=e),d-=a,g-=o-i,f-=o-i}const m=4*l;r[m]=d,r[m+1]=g,r[m+2]=f,r[m+3]=p,l++}this._tokenCount=l}acceptInsertText(e,t,i,n,o,r){const s=0===i&&1===n&&(r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122),a=this._tokens,l=this._tokenCount;for(let r=0;r0?t.charCodeAt(0):0)}acceptEdit(e,t,i,n,o){this._acceptDeleteRange(e),this._acceptInsertText(new r.L(e.startLineNumber,e.startColumn),t,i,n,o),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this.startLineNumber,i=e.endLineNumber-this.startLineNumber;if(i<0){const e=i-t;return void(this.startLineNumber-=e)}const n=this.tokens.getMaxDeltaLine();if(!(t>=n+1)){if(t<0&&i>=n+1)return this.startLineNumber=0,void this.tokens.clear();if(t<0){const n=-t;this.startLineNumber-=n,this.tokens.acceptDeleteRange(e.startColumn-1,0,0,i,e.endColumn-1)}else this.tokens.acceptDeleteRange(0,t,e.startColumn-1,i,e.endColumn-1)}}_acceptInsertText(e,t,i,n,o){if(0===t&&0===i)return;const r=e.lineNumber-this.startLineNumber;r<0?this.startLineNumber+=t:r>=this.tokens.getMaxDeltaLine()+1||this.tokens.acceptInsertText(r,e.column-1,t,i,n,o)}}class p{constructor(e,t){this.startLineNumber=e,this.tokens=t}}function m(e){return e instanceof Uint32Array?e:new Uint32Array(e)}class _{constructor(){this._pieces=[],this._isComplete=!1}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return 0===this._pieces.length}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let i=e;if(t.length>0){const n=t[0].getRange(),o=t[t.length-1].getRange();if(!n||!o)return e;i=e.plusRange(n).plusRange(o)}let o=null;for(let e=0,t=this._pieces.length;ei.endLineNumber){o=o||{index:e};break}if(n.removeTokens(i),n.isEmpty()){this._pieces.splice(e,1),e--,t--;continue}if(n.endLineNumberi.endLineNumber){o=o||{index:e};continue}const[r,s]=n.split(i);r.isEmpty()?o=o||{index:e}:s.isEmpty()||(this._pieces.splice(e,1,r,s),e++,t++,o=o||{index:e})}return o=o||{index:this._pieces.length},t.length>0&&(this._pieces=n.Zv(this._pieces,o.index,t)),i}isComplete(){return this._isComplete}addSemanticTokens(e,t){const i=this._pieces;if(0===i.length)return t;const n=i[_._findFirstPieceWithLine(i,e)].getLineTokens(e);if(!n)return t;const r=t.getCount(),s=n.getCount();let a=0,l=[],c=0,u=0;const h=(e,t)=>{e!==u&&(u=e,l[c++]=e,l[c++]=t)};for(let e=0;e>>0,c=~l>>>0;for(;at)){for(;o>i&&e[o-1].startLineNumber<=t&&t<=e[o-1].endLineNumber;)o--;return o}n=o-1}}return i}acceptEdit(e,t,i,n,o){for(const r of this._pieces)r.acceptEdit(e,t,i,n,o)}}class v{constructor(){this._lineTokens=[],this._len=0}flush(){this._lineTokens=[],this._len=0}getTokens(e,t,i){let n=null;if(t1&&(t=a.NX.getLanguageId(n[1])!==e),!t)return u}if(!n||0===n.length){const i=new Uint32Array(2);return i[0]=t,i[1]=c(e),i.buffer}return n[n.length-2]=t,0===n.byteOffset&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;let i=[];for(let e=0;e=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void(this._lineTokens[t]=v._delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=v._deleteEnding(this._lineTokens[t],e.startColumn-1);const i=e.endLineNumber-1;let n=null;i=this._len||(0!==t?(this._lineTokens[n]=v._deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=v._insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)):this._lineTokens[n]=v._insert(this._lineTokens[n],e.column-1,i))}static _deleteBeginning(e,t){return null===e||e===u?e:v._delete(e,0,t)}static _deleteEnding(e,t){if(null===e||e===u)return e;const i=m(e),n=i[i.length-2];return v._delete(e,t,n)}static _delete(e,t,i){if(null===e||e===u||t===i)return e;const n=m(e),r=n.length>>>1;if(0===t&&n[n.length-2]===i)return u;const s=o.A.findIndexInTokensArray(n,t),a=s>0?n[s-1<<1]:0;if(ic&&(n[l++]=t,n[l++]=n[1+(e<<1)],c=t)}if(l===n.length)return e;let d=new Uint32Array(l);return d.set(n.subarray(0,l),0),d.buffer}static _append(e,t){if(t===u)return e;if(e===u)return t;if(null===e)return e;if(null===t)return null;const i=m(e),n=m(t),o=n.length>>>1;let r=new Uint32Array(i.length+n.length);r.set(i,0);let s=i.length;const a=i[i.length-2];for(let e=0;e>>1;let s=o.A.findIndexInTokensArray(n,t);s>0&&n[s-1<<1]===t&&s--;for(let e=s;e{"use strict";i.d(t,{vu:()=>n,Af:()=>o,eq:()=>r,t2:()=>a});const n="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",o=function(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const i of n)e.indexOf(i)>=0||(t+="\\"+i);return t+="\\s]+)",new RegExp(t,"g")}();function r(e){let t=o;if(e&&e instanceof RegExp)if(e.global)t=e;else{let i="g";e.ignoreCase&&(i+="i"),e.multiline&&(i+="m"),e.unicode&&(i+="u"),t=new RegExp(e.source,i)}return t.lastIndex=0,t}const s={maxLen:1e3,windowSize:15,timeBudget:150};function a(e,t,i,n,o=s){if(i.length>o.maxLen){let r=e-o.maxLen/2;return r<0?r=0:n+=r,a(e,t,i=i.substring(r,e+o.maxLen/2),n,o)}const r=Date.now(),c=e-1-n;let u=-1,h=null;for(let e=1;!(Date.now()-r>=o.timeBudget);e++){const n=c-o.windowSize*e;t.lastIndex=Math.max(0,n);const r=l(t,i,c,u);if(!r&&h)break;if(h=r,n<=0)break;u=n}if(h){let e={word:h[0],startColumn:n+1+h.index,endColumn:n+1+h.index+h[0].length};return t.lastIndex=0,e}return null}function l(e,t,i,n){let o;for(;o=e.exec(t);){const t=o.index||0;if(t<=i&&e.lastIndex>=i)return o;if(n>0&&t>n)return null}return null}},4101:(e,t,i)=>{"use strict";i.d(t,{H9:()=>O,He:()=>T,OH:()=>W,KZ:()=>C,RN:()=>A,Ct:()=>E,Az:()=>F,MY:()=>p,vH:()=>L,vN:()=>P,K7:()=>U,wT:()=>$,vJ:()=>D,AD:()=>b,aC:()=>H,xp:()=>k,vI:()=>M,mX:()=>R,bw:()=>g,zu:()=>S,rl:()=>c,pM:()=>z,id:()=>N,ln:()=>B,FL:()=>y,G0:()=>w,AC:()=>V,nD:()=>x,WW:()=>f,uZ:()=>m,NX:()=>u,RW:()=>j,tA:()=>I,jr:()=>d,Sy:()=>h,vx:()=>v});var n=i(666),o=i(4314),r=i(1036),s=i(4669),a=i(5976),l=i(3046);class c{constructor(e,t){this.language=e,this.id=t}}class u{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(1792&e)>>>8}static getFontStyle(e){return(14336&e)>>>11}static getForeground(e){return(8372224&e)>>>14}static getBackground(e){return(4286578688&e)>>>23}static getClassNameFromMetadata(e){let t="mtk"+this.getForeground(e),i=this.getFontStyle(e);return 1&i&&(t+=" mtki"),2&i&&(t+=" mtkb"),4&i&&(t+=" mtku"),t}static getInlineStyleFromMetadata(e,t){const i=this.getForeground(e),n=this.getFontStyle(e);let o=`color: ${t[i]};`;return 1&n&&(o+="font-style: italic;"),2&n&&(o+="font-weight: bold;"),4&n&&(o+="text-decoration: underline;"),o}}const h=function(){let e=Object.create(null);return e[0]="symbol-method",e[1]="symbol-function",e[2]="symbol-constructor",e[3]="symbol-field",e[4]="symbol-variable",e[5]="symbol-class",e[6]="symbol-struct",e[7]="symbol-interface",e[8]="symbol-module",e[9]="symbol-property",e[10]="symbol-event",e[11]="symbol-operator",e[12]="symbol-unit",e[13]="symbol-value",e[14]="symbol-constant",e[15]="symbol-enum",e[16]="symbol-enum-member",e[17]="symbol-keyword",e[27]="symbol-snippet",e[18]="symbol-text",e[19]="symbol-color",e[20]="symbol-file",e[21]="symbol-reference",e[22]="symbol-customcolor",e[23]="symbol-folder",e[24]="symbol-type-parameter",e[25]="account",e[26]="issues",function(t){const i=e[t];let n=i&&l.fK.get(i);return n||(console.info("No codicon found for CompletionItemKind "+t),n=l.lA.symbolProperty),n.classNames}}();let d=function(){let e=Object.create(null);return e.method=0,e.function=1,e.constructor=2,e.field=3,e.variable=4,e.class=5,e.struct=6,e.interface=7,e.module=8,e.property=9,e.event=10,e.operator=11,e.unit=12,e.value=13,e.constant=14,e.enum=15,e["enum-member"]=16,e.enumMember=16,e.keyword=17,e.snippet=27,e.text=18,e.color=19,e.file=20,e.reference=21,e.customcolor=22,e.folder=23,e["type-parameter"]=24,e.typeParameter=24,e.account=25,e.issue=26,function(t,i){let n=e[t];return void 0!==n||i||(n=9),n}}();var g,f,p,m,_;function v(e){return e&&n.o.isUri(e.uri)&&o.e.isIRange(e.range)&&(o.e.isIRange(e.originSelectionRange)||o.e.isIRange(e.targetSelectionRange))}!function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(g||(g={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(f||(f={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(p||(p={})),function(e){const t=new Map;t.set("file",0),t.set("module",1),t.set("namespace",2),t.set("package",3),t.set("class",4),t.set("method",5),t.set("property",6),t.set("field",7),t.set("constructor",8),t.set("enum",9),t.set("interface",10),t.set("function",11),t.set("variable",12),t.set("constant",13),t.set("string",14),t.set("number",15),t.set("boolean",16),t.set("array",17),t.set("object",18),t.set("key",19),t.set("null",20),t.set("enum-member",21),t.set("struct",22),t.set("event",23),t.set("operator",24),t.set("type-parameter",25);const i=new Map;i.set(0,"file"),i.set(1,"module"),i.set(2,"namespace"),i.set(3,"package"),i.set(4,"class"),i.set(5,"method"),i.set(6,"property"),i.set(7,"field"),i.set(8,"constructor"),i.set(9,"enum"),i.set(10,"interface"),i.set(11,"function"),i.set(12,"variable"),i.set(13,"constant"),i.set(14,"string"),i.set(15,"number"),i.set(16,"boolean"),i.set(17,"array"),i.set(18,"object"),i.set(19,"key"),i.set(20,"null"),i.set(21,"enum-member"),i.set(22,"struct"),i.set(23,"event"),i.set(24,"operator"),i.set(25,"type-parameter"),e.fromString=function(e){return t.get(e)},e.toString=function(e){return i.get(e)},e.toCssClassName=function(e,t){const n=i.get(e);let o=n&&l.fK.get("symbol-"+n);return o||(console.info("No codicon found for SymbolKind "+e),o=l.lA.symbolProperty),`${t?"inline":"block"} ${o.classNames}`}}(m||(m={}));class b{constructor(e){this.value=e}}b.Comment=new b("comment"),b.Imports=new b("imports"),b.Region=new b("region"),function(e){e[e.Other=0]="Other",e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(_||(_={}));const y=new r.c,w=new r.c,C=new r.c,S=new r.c,x=new r.c,k=new r.c,D=new r.c,L=new r.c,N=new r.c,E=new r.c,A=new r.c,M=new r.c,I=new r.c,T=new r.c,R=new r.c,O=new r.c,F=new r.c,P=new r.c,B=new r.c,z=new r.c,W=new r.c,V=new r.c,H=new r.c,$=new r.c,U=new r.c,j=new class{constructor(){this._map=new Map,this._promises=new Map,this._onDidChange=new s.Q5,this.onDidChange=this._onDidChange.event,this._colorMap=null}fire(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._map.set(e,t),this.fire([e]),(0,a.OF)((()=>{this._map.get(e)===t&&(this._map.delete(e),this.fire([e]))}))}registerPromise(e,t){let i=null,n=!1;return this._promises.set(e,t.then((t=>{this._promises.delete(e),!n&&t&&(i=this.register(e,t))}))),(0,a.OF)((()=>{n=!0,i&&i.dispose()}))}getPromise(e){const t=this.get(e);if(t)return Promise.resolve(t);const i=this._promises.get(e);return i?i.then((t=>this.get(e))):null}get(e){return this._map.get(e)||null}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._map.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}},7354:(e,t,i)=>{"use strict";var n;i.d(t,{wU:()=>n,V6:()=>o,c$:()=>r}),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(n||(n={}));class o{constructor(e){if(this.open=e.open,this.close=e.close,this._standardTokenMask=0,Array.isArray(e.notIn))for(let t=0,i=e.notIn.length;t{"use strict";i.d(t,{zu:()=>y});var n=i(4669),o=i(5976),r=i(7295),s=i(7461),a=i(7354),l=i(764);class c{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map((e=>new a.V6(e))):e.brackets?this._autoClosingPairs=e.brackets.map((e=>new a.V6({open:e[0],close:e[1]}))):this._autoClosingPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new a.V6({open:t.open,close:t.close||""}))}this._autoCloseBefore="string"==typeof e.autoCloseBefore?e.autoCloseBefore:c.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(){return this._autoCloseBefore}static shouldAutoClosePair(e,t,i){if(0===t.getTokenCount())return!0;const n=t.findTokenIndexAtOffset(i-2),o=t.getStandardTokenType(n);return e.isOK(o)}getSurroundingPairs(){return this._surroundingPairs}}c.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=";:.,=}])> \n\t";var u=i(4227);class h{constructor(e){this._richEditBrackets=e}getElectricCharacters(){let e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const i of t.close){const t=i.charAt(i.length-1);e.push(t)}return e=e.filter(((e,t,i)=>i.indexOf(e)===t)),e}onElectricCharacter(e,t,i){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const n=t.findTokenIndexAtOffset(i-1);if((0,l.Bu)(t.getStandardTokenType(n)))return null;const o=this._richEditBrackets.reversedRegex,r=t.getLineContent().substring(0,i-1)+e,s=u.Vr.findPrevBracketInRange(o,1,r,0,r.length);if(!s)return null;const a=r.substring(s.startColumn-1,s.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[a])return null;const c=t.getActualLineContentBefore(s.startColumn-1);return/^\s*$/.test(c)?{matchOpenBracket:a}:null}}function d(e){return e.global&&(e.lastIndex=0),!0}class g{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&d(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&d(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&d(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&d(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}var f=i(7301);class p{constructor(e){(e=e||{}).brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach((e=>{const t=p._createOpenBracketRegExp(e[0]),i=p._createCloseBracketRegExp(e[1]);t&&i&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:i})})),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let e=0,o=this._regExpRules.length;e!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text)))))return o.action}if(e>=2&&i.length>0&&n.length>0)for(let e=0,t=this._brackets.length;e=2&&i.length>0)for(let e=0,t=this._brackets.length;e{for(let e=0;e{r.dispose(),this._onDidChange.fire(new _(e))}))}_getRichEditSupport(e){const t=this._entries2.get(e);return t?t.getRichEditSupport():null}getIndentationRules(e){const t=this._getRichEditSupport(e);return t&&t.indentationRules||null}_getElectricCharacterSupport(e){let t=this._getRichEditSupport(e);return t&&t.electricCharacter||null}getElectricCharacters(e){let t=this._getElectricCharacterSupport(e);return t?t.getElectricCharacters():[]}onElectricCharacter(e,t,i){let n=(0,l.wH)(t,i-1),o=this._getElectricCharacterSupport(n.languageId);return o?o.onElectricCharacter(e,n,i-n.firstCharOffset):null}getComments(e){let t=this._getRichEditSupport(e);return t&&t.comments||null}_getCharacterPairSupport(e){let t=this._getRichEditSupport(e);return t&&t.characterPair||null}getAutoClosingPairs(e){const t=this._getCharacterPairSupport(e);return new a.c$(t?t.getAutoClosingPairs():[])}getAutoCloseBeforeSet(e){let t=this._getCharacterPairSupport(e);return t?t.getAutoCloseBeforeSet():c.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED}getSurroundingPairs(e){let t=this._getCharacterPairSupport(e);return t?t.getSurroundingPairs():[]}shouldAutoClosePair(e,t,i){const n=(0,l.wH)(t,i-1);return c.shouldAutoClosePair(e,n,i-n.firstCharOffset)}getWordDefinition(e){let t=this._getRichEditSupport(e);return t?(0,s.eq)(t.wordDefinition||null):(0,s.eq)(null)}getFoldingRules(e){let t=this._getRichEditSupport(e);return t?t.foldingRules:{}}getIndentRulesSupport(e){let t=this._getRichEditSupport(e);return t&&t.indentRulesSupport||null}getPrecedingValidLine(e,t,i){let n=e.getLanguageIdAtPosition(t,0);if(t>1){let o,r=-1;for(o=t-1;o>=1;o--){if(e.getLanguageIdAtPosition(o,0)!==n)return r;let t=e.getLineContent(o);if(!i.shouldIgnore(t)&&!/^\s+$/.test(t)&&""!==t)return o;r=o}}return-1}getInheritIndentForLine(e,t,i,n=!0){if(e<4)return null;const o=this.getIndentRulesSupport(t.getLanguageIdentifier().id);if(!o)return null;if(i<=1)return{indentation:"",action:null};const s=this.getPrecedingValidLine(t,i,o);if(s<0)return null;if(s<1)return{indentation:"",action:null};const l=t.getLineContent(s);if(o.shouldIncrease(l)||o.shouldIndentNextLine(l))return{indentation:r.V8(l),action:a.wU.Indent,line:s};if(o.shouldDecrease(l))return{indentation:r.V8(l),action:null,line:s};{if(1===s)return{indentation:r.V8(t.getLineContent(s)),action:null,line:s};const e=s-1,i=o.getIndentMetadata(t.getLineContent(e));if(!(3&i)&&4&i){let i=0;for(let n=e-1;n>0;n--)if(!o.shouldIndentNextLine(t.getLineContent(n))){i=n;break}return{indentation:r.V8(t.getLineContent(i+1)),action:null,line:i+1}}if(n)return{indentation:r.V8(t.getLineContent(s)),action:null,line:s};for(let e=s;e>0;e--){const i=t.getLineContent(e);if(o.shouldIncrease(i))return{indentation:r.V8(i),action:a.wU.Indent,line:e};if(o.shouldIndentNextLine(i)){let i=0;for(let n=e-1;n>0;n--)if(!o.shouldIndentNextLine(t.getLineContent(e))){i=n;break}return{indentation:r.V8(t.getLineContent(i+1)),action:null,line:i+1}}if(o.shouldDecrease(i))return{indentation:r.V8(i),action:null,line:e}}return{indentation:r.V8(t.getLineContent(1)),action:null,line:1}}}getGoodIndentForLine(e,t,i,n,o){if(e<4)return null;const s=this._getRichEditSupport(i);if(!s)return null;const l=this.getIndentRulesSupport(i);if(!l)return null;const c=this.getInheritIndentForLine(e,t,n),u=t.getLineContent(n);if(c){const i=c.line;if(void 0!==i){const n=s.onEnter(e,"",t.getLineContent(i),"");if(n){let e=r.V8(t.getLineContent(i));return n.removeText&&(e=e.substring(0,e.length-n.removeText)),n.indentAction===a.wU.Indent||n.indentAction===a.wU.IndentOutdent?e=o.shiftIndent(e):n.indentAction===a.wU.Outdent&&(e=o.unshiftIndent(e)),l.shouldDecrease(u)&&(e=o.unshiftIndent(e)),n.appendText&&(e+=n.appendText),r.V8(e)}}return l.shouldDecrease(u)?c.action===a.wU.Indent?c.indentation:o.unshiftIndent(c.indentation):c.action===a.wU.Indent?o.shiftIndent(c.indentation):c.indentation}return null}getIndentForEnter(e,t,i,n){if(e<4)return null;t.forceTokenization(i.startLineNumber);const o=t.getLineTokens(i.startLineNumber),s=(0,l.wH)(o,i.startColumn-1),c=s.getLineContent();let u,h,d=!1;s.firstCharOffset>0&&o.getLanguageId(0)!==s.languageId?(d=!0,u=c.substr(0,i.startColumn-1-s.firstCharOffset)):u=o.getLineContent().substring(0,i.startColumn-1),h=i.isEmpty()?c.substr(i.startColumn-1-s.firstCharOffset):this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-s.firstCharOffset);const g=this.getIndentRulesSupport(s.languageId);if(!g)return null;const f=u,p=r.V8(u),m={getLineTokens:e=>t.getLineTokens(e),getLanguageIdentifier:()=>t.getLanguageIdentifier(),getLanguageIdAtPosition:(e,i)=>t.getLanguageIdAtPosition(e,i),getLineContent:e=>e===i.startLineNumber?f:t.getLineContent(e)},_=r.V8(o.getLineContent()),v=this.getInheritIndentForLine(e,m,i.startLineNumber+1);if(!v){const e=d?_:p;return{beforeEnter:e,afterEnter:e}}let b=d?_:v.indentation;return v.action===a.wU.Indent&&(b=n.shiftIndent(b)),g.shouldDecrease(h)&&(b=n.unshiftIndent(b)),{beforeEnter:d?_:p,afterEnter:b}}getIndentActionForType(e,t,i,n,o){if(e<4)return null;const r=this.getScopedLineTokens(t,i.startLineNumber,i.startColumn);if(r.firstCharOffset)return null;const s=this.getIndentRulesSupport(r.languageId);if(!s)return null;const l=r.getLineContent(),c=l.substr(0,i.startColumn-1-r.firstCharOffset);let u;if(u=i.isEmpty()?l.substr(i.startColumn-1-r.firstCharOffset):this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-r.firstCharOffset),!s.shouldDecrease(c+u)&&s.shouldDecrease(c+n+u)){const n=this.getInheritIndentForLine(e,t,i.startLineNumber,!1);if(!n)return null;let r=n.indentation;return n.action!==a.wU.Indent&&(r=o.unshiftIndent(r)),r}return null}getIndentMetadata(e,t){const i=this.getIndentRulesSupport(e.getLanguageIdentifier().id);return i?t<1||t>e.getLineCount()?null:i.getIndentMetadata(e.getLineContent(t)):null}getEnterAction(e,t,i){const n=this.getScopedLineTokens(t,i.startLineNumber,i.startColumn),o=this._getRichEditSupport(n.languageId);if(!o)return null;const r=n.getLineContent(),s=r.substr(0,i.startColumn-1-n.firstCharOffset);let l;l=i.isEmpty()?r.substr(i.startColumn-1-n.firstCharOffset):this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-n.firstCharOffset);let c="";if(i.startLineNumber>1&&0===n.firstCharOffset){const e=this.getScopedLineTokens(t,i.startLineNumber-1);e.languageId===n.languageId&&(c=e.getLineContent())}const u=o.onEnter(e,c,s,l);if(!u)return null;const h=u.indentAction;let d=u.appendText;const g=u.removeText||0;d?h===a.wU.Indent&&(d="\t"+d):d=h===a.wU.Indent||h===a.wU.IndentOutdent?"\t":"";let f=this.getIndentationAtPosition(t,i.startLineNumber,i.startColumn);return g&&(f=f.substring(0,f.length-g)),{indentAction:h,appendText:d,removeText:g,indentation:f}}getIndentationAtPosition(e,t,i){const n=e.getLineContent(t);let o=r.V8(n);return o.length>i-1&&(o=o.substring(0,i-1)),o}getScopedLineTokens(e,t,i){e.forceTokenization(t);const n=e.getLineTokens(t),o=void 0===i?e.getLineMaxColumn(t)-1:i-1;return(0,l.wH)(n,o)}getBracketsSupport(e){const t=this._getRichEditSupport(e);return t&&t.brackets||null}}},1036:(e,t,i)=>{"use strict";i.d(t,{c:()=>g,Y:()=>f});var n=i(4669),o=i(9954),r=i(5976),s=i(3702),a=i(9870),l=i(4118),c=i(8721);function u(e,t,i,n){if(Array.isArray(e)){let o=0;for(const r of e){const e=u(r,t,i,n);if(10===e)return e;e>o&&(o=e)}return o}if("string"==typeof e)return n?"*"===e?5:e===i?10:0:0;if(e){const{language:o,pattern:r,scheme:s,hasAccessToAllModels:a}=e;if(!n&&!a)return 0;let u=0;if(s)if(s===t.scheme)u=10;else{if("*"!==s)return 0;u=5}if(o)if(o===i)u=10;else{if("*"!==o)return 0;u=Math.max(u,5)}if(r){let e;if(e="string"==typeof r?r:Object.assign(Object.assign({},r),{base:(0,c.Fv)(r.base)}),e!==t.fsPath&&!(0,l.EQ)(e,t.fsPath))return 0;u=10}return u}return 0}var h=i(1200);function d(e){return"string"!=typeof e&&(Array.isArray(e)?e.every(d):!!e.exclusive)}class g{constructor(){this._clock=0,this._entries=[],this._onDidChange=new n.Q5}get onDidChange(){return this._onDidChange.event}register(e,t){let i={selector:e,provider:t,_score:-1,_time:this._clock++};return this._entries.push(i),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,r.OF)((()=>{if(i){let e=this._entries.indexOf(i);e>=0&&(this._entries.splice(e,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),i=void 0)}}))}has(e){return this.all(e).length>0}all(e){if(!e)return[];this._updateScores(e);const t=[];for(let e of this._entries)e._score>0&&t.push(e.provider);return t}ordered(e){const t=[];return this._orderedForEach(e,(e=>t.push(e.provider))),t}orderedGroups(e){const t=[];let i,n;return this._orderedForEach(e,(e=>{i&&n===e._score?i.push(e.provider):(n=e._score,i=[e.provider],t.push(i))})),t}_orderedForEach(e,t){if(e){this._updateScores(e);for(const e of this._entries)e._score>0&&t(e)}}_updateScores(e){let t={uri:e.uri.toString(),language:e.getLanguageIdentifier().language};if(!this._lastCandidate||this._lastCandidate.language!==t.language||this._lastCandidate.uri!==t.uri){this._lastCandidate=t;for(let t of this._entries)if(t._score=u(t.selector,e.uri,e.getLanguageIdentifier().language,(0,h.p)(e)),d(t.selector)&&t._score>0){for(let e of this._entries)e._score=0;t._score=1e3;break}this._entries.sort(g._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._scoret._score?-1:e._timet._time?-1:0}}class f{constructor(e,t,i=Number.MAX_SAFE_INTEGER){this._registry=e,this.min=t,this.max=i,this._cache=new s.z6(50,.7)}_key(e){return e.id+(0,o.vp)(this._registry.all(e))}_clamp(e){return void 0===e?this.min:Math.min(this.max,Math.max(this.min,Math.floor(1.3*e)))}get(e){const t=this._key(e),i=this._cache.get(t);return this._clamp(null==i?void 0:i.value)}update(e,t){const i=this._key(e);let n=this._cache.get(i);return n||(n=new a.n,this._cache.set(i,n)),n.update(t),this.get(e)}}},1144:(e,t,i)=>{"use strict";i.d(t,{dQ:()=>l,XT:()=>c,Tb:()=>u});var n=i(3580),o=i(4669),r=i(4101),s=i(3831),a=i(9872);const l=new class{constructor(){this._onDidChangeLanguages=new o.Q5,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[],this._dynamicLanguages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,i=this._languages.length;t"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],folding:{offSide:!0}},0)},8111:(e,t,i)=>{"use strict";i.d(t,{nO:()=>r,TG:()=>s,pA:()=>a,Ri:()=>l,mh:()=>c});var n=i(5600),o=i(4101);const r=new class{clone(){return this}equals(e){return this===e}},s="vs.editor.nullMode",a=new o.rl(s,0);function l(e,t,i,o){return new n.hG([new n.WU(o,"",e)],i)}function c(e,t,i,o){let s=new Uint32Array(2);return s[0]=o,s[1]=(16384|e<<0|2<<23)>>>0,new n.Hi(s,null===i?r:i)}},764:(e,t,i)=>{"use strict";function n(e,t){let i=e.getCount(),n=e.findTokenIndexAtOffset(t),r=e.getLanguageId(n),s=n;for(;s+10&&e.getLanguageId(a-1)===r;)a--;return new o(e,r,a,s+1,e.getStartOffset(a),e.getEndOffset(s))}i.d(t,{wH:()=>n,Bu:()=>r});class o{constructor(e,t,i,n,o,r){this._actual=e,this.languageId=t,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=o,this._lastCharOffset=r}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}}function r(e){return 0!=(7&e)}},4227:(e,t,i)=>{"use strict";i.d(t,{EA:()=>a,Vr:()=>f});var n=i(7295),o=i(72),r=i(4314);class s{constructor(e,t,i,n,o,r){this.languageIdentifier=e,this.index=t,this.open=i,this.close=n,this.forwardRegex=o,this.reversedRegex=r,this._openSet=s._toSet(this.open),this._closeSet=s._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){const t=new Set;for(const i of e)t.add(i);return t}}class a{constructor(e,t){const i=function(e){const t=e.length;e=e.map((e=>[e[0].toLowerCase(),e[1].toLowerCase()]));const i=[];for(let e=0;e{const[i,n]=e,[o,r]=t;return i===o||i===r||n===o||n===r},o=(e,n)=>{const o=Math.min(e,n),r=Math.max(e,n);for(let e=0;e0&&r.push({open:o,close:s})}return r}(t);this.brackets=i.map(((t,n)=>new s(e,n,t.open,t.close,function(e,t,i,n){let o=[];o=o.concat(e),o=o.concat(t);for(let e=0,t=o.length;e=0&&n.push(t);for(const t of r.close)t.indexOf(e)>=0&&n.push(t)}}function c(e,t){return e.length-t.length}function u(e){if(e.length<=1)return e;const t=[],i=new Set;for(const n of e)i.has(n)||(t.push(n),i.add(n));return t}function h(e){const t=/^[\w ]+$/.test(e);return e=n.ec(e),t?`\\b${e}\\b`:e}function d(e){let t=`(${e.map(h).join(")|(")})`;return n.GF(t,!0)}const g=function(){let e=null,t=null;return function(i){return e!==i&&(e=i,t=function(e){if(o.lZ){const t=new Uint16Array(e.length);let i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charCodeAt(n);return o.oe().decode(t)}{let t=[],i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charAt(n);return t.join("")}}(e)),t}}();class f{static _findPrevBracketInText(e,t,i,n){let o=i.match(e);if(!o)return null;let s=i.length-(o.index||0),a=o[0].length,l=n+s;return new r.e(t,l-a+1,t,l+1)}static findPrevBracketInRange(e,t,i,n,o){const r=g(i).substring(i.length-o,i.length-n);return this._findPrevBracketInText(e,t,r,n)}static findNextBracketInText(e,t,i,n){let o=i.match(e);if(!o)return null;let s=o.index||0,a=o[0].length;if(0===a)return null;let l=n+s;return new r.e(t,l+1,t,l+1+a)}static findNextBracketInRange(e,t,i,n,o){const r=i.substring(n,o);return this.findNextBracketInText(e,t,r,n)}}},5713:(e,t,i)=>{"use strict";i.d(t,{C:()=>a,F:()=>l});var n=i(7295),o=i(8411),r=i(8111);const s={getInitialState:()=>r.nO,tokenize2:(e,t,i,n)=>(0,r.mh)(0,e,i,n)};function a(e,t=s){return function(e,t){let i='
    ',r=n.uq(e),s=t.getInitialState();for(let e=0,a=r.length;e0&&(i+="
    ");let l=t.tokenize2(a,!0,s,0);o.A.convertToEndOffset(l.tokens,a.length);let c=new o.A(l.tokens,a).inflate(),u=0;for(let e=0,t=c.getCount();e${n.YU(a.substring(u,o))}`,u=o}s=l.endState}return i+="
    ",i}(e,t||s)}function l(e,t,i,n,o,r,s){let a="
    ",l=n,c=0;for(let u=0,h=t.getCount();u0;)d+=s?" ":" ",e--;break;case 60:d+="<";break;case 62:d+=">";break;case 38:d+="&";break;case 0:d+="�";break;case 65279:case 8232:case 8233:case 133:d+="�";break;case 13:d+="​";break;case 32:d+=s?" ":" ";break;default:d+=String.fromCharCode(t)}}if(a+=`${d}`,h>o||l>=o)break}return a+="
    ",a}},469:(e,t,i)=>{"use strict";i.d(t,{p:()=>n});const n=(0,i(2065).yh)("editorWorkerService")},9510:(e,t,i)=>{"use strict";i.d(t,{St:()=>b,ML:()=>_,Vl:()=>p,Vj:()=>m});var n=i(1050),o=i(7301),r=i(666),s=i(4101),a=i(1200),l=i(4565),c=i(8401),u=i(3060),h=i(1432);function d(e){const t=new Uint32Array(function(e){let t=0;if(t+=2,"full"===e.type)t+=1+e.data.length;else{t+=1,t+=3*e.deltas.length;for(const i of e.deltas)i.data&&(t+=i.data.length)}return t}(e));let i=0;if(t[i++]=e.id,"full"===e.type)t[i++]=1,t[i++]=e.data.length,t.set(e.data,i),i+=e.data.length;else{t[i++]=2,t[i++]=e.deltas.length;for(const n of e.deltas)t[i++]=n.start,t[i++]=n.deleteCount,n.data?(t[i++]=n.data.length,t.set(n.data,i),i+=n.data.length):t[i++]=0}return function(e){const t=new Uint8Array(e.buffer,e.byteOffset,4*e.length);return h.r()||function(e){for(let t=0,i=e.length;t0?t[0]:null}function b(e){const t=s.K7.ordered(e);return t.length>0?t[0]:null}l.P.registerCommand("_provideDocumentSemanticTokensLegend",((e,...t)=>f(void 0,void 0,void 0,(function*(){const[i]=t;(0,c.p_)(i instanceof r.o);const n=e.get(a.q).getModel(i);if(!n)return;const o=v(n);return o?o.getLegend():e.get(l.H).executeCommand("_provideDocumentRangeSemanticTokensLegend",i)})))),l.P.registerCommand("_provideDocumentSemanticTokens",((e,...t)=>f(void 0,void 0,void 0,(function*(){const[i]=t;(0,c.p_)(i instanceof r.o);const s=e.get(a.q).getModel(i);if(!s)return;const u=_(s,null,n.T.None);if(!u)return e.get(l.H).executeCommand("_provideDocumentRangeSemanticTokens",i,s.getFullModelRange());const{provider:h,request:g}=u;let f;try{f=yield g}catch(e){return void(0,o.Cp)(e)}if(!f||!p(f))return;const m=d({id:0,type:"full",data:f.data});return f.resultId&&h.releaseDocumentSemanticTokens(f.resultId),m})))),l.P.registerCommand("_provideDocumentRangeSemanticTokensLegend",((e,...t)=>f(void 0,void 0,void 0,(function*(){const[i]=t;(0,c.p_)(i instanceof r.o);const n=e.get(a.q).getModel(i);if(!n)return;const o=b(n);return o?o.getLegend():void 0})))),l.P.registerCommand("_provideDocumentRangeSemanticTokens",((e,...t)=>f(void 0,void 0,void 0,(function*(){const[i,s]=t;(0,c.p_)(i instanceof r.o),(0,c.p_)(g.e.isIRange(s));const l=e.get(a.q).getModel(i);if(!l)return;const u=b(l);if(!u)return;let h;try{h=yield u.provideDocumentRangeSemanticTokens(l,g.e.lift(s),n.T.None)}catch(e){return void(0,o.Cp)(e)}return h&&p(h)?d({id:0,type:"full",data:h.data}):void 0}))))},6479:(e,t,i)=>{"use strict";i.d(t,{i:()=>n});const n=(0,i(2065).yh)("markerDecorationsService")},1531:(e,t,i)=>{"use strict";i.d(t,{h:()=>n});const n=(0,i(2065).yh)("modeService")},1200:(e,t,i)=>{"use strict";i.d(t,{q:()=>n,p:()=>o});const n=(0,i(2065).yh)("modelService");function o(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},7390:(e,t,i)=>{"use strict";i.d(t,{BR:()=>E,e3:()=>A,tw:()=>M});var n=i(4669),o=i(5976),r=i(1432),s=i(7301),a=i(4141),l=i(3411),c=i(4101),u=i(1144),h=i(3187),d=i(3108),g=i(5393),f=i(1050),p=i(7781),m=i(3557),_=i(4862),v=i(9954),b=i(5215),y=i(6663),w=i(5072),C=i(9510),S=function(e,t){return function(i,n){t(i,n,e)}};function x(e){return e.toString()}function k(e){const t=new v.yP,i=e.createSnapshot();let n;for(;n=i.read();)t.update(n);return t.digest()}class D{constructor(e,t,i){this._modelEventListeners=new o.SL,this.model=e,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(e.onWillDispose((()=>t(e)))),this._modelEventListeners.add(e.onDidChangeLanguage((t=>i(e,t))))}_disposeLanguageSelection(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null)}dispose(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}setLanguage(e){this._disposeLanguageSelection(),this._languageSelection=e,this._languageSelectionListener=this._languageSelection.onDidChange((()=>this.model.setMode(e.languageIdentifier))),this.model.setMode(e.languageIdentifier)}}const L=r.IJ||r.dz?1:2;class N{constructor(e,t,i,n,o,r,s,a){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=o,this.sha1=r,this.versionId=s,this.alternativeVersionId=a}}let E=class e extends o.JT{constructor(e,t,i,o,r){super(),this._configurationService=e,this._resourcePropertiesService=t,this._themeService=i,this._logService=o,this._undoRedoService=r,this._onModelAdded=this._register(new n.Q5),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new n.Q5),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new n.Q5),this.onModelModeChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new T(this._themeService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration((()=>this._updateModelOptions()))),this._updateModelOptions(),this._register(new I(this,this._themeService,this._configurationService,this._semanticStyling))}static _readModelOptions(e,t){let i=a.DB.tabSize;if(e.editor&&void 0!==e.editor.tabSize){const t=parseInt(e.editor.tabSize,10);isNaN(t)||(i=t),i<1&&(i=1)}let n=i;if(e.editor&&void 0!==e.editor.indentSize&&"tabSize"!==e.editor.indentSize){const t=parseInt(e.editor.indentSize,10);isNaN(t)||(n=t),n<1&&(n=1)}let o=a.DB.insertSpaces;e.editor&&void 0!==e.editor.insertSpaces&&(o="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let r=L;const s=e.eol;"\r\n"===s?r=2:"\n"===s&&(r=1);let l=a.DB.trimAutoWhitespace;e.editor&&void 0!==e.editor.trimAutoWhitespace&&(l="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let c=a.DB.detectIndentation;e.editor&&void 0!==e.editor.detectIndentation&&(c="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let u=a.DB.largeFileOptimizations;return e.editor&&void 0!==e.editor.largeFileOptimizations&&(u="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations)),{isForSimpleWidget:t,tabSize:i,indentSize:n,insertSpaces:o,detectIndentation:c,defaultEOL:r,trimAutoWhitespace:l,largeFileOptimizations:u}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&"auto"!==i?i:3===r.OS||2===r.OS?"\n":"\r\n"}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!=typeof e||e}getCreationOptions(t,i,n){let o=this._modelCreationOptionsByLanguageAndResource[t+i];if(!o){const r=this._configurationService.getValue("editor",{overrideIdentifier:t,resource:i}),s=this._getEOL(i,t);o=e._readModelOptions({editor:r,eol:s},n),this._modelCreationOptionsByLanguageAndResource[t+i]=o}return o}_updateModelOptions(){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const i=Object.keys(this._models);for(let n=0,o=i.length;ne){const t=[];for(this._disposedModels.forEach((e=>{e.sharesUndoRedoStack||t.push(e)})),t.sort(((e,t)=>e.time-t.time));t.length>0&&this._disposedModelsHeapSize>e;){const e=t.shift();this._removeDisposedModel(e.uri),null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){const o=this.getCreationOptions(t.language,i,n),r=new l.yO(e,o,t,i,this._undoRedoService);if(i&&this._disposedModels.has(x(i))){const e=this._removeDisposedModel(i),t=this._undoRedoService.getElements(i),n=k(r)===e.sha1;if(n||e.sharesUndoRedoStack){for(const e of t.past)(0,b.e9)(e)&&e.matchesResource(i)&&e.setModel(r);for(const e of t.future)(0,b.e9)(e)&&e.matchesResource(i)&&e.setModel(r);this._undoRedoService.setElementsValidFlag(i,!0,(e=>(0,b.e9)(e)&&e.matchesResource(i))),n&&(r._overwriteVersionId(e.versionId),r._overwriteAlternativeVersionId(e.alternativeVersionId),r._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const s=x(r.uri);if(this._models[s])throw new Error("ModelService: Cannot add model because it already exists!");const a=new D(r,(e=>this._onWillDispose(e)),((e,t)=>this._onDidChangeLanguage(e,t)));return this._models[s]=a,a}createModel(e,t,i,n=!1){let o;return t?(o=this._createModelData(e,t.languageIdentifier,i,n),this.setMode(o.model,t)):o=this._createModelData(e,u.Tb,i,n),this._onModelAdded.fire(o.model),o.model}setMode(e,t){if(!t)return;const i=this._models[x(e.uri)];i&&i.setLanguage(t)}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i0||e.future.length>0){for(const i of e.past)(0,b.e9)(i)&&i.matchesResource(t.uri)&&(r=!0,s+=i.heapSize(t.uri),i.setModel(t.uri));for(const i of e.future)(0,b.e9)(i)&&i.matchesResource(t.uri)&&(r=!0,s+=i.heapSize(t.uri),i.setModel(t.uri))}}var a;const l=e.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(r)if(!o&&s>l){const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}else this._ensureDisposedModelsHeapSize(l-s),this._undoRedoService.setElementsValidFlag(t.uri,!1,(e=>(0,b.e9)(e)&&e.matchesResource(t.uri))),this._insertDisposedModel(new N(t.uri,n.model.getInitialUndoRedoSnapshot(),Date.now(),o,s,k(t),t.getVersionId(),t.getAlternativeVersionId()));else if(!o){const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}delete this._models[i],n.dispose(),delete this._modelCreationOptionsByLanguageAndResource[t.getLanguageIdentifier().language+t.uri],this._onModelRemoved.fire(t)}_onDidChangeLanguage(t,i){const n=i.oldLanguage,o=t.getLanguageIdentifier().language,r=this.getCreationOptions(n,t.uri,t.isForSimpleWidget),s=this.getCreationOptions(o,t.uri,t.isForSimpleWidget);e._setModelOptionsForModel(t,s,r),this._onModelModeChanged.fire({model:t,oldModeId:n})}};E.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520,E=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([S(0,d.Ui),S(1,h.y),S(2,p.XE),S(3,m.VZ),S(4,_.tJ)],E);const A="editor.semanticHighlighting";function M(e,t,i){var n;const o=null===(n=i.getValue(A,{overrideIdentifier:e.getLanguageIdentifier().language,resource:e.uri}))||void 0===n?void 0:n.enabled;return"boolean"==typeof o?o:t.getColorTheme().semanticHighlighting}class I extends o.JT{constructor(e,t,i,n){super(),this._watchers=Object.create(null),this._semanticStyling=n;const o=e=>{this._watchers[e.uri.toString()]=new O(e,t,this._semanticStyling)},r=(e,t)=>{t.dispose(),delete this._watchers[e.uri.toString()]},s=()=>{for(let n of e.getModels()){const e=this._watchers[n.uri.toString()];M(n,t,i)?e||o(n):e&&r(n,e)}};this._register(e.onModelAdded((e=>{M(e,t,i)&&o(e)}))),this._register(e.onModelRemoved((e=>{const t=this._watchers[e.uri.toString()];t&&r(e,t)}))),this._register(i.onDidChangeConfiguration((e=>{e.affectsConfiguration(A)&&s()}))),this._register(t.onDidColorThemeChange(s))}}class T extends o.JT{constructor(e,t){super(),this._themeService=e,this._logService=t,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange((()=>{this._caches=new WeakMap})))}get(e){return this._caches.has(e)||this._caches.set(e,new w.$(e.getLegend(),this._themeService,this._logService)),this._caches.get(e)}}class R{constructor(e,t,i){this._provider=e,this.resultId=t,this.data=i}dispose(){this._provider.releaseDocumentSemanticTokens(this.resultId)}}class O extends o.JT{constructor(e,t,i){super(),this._isDisposed=!1,this._model=e,this._semanticStyling=i,this._fetchDocumentSemanticTokens=this._register(new g.pY((()=>this._fetchDocumentSemanticTokensNow()),O.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._register(this._model.onDidChangeContent((()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule()}))),this._register(this._model.onDidChangeLanguage((()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)})));const n=()=>{(0,o.B9)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const t of c.wT.all(e))"function"==typeof t.onDidChange&&this._documentProvidersChangeListeners.push(t.onDidChange((()=>this._fetchDocumentSemanticTokens.schedule(0))))};n(),this._register(c.wT.onDidChange((()=>{n(),this._fetchDocumentSemanticTokens.schedule()}))),this._register(t.onDidColorThemeChange((e=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule()}))),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;const e=new f.A,t=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,i=(0,C.ML)(this._model,t,e.token);if(!i)return void(this._currentDocumentResponse&&this._model.setSemanticTokens(null,!1));const{provider:n,request:o}=i;this._currentDocumentRequestCancellationTokenSource=e;const r=[],a=this._model.onDidChangeContent((e=>{r.push(e)})),l=this._semanticStyling.get(n);o.then((e=>{this._currentDocumentRequestCancellationTokenSource=null,a.dispose(),this._setDocumentSemanticTokens(n,e||null,l,r)}),(e=>{e&&(s.VV(e)||"string"==typeof e.message&&-1!==e.message.indexOf("busy"))||s.dL(e),this._currentDocumentRequestCancellationTokenSource=null,a.dispose(),r.length>0&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule())}))}static _copy(e,t,i,n,o){for(let r=0;r{n.length>0&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule()};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed)e&&t&&e.releaseDocumentSemanticTokens(t.resultId);else if(e&&i){if(!t)return this._model.setSemanticTokens(null,!0),void r();if((0,C.Vj)(t)){if(!o)return void this._model.setSemanticTokens(null,!0);if(0===t.edits.length)t={resultId:t.resultId,data:o.data};else{let e=0;for(const i of t.edits)e+=(i.data?i.data.length:0)-i.deleteCount;const i=o.data,n=new Uint32Array(i.length+e);let r=i.length,s=n.length;for(let e=t.edits.length-1;e>=0;e--){const o=t.edits[e],a=r-(o.start+o.deleteCount);a>0&&(O._copy(i,r-a,n,s-a,a),s-=a),o.data&&(O._copy(o.data,0,n,s-o.data.length,o.data.length),s-=o.data.length),r=o.start}r>0&&O._copy(i,0,n,0,r),t={resultId:t.resultId,data:n}}}if((0,C.Vl)(t)){this._currentDocumentResponse=new R(e,t.resultId,t.data);const o=(0,w.h)(t,i,this._model.getLanguageIdentifier());if(n.length>0)for(const e of n)for(const t of o)for(const i of e.changes)t.applyEdit(i.range,i.text);this._model.setSemanticTokens(o,!0)}else this._model.setSemanticTokens(null,!0);r()}else this._model.setSemanticTokens(null,!1)}}O.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY=300},8216:(e,t,i)=>{"use strict";i.d(t,{S:()=>n});const n=(0,i(2065).yh)("textModelService")},5072:(e,t,i)=>{"use strict";i.d(t,{$:()=>s,h:()=>a});var n=i(4101),o=i(3557),r=i(8409);class s{constructor(e,t,i){this._legend=e,this._themeService=t,this._logService=i,this._hashTable=new c,this._hasWarnedOverlappingTokens=!1}getMetadata(e,t,i){const r=this._hashTable.get(e,t,i.id);let s;if(r)s=r.metadata,this._logService.getLevel()===o.in.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${n.NX.getForeground(s)}, fontStyle ${n.NX.getFontStyle(s).toString(2)}`);else{let r=this._legend.tokenTypes[e];const a=[];if(r){let e=t;for(let t=0;e>0&&t>=1;e>0&&this._logService.getLevel()===o.in.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),a.push("not-in-legend"));const n=this._themeService.getColorTheme().getTokenStyleMetadata(r,a,i.language);void 0===n?s=2147483647:(s=0,void 0!==n.italic&&(s|=1|(n.italic?1:0)<<11),void 0!==n.bold&&(s|=2|(n.bold?2:0)<<11),void 0!==n.underline&&(s|=4|(n.underline?4:0)<<11),n.foreground&&(s|=8|n.foreground<<14),0===s&&(s=2147483647))}else this._logService.getLevel()===o.in.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),s=2147483647,r="not-in-legend";this._hashTable.add(e,t,i.id,s),this._logService.getLevel()===o.in.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${r}) / ${t} (${a.join(" ")}): foreground ${n.NX.getForeground(s)}, fontStyle ${n.NX.getFontStyle(s).toString(2)}`)}return s}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}}function a(e,t,i){const n=e.data,o=e.data.length/5|0,s=Math.max(Math.ceil(o/1024),400),a=[];let l=0,c=1,u=0;for(;le&&0===n[5*t];)t--;if(t-1===e){let e=h;for(;e+1a&&(t.warnOverlappingSemanticTokens(s,a+1),m=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=c._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1{"use strict";i.d(t,{V:()=>o,y:()=>r});var n=i(2065);const o=(0,n.yh)("textResourceConfigurationService"),r=(0,n.yh)("textResourcePropertiesService")},913:(e,t,i)=>{"use strict";i.d(t,{Oe:()=>n,ug:()=>o,qq:()=>r,ld:()=>s,UX:()=>a,aq:()=>l,B8:()=>c,xi:()=>u,UL:()=>h});var n,o,r,s,a,l,c,u,h,d=i(3580);!function(e){e.noSelection=d.N("noSelection","No selection"),e.singleSelectionRange=d.N("singleSelectionRange","Line {0}, Column {1} ({2} selected)"),e.singleSelection=d.N("singleSelection","Line {0}, Column {1}"),e.multiSelectionRange=d.N("multiSelectionRange","{0} selections ({1} characters selected)"),e.multiSelection=d.N("multiSelection","{0} selections"),e.emergencyConfOn=d.N("emergencyConfOn","Now changing the setting `accessibilitySupport` to 'on'."),e.openingDocs=d.N("openingDocs","Now opening the Editor Accessibility documentation page."),e.readonlyDiffEditor=d.N("readonlyDiffEditor"," in a read-only pane of a diff editor."),e.editableDiffEditor=d.N("editableDiffEditor"," in a pane of a diff editor."),e.readonlyEditor=d.N("readonlyEditor"," in a read-only code editor"),e.editableEditor=d.N("editableEditor"," in a code editor"),e.changeConfigToOnMac=d.N("changeConfigToOnMac","To configure the editor to be optimized for usage with a Screen Reader press Command+E now."),e.changeConfigToOnWinLinux=d.N("changeConfigToOnWinLinux","To configure the editor to be optimized for usage with a Screen Reader press Control+E now."),e.auto_on=d.N("auto_on","The editor is configured to be optimized for usage with a Screen Reader."),e.auto_off=d.N("auto_off","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),e.tabFocusModeOnMsg=d.N("tabFocusModeOnMsg","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),e.tabFocusModeOnMsgNoKb=d.N("tabFocusModeOnMsgNoKb","Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."),e.tabFocusModeOffMsg=d.N("tabFocusModeOffMsg","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),e.tabFocusModeOffMsgNoKb=d.N("tabFocusModeOffMsgNoKb","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding."),e.openDocMac=d.N("openDocMac","Press Command+H now to open a browser window with more information related to editor accessibility."),e.openDocWinLinux=d.N("openDocWinLinux","Press Control+H now to open a browser window with more information related to editor accessibility."),e.outroMsg=d.N("outroMsg","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),e.showAccessibilityHelpAction=d.N("showAccessibilityHelpAction","Show Accessibility Help")}(n||(n={})),function(e){e.inspectTokensAction=d.N("inspectTokens","Developer: Inspect Tokens")}(o||(o={})),function(e){e.gotoLineActionLabel=d.N("gotoLineActionLabel","Go to Line/Column...")}(r||(r={})),function(e){e.helpQuickAccessActionLabel=d.N("helpQuickAccess","Show all Quick Access Providers")}(s||(s={})),function(e){e.quickCommandActionLabel=d.N("quickCommandActionLabel","Command Palette"),e.quickCommandHelp=d.N("quickCommandActionHelp","Show And Run Commands")}(a||(a={})),function(e){e.quickOutlineActionLabel=d.N("quickOutlineActionLabel","Go to Symbol..."),e.quickOutlineByCategoryActionLabel=d.N("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")}(l||(l={})),function(e){e.editorViewAccessibleLabel=d.N("editorViewAccessibleLabel","Editor content"),e.accessibilityHelpMessage=d.N("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")}(c||(c={})),function(e){e.toggleHighContrast=d.N("toggleHighContrast","Toggle High Contrast Theme")}(u||(u={})),function(e){e.bulkEditServiceSummary=d.N("bulkEditServiceSummary","Made {0} edits in {1} files")}(h||(h={}))},7869:(e,t,i)=>{"use strict";i.d(t,{Kh:()=>a,Mm:()=>l,n0:()=>g,fY:()=>f,tR:()=>m,Ym:()=>_,hw:()=>v,DD:()=>y,zk:()=>w,Yp:()=>C,TC:()=>S,Dl:()=>x,zw:()=>k,e_:()=>D,kp:()=>N,zu:()=>E,x3:()=>A,N5:()=>M,m9:()=>T,lK:()=>R,Re:()=>O,eS:()=>F});var n=i(3580),o=i(1264),r=i(3910),s=i(7781);const a=(0,r.P6)("editor.lineHighlightBackground",{dark:null,light:null,hc:null},n.N("lineHighlight","Background color for the highlight of line at the cursor position.")),l=(0,r.P6)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},n.N("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),c=(0,r.P6)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},n.N("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),u=(0,r.P6)("editor.rangeHighlightBorder",{dark:null,light:null,hc:r.xL},n.N("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0),h=(0,r.P6)("editor.symbolHighlightBackground",{dark:r.MU,light:r.MU,hc:null},n.N("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),d=(0,r.P6)("editor.symbolHighlightBorder",{dark:null,light:null,hc:r.xL},n.N("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0),g=(0,r.P6)("editorCursor.foreground",{dark:"#AEAFAD",light:o.Il.black,hc:o.Il.white},n.N("caret","Color of the editor cursor.")),f=(0,r.P6)("editorCursor.background",null,n.N("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),p=(0,r.P6)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},n.N("editorWhitespaces","Color of whitespace characters in the editor.")),m=(0,r.P6)("editorIndentGuide.background",{dark:p,light:p,hc:p},n.N("editorIndentGuides","Color of the editor indentation guides.")),_=(0,r.P6)("editorIndentGuide.activeBackground",{dark:p,light:p,hc:p},n.N("editorActiveIndentGuide","Color of the active editor indentation guides.")),v=(0,r.P6)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:o.Il.white},n.N("editorLineNumbers","Color of editor line numbers.")),b=(0,r.P6)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:r.xL},n.N("editorActiveLineNumber","Color of editor active line number"),!1,n.N("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),y=(0,r.P6)("editorLineNumber.activeForeground",{dark:b,light:b,hc:b},n.N("editorActiveLineNumber","Color of editor active line number")),w=(0,r.P6)("editorRuler.foreground",{dark:"#5A5A5A",light:o.Il.lightgrey,hc:o.Il.white},n.N("editorRuler","Color of the editor rulers.")),C=(0,r.P6)("editorCodeLens.foreground",{dark:"#999999",light:"#999999",hc:"#999999"},n.N("editorCodeLensForeground","Foreground color of editor CodeLens")),S=(0,r.P6)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},n.N("editorBracketMatchBackground","Background color behind matching brackets")),x=(0,r.P6)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:r.lR},n.N("editorBracketMatchBorder","Color for matching brackets boxes")),k=(0,r.P6)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},n.N("editorOverviewRulerBorder","Color of the overview ruler border.")),D=(0,r.P6)("editorOverviewRuler.background",null,n.N("editorOverviewRulerBackground","Background color of the editor overview ruler. Only used when the minimap is enabled and placed on the right side of the editor.")),L=(0,r.P6)("editorGutter.background",{dark:r.cv,light:r.cv,hc:r.cv},n.N("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),N=(0,r.P6)("editorUnnecessaryCode.border",{dark:null,light:null,hc:o.Il.fromHex("#fff").transparent(.8)},n.N("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),E=(0,r.P6)("editorUnnecessaryCode.opacity",{dark:o.Il.fromHex("#000a"),light:o.Il.fromHex("#0007"),hc:null},n.N("unnecessaryCodeOpacity","Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.")),A=(0,r.P6)("editorGhostText.border",{dark:null,light:null,hc:o.Il.fromHex("#fff").transparent(.8)},n.N("editorGhostTextBorder","Border color of ghost text in the editor.")),M=(0,r.P6)("editorGhostText.foreground",{dark:o.Il.fromHex("#ffffff56"),light:o.Il.fromHex("#0007"),hc:null},n.N("editorGhostTextForeground","Foreground color of the ghost text in the editor.")),I=new o.Il(new o.VS(0,122,204,.6)),T=(0,r.P6)("editorOverviewRuler.rangeHighlightForeground",{dark:I,light:I,hc:I},n.N("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),R=(0,r.P6)("editorOverviewRuler.errorForeground",{dark:new o.Il(new o.VS(255,18,18,.7)),light:new o.Il(new o.VS(255,18,18,.7)),hc:new o.Il(new o.VS(255,50,50,1))},n.N("overviewRuleError","Overview ruler marker color for errors.")),O=(0,r.P6)("editorOverviewRuler.warningForeground",{dark:r.uo,light:r.uo,hc:r.pW},n.N("overviewRuleWarning","Overview ruler marker color for warnings.")),F=(0,r.P6)("editorOverviewRuler.infoForeground",{dark:r.c6,light:r.c6,hc:r.T8},n.N("overviewRuleInfo","Overview ruler marker color for infos."));(0,s.Ic)(((e,t)=>{const i=e.getColor(r.cv);i&&t.addRule(`.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${i}; }`);const n=e.getColor(r.NO);n&&t.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${n}; }`);const o=e.getColor(L);o&&t.addRule(`.monaco-editor .margin { background-color: ${o}; }`);const s=e.getColor(c);s&&t.addRule(`.monaco-editor .rangeHighlight { background-color: ${s}; }`);const a=e.getColor(u);a&&t.addRule(`.monaco-editor .rangeHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${a}; }`);const l=e.getColor(h);l&&t.addRule(`.monaco-editor .symbolHighlight { background-color: ${l}; }`);const g=e.getColor(d);g&&t.addRule(`.monaco-editor .symbolHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${g}; }`);const f=e.getColor(p);f&&(t.addRule(`.monaco-editor .mtkw { color: ${f} !important; }`),t.addRule(`.monaco-editor .mtkz { color: ${f} !important; }`))}))},2003:(e,t,i)=>{"use strict";i.d(t,{EY:()=>o,Tj:()=>r});class n{constructor(e,t,i){this.from=0|e,this.to=0|t,this.colorId=0|i}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class o{constructor(e,t,i){this.startLineNumber=e,this.endLineNumber=t,this.color=i,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.colori&&(h=i-d);const g=l.color;let f=this._color2Id[g];f||(f=++this._lastAssignedId,this._color2Id[g]=f,this._id2Color[f]=g);const p=new n(h-d,h+d,f);l.setColorZone(p),s.push(p)}return this._colorZonesInvalid=!1,s.sort(n.compare),s}}},2550:(e,t,i)=>{"use strict";i.d(t,{Kp:()=>o,k:()=>a});var n=i(7295);class o{constructor(e,t,i,n){this.startColumn=e,this.endColumn=t,this.className=i,this.type=n}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){const i=e.length;if(i!==t.length)return!1;for(let n=0;n=r||(a[l++]=new o(Math.max(1,t.startColumn-n+1),Math.min(s+1,t.endColumn-n+1),t.className,t.type));return a}static filter(e,t,i,n){if(0===e.length)return[];let r=[],s=0;for(let a=0,l=e.length;at)continue;if(c.isEmpty()&&(0===l.type||3===l.type))continue;const u=c.startLineNumber===t?c.startColumn:i,h=c.endLineNumber===t?c.endColumn:n;r[s++]=new o(u,h,l.inlineClassName,l.type)}return r}static _typeCompare(e,t){const i=[2,0,1,3];return i[e]-i[t]}static compare(e,t){if(e.startColumn===t.startColumn){if(e.endColumn===t.endColumn){const i=o._typeCompare(e.type,t.type);return 0===i?e.classNamet.className?1:0:i}return e.endColumn-t.endColumn}return e.startColumn-t.startColumn}}class r{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.className=i,this.metadata=n}}class s{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(e){let t=0;for(let i=0,n=e.length;i0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}class a{static normalize(e,t){if(0===t.length)return[];let i=[];const o=new s;let r=0;for(let s=0,a=t.length;s1){const t=e.charCodeAt(l-2);n.ZG(t)&&l--}if(c>1){const t=e.charCodeAt(c-2);n.ZG(t)&&c--}const d=l-1,g=c-2;r=o.consumeLowerThan(d,r,i),0===o.count&&(r=d),o.insert(g,u,h)}return o.consumeLowerThan(1073741824,r,i),i}}},7736:(e,t,i)=>{"use strict";i.d(t,{zG:()=>a,IJ:()=>l,fH:()=>c,d1:()=>h,tF:()=>g});var n=i(7295),o=i(72),r=i(2550);class s{constructor(e,t,i){this.endIndex=e,this.type=t,this.metadata=i}isWhitespace(){return!!(1&this.metadata)}isPseudoAfter(){return!!(4&this.metadata)}}class a{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class l{constructor(e,t,i,n,o,s,a,l,c,u,h,d,g,f,p,m,_,v,b){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=o,this.containsRTL=s,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=c.sort(r.Kp.compare),this.tabSize=u,this.startVisibleColumn=h,this.spaceWidth=d,this.stopRenderingLineAfter=p,this.renderWhitespace="all"===m?4:"boundary"===m?1:"selection"===m?2:"trailing"===m?3:0,this.renderControlCharacters=_,this.fontLigatures=v,this.selectionsOnLine=b&&b.sort(((e,t)=>e.startOffset>>16}static getCharIndex(e){return(65535&e)>>>0}setPartData(e,t,i,n){let o=(t<<16|i<<0)>>>0;this._data[e]=o,this._absoluteOffsets[e]=n+i}getAbsoluteOffsets(){return this._absoluteOffsets}charOffsetToPartData(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}partDataToCharOffset(e,t,i){if(0===this.length)return 0;let n=(e<<16|i<<0)>>>0,o=0,r=this.length-1;for(;o+1>>1,t=this._data[e];if(t===n)return e;t>n?r=e:o=e}if(o===r)return o;let s=this._data[o],a=this._data[r];if(s===n)return o;if(a===n)return r;let l,u=c.getPartIndex(s),h=c.getCharIndex(s);return l=u!==c.getPartIndex(a)?t:c.getCharIndex(a),i-h<=l-i?o:r}}class u{constructor(e,t,i){this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}function h(e,t){if(0===e.lineContent.length){if(e.lineDecorations.length>0){t.appendASCIIString("");let i=0,n=0,o=0;for(const r of e.lineDecorations)1!==r.type&&2!==r.type||(t.appendASCIIString(''),1===r.type&&(o|=1,i++),2===r.type&&(o|=2,n++));t.appendASCIIString("");const r=new c(1,i+n);return r.setPartData(0,i,0,0),new u(r,!1,o)}return t.appendASCIIString(""),new u(new c(0,0),!1,0)}return function(e,t){const i=e.fontIsMonospace,o=e.canUseHalfwidthRightwardsArrow,r=e.containsForeignElements,s=e.lineContent,a=e.len,l=e.isOverflowing,h=e.parts,d=e.fauxIndentLength,g=e.tabSize,f=e.startVisibleColumn,p=e.containsRTL,m=e.spaceWidth,_=e.renderSpaceCharCode,v=e.renderWhitespace,b=e.renderControlCharacters,y=new c(a+1,h.length);let w=!1,C=0,S=f,x=0,k=0,D=0,L=0;p?t.appendASCIIString(''):t.appendASCIIString("");for(let e=0,l=h.length;e=d&&(t+=n)}}for(p&&(t.appendASCIIString(' style="width:'),t.appendASCIIString(String(m*i)),t.appendASCIIString('px"')),t.appendASCII(62);C1?t.write1(8594):t.write1(65515);for(let e=2;e<=i;e++)t.write1(160)}else i=1,t.write1(_);x+=i,C>=d&&(S+=i)}D=i}else{let i=0;for(t.appendASCII(62);C=d&&(S+=a)}D=i}N?k++:k=0,C>=a&&!w&&l.isPseudoAfter()&&(w=!0,y.setPartData(C,e,x,L)),t.appendASCIIString("")}return w||y.setPartData(a,h.length-1,x,L),l&&t.appendASCIIString(""),t.appendASCIIString(""),new u(y,p,r)}(function(e){const t=e.lineContent;let i,o;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0&&(n[o++]=new s(t,"",0));for(let r=0,a=e.getCount();r=i){n[o++]=new s(i,l,0);break}n[o++]=new s(a,l,0)}return n}(e.lineTokens,e.fauxIndentLength,o);(4===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine||3===e.renderWhitespace)&&(a=function(e,t,i,o){const r=e.continuesWithWrappedLine,a=e.fauxIndentLength,l=e.tabSize,c=e.startVisibleColumn,u=e.useMonospaceOptimizations,h=e.selectionsOnLine,d=1===e.renderWhitespace,g=3===e.renderWhitespace,f=e.renderSpaceWidth!==e.spaceWidth;let p=[],m=0,_=0,v=o[_].type,b=o[_].endIndex;const y=o.length;let w,C=!1,S=n.LC(t);-1===S?(C=!0,S=i,w=i):w=n.ow(t);let x=!1,k=0,D=h&&h[k],L=c%l;for(let e=a;e=D.endOffset&&(k++,D=h&&h[k]),ew)c=!0;else if(9===r)c=!0;else if(32===r)if(d)if(x)c=!0;else{const n=e+1e),c&&g&&(c=C||e>w),x){if(!c||!u&&L>=l){if(f)for(let t=(m>0?p[m-1].endIndex:a)+1;t<=e;t++)p[m++]=new s(t,"mtkw",1);else p[m++]=new s(e,"mtkw",1);L%=l}}else(e===b||c&&e>a)&&(p[m++]=new s(e,v,0),L%=l);for(9===r?L=l:n.K7(r)?L+=2:L++,x=c;e===b;)_++,_0?t.charCodeAt(i-1):0,n=i>1?t.charCodeAt(i-2):0;32===e&&32!==n&&9!==n||(N=!0)}else N=!0;if(N)if(f)for(let e=(m>0?p[m-1].endIndex:a)+1;e<=i;e++)p[m++]=new s(e,"mtkw",1);else p[m++]=new s(i,"mtkw",1);else p[m++]=new s(i,v,0);return p}(e,t,o,a));let l=0;if(e.lineDecorations.length>0){for(let t=0,i=e.lineDecorations.length;th&&(h=e.startOffset,c[u++]=new s(h,r,d)),!(e.endOffset+1<=n)){h=n,c[u++]=new s(h,r+" "+e.className,d|e.metadata);break}h=e.endOffset+1,c[u++]=new s(h,r+" "+e.className,d|e.metadata),l++}n>h&&(h=n,c[u++]=new s(h,r,d))}const d=i[i.length-1].endIndex;if(l=50&&(o[r++]=new s(c+1,t,i),u=c+1,c=-1);u!==l&&(o[r++]=new s(l,t,i))}else o[r++]=a;n=l}else for(let e=0,i=t.length;e50){const e=i.type,t=i.metadata,c=Math.ceil(l/50);for(let i=1;i{"use strict";i.d(t,{T:()=>o,o:()=>r});var n=i(5427);class o{constructor(e,t){this.index=e,this.remainder=t}}class r{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=(0,n.A)(e);const i=this.values,o=this.prefixSum,r=t.length;return 0!==r&&(this.values=new Uint32Array(i.length+r),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e),e+r),this.values.set(t,e),e-1=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(e,t){return e=(0,n.A)(e),t=(0,n.A)(t),this.values[e]!==t&&(this.values[e]=t,e-1=i.length)return!1;let r=i.length-e;return t>=r&&(t=r),0!==t&&(this.values=new Uint32Array(i.length-t),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(o.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalValue(){return 0===this.values.length?0:this._getAccumulatedValue(this.values.length-1)}getAccumulatedValue(e){return e<0?0:(e=(0,n.A)(e),this._getAccumulatedValue(e))}_getAccumulatedValue(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let i=t;i<=e;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalValue();let t=0,i=this.values.length-1,n=0,r=0,s=0;for(;t<=i;)if(n=t+(i-t)/2|0,r=this.prefixSum[n],s=r-this.values[n],e=r))break;t=n+1}return new o(n,e-s)}}},3824:(e,t,i)=>{"use strict";i.d(t,{l_:()=>o,le:()=>s,ud:()=>a,IP:()=>l,wA:()=>c,$t:()=>u,$l:()=>h});var n=i(7295);class o{constructor(e,t,i,n){this.top=0|e,this.left=0|t,this.width=0|i,this.height=0|n}}class r{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}}class s{constructor(e,t,i){this.breakOffsets=e,this.breakOffsetsVisibleColumn=t,this.wrappedTextIndentLength=i}static getInputOffsetOfOutputPosition(e,t,i){return 0===t?i:e[t-1]+i}static getOutputPositionOfInputOffset(e,t){let i=0,n=e.length-1,o=0,s=0;for(;i<=n;){o=i+(n-i)/2|0;const r=e[o];if(s=o>0?e[o-1]:0,t=r))break;i=o+1}}return new r(o,t-s)}}class a{constructor(e,t){this.tabSize=e,this.data=t}}class l{constructor(e,t,i,n,o,r){this.content=e,this.continuesWithWrappedLine=t,this.minColumn=i,this.maxColumn=n,this.startVisibleColumn=o,this.tokens=r}}class c{constructor(e,t,i,n,o,r,s,a,l,u){this.minColumn=e,this.maxColumn=t,this.content=i,this.continuesWithWrappedLine=n,this.isBasicASCII=c.isBasicASCII(i,r),this.containsRTL=c.containsRTL(i,this.isBasicASCII,o),this.tokens=s,this.inlineDecorations=a,this.tabSize=l,this.startVisibleColumn=u}static isBasicASCII(e,t){return!t||n.$i(e)}static containsRTL(e,t,i){return!(t||!i)&&n.Ut(e)}}class u{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class h{constructor(e,t){this.range=e,this.options=t}}},7355:(e,t,i)=>{"use strict";i.r(t),i.d(t,{SelectionAnchorSet:()=>d});var n=i(6830),o=i(3580),r=i(9102),s=i(3860),a=i(2258),l=i(8819),c=i(9365),u=i(5152),h=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const d=new l.uy("selectionAnchorSet",!1);let g=class e{constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=d.bindTo(t),this.modelChangeListener=e.onDidChangeModel((()=>this.selectionAnchorSetContextKey.reset()))}static get(t){return t.getContribution(e.ID)}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition(),t=this.decorationId?[this.decorationId]:[],i=this.editor.deltaDecorations(t,[{range:s.Y.fromPositions(e,e),options:{description:"selection-anchor",stickiness:1,hoverMessage:(new c.W5).appendText((0,o.N)("selectionAnchor","Selection Anchor")),className:"selection-anchor"}}]);this.decorationId=i[0],this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,u.Z9)((0,o.N)("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(s.Y.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){this.decorationId&&(this.editor.deltaDecorations([this.decorationId],[]),this.decorationId=void 0,this.selectionAnchorSetContextKey.set(!1))}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};var f,p;g.ID="editor.contrib.selectionAnchorController",g=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(f=1,p=l.i6,function(e,t){p(e,t,f)})],g);class m extends n.R6{constructor(){super({id:"editor.action.setSelectionAnchor",label:(0,o.N)("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:r.u.editorTextFocus,primary:(0,a.gx)(2089,2080),weight:100}})}run(e,t){return h(this,void 0,void 0,(function*(){g.get(t).setSelectionAnchor()}))}}class _ extends n.R6{constructor(){super({id:"editor.action.goToSelectionAnchor",label:(0,o.N)("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:d})}run(e,t){return h(this,void 0,void 0,(function*(){g.get(t).goToSelectionAnchor()}))}}class v extends n.R6{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:(0,o.N)("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:d,kbOpts:{kbExpr:r.u.editorTextFocus,primary:(0,a.gx)(2089,2089),weight:100}})}run(e,t){return h(this,void 0,void 0,(function*(){g.get(t).selectFromAnchorToCursor()}))}}class b extends n.R6{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:(0,o.N)("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:d,kbOpts:{kbExpr:r.u.editorTextFocus,primary:9,weight:100}})}run(e,t){return h(this,void 0,void 0,(function*(){g.get(t).cancelSelectionAnchor()}))}}(0,n._K)(g.ID,g),(0,n.Qr)(m),(0,n.Qr)(_),(0,n.Qr)(v),(0,n.Qr)(b)},7084:(e,t,i)=>{"use strict";i.r(t),i.d(t,{BracketMatchingController:()=>w});var n=i(3580),o=i(5393),r=i(5976),s=i(6830),a=i(187),l=i(4314),c=i(3860),u=i(9102),h=i(4973),d=i(3411),g=i(7869),f=i(3910),p=i(7781),m=i(4144);const _=(0,f.P6)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hc:"#A0A0A0"},n.N("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class v extends s.R6{constructor(){super({id:"editor.action.jumpToBracket",label:n.N("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:u.u.editorTextFocus,primary:3160,weight:100}})}run(e,t){let i=w.get(t);i&&i.jumpToBracket()}}class b extends s.R6{constructor(){super({id:"editor.action.selectToBracket",label:n.N("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){const n=w.get(t);if(!n)return;let o=!0;i&&!1===i.selectBrackets&&(o=!1),n.selectToBracket(o)}}class y{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class w extends r.JT{constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=[],this._updateBracketsSoon=this._register(new o.pY((()=>this._updateBrackets()),50)),this._matchBrackets=this._editor.getOption(61),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition((e=>{"never"!==this._matchBrackets&&this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelContent((e=>{this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModel((e=>{this._lastBracketsData=[],this._decorations=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelLanguageConfiguration((e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(61)&&(this._matchBrackets=this._editor.getOption(61),this._decorations=this._editor.deltaDecorations(this._decorations,[]),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})))}static get(e){return e.getContribution(w.ID)}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map((t=>{const i=t.getStartPosition(),n=e.matchBracket(i);let o=null;if(n)n[0].containsPosition(i)?o=n[1].getStartPosition():n[1].containsPosition(i)&&(o=n[0].getStartPosition());else{const t=e.findEnclosingBrackets(i);if(t)o=t[0].getStartPosition();else{const t=e.findNextBracket(i);t&&t.range&&(o=t.range.getStartPosition())}}return o?new c.Y(o.lineNumber,o.column,o.lineNumber,o.column):new c.Y(i.lineNumber,i.column,i.lineNumber,i.column)}));this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach((n=>{const o=n.getStartPosition();let r=t.matchBracket(o);if(!r&&(r=t.findEnclosingBrackets(o),!r)){const e=t.findNextBracket(o);e&&e.range&&(r=t.matchBracket(e.range.getStartPosition()))}let s=null,a=null;if(r){r.sort(l.e.compareRangesUsingStarts);const[t,i]=r;s=e?t.getStartPosition():t.getEndPosition(),a=e?i.getEndPosition():i.getStartPosition()}s&&a&&i.push(new c.Y(s.lineNumber,s.column,a.lineNumber,a.column))})),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}_updateBrackets(){if("never"===this._matchBrackets)return;this._recomputeBrackets();let e=[],t=0;for(const i of this._lastBracketsData){let n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations=this._editor.deltaDecorations(this._decorations,e)}_recomputeBrackets(){if(!this._editor.hasModel())return this._lastBracketsData=[],void(this._lastVersionId=0);const e=this._editor.getSelections();if(e.length>100)return this._lastBracketsData=[],void(this._lastVersionId=0);const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);let o=[],r=0;for(let t=0,i=e.length;t1&&o.sort(a.L.compare);let s=[],l=0,c=0,u=n.length;for(let e=0,i=o.length;e{const i=e.getColor(g.TC);i&&t.addRule(`.monaco-editor .bracket-match { background-color: ${i}; }`);const n=e.getColor(g.Dl);n&&t.addRule(`.monaco-editor .bracket-match { border: 1px solid ${n}; }`)})),m.BH.appendMenuItem(m.eH.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:n.N({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2})},4594:(e,t,i)=>{"use strict";i.r(t);var n=i(3580),o=i(6830),r=i(9102),s=i(4314),a=i(3860);class l{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const i=this._selection.startLineNumber,n=this._selection.startColumn,o=this._selection.endColumn;if((!this._isMovingLeft||1!==n)&&(this._isMovingLeft||o!==e.getLineMaxColumn(i)))if(this._isMovingLeft){const r=new s.e(i,n-1,i,n),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new s.e(i,o,i,o),a)}else{const r=new s.e(i,o,i,o+1),a=e.getValueInRange(r);t.addEditOperation(r,null),t.addEditOperation(new s.e(i,n,i,n),a)}}computeCursorState(e,t){return this._isMovingLeft?new a.Y(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new a.Y(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class c extends o.R6{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;let i=[],n=t.getSelections();for(const e of n)i.push(new l(e,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}(0,o.Qr)(class extends c{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:n.N("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:r.u.writable})}}),(0,o.Qr)(class extends c{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:n.N("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:r.u.writable})}})},7847:(e,t,i)=>{"use strict";i.r(t);var n=i(3580),o=i(6830),r=i(1329),s=i(4314),a=i(9102),l=i(8784);class c extends o.R6{constructor(){super({id:"editor.action.transposeLetters",label:n.N("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:a.u.writable,kbOpts:{kbExpr:a.u.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let i=t.getModel(),n=[],o=t.getSelections();for(let e of o){if(!e.isEmpty())continue;let t=e.startLineNumber,o=e.startColumn,a=i.getLineMaxColumn(t);if(1===t&&(1===o||2===o&&2===a))continue;let c=o===a?e.getPosition():l.o.rightPosition(i,e.getPosition().lineNumber,e.getPosition().column),u=l.o.leftPosition(i,c),h=l.o.leftPosition(i,u),d=i.getValueInRange(s.e.fromPositions(h,u)),g=i.getValueInRange(s.e.fromPositions(u,c)),f=s.e.fromPositions(h,c);n.push(new r.T4(f,g+d))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}(0,o.Qr)(c)},2015:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CutAction:()=>_,CopyAction:()=>v,PasteAction:()=>b});var n=i(3580),o=i(6268),r=i(1432),s=i(5715),a=i(6830),l=i(1640),c=i(9102),u=i(4144),h=i(4972);const d="9_cutcopypaste",g=r.tY||document.queryCommandSupported("cut"),f=r.tY||document.queryCommandSupported("copy"),p=void 0!==navigator.clipboard&&!o.vU||document.queryCommandSupported("paste");function m(e){return e.register(),e}const _=g?m(new a.AJ({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:r.tY?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:u.eH.MenubarEditMenu,group:"2_ccp",title:n.N({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:u.eH.EditorContext,group:d,title:n.N("actions.clipboard.cutLabel","Cut"),when:c.u.writable,order:1},{menuId:u.eH.CommandPalette,group:"",title:n.N("actions.clipboard.cutLabel","Cut"),order:1},{menuId:u.eH.SimpleEditorContext,group:d,title:n.N("actions.clipboard.cutLabel","Cut"),when:c.u.writable,order:1}]})):void 0,v=f?m(new a.AJ({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:r.tY?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:u.eH.MenubarEditMenu,group:"2_ccp",title:n.N({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:u.eH.EditorContext,group:d,title:n.N("actions.clipboard.copyLabel","Copy"),order:2},{menuId:u.eH.CommandPalette,group:"",title:n.N("actions.clipboard.copyLabel","Copy"),order:1},{menuId:u.eH.SimpleEditorContext,group:d,title:n.N("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;u.BH.appendMenuItem(u.eH.MenubarEditMenu,{submenu:u.eH.MenubarCopy,title:{value:n.N("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3}),u.BH.appendMenuItem(u.eH.EditorContext,{submenu:u.eH.EditorContextCopy,title:{value:n.N("copy as","Copy As"),original:"Copy As"},group:d,order:3});const b=p?m(new a.AJ({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:r.tY?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:u.eH.MenubarEditMenu,group:"2_ccp",title:n.N({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:u.eH.EditorContext,group:d,title:n.N("actions.clipboard.pasteLabel","Paste"),when:c.u.writable,order:4},{menuId:u.eH.CommandPalette,group:"",title:n.N("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:u.eH.SimpleEditorContext,group:d,title:n.N("actions.clipboard.pasteLabel","Paste"),when:c.u.writable,order:4}]})):void 0;class y extends a.R6{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:n.N("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:c.u.textInputFocus,primary:0,weight:100}})}run(e,t){t.hasModel()&&(!t.getOption(30)&&t.getSelection().isEmpty()||(s.RA.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),s.RA.forceCopyWithSyntaxHighlighting=!1))}}function w(e,t){e&&(e.addImplementation(1e4,"code-editor",((e,i)=>{const n=e.get(l.$).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const e=n.getOption(30),i=n.getSelection();return i&&i.isEmpty()&&!e||document.execCommand(t),!0}return!1})),e.addImplementation(0,"generic-dom",((e,i)=>(document.execCommand(t),!0))))}w(_,"cut"),w(v,"copy"),b&&(b.addImplementation(1e4,"code-editor",((e,t)=>{const i=e.get(l.$),n=e.get(h.p),o=i.getFocusedCodeEditor();return!(!o||!o.hasTextFocus())&&!(!document.execCommand("paste")&&r.$L&&(a=void 0,c=void 0,u=void 0,d=function*(){const e=yield n.readText();if(""!==e){const t=s.Nl.INSTANCE.get(e);let i=!1,n=null,r=null;t&&(i=o.getOption(30)&&!!t.isFromEmptySelection,n=void 0!==t.multicursorText?t.multicursorText:null,r=t.mode),o.trigger("keyboard","paste",{text:e,pasteOnNewLine:i,multicursorText:n,mode:r})}},new(u||(u=Promise))((function(e,t){function i(e){try{o(d.next(e))}catch(e){t(e)}}function n(e){try{o(d.throw(e))}catch(e){t(e)}}function o(t){var o;t.done?e(t.value):(o=t.value,o instanceof u?o:new u((function(e){e(o)}))).then(i,n)}o((d=d.apply(a,c||[])).next())})),0));var a,c,u,d})),b.addImplementation(0,"generic-dom",((e,t)=>(document.execCommand("paste"),!0)))),f&&(0,a.Qr)(y)},1907:(e,t,i)=>{"use strict";i.d(t,{RB:()=>_,Bb:()=>v,MN:()=>b,uH:()=>y,TM:()=>w,bA:()=>C,aI:()=>k});var n=i(9488),o=i(1050),r=i(7301),s=i(5976),a=i(666),l=i(9925),c=i(4314),u=i(3860),h=i(4101),d=i(1200),g=i(9532),f=i(535),p=i(4565),m=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const _="editor.action.codeAction",v="editor.action.refactor",b="editor.action.sourceAction",y="editor.action.organizeImports",w="editor.action.fixAll";class C{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return m(this,void 0,void 0,(function*(){if((null===(t=this.provider)||void 0===t?void 0:t.resolveCodeAction)&&!this.action.edit){let t;try{t=yield this.provider.resolveCodeAction(this.action,e)}catch(e){(0,r.Cp)(e)}t&&(this.action.edit=t.edit)}return this}))}}class S extends s.JT{constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(S.codeActionsComparator),this.validActions=this.allActions.filter((({action:e})=>!e.disabled))}static codeActionsComparator({action:e},{action:t}){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:(0,n.Of)(e.diagnostics)?(0,n.Of)(t.diagnostics)?e.diagnostics[0].message.localeCompare(t.diagnostics[0].message):-1:(0,n.Of)(t.diagnostics)?1:0}get hasAutoFix(){return this.validActions.some((({action:e})=>!!e.kind&&g.yN.QuickFix.contains(new g.yN(e.kind))&&!!e.isPreferred))}}const x={actions:[],documentation:void 0};function k(e,t,i,o,a){var c;const u=i.filter||{},d={only:null===(c=u.include)||void 0===c?void 0:c.value,trigger:i.type},f=new l.YQ(e,a),p=function(e,t){return h.H9.all(e).filter((e=>!e.providedCodeActionKinds||e.providedCodeActionKinds.some((e=>(0,g.EU)(t,new g.yN(e))))))}(e,u),_=new s.SL,v=p.map((i=>m(this,void 0,void 0,(function*(){try{o.report(i);const n=yield i.provideCodeActions(e,t,d,f.token);if(n&&_.add(n),f.token.isCancellationRequested)return x;const r=((null==n?void 0:n.actions)||[]).filter((e=>e&&(0,g.Yl)(u,e))),s=function(e,t,i){if(!e.documentation)return;const n=e.documentation.map((e=>({kind:new g.yN(e.kind),command:e.command})));if(i){let e;for(const t of n)t.kind.contains(i)&&(e?e.kind.contains(t.kind)&&(e=t):e=t);if(e)return null==e?void 0:e.command}for(const e of t)if(e.kind)for(const t of n)if(t.kind.contains(new g.yN(e.kind)))return t.command}(i,r,u.include);return{actions:r.map((e=>new C(e,i))),documentation:s}}catch(e){if((0,r.VV)(e))throw e;return(0,r.Cp)(e),x}})))),b=h.H9.onDidChange((()=>{const t=h.H9.all(e);(0,n.fS)(t,p)||f.cancel()}));return Promise.all(v).then((e=>{const t=(0,n.xH)(e.map((e=>e.actions))),i=(0,n.kX)(e.map((e=>e.documentation)));return new S(t,i,_)})).finally((()=>{b.dispose(),f.dispose()}))}p.P.registerCommand("_executeCodeActionProvider",(function(e,t,i,n,s){return m(this,void 0,void 0,(function*(){if(!(t instanceof a.o))throw(0,r.b1)();const l=e.get(d.q).getModel(t);if(!l)throw(0,r.b1)();const h=u.Y.isISelection(i)?u.Y.liftSelection(i):c.e.isIRange(i)?l.validateRange(i):void 0;if(!h)throw(0,r.b1)();const p="string"==typeof n?new g.yN(n):void 0,m=yield k(l,h,{type:1,filter:{includeSourceActions:!0,include:p}},f.E.None,o.T.None),_=[],v=Math.min(m.validActions.length,"number"==typeof s?s:0);for(let e=0;ee.action))}finally{setTimeout((()=>m.dispose()),100)}}))}))},3674:(e,t,i)=>{"use strict";i.d(t,{S5:()=>pe,dW:()=>ue,Hv:()=>fe,o$:()=>ge,E7:()=>ce,pY:()=>se,Eb:()=>he,VQ:()=>de});var n=i(1050);class o{constructor(e){this.executor=e,this._didRun=!1}getValue(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}var r=i(5976),s=i(7295),a=i(6830),l=i(6007),c=i(9102),u=i(1907),h=i(7301),d=i(2276),g=i(2065),f=i(5321),p=i(4741),m=i(187),_=i(4101),v=i(9532),b=i(5606),y=i(1847),w=function(e,t){return function(i,n){t(i,n,e)}};class C extends p.aU{constructor(e,t){super(e.command?e.command.id:e.title,e.title.replace(/\r\n|\r|\n/g," "),void 0,!e.disabled,t),this.action=e}}let S=class extends r.JT{constructor(e,t,i,n){super(),this._editor=e,this._delegate=t,this._contextMenuService=i,this._visible=!1,this._showingActions=this._register(new r.XK),this._keybindingResolver=new x({getKeybindings:()=>n.getKeybindings()})}get isVisible(){return this._visible}show(e,t,i,n){return o=this,r=void 0,a=function*(){const o=n.includeDisabledActions?t.allActions:t.validActions;if(!o.length)return void(this._visible=!1);if(!this._editor.getDomNode())throw this._visible=!1,(0,h.F0)();this._visible=!0,this._showingActions.value=t;const r=this.getMenuActions(e,o,t.documentation),s=m.L.isIPosition(i)?this._toCoords(i):i||{x:0,y:0},a=this._keybindingResolver.getResolver(),l=this._editor.getOption(112);this._contextMenuService.showContextMenu({domForShadowRoot:l?this._editor.getDomNode():void 0,getAnchor:()=>s,getActions:()=>r,onHide:()=>{this._visible=!1,this._editor.focus()},autoSelectFirstItem:!0,getKeyBinding:e=>e instanceof C?a(e.action):void 0})},new((s=void 0)||(s=Promise))((function(e,t){function i(e){try{l(a.next(e))}catch(e){t(e)}}function n(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var o;t.done?e(t.value):(o=t.value,o instanceof s?o:new s((function(e){e(o)}))).then(i,n)}l((a=a.apply(o,r||[])).next())}));var o,r,s,a}getMenuActions(e,t,i){var n,o;const r=e=>new C(e.action,(()=>this._delegate.onSelectCodeAction(e))),s=t.map(r),a=[...i],l=this._editor.getModel();if(l&&s.length)for(const i of _.H9.all(l))i._getAdditionalMenuItems&&a.push(...i._getAdditionalMenuItems({trigger:e.type,only:null===(o=null===(n=e.filter)||void 0===n?void 0:n.include)||void 0===o?void 0:o.value},t.map((e=>e.action))));return a.length&&s.push(new p.Z0,...a.map((e=>r(new u.bA({title:e.title,command:e},void 0))))),s}_toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),i=(0,f.i)(this._editor.getDomNode());return{x:i.left+t.left,y:i.top+t.top+t.height}}};S=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([w(2,b.i),w(3,y.d)],S);class x{constructor(e){this._keybindingProvider=e}getResolver(){const e=new o((()=>this._keybindingProvider.getKeybindings().filter((e=>x.codeActionCommands.indexOf(e.command)>=0)).filter((e=>e.resolvedKeybinding)).map((e=>{let t=e.commandArgs;return e.command===u.uH?t={kind:v.yN.SourceOrganizeImports.value}:e.command===u.TM&&(t={kind:v.yN.SourceFixAll.value}),Object.assign({resolvedKeybinding:e.resolvedKeybinding},v.wZ.fromUser(t,{kind:v.yN.None,apply:"never"}))}))));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.getValue());return null==i?void 0:i.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new v.yN(e.kind);return t.filter((e=>e.kind.contains(i))).filter((t=>!t.preferred||e.isPreferred)).reduceRight(((e,t)=>e?e.kind.contains(t.kind)?t:e:t),void 0)}}x.codeActionCommands=[u.Bb,u.RB,u.MN,u.uH,u.TM];var k,D=i(7974),L=i(4669),N=i(3411),E=i(3580),A=i(7781),M=i(3910),I=i(553),T=i(3046);!function(e){e.Hidden={type:0},e.Showing=class{constructor(e,t,i,n){this.actions=e,this.trigger=t,this.editorPosition=i,this.widgetPosition=n,this.type=1}}}(k||(k={}));let R=class e extends r.JT{constructor(e,t,i,n){super(),this._editor=e,this._quickFixActionId=t,this._preferredFixActionId=i,this._keybindingService=n,this._onClick=this._register(new L.Q5),this.onClick=this._onClick.event,this._state=k.Hidden,this._domNode=document.createElement("div"),this._domNode.className=T.lA.lightBulb.classNames,this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent((e=>{const t=this._editor.getModel();(1!==this.state.type||!t||this.state.editorPosition.lineNumber>=t.getLineCount())&&this.hide()}))),I.o.ignoreTarget(this._domNode),this._register(f.Gw(this._domNode,(e=>{if(1!==this.state.type)return;this._editor.focus(),e.preventDefault();const{top:t,height:i}=f.i(this._domNode),n=this._editor.getOption(56);let o=Math.floor(n/3);null!==this.state.widgetPosition.position&&this.state.widgetPosition.position.lineNumber{if(1!=(1&e.buttons))return;this.hide();const t=new D.Z;t.startMonitoring(e.target,e.buttons,D.e,(()=>{}),(()=>{t.dispose()}))}))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(54)&&!this._editor.getOption(54).enabled&&this.hide()}))),this._updateLightBulbTitleAndIcon(),this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon,this))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return 1===this._state.type?this._state.widgetPosition:null}update(t,i,n){if(t.validActions.length<=0)return this.hide();const o=this._editor.getOptions();if(!o.get(54).enabled)return this.hide();const r=this._editor.getModel();if(!r)return this.hide();const{lineNumber:s,column:a}=r.validatePosition(n),l=r.getOptions().tabSize,c=o.get(40),u=r.getLineContent(s),h=N.yO.computeIndentLevel(u,l),d=e=>e>2&&this._editor.getTopForLineNumber(e)===this._editor.getTopForLineNumber(e-1);let g=s;if(!(c.spaceWidth*h>22))if(s>1&&!d(s-1))g-=1;else if(d(s+1)){if(a*c.spaceWidth<22)return this.hide()}else g+=1;this.state=new k.Showing(t,i,n,{position:{lineNumber:g,column:1},preference:e._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state=k.Hidden,this._editor.layoutContentWidget(this)}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(1===this.state.type&&this.state.actions.hasAutoFix){this._domNode.classList.remove(...T.lA.lightBulb.classNamesArray),this._domNode.classList.add(...T.lA.lightbulbAutofix.classNamesArray);const e=this._keybindingService.lookupKeybinding(this._preferredFixActionId);if(e)return void(this.title=E.N("prefferedQuickFixWithKb","Show Fixes. Preferred Fix Available ({0})",e.getLabel()))}this._domNode.classList.remove(...T.lA.lightbulbAutofix.classNamesArray),this._domNode.classList.add(...T.lA.lightBulb.classNamesArray);const e=this._keybindingService.lookupKeybinding(this._quickFixActionId);this.title=e?E.N("quickFixWithKb","Show Fixes ({0})",e.getLabel()):E.N("quickFix","Show Fixes")}set title(e){this._domNode.title=e}};var O,F;R._posPref=[0],R=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(O=3,F=y.d,function(e,t){F(e,t,O)})],R),(0,A.Ic)(((e,t)=>{var i;const n=null===(i=e.getColor(M.cv))||void 0===i?void 0:i.transparent(.7),o=e.getColor(M.Fu);o&&t.addRule(`\n\t\t.monaco-editor .contentWidgets ${T.lA.lightBulb.cssSelector} {\n\t\t\tcolor: ${o};\n\t\t\tbackground-color: ${n};\n\t\t}`);const r=e.getColor(M.sK);r&&t.addRule(`\n\t\t.monaco-editor .contentWidgets ${T.lA.lightbulbAutofix.cssSelector} {\n\t\t\tcolor: ${r};\n\t\t\tbackground-color: ${n};\n\t\t}`)}));var P,B=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};let z=class extends r.JT{constructor(e,t,i,n,s){super(),this._editor=e,this.delegate=n,this._activeCodeActions=this._register(new r.XK),P.set(this,!1),this._codeActionWidget=new o((()=>this._register(s.createInstance(S,this._editor,{onSelectCodeAction:e=>B(this,void 0,void 0,(function*(){this.delegate.applyCodeAction(e,!0)}))})))),this._lightBulbWidget=new o((()=>{const e=this._register(s.createInstance(R,this._editor,t,i));return this._register(e.onClick((e=>this.showCodeActionList(e.trigger,e.actions,e,{includeDisabledActions:!1})))),e}))}dispose(){(function(e,t,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?o.call(e,i):o?o.value=i:t.set(e,i)})(this,P,!0,"f"),super.dispose()}update(e){var t,i,n;return B(this,void 0,void 0,(function*(){if(1!==e.type)return void(null===(t=this._lightBulbWidget.rawValue)||void 0===t||t.hide());let o;try{o=yield e.actions}catch(e){return void(0,h.dL)(e)}if(!function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)}(this,P,"f"))if(this._lightBulbWidget.getValue().update(o,e.trigger,e.position),1===e.trigger.type){if(null===(i=e.trigger.filter)||void 0===i?void 0:i.include){const t=this.tryGetValidActionToApply(e.trigger,o);if(t){try{yield this.delegate.applyCodeAction(t,!1)}finally{o.dispose()}return}if(e.trigger.context){const t=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,o);if(t&&t.action.disabled)return d.O.get(this._editor).showMessage(t.action.disabled,e.trigger.context.position),void o.dispose()}}const t=!!(null===(n=e.trigger.filter)||void 0===n?void 0:n.include);if(e.trigger.context&&(!o.allActions.length||!t&&!o.validActions.length))return d.O.get(this._editor).showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=o,void o.dispose();this._activeCodeActions.value=o,this._codeActionWidget.getValue().show(e.trigger,o,e.position,{includeDisabledActions:t})}else this._codeActionWidget.getValue().isVisible?o.dispose():this._activeCodeActions.value=o}))}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length)return"first"===e.autoApply&&0===t.validActions.length||"ifSingle"===e.autoApply&&1===t.allActions.length?t.allActions.find((({action:e})=>e.disabled)):void 0}tryGetValidActionToApply(e,t){if(t.validActions.length)return"first"===e.autoApply&&t.validActions.length>0||"ifSingle"===e.autoApply&&1===t.validActions.length?t.validActions[0]:void 0}showCodeActionList(e,t,i,n){return B(this,void 0,void 0,(function*(){this._codeActionWidget.getValue().show(e,t,i,n)}))}};P=new WeakMap,z=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([function(e,t){return function(i,n){t(i,n,e)}}(4,g.TG)],z);var W,V=i(4565),H=i(8819),$=i(8674),U=i(9422),j=i(535),q=i(829),K=i(5393),G=i(5935),Y=i(4314),Z=function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)};const X=new H.uy("supportedCodeAction","");class Q extends r.JT{constructor(e,t,i,n=250){super(),this._editor=e,this._markerService=t,this._signalChange=i,this._delay=n,this._autoTriggerTimer=this._register(new K._F),this._register(this._markerService.onMarkerChanged((e=>this._onMarkerChanges(e)))),this._register(this._editor.onDidChangeCursorPosition((()=>this._onCursorChange())))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);return this._createEventAndSignalChange(e,t)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some((e=>(0,G.Xy)(e,t.uri)))&&this._autoTriggerTimer.cancelAndSet((()=>{this.trigger({type:2})}),this._delay)}_onCursorChange(){this._autoTriggerTimer.cancelAndSet((()=>{this.trigger({type:2})}),this._delay)}_getRangeOfMarker(e){const t=this._editor.getModel();if(t)for(const i of this._markerService.read({resource:t.uri})){const n=t.validateRange(i);if(Y.e.intersectRanges(n,e))return Y.e.lift(n)}}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=this._editor.getSelection();if(i.isEmpty()&&2===e.type){const{lineNumber:e,column:n}=i.getPosition(),o=t.getLineContent(e);if(0===o.length)return;if(1===n){if(/\s/.test(o[0]))return}else if(n===t.getLineMaxColumn(e)){if(/\s/.test(o[o.length-1]))return}else if(/\s/.test(o[n-2])&&/\s/.test(o[n-1]))return}return i}_createEventAndSignalChange(e,t){const i=this._editor.getModel();if(!t||!i)return void this._signalChange(void 0);const n=this._getRangeOfMarker(t),o=n?n.getStartPosition():t.getStartPosition(),r={trigger:e,selection:t,position:o};return this._signalChange(r),r}}var J;!function(e){e.Empty={type:0},e.Triggered=class{constructor(e,t,i,n){this.trigger=e,this.rangeOrSelection=t,this.position=i,this._cancellablePromise=n,this.type=1,this.actions=n.catch((e=>{if((0,h.VV)(e))return ee;throw e}))}cancel(){this._cancellablePromise.cancel()}}}(J||(J={}));const ee={allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1};class te extends r.JT{constructor(e,t,i,n){super(),this._editor=e,this._markerService=t,this._progressService=n,this._codeActionOracle=this._register(new r.XK),this._state=J.Empty,this._onDidChangeState=this._register(new L.Q5),this.onDidChangeState=this._onDidChangeState.event,W.set(this,!1),this._supportedCodeActions=X.bindTo(i),this._register(this._editor.onDidChangeModel((()=>this._update()))),this._register(this._editor.onDidChangeModelLanguage((()=>this._update()))),this._register(_.H9.onDidChange((()=>this._update()))),this._update()}dispose(){Z(this,W,"f")||(function(e,t,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?o.call(e,i):o?o.value=i:t.set(e,i)}(this,W,!0,"f"),super.dispose(),this.setState(J.Empty,!0))}_update(){if(Z(this,W,"f"))return;this._codeActionOracle.value=void 0,this.setState(J.Empty);const e=this._editor.getModel();if(e&&_.H9.has(e)&&!this._editor.getOption(78)){const t=[];for(const i of _.H9.all(e))Array.isArray(i.providedCodeActionKinds)&&t.push(...i.providedCodeActionKinds);this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new Q(this._editor,this._markerService,(t=>{var i;if(!t)return void this.setState(J.Empty);const n=(0,K.PG)((i=>(0,u.aI)(e,t.selection,t.trigger,j.E.None,i)));1===t.trigger.type&&(null===(i=this._progressService)||void 0===i||i.showWhile(n,250)),this.setState(new J.Triggered(t.trigger,t.selection,t.position,n))}),void 0),this._codeActionOracle.value.trigger({type:2})}else this._supportedCodeActions.reset()}trigger(e){this._codeActionOracle.value&&this._codeActionOracle.value.trigger(e)}setState(e,t){e!==this._state&&(1===this._state.type&&this._state.cancel(),this._state=e,t||Z(this,W,"f")||this._onDidChangeState.fire(e))}}W=new WeakMap;var ie=function(e,t){return function(i,n){t(i,n,e)}},ne=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function oe(e){return H.Ao.regex(X.keys()[0],new RegExp("(\\s|^)"+(0,s.ec)(e.value)+"\\b"))}const re={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:E.N("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:E.N("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[E.N("args.schema.apply.first","Always apply the first returned code action."),E.N("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),E.N("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:E.N("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};let se=class e extends r.JT{constructor(e,t,i,n,r){super(),this._instantiationService=r,this._editor=e,this._model=this._register(new te(this._editor,t,i,n)),this._register(this._model.onDidChangeState((e=>this.update(e)))),this._ui=new o((()=>this._register(new z(e,ce.Id,pe.Id,{applyCodeAction:(e,t)=>ne(this,void 0,void 0,(function*(){try{yield this._applyCodeAction(e)}finally{t&&this._trigger({type:2,filter:{}})}}))},this._instantiationService))))}static get(t){return t.getContribution(e.ID)}update(e){this._ui.getValue().update(e)}showCodeActions(e,t,i){return this._ui.getValue().showCodeActionList(e,t,i,{includeDisabledActions:!1})}manualTriggerAtCurrentPosition(e,t,i){if(!this._editor.hasModel())return;d.O.get(this._editor).closeMessage();const n=this._editor.getPosition();this._trigger({type:1,filter:t,autoApply:i,context:{notAvailableMessage:e,position:n}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e){return this._instantiationService.invokeFunction(ae,e,this._editor)}};function ae(e,t,i){return ne(this,void 0,void 0,(function*(){const o=e.get(l.vu),r=e.get(V.H),s=e.get(q.b),a=e.get(U.lT);if(s.publicLog2("codeAction.applyCodeAction",{codeActionTitle:t.action.title,codeActionKind:t.action.kind,codeActionIsPreferred:!!t.action.isPreferred}),yield t.resolve(n.T.None),t.action.edit&&(yield o.apply(l.fo.convert(t.action.edit),{editor:i,label:t.action.title})),t.action.command)try{yield r.executeCommand(t.action.command.id,...t.action.command.arguments||[])}catch(e){const t=function(e){return"string"==typeof e?e:e instanceof Error&&"string"==typeof e.message?e.message:void 0}(e);a.error("string"==typeof t?t:E.N("applyCodeActionFailed","An unknown error occurred while applying the code action"))}}))}function le(e,t,i,n){if(e.hasModel()){const o=se.get(e);o&&o.manualTriggerAtCurrentPosition(t,i,n)}}se.ID="editor.contrib.quickFixController",se=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([ie(1,$.lT),ie(2,H.i6),ie(3,j.e),ie(4,g.TG)],se);class ce extends a.R6{constructor(){super({id:ce.Id,label:E.N("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:H.Ao.and(c.u.writable,c.u.hasCodeActionsProvider),kbOpts:{kbExpr:c.u.editorTextFocus,primary:2132,weight:100}})}run(e,t){return le(t,E.N("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0)}}ce.Id="editor.action.quickFix";class ue extends a._l{constructor(){super({id:u.RB,precondition:H.Ao.and(c.u.writable,c.u.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:re}]}})}runEditorCommand(e,t,i){const n=v.wZ.fromUser(i,{kind:v.yN.Empty,apply:"ifSingle"});return le(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?E.N("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",i.kind):E.N("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",i.kind):n.preferred?E.N("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):E.N("editor.action.codeAction.noneMessage","No code actions available"),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}class he extends a.R6{constructor(){super({id:u.Bb,label:E.N("refactor.label","Refactor..."),alias:"Refactor...",precondition:H.Ao.and(c.u.writable,c.u.hasCodeActionsProvider),kbOpts:{kbExpr:c.u.editorTextFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:H.Ao.and(c.u.writable,oe(v.yN.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:re}]}})}run(e,t,i){const n=v.wZ.fromUser(i,{kind:v.yN.Refactor,apply:"never"});return le(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?E.N("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",i.kind):E.N("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",i.kind):n.preferred?E.N("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):E.N("editor.action.refactor.noneMessage","No refactorings available"),{include:v.yN.Refactor.contains(n.kind)?n.kind:v.yN.None,onlyIncludePreferredActions:n.preferred},n.apply)}}class de extends a.R6{constructor(){super({id:u.MN,label:E.N("source.label","Source Action..."),alias:"Source Action...",precondition:H.Ao.and(c.u.writable,c.u.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:H.Ao.and(c.u.writable,oe(v.yN.Source))},description:{description:"Source Action...",args:[{name:"args",schema:re}]}})}run(e,t,i){const n=v.wZ.fromUser(i,{kind:v.yN.Source,apply:"never"});return le(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?E.N("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",i.kind):E.N("editor.action.source.noneMessage.kind","No source actions for '{0}' available",i.kind):n.preferred?E.N("editor.action.source.noneMessage.preferred","No preferred source actions available"):E.N("editor.action.source.noneMessage","No source actions available"),{include:v.yN.Source.contains(n.kind)?n.kind:v.yN.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}class ge extends a.R6{constructor(){super({id:u.uH,label:E.N("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:H.Ao.and(c.u.writable,oe(v.yN.SourceOrganizeImports)),kbOpts:{kbExpr:c.u.editorTextFocus,primary:1581,weight:100}})}run(e,t){return le(t,E.N("editor.action.organize.noneMessage","No organize imports action available"),{include:v.yN.SourceOrganizeImports,includeSourceActions:!0},"ifSingle")}}class fe extends a.R6{constructor(){super({id:u.TM,label:E.N("fixAll.label","Fix All"),alias:"Fix All",precondition:H.Ao.and(c.u.writable,oe(v.yN.SourceFixAll))})}run(e,t){return le(t,E.N("fixAll.noneMessage","No fix all action available"),{include:v.yN.SourceFixAll,includeSourceActions:!0},"ifSingle")}}class pe extends a.R6{constructor(){super({id:pe.Id,label:E.N("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:H.Ao.and(c.u.writable,oe(v.yN.QuickFix)),kbOpts:{kbExpr:c.u.editorTextFocus,primary:1620,mac:{primary:2644},weight:100}})}run(e,t){return le(t,E.N("editor.action.autoFix.noneMessage","No auto fixes available"),{include:v.yN.QuickFix,onlyIncludePreferredActions:!0},"ifSingle")}}pe.Id="editor.action.autoFix"},9093:(e,t,i)=>{"use strict";i.r(t);var n=i(6830),o=i(3674);(0,n._K)(o.pY.ID,o.pY),(0,n.Qr)(o.E7),(0,n.Qr)(o.Eb),(0,n.Qr)(o.VQ),(0,n.Qr)(o.o$),(0,n.Qr)(o.S5),(0,n.Qr)(o.Hv),(0,n.fK)(new o.dW)},9532:(e,t,i)=>{"use strict";i.d(t,{yN:()=>n,EU:()=>o,Yl:()=>r,wZ:()=>a});class n{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||""===this.value||e.value.startsWith(this.value+n.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new n(this.value+n.sep+e)}}function o(e,t){return!(e.include&&!e.include.intersects(t)||e.excludes&&e.excludes.some((i=>s(t,i,e.include)))||!e.includeSourceActions&&n.Source.contains(t))}function r(e,t){const i=t.kind?new n(t.kind):void 0;return!(!(!e.include||i&&e.include.contains(i))||e.excludes&&i&&e.excludes.some((t=>s(i,t,e.include)))||!e.includeSourceActions&&i&&n.Source.contains(i)||e.onlyIncludePreferredActions&&!t.isPreferred)}function s(e,t,i){return!(!t.contains(e)||i&&t.contains(i))}n.sep=".",n.None=new n("@@none@@"),n.Empty=new n(""),n.QuickFix=new n("quickfix"),n.Refactor=new n("refactor"),n.Source=new n("source"),n.SourceOrganizeImports=n.Source.append("organizeImports"),n.SourceFixAll=n.Source.append("fixAll");class a{constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}static fromUser(e,t){return e&&"object"==typeof e?new a(a.getKindFromUser(e,t.kind),a.getApplyFromUser(e,t.apply),a.getPreferredUser(e)):new a(t.kind,t.apply,!1)}static getApplyFromUser(e,t){switch("string"==typeof e.apply?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return"string"==typeof e.kind?new n(e.kind):t}static getPreferredUser(e){return"boolean"==typeof e.preferred&&e.preferred}}},3832:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CodeLensContribution:()=>j});var n=i(5393),o=i(7301),r=i(5976),s=i(9925),a=i(6830),l=i(4101),c=i(1050),u=i(666),h=i(1200),d=i(4565),g=i(8401),f=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class p{constructor(){this.lenses=[],this._disposables=new r.SL}dispose(){this._disposables.dispose()}add(e,t){this._disposables.add(e);for(const i of e.lenses)this.lenses.push({symbol:i,provider:t})}}function m(e,t){return f(this,void 0,void 0,(function*(){const i=l.He.ordered(e),n=new Map,r=new p,s=i.map(((i,s)=>f(this,void 0,void 0,(function*(){n.set(i,s);try{const n=yield Promise.resolve(i.provideCodeLenses(e,t));n&&r.add(n,i)}catch(e){(0,o.Cp)(e)}}))));return yield Promise.all(s),r.lenses=r.lenses.sort(((e,t)=>e.symbol.range.startLineNumbert.symbol.range.startLineNumber?1:n.get(e.provider)n.get(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn?1:0)),r}))}d.P.registerCommand("_executeCodeLensProvider",(function(e,...t){let[i,n]=t;(0,g.p_)(u.o.isUri(i)),(0,g.p_)("number"==typeof n||!n);const s=e.get(h.q).getModel(i);if(!s)throw(0,o.b1)();const a=[],l=new r.SL;return m(s,c.T.None).then((e=>{l.add(e);let t=[];for(const i of e.lenses)null==n||Boolean(i.symbol.command)?a.push(i.symbol):n-- >0&&i.provider.resolveCodeLens&&t.push(Promise.resolve(i.provider.resolveCodeLens(s,i.symbol,c.T.None)).then((e=>a.push(e||i.symbol))));return Promise.all(t)})).then((()=>a)).finally((()=>{setTimeout((()=>l.dispose()),100)}))}));var _=i(5321),v=i(4314),b=i(3411),y=i(7869),w=i(3910),C=i(7781),S=i(6811);class x{constructor(e,t,i){this.afterLineNumber=e,this.heightInPx=t,this._onHeight=i,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){void 0===this._lastHeight?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}}class k{constructor(e,t,i){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id="codelens.widget-"+k._idPool++,this.updatePosition(i),this._domNode=document.createElement("span"),this._domNode.className=`codelens-decoration ${t}`}withCommands(e,t){this._commands.clear();let i=[],n=!1;for(let t=0;t{e.symbol.command&&l.push(e.symbol),n.addDecoration({range:e.symbol.range,options:b.qx.EMPTY},(e=>this._decorationIds[t]=e)),a=a?v.e.plusRange(a,e.symbol.range):v.e.lift(e.symbol.range)})),this._viewZone=new x(a.startLineNumber-1,r,s),this._viewZoneId=o.addZone(this._viewZone),l.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new k(this._editor,this._className,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t&&t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some(((e,t)=>{const i=this._editor.getModel().getDecorationRange(e),n=this._data[t].symbol;return!(!i||v.e.isEmpty(n.range)!==i.isEmpty())}))}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach(((e,i)=>{t.addDecoration({range:e.symbol.range,options:b.qx.EMPTY},(e=>this._decorationIds[i]=e))}))}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.domNode.hasAttribute("monaco-visible-view-zone"))return null;for(let t=0;t{const i=e.getColor(y.Yp);i&&(t.addRule(`.monaco-editor .codelens-decoration { color: ${i}; }`),t.addRule(`.monaco-editor .codelens-decoration .codicon { color: ${i}; }`));const n=e.getColor(w._Y);n&&(t.addRule(`.monaco-editor .codelens-decoration > a:hover { color: ${n} !important; }`),t.addRule(`.monaco-editor .codelens-decoration > a:hover .codicon { color: ${n} !important; }`))}));var N=i(9422),E=i(2065),A=i(5026),M=i(3702),I=i(6904),T=i(8289);const R=(0,E.yh)("ICodeLensCache");class O{constructor(e,t){this.lineCount=e,this.data=t}}let F=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new M.z6(20,.75),(0,n.To)((()=>e.remove("codelens/cache",1)));const t="codelens/cache2",i=e.get(t,1,"{}");this._deserialize(i),(0,T.I)(e.onWillSaveState)((i=>{i.reason===I.fk.SHUTDOWN&&e.store(t,this._serialize(),1,1)}))}put(e,t){const i=t.lenses.map((e=>{var t;return{range:e.symbol.range,command:e.symbol.command&&{id:"",title:null===(t=e.symbol.command)||void 0===t?void 0:t.title}}})),n=new p;n.add({lenses:i,dispose:()=>{}},this._fakeProvider);const o=new O(e.getLineCount(),n);this._cache.set(e.uri.toString(),o)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,i]of this._cache){const n=new Set;for(const e of i.data.lenses)n.add(e.symbol.range.startLineNumber);e[t]={lineCount:i.lineCount,lines:[...n.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const e in t){const i=t[e],n=[];for(const e of i.lines)n.push({range:new v.e(e,1,e,11)});const o=new p;o.add({lenses:n,dispose(){}},this._fakeProvider),this._cache.set(e,new O(i.lineCount,o))}}catch(e){}}};var P,B;F=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(P=0,B=I.Uy,function(e,t){B(e,t,P)})],F),(0,A.z)(R,F);var z=i(9954),W=i(1157),V=i(3580),H=i(9102),$=i(1036),U=function(e,t){return function(i,n){t(i,n,e)}};let j=class{constructor(e,t,i,o){this._editor=e,this._commandService=t,this._notificationService=i,this._codeLensCache=o,this._disposables=new r.SL,this._localToDispose=new r.SL,this._lenses=[],this._getCodeLensModelDelays=new $.Y(l.He,250,2500),this._oldCodeLensModels=new r.SL,this._resolveCodeLensesDelays=new $.Y(l.He,250,2500),this._resolveCodeLensesScheduler=new n.pY((()=>this._resolveCodeLensesInViewport()),this._resolveCodeLensesDelays.min),this._disposables.add(this._editor.onDidChangeModel((()=>this._onModelChange()))),this._disposables.add(this._editor.onDidChangeModelLanguage((()=>this._onModelChange()))),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(40)||e.hasChanged(14)||e.hasChanged(13))&&this._updateLensStyle(),e.hasChanged(12)&&this._onModelChange()}))),this._disposables.add(l.He.onDidChange(this._onModelChange,this)),this._onModelChange(),this._styleClassName="_"+(0,z.vp)(this._editor.getId()).toString(16),this._styleElement=_.dS(_.OO(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),null===(e=this._currentCodeLensModel)||void 0===e||e.dispose(),this._styleElement.remove()}_getLayoutInfo(){let e,t=this._editor.getOption(14);return!t||t<5?(t=.9*this._editor.getOption(42)|0,e=this._editor.getOption(56)):e=t*Math.max(1.3,this._editor.getOption(56)/this._editor.getOption(42))|0,{codeLensHeight:e,fontSize:t}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(13),n=this._editor.getOption(40),o=`--codelens-font-family${this._styleClassName}`,r=`--codelens-font-features${this._styleClassName}`;let s=`\n\t\t.monaco-editor .codelens-decoration.${this._styleClassName} { line-height: ${e}px; font-size: ${t}px; padding-right: ${Math.round(.5*t)}px; font-feature-settings: var(${r}) }\n\t\t.monaco-editor .codelens-decoration.${this._styleClassName} span.codicon { line-height: ${e}px; font-size: ${t}px; }\n\t\t`;i&&(s+=`.monaco-editor .codelens-decoration.${this._styleClassName} { font-family: var(${o})}`),this._styleElement.textContent=s,this._editor.getContainerDomNode().style.setProperty(o,null!=i?i:"inherit"),this._editor.getContainerDomNode().style.setProperty(r,n.fontFeatureSettings),this._editor.changeViewZones((t=>{for(let i of this._lenses)i.updateHeight(e,t)}))}_localDispose(){var e,t,i;null===(e=this._getCodeLensModelPromise)||void 0===e||e.cancel(),this._getCodeLensModelPromise=void 0,null===(t=this._resolveCodeLensesPromise)||void 0===t||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),null===(i=this._currentCodeLensModel)||void 0===i||i.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e)return;if(!this._editor.getOption(12))return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!l.He.has(e))return void(t&&this._localToDispose.add((0,n.Vg)((()=>{const i=this._codeLensCache.get(e);t===i&&(this._codeLensCache.delete(e),this._onModelChange())}),3e4)));for(const t of l.He.all(e))if("function"==typeof t.onDidChange){let e=t.onDidChange((()=>i.schedule()));this._localToDispose.add(e)}const i=new n.pY((()=>{var t;const r=Date.now();null===(t=this._getCodeLensModelPromise)||void 0===t||t.cancel(),this._getCodeLensModelPromise=(0,n.PG)((t=>m(e,t))),this._getCodeLensModelPromise.then((t=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=t,this._codeLensCache.put(e,t);const n=this._getCodeLensModelDelays.update(e,Date.now()-r);i.delay=n,this._renderCodeLensSymbols(t),this._resolveCodeLensesInViewport()}),o.dL)}),this._getCodeLensModelDelays.get(e));this._localToDispose.add(i),this._localToDispose.add((0,r.OF)((()=>this._resolveCodeLensesScheduler.cancel()))),this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{let i=[],n=-1;this._lenses.forEach((e=>{e.isValid()&&n!==e.getLineNumber()?(e.update(t),n=e.getLineNumber()):i.push(e)}));let o=new D;i.forEach((e=>{e.dispose(o,t),this._lenses.splice(this._lenses.indexOf(e),1)})),o.commit(e)}))})),i.schedule()}))),this._localToDispose.add(this._editor.onDidFocusEditorWidget((()=>{i.schedule()}))),this._localToDispose.add(this._editor.onDidScrollChange((e=>{e.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add(this._editor.onDidLayoutChange((()=>{this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add((0,r.OF)((()=>{if(this._editor.getModel()){const e=s.ZF.capture(this._editor);this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{this._disposeAllLenses(e,t)}))})),e.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)}))),this._localToDispose.add(this._editor.onMouseDown((e=>{if(9!==e.target.type)return;let t=e.target.element;if("SPAN"===(null==t?void 0:t.tagName)&&(t=t.parentElement),"A"===(null==t?void 0:t.tagName))for(const e of this._lenses){let i=e.getCommand(t);if(i){this._commandService.executeCommand(i.id,...i.arguments||[]).catch((e=>this._notificationService.error(e)));break}}}))),i.schedule()}_disposeAllLenses(e,t){const i=new D;for(const e of this._lenses)e.dispose(i,t);e&&i.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;let t,i=this._editor.getModel().getLineCount(),n=[];for(let o of e.lenses){let e=o.symbol.range.startLineNumber;e<1||e>i||(t&&t[t.length-1].symbol.range.startLineNumber===e?t.push(o):(t=[o],n.push(t)))}const o=s.ZF.capture(this._editor),r=this._getLayoutInfo();this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{const i=new D;let o=0,s=0;for(;sthis._resolveCodeLensesInViewportSoon()))),o++,s++)}for(;othis._resolveCodeLensesInViewportSoon()))),s++;i.commit(e)}))})),o.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;null===(e=this._resolveCodeLensesPromise)||void 0===e||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const i=[],r=[];if(this._lenses.forEach((e=>{const n=e.computeIfNecessary(t);n&&(i.push(n),r.push(e))})),0===i.length)return;const s=Date.now(),a=(0,n.PG)((e=>{const n=i.map(((i,n)=>{const s=new Array(i.length),a=i.map(((i,n)=>i.symbol.command||"function"!=typeof i.provider.resolveCodeLens?(s[n]=i.symbol,Promise.resolve(void 0)):Promise.resolve(i.provider.resolveCodeLens(t,i.symbol,e)).then((e=>{s[n]=e}),o.Cp)));return Promise.all(a).then((()=>{e.isCancellationRequested||r[n].isDisposed()||r[n].updateCommands(s)}))}));return Promise.all(n)}));this._resolveCodeLensesPromise=a,this._resolveCodeLensesPromise.then((()=>{const e=this._resolveCodeLensesDelays.update(t,Date.now()-s);this._resolveCodeLensesScheduler.delay=e,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),a===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}),(e=>{(0,o.dL)(e),a===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}))}getLenses(){return this._lenses}};j.ID="css.editor.codeLens",j=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([U(1,d.H),U(2,N.lT),U(3,R)],j),(0,a._K)(j.ID,j),(0,a.Qr)(class extends a.R6{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:H.u.hasCodeLensProvider,label:(0,V.N)("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return i=this,n=void 0,r=function*(){if(!t.hasModel())return;const i=e.get(W.eJ),n=e.get(d.H),o=e.get(N.lT),r=t.getSelection().positionLineNumber,s=t.getContribution(j.ID),a=[];for(let e of s.getLenses())if(e.getLineNumber()===r)for(let t of e.getItems()){const{command:e}=t.symbol;e&&a.push({label:e.title,command:e})}if(0===a.length)return;const l=yield i.pick(a,{canPickMany:!1});if(l)try{yield n.executeCommand(l.command.id,...l.command.arguments||[])}catch(e){o.error(e)}},new((o=void 0)||(o=Promise))((function(e,t){function s(e){try{l(r.next(e))}catch(e){t(e)}}function a(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(s,a)}l((r=r.apply(i,n||[])).next())}));var i,n,o,r}})},3308:(e,t,i)=>{"use strict";i.d(t,{E:()=>u,R:()=>h});var n=i(1050),o=i(7301),r=i(666),s=i(4314),a=i(4101),l=i(1200),c=i(4565);function u(e,t){const i=[],n=a.OH.ordered(e).reverse().map((n=>Promise.resolve(n.provideDocumentColors(e,t)).then((e=>{if(Array.isArray(e))for(let t of e)i.push({colorInfo:t,provider:n})}))));return Promise.all(n).then((()=>i))}function h(e,t,i,n){return Promise.resolve(i.provideColorPresentations(e,t,n))}c.P.registerCommand("_executeDocumentColorProvider",(function(e,...t){const[i]=t;if(!(i instanceof r.o))throw(0,o.b1)();const s=e.get(l.q).getModel(i);if(!s)throw(0,o.b1)();const c=[],u=a.OH.ordered(s).reverse().map((e=>Promise.resolve(e.provideDocumentColors(s,n.T.None)).then((e=>{if(Array.isArray(e))for(let t of e)c.push({range:t.range,color:[t.color.red,t.color.green,t.color.blue,t.color.alpha]})}))));return Promise.all(u).then((()=>c))})),c.P.registerCommand("_executeColorPresentationProvider",(function(e,...t){const[i,c]=t,{uri:u,range:h}=c;if(!(u instanceof r.o&&Array.isArray(i)&&4===i.length&&s.e.isIRange(h)))throw(0,o.b1)();const[d,g,f,p]=i,m=e.get(l.q).getModel(u);if(!m)throw(0,o.b1)();const _={range:h,color:{red:d,green:g,blue:f,alpha:p}},v=[],b=a.OH.ordered(m).reverse().map((e=>Promise.resolve(e.provideColorPresentations(m,_,n.T.None)).then((e=>{Array.isArray(e)&&v.push(...e)}))));return Promise.all(b).then((()=>v))}))},7956:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ColorContribution:()=>a}),i(4494);var n=i(5976),o=i(6830),r=i(7043),s=i(4314);class a extends n.JT{constructor(e){super(),this._editor=e,this._register(e.onMouseDown((e=>this.onMouseDown(e))))}dispose(){super.dispose()}onMouseDown(e){var t;if(6!==e.target.type)return;if(![...(null===(t=e.target.element)||void 0===t?void 0:t.classList.values())||[]].find((e=>e.startsWith("ced-colorBox"))))return;if(!e.target.range)return;const i=this._editor.getContribution(r.ModesHoverController.ID);if(!i.isColorPickerVisible()){const t=new s.e(e.target.range.startLineNumber,e.target.range.startColumn+1,e.target.range.endLineNumber,e.target.range.endColumn+1);i.showContentHover(t,0,!1)}}}a.ID="editor.contrib.colorContribution",(0,o._K)(a.ID,a)},4494:(e,t,i)=>{"use strict";i.d(t,{i:()=>m});var n=i(5393),o=i(1264),r=i(7301),s=i(9954),a=i(5976),l=i(6830),c=i(1640),u=i(4314),h=i(3411),d=i(4101),g=i(3308),f=i(3108),p=function(e,t){return function(i,n){t(i,n,e)}};let m=class e extends a.JT{constructor(e,t,i){super(),this._editor=e,this._codeEditorService=t,this._configurationService=i,this._localToDispose=this._register(new a.SL),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=[],this._decorationsTypes=new Set,this._register(e.onDidChangeModel((()=>{this._isEnabled=this.isEnabled(),this.onModelChanged()}))),this._register(e.onDidChangeModelLanguage((()=>this.onModelChanged()))),this._register(d.OH.onDidChange((()=>this.onModelChanged()))),this._register(e.onDidChangeConfiguration((()=>{let e=this._isEnabled;this._isEnabled=this.isEnabled(),e!==this._isEnabled&&(this._isEnabled?this.onModelChanged():this.removeAllDecorations())}))),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageIdentifier(),i=this._configurationService.getValue(t.language);if(i){const e=i.colorDecorators;if(e&&void 0!==e.enable&&!e.enable)return e.enable}return this._editor.getOption(15)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}onModelChanged(){if(this.stop(),!this._isEnabled)return;const t=this._editor.getModel();t&&d.OH.has(t)&&(this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._timeoutTimer||(this._timeoutTimer=new n._F,this._timeoutTimer.cancelAndSet((()=>{this._timeoutTimer=null,this.beginCompute()}),e.RECOMPUTE_TIME))}))),this.beginCompute())}beginCompute(){this._computePromise=(0,n.PG)((e=>{const t=this._editor.getModel();return t?(0,g.E)(t,e):Promise.resolve([])})),this._computePromise.then((e=>{this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}),r.dL)}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map((e=>({range:{startLineNumber:e.colorInfo.range.startLineNumber,startColumn:e.colorInfo.range.startColumn,endLineNumber:e.colorInfo.range.endLineNumber,endColumn:e.colorInfo.range.endColumn},options:h.qx.EMPTY})));this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach(((t,i)=>this._colorDatas.set(t,e[i])))}updateColorDecorators(e){let t=[],i={};for(let n=0;n{i[e]||this._codeEditorService.removeDecorationType(e)})),this._colorDecoratorIds=this._editor.deltaDecorations(this._colorDecoratorIds,t)}removeAllDecorations(){this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,[]),this._colorDecoratorIds=this._editor.deltaDecorations(this._colorDecoratorIds,[]),this._decorationsTypes.forEach((e=>{this._codeEditorService.removeDecorationType(e)}))}getColorData(e){const t=this._editor.getModel();if(!t)return null;const i=t.getDecorationsInRange(u.e.fromPositions(e,e)).filter((e=>this._colorDatas.has(e.id)));return 0===i.length?null:this._colorDatas.get(i[0].id)}};m.ID="editor.contrib.colorDetector",m.RECOMPUTE_TIME=1e3,m=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([p(1,c.$),p(2,f.Ui)],m),(0,l._K)(m.ID,m)},9098:(e,t,i)=>{"use strict";i.r(t);var n=i(3580),o=i(2258),r=i(6830),s=i(4314),a=i(9102),l=i(9386),c=i(187),u=i(3860),h=i(3831);class d{constructor(e,t){this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,i){if(i<0)return!1;const n=t.length;if(i+n>e.length)return!1;for(let o=0;o=65&&n<=90&&n+32===r||r>=65&&r<=90&&r+32===n))return!1}return!0}_createOperationsForBlockComment(e,t,i,n,o,r){const a=e.startLineNumber,l=e.startColumn,c=e.endLineNumber,u=e.endColumn,h=o.getLineContent(a),g=o.getLineContent(c);let f,p=h.lastIndexOf(t,l-1+t.length),m=g.indexOf(i,u-1-i.length);if(-1!==p&&-1!==m)if(a===c)h.substring(p+t.length,m).indexOf(i)>=0&&(p=-1,m=-1);else{const e=h.substring(p+t.length),n=g.substring(0,m);(e.indexOf(i)>=0||n.indexOf(i)>=0)&&(p=-1,m=-1)}-1!==p&&-1!==m?(n&&p+t.length0&&32===g.charCodeAt(m-1)&&(i=" "+i,m-=1),f=d._createRemoveBlockCommentOperations(new s.e(a,p+t.length+1,c,m+1),t,i)):(f=d._createAddBlockCommentOperations(e,t,i,this._insertSpace),this._usedEndToken=1===f.length?i:null);for(const e of f)r.addTrackedEditOperation(e.range,e.text)}static _createRemoveBlockCommentOperations(e,t,i){let n=[];return s.e.isEmpty(e)?n.push(l.h.delete(new s.e(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+i.length))):(n.push(l.h.delete(new s.e(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),n.push(l.h.delete(new s.e(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),n}static _createAddBlockCommentOperations(e,t,i,n){let o=[];return s.e.isEmpty(e)?o.push(l.h.replace(new s.e(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+i)):(o.push(l.h.insert(new c.L(e.startLineNumber,e.startColumn),t+(n?" ":""))),o.push(l.h.insert(new c.L(e.endLineNumber,e.endColumn),(n?" ":"")+i))),o}getEditOperations(e,t){const i=this._selection.startLineNumber,n=this._selection.startColumn;e.tokenizeIfCheap(i);const o=e.getLanguageIdAtPosition(i,n),r=h.zu.getComments(o);r&&r.blockCommentStartToken&&r.blockCommentEndToken&&this._createOperationsForBlockComment(this._selection,r.blockCommentStartToken,r.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const i=t.getInverseEditOperations();if(2===i.length){const e=i[0],t=i[1];return new u.Y(e.range.endLineNumber,e.range.endColumn,t.range.startLineNumber,t.range.startColumn)}{const e=i[0].range,t=this._usedEndToken?-this._usedEndToken.length-1:0;return new u.Y(e.endLineNumber,e.endColumn+t,e.endLineNumber,e.endColumn+t)}}}var g=i(7295);class f{constructor(e,t,i,n,o,r){this._selection=e,this._tabSize=t,this._type=i,this._insertSpace=n,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=o,this._ignoreFirstLine=r||!1}static _gatherPreflightCommentStrings(e,t,i){e.tokenizeIfCheap(t);const n=e.getLanguageIdAtPosition(t,1),o=h.zu.getComments(n),r=o?o.lineCommentToken:null;if(!r)return null;let s=[];for(let e=0,n=i-t+1;es?o-1:o}}}var p=i(4144);class m extends r.R6{constructor(e,t){super(t),this._type=e}run(e,t){if(!t.hasModel())return;const i=[],n=t.getModel().getOptions(),o=t.getOption(17),r=t.getSelections().map(((e,t)=>({selection:e,index:t,ignoreFirstLine:!1})));r.sort(((e,t)=>s.e.compareRangesUsingStarts(e.selection,t.selection)));let a=r[0];for(let e=1;e{"use strict";i.r(t),i.d(t,{ContextMenuController:()=>m});var n=i(3580),o=i(5321),r=i(4741),s=i(5976),a=i(6830),l=i(9102),c=i(4144),u=i(8819),h=i(5606),d=i(1847),g=i(6033),f=i(1432),p=function(e,t){return function(i,n){t(i,n,e)}};let m=class e{constructor(e,t,i,n,r,a){this._contextMenuService=t,this._contextViewService=i,this._contextKeyService=n,this._keybindingService=r,this._menuService=a,this._toDispose=new s.SL,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu((e=>this._onContextMenu(e)))),this._toDispose.add(this._editor.onMouseWheel((e=>{if(this._contextMenuIsBeingShownCount>0){const t=this._contextViewService.getContextViewElement(),i=e.srcElement;i.shadowRoot&&o.Ay(t)===i.shadowRoot||this._contextViewService.hideContextView()}}))),this._toDispose.add(this._editor.onKeyDown((e=>{58===e.keyCode&&(e.preventDefault(),e.stopPropagation(),this.showContextMenu())})))}static get(t){return t.getContribution(e.ID)}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(18))return this._editor.focus(),void(e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position));if(12===e.target.type)return;if(e.event.preventDefault(),6!==e.target.type&&7!==e.target.type&&1!==e.target.type)return;if(this._editor.focus(),e.target.position){let t=!1;for(const i of this._editor.getSelections())if(i.containsPosition(e.target.position)){t=!0;break}t||this._editor.setPosition(e.target.position)}let t=null;1!==e.target.type&&(t={x:e.event.posx-1,width:2,y:e.event.posy-1,height:2}),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(18))return;if(!this._editor.hasModel())return;if(!this._contextMenuService)return void this._editor.focus();const t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?c.eH.SimpleEditorContext:c.eH.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const i=[],n=this._menuService.createMenu(t,this._contextKeyService),o=n.getActions({arg:e.uri});n.dispose();for(let t of o){const[,n]=t;let o=0;for(const t of n)if(t instanceof c.NZ){const n=this._getMenuActions(e,t.item.submenu);n.length>0&&(i.push(new r.wY(t.id,t.label,n)),o++)}else i.push(t),o++;o&&i.push(new r.Z0)}return i.length&&i.pop(),i}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const i=this._editor.getOption(50);if(this._editor.updateOptions({hover:{enabled:!1}}),!t){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const e=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),i=o.i(this._editor.getDomNode()),n=i.left+e.left,r=i.top+e.top+e.height;t={x:n,y:r}}const n=this._editor.getOption(112)&&!f.gn;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:n?this._editor.getDomNode():void 0,getAnchor:()=>t,getActions:()=>e,getActionViewItem:e=>{const t=this._keybindingFor(e);if(t)return new g.g(e,e,{label:!0,keybinding:t.getLabel(),isMenu:!0});const i=e;return"function"==typeof i.getActionViewItem?i.getActionViewItem():new g.g(e,e,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:e=>this._keybindingFor(e),onHide:e=>{this._contextMenuIsBeingShownCount--,this._editor.focus(),this._editor.updateOptions({hover:i})}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};m.ID="editor.contrib.contextmenu",m=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([p(1,h.i),p(2,h.u),p(3,u.i6),p(4,d.d),p(5,c.co)],m);class _ extends a.R6{constructor(){super({id:"editor.action.showContextMenu",label:n.N("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:l.u.textInputFocus,primary:1092,weight:100}})}run(e,t){m.get(t).showContextMenu()}}(0,a._K)(m.ID,m),(0,a.Qr)(_)},2834:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CursorUndoRedoController:()=>c,CursorUndo:()=>u,CursorRedo:()=>h});var n=i(3580),o=i(5976),r=i(6830),s=i(9102);class a{constructor(e){this.selections=e}equals(e){const t=this.selections.length;if(t!==e.selections.length)return!1;for(let i=0;i{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeModelContent((e=>{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeCursorSelection((t=>{if(this._isCursorUndoRedo)return;if(!t.oldSelections)return;if(t.oldModelVersionId!==t.modelVersionId)return;const i=new a(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new l(i,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())})))}static get(e){return e.getContribution(c.ID)}cursorUndo(){this._editor.hasModel()&&0!==this._undoStack.length&&(this._redoStack.push(new l(new a(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){this._editor.hasModel()&&0!==this._redoStack.length&&(this._undoStack.push(new l(new a(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}}c.ID="editor.contrib.cursorUndoRedoController";class u extends r.R6{constructor(){super({id:"cursorUndo",label:n.N("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:s.u.textInputFocus,primary:2099,weight:100}})}run(e,t,i){c.get(t).cursorUndo()}}class h extends r.R6{constructor(){super({id:"cursorRedo",label:n.N("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,i){c.get(t).cursorRedo()}}(0,r._K)(c.ID,c),(0,r.Qr)(u),(0,r.Qr)(h)},7441:(e,t,i)=>{"use strict";i.r(t),i.d(t,{DragAndDropController:()=>d});var n=i(5976),o=i(1432),r=i(6830),s=i(187),a=i(4314),l=i(3860);class c{constructor(e,t,i){this.selection=e,this.targetPosition=t,this.copy=i,this.targetSelection=null}getEditOperations(e,t){let i=e.getValueInRange(this.selection);this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new a.e(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),i),!this.selection.containsPosition(this.targetPosition)||this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition))?this.copy?this.targetSelection=new l.Y(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumber>this.selection.endLineNumber?this.targetSelection=new l.Y(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn):this.targetPosition.lineNumberthis._onEditorMouseDown(e)))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(e)))),this._register(this._editor.onMouseDrag((e=>this._onEditorMouseDrag(e)))),this._register(this._editor.onMouseDrop((e=>this._onEditorMouseDrop(e)))),this._register(this._editor.onMouseDropCanceled((()=>this._onEditorMouseDropCanceled()))),this._register(this._editor.onKeyDown((e=>this.onEditorKeyDown(e)))),this._register(this._editor.onKeyUp((e=>this.onEditorKeyUp(e)))),this._register(this._editor.onDidBlurEditorWidget((()=>this.onEditorBlur()))),this._register(this._editor.onDidBlurEditorText((()=>this.onEditorBlur()))),this._dndDecorationIds=[],this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){this._editor.getOption(29)&&!this._editor.getOption(16)&&(h(e)&&(this._modifierPressed=!0),this._mouseDown&&h(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){this._editor.getOption(29)&&!this._editor.getOption(16)&&(h(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===d.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){let t=e.target;if(null===this._dragSelection){let e=(this._editor.getSelections()||[]).filter((e=>t.position&&e.containsPosition(t.position)));if(1!==e.length)return;this._dragSelection=e[0]}h(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){let t=new s.L(e.target.position.lineNumber,e.target.position.column);if(null===this._dragSelection){let i=null;if(e.event.shiftKey){let e=this._editor.getSelection();if(e){const{selectionStartLineNumber:n,selectionStartColumn:o}=e;i=[new l.Y(n,o,t.lineNumber,t.column)]}}else i=(this._editor.getSelections()||[]).map((e=>e.containsPosition(t)?new l.Y(t.lineNumber,t.column,t.lineNumber,t.column):e));this._editor.setSelections(i||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(h(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(d.ID,new c(this._dragSelection,t,h(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){let t=[{range:new a.e(e.lineNumber,e.column,e.lineNumber,e.column),options:d._DECORATION_OPTIONS}];this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,t),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,[])}_hitContent(e){return 6===e.type||7===e.type}_hitMargin(e){return 2===e.type||3===e.type||4===e.type}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}d.ID="editor.contrib.dragAndDrop",d.TRIGGER_KEY_VALUE=o.dz?6:5,d._DECORATION_OPTIONS=u.qx.register({description:"dnd-target",className:"dnd-target"}),(0,r._K)(d.ID,d)},1372:(e,t,i)=>{"use strict";i.r(t),i.d(t,{getDocumentSymbols:()=>h});var n=i(666),o=i(1200),r=i(1050),s=i(8216),a=i(6895),l=i(4565),c=i(8401),u=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function h(e,t,i){return u(this,void 0,void 0,(function*(){const n=yield a.C3.create(e,i);return t?n.asListOfDocumentSymbols():n.getTopLevelSymbols()}))}l.P.registerCommand("_executeDocumentSymbolProvider",(function(e,...t){return u(this,void 0,void 0,(function*(){const[i]=t;(0,c.p_)(n.o.isUri(i));const a=e.get(o.q).getModel(i);if(a)return h(a,!1,r.T.None);const l=yield e.get(s.S).createModelReference(i);try{return yield h(l.object.textEditorModel,!1,r.T.None)}finally{l.dispose()}}))}))},6895:(e,t,i)=>{"use strict";i.d(t,{C3:()=>f});var n=i(9488),o=i(1050),r=i(7301),s=i(3702),a=i(4314),l=i(4101),c=i(3725),u=i(1036);class h{remove(){this.parent&&this.parent.children.delete(this.id)}static findId(e,t){let i;"string"==typeof e?i=`${t.id}/${e}`:(i=`${t.id}/${e.name}`,void 0!==t.children.get(i)&&(i=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let n=i;for(let e=0;void 0!==t.children.get(n);e++)n=`${i}_${e}`;return n}static empty(e){return 0===e.children.size}}class d extends h{constructor(e,t,i){super(),this.id=e,this.parent=t,this.symbol=i,this.children=new Map}}class g extends h{constructor(e,t,i,n){super(),this.id=e,this.parent=t,this.label=i,this.order=n,this.children=new Map}}class f extends h{constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}static create(e,t){let i=this._keys.for(e,!0),n=f._requests.get(i);if(!n){let t=new o.A;n={promiseCnt:0,source:t,promise:f._create(e,t.token),model:void 0},f._requests.set(i,n);const r=Date.now();n.promise.then((()=>{this._requestDurations.update(e,Date.now()-r)}))}return n.model?Promise.resolve(n.model):(n.promiseCnt+=1,t.onCancellationRequested((()=>{0==--n.promiseCnt&&(n.source.cancel(),f._requests.delete(i))})),new Promise(((e,t)=>{n.promise.then((t=>{n.model=t,e(t)}),(e=>{f._requests.delete(i),t(e)}))})))}static _create(e,t){const i=new o.A(t),s=new f(e.uri),a=l.vJ.ordered(e),c=a.map(((t,n)=>{var o;let a=h.findId(`provider_${n}`,s),l=new g(a,s,null!==(o=t.displayName)&&void 0!==o?o:"Unknown Outline Provider",n);return Promise.resolve(t.provideDocumentSymbols(e,i.token)).then((e=>{for(const t of e||[])f._makeOutlineElement(t,l);return l}),(e=>((0,r.Cp)(e),l))).then((e=>{h.empty(e)?e.remove():s._groups.set(a,e)}))})),u=l.vJ.onDidChange((()=>{const t=l.vJ.ordered(e);(0,n.fS)(t,a)||i.cancel()}));return Promise.all(c).then((()=>i.token.isCancellationRequested&&!t.isCancellationRequested?f._create(e,t):s._compact())).finally((()=>{u.dispose()}))}static _makeOutlineElement(e,t){let i=h.findId(e,t),n=new d(i,t,e);if(e.children)for(const t of e.children)f._makeOutlineElement(t,n);t.children.set(n.id,n)}_compact(){let e=0;for(const[t,i]of this._groups)0===i.children.size?this._groups.delete(t):e+=1;if(1!==e)this.children=this._groups;else{let e=c.$.first(this._groups.values());for(let[,t]of e.children)t.parent=this,this.children.set(t.id,t)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof d?e.push(t.symbol):e.push(...c.$.map(t.children.values(),(e=>e.symbol)));return e.sort(((e,t)=>a.e.compareRangesUsingStarts(e.range,t.range)))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return f._flattenDocumentSymbols(t,e,""),t.sort(((e,t)=>a.e.compareRangesUsingStarts(e.range,t.range)))}static _flattenDocumentSymbols(e,t,i){for(const n of t)e.push({kind:n.kind,tags:n.tags,name:n.name,detail:n.detail,containerName:n.containerName||i,range:n.range,selectionRange:n.selectionRange,children:void 0}),n.children&&f._flattenDocumentSymbols(e,n.children,n.name)}}f._requestDurations=new u.Y(l.vJ,350),f._requests=new s.z6(9,.75),f._keys=new class{constructor(){this._counter=1,this._data=new WeakMap}for(e,t){return`${e.id}/${t?e.getVersionId():""}/${this._hash(l.vJ.all(e))}`}_hash(e){let t="";for(const i of e){let e=this._data.get(i);void 0===e&&(e=this._counter++,this._data.set(i,e)),t+=e}return t}}},3391:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CommonFindController:()=>bt,FindController:()=>yt,MatchFindAction:()=>St,NextMatchFindAction:()=>xt,NextSelectionMatchFindAction:()=>Lt,PreviousMatchFindAction:()=>kt,PreviousSelectionMatchFindAction:()=>Nt,SelectionMatchFindAction:()=>Dt,StartFindAction:()=>wt,StartFindReplaceAction:()=>Et,StartFindWithSelectionAction:()=>Ct,getSelectionSearchString:()=>vt});var n=i(3580),o=i(5393),r=i(5976),s=i(7295),a=i(6830),l=i(9102),c=i(1329),u=i(187),h=i(4314),d=i(3860),g=i(7277),f=i(4973),p=i(3411),m=i(3910),_=i(7781);class v{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.deltaDecorations(this._allDecorations(),[]),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map((e=>this._editor.getModel().getDecorationRange(e))).filter((e=>!!e));if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getCurrentMatchesPosition(e){let t=this._editor.getModel().getDecorationsInRange(e);for(const e of t){const t=e.options;if(t===v._FIND_MATCH_DECORATION||t===v._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(e.id)}return 0}setCurrentFindMatch(e){let t=null,i=0;if(e)for(let n=0,o=this._decorations.length;n{if(null!==this._highlightedDecorationId&&(e.changeDecorationOptions(this._highlightedDecorationId,v._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),null!==t&&(this._highlightedDecorationId=t,e.changeDecorationOptions(this._highlightedDecorationId,v._CURRENT_FIND_MATCH_DECORATION)),null!==this._rangeHighlightDecorationId&&(e.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),null!==t){let i=this._editor.getModel().getDecorationRange(t);if(i.startLineNumber!==i.endLineNumber&&1===i.endColumn){let e=i.endLineNumber-1,t=this._editor.getModel().getLineMaxColumn(e);i=new h.e(i.startLineNumber,i.startColumn,e,t)}this._rangeHighlightDecorationId=e.addDecoration(i,v._RANGE_HIGHLIGHT_DECORATION)}})),i}set(e,t){this._editor.changeDecorations((i=>{let n=v._FIND_MATCH_DECORATION,o=[];if(e.length>1e3){n=v._FIND_MATCH_NO_OVERVIEW_DECORATION;const t=this._editor.getModel().getLineCount(),i=this._editor.getLayoutInfo().height/t,r=Math.max(2,Math.ceil(3/i));let s=e[0].range.startLineNumber,a=e[0].range.endLineNumber;for(let t=1,i=e.length;t=i.startLineNumber?i.endLineNumber>a&&(a=i.endLineNumber):(o.push({range:new h.e(s,1,a,1),options:v._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),s=i.startLineNumber,a=i.endLineNumber)}o.push({range:new h.e(s,1,a,1),options:v._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}let r=new Array(e.length);for(let t=0,i=e.length;ti.removeDecoration(e))),this._findScopeDecorationIds=[]),(null==t?void 0:t.length)&&(this._findScopeDecorationIds=t.map((e=>i.addDecoration(e,v._FIND_SCOPE_DECORATION))))}))}matchBeforePosition(e){if(0===this._decorations.length)return null;for(let t=this._decorations.length-1;t>=0;t--){let i=this._decorations[t],n=this._editor.getModel().getDecorationRange(i);if(n&&!(n.endLineNumber>e.lineNumber)){if(n.endLineNumbere.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(0===this._decorations.length)return null;for(let t=0,i=this._decorations.length;te.lineNumber)return n;if(!(n.startColumn0){let e=[];for(let t=0;th.e.compareRangesUsingStarts(e.range,t.range)));let i=[],n=e[0];for(let t=1;t0?t[0].toUpperCase()+t.substr(1):e[0][0].toUpperCase()!==e[0][0]&&t.length>0?t[0].toLowerCase()+t.substr(1):t}return t}function w(e,t,i){return-1!==e[0].indexOf(i)&&-1!==t.indexOf(i)&&e[0].split(i).length===t.split(i).length}function C(e,t,i){const n=t.split(i),o=e[0].split(i);let r="";return n.forEach(((e,t)=>{r+=y([o[t]],e)+i})),r.slice(0,-1)}class S{constructor(e){this.staticValue=e,this.kind=0}}class x{constructor(e){this.pieces=e,this.kind=1}}class k{constructor(e){e&&0!==e.length?1===e.length&&null!==e[0].staticValue?this._state=new S(e[0].staticValue):this._state=new x(e):this._state=new S("")}static fromStaticValue(e){return new k([D.staticValue(e)])}get hasReplacementPatterns(){return 1===this._state.kind}buildReplaceString(e,t){if(0===this._state.kind)return t?y(e,this._state.staticValue):this._state.staticValue;let i="";for(let t=0,n=this._state.pieces.length;t0){let e=[],t=n.caseOps.length,i=0;for(let r=0,s=o.length;r=t){e.push(o.slice(r));break}switch(n.caseOps[i]){case"U":e.push(o[r].toUpperCase());break;case"u":e.push(o[r].toUpperCase()),i++;break;case"L":e.push(o[r].toLowerCase());break;case"l":e.push(o[r].toLowerCase()),i++;break;default:e.push(o[r])}}o=e.join("")}i+=o}return i}static _substitute(e,t){if(null===t)return"";if(0===e)return t[0];let i="";for(;e>0;){if(ethis.research(!1)),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition((e=>{3!==e.reason&&5!==e.reason&&6!==e.reason||this._decorations.setStartPosition(this._editor.getPosition())}))),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent((e=>{this._ignoreModelContentChanged||(e.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())}))),this._toDispose.add(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,(0,r.B9)(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){!this._isDisposed&&this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet((()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)}),240)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let i=null;void 0!==t?null!==t&&(i=Array.isArray(t)?t:[t]):i=this._decorations.getFindScopes(),null!==i&&(i=i.map((e=>{if(e.startLineNumber!==e.endLineNumber){let t=e.endLineNumber;return 1===e.endColumn&&(t-=1),new h.e(e.startLineNumber,1,t,this._editor.getModel().getLineMaxColumn(t))}return e})));let n=this._findMatches(i,!1,G);this._decorations.set(n,i);const o=this._editor.getSelection();let r=this._decorations.getCurrentMatchesPosition(o);if(0===r&&n.length>0){const e=(0,E.lG)(n.map((e=>e.range)),(e=>h.e.compareRangesUsingStarts(e,o)>=0));r=e>0?e-1+1:r}this._state.changeMatchInfo(r,this._decorations.getCount(),void 0),e&&this._editor.getOption(33).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){let e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){let t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){let t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:i,column:n}=e,o=this._editor.getModel();return t||1===n?(1===i?i=o.getLineCount():i--,n=o.getLineMaxColumn(i)):n--,new u.L(i,n)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const t=this._decorations.matchAfterPosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0),{lineNumber:i,column:n}=e,o=this._editor.getModel();return t||n===o.getLineMaxColumn(i)?(i===o.getLineCount()?i=1:i++,n=1):n++,new u.L(i,n)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const t=this._decorations.matchBeforePosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()=o)break;let r=e.charCodeAt(n);if(36===r){i.emitUnchanged(n-1),i.emitStatic("$",n+1);continue}if(48===r||38===r){i.emitUnchanged(n-1),i.emitMatchIndex(0,n+1,t),t.length=0;continue}if(49<=r&&r<=57){let s=r-48;if(n+1=o)break;let r=e.charCodeAt(n);switch(r){case 92:i.emitUnchanged(n-1),i.emitStatic("\\",n+1);break;case 110:i.emitUnchanged(n-1),i.emitStatic("\n",n+1);break;case 116:i.emitUnchanged(n-1),i.emitStatic("\t",n+1);break;case 117:case 85:case 108:case 76:i.emitUnchanged(n-1),i.emitStatic("",n+1),t.push(String.fromCharCode(r))}}}return i.finalize()}(this._state.replaceString):k.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;let e=this._getReplacePattern(),t=this._editor.getSelection(),i=this._getNextMatch(t.getStartPosition(),!0,!1);if(i)if(t.equalsRange(i.range)){let n=e.buildReplaceString(i.matches,this._state.preserveCase),o=new c.T4(t,n);this._executeEditorCommand("replace",o),this._decorations.setStartPosition(new u.L(t.startLineNumber,t.startColumn+n.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(i.range)}_findMatches(e,t,i){const n=(e||[null]).map((e=>Y._getSearchRange(this._editor.getModel(),e)));return this._editor.getModel().findMatches(this._state.searchString,n,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(114):null,t,i)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();null===e&&this._state.matchesCount>=G?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const e=new g.bc(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(114):null).parseSearchRequest();if(!e)return;let t=e.regex;if(!t.multiline){let e="mu";t.ignoreCase&&(e+="i"),t.global&&(e+="g"),t=new RegExp(t.source,e)}const i=this._editor.getModel(),n=i.getValue(1),o=i.getFullModelRange(),r=this._getReplacePattern();let s;const a=this._state.preserveCase;s=r.hasReplacementPatterns||a?n.replace(t,(function(){return r.buildReplaceString(arguments,a)})):n.replace(t,r.buildReplaceString(null,a));let l=new c.hP(o,s,this._editor.getSelection());this._executeEditorCommand("replaceAll",l)}_regularReplaceAll(e){const t=this._getReplacePattern();let i=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),n=[];for(let e=0,o=i.length;ee.range)),n);this._executeEditorCommand("replaceAll",o)}selectAllMatches(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes(),t=this._findMatches(e,!1,1073741824).map((e=>new d.Y(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn))),i=this._editor.getSelection();for(let e=0,n=t.length;e{this.checked=!this._checked,this._onChange.fire(!1),e.preventDefault()})),this.ignoreGesture(this.domNode),this.onkeydown(this.domNode,(e=>{if(10===e.keyCode||3===e.keyCode)return this.checked=!this._checked,this._onChange.fire(!0),void e.preventDefault();this._onKeyDown.fire(e)}))}get enabled(){return"true"!==this.domNode.getAttribute("aria-disabled")}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 22}style(e){e.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=e.inputActiveOptionBorder),e.inputActiveOptionForeground&&(this._opts.inputActiveOptionForeground=e.inputActiveOptionForeground),e.inputActiveOptionBackground&&(this._opts.inputActiveOptionBackground=e.inputActiveOptionBackground),this.applyStyles()}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"transparent",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground?this._opts.inputActiveOptionForeground.toString():"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground?this._opts.inputActiveOptionBackground.toString():"transparent")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}const ne=n.N("caseDescription","Match Case"),oe=n.N("wordsDescription","Match Whole Word"),re=n.N("regexDescription","Use Regular Expression");class se extends ie{constructor(e){super({icon:ee.lA.caseSensitive,title:ne+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class ae extends ie{constructor(e){super({icon:ee.lA.wholeWord,title:oe+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class le extends ie{constructor(e){super({icon:ee.lA.regex,title:re+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class ce extends X.${constructor(e,t,i,n){super(),this._hideSoon=this._register(new o.pY((()=>this._hide()),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=i,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const r=n.getColorTheme().getColor(m.PR),s=n.getColorTheme().getColor(m.Pv),a=n.getColorTheme().getColor(m.XE);this.caseSensitive=this._register(new se({appendTitle:this._keybindingLabelFor(V),isChecked:this._state.matchCase,inputActiveOptionBorder:r,inputActiveOptionForeground:s,inputActiveOptionBackground:a})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange((()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)}))),this.wholeWords=this._register(new ae({appendTitle:this._keybindingLabelFor(H),isChecked:this._state.wholeWord,inputActiveOptionBorder:r,inputActiveOptionForeground:s,inputActiveOptionBackground:a})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange((()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)}))),this.regex=this._register(new le({appendTitle:this._keybindingLabelFor($),isChecked:this._state.isRegex,inputActiveOptionBorder:r,inputActiveOptionForeground:s,inputActiveOptionBackground:a})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange((()=>{this._state.change({isRegex:this.regex.checked},!1)}))),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange((e=>{let t=!1;e.isRegex&&(this.regex.checked=this._state.isRegex,t=!0),e.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,t=!0),e.matchCase&&(this.caseSensitive.checked=this._state.matchCase,t=!0),!this._state.isRevealed&&t&&this._revealTemporarily()}))),this._register(Z.j_(this._domNode,(e=>this._onMouseOut()))),this._register(Z.nm(this._domNode,"mouseover",(e=>this._onMouseOver()))),this._applyTheme(n.getColorTheme()),this._register(n.onDidColorThemeChange(this._applyTheme.bind(this)))}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return ce.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseOut(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}_applyTheme(e){let t={inputActiveOptionBorder:e.getColor(m.PR),inputActiveOptionForeground:e.getColor(m.Pv),inputActiveOptionBackground:e.getColor(m.XE)};this.caseSensitive.style(t),this.wholeWords.style(t),this.regex.style(t)}}function ue(e,t){return 1===e||2!==e&&t}ce.ID="editor.contrib.findOptionsWidget",(0,_.Ic)(((e,t)=>{const i=e.getColor(m.D0);i&&t.addRule(`.monaco-editor .findOptionsWidget { background-color: ${i}; }`);const n=e.getColor(m.Hf);n&&t.addRule(`.monaco-editor .findOptionsWidget { color: ${n}; }`);const o=e.getColor(m.rh);o&&t.addRule(`.monaco-editor .findOptionsWidget { box-shadow: 0 0 8px 2px ${o}; }`);const r=e.getColor(m.lR);r&&t.addRule(`.monaco-editor .findOptionsWidget { border: 2px solid ${r}; }`)}));class he extends r.JT{constructor(){super(),this._onFindReplaceStateChange=this._register(new J.Q5),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0}get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return ue(this._isRegexOverride,this._isRegex)}get wholeWord(){return ue(this._wholeWordOverride,this._wholeWord)}get matchCase(){return ue(this._matchCaseOverride,this._matchCase)}get preserveCase(){return ue(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}changeMatchInfo(e,t,i){let n={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1},o=!1;0===t&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,n.matchesPosition=!0,o=!0),this._matchesCount!==t&&(this._matchesCount=t,n.matchesCount=!0,o=!0),void 0!==i&&(h.e.equalsRange(this._currentMatch,i)||(this._currentMatch=i,n.currentMatch=!0,o=!0)),o&&this._onFindReplaceStateChange.fire(n)}change(e,t,i=!0){var n;let o={moveCursor:t,updateHistory:i,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1},r=!1;const s=this.isRegex,a=this.wholeWord,l=this.matchCase,c=this.preserveCase;void 0!==e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,o.searchString=!0,r=!0),void 0!==e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,o.replaceString=!0,r=!0),void 0!==e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,o.isRevealed=!0,r=!0),void 0!==e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,o.isReplaceRevealed=!0,r=!0),void 0!==e.isRegex&&(this._isRegex=e.isRegex),void 0!==e.wholeWord&&(this._wholeWord=e.wholeWord),void 0!==e.matchCase&&(this._matchCase=e.matchCase),void 0!==e.preserveCase&&(this._preserveCase=e.preserveCase),void 0!==e.searchScope&&((null===(n=e.searchScope)||void 0===n?void 0:n.every((e=>{var t;return null===(t=this._searchScope)||void 0===t?void 0:t.some((t=>!h.e.equalsRange(t,e)))})))||(this._searchScope=e.searchScope,o.searchScope=!0,r=!0)),void 0!==e.loop&&this._loop!==e.loop&&(this._loop=e.loop,o.loop=!0,r=!0),this._isRegexOverride=void 0!==e.isRegexOverride?e.isRegexOverride:0,this._wholeWordOverride=void 0!==e.wholeWordOverride?e.wholeWordOverride:0,this._matchCaseOverride=void 0!==e.matchCaseOverride?e.matchCaseOverride:0,this._preserveCaseOverride=void 0!==e.preserveCaseOverride?e.preserveCaseOverride:0,s!==this.isRegex&&(r=!0,o.isRegex=!0),a!==this.wholeWord&&(r=!0,o.wholeWord=!0),l!==this.matchCase&&(r=!0,o.matchCase=!0),c!==this.preserveCase&&(r=!0,o.preserveCase=!0),r&&this._onFindReplaceStateChange.fire(o)}canNavigateBack(){return this.canNavigateInLoop()||1!==this.matchesPosition}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=G}}var de=i(5152),ge=i(3098),fe=i(7301),pe=i(1432),me=i(7927);const _e=n.N("defaultLabel","input");class ve extends X.${constructor(e,t,i,n){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this._onDidOptionChange=this._register(new J.Q5),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new J.Q5),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new J.Q5),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new J.Q5),this._onKeyUp=this._register(new J.Q5),this._onCaseSensitiveKeyDown=this._register(new J.Q5),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new J.Q5),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||_e,this.inputActiveOptionBorder=n.inputActiveOptionBorder,this.inputActiveOptionForeground=n.inputActiveOptionForeground,this.inputActiveOptionBackground=n.inputActiveOptionBackground,this.inputBackground=n.inputBackground,this.inputForeground=n.inputForeground,this.inputBorder=n.inputBorder,this.inputValidationInfoBorder=n.inputValidationInfoBorder,this.inputValidationInfoBackground=n.inputValidationInfoBackground,this.inputValidationInfoForeground=n.inputValidationInfoForeground,this.inputValidationWarningBorder=n.inputValidationWarningBorder,this.inputValidationWarningBackground=n.inputValidationWarningBackground,this.inputValidationWarningForeground=n.inputValidationWarningForeground,this.inputValidationErrorBorder=n.inputValidationErrorBorder,this.inputValidationErrorBackground=n.inputValidationErrorBackground,this.inputValidationErrorForeground=n.inputValidationErrorForeground;const o=n.appendCaseSensitiveLabel||"",r=n.appendWholeWordsLabel||"",s=n.appendRegexLabel||"",a=n.history||[],l=!!n.flexibleHeight,c=!!n.flexibleWidth,u=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new me.p(this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:a,flexibleHeight:l,flexibleWidth:c,flexibleMaxHeight:u})),this.regex=this._register(new le({appendTitle:s,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.regex.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.regex.onKeyDown((e=>{this._onRegexKeyDown.fire(e)}))),this.wholeWords=this._register(new ae({appendTitle:r,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.wholeWords.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this.caseSensitive=this._register(new se({appendTitle:o,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.caseSensitive.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.caseSensitive.onKeyDown((e=>{this._onCaseSensitiveKeyDown.fire(e)}))),this._showOptionButtons&&(this.inputBox.paddingRight=this.caseSensitive.width()+this.wholeWords.width()+this.regex.width());let h=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,(e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){let t=h.indexOf(document.activeElement);if(t>=0){let i=-1;e.equals(17)?i=(t+1)%h.length:e.equals(15)&&(i=0===t?h.length-1:t-1),e.equals(9)?(h[t].blur(),this.inputBox.focus()):i>=0&&h[i].focus(),Z.zB.stop(e,!0)}}}));let d=document.createElement("div");d.className="controls",d.style.display=this._showOptionButtons?"block":"none",d.appendChild(this.caseSensitive.domNode),d.appendChild(this.wholeWords.domNode),d.appendChild(this.regex.domNode),this.domNode.appendChild(d),e&&e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e))),this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e))),this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire())),this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.regex.style(e),this.wholeWords.style(e),this.caseSensitive.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive.checked}setCaseSensitive(e){this.caseSensitive.checked=e}getWholeWords(){return this.wholeWords.checked}setWholeWords(e){this.wholeWords.checked=e}getRegex(){return this.regex.checked}setRegex(e){this.regex.checked=e,this.validate()}focusOnCaseSensitive(){this.caseSensitive.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}clearMessage(){this.inputBox.hideMessage()}}var be=i(9989);const ye=n.N("defaultLabel","input"),we=n.N("label.preserveCaseCheckbox","Preserve Case");class Ce extends ie{constructor(e){super({icon:ee.lA.preserveCase,title:we+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class Se extends X.${constructor(e,t,i,n){super(),this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new J.Q5),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new J.Q5),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new J.Q5),this._onInput=this._register(new J.Q5),this._onKeyUp=this._register(new J.Q5),this._onPreserveCaseKeyDown=this._register(new J.Q5),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||ye,this.inputActiveOptionBorder=n.inputActiveOptionBorder,this.inputActiveOptionForeground=n.inputActiveOptionForeground,this.inputActiveOptionBackground=n.inputActiveOptionBackground,this.inputBackground=n.inputBackground,this.inputForeground=n.inputForeground,this.inputBorder=n.inputBorder,this.inputValidationInfoBorder=n.inputValidationInfoBorder,this.inputValidationInfoBackground=n.inputValidationInfoBackground,this.inputValidationInfoForeground=n.inputValidationInfoForeground,this.inputValidationWarningBorder=n.inputValidationWarningBorder,this.inputValidationWarningBackground=n.inputValidationWarningBackground,this.inputValidationWarningForeground=n.inputValidationWarningForeground,this.inputValidationErrorBorder=n.inputValidationErrorBorder,this.inputValidationErrorBackground=n.inputValidationErrorBackground,this.inputValidationErrorForeground=n.inputValidationErrorForeground;const o=n.appendPreserveCaseLabel||"",r=n.history||[],s=!!n.flexibleHeight,a=!!n.flexibleWidth,l=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new me.p(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:r,flexibleHeight:s,flexibleWidth:a,flexibleMaxHeight:l})),this.preserveCase=this._register(new Ce({appendTitle:o,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.preserveCase.onChange((e=>{this._onDidOptionChange.fire(e),!e&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()}))),this._register(this.preserveCase.onKeyDown((e=>{this._onPreserveCaseKeyDown.fire(e)}))),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;let c=[this.preserveCase.domNode];this.onkeydown(this.domNode,(e=>{if(e.equals(15)||e.equals(17)||e.equals(9)){let t=c.indexOf(document.activeElement);if(t>=0){let i=-1;e.equals(17)?i=(t+1)%c.length:e.equals(15)&&(i=0===t?c.length-1:t-1),e.equals(9)?(c[t].blur(),this.inputBox.focus()):i>=0&&c[i].focus(),Z.zB.stop(e,!0)}}}));let u=document.createElement("div");u.className="controls",u.style.display=this._showOptionButtons?"block":"none",u.appendChild(this.preserveCase.domNode),this.domNode.appendChild(u),e&&e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,(e=>this._onKeyDown.fire(e))),this.onkeyup(this.inputBox.inputElement,(e=>this._onKeyUp.fire(e))),this.oninput(this.inputBox.inputElement,(e=>this._onInput.fire())),this.onmousedown(this.inputBox.inputElement,(e=>this._onMouseDown.fire(e)))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(e){e?this.enable():this.disable()}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.preserveCase.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){this.inputBox&&this.inputBox.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.inputBox.width=e,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var xe=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ke=function(e,t){return function(i,n){t(i,n,e)}};const De="historyNavigationWidget",Le="historyNavigationEnabled";function Ne(e,t){return e.getContext(document.activeElement).getValue(t)}function Ee(e,t){const i=function(e,t){return e.createScoped(t.target)}(e,t);return function(e,t,i){new N.uy("historyNavigationWidget",t).bindTo(e)}(i,t),{scopedContextKeyService:i,historyNavigationEnablement:new N.uy(Le,!0).bindTo(i)}}let Ae=class extends ve{constructor(e,t,i,n,o=!1){super(e,t,o,i),this._register(Ee(n,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};Ae=xe([ke(3,N.i6)],Ae);let Me=class extends Se{constructor(e,t,i,n,o=!1){super(e,t,o,i),this._register(Ee(n,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};Me=xe([ke(3,N.i6)],Me),be.W.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:N.Ao.and(N.Ao.has(De),N.Ao.equals(Le,!0)),primary:16,secondary:[528],handler:(e,t)=>{const i=Ne(e.get(N.i6),De);i&&i.historyNavigator.showPreviousValue()}}),be.W.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:N.Ao.and(N.Ao.has(De),N.Ao.equals(Le,!0)),primary:18,secondary:[530],handler:(e,t)=>{const i=Ne(e.get(N.i6),De);i&&i.historyNavigator.showNextValue()}});var Ie=i(9554);const Te=(0,Ie.q5)("find-selection",ee.lA.selection,n.N("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),Re=(0,Ie.q5)("find-collapsed",ee.lA.chevronRight,n.N("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),Oe=(0,Ie.q5)("find-expanded",ee.lA.chevronDown,n.N("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),Fe=(0,Ie.q5)("find-replace",ee.lA.replace,n.N("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),Pe=(0,Ie.q5)("find-replace-all",ee.lA.replaceAll,n.N("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),Be=(0,Ie.q5)("find-previous-match",ee.lA.arrowUp,n.N("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),ze=(0,Ie.q5)("find-next-match",ee.lA.arrowDown,n.N("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),We=n.N("label.find","Find"),Ve=n.N("placeholder.find","Find"),He=n.N("label.previousMatchButton","Previous match"),$e=n.N("label.nextMatchButton","Next match"),Ue=n.N("label.toggleSelectionFind","Find in selection"),je=n.N("label.closeButton","Close"),qe=n.N("label.replace","Replace"),Ke=n.N("placeholder.replace","Replace"),Ge=n.N("label.replaceButton","Replace"),Ye=n.N("label.replaceAllButton","Replace All"),Ze=n.N("label.toggleReplaceButton","Toggle Replace mode"),Xe=n.N("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",G),Qe=n.N("label.matchesLocation","{0} of {1}"),Je=n.N("label.noResults","No results"),et=419;let tt=69;const it="ctrlEnterReplaceAll.windows.donotask",nt=pe.dz?256:2048;class ot{constructor(e){this.afterLineNumber=e,this.heightInPx=33,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function rt(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionStart>0&&e.stopPropagation()}function st(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionEndthis._updateHistoryDelayer.cancel()))),this._register(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration((e=>{if(e.hasChanged(78)&&(this._codeEditor.getOption(78)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),e.hasChanged(128)&&this._tryUpdateWidgetWidth(),e.hasChanged(2)&&this.updateAccessibilitySupport(),e.hasChanged(33)){const e=this._codeEditor.getOption(33).addExtraSpaceOnTop;e&&!this._viewZone&&(this._viewZone=new ot(0),this._showViewZone()),!e&&this._viewZone&&this._removeViewZone()}}))),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection((()=>{this._isVisible&&this._updateToggleSelectionFindButton()}))),this._register(this._codeEditor.onDidFocusEditorWidget((()=>{return e=this,t=void 0,n=function*(){if(this._isVisible){let e=yield this._controller.getGlobalBufferTerm();e&&e!==this._state.searchString&&(this._state.change({searchString:e},!1),this._findInput.select())}},new((i=void 0)||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}));var e,t,i,n}))),this._findInputFocused=M.bindTo(a),this._findFocusTracker=this._register(Z.go(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus((()=>{this._findInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._findFocusTracker.onDidBlur((()=>{this._findInputFocused.set(!1)}))),this._replaceInputFocused=I.bindTo(a),this._replaceFocusTracker=this._register(Z.go(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus((()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._replaceFocusTracker.onDidBlur((()=>{this._replaceInputFocused.set(!1)}))),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(33).addExtraSpaceOnTop&&(this._viewZone=new ot(0)),this._applyTheme(l.getColorTheme()),this._register(l.onDidColorThemeChange(this._applyTheme.bind(this))),this._register(this._codeEditor.onDidChangeModel((()=>{this._isVisible&&(this._viewZoneId=void 0)}))),this._register(this._codeEditor.onDidScrollChange((e=>{e.scrollTopChanged?this._layoutViewZone():setTimeout((()=>{this._layoutViewZone()}),0)})))}getId(){return at.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?this._codeEditor.getOption(78)||this._isReplaceVisible||(this._isReplaceVisible=!0,this._replaceInput.width=Z.w(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),e.isRegex&&this._findInput.setRegex(this._state.isRegex),e.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),e.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),e.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){let e=this._state.searchString.length>0&&0===this._state.matchesCount;this._domNode.classList.toggle("no-results",e),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,fe.dL)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){let e;if(this._matchesCount.style.minWidth=tt+"px",this._state.matchesCount>=G?this._matchesCount.title=Xe:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild),this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=G&&(t+="+");let i=String(this._state.matchesPosition);"0"===i&&(i="?"),e=s.WU(Qe,i,t)}else e=Je;this._matchesCount.appendChild(document.createTextNode(e)),(0,de.Z9)(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),tt=Math.max(tt,this._matchesCount.clientWidth)}_getAriaLabel(e,t,i){if(e===Je)return""===i?n.N("ariaSearchNoResultEmpty","{0} found",e):n.N("ariaSearchNoResult","{0} found for '{1}'",e,i);if(t){const o=n.N("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,i,t.startLineNumber+":"+t.startColumn),r=this._codeEditor.getModel();return r&&t.startLineNumber<=r.getLineCount()&&t.startLineNumber>=1?`${r.getLineContent(t.startLineNumber)}, ${o}`:o}return n.N("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,i)}_updateToggleSelectionFindButton(){let e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),i=this._toggleSelectionFind.checked;this._isVisible&&(i||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);let e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);let i=!this._codeEditor.getOption(78);this._toggleReplaceBtn.setEnabled(this._isVisible&&i)}_reveal(){if(this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(33).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":const t=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=t}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout((()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")}),0)),this._revealTimeouts.push(setTimeout((()=>{this._findInput.validate()}),200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(33).seedSearchStringFromSelection&&e){const i=this._codeEditor.getDomNode();if(i){const n=Z.i(i),o=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),r=n.left+(o?o.left:0),s=o?o.top:0;if(this._viewZone&&se.startLineNumber&&(t=!1);const i=Z.xQ(this._domNode).left;r>i&&(t=!1);const o=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());n.left+(o?o.left:0)>i&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(33).addExtraSpaceOnTop)return void this._removeViewZone();if(!this._isVisible)return;const t=this._viewZone;void 0===this._viewZoneId&&t&&this._codeEditor.changeViewZones((i=>{t.heightInPx=this._getHeight(),this._viewZoneId=i.addZone(t),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+t.heightInPx)}))}_showViewZone(e=!0){if(!this._isVisible)return;if(!this._codeEditor.getOption(33).addExtraSpaceOnTop)return;void 0===this._viewZone&&(this._viewZone=new ot(0));const t=this._viewZone;this._codeEditor.changeViewZones((i=>{if(void 0!==this._viewZoneId){const n=this._getHeight();if(n===t.heightInPx)return;let o=n-t.heightInPx;return t.heightInPx=n,i.layoutZone(this._viewZoneId),void(e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+o))}{let n=this._getHeight();if(n-=this._codeEditor.getOption(72).top,n<=0)return;t.heightInPx=n,this._viewZoneId=i.addZone(t),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+n)}}))}_removeViewZone(){this._codeEditor.changeViewZones((e=>{void 0!==this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))}))}_applyTheme(e){let t={inputActiveOptionBorder:e.getColor(m.PR),inputActiveOptionBackground:e.getColor(m.XE),inputActiveOptionForeground:e.getColor(m.Pv),inputBackground:e.getColor(m.sE),inputForeground:e.getColor(m.zJ),inputBorder:e.getColor(m.dt),inputValidationInfoBackground:e.getColor(m._l),inputValidationInfoForeground:e.getColor(m.YI),inputValidationInfoBorder:e.getColor(m.EP),inputValidationWarningBackground:e.getColor(m.RV),inputValidationWarningForeground:e.getColor(m.SU),inputValidationWarningBorder:e.getColor(m.C3),inputValidationErrorBackground:e.getColor(m.p),inputValidationErrorForeground:e.getColor(m._t),inputValidationErrorBorder:e.getColor(m.OZ)};this._findInput.style(t),this._replaceInput.style(t),this._toggleSelectionFind.style(t)}_tryUpdateWidgetWidth(){if(!this._isVisible)return;if(!Z.Uw(this._domNode))return;const e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0)return void this._domNode.classList.add("hiddenEditor");this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const t=e.width,i=e.minimap.minimapWidth;let n=!1,o=!1,r=!1;if(this._resized&&Z.w(this._domNode)>et)return this._domNode.style.maxWidth=t-28-i-15+"px",void(this._replaceInput.width=Z.w(this._findInput.domNode));if(447+i>=t&&(o=!0),447+i-tt>=t&&(r=!0),447+i-tt>=t+50&&(n=!0),this._domNode.classList.toggle("collapsed-find-widget",n),this._domNode.classList.toggle("narrow-find-widget",r),this._domNode.classList.toggle("reduced-find-widget",o),r||n||(this._domNode.style.maxWidth=t-28-i-15+"px"),this._resized){this._findInput.inputBox.layout();let e=this._findInput.inputBox.element.clientWidth;e>0&&(this._replaceInput.width=e)}else this._isReplaceVisible&&(this._replaceInput.width=Z.w(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){const e=this._getHeight();return(null===this._cachedHeight||this._cachedHeight!==e)&&(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){let e=this._codeEditor.getSelections();e.map((e=>{1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1)));const t=this._state.currentMatch;return e.startLineNumber===e.endLineNumber||h.e.equalsRange(e,t)?null:e})).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){return e.equals(3|nt)?(this._findInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?rt(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):e.equals(18)?st(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):void 0}_onReplaceInputKeyDown(e){return e.equals(3|nt)?(pe.ED&&pe.tY&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(n.N("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(it,!0,0,0)),this._replaceInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?rt(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):e.equals(18)?st(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):void 0}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new Ae(null,this._contextViewProvider,{width:221,label:We,placeholder:Ve,appendCaseSensitiveLabel:this._keybindingLabelFor(V),appendWholeWordsLabel:this._keybindingLabelFor(H),appendRegexLabel:this._keybindingLabelFor($),validation:e=>{if(0===e.length||!this._findInput.getRegex())return null;try{return new RegExp(e,"gu"),null}catch(e){return{content:e.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118},this._contextKeyService,!0)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown((e=>this._onFindInputKeyDown(e)))),this._register(this._findInput.inputBox.onDidChange((()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)}))),this._register(this._findInput.onDidOptionChange((()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)}))),this._register(this._findInput.onCaseSensitiveKeyDown((e=>{e.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),e.preventDefault())}))),this._register(this._findInput.onRegexKeyDown((e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),e.preventDefault())}))),this._register(this._findInput.inputBox.onDidHeightChange((e=>{this._tryUpdateHeight()&&this._showViewZone()}))),pe.IJ&&this._register(this._findInput.onMouseDown((e=>this._onFindInputMouseDown(e)))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new lt({label:He+this._keybindingLabelFor(z),icon:Be,onTrigger:()=>{this._codeEditor.getAction(z).run().then(void 0,fe.dL)}})),this._nextBtn=this._register(new lt({label:$e+this._keybindingLabelFor(B),icon:ze,onTrigger:()=>{this._codeEditor.getAction(B).run().then(void 0,fe.dL)}}));let e=document.createElement("div");e.className="find-part",e.appendChild(this._findInput.domNode);const t=document.createElement("div");t.className="find-actions",e.appendChild(t),t.appendChild(this._matchesCount),t.appendChild(this._prevBtn.domNode),t.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new ie({icon:Te,title:Ue+this._keybindingLabelFor(U),isChecked:!1})),this._register(this._toggleSelectionFind.onChange((()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let e=this._codeEditor.getSelections();e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}else this._state.change({searchScope:null},!0)}))),t.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new lt({label:je+this._keybindingLabelFor(W),icon:Ie.s_,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),e.preventDefault())}})),t.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new Me(null,void 0,{label:qe,placeholder:Ke,appendPreserveCaseLabel:this._keybindingLabelFor(j),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown((e=>this._onReplaceInputKeyDown(e)))),this._register(this._replaceInput.inputBox.onDidChange((()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)}))),this._register(this._replaceInput.inputBox.onDidHeightChange((e=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()}))),this._register(this._replaceInput.onDidOptionChange((()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)}))),this._register(this._replaceInput.onPreserveCaseKeyDown((e=>{e.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),e.preventDefault())}))),this._replaceBtn=this._register(new lt({label:Ge+this._keybindingLabelFor(q),icon:Fe,onTrigger:()=>{this._controller.replace()},onKeyDown:e=>{e.equals(1026)&&(this._closeBtn.focus(),e.preventDefault())}})),this._replaceAllBtn=this._register(new lt({label:Ye+this._keybindingLabelFor(K),icon:Pe,onTrigger:()=>{this._controller.replaceAll()}}));let i=document.createElement("div");i.className="replace-part",i.appendChild(this._replaceInput.domNode);const n=document.createElement("div");n.className="replace-actions",i.appendChild(n),n.appendChild(this._replaceBtn.domNode),n.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new lt({label:Ze,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=Z.w(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.width="419px",this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(e),this._domNode.appendChild(i),this._resizeSash=new ge.g(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let o=et;this._register(this._resizeSash.onDidStart((()=>{o=Z.w(this._domNode)}))),this._register(this._resizeSash.onDidChange((e=>{this._resized=!0;let t=o+e.startX-e.currentX;t(parseFloat(Z.Dx(this._domNode).maxWidth)||0)||(this._domNode.style.width=`${t}px`,this._isReplaceVisible&&(this._replaceInput.width=Z.w(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())}))),this._register(this._resizeSash.onDidReset((()=>{const e=Z.w(this._domNode);if(e{this._opts.onTrigger(),e.preventDefault()})),this.onkeydown(this._domNode,(e=>{if(e.equals(10)||e.equals(3))return this._opts.onTrigger(),void e.preventDefault();this._opts.onKeyDown&&this._opts.onKeyDown(e)}))}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(..._.kS.asClassNameArray(Re)),this._domNode.classList.add(..._.kS.asClassNameArray(Oe))):(this._domNode.classList.remove(..._.kS.asClassNameArray(Oe)),this._domNode.classList.add(..._.kS.asClassNameArray(Re)))}}(0,_.Ic)(((e,t)=>{const i=(e,i)=>{i&&t.addRule(`.monaco-editor ${e} { background-color: ${i}; }`)};i(".findMatch",e.getColor(m.MU)),i(".currentFindMatch",e.getColor(m.ny)),i(".findScope",e.getColor(m.jU)),i(".find-widget",e.getColor(m.D0));const n=e.getColor(m.rh);n&&t.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${n}; }`);const o=e.getColor(m.Ei);o&&t.addRule(`.monaco-editor .findMatch { border: 1px ${"hc"===e.type?"dotted":"solid"} ${o}; box-sizing: border-box; }`);const r=e.getColor(m.pn);r&&t.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${r}; padding: 1px; box-sizing: border-box; }`);const s=e.getColor(m.gk);s&&t.addRule(`.monaco-editor .findScope { border: 1px ${"hc"===e.type?"dashed":"solid"} ${s}; }`);const a=e.getColor(m.lR);a&&t.addRule(`.monaco-editor .find-widget { border: 1px solid ${a}; }`);const l=e.getColor(m.Hf);l&&t.addRule(`.monaco-editor .find-widget { color: ${l}; }`);const c=e.getColor(m.Id);c&&t.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${c}; }`);const u=e.getColor(m.Ng);if(u)t.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${u}; }`);else{const i=e.getColor(m.D1);i&&t.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${i}; }`)}const h=e.getColor(m.R8);h&&t.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${h}; }`)}));var ct=i(4144),ut=i(4972),ht=i(5606),dt=i(1847),gt=i(6904),ft=i(9422),pt=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},mt=function(e,t){return function(i,n){t(i,n,e)}},_t=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function vt(e,t="single"){if(!e.hasModel())return null;const i=e.getSelection();if("single"===t&&i.startLineNumber===i.endLineNumber||"multiple"===t)if(i.isEmpty()){const t=e.getConfiguredWordAtPosition(i.getStartPosition());if(t)return t.word}else if(e.getModel().getValueLengthInRange(i)<524288)return e.getModel().getValueInRange(i);return null}let bt=class e extends r.JT{constructor(e,t,i,n){super(),this._editor=e,this._findWidgetVisible=A.bindTo(t),this._contextKeyService=t,this._storageService=i,this._clipboardService=n,this._updateHistoryDelayer=new o.vp(500),this._state=this._register(new he),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this._model=null,this._register(this._editor.onDidChangeModel((()=>{let e=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),e&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(33).loop})})))}get editor(){return this._editor}static get(t){return t.getContribution(e.ID)}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(e){this.saveQueryState(e),e.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),e.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,0),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,0),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,0),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,0)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!M.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let e=this._editor.getSelections();e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._editor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=s.ec(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}_start(e){return _t(this,void 0,void 0,(function*(){if(this.disposeModel(),!this._editor.hasModel())return;let t={isRevealed:!0};if("single"===e.seedSearchStringFromSelection){let i=vt(this._editor,e.seedSearchStringFromSelection);i&&(this._state.isRegex?t.searchString=s.ec(i):t.searchString=i)}else if("multiple"===e.seedSearchStringFromSelection&&!e.updateSearchScope){let i=vt(this._editor,e.seedSearchStringFromSelection);i&&(t.searchString=i)}if(!t.searchString&&e.seedSearchStringFromGlobalClipboard){let e=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;e&&(t.searchString=e)}if(e.forceRevealReplace?t.isReplaceRevealed=!0:this._findWidgetVisible.get()||(t.isReplaceRevealed=!1),e.updateSearchScope){let e=this._editor.getSelections();e.some((e=>!e.isEmpty()))&&(t.searchScope=e)}t.loop=e.loop,this._state.change(t,!1),this._model||(this._model=new Y(this._editor,this._state))}))}start(e){return this._start(e)}moveToNextMatch(){return!!this._model&&(this._model.moveToNextMatch(),!0)}moveToPrevMatch(){return!!this._model&&(this._model.moveToPrevMatch(),!0)}replace(){return!!this._model&&(this._model.replace(),!0)}replaceAll(){return!!this._model&&(this._model.replaceAll(),!0)}selectAllMatches(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)}getGlobalBufferTerm(){return _t(this,void 0,void 0,(function*(){return this._editor.getOption(33).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}))}setGlobalBufferTerm(e){this._editor.getOption(33).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};bt.ID="editor.contrib.findController",bt=pt([mt(1,N.i6),mt(2,gt.Uy),mt(3,ut.p)],bt);let yt=class extends bt{constructor(e,t,i,n,o,r,s,a){super(e,i,s,a),this._contextViewService=t,this._keybindingService=n,this._themeService=o,this._notificationService=r,this._widget=null,this._findOptionsWidget=null}_start(e){const t=Object.create(null,{_start:{get:()=>super._start}});return _t(this,void 0,void 0,(function*(){this._widget||this._createFindWidget();const i=this._editor.getSelection();let n=!1;switch(this._editor.getOption(33).autoFindInSelection){case"always":n=!0;break;case"never":n=!1;break;case"multiline":n=!!i&&i.startLineNumber!==i.endLineNumber}e.updateSearchScope=n,yield t._start.call(this,e),this._widget&&(2===e.shouldFocus?this._widget.focusReplaceInput():1===e.shouldFocus&&this._widget.focusFindInput())}))}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new at(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new ce(this._editor,this._state,this._keybindingService,this._themeService))}};yt=pt([mt(1,ht.u),mt(2,N.i6),mt(3,dt.d),mt(4,_.XE),mt(5,ft.lT),mt(6,gt.Uy),mt(7,ut.p)],yt);const wt=(0,a.rn)(new a.jY({id:"actions.find",label:n.N("startFindAction","Find"),alias:"Find",precondition:N.Ao.or(l.u.focus,N.Ao.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:ct.eH.MenubarEditMenu,group:"3_find",title:n.N({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));wt.addImplementation(0,((e,t,i)=>{const n=bt.get(t);return!!n&&n.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getOption(33).seedSearchStringFromSelection?"single":"none",seedSearchStringFromGlobalClipboard:t.getOption(33).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(33).loop})}));class Ct extends a.R6{constructor(){super({id:"actions.findWithSelection",label:n.N("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}run(e,t){return _t(this,void 0,void 0,(function*(){let e=bt.get(t);e&&(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(33).loop}),e.setGlobalBufferTerm(e.getState().searchString))}))}}class St extends a.R6{run(e,t){return _t(this,void 0,void 0,(function*(){let e=bt.get(t);e&&!this._run(e)&&(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===e.getState().searchString.length&&t.getOption(33).seedSearchStringFromSelection?"single":"none",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(33).loop}),this._run(e))}))}}class xt extends St{constructor(){super({id:B,label:n.N("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:l.u.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:N.Ao.and(l.u.focus,M),primary:3,weight:100}]})}_run(e){return!!e.moveToNextMatch()&&(e.editor.pushUndoStop(),!0)}}class kt extends St{constructor(){super({id:z,label:n.N("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:l.u.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:N.Ao.and(l.u.focus,M),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}}class Dt extends a.R6{run(e,t){return _t(this,void 0,void 0,(function*(){let e=bt.get(t);if(!e)return;let i=vt(t);i&&e.setSearchString(i),this._run(e)||(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getOption(33).seedSearchStringFromSelection?"single":"none",seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(33).loop}),this._run(e))}))}}class Lt extends Dt{constructor(){super({id:"editor.action.nextSelectionMatchFindAction",label:n.N("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:l.u.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}class Nt extends Dt{constructor(){super({id:"editor.action.previousSelectionMatchFindAction",label:n.N("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:l.u.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}}const Et=(0,a.rn)(new a.jY({id:"editor.action.startFindReplaceAction",label:n.N("startReplace","Replace"),alias:"Replace",precondition:N.Ao.or(l.u.focus,N.Ao.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:ct.eH.MenubarEditMenu,group:"3_find",title:n.N({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));Et.addImplementation(0,((e,t,i)=>{if(!t.hasModel()||t.getOption(78))return!1;const n=bt.get(t);if(!n)return!1;const o=t.getSelection(),r=n.isFindInputFocused(),s=!o.isEmpty()&&o.startLineNumber===o.endLineNumber&&t.getOption(33).seedSearchStringFromSelection&&!r,a=r||s?2:1;return n.start({forceRevealReplace:!0,seedSearchStringFromSelection:s?"single":"none",seedSearchStringFromGlobalClipboard:t.getOption(33).seedSearchStringFromSelection,shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(33).loop})})),(0,a._K)(bt.ID,yt),(0,a.Qr)(Ct),(0,a.Qr)(xt),(0,a.Qr)(kt),(0,a.Qr)(Lt),(0,a.Qr)(Nt);const At=a._l.bindToContribution(bt.get);(0,a.fK)(new At({id:W,precondition:A,handler:e=>e.closeFindWidget(),kbOpts:{weight:105,kbExpr:N.Ao.and(l.u.focus,N.Ao.not("isComposing")),primary:9,secondary:[1033]}})),(0,a.fK)(new At({id:V,precondition:void 0,handler:e=>e.toggleCaseSensitive(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:T.primary,mac:T.mac,win:T.win,linux:T.linux}})),(0,a.fK)(new At({id:H,precondition:void 0,handler:e=>e.toggleWholeWords(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:R.primary,mac:R.mac,win:R.win,linux:R.linux}})),(0,a.fK)(new At({id:$,precondition:void 0,handler:e=>e.toggleRegex(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:O.primary,mac:O.mac,win:O.win,linux:O.linux}})),(0,a.fK)(new At({id:U,precondition:void 0,handler:e=>e.toggleSearchScope(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:F.primary,mac:F.mac,win:F.win,linux:F.linux}})),(0,a.fK)(new At({id:j,precondition:void 0,handler:e=>e.togglePreserveCase(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:P.primary,mac:P.mac,win:P.win,linux:P.linux}})),(0,a.fK)(new At({id:q,precondition:A,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:3094}})),(0,a.fK)(new At({id:q,precondition:A,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:N.Ao.and(l.u.focus,I),primary:3}})),(0,a.fK)(new At({id:K,precondition:A,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:2563}})),(0,a.fK)(new At({id:K,precondition:A,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:N.Ao.and(l.u.focus,I),primary:void 0,mac:{primary:2051}}})),(0,a.fK)(new At({id:"editor.action.selectAllMatches",precondition:A,handler:e=>e.selectAllMatches(),kbOpts:{weight:105,kbExpr:l.u.focus,primary:515}}))},2943:(e,t,i)=>{"use strict";i.r(t),i.d(t,{FoldingController:()=>G,editorFoldForeground:()=>te,foldBackgroundBackground:()=>ee});var n=i(3580),o=i(8401),r=i(7295),s=i(5393),a=i(2258),l=i(5976),c=i(6830),u=i(4669);const h=16777215,d=4278190080;class g{constructor(e,t,i){if(e.length!==t.length||e.length>65535)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new Uint32Array(Math.ceil(e.length/32)),this._types=i,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;let e=[],t=(t,i)=>{let n=e[e.length-1];return this.getStartLineNumber(n)<=t&&this.getEndLineNumber(n)>=i};for(let i=0,n=this._startIndexes.length;ih||o>h)throw new Error("startLineNumber or endLineNumber must not exceed 16777215");for(;e.length>0&&!t(n,o);)e.pop();let r=e.length>0?e[e.length-1]:-1;e.push(i),this._startIndexes[i]=n+((255&r)<<24),this._endIndexes[i]=o+((65280&r)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&h}getEndLineNumber(e){return this._endIndexes[e]&h}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){let t=e/32|0,i=e%32;return 0!=(this._collapseStates[t]&1<>>24)+((this._endIndexes[e]&d)>>>16);return 65535===t?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,i=this._startIndexes.length;if(0===i)return-1;for(;t=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);-1!==t;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){let e=[];for(let t=0;t=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}class p{constructor(e,t){this._updateEventEmitter=new u.Q5,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new g(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[],this._isInitialized=!1}get regions(){return this._regions}get textModel(){return this._textModel}get isInitialized(){return this._isInitialized}toggleCollapseState(e){if(!e.length)return;e=e.sort(((e,t)=>e.regionIndex-t.regionIndex));const t={};this._decorationProvider.changeDecorations((i=>{let n=0,o=-1,r=-1;const s=e=>{for(;nr&&(r=e),n++}};for(let i of e){let e=i.regionIndex,n=this._editorDecorationIds[e];if(n&&!t[n]){t[n]=!0,s(e);let i=!this._regions.isCollapsed(e);this._regions.setCollapsed(e,i),o=Math.max(o,this._regions.getEndLineNumber(e))}}s(this._regions.length)})),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}update(e,t=[]){let i=[],n=-1,o=(o,r)=>{const s=e.getStartLineNumber(o),a=e.getEndLineNumber(o);r&&((e,i)=>{for(let n of t)if(en&&(n=a)},r=0,s=()=>{for(;r=t))break;o(a,i===t),a++}}l=s()}for(;a0)return e}applyMemento(e){if(!Array.isArray(e))return;let t=[];for(let i of e){let e=this.getRegionAtLine(i.startLineNumber);e&&!e.isCollapsed&&t.push(e)}this.toggleCollapseState(t)}dispose(){this._decorationProvider.deltaDecorations(this._editorDecorationIds,[])}getAllRegionsAtLine(e,t){let i=[];if(this._regions){let n=this._regions.findRange(e),o=1;for(;n>=0;){let e=this._regions.toRegion(n);t&&!t(e,o)||i.push(e),o++,n=e.parentIndex}}return i}getRegionAtLine(e){if(this._regions){let t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){let i=[],n=e?e.regionIndex+1:0,o=e?e.endLineNumber:Number.MAX_VALUE;if(t&&2===t.length){const e=[];for(let r=n,s=this._regions.length;r0&&!n.containedBy(e[e.length-1]);)e.pop();e.push(n),t(n,e.length)&&i.push(n)}}else for(let e=n,r=this._regions.length;e0)for(let r of n){let n=e.getRegionAtLine(r);if(n&&(n.isCollapsed!==t&&o.push(n),i>1)){let r=e.getRegionsInside(n,((e,n)=>e.isCollapsed!==t&&ne.isCollapsed!==t&&ne.isCollapsed!==t&&n<=i));o.push(...n)}e.toggleCollapseState(o)}function v(e,t,i){let n=[];for(let t of i)n.push(e.getAllRegionsAtLine(t,void 0)[0]);let o=e.getRegionsInside(null,(e=>n.every((t=>!t.containedBy(e)&&!e.containedBy(t)))&&e.isCollapsed!==t));e.toggleCollapseState(o)}function b(e,t,i){let n=e.textModel,o=e.regions,r=[];for(let e=o.length-1;e>=0;e--)if(i!==o.isCollapsed(e)){let i=o.getStartLineNumber(e);t.test(n.getLineContent(i))&&r.push(o.toRegion(e))}e.toggleCollapseState(r)}function y(e,t,i){let n=e.regions,o=[];for(let e=n.length-1;e>=0;e--)i!==n.isCollapsed(e)&&t===n.getType(e)&&o.push(n.toRegion(e));e.toggleCollapseState(o)}var w=i(3411),C=i(3046),S=i(9554),x=i(7781);const k=(0,S.q5)("folding-expanded",C.lA.chevronDown,(0,n.N)("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),D=(0,S.q5)("folding-collapsed",C.lA.chevronRight,(0,n.N)("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin."));class L{constructor(e){this.editor=e,this.autoHideFoldingControls=!0,this.showFoldingHighlights=!0}getDecorationOption(e,t){return t?L.HIDDEN_RANGE_DECORATION:e?this.showFoldingHighlights?L.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:L.COLLAPSED_VISUAL_DECORATION:this.autoHideFoldingControls?L.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:L.EXPANDED_VISUAL_DECORATION}deltaDecorations(e,t){return this.editor.deltaDecorations(e,t)}changeDecorations(e){return this.editor.changeDecorations(e)}}L.COLLAPSED_VISUAL_DECORATION=w.qx.register({description:"folding-collapsed-visual-decoration",stickiness:1,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:x.kS.asClassName(D)}),L.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=w.qx.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:1,afterContentClassName:"inline-folded",className:"folded-background",isWholeLine:!0,firstLineDecorationClassName:x.kS.asClassName(D)}),L.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=w.qx.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:x.kS.asClassName(k)}),L.EXPANDED_VISUAL_DECORATION=w.qx.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+x.kS.asClassName(k)}),L.HIDDEN_RANGE_DECORATION=w.qx.register({description:"folding-hidden-range-decoration",stickiness:1});var N=i(9102),E=i(4314),A=i(9488);class M{constructor(e){this._updateEventEmitter=new u.Q5,this._foldingModel=e,this._foldingModelListener=e.onDidChange((e=>this.updateHiddenRanges())),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}updateHiddenRanges(){let e=!1,t=[],i=0,n=0,o=Number.MAX_VALUE,r=-1,s=this._foldingModel.regions;for(;i({startLineNumber:e.startLineNumber-1,endLineNumber:e.endLineNumber})))}applyHiddenRanges(e){this._hiddenRanges=e,this._updateEventEmitter.fire(e)}hasRanges(){return this._hiddenRanges.length>0}isHidden(e){return null!==I(this._hiddenRanges,e)}adjustSelections(e){let t=!1,i=this._foldingModel.textModel,n=null,o=e=>(n&&function(e,t){return e>=t.startLineNumber&&e<=t.endLineNumber}(e,n)||(n=I(this._hiddenRanges,e)),n?n.startLineNumber-1:null);for(let n=0,r=e.length;n0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function I(e,t){let i=(0,A.lG)(e,(e=>t=0&&e[i].endLineNumber>=t?e[i]:null}var T=i(3831);class R{constructor(e){this.editorModel=e,this.id="indent"}dispose(){}compute(e){let t=T.zu.getFoldingRules(this.editorModel.getLanguageIdentifier().id),i=t&&!!t.offSide,n=t&&t.markers;return Promise.resolve(function(e,t,i,n=5e3){const o=e.getOptions().tabSize;let r,s=new O(n);i&&(r=new RegExp(`(${i.start.source})|(?:${i.end.source})`));let a=[],l=e.getLineCount()+1;a.push({indent:-1,endAbove:l,line:l});for(let i=e.getLineCount();i>0;i--){let n,l=e.getLineContent(i),c=w.yO.computeIndentLevel(l,o),u=a[a.length-1];if(-1!==c){if(r&&(n=l.match(r))){if(!n[1]){a.push({indent:-2,endAbove:i,line:i});continue}{let e=a.length-1;for(;e>0&&-2!==a[e].indent;)e--;if(e>0){a.length=e+1,u=a[e],s.insertFirst(i,u.line,c),u.line=i,u.indent=c,u.endAbove=i;continue}}}if(u.indent>c){do{a.pop(),u=a[a.length-1]}while(u.indent>c);let e=u.endAbove-1;e-i>=1&&s.insertFirst(i,e,c)}u.indent===c?u.endAbove=i:a.push({indent:c,endAbove:i,line:i})}else t&&(u.endAbove=i)}return s.toIndentRanges(e)}(this.editorModel,i,n))}}class O{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,i){if(e>h||t>h)return;let n=this._length;this._startIndexes[n]=e,this._endIndexes[n]=t,this._length++,i<1e3&&(this._indentOccurrences[i]=(this._indentOccurrences[i]||0)+1)}toIndentRanges(e){if(this._length<=this._foldingRangesLimit){let e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=this._length-1,n=0;i>=0;i--,n++)e[n]=this._startIndexes[i],t[n]=this._endIndexes[i];return new g(e,t)}{let t=0,i=this._indentOccurrences.length;for(let e=0;ethis._foldingRangesLimit){i=e;break}t+=n}}const n=e.getOptions().tabSize;let o=new Uint32Array(this._foldingRangesLimit),r=new Uint32Array(this._foldingRangesLimit);for(let s=this._length-1,a=0;s>=0;s--){let l=this._startIndexes[s],c=e.getLineContent(l),u=w.yO.computeIndentLevel(c,n);(uPromise.resolve(e.provideFoldingRanges(t,B,i)).then((e=>{if(!i.isCancellationRequested&&Array.isArray(e)){Array.isArray(n)||(n=[]);let i=t.getLineCount();for(let t of e)t.start>0&&t.end>t.start&&t.end<=i&&n.push({start:t.start,end:t.end,rank:o,kind:t.kind})}}),P.Cp)));return Promise.all(o).then((e=>n))}(this.providers,this.editorModel,e).then((e=>e?H(e,this.limit):null))}dispose(){var e;null===(e=this.disposables)||void 0===e||e.dispose()}}class V{constructor(e){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,i,n){if(e>h||t>h)return;let o=this._length;this._startIndexes[o]=e,this._endIndexes[o]=t,this._nestingLevels[o]=n,this._types[o]=i,this._length++,n<30&&(this._nestingLevelCounts[n]=(this._nestingLevelCounts[n]||0)+1)}toIndentRanges(){if(this._length<=this._foldingRangesLimit){let e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=0;ithis._foldingRangesLimit){t=i;break}e+=n}}let i=new Uint32Array(this._foldingRangesLimit),n=new Uint32Array(this._foldingRangesLimit),o=[];for(let r=0,s=0;r{let i=e.start-t.start;return 0===i&&(i=e.rank-t.rank),i})),o=new V(t),r=[];for(let e of n)if(i){if(e.start>i.start)if(e.end<=i.end)r.push(i),i=e,o.add(e.start,e.end,e.kind&&e.kind.value,r.length);else{if(e.start>i.end){do{i=r.pop()}while(i&&e.start>i.end);i&&r.push(i),i=e}o.add(e.start,e.end,e.kind&&e.kind.value,r.length)}}else i=e,o.add(e.start,e.end,e.kind&&e.kind.value,r.length);return o.toIndentRanges()}const $="init";class U{constructor(e,t,i,n){if(this.editorModel=e,this.id=$,t.length){let o=t=>({range:{startLineNumber:t.startLineNumber,startColumn:0,endLineNumber:t.endLineNumber,endColumn:e.getLineLength(t.endLineNumber)},options:{description:"folding-initializing-range-provider",stickiness:1}});this.decorationIds=e.deltaDecorations([],t.map(o)),this.timeout=setTimeout(i,n)}}dispose(){this.decorationIds&&(this.editorModel.deltaDecorations(this.decorationIds,[]),this.decorationIds=void 0),"number"==typeof this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0)}compute(e){let t=[];if(this.decorationIds)for(let e of this.decorationIds){let i=this.editorModel.getDecorationRange(e);i&&t.push({start:i.startLineNumber,end:i.endLineNumber,rank:1})}return Promise.resolve(H(t,Number.MAX_VALUE))}}var j=i(8819),q=i(3910);const K=new j.uy("foldingEnabled",!1);let G=class e extends l.JT{constructor(e,t){super(),this.contextKeyService=t,this.localToDispose=this._register(new l.SL),this.editor=e;const i=this.editor.getOptions();this._isEnabled=i.get(35),this._useFoldingProviders="indentation"!==i.get(36),this._unfoldOnClickAfterEndOfLine=i.get(38),this._restoringViewState=!1,this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingStateMemento=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new L(e),this.foldingDecorationProvider.autoHideFoldingControls="mouseover"===i.get(97),this.foldingDecorationProvider.showFoldingHighlights=i.get(37),this.foldingEnabled=K.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel((()=>this.onModelChanged()))),this._register(this.editor.onDidChangeConfiguration((e=>{if(e.hasChanged(35)&&(this._isEnabled=this.editor.getOptions().get(35),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),e.hasChanged(97)||e.hasChanged(37)){const e=this.editor.getOptions();this.foldingDecorationProvider.autoHideFoldingControls="mouseover"===e.get(97),this.foldingDecorationProvider.showFoldingHighlights=e.get(37),this.onModelContentChanged()}e.hasChanged(36)&&(this._useFoldingProviders="indentation"!==this.editor.getOptions().get(36),this.onFoldingStrategyChanged()),e.hasChanged(38)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(38))}))),this.onModelChanged()}static get(t){return t.getContribution(e.ID)}saveViewState(){let e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){let t=this.foldingModel.isInitialized?this.foldingModel.getMemento():this.hiddenRangeModel.getMemento(),i=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:i}}}restoreViewState(e){let t=this.editor.getModel();if(!t||!this._isEnabled||t.isTooLargeForTokenization()||!this.hiddenRangeModel)return;if(!e||!e.collapsedRegions||e.lineCount!==t.getLineCount())return;e.provider!==z&&e.provider!==$||(this.foldingStateMemento=e);const i=e.collapsedRegions;if(this.hiddenRangeModel.applyMemento(i)){const e=this.getFoldingModel();e&&e.then((e=>{if(e){this._restoringViewState=!0;try{e.applyMemento(i)}finally{this._restoringViewState=!1}}})).then(void 0,P.dL)}}onModelChanged(){this.localToDispose.clear();let e=this.editor.getModel();this._isEnabled&&e&&!e.isTooLargeForTokenization()&&(this.foldingModel=new p(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new M(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange((e=>this.onHiddenRangesChanges(e)))),this.updateScheduler=new s.vp(200),this.cursorChangedScheduler=new s.pY((()=>this.revealCursor()),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(F.aC.onDidChange((()=>this.onFoldingStrategyChanged()))),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration((()=>this.onFoldingStrategyChanged()))),this.localToDispose.add(this.editor.onDidChangeModelContent((()=>this.onModelContentChanged()))),this.localToDispose.add(this.editor.onDidChangeCursorPosition((()=>this.onCursorPositionChanged()))),this.localToDispose.add(this.editor.onMouseDown((e=>this.onEditorMouseDown(e)))),this.localToDispose.add(this.editor.onMouseUp((e=>this.onEditorMouseUp(e)))),this.localToDispose.add({dispose:()=>{this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.updateScheduler&&this.updateScheduler.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,this.foldingStateMemento=null,this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null}}),this.onModelContentChanged())}onFoldingStrategyChanged(){this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null,this.onModelContentChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;if(this.rangeProvider=new R(e),this._useFoldingProviders&&this.foldingModel){let t=F.aC.ordered(this.foldingModel.textModel);if(0===t.length&&this.foldingStateMemento&&this.foldingStateMemento.collapsedRegions)return this.rangeProvider=new U(e,this.foldingStateMemento.collapsedRegions,(()=>{this.foldingStateMemento=null,this.onFoldingStrategyChanged()}),3e4);t.length>0&&(this.rangeProvider=new W(e,t,(()=>this.onModelContentChanged())))}return this.foldingStateMemento=null,this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onModelContentChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger((()=>{const e=this.foldingModel;if(!e)return null;let t=this.foldingRegionPromise=(0,s.PG)((t=>this.getRangeProvider(e.textModel).compute(t)));return t.then((i=>{if(i&&t===this.foldingRegionPromise){let t=this.editor.getSelections(),n=t?t.map((e=>e.startLineNumber)):[];e.update(i,n)}return e}))})).then(void 0,(e=>((0,P.dL)(e),null))))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){let e=this.editor.getSelections();e&&this.hiddenRangeModel.adjustSelections(e)&&this.editor.setSelections(e)}this.editor.setHiddenAreas(e)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();e&&e.then((e=>{if(e){let t=this.editor.getSelections();if(t&&t.length>0){let i=[];for(let n of t){let t=n.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(t)&&i.push(...e.getAllRegionsAtLine(t,(e=>e.isCollapsed&&t>e.startLineNumber)))}i.length&&(e.toggleCollapseState(i),this.reveal(t[0].getPosition()))}}})).then(void 0,P.dL)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range)return;if(!e.event.leftButton&&!e.event.middleButton)return;const t=e.target.range;let i=!1;switch(e.target.type){case 4:const n=e.target.detail,o=e.target.element.offsetLeft;if(n.offsetX-o<5)return;i=!0;break;case 7:if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return;case 6:if(this.hiddenRangeModel.hasRanges()){let e=this.editor.getModel();if(e&&t.startColumn===e.getLineMaxColumn(t.startLineNumber))break}return;default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:i}}onEditorMouseUp(e){const t=this.getFoldingModel();if(!t||!this.mouseDownInfo||!e.target)return;let i=this.mouseDownInfo.lineNumber,n=this.mouseDownInfo.iconClicked,o=e.target.range;if(o&&o.startLineNumber===i){if(n){if(4!==e.target.type)return}else{let e=this.editor.getModel();if(!e||o.startColumn!==e.getLineMaxColumn(i))return}t.then((t=>{if(t){let o=t.getRegionAtLine(i);if(o&&o.startLineNumber===i){let r=o.isCollapsed;if(n||r){let n=[];if(e.event.altKey){let e=e=>!e.containedBy(o)&&!o.containedBy(e),i=t.getRegionsInside(null,e);for(const e of i)e.isCollapsed&&n.push(e);0===n.length&&(n=i)}else{let i=e.event.middleButton||e.event.shiftKey;if(i)for(const e of t.getRegionsInside(o))e.isCollapsed===r&&n.push(e);!r&&i&&0!==n.length||n.push(o)}t.toggleCollapseState(n),this.reveal({lineNumber:i,column:1})}}}})).then(void 0,P.dL)}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};var Y,Z;G.ID="editor.contrib.folding",G=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(Y=1,Z=j.i6,function(e,t){Z(e,t,Y)})],G);class X extends c.R6{runEditorCommand(e,t,i){let n=G.get(t);if(!n)return;let o=n.getFoldingModel();return o?(this.reportTelemetry(e,t),o.then((e=>{if(e){this.invoke(n,e,t,i);const o=t.getSelection();o&&n.reveal(o.getStartPosition())}}))):void 0}getSelectedLines(e){let t=e.getSelections();return t?t.map((e=>e.startLineNumber)):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map((e=>e+1)):this.getSelectedLines(t)}run(e,t){}}function Q(e){if(!o.o8(e)){if(!o.Kn(e))return!1;const t=e;if(!o.o8(t.levels)&&!o.hj(t.levels))return!1;if(!o.o8(t.direction)&&!o.HD(t.direction))return!1;if(!(o.o8(t.selectionLines)||o.kJ(t.selectionLines)&&t.selectionLines.every(o.hj)))return!1}return!0}class J extends X{getFoldingLevel(){return parseInt(this.id.substr(J.ID_PREFIX.length))}invoke(e,t,i){!function(e,t,i,n){let o=e.getRegionsInside(null,((e,i)=>i===t&&true!==e.isCollapsed&&!n.some((t=>e.containsLine(t)))));e.toggleCollapseState(o)}(t,this.getFoldingLevel(),0,this.getSelectedLines(i))}}J.ID_PREFIX="editor.foldLevel",J.ID=e=>J.ID_PREFIX+e,(0,c._K)(G.ID,G),(0,c.Qr)(class extends X{constructor(){super({id:"editor.unfold",label:n.N("unfoldAction.label","Unfold"),alias:"Unfold",precondition:K,kbOpts:{kbExpr:N.u.editorTextFocus,primary:3161,mac:{primary:2649},weight:100},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t* 'levels': Number of levels to unfold. If not set, defaults to 1.\n\t\t\t\t\t\t* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.\n\t\t\t\t\t\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t",constraint:Q,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){let o=n&&n.levels||1,r=this.getLineNumbers(n,i);n&&"up"===n.direction?_(t,!1,o,r):m(t,!1,o,r)}}),(0,c.Qr)(class extends X{constructor(){super({id:"editor.unfoldRecursively",label:n.N("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:K,kbOpts:{kbExpr:N.u.editorTextFocus,primary:(0,a.gx)(2089,2137),weight:100}})}invoke(e,t,i,n){m(t,!1,Number.MAX_VALUE,this.getSelectedLines(i))}}),(0,c.Qr)(class extends X{constructor(){super({id:"editor.fold",label:n.N("foldAction.label","Fold"),alias:"Fold",precondition:K,kbOpts:{kbExpr:N.u.editorTextFocus,primary:3159,mac:{primary:2647},weight:100},description:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t\t* 'levels': Number of levels to fold.\n\t\t\t\t\t\t\t* 'direction': If 'up', folds given number of levels up otherwise folds down.\n\t\t\t\t\t\t\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t\tIf no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.\n\t\t\t\t\t\t",constraint:Q,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){let o=this.getLineNumbers(n,i);const r=n&&n.levels,s=n&&n.direction;"number"!=typeof r&&"string"!=typeof s?function(e,t,i){let n=[];for(let t of i){let i=e.getAllRegionsAtLine(t,(e=>true!==e.isCollapsed));i.length>0&&n.push(i[0])}e.toggleCollapseState(n)}(t,0,o):"up"===s?_(t,!0,r||1,o):m(t,!0,r||1,o)}}),(0,c.Qr)(class extends X{constructor(){super({id:"editor.foldRecursively",label:n.N("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:K,kbOpts:{kbExpr:N.u.editorTextFocus,primary:(0,a.gx)(2089,2135),weight:100}})}invoke(e,t,i){let n=this.getSelectedLines(i);m(t,!0,Number.MAX_VALUE,n)}}),(0,c.Qr)(class extends X{constructor(){super({id:"editor.foldAll",label:n.N("foldAllAction.label","Fold All"),alias:"Fold All",precondition:K,kbOpts:{kbExpr:N.u.editorTextFocus,primary:(0,a.gx)(2089,2069),weight:100}})}invoke(e,t,i){m(t,!0)}}),(0,c.Qr)(class extends X{constructor(){super({id:"editor.unfoldAll",label:n.N("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:K,kbOpts:{kbExpr:N.u.editorTextFocus,primary:(0,a.gx)(2089,2088),weight:100}})}invoke(e,t,i){m(t,!1)}}),(0,c.Qr)(class extends X{constructor(){super({id:"editor.foldAllBlockComments",label:n.N("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:K,kbOpts:{kbExpr:N.u.editorTextFocus,primary:(0,a.gx)(2089,2133),weight:100}})}invoke(e,t,i){if(t.regions.hasTypes())y(t,F.AD.Comment.value,!0);else{const e=i.getModel();if(!e)return;let n=T.zu.getComments(e.getLanguageIdentifier().id);n&&n.blockCommentStartToken&&b(t,new RegExp("^\\s*"+(0,r.ec)(n.blockCommentStartToken)),!0)}}}),(0,c.Qr)(class extends X{constructor(){super({id:"editor.foldAllMarkerRegions",label:n.N("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:K,kbOpts:{kbExpr:N.u.editorTextFocus,primary:(0,a.gx)(2089,2077),weight:100}})}invoke(e,t,i){if(t.regions.hasTypes())y(t,F.AD.Region.value,!0);else{const e=i.getModel();if(!e)return;let n=T.zu.getFoldingRules(e.getLanguageIdentifier().id);n&&n.markers&&n.markers.start&&b(t,new RegExp(n.markers.start),!0)}}}),(0,c.Qr)(class extends X{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:n.N("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:K,kbOpts:{kbExpr:N.u.editorTextFocus,primary:(0,a.gx)(2089,2078),weight:100}})}invoke(e,t,i){if(t.regions.hasTypes())y(t,F.AD.Region.value,!1);else{const e=i.getModel();if(!e)return;let n=T.zu.getFoldingRules(e.getLanguageIdentifier().id);n&&n.markers&&n.markers.start&&b(t,new RegExp(n.markers.start),!1)}}}),(0,c.Qr)(class extends X{constructor(){super({id:"editor.foldAllExcept",label:n.N("foldAllExcept.label","Fold All Regions Except Selected"),alias:"Fold All Regions Except Selected",precondition:K,kbOpts:{kbExpr:N.u.editorTextFocus,primary:(0,a.gx)(2089,2131),weight:100}})}invoke(e,t,i){v(t,!0,this.getSelectedLines(i))}}),(0,c.Qr)(class extends X{constructor(){super({id:"editor.unfoldAllExcept",label:n.N("unfoldAllExcept.label","Unfold All Regions Except Selected"),alias:"Unfold All Regions Except Selected",precondition:K,kbOpts:{kbExpr:N.u.editorTextFocus,primary:(0,a.gx)(2089,2129),weight:100}})}invoke(e,t,i){v(t,!1,this.getSelectedLines(i))}}),(0,c.Qr)(class extends X{constructor(){super({id:"editor.toggleFold",label:n.N("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:K,kbOpts:{kbExpr:N.u.editorTextFocus,primary:(0,a.gx)(2089,2090),weight:100}})}invoke(e,t,i){!function(e,t,i){let n=[];for(let t of i){let i=e.getRegionAtLine(t);if(i){i.isCollapsed;n.push(i),0}}e.toggleCollapseState(n)}(t,0,this.getSelectedLines(i))}});for(let e=1;e<=7;e++)(0,c.QG)(new J({id:J.ID(e),label:n.N("foldLevelAction.label","Fold Level {0}",e),alias:`Fold Level ${e}`,precondition:K,kbOpts:{kbExpr:N.u.editorTextFocus,primary:(0,a.gx)(2089,2048|21+e),weight:100}}));const ee=(0,q.P6)("editor.foldBackground",{light:(0,q.Zn)(q.hE,.3),dark:(0,q.Zn)(q.hE,.3),hc:null},n.N("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0),te=(0,q.P6)("editorGutter.foldingControlForeground",{dark:q.XZ,light:q.XZ,hc:q.XZ},n.N("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));(0,x.Ic)(((e,t)=>{const i=e.getColor(ee);i&&t.addRule(`.monaco-editor .folded-background { background-color: ${i}; }`);const n=e.getColor(te);n&&t.addRule(`\n\t\t.monaco-editor .cldr${x.kS.asCSSSelector(k)},\n\t\t.monaco-editor .cldr${x.kS.asCSSSelector(D)} {\n\t\t\tcolor: ${n} !important;\n\t\t}\n\t\t`)}))},3111:(e,t,i)=>{"use strict";i.r(t);var n=i(3580),o=i(6830),r=i(2334);class s extends o.R6{constructor(){super({id:"editor.action.fontZoomIn",label:n.N("EditorFontZoomIn.label","Editor Font Zoom In"),alias:"Editor Font Zoom In",precondition:void 0})}run(e,t){r.C.setZoomLevel(r.C.getZoomLevel()+1)}}class a extends o.R6{constructor(){super({id:"editor.action.fontZoomOut",label:n.N("EditorFontZoomOut.label","Editor Font Zoom Out"),alias:"Editor Font Zoom Out",precondition:void 0})}run(e,t){r.C.setZoomLevel(r.C.getZoomLevel()-1)}}class l extends o.R6{constructor(){super({id:"editor.action.fontZoomReset",label:n.N("EditorFontZoomReset.label","Editor Font Zoom Reset"),alias:"Editor Font Zoom Reset",precondition:void 0})}run(e,t){r.C.setZoomLevel(0)}}(0,o.Qr)(s),(0,o.Qr)(a),(0,o.Qr)(l)},3606:(e,t,i)=>{"use strict";i.d(t,{xC:()=>L,Zg:()=>k,x$:()=>N,Qq:()=>A,Qs:()=>I});var n=i(5152),o=i(9488),r=i(1050),s=i(7301),a=i(666),l=i(9925),c=i(5520),u=i(187),h=i(4314),d=i(3860),g=i(4101),f=i(469),p=i(1200),m=i(9939),_=i(3580);class v{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return"string"==typeof e?e.toLowerCase():e._lower}}var b=i(2065),y=i(1741),w=i(4565),C=i(8401),S=i(3725),x=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function k(e){if(!(e=e.filter((e=>e.range))).length)return;let{range:t}=e[0];for(let i=1;ie.provideDocumentRangeFormattingEdits(t,t.getFullModelRange(),i,n)})}return t}class L{static setFormatterSelector(e){return{dispose:L._selectors.unshift(e)}}static select(e,t,i){return x(this,void 0,void 0,(function*(){if(0===e.length)return;const n=S.$.first(L._selectors);return n?yield n(e,t,i):void 0}))}}function N(e,t,i,n,o,r){return x(this,void 0,void 0,(function*(){const s=e.get(b.TG),a=(0,c.CL)(t)?t.getModel():t,l=g.vN.ordered(a),u=yield L.select(l,a,n);u&&(o.report(u),yield s.invokeFunction(E,u,t,i,r))}))}function E(e,t,i,n,r){return x(this,void 0,void 0,(function*(){const s=e.get(f.p);let a,u;(0,c.CL)(i)?(a=i.getModel(),u=new l.Dl(i,5,void 0,r)):(a=i,u=new l.YQ(i,r));let g=[],p=0;for(let e of(0,o._2)(n).sort(h.e.compareRangesUsingStarts))p>0&&h.e.areIntersectingOrTouching(g[p-1],e)?g[p-1]=h.e.fromPositions(g[p-1].getStartPosition(),e.getEndPosition()):p=g.push(e);const _=[];for(let e of g)try{const i=yield t.provideDocumentRangeFormattingEdits(a,e,a.getFormattingOptions(),u.token),n=yield s.computeMoreMinimalEdits(a.uri,i);if(n&&_.push(...n),u.token.isCancellationRequested)return!0}finally{u.dispose()}if(0===_.length)return!1;if((0,c.CL)(i))m.V.execute(i,_,!0),k(_),i.revealPositionInCenterIfOutsideViewport(i.getPosition(),1);else{const[{range:e}]=_,t=new d.Y(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);a.pushEditOperations([t],_.map((e=>({text:e.text,range:h.e.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(h.e.areIntersectingOrTouching(i,t))return[new d.Y(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return!0}))}function A(e,t,i,n,o){return x(this,void 0,void 0,(function*(){const r=e.get(b.TG),s=(0,c.CL)(t)?t.getModel():t,a=D(s),l=yield L.select(a,s,i);l&&(n.report(l),yield r.invokeFunction(M,l,t,i,o))}))}function M(e,t,i,n,o){return x(this,void 0,void 0,(function*(){const r=e.get(f.p);let s,a,u;(0,c.CL)(i)?(s=i.getModel(),a=new l.Dl(i,5,void 0,o)):(s=i,a=new l.YQ(i,o));try{const e=yield t.provideDocumentFormattingEdits(s,s.getFormattingOptions(),a.token);if(u=yield r.computeMoreMinimalEdits(s.uri,e),a.token.isCancellationRequested)return!0}finally{a.dispose()}if(!u||0===u.length)return!1;if((0,c.CL)(i))m.V.execute(i,u,2!==n),2!==n&&(k(u),i.revealPositionInCenterIfOutsideViewport(i.getPosition(),1));else{const[{range:e}]=u,t=new d.Y(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);s.pushEditOperations([t],u.map((e=>({text:e.text,range:h.e.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(h.e.areIntersectingOrTouching(i,t))return[new d.Y(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return!0}))}function I(e,t,i,n,o){const a=g.ln.ordered(t);return 0===a.length||a[0].autoFormatTriggerCharacters.indexOf(n)<0?Promise.resolve(void 0):Promise.resolve(a[0].provideOnTypeFormattingEdits(t,i,n,o,r.T.None)).catch(s.Cp).then((i=>e.computeMoreMinimalEdits(t.uri,i)))}L._selectors=new y.S,w.P.registerCommand("_executeFormatRangeProvider",(function(e,...t){const[i,n,l]=t;(0,C.p_)(a.o.isUri(i)),(0,C.p_)(h.e.isIRange(n));const c=e.get(p.q).getModel(i);if(!c)throw(0,s.b1)("resource");return function(e,t,i,n,r){return x(this,void 0,void 0,(function*(){const a=g.vN.ordered(t);for(const l of a){let a=yield Promise.resolve(l.provideDocumentRangeFormattingEdits(t,i,n,r)).catch(s.Cp);if((0,o.Of)(a))return yield e.computeMoreMinimalEdits(t.uri,a)}}))}(e.get(f.p),c,h.e.lift(n),l,r.T.None)})),w.P.registerCommand("_executeFormatDocumentProvider",(function(e,...t){const[i,n]=t;(0,C.p_)(a.o.isUri(i));const l=e.get(p.q).getModel(i);if(!l)throw(0,s.b1)("resource");return function(e,t,i,n){return x(this,void 0,void 0,(function*(){const r=D(t);for(const a of r){let r=yield Promise.resolve(a.provideDocumentFormattingEdits(t,i,n)).catch(s.Cp);if((0,o.Of)(r))return yield e.computeMoreMinimalEdits(t.uri,r)}}))}(e.get(f.p),l,n,r.T.None)})),w.P.registerCommand("_executeFormatOnTypeProvider",(function(e,...t){const[i,n,o,r]=t;(0,C.p_)(a.o.isUri(i)),(0,C.p_)(u.L.isIPosition(n)),(0,C.p_)("string"==typeof o);const l=e.get(p.q).getModel(i);if(!l)throw(0,s.b1)("resource");return I(e.get(f.p),l,u.L.lift(n),o,r)}))},4818:(e,t,i)=>{"use strict";i.r(t);var n=i(9488),o=i(1050),r=i(2258),s=i(5976),a=i(6830),l=i(1640),c=i(4906),u=i(4314),h=i(9102),d=i(4101),g=i(469),f=i(3606),p=i(9939),m=i(3580),_=i(4565),v=i(8819),b=i(2065),y=i(7301),w=i(535),C=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},S=function(e,t){return function(i,n){t(i,n,e)}},x=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};let k=class{constructor(e,t){this._workerService=t,this._callOnDispose=new s.SL,this._callOnModel=new s.SL,this._editor=e,this._callOnDispose.add(e.onDidChangeConfiguration((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModel((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModelLanguage((()=>this._update()))),this._callOnDispose.add(d.ln.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){if(this._callOnModel.clear(),!this._editor.getOption(45))return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),[t]=d.ln.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;let i=new c.q;for(let e of t.autoFormatTriggerCharacters)i.add(e.charCodeAt(0));this._callOnModel.add(this._editor.onDidType((e=>{let t=e.charCodeAt(e.length-1);i.has(t)&&this._trigger(String.fromCharCode(t))})))}_trigger(e){if(!this._editor.hasModel())return;if(this._editor.getSelections().length>1)return;const t=this._editor.getModel(),i=this._editor.getPosition();let o=!1;const r=this._editor.onDidChangeModelContent((e=>{if(e.isFlush)return o=!0,void r.dispose();for(let t=0,n=e.changes.length;t{r.dispose(),o||(0,n.Of)(e)&&(p.V.execute(this._editor,e,!0),(0,f.Zg)(e))}),(e=>{throw r.dispose(),e}))}};k.ID="editor.contrib.autoFormat",k=C([S(1,g.p)],k);let D=class{constructor(e,t){this.editor=e,this._instantiationService=t,this._callOnDispose=new s.SL,this._callOnModel=new s.SL,this._callOnDispose.add(e.onDidChangeConfiguration((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModel((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModelLanguage((()=>this._update()))),this._callOnDispose.add(d.vN.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(44)&&this.editor.hasModel()&&d.vN.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste((({range:e})=>this._trigger(e))))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(f.x$,this.editor,e,2,w.E.None,o.T.None).catch(y.dL))}};D.ID="editor.contrib.formatOnPaste",D=C([S(1,b.TG)],D);class L extends a.R6{constructor(){super({id:"editor.action.formatDocument",label:m.N("formatDocument.label","Format Document"),alias:"Format Document",precondition:v.Ao.and(h.u.notInCompositeEditor,h.u.writable,h.u.hasDocumentFormattingProvider),kbOpts:{kbExpr:h.u.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(e,t){return x(this,void 0,void 0,(function*(){if(t.hasModel()){const i=e.get(b.TG),n=e.get(w.e);yield n.showWhile(i.invokeFunction(f.Qq,t,1,w.E.None,o.T.None),250)}}))}}class N extends a.R6{constructor(){super({id:"editor.action.formatSelection",label:m.N("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:v.Ao.and(h.u.writable,h.u.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:h.u.editorTextFocus,primary:(0,r.gx)(2089,2084),weight:100},contextMenuOpts:{when:h.u.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(e,t){return x(this,void 0,void 0,(function*(){if(!t.hasModel())return;const i=e.get(b.TG),n=t.getModel(),r=t.getSelections().map((e=>e.isEmpty()?new u.e(e.startLineNumber,1,e.startLineNumber,n.getLineMaxColumn(e.startLineNumber)):e)),s=e.get(w.e);yield s.showWhile(i.invokeFunction(f.x$,t,r,1,w.E.None,o.T.None),250)}))}}(0,a._K)(k.ID,k),(0,a._K)(D.ID,D),(0,a.Qr)(L),(0,a.Qr)(N),_.P.registerCommand("editor.action.format",(e=>x(void 0,void 0,void 0,(function*(){const t=e.get(l.$).getFocusedCodeEditor();if(!t||!t.hasModel())return;const i=e.get(_.H);t.getSelection().isEmpty()?yield i.executeCommand("editor.action.formatDocument"):yield i.executeCommand("editor.action.formatSelection")}))))},9939:(e,t,i)=>{"use strict";i.d(t,{V:()=>r});var n=i(9386),o=i(4314);class r{static _handleEolEdits(e,t){let i,n=[];for(let e of t)"number"==typeof e.eol&&(i=e.eol),e.range&&"string"==typeof e.text&&n.push(e);return"number"==typeof i&&e.hasModel()&&e.getModel().pushEOL(i),n}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;const i=e.getModel(),n=i.validateRange(t.range);return i.getFullModelRange().equalsRange(n)}static execute(e,t,i){i&&e.pushUndoStop();const s=r._handleEolEdits(e,t);1===s.length&&r._isFullModelReplaceEdit(e,s[0])?e.executeEdits("formatEditsCommand",s.map((e=>n.h.replace(o.e.lift(e.range),e.text)))):e.executeEdits("formatEditsCommand",s.map((e=>n.h.replaceMove(o.e.lift(e.range),e.text)))),i&&e.pushUndoStop()}}},2698:(e,t,i)=>{"use strict";i.r(t),i.d(t,{MarkerController:()=>J,NextMarkerAction:()=>te});var n,o=i(3580),r=i(5976),s=i(8819),a=i(187),l=i(4314),c=i(6830),u=i(9102),h=i(5321),d=i(8674),g=i(3910),f=i(7781),p=i(1264),m=i(9802),_=i(8843),v=i(9488),b=i(4669),y=i(2043),w=i(5935),C=i(4603),S=i(3046);!function(e){e.className=function(e){switch(e){case C.Z.Ignore:return"severity-ignore "+S.lA.info.classNames;case C.Z.Info:return S.lA.info.classNames;case C.Z.Warning:return S.lA.warning.classNames;case C.Z.Error:return S.lA.error.classNames;default:return""}}}(n||(n={})),(0,f.Ic)(((e,t)=>{const i=e.getColor(g.Jp);if(i){const e=S.lA.error.cssSelector;t.addRule(`\n\t\t\t.monaco-editor .zone-widget ${e},\n\t\t\t.markers-panel .marker-icon${e},\n\t\t\t.extensions-viewlet > .extensions ${e} {\n\t\t\t\tcolor: ${i};\n\t\t\t}\n\t\t`)}const n=e.getColor(g.BO);if(n){const e=S.lA.warning.cssSelector;t.addRule(`\n\t\t\t.monaco-editor .zone-widget ${e},\n\t\t\t.markers-panel .marker-icon${e},\n\t\t\t.extensions-viewlet > .extensions ${e},\n\t\t\t.extension-editor ${e} {\n\t\t\t\tcolor: ${n};\n\t\t\t}\n\t\t`)}const o=e.getColor(g.OL);if(o){const e=S.lA.info.cssSelector;t.addRule(`\n\t\t\t.monaco-editor .zone-widget ${e},\n\t\t\t.markers-panel .marker-icon${e},\n\t\t\t.extensions-viewlet > .extensions ${e},\n\t\t\t.extension-editor ${e} {\n\t\t\t\tcolor: ${o};\n\t\t\t}\n\t\t`)}}));var x=i(988),k=i(4144),D=i(8335),L=i(2065),N=i(7295),E=i(4349),A=function(e,t){return function(i,n){t(i,n,e)}};class M{constructor(e,t,i,n,o){this._openerService=n,this._labelService=o,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new r.SL,this._editor=t;const s=document.createElement("div");s.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),s.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),s.appendChild(this._relatedBlock),this._disposables.add(h.mu(this._relatedBlock,"click",(e=>{e.preventDefault();const t=this._relatedDiagnostics.get(e.target);t&&i(t)}))),this._scrollable=new m.NB(s,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:3,verticalScrollbarSize:3}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll((e=>{s.style.left=`-${e.scrollLeft}px`,s.style.top=`-${e.scrollTop}px`}))),this._disposables.add(this._scrollable)}dispose(){(0,r.B9)(this._disposables)}update(e){const{source:t,message:i,relatedInformation:n,code:o}=e;let r=((null==t?void 0:t.length)||0)+"()".length;o&&(r+="string"==typeof o?o.length:o.value.length);const s=(0,N.uq)(i);this._lines=s.length,this._longestLineLength=0;for(const e of s)this._longestLineLength=Math.max(e.length+r,this._longestLineLength);h.PO(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let a=this._messageBlock;for(const e of s)a=document.createElement("div"),a.innerText=e,""===e&&(a.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(a);if(t||o){const e=document.createElement("span");if(e.classList.add("details"),a.appendChild(e),t){const i=document.createElement("span");i.innerText=t,i.classList.add("source"),e.appendChild(i)}if(o)if("string"==typeof o){const t=document.createElement("span");t.innerText=`(${o})`,t.classList.add("code"),e.appendChild(t)}else this._codeLink=h.$("a.code-link"),this._codeLink.setAttribute("href",`${o.target.toString()}`),this._codeLink.onclick=e=>{this._openerService.open(o.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()},h.R3(this._codeLink,h.$("span")).innerText=o.value,e.appendChild(this._codeLink)}if(h.PO(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),(0,v.Of)(n)){const e=this._relatedBlock.appendChild(document.createElement("div"));e.style.paddingTop=`${Math.floor(.66*this._editor.getOption(56))}px`,this._lines+=1;for(const t of n){let i=document.createElement("div"),n=document.createElement("a");n.classList.add("filename"),n.innerText=`${(0,_.p)(t.resource)}(${t.startLineNumber}, ${t.startColumn}): `,n.title=this._labelService.getUriLabel(t.resource),this._relatedDiagnostics.set(n,t);let o=document.createElement("span");o.innerText=t.message,i.appendChild(n),i.appendChild(o),this._lines+=1,e.appendChild(i)}}const l=this._editor.getOption(40),c=Math.ceil(l.typicalFullwidthCharacterWidth*this._longestLineLength*.75),u=l.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:c,scrollHeight:u})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case d.ZL.Error:t=o.N("Error","Error");break;case d.ZL.Warning:t=o.N("Warning","Warning");break;case d.ZL.Info:t=o.N("Info","Info");break;case d.ZL.Hint:t=o.N("Hint","Hint")}let i=o.N("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const n=this._editor.getModel();return n&&e.startLineNumber<=n.getLineCount()&&e.startLineNumber>=1&&(i=`${n.getLineContent(e.startLineNumber)}, ${i}`),i}}let I=class e extends y.vk{constructor(e,t,i,n,o,s,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0},o),this._themeService=t,this._openerService=i,this._menuService=n,this._contextKeyService=s,this._labelService=a,this._callOnDispose=new r.SL,this._onDidSelectRelatedInformation=new b.Q5,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=d.ZL.Warning,this._backgroundColor=p.Il.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(z);let t=F;this._severity===d.ZL.Warning?t=P:this._severity===d.ZL.Info&&(t=B);const i=e.getColor(t);this.style({arrowColor:i,frameColor:i,headerBackgroundColor:this._backgroundColor,primaryHeadingColor:e.getColor(y.IH),secondaryHeadingColor:e.getColor(y.R7)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(t){super._fillHead(t),this._disposables.add(this._actionbarWidget.actionRunner.onBeforeRun((e=>this.editor.focus())));const i=[],n=this._menuService.createMenu(e.TitleMenu,this._contextKeyService);(0,D.vr)(n,void 0,i),this._actionbarWidget.push(i,{label:!1,icon:!0,index:0}),n.dispose()}_fillTitleIcon(e){this._icon=h.R3(e,h.$(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new M(this._container,this.editor,(e=>this._onDidSelectRelatedInformation.fire(e)),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,i){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());let r=l.e.lift(e);const s=this.editor.getPosition();let a=s&&r.containsPosition(s)?s:r.getStartPosition();super.show(a,this.computeRequiredHeight());const c=this.editor.getModel();if(c){const e=i>1?o.N("problems","{0} of {1} problems",t,i):o.N("change","{0} of {1} problem",t,i);this.setTitle((0,w.EZ)(c.uri),e)}this._icon.className=`codicon ${n.className(d.ZL.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(a,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};I.TitleMenu=new k.eH("gotoErrorTitleMenu"),I=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([A(1,f.XE),A(2,x.v4),A(3,k.co),A(4,L.TG),A(5,s.i6),A(6,E.e)],I);let T=(0,g.kw)(g.lX,g.b6),R=(0,g.kw)(g.uo,g.pW),O=(0,g.kw)(g.c6,g.T8);const F=(0,g.P6)("editorMarkerNavigationError.background",{dark:T,light:T,hc:T},o.N("editorMarkerNavigationError","Editor marker navigation widget error color.")),P=(0,g.P6)("editorMarkerNavigationWarning.background",{dark:R,light:R,hc:R},o.N("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),B=(0,g.P6)("editorMarkerNavigationInfo.background",{dark:O,light:O,hc:O},o.N("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),z=(0,g.P6)("editorMarkerNavigation.background",{dark:"#2D2D30",light:p.Il.white,hc:"#0C141F"},o.N("editorMarkerNavigationBackground","Editor marker navigation widget background."));(0,f.Ic)(((e,t)=>{const i=e.getColor(g.ur);i&&(t.addRule(`.monaco-editor .marker-widget a { color: ${i}; }`),t.addRule(`.monaco-editor .marker-widget a.code-link span:hover { color: ${i}; }`))}));var W=i(1640),V=i(666),H=i(5026),$=i(1741),U=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},j=function(e,t){return function(i,n){t(i,n,e)}};class q{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let K=class e{constructor(t,i){this._markerService=i,this._onDidChange=new b.Q5,this.onDidChange=this._onDidChange.event,this._dispoables=new r.SL,this._markers=[],this._nextIdx=-1,V.o.isUri(t)?this._resourceFilter=e=>e.toString()===t.toString():t&&(this._resourceFilter=t);const n=()=>{this._markers=this._markerService.read({resource:V.o.isUri(t)?t:void 0,severities:d.ZL.Error|d.ZL.Warning|d.ZL.Info}),"function"==typeof t&&(this._markers=this._markers.filter((e=>this._resourceFilter(e.resource)))),this._markers.sort(e._compareMarker)};n(),this._dispoables.add(i.onMarkerChanged((e=>{this._resourceFilter&&!e.some((e=>this._resourceFilter(e)))||(n(),this._nextIdx=-1,this._onDidChange.fire())})))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e||!(!this._resourceFilter||!e)&&this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new q(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let n=!1,o=this._markers.findIndex((t=>t.resource.toString()===e.uri.toString()));o<0&&(o=(0,v.ry)(this._markers,{resource:e.uri},((e,t)=>(0,N.qu)(e.resource.toString(),t.resource.toString()))),o<0&&(o=~o));for(let i=o;it.resource.toString()===e.toString()));if(!(i<0))for(;ithis.close()),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition((e=>{var t,i,n;(null===(t=this._model)||void 0===t?void 0:t.selected)&&l.e.containsPosition(null===(i=this._model)||void 0===i?void 0:i.selected.marker,e.position)||null===(n=this._model)||void 0===n||n.resetIndex()}))),this._sessionDispoables.add(this._model.onDidChange((()=>{if(!this._widget||!this._widget.position||!this._model)return;const e=this._model.find(this._editor.getModel().uri,this._widget.position);e?this._widget.updateMarker(e.marker):this._widget.showStale()}))),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation((e=>{this._editorService.openCodeEditor({resource:e.resource,options:{pinned:!0,revealIfOpened:!0,selection:l.e.lift(e).collapseToStart()}},this._editor),this.close(!1)}))),this._sessionDispoables.add(this._editor.onDidChangeModel((()=>this._cleanUp()))),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new a.L(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(t,i){return Q(this,void 0,void 0,(function*(){if(this._editor.hasModel()){const n=this._getOrCreateModel(i?void 0:this._editor.getModel().uri);if(n.move(t,this._editor.getModel(),this._editor.getPosition()),!n.selected)return;if(n.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const o=yield this._editorService.openCodeEditor({resource:n.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:n.selected.marker}},this._editor);o&&(e.get(o).close(),e.get(o).nagivate(t,i))}else this._widget.showAtMarker(n.selected.marker,n.selected.index,n.selected.total)}}))}};J.ID="editor.contrib.markerController",J=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([X(1,G),X(2,s.i6),X(3,W.$),X(4,L.TG)],J);class ee extends c.R6{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}run(e,t){return Q(this,void 0,void 0,(function*(){t.hasModel()&&J.get(t).nagivate(this._next,this._multiFile)}))}}class te extends ee{constructor(){super(!0,!1,{id:te.ID,label:te.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:u.u.focus,primary:578,weight:100},menuOpts:{menuId:I.TitleMenu,title:te.LABEL,icon:(0,Z.q5)("marker-navigation-next",S.lA.chevronDown,o.N("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}te.ID="editor.action.marker.next",te.LABEL=o.N("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class ie extends ee{constructor(){super(!1,!1,{id:ie.ID,label:ie.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:u.u.focus,primary:1602,weight:100},menuOpts:{menuId:I.TitleMenu,title:te.LABEL,icon:(0,Z.q5)("marker-navigation-previous",S.lA.chevronUp,o.N("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}ie.ID="editor.action.marker.prev",ie.LABEL=o.N("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)"),(0,c._K)(J.ID,J),(0,c.Qr)(te),(0,c.Qr)(ie),(0,c.Qr)(class extends ee{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:o.N("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:u.u.focus,primary:66,weight:100},menuOpts:{menuId:k.eH.MenubarGoMenu,title:o.N({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}),(0,c.Qr)(class extends ee{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:o.N("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:u.u.focus,primary:1090,weight:100},menuOpts:{menuId:k.eH.MenubarGoMenu,title:o.N({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}});const ne=new s.uy("markersNavigationVisible",!1),oe=c._l.bindToContribution(J.get);(0,c.fK)(new oe({id:"closeMarkersNavigation",precondition:ne,handler:e=>e.close(),kbOpts:{weight:150,kbExpr:u.u.focus,primary:9,secondary:[1033]}}))},2729:(e,t,i)=>{"use strict";i.r(t),i.d(t,{DefinitionAction:()=>te});var n=i(5152),o=i(5393),r=i(2258),s=i(1432),a=i(5520),l=i(6830),c=i(1640),u=i(187),h=i(4314),d=i(9102),g=i(4101),f=i(2276),p=i(2043),m=i(4318),_=i(1455),v=i(3580),b=i(4144),y=i(8819),w=i(9422),C=i(535),S=i(1691),x=i(4565),k=i(9925),D=i(2065),L=i(5026),N=i(9989),E=i(5976),A=i(4669),M=i(1847),I=i(5935),T=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},R=function(e,t){return function(i,n){t(i,n,e)}};const O=new y.uy("hasSymbols",!1,(0,v.N)("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),F=(0,D.yh)("ISymbolNavigationService");let P=class{constructor(e,t,i,n){this._editorService=t,this._notificationService=i,this._keybindingService=n,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=O.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),null===(e=this._currentState)||void 0===e||e.dispose(),null===(t=this._currentMessage)||void 0===t||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1)return void this.reset();this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new B(this._editorService),n=i.onDidChange((e=>{if(this._ignoreEditorChange)return;const i=this._editorService.getActiveCodeEditor();if(!i)return;const n=i.getModel(),o=i.getPosition();if(!n||!o)return;let r=!1,s=!1;for(const e of t.references)if((0,I.Xy)(e.uri,n.uri))r=!0,s=s||h.e.containsPosition(e.range,o);else if(r)break;r&&s||this.reset()}));this._currentState=(0,E.F8)(i,n)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:h.e.collapseToStart(t.range),selectionRevealType:3}},e).finally((()=>{this._ignoreEditorChange=!1}))}_showMessage(){var e;null===(e=this._currentMessage)||void 0===e||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),i=t?(0,v.N)("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):(0,v.N)("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(i)}};P=T([R(0,y.i6),R(1,c.$),R(2,w.lT),R(3,M.d)],P),(0,L.z)(F,P,!0),(0,l.fK)(new class extends l._l{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:O,kbOpts:{weight:100,primary:70}})}runEditorCommand(e,t){return e.get(F).revealNext(t)}}),N.W.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:O,primary:9,handler(e){e.get(F).reset()}});let B=class{constructor(e){this._listener=new Map,this._disposables=new E.SL,this._onDidChange=new A.Q5,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),(0,E.B9)(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,(0,E.F8)(e.onDidChangeCursorPosition((t=>this._onDidChange.fire({editor:e}))),e.onDidChangeModelContent((t=>this._onDidChange.fire({editor:e})))))}_onDidRemoveEditor(e){var t;null===(t=this._listener.get(e))||void 0===t||t.dispose(),this._listener.delete(e)}};B=T([R(0,c.$)],B);var z,W,V,H,$,U,j,q,K=i(6268),G=i(666),Y=i(8401),Z=i(4527),X=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};b.BH.appendMenuItem(b.eH.EditorContext,{submenu:b.eH.EditorContextPeek,title:v.N("peek.submenu","Peek"),group:"navigation",order:100});const Q=new Set;function J(e){const t=new e;return(0,l.QG)(t),Q.add(t.id),t}class ee extends l.R6{constructor(e,t){super(t),this._configuration=e}run(e,t){if(!t.hasModel())return Promise.resolve(void 0);const i=e.get(w.lT),r=e.get(c.$),s=e.get(C.e),a=e.get(F),l=t.getModel(),u=t.getPosition(),h=new k.Dl(t,5),d=(0,o.eP)(this._getLocationModel(l,u,h.token),h.token).then((e=>X(this,void 0,void 0,(function*(){if(!e||h.token.isCancellationRequested)return;let i;if((0,n.Z9)(e.ariaMessage),e.referenceAt(l.uri,u)){const e=this._getAlternativeCommand(t);e!==this.id&&Q.has(e)&&(i=t.getAction(e))}const o=e.references.length;if(0===o){if(!this._configuration.muteMessage){const e=l.getWordAtPosition(u);f.O.get(t).showMessage(this._getNoResultFoundMessage(e),u)}}else{if(1!==o||!i)return this._onResult(r,a,t,e);i.run()}}))),(e=>{i.error(e)})).finally((()=>{h.dispose()}));return s.showWhile(d,250),d}_onResult(e,t,i,n){return X(this,void 0,void 0,(function*(){const o=this._getGoToPreference(i);if(i instanceof Z.H||!(this._configuration.openInPeek||"peek"===o&&n.references.length>1)){const r=n.firstReference(),s=n.references.length>1&&"gotoAndPeek"===o,a=yield this._openReference(i,e,r,this._configuration.openToSide,!s);s&&a?this._openInPeek(a,n):n.dispose(),"goto"===o&&t.put(r)}else this._openInPeek(i,n)}))}_openReference(e,t,i,n,o){return X(this,void 0,void 0,(function*(){let r;if((0,g.vx)(i)&&(r=i.targetSelectionRange),r||(r=i.range),!r)return;const s=yield t.openCodeEditor({resource:i.uri,options:{selection:h.e.collapseToStart(r),selectionRevealType:3}},e,n);if(s){if(o){const e=s.getModel(),t=s.deltaDecorations([],[{range:r,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout((()=>{s.getModel()===e&&s.deltaDecorations(t,[])}),350)}return s}}))}_openInPeek(e,t){let i=m.J.get(e);i&&e.hasModel()?i.toggleWidget(e.getSelection(),(0,o.PG)((e=>Promise.resolve(t))),this._configuration.openInPeek):t.dispose()}}class te extends ee{_getLocationModel(e,t,i){return X(this,void 0,void 0,(function*(){return new _.oQ(yield(0,S.nD)(e,t,i),v.N("def.title","Definitions"))}))}_getNoResultFoundMessage(e){return e&&e.word?v.N("noResultWord","No definition found for '{0}'",e.word):v.N("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(47).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(47).multipleDefinitions}}const ie=s.$L&&!K.$W?2118:70;J(((z=class e extends te{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.id,label:v.N("actions.goToDecl.label","Go to Definition"),alias:"Go to Definition",precondition:y.Ao.and(d.u.hasDefinitionProvider,d.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:d.u.editorTextFocus,primary:ie,weight:100},contextMenuOpts:{group:"navigation",order:1.1},menuOpts:{menuId:b.eH.MenubarGoMenu,group:"4_symbol_nav",order:2,title:v.N({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")}}),x.P.registerCommandAlias("editor.action.goToDeclaration",e.id)}}).id="editor.action.revealDefinition",z)),J(((W=class e extends te{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:e.id,label:v.N("actions.goToDeclToSide.label","Open Definition to the Side"),alias:"Open Definition to the Side",precondition:y.Ao.and(d.u.hasDefinitionProvider,d.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:d.u.editorTextFocus,primary:(0,r.gx)(2089,ie),weight:100}}),x.P.registerCommandAlias("editor.action.openDeclarationToTheSide",e.id)}}).id="editor.action.revealDefinitionAside",W)),J(((V=class e extends te{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.id,label:v.N("actions.previewDecl.label","Peek Definition"),alias:"Peek Definition",precondition:y.Ao.and(d.u.hasDefinitionProvider,p.Jy.notInPeekEditor,d.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:d.u.editorTextFocus,primary:582,linux:{primary:3140},weight:100},contextMenuOpts:{menuId:b.eH.EditorContextPeek,group:"peek",order:2}}),x.P.registerCommandAlias("editor.action.previewDeclaration",e.id)}}).id="editor.action.peekDefinition",V));class ne extends ee{_getLocationModel(e,t,i){return X(this,void 0,void 0,(function*(){return new _.oQ(yield(0,S.zq)(e,t,i),v.N("decl.title","Declarations"))}))}_getNoResultFoundMessage(e){return e&&e.word?v.N("decl.noResultWord","No declaration found for '{0}'",e.word):v.N("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(47).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(47).multipleDeclarations}}J(((H=class e extends ne{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.id,label:v.N("actions.goToDeclaration.label","Go to Declaration"),alias:"Go to Declaration",precondition:y.Ao.and(d.u.hasDeclarationProvider,d.u.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{group:"navigation",order:1.3},menuOpts:{menuId:b.eH.MenubarGoMenu,group:"4_symbol_nav",order:3,title:v.N({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")}})}_getNoResultFoundMessage(e){return e&&e.word?v.N("decl.noResultWord","No declaration found for '{0}'",e.word):v.N("decl.generic.noResults","No declaration found")}}).id="editor.action.revealDeclaration",H)),J(class extends ne{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",label:v.N("actions.peekDecl.label","Peek Declaration"),alias:"Peek Declaration",precondition:y.Ao.and(d.u.hasDeclarationProvider,p.Jy.notInPeekEditor,d.u.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:b.eH.EditorContextPeek,group:"peek",order:3}})}});class oe extends ee{_getLocationModel(e,t,i){return X(this,void 0,void 0,(function*(){return new _.oQ(yield(0,S.L3)(e,t,i),v.N("typedef.title","Type Definitions"))}))}_getNoResultFoundMessage(e){return e&&e.word?v.N("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):v.N("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(47).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(47).multipleTypeDefinitions}}J((($=class e extends oe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.ID,label:v.N("actions.goToTypeDefinition.label","Go to Type Definition"),alias:"Go to Type Definition",precondition:y.Ao.and(d.u.hasTypeDefinitionProvider,d.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:d.u.editorTextFocus,primary:0,weight:100},contextMenuOpts:{group:"navigation",order:1.4},menuOpts:{menuId:b.eH.MenubarGoMenu,group:"4_symbol_nav",order:3,title:v.N({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")}})}}).ID="editor.action.goToTypeDefinition",$)),J(((U=class e extends oe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.ID,label:v.N("actions.peekTypeDefinition.label","Peek Type Definition"),alias:"Peek Type Definition",precondition:y.Ao.and(d.u.hasTypeDefinitionProvider,p.Jy.notInPeekEditor,d.u.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:b.eH.EditorContextPeek,group:"peek",order:4}})}}).ID="editor.action.peekTypeDefinition",U));class re extends ee{_getLocationModel(e,t,i){return X(this,void 0,void 0,(function*(){return new _.oQ(yield(0,S.f4)(e,t,i),v.N("impl.title","Implementations"))}))}_getNoResultFoundMessage(e){return e&&e.word?v.N("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):v.N("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(47).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(47).multipleImplementations}}J(((j=class e extends re{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.ID,label:v.N("actions.goToImplementation.label","Go to Implementations"),alias:"Go to Implementations",precondition:y.Ao.and(d.u.hasImplementationProvider,d.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:d.u.editorTextFocus,primary:2118,weight:100},menuOpts:{menuId:b.eH.MenubarGoMenu,group:"4_symbol_nav",order:4,title:v.N({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},contextMenuOpts:{group:"navigation",order:1.45}})}}).ID="editor.action.goToImplementation",j)),J(((q=class e extends re{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.ID,label:v.N("actions.peekImplementation.label","Peek Implementations"),alias:"Peek Implementations",precondition:y.Ao.and(d.u.hasImplementationProvider,p.Jy.notInPeekEditor,d.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:d.u.editorTextFocus,primary:3142,weight:100},contextMenuOpts:{menuId:b.eH.EditorContextPeek,group:"peek",order:5}})}}).ID="editor.action.peekImplementation",q));class se extends ee{_getNoResultFoundMessage(e){return e?v.N("references.no","No references found for '{0}'",e.word):v.N("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(47).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(47).multipleReferences}}J(class extends se{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",label:v.N("goToReferences.label","Go to References"),alias:"Go to References",precondition:y.Ao.and(d.u.hasReferenceProvider,p.Jy.notInPeekEditor,d.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:d.u.editorTextFocus,primary:1094,weight:100},contextMenuOpts:{group:"navigation",order:1.45},menuOpts:{menuId:b.eH.MenubarGoMenu,group:"4_symbol_nav",order:5,title:v.N({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")}})}_getLocationModel(e,t,i){return X(this,void 0,void 0,(function*(){return new _.oQ(yield(0,S.aA)(e,t,!0,i),v.N("ref.title","References"))}))}}),J(class extends se{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",label:v.N("references.action.label","Peek References"),alias:"Peek References",precondition:y.Ao.and(d.u.hasReferenceProvider,p.Jy.notInPeekEditor,d.u.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:b.eH.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,i){return X(this,void 0,void 0,(function*(){return new _.oQ(yield(0,S.aA)(e,t,!1,i),v.N("ref.title","References"))}))}});class ae extends ee{constructor(e,t,i){super(e,{id:"editor.action.goToLocation",label:v.N("label.generic","Go To Any Symbol"),alias:"Go To Any Symbol",precondition:y.Ao.and(p.Jy.notInPeekEditor,d.u.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=i}_getLocationModel(e,t,i){return X(this,void 0,void 0,(function*(){return new _.oQ(this._references,v.N("generic.title","Locations"))}))}_getNoResultFoundMessage(e){return e&&v.N("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return null!==(t=this._gotoMultipleBehaviour)&&void 0!==t?t:e.getOption(47).multipleReferences}_getAlternativeCommand(){return""}}x.P.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:G.o},{name:"position",description:"The position at which to start",constraint:u.L.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:(e,t,i,n,o,r,s)=>X(void 0,void 0,void 0,(function*(){(0,Y.p_)(G.o.isUri(t)),(0,Y.p_)(u.L.isIPosition(i)),(0,Y.p_)(Array.isArray(n)),(0,Y.p_)(void 0===o||"string"==typeof o),(0,Y.p_)(void 0===s||"boolean"==typeof s);const l=e.get(c.$),h=yield l.openCodeEditor({resource:t},l.getFocusedCodeEditor());if((0,a.CL)(h))return h.setPosition(i),h.revealPositionInCenterIfOutsideViewport(i,0),h.invokeWithinContext((e=>{const t=new class extends ae{_getNoResultFoundMessage(e){return r||super._getNoResultFoundMessage(e)}}({muteMessage:!Boolean(r),openInPeek:Boolean(s),openToSide:!1},n,o);e.get(D.TG).invokeFunction(t.run.bind(t),h)}))}))}),x.P.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:G.o},{name:"position",description:"The position at which to start",constraint:u.L.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:(e,t,i,n,o)=>X(void 0,void 0,void 0,(function*(){e.get(x.H).executeCommand("editor.action.goToLocations",t,i,n,o,void 0,!0)}))}),x.P.registerCommand({id:"editor.action.findReferences",handler:(e,t,i)=>{(0,Y.p_)(G.o.isUri(t)),(0,Y.p_)(u.L.isIPosition(i));const n=e.get(c.$);return n.openCodeEditor({resource:t},n.getFocusedCodeEditor()).then((e=>{if(!(0,a.CL)(e)||!e.hasModel())return;const t=m.J.get(e);if(!t)return;const n=(0,o.PG)((t=>(0,S.aA)(e.getModel(),u.L.lift(i),!1,t).then((e=>new _.oQ(e,v.N("ref.title","References")))))),r=new h.e(i.lineNumber,i.column,i.lineNumber,i.column);return Promise.resolve(t.toggleWidget(r,n,!1))}))}}),x.P.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")},1691:(e,t,i)=>{"use strict";i.d(t,{nD:()=>u,zq:()=>h,f4:()=>d,L3:()=>g,aA:()=>f});var n=i(1050),o=i(7301),r=i(6830),s=i(4101),a=i(1455),l=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function c(e,t,i,n){const r=i.ordered(e).map((i=>Promise.resolve(n(i,e,t)).then(void 0,(e=>{(0,o.Cp)(e)}))));return Promise.all(r).then((e=>{const t=[];for(let i of e)Array.isArray(i)?t.push(...i):i&&t.push(i);return t}))}function u(e,t,i){return c(e,t,s.Ct,((e,t,n)=>e.provideDefinition(t,n,i)))}function h(e,t,i){return c(e,t,s.RN,((e,t,n)=>e.provideDeclaration(t,n,i)))}function d(e,t,i){return c(e,t,s.vI,((e,t,n)=>e.provideImplementation(t,n,i)))}function g(e,t,i){return c(e,t,s.tA,((e,t,n)=>e.provideTypeDefinition(t,n,i)))}function f(e,t,i,n){return c(e,t,s.FL,((e,t,o)=>l(this,void 0,void 0,(function*(){const r=yield e.provideReferences(t,o,{includeDeclaration:!0},n);if(!i||!r||2!==r.length)return r;const s=yield e.provideReferences(t,o,{includeDeclaration:!1},n);return s&&1===s.length?s:r}))))}function p(e){return l(this,void 0,void 0,(function*(){const t=yield e(),i=new a.oQ(t,""),n=i.references.map((e=>e.link));return i.dispose(),n}))}(0,r.sb)("_executeDefinitionProvider",((e,t)=>p((()=>u(e,t,n.T.None))))),(0,r.sb)("_executeDeclarationProvider",((e,t)=>p((()=>h(e,t,n.T.None))))),(0,r.sb)("_executeImplementationProvider",((e,t)=>p((()=>d(e,t,n.T.None))))),(0,r.sb)("_executeTypeDefinitionProvider",((e,t)=>p((()=>g(e,t,n.T.None))))),(0,r.sb)("_executeReferenceProvider",((e,t)=>p((()=>f(e,t,!1,n.T.None)))))},9241:(e,t,i)=>{"use strict";i.d(t,{yN:()=>h});var n=i(5976),o=i(4669),r=i(1432);function s(e,t){return!!e[t]}class a{constructor(e,t){this.target=e.target,this.hasTriggerModifier=s(e.event,t.triggerModifier),this.hasSideBySideModifier=s(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class l{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=s(e,t.triggerModifier)}}class c{constructor(e,t,i,n){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=i,this.triggerSideBySideModifier=n}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function u(e){return"altKey"===e?r.dz?new c(57,"metaKey",6,"altKey"):new c(5,"ctrlKey",6,"altKey"):r.dz?new c(6,"altKey",57,"metaKey"):new c(6,"altKey",5,"ctrlKey")}class h extends n.JT{constructor(e){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new o.Q5),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new o.Q5),this.onExecute=this._onExecute.event,this._onCancel=this._register(new o.Q5),this.onCancel=this._onCancel.event,this._editor=e,this._opts=u(this._editor.getOption(67)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration((e=>{if(e.hasChanged(67)){const e=u(this._editor.getOption(67));if(this._opts.equals(e))return;this._opts=e,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}}))),this._register(this._editor.onMouseMove((e=>this._onEditorMouseMove(new a(e,this._opts))))),this._register(this._editor.onMouseDown((e=>this._onEditorMouseDown(new a(e,this._opts))))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(new a(e,this._opts))))),this._register(this._editor.onKeyDown((e=>this._onEditorKeyDown(new l(e,this._opts))))),this._register(this._editor.onKeyUp((e=>this._onEditorKeyUp(new l(e,this._opts))))),this._register(this._editor.onMouseDrag((()=>this._resetHandler()))),this._register(this._editor.onDidChangeCursorSelection((e=>this._onDidChangeCursorSelection(e)))),this._register(this._editor.onDidChangeModel((e=>this._resetHandler()))),this._register(this._editor.onDidChangeModelContent((()=>this._resetHandler()))),this._register(this._editor.onDidScrollChange((e=>{(e.scrollTopChanged||e.scrollLeftChanged)&&this._resetHandler()})))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=e.target.position?e.target.position.lineNumber:0}_onEditorMouseUp(e){const t=e.target.position?e.target.position.lineNumber:0;this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}},365:(e,t,i)=>{"use strict";i.r(t),i.d(t,{GotoDefinitionAtPositionEditorContribution:()=>x});var n=i(3580),o=i(5393),r=i(7301),s=i(9365),a=i(1531),l=i(4314),c=i(4101),u=i(6830),h=i(1691),d=i(5976),g=i(8216),f=i(7781),p=i(3910),m=i(9925),_=i(2729),v=i(9241),b=i(187),y=i(8401),w=i(2043),C=i(8819),S=function(e,t){return function(i,n){t(i,n,e)}};let x=class e{constructor(e,t,i){this.textModelResolverService=t,this.modeService=i,this.toUnhook=new d.SL,this.toUnhookForKeyboard=new d.SL,this.linkDecorations=[],this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e;let n=new v.yN(e);this.toUnhook.add(n),this.toUnhook.add(n.onMouseMoveOrRelevantKeyDown((([e,t])=>{this.startFindDefinitionFromMouse(e,(0,y.f6)(t))}))),this.toUnhook.add(n.onExecute((e=>{this.isEnabled(e)&&this.gotoDefinition(e.target.position,e.hasSideBySideModifier).then((()=>{this.removeLinkDecorations()}),(e=>{this.removeLinkDecorations(),(0,r.dL)(e)}))}))),this.toUnhook.add(n.onCancel((()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null})))}static get(t){return t.getContribution(e.ID)}startFindDefinitionFromCursor(e){return this.startFindDefinition(e).then((()=>{this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition((()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()}))),this.toUnhookForKeyboard.add(this.editor.onKeyDown((e=>{e&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())})))}))}startFindDefinitionFromMouse(e,t){if(9===e.target.type&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t))return this.currentWordAtPosition=null,void this.removeLinkDecorations();const i=e.target.position;this.startFindDefinition(i)}startFindDefinition(e){var t;this.toUnhookForKeyboard.clear();const i=e?null===(t=this.editor.getModel())||void 0===t?void 0:t.getWordAtPosition(e):null;if(!i)return this.currentWordAtPosition=null,this.removeLinkDecorations(),Promise.resolve(0);if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===i.startColumn&&this.currentWordAtPosition.endColumn===i.endColumn&&this.currentWordAtPosition.word===i.word)return Promise.resolve(0);this.currentWordAtPosition=i;let a=new m.yy(this.editor,15);return this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=(0,o.PG)((t=>this.findDefinition(e,t))),this.previousPromise.then((t=>{if(t&&t.length&&a.validate(this.editor))if(t.length>1)this.addDecoration(new l.e(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn),(new s.W5).appendText(n.N("multipleResults","Click to show {0} definitions.",t.length)));else{let n=t[0];if(!n.uri)return;this.textModelResolverService.createModelReference(n.uri).then((t=>{if(!t.object||!t.object.textEditorModel)return void t.dispose();const{object:{textEditorModel:o}}=t,{startLineNumber:r}=n.range;if(r<1||r>o.getLineCount())return void t.dispose();const a=this.getPreviewValue(o,r,n);let c;c=n.originSelectionRange?l.e.lift(n.originSelectionRange):new l.e(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn);const u=this.modeService.getModeIdByFilepathOrFirstLine(o.uri);this.addDecoration(c,(new s.W5).appendCodeblock(u||"",a)),t.dispose()}))}else this.removeLinkDecorations()})).then(void 0,r.dL)}getPreviewValue(t,i,n){let o=n.targetSelectionRange?n.range:this.getPreviewRangeBasedOnBrackets(t,i);return o.endLineNumber-o.startLineNumber>=e.MAX_SOURCE_PREVIEW_LINES&&(o=this.getPreviewRangeBasedOnIndentation(t,i)),this.stripIndentationFromPreviewRange(t,i,o)}stripIndentationFromPreviewRange(e,t,i){let n=e.getLineFirstNonWhitespaceColumn(t);for(let o=t+1;on)return new l.e(i,1,n+1,1);s=t.findNextBracket(new b.L(a,c))}return new l.e(i,1,n+1,1)}addDecoration(e,t){const i={range:e,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:t}};this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[i])}removeLinkDecorations(){this.linkDecorations.length>0&&(this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[]))}isEnabled(e,t){return this.editor.hasModel()&&e.isNoneOrSingleMouseDown&&6===e.target.type&&(e.hasTriggerModifier||!!t&&t.keyCodeIsTriggerKey)&&c.Ct.has(this.editor.getModel())}findDefinition(e,t){const i=this.editor.getModel();return i?(0,h.nD)(i,e,t):Promise.resolve(null)}gotoDefinition(e,t){return this.editor.setPosition(e),this.editor.invokeWithinContext((e=>{const i=!t&&this.editor.getOption(75)&&!this.isInPeekEditor(e);return new _.DefinitionAction({openToSide:t,openInPeek:i,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(e,this.editor)}))}isInPeekEditor(e){const t=e.get(C.i6);return w.Jy.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose()}};x.ID="editor.contrib.gotodefinitionatposition",x.MAX_SOURCE_PREVIEW_LINES=8,x=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([S(1,g.S),S(2,a.h)],x),(0,u._K)(x.ID,x),(0,f.Ic)(((e,t)=>{const i=e.getColor(p._Y);i&&t.addRule(`.monaco-editor .goto-definition-link { color: ${i} !important; }`)}))},4318:(e,t,i)=>{"use strict";i.d(t,{J:()=>se});var n=i(3580),o=i(7301),r=i(5976),s=i(1640),a=i(2065),l=i(8819),c=i(3108),u=i(6904),h=i(1455),d=i(5321),g=i(1264),f=i(4669),p=i(6663),m=i(5935),_=i(4527),v=i(4314),b=i(3411),y=i(8216),w=i(8801),C=i(7488),S=i(4349),x=i(7781),k=i(8810),D=i(8843),L=i(1847),N=i(5392),E=i(4650),A=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},M=function(e,t){return function(i,n){t(i,n,e)}};let I=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof h.oQ||e instanceof h.F2}getChildren(e){if(e instanceof h.oQ)return e.groups;if(e instanceof h.F2)return e.resolve(this._resolverService).then((e=>e.children));throw new Error("bad tree")}};I=A([M(0,y.S)],I);class T{getHeight(){return 23}getTemplateId(e){return e instanceof h.F2?P.id:z.id}}let R=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof h.WX){const i=null===(t=e.parent.getPreview(e))||void 0===t?void 0:t.preview(e.range);if(i)return i.value}return(0,m.EZ)(e.uri)}};R=A([M(0,L.d)],R);class O{getId(e){return e instanceof h.WX?e.id:e.uri}}let F=class extends r.JT{constructor(e,t,i){super(),this._uriLabel=t;const n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new w.g(n,{supportHighlights:!0})),this.badge=new C.Z(d.R3(n,d.$(".count"))),this._register((0,k.WZ)(this.badge,i)),e.appendChild(n)}set(e,t){let i=(0,m.XX)(e.uri);this.file.setLabel((0,D.p)(e.uri),this._uriLabel.getUriLabel(i,{relative:!0}),{title:this._uriLabel.getUriLabel(e.uri),matches:t});const o=e.children.length;this.badge.setCount(o),o>1?this.badge.setTitleFormat((0,n.N)("referencesCount","{0} references",o)):this.badge.setTitleFormat((0,n.N)("referenceCount","{0} reference",o))}};F=A([M(1,S.e),M(2,x.XE)],F);let P=class e{constructor(t){this._instantiationService=t,this.templateId=e.id}renderTemplate(e){return this._instantiationService.createInstance(F,e)}renderElement(e,t,i){i.set(e.element,(0,N.mB)(e.filterData))}disposeTemplate(e){e.dispose()}};P.id="FileReferencesRenderer",P=A([M(0,a.TG)],P);class B{constructor(e){this.label=new E.q(e,!1)}set(e,t){var i;const n=null===(i=e.parent.getPreview(e))||void 0===i?void 0:i.preview(e.range);if(n&&n.value){const{value:e,highlight:i}=n;t&&!N.CL.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(e,(0,N.mB)(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(e,[i]))}else this.label.set(`${(0,m.EZ)(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`)}}class z{constructor(){this.templateId=z.id}renderTemplate(e){return new B(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(){}}z.id="OneReferenceRenderer";class W{getWidgetAriaLabel(){return(0,n.N)("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var V=i(343),H=i(3910),$=i(2043),U=i(3937),j=i(4862),q=function(e,t){return function(i,n){t(i,n,e)}},K=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class G{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new r.SL,this._callOnModelChange=new r.SL,this._callOnDispose.add(this._editor.onDidChangeModel((()=>this._onModelChanged()))),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e)for(let t of this._model.references)if(t.uri.toString()===e.uri.toString())return void this._addDecorations(t.parent)}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations((()=>this._onDecorationChanged())));const t=[],i=[];for(let n=0,o=e.children.length;n{e.equals(9)&&(this._keybindingService.dispatchEvent(e,e.target),e.stopPropagation())}),!0)),this._tree=this._instantiationService.createInstance(Y,"ReferencesWidget",this._treeContainer,new T,[this._instantiationService.createInstance(P),this._instantiationService.createInstance(z)],this._instantiationService.createInstance(I),t),this._splitView.addView({onDidChange:f.ju.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:e=>{this._preview.layout({height:this._dim.height,width:e})}},U.M.Distribute),this._splitView.addView({onDidChange:f.ju.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:e=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${e}px`,this._tree.layout(this._dim.height,e)}},U.M.Distribute),this._disposables.add(this._splitView.onDidSashChange((()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)}),void 0));let i=(e,t)=>{e instanceof h.WX&&("show"===t&&this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:t,source:"tree"}))};this._tree.onDidOpen((e=>{e.sideBySide?i(e.element,"side"):e.editorOptions.pinned?i(e.element,"goto"):i(e.element,"show")})),d.Cp(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new d.Ro(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then((()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))}))}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=n.N("noResults","No results"),d.$Z(this._messageContainer),Promise.resolve(void 0)):(d.Cp(this._messageContainer),this._decorationsManager=new G(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange((e=>this._tree.rerender(e)))),this._disposeOnNewModel.add(this._preview.onMouseDown((e=>{const{event:t,target:i}=e;if(2!==t.detail)return;const n=this._getFocusedReference();n&&this._onDidSelectReference.fire({element:{uri:n.uri,range:i.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})}))),this.container.classList.add("results-loaded"),d.$Z(this._treeContainer),d.$Z(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(1===this._model.groups.length?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();return e instanceof h.WX?e:e instanceof h.F2&&e.children.length>0?e.children[0]:void 0}revealReference(e){return K(this,void 0,void 0,(function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}))}_revealReference(e,t){return K(this,void 0,void 0,(function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==p.lg.inMemory?this.setTitle((0,m.Hx)(e.uri),this._uriLabel.getUriLabel((0,m.XX)(e.uri))):this.setTitle(n.N("peekView.alternateTitle","References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent||(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent)),this._tree.reveal(e);const o=yield i;if(!this._model)return void o.dispose();(0,r.B9)(this._previewModelReference);const s=o.object;if(s){const t=this._preview.getModel()===s.textEditorModel?0:1,i=v.e.lift(e.range).collapseToStart();this._previewModelReference=o,this._preview.setModel(s.textEditorModel),this._preview.setSelection(i),this._preview.revealRangeInCenter(i,t)}else this._preview.setModel(this._previewNotAvailableMessage),o.dispose()}))}};Z=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([q(3,x.XE),q(4,y.S),q(5,a.TG),q(6,$.Fw),q(7,S.e),q(8,j.tJ),q(9,L.d)],Z),(0,x.Ic)(((e,t)=>{const i=e.getColor($.F8);i&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { background-color: ${i}; }`);const n=e.getColor($.WL);n&&t.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: ${n}; }`);const o=e.getColor($.xH);o&&t.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid ${o}; box-sizing: border-box; }`);const r=e.getColor(H.xL);r&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { border: 1px dotted ${r}; box-sizing: border-box; }`);const s=e.getColor($.M8);s&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree { background-color: ${s}; }`);const a=e.getColor($.xk);a&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree { color: ${a}; }`);const l=e.getColor($.a7);l&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .reference-file { color: ${l}; }`);const c=e.getColor($.Zj);c&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { background-color: ${c}; }`);const u=e.getColor($.IY);u&&t.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { color: ${u} !important; }`);const h=e.getColor($.RX);h&&t.addRule(`.monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input {\tbackground-color: ${h};}`);const d=e.getColor($.sH);d&&t.addRule(`.monaco-editor .reference-zone-widget .preview .monaco-editor .margin {\tbackground-color: ${d};}`)}));var X=i(187),Q=i(9422),J=i(5393),ee=i(9989),te=i(2258),ie=i(4565),ne=function(e,t){return function(i,n){t(i,n,e)}},oe=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const re=new l.uy("referenceSearchVisible",!1,n.N("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let se=class e{constructor(e,t,i,n,o,s,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=o,this._instantiationService=s,this._storageService=a,this._configurationService=l,this._disposables=new r.SL,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=re.bindTo(i)}static get(t){return t.getContribution(e.ID)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),null===(e=this._widget)||void 0===e||e.dispose(),null===(t=this._model)||void 0===t||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,i){let o;if(this._widget&&(o=this._widget.position),this.closeWidget(),o&&e.containsPosition(o))return;this._peekMode=i,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage((()=>{this.closeWidget()}))),this._disposables.add(this._editor.onDidChangeModel((()=>{this._ignoreModelChangeEvent||this.closeWidget()})));const r="peekViewLayout",s=class{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(e){let t,i;try{const n=JSON.parse(e);t=n.ratio,i=n.heightInLines}catch(e){}return{ratio:t||.7,heightInLines:i||18}}}.fromJSON(this._storageService.get(r,0,"{}"));this._widget=this._instantiationService.createInstance(Z,this._editor,this._defaultTreeKeyboardSupport,s),this._widget.setTitle(n.N("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose((()=>{t.cancel(),this._widget&&(this._storageService.store(r,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()}))),this._disposables.add(this._widget.onDidSelectReference((e=>{let{element:t,kind:n}=e;if(t)switch(n){case"open":"editor"===e.source&&this._configurationService.getValue("editor.stablePeek")||this.openReference(t,!1,!1);break;case"side":this.openReference(t,!0,!1);break;case"goto":i?this._gotoReference(t):this.openReference(t,!1,!0)}})));const a=++this._requestIdPool;t.then((t=>{var i;if(a===this._requestIdPool&&this._widget)return null===(i=this._model)||void 0===i||i.dispose(),this._model=t,this._widget.setModel(this._model).then((()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(n.N("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));let t=this._editor.getModel().uri,i=new X.L(e.startLineNumber,e.startColumn),o=this._model.nearestReference(t,i);if(o)return this._widget.setSelection(o).then((()=>{this._widget&&"editor"===this._editor.getOption(74)&&this._widget.focusOnPreviewEditor()}))}}));t.dispose()}),(e=>{this._notificationService.error(e)}))}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return oe(this,void 0,void 0,(function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const i=this._model.nearestReference(this._editor.getModel().uri,t);if(!i)return;const n=this._model.nextOrPreviousReference(i,e),o=this._editor.hasTextFocus(),r=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(n),yield this._gotoReference(n),o?this._editor.focus():this._widget&&r&&this._widget.focusOnPreviewEditor()}))}revealReference(e){return oe(this,void 0,void 0,(function*(){this._editor.hasModel()&&this._model&&this._widget&&(yield this._widget.revealReference(e))}))}closeWidget(e=!0){var t,i;null===(t=this._widget)||void 0===t||t.dispose(),null===(i=this._model)||void 0===i||i.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(t){this._widget&&this._widget.hide(),this._ignoreModelChangeEvent=!0;const i=v.e.lift(t.range).collapseToStart();return this._editorService.openCodeEditor({resource:t.uri,options:{selection:i}},this._editor).then((t=>{var n;if(this._ignoreModelChangeEvent=!1,t&&this._widget)if(this._editor===t)this._widget.show(i),this._widget.focusOnReferenceTree();else{const o=e.get(t),r=this._model.clone();this.closeWidget(),t.focus(),o.toggleWidget(i,(0,J.PG)((e=>Promise.resolve(r))),null!==(n=this._peekMode)&&void 0!==n&&n)}else this.closeWidget()}),(e=>{this._ignoreModelChangeEvent=!1,(0,o.dL)(e)}))}openReference(e,t,i){t||this.closeWidget();const{uri:n,range:o}=e;this._editorService.openCodeEditor({resource:n,options:{selection:o,pinned:i}},this._editor,t)}};function ae(e,t){const i=(0,$.rc)(e);if(!i)return;let n=se.get(i);n&&t(n)}se.ID="editor.contrib.referencesController",se=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([ne(2,l.i6),ne(3,s.$),ne(4,Q.lT),ne(5,a.TG),ne(6,u.Uy),ne(7,c.Ui)],se),ee.W.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:(0,te.gx)(2089,60),when:l.Ao.or(re,$.Jy.inPeekEditor),handler(e){ae(e,(e=>{e.changeFocusBetweenPreviewAndReferences()}))}}),ee.W.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:l.Ao.or(re,$.Jy.inPeekEditor),handler(e){ae(e,(e=>{e.goToNextOrPreviousReference(!0)}))}}),ee.W.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:l.Ao.or(re,$.Jy.inPeekEditor),handler(e){ae(e,(e=>{e.goToNextOrPreviousReference(!1)}))}}),ie.P.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),ie.P.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),ie.P.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),ie.P.registerCommand("closeReferenceSearch",(e=>ae(e,(e=>e.closeWidget())))),ee.W.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:l.Ao.and($.Jy.inPeekEditor,l.Ao.not("config.editor.stablePeek"))}),ee.W.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:l.Ao.and(re,l.Ao.not("config.editor.stablePeek"))}),ee.W.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:l.Ao.and(re,V.CQ),handler(e){var t;const i=null===(t=e.get(V.Lw).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof h.WX&&ae(e,(e=>e.revealReference(i[0])))}}),ee.W.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:l.Ao.and(re,V.CQ),handler(e){var t;const i=null===(t=e.get(V.Lw).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof h.WX&&ae(e,(e=>e.openReference(i[0],!0,!0)))}}),ie.P.registerCommand("openReference",(e=>{var t;const i=null===(t=e.get(V.Lw).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof h.WX&&ae(e,(e=>e.openReference(i[0],!1,!0)))}))},1455:(e,t,i)=>{"use strict";i.d(t,{WX:()=>d,F2:()=>f,oQ:()=>p});var n=i(3580),o=i(4669),r=i(5935),s=i(5976),a=i(7295),l=i(4742),c=i(4314),u=i(3702),h=i(7301);class d{constructor(e,t,i,n){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=n,this.id=l.a.nextId()}get uri(){return this.link.uri}get range(){var e,t;return null!==(t=null!==(e=this._range)&&void 0!==e?e:this.link.targetSelectionRange)&&void 0!==t?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=null===(e=this.parent.getPreview(this))||void 0===e?void 0:e.preview(this.range);return t?(0,n.N)({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"symbol in {0} on line {1} at column {2}, {3}",(0,r.EZ)(this.uri),this.range.startLineNumber,this.range.startColumn,t.value):(0,n.N)("aria.oneReference","symbol in {0} on line {1} at column {2}",(0,r.EZ)(this.uri),this.range.startLineNumber,this.range.startColumn)}}class g{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const i=this._modelReference.object.textEditorModel;if(!i)return;const{startLineNumber:n,startColumn:o,endLineNumber:r,endColumn:s}=e,a=i.getWordUntilPosition({lineNumber:n,column:o-t}),l=new c.e(n,a.startColumn,n,o),u=new c.e(r,s,r,1073741824),h=i.getValueInRange(l).replace(/^\s+/,""),d=i.getValueInRange(e);return{value:h+d+i.getValueInRange(u).replace(/\s+$/,""),highlight:{start:h.length,end:h.length+d.length}}}}class f{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new u.Y9}dispose(){(0,s.B9)(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return 1===e?(0,n.N)("aria.fileReferences.1","1 symbol in {0}, full path {1}",(0,r.EZ)(this.uri),this.uri.fsPath):(0,n.N)("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,(0,r.EZ)(this.uri),this.uri.fsPath)}resolve(e){return t=this,i=void 0,o=function*(){if(0!==this._previews.size)return this;for(let t of this.children)if(!this._previews.has(t.uri))try{const i=yield e.createModelReference(t.uri);this._previews.set(t.uri,new g(i))}catch(e){(0,h.dL)(e)}return this},new((n=void 0)||(n=Promise))((function(e,r){function s(e){try{l(o.next(e))}catch(e){r(e)}}function a(e){try{l(o.throw(e))}catch(e){r(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n((function(e){e(i)}))).then(s,a)}l((o=o.apply(t,i||[])).next())}));var t,i,n,o}}class p{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new o.Q5,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;let n;e.sort(p._compareReferences);for(let t of e)if(n&&r.SF.isEqual(n.uri,t.uri,!0)||(n=new f(this,t.uri),this.groups.push(n)),0===n.children.length||0!==p._compareReferences(t,n.children[n.children.length-1])){const e=new d(i===t,n,t,(e=>this._onDidChangeReferenceRange.fire(e)));this.references.push(e),n.children.push(e)}}dispose(){(0,s.B9)(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new p(this._links,this._title)}get title(){return this._title}get isEmpty(){return 0===this.groups.length}get ariaMessage(){return this.isEmpty?(0,n.N)("aria.result.0","No results found"):1===this.references.length?(0,n.N)("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):1===this.groups.length?(0,n.N)("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):(0,n.N)("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){let{parent:i}=e,n=i.children.indexOf(e),o=i.children.length,r=i.parent.groups.length;return 1===r||t&&n+10?(n=t?(n+1)%o:(n+o-1)%o,i.children[n]):(n=i.parent.groups.indexOf(i),t?(n=(n+1)%r,i.parent.groups[n].children[0]):(n=(n+r-1)%r,i.parent.groups[n].children[i.parent.groups[n].children.length-1]))}nearestReference(e,t){const i=this.references.map(((i,n)=>({idx:n,prefixLen:a.Mh(i.uri.toString(),e.toString()),offsetDist:100*Math.abs(i.range.startLineNumber-t.lineNumber)+Math.abs(i.range.startColumn-t.column)}))).sort(((e,t)=>e.prefixLen>t.prefixLen?-1:e.prefixLent.offsetDist?1:0))[0];if(i)return this.references[i.idx]}referenceAt(e,t){for(const i of this.references)if(i.uri.toString()===e.toString()&&c.e.containsPosition(i.range,t))return i}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return r.SF.compare(e.uri,t.uri)||c.e.compareRangesUsingStarts(e.range,t.range)}}},7043:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ModesHoverController:()=>Oe});var n=i(3580),o=i(2258),r=i(5976),s=i(6830),a=i(4314),l=i(9102),c=i(1531),u=i(5321),h=i(187),d=i(3411),g=i(4101),f=i(5393),p=i(7301);class m{constructor(e,t,i,n,o){this._computer=e,this._state=0,this._hoverTime=o,this._firstWaitScheduler=new f.pY((()=>this._triggerAsyncComputation()),0),this._secondWaitScheduler=new f.pY((()=>this._triggerSyncComputation()),0),this._loadingMessageScheduler=new f.pY((()=>this._showLoadingMessage()),0),this._asyncComputationPromise=null,this._asyncComputationPromiseDone=!1,this._completeCallback=t,this._errorCallback=i,this._progressCallback=n}setHoverTime(e){this._hoverTime=e}_firstWaitTime(){return this._hoverTime/2}_secondWaitTime(){return this._hoverTime/2}_loadingMessageTime(){return 3*this._hoverTime}_triggerAsyncComputation(){this._state=2,this._secondWaitScheduler.schedule(this._secondWaitTime()),this._computer.computeAsync?(this._asyncComputationPromiseDone=!1,this._asyncComputationPromise=(0,f.PG)((e=>this._computer.computeAsync(e))),this._asyncComputationPromise.then((e=>{this._asyncComputationPromiseDone=!0,this._withAsyncResult(e)}),(e=>this._onError(e)))):this._asyncComputationPromiseDone=!0}_triggerSyncComputation(){this._computer.computeSync&&this._computer.onResult(this._computer.computeSync(),!0),this._asyncComputationPromiseDone?(this._state=0,this._onComplete(this._computer.getResult())):(this._state=3,this._onProgress(this._computer.getResult()))}_showLoadingMessage(){3===this._state&&this._onProgress(this._computer.getResultWithLoadingMessage())}_withAsyncResult(e){e&&this._computer.onResult(e,!1),3===this._state&&(this._state=0,this._onComplete(this._computer.getResult()))}_onComplete(e){this._completeCallback(e)}_onError(e){this._errorCallback?this._errorCallback(e):(0,p.dL)(e)}_onProgress(e){this._progressCallback(e)}start(e){if(0===e)0===this._state&&(this._state=1,this._firstWaitScheduler.schedule(this._firstWaitTime()),this._loadingMessageScheduler.schedule(this._loadingMessageTime()));else switch(this._state){case 0:this._triggerAsyncComputation(),this._secondWaitScheduler.cancel(),this._triggerSyncComputation();break;case 2:this._secondWaitScheduler.cancel(),this._triggerSyncComputation()}}cancel(){this._loadingMessageScheduler.cancel(),1===this._state&&this._firstWaitScheduler.cancel(),2===this._state&&(this._secondWaitScheduler.cancel(),this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null)),3===this._state&&this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null),this._state=0}}var _=i(7781),v=i(9488),b=i(3910),y=i(3794),w=i(9802);const C=u.$;class S extends r.JT{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this._scrollbar=this._register(new w.s$(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this._scrollbar.getDomNode())}onContentsChanged(){this._scrollbar.scanDomNode()}}var x=i(8674),k=i(5935),D=i(6479),L=i(988),N=i(2698),E=i(1907),A=i(3674),M=i(9532),I=i(535),T=function(e,t){return function(i,n){t(i,n,e)}};const R=u.$;class O{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const F={type:1,filter:{include:M.yN.QuickFix}};let P=class{constructor(e,t,i,n){this._editor=e,this._hover=t,this._markerDecorationsService=i,this._openerService=n,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,o=i.getLineMaxColumn(n),r=[];for(const s of t){const t=s.range.startLineNumber===n?s.range.startColumn:1,l=s.range.endLineNumber===n?s.range.endColumn:o,c=this._markerDecorationsService.getMarker(i.uri,s);if(!c)continue;const u=new a.e(e.range.startLineNumber,t,e.range.startLineNumber,l);r.push(new O(this,u,c))}return r}renderHoverParts(e,t,i){if(!e.length)return r.JT.None;const n=new r.SL;e.forEach((e=>t.appendChild(this.renderMarkerHover(e,n))));const o=1===e.length?e[0]:e.sort(((e,t)=>x.ZL.compare(e.marker.severity,t.marker.severity)))[0];return this.renderMarkerStatusbar(o,i,n),n}renderMarkerHover(e,t){const i=R("div.hover-row"),n=u.R3(i,R("div.marker.hover-contents")),{source:o,message:r,code:s,relatedInformation:a}=e.marker;this._editor.applyFontInfo(n);const l=u.R3(n,R("span"));if(l.style.whiteSpace="pre-wrap",l.innerText=r,o||s)if(s&&"string"!=typeof s){const e=R("span");o&&(u.R3(e,R("span")).innerText=o);const i=u.R3(e,R("a.code-link"));i.setAttribute("href",s.target.toString()),t.add(u.nm(i,"click",(e=>{this._openerService.open(s.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()}))),u.R3(i,R("span")).innerText=s.value;const r=u.R3(n,e);r.style.opacity="0.6",r.style.paddingLeft="6px"}else{const e=u.R3(n,R("span"));e.style.opacity="0.6",e.style.paddingLeft="6px",e.innerText=o&&s?`${o}(${s})`:o||`(${s})`}if((0,v.Of)(a))for(const{message:e,resource:i,startLineNumber:o,startColumn:r}of a){const s=u.R3(n,R("div"));s.style.marginTop="8px";const a=u.R3(s,R("a"));a.innerText=`${(0,k.EZ)(i)}(${o}, ${r}): `,a.style.cursor="pointer",t.add(u.nm(a,"click",(e=>{e.stopPropagation(),e.preventDefault(),this._openerService&&this._openerService.open(i,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:o,startColumn:r}}}).catch(p.dL)})));const l=u.R3(s,R("span"));l.innerText=e,this._editor.applyFontInfo(l)}return i}renderMarkerStatusbar(e,t,i){if(e.marker.severity!==x.ZL.Error&&e.marker.severity!==x.ZL.Warning&&e.marker.severity!==x.ZL.Info||t.addAction({label:n.N("view problem","View Problem"),commandId:N.NextMarkerAction.ID,run:()=>{this._hover.hide(),N.MarkerController.get(this._editor).showAtMarker(e.marker),this._editor.focus()}}),!this._editor.getOption(78)){const o=t.append(R("div"));this.recentMarkerCodeActionsInfo&&(x.H0.makeKey(this.recentMarkerCodeActionsInfo.marker)===x.H0.makeKey(e.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(o.textContent=n.N("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const s=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?r.JT.None:i.add((0,f.Vg)((()=>o.textContent=n.N("checkingForQuickFixes","Checking for quick fixes...")),200));o.textContent||(o.textContent=String.fromCharCode(160));const a=this.getCodeActions(e.marker);i.add((0,r.OF)((()=>a.cancel()))),a.then((a=>{if(s.dispose(),this.recentMarkerCodeActionsInfo={marker:e.marker,hasCodeActions:a.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions)return a.dispose(),void(o.textContent=n.N("noQuickFixes","No quick fixes available"));o.style.display="none";let l=!1;i.add((0,r.OF)((()=>{l||a.dispose()}))),t.addAction({label:n.N("quick fixes","Quick Fix..."),commandId:A.E7.Id,run:e=>{l=!0;const t=A.pY.get(this._editor),i=u.i(e);this._hover.hide(),t.showCodeActions(F,a,{x:i.left+6,y:i.top+i.height+6})}})}))}}getCodeActions(e){return(0,f.PG)((t=>(0,E.aI)(this._editor.getModel(),new a.e(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),F,I.E.None,t)))}};P=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([T(2,D.i),T(3,L.v4)],P);var B=i(2065),z=i(9365),W=i(3947),V=i(1050);function H(e,t,i){const n=g.xp.ordered(e).map((n=>Promise.resolve(n.provideHover(e,t,i)).then((e=>e&&function(e){const t=void 0!==e.range,i=void 0!==e.contents&&e.contents&&e.contents.length>0;return t&&i}(e)?e:void 0),(e=>{(0,p.Cp)(e)}))));return Promise.all(n).then(v.kX)}(0,s.sb)("_executeHoverProvider",((e,t)=>H(e,t,V.T.None)));var $=function(e,t){return function(i,n){t(i,n,e)}};const U=u.$;class j{constructor(e,t,i){this.owner=e,this.range=t,this.contents=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let q=class{constructor(e,t,i,n){this._editor=e,this._hover=t,this._modeService=i,this._openerService=n}createLoadingMessage(e){return 1!==e.type?null:new j(this,e.range,[(new z.W5).appendText(n.N("modesContentHover.loading","Loading..."))])}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,o=i.getLineMaxColumn(n),r=[];for(const i of t){const t=i.range.startLineNumber===n?i.range.startColumn:1,s=i.range.endLineNumber===n?i.range.endColumn:o,l=i.options.hoverMessage;if(!l||(0,z.CP)(l))continue;const c=new a.e(e.range.startLineNumber,t,e.range.startLineNumber,s);r.push(new j(this,c,(0,v._2)(l)))}return r}computeAsync(e,t,i){return n=this,o=void 0,s=function*(){if(!this._editor.hasModel()||1!==e.type)return Promise.resolve([]);const t=this._editor.getModel();if(!g.xp.has(t))return Promise.resolve([]);const n=yield H(t,new h.L(e.range.startLineNumber,e.range.startColumn),i),o=[];for(const t of n){if((0,z.CP)(t.contents))continue;const i=t.range?a.e.lift(t.range):e.range;o.push(new j(this,i,t.contents))}return o},new((r=void 0)||(r=Promise))((function(e,t){function i(e){try{l(s.next(e))}catch(e){t(e)}}function a(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(i,a)}l((s=s.apply(n,o||[])).next())}));var n,o,r,s}renderHoverParts(e,t,i){const n=new r.SL;for(const i of e)for(const e of i.contents){if((0,z.CP)(e))continue;const i=U("div.hover-row.markdown-hover"),o=u.R3(i,U("div.hover-contents")),r=n.add(new W.$({editor:this._editor},this._modeService,this._openerService));n.add(r.onDidRenderAsync((()=>{o.className="hover-contents code-hover-contents",this._hover.onContentsChanged()})));const s=n.add(r.render(e));o.appendChild(s.element),t.appendChild(i)}return n}};q=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([$(2,c.h),$(3,L.v4)],q);class K{constructor(e,t){this.priority=e,this.range=t,this.type=1}equals(e){return 1===e.type&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return 1===e.type&&t.lineNumber===this.range.startLineNumber}}class G{constructor(e,t,i){this.priority=e,this.owner=t,this.range=i,this.type=2}equals(e){return 2===e.type&&this.owner===e.owner}canAdoptVisibleHover(e,t){return 2===e.type&&this.owner===e.owner}}var Y=i(7586),Z=i(4565),X=i(4144),Q=i(8819),J=function(e,t){return function(i,n){t(i,n,e)}};class ee{constructor(e,t){this.owner=e,this.range=t}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let te=class{constructor(e,t,i,n,o){this._editor=e,this._commandService=i,this._menuService=n,this._contextKeyService=o}suggestHoverAnchor(e){const t=Y.GhostTextController.get(this._editor);if(!t)return null;if(8===e.target.type){const i=e.target.detail;if(t.shouldShowHoverAtViewZone(i.viewZoneId))return new G(1e3,this,a.e.fromPositions(i.positionBefore||i.position,i.positionBefore||i.position))}return 7===e.target.type&&e.target.range&&t.shouldShowHoverAt(e.target.range)||6===e.target.type&&e.target.range&&e.target.detail&&e.target.detail.mightBeForeignElement&&t.shouldShowHoverAt(e.target.range)?new G(1e3,this,e.target.range):null}computeSync(e,t){const i=Y.GhostTextController.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new ee(this,e.range)]:[]}renderHoverParts(e,t,i){const o=this._menuService.createMenu(X.eH.InlineCompletionsActions,this._contextKeyService);i.addAction({label:n.N("showNextInlineSuggestion","Next"),commandId:Y.ShowNextInlineSuggestionAction.ID,run:()=>this._commandService.executeCommand(Y.ShowNextInlineSuggestionAction.ID)}),i.addAction({label:n.N("showPreviousInlineSuggestion","Previous"),commandId:Y.ShowPreviousInlineSuggestionAction.ID,run:()=>this._commandService.executeCommand(Y.ShowPreviousInlineSuggestionAction.ID)}),i.addAction({label:n.N("acceptInlineSuggestion","Accept"),commandId:Y.commitInlineSuggestionAction.id,run:()=>this._commandService.executeCommand(Y.commitInlineSuggestionAction.id)});for(const[e,t]of o.getActions())for(const e of t)e instanceof X.U8&&i.addAction({label:e.label,commandId:e.item.id,run:()=>this._commandService.executeCommand(e.item.id)});return r.JT.None}};te=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([J(2,Z.H),J(3,X.co),J(4,Q.i6)],te);var ie=i(3308),ne=i(4494),oe=i(1264),re=i(4669);class se{constructor(e,t,i){this.presentationIndex=i,this._onColorFlushed=new re.Q5,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new re.Q5,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new re.Q5,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){for(let e=0;e{this.backgroundColor=e.getColor(b.yJ)||oe.Il.white}))),this._register(u.nm(this.pickedColorNode,u.tw.CLICK,(()=>this.model.selectNextColorPresentation()))),this._register(u.nm(n,u.tw.CLICK,(()=>{this.model.color=this.model.originalColor,this.model.flushColor()}))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this.pickedColorNode.style.backgroundColor=oe.Il.Format.CSS.format(t.color)||"",this.pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter())}onDidChangeColor(e){this.pickedColorNode.style.backgroundColor=oe.Il.Format.CSS.format(e)||"",this.pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this.pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:""}}class he extends r.JT{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this.domNode=ce(".colorpicker-body"),u.R3(e,this.domNode),this.saturationBox=new de(this.domNode,this.model,this.pixelRatio),this._register(this.saturationBox),this._register(this.saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this.saturationBox.onColorFlushed(this.flushColor,this)),this.opacityStrip=new fe(this.domNode,this.model),this._register(this.opacityStrip),this._register(this.opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this.opacityStrip.onColorFlushed(this.flushColor,this)),this.hueStrip=new pe(this.domNode,this.model),this._register(this.hueStrip),this._register(this.hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this.hueStrip.onColorFlushed(this.flushColor,this))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const i=this.model.color.hsva;this.model.color=new oe.Il(new oe.tx(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new oe.Il(new oe.tx(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=360*(1-e);this.model.color=new oe.Il(new oe.tx(360===i?0:i,t.s,t.v,t.a))}layout(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()}}class de extends r.JT{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this._onDidChange=new re.Q5,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new re.Q5,this.onColorFlushed=this._onColorFlushed.event,this.domNode=ce(".saturation-wrap"),u.R3(e,this.domNode),this.canvas=document.createElement("canvas"),this.canvas.className="saturation-box",u.R3(this.domNode,this.canvas),this.selection=ce(".saturation-selection"),u.R3(this.domNode,this.selection),this.layout(),this._register(u.Lo(this.domNode,(e=>this.onMouseDown(e)))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}onMouseDown(e){this.monitor=this._register(new le.Z);const t=u.i(this.domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.buttons,le.e,(e=>this.onDidChangePosition(e.posx-t.left,e.posy-t.top)),(()=>null));const i=u.qV(document,(()=>{this._onColorFlushed.fire(),i.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)}),!0)}onDidChangePosition(e,t){const i=Math.max(0,Math.min(1,e/this.width)),n=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(i,n),this._onDidChange.fire({s:i,v:n})}layout(){this.width=this.domNode.offsetWidth,this.height=this.domNode.offsetHeight,this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,t=new oe.Il(new oe.tx(e.h,1,1,1)),i=this.canvas.getContext("2d"),n=i.createLinearGradient(0,0,this.canvas.width,0);n.addColorStop(0,"rgba(255, 255, 255, 1)"),n.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),n.addColorStop(1,"rgba(255, 255, 255, 0)");const o=i.createLinearGradient(0,0,0,this.canvas.height);o.addColorStop(0,"rgba(0, 0, 0, 0)"),o.addColorStop(1,"rgba(0, 0, 0, 1)"),i.rect(0,0,this.canvas.width,this.canvas.height),i.fillStyle=oe.Il.Format.CSS.format(t),i.fill(),i.fillStyle=n,i.fill(),i.fillStyle=o,i.fill()}paintSelection(e,t){this.selection.style.left=e*this.width+"px",this.selection.style.top=this.height-t*this.height+"px"}onDidChangeColor(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class ge extends r.JT{constructor(e,t){super(),this.model=t,this._onDidChange=new re.Q5,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new re.Q5,this.onColorFlushed=this._onColorFlushed.event,this.domNode=u.R3(e,ce(".strip")),this.overlay=u.R3(this.domNode,ce(".overlay")),this.slider=u.R3(this.domNode,ce(".slider")),this.slider.style.top="0px",this._register(u.Lo(this.domNode,(e=>this.onMouseDown(e)))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onMouseDown(e){const t=this._register(new le.Z),i=u.i(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.buttons,le.e,(e=>this.onDidChangeTop(e.posy-i.top)),(()=>null));const n=u.qV(document,(()=>{this._onColorFlushed.fire(),n.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")}),!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=(1-e)*this.height+"px"}}class fe extends ge{constructor(e,t){super(e,t),this.domNode.classList.add("opacity-strip"),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){const{r:t,g:i,b:n}=e.rgba,o=new oe.Il(new oe.VS(t,i,n,1)),r=new oe.Il(new oe.VS(t,i,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${o} 0%, ${r} 100%)`}getValue(e){return e.hsva.a}}class pe extends ge{constructor(e,t){super(e,t),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class me extends y.${constructor(e,t,i,n){super(),this.model=t,this.pixelRatio=i,this._register((0,ae.fX)((()=>this.layout())));const o=ce(".colorpicker-widget");e.appendChild(o);const r=new ue(o,this.model,n);this.body=new he(o,this.model,this.pixelRatio),this._register(r),this._register(this.body)}layout(){this.body.layout()}}var _e=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class ve{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let be=class{constructor(e,t,i){this._editor=e,this._hover=t,this._themeService=i}computeSync(e,t){return[]}computeAsync(e,t,i){return _e(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return[];const e=ne.i.get(this._editor);for(const i of t){const t=e.getColorData(i.range.getStartPosition());if(t)return[yield this._createColorHover(this._editor.getModel(),t.colorInfo,t.provider)]}return[]}))}_createColorHover(e,t,i){return _e(this,void 0,void 0,(function*(){const n=e.getValueInRange(t.range),{red:o,green:r,blue:s,alpha:l}=t.color,c=new oe.VS(Math.round(255*o),Math.round(255*r),Math.round(255*s),l),u=new oe.Il(c),h=yield(0,ie.R)(e,t,i,V.T.None),d=new se(u,[],0);return d.colorPresentations=h||[],d.guessColorPresentation(u,n),new ve(this,a.e.lift(t.range),d,i)}))}renderHoverParts(e,t,i){if(0===e.length||!this._editor.hasModel())return r.JT.None;const n=new r.SL,o=e[0],s=this._editor.getModel(),l=o.model,c=n.add(new me(t,l,this._editor.getOption(126),this._themeService));let u=new a.e(o.range.startLineNumber,o.range.startColumn,o.range.endLineNumber,o.range.endColumn);const h=()=>{let e,t;if(l.presentation.textEdit){e=[l.presentation.textEdit],t=new a.e(l.presentation.textEdit.range.startLineNumber,l.presentation.textEdit.range.startColumn,l.presentation.textEdit.range.endLineNumber,l.presentation.textEdit.range.endColumn);const i=this._editor.getModel()._setTrackedRange(null,t,3);this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",e),t=this._editor.getModel()._getTrackedRange(i)||t}else e=[{identifier:null,range:u,text:l.presentation.label,forceMoveMarkers:!1}],t=u.setEndPosition(u.endLineNumber,u.startColumn+l.presentation.label.length),this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",e);l.presentation.additionalTextEdits&&(e=[...l.presentation.additionalTextEdits],this._editor.executeEdits("colorpicker",e),this._hover.hide()),this._editor.pushUndoStop(),u=t},d=e=>(0,ie.R)(s,{range:u,color:{red:e.rgba.r/255,green:e.rgba.g/255,blue:e.rgba.b/255,alpha:e.rgba.a}},o.provider,V.T.None).then((e=>{l.colorPresentations=e||[]}));return n.add(l.onColorFlushed((e=>{d(e).then(h)}))),n.add(l.onDidChangeColor(d)),this._hover.setColorPicker(c),n}};var ye,we;be=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(ye=2,we=_.XE,function(e,t){we(e,t,ye)})],be);var Ce=i(1847),Se=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},xe=function(e,t){return function(i,n){t(i,n,e)}},ke=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const De=u.$;let Le=class extends r.JT{constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=De("div.hover-row.status-bar"),this.actionsElement=u.R3(this.hoverElement,De("div.actions"))}get hasContent(){return this._hasContent}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;this._register(function(e,t,i){const n=u.R3(e,C("div.action-container")),o=u.R3(n,C("a.action"));return o.setAttribute("href","#"),o.setAttribute("role","button"),t.iconClass&&u.R3(o,C(`span.icon.${t.iconClass}`)),u.R3(o,C("span")).textContent=i?`${t.label} (${i})`:t.label,u.nm(n,u.tw.CLICK,(e=>{e.stopPropagation(),e.preventDefault(),t.run(n)}))}(this.actionsElement,e,i)),this._hasContent=!0}append(e){const t=u.R3(this.actionsElement,e);return this._hasContent=!0,t}};Le=Se([xe(0,Ce.d)],Le);class Ne{constructor(e,t){this._participants=t,this._editor=e,this._result=[],this._anchor=null}setAnchor(e){this._anchor=e,this._result=[]}clearResult(){this._result=[]}static _getLineDecorations(e,t){if(1!==t.type)return[];const i=e.getModel(),n=t.range.startLineNumber,o=i.getLineMaxColumn(n);return e.getLineDecorations(n).filter((e=>{if(e.options.isWholeLine)return!0;const i=e.range.startLineNumber===n?e.range.startColumn:1,r=e.range.endLineNumber===n?e.range.endColumn:o;return!(i>t.range.startColumn||t.range.endColumn>r)}))}computeAsync(e){return ke(this,void 0,void 0,(function*(){const t=this._anchor;if(!this._editor.hasModel()||!t)return Promise.resolve([]);const i=Ne._getLineDecorations(this._editor,t),n=yield Promise.all(this._participants.map((n=>this._computeAsync(n,i,t,e))));return(0,v.xH)(n)}))}_computeAsync(e,t,i,n){return ke(this,void 0,void 0,(function*(){return e.computeAsync?e.computeAsync(i,t,n):[]}))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=Ne._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return(0,v.kX)(t)}onResult(e,t){this._result=t?e.concat(this._result):this._result.concat(e)}getResult(){return this._result.slice(0)}getResultWithLoadingMessage(){if(this._anchor)for(const e of this._participants)if(e.createLoadingMessage){const t=e.createLoadingMessage(this._anchor);if(t)return this._result.slice(0).concat([t])}return this._result.slice(0)}}let Ee=class e extends y.${constructor(t,i,n,o){super(),this._hoverVisibleKey=i,this._keybindingService=o,this.allowEditorOverflow=!0,this._participants=[n.createInstance(be,t,this),n.createInstance(q,t,this),n.createInstance(te,t,this),n.createInstance(P,t,this)],this._hover=this._register(new S),this._id=e.ID,this._editor=t,this._isVisible=!1,this._stoleFocus=!1,this._renderDisposable=null,this.onkeydown(this._hover.containerDomNode,(e=>{e.equals(9)&&this.hide()})),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(40)&&this._updateFont()}))),this._editor.onDidLayoutChange((()=>this.layout())),this.layout(),this._editor.addContentWidget(this),this._showAtPosition=null,this._showAtRange=null,this._stoleFocus=!1,this._messages=[],this._lastAnchor=null,this._computer=new Ne(this._editor,this._participants),this._highlightDecorations=[],this._isChangingDecorations=!1,this._shouldFocus=!1,this._colorPicker=null,this._hoverOperation=new m(this._computer,(e=>this._withResult(e,!0)),null,(e=>this._withResult(e,!1)),this._editor.getOption(50).delay),this._register(u.mu(this.getDomNode(),u.tw.FOCUS,(()=>{this._colorPicker&&this.getDomNode().classList.add("colorpicker-hover")}))),this._register(u.mu(this.getDomNode(),u.tw.BLUR,(()=>{this.getDomNode().classList.remove("colorpicker-hover")}))),this._register(t.onDidChangeConfiguration((()=>{this._hoverOperation.setHoverTime(this._editor.getOption(50).delay)}))),this._register(g.RW.onDidChange((()=>{this._isVisible&&this._lastAnchor&&this._messages.length>0&&(this._hover.contentsDomNode.textContent="",this._renderMessages(this._lastAnchor,this._messages))})))}dispose(){this._hoverOperation.cancel(),this._editor.removeContentWidget(this),super.dispose()}getId(){return this._id}getDomNode(){return this._hover.containerDomNode}_shouldShowAt(e){const t=e.target.type;if(6===t)return!0;if(7===t){const t=this._editor.getOption(40).typicalHalfwidthCharacterWidth/2,i=e.target.detail;if(i&&!i.isAfterLines&&"number"==typeof i.horizontalDistanceToText&&i.horizontalDistanceToTexte.startsWith("ced-colorBox")))&&e.target.range.endColumn-e.target.range.startColumn==1?new a.e(e.target.range.startLineNumber,e.target.range.startColumn+1,e.target.range.endLineNumber,e.target.range.endColumn+1):e.target.range;i.push(new K(0,n))}return 0!==i.length&&(i.sort(((e,t)=>t.priority-e.priority)),this._startShowingAt(i[0],0,!1),!0)}_showAt(e,t,i){this._showAtPosition=e,this._showAtRange=t,this._hoverVisibleKey.set(!0),this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._editor.layoutContentWidget(this),this._editor.render(),this._stoleFocus=i,i&&this._hover.containerDomNode.focus()}getPosition(){return this._isVisible?{position:this._showAtPosition,range:this._showAtRange,preference:[1,2]}:null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e=>this._editor.applyFontInfo(e)))}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont(),this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}layout(){const e=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:t,lineHeight:i}=this._editor.getOption(40);this._hover.contentsDomNode.style.fontSize=`${t}px`,this._hover.contentsDomNode.style.lineHeight=`${i}px`,this._hover.contentsDomNode.style.maxHeight=`${e}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(.66*this._editor.getLayoutInfo().width,500)}px`}onModelDecorationsChanged(){this._isChangingDecorations||this._isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._colorPicker||this._hoverOperation.start(0))}startShowingAtRange(e,t,i){this._startShowingAt(new K(0,e),t,i)}_startShowingAt(e,t,i){if(!this._lastAnchor||!this._lastAnchor.equals(e)){if(this._hoverOperation.cancel(),this._isVisible)if(this._showAtPosition&&this._lastAnchor&&e.canAdoptVisibleHover(this._lastAnchor,this._showAtPosition)){const t=this._messages.filter((t=>t.isValidForHoverAnchor(e)));if(0===t.length)this.hide();else{if(t.length===this._messages.length)return;this._renderMessages(e,t)}}else this.hide();this._lastAnchor=e,this._computer.setAnchor(e),this._shouldFocus=i,this._hoverOperation.start(t)}}hide(){this._lastAnchor=null,this._hoverOperation.cancel(),this._isVisible&&(setTimeout((()=>{this._isVisible||this._hoverVisibleKey.set(!1)}),0),this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._editor.layoutContentWidget(this),this._stoleFocus&&this._editor.focus()),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,[]),this._isChangingDecorations=!1,this._renderDisposable&&(this._renderDisposable.dispose(),this._renderDisposable=null),this._colorPicker=null}isColorPickerVisible(){return!!this._colorPicker}setColorPicker(e){this._colorPicker=e}onContentsChanged(){this._hover.onContentsChanged()}_withResult(e,t){this._messages=e,this._lastAnchor&&this._messages.length>0?this._renderMessages(this._lastAnchor,this._messages):t&&this.hide()}_renderMessages(t,i){this._renderDisposable&&(this._renderDisposable.dispose(),this._renderDisposable=null),this._colorPicker=null;let n=1073741824,o=i[0].range,s=null,l=document.createDocumentFragment();const c=new r.SL,u=new Map;for(const e of i)n=Math.min(n,e.range.startColumn),o=a.e.plusRange(o,e.range),e.forceShowAtRange&&(s=e.range),u.has(e.owner)||u.set(e.owner,[]),u.get(e.owner).push(e);const d=c.add(new Le(this._keybindingService));for(const[e,t]of u)c.add(e.renderHoverParts(t,l,d));d.hasContent&&l.appendChild(d.hoverElement),this._renderDisposable=c,l.hasChildNodes()&&(s?this._showAt(s.getStartPosition(),s,this._shouldFocus):this._showAt(new h.L(t.range.startLineNumber,n),o,this._shouldFocus),this._updateContents(l)),this._colorPicker&&this._colorPicker.layout(),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,o?[{range:o,options:e._DECORATION_OPTIONS}]:[]),this._isChangingDecorations=!1}};Ee.ID="editor.contrib.modesContentHoverWidget",Ee._DECORATION_OPTIONS=d.qx.register({description:"content-hover-highlight",className:"hoverHighlight"}),Ee=Se([xe(2,B.TG),xe(3,Ce.d)],Ee),(0,_.Ic)(((e,t)=>{const i=e.getColor(b.ur);i&&t.addRule(`.monaco-hover .hover-contents a.code-link span:hover { color: ${i}; }`)}));class Ae extends y.${constructor(e,t){super(),this._id=e,this._editor=t,this._isVisible=!1,this._domNode=document.createElement("div"),this._domNode.className="monaco-hover hidden",this._domNode.setAttribute("aria-hidden","true"),this._domNode.setAttribute("role","tooltip"),this._showAtLineNumber=-1,this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(40)&&this.updateFont()}))),this._editor.addOverlayWidget(this)}get isVisible(){return this._isVisible}set isVisible(e){this._isVisible=e,this._domNode.classList.toggle("hidden",!this._isVisible)}getId(){return this._id}getDomNode(){return this._domNode}showAt(e){this._showAtLineNumber=e,this.isVisible||(this.isVisible=!0);const t=this._editor.getLayoutInfo(),i=this._editor.getTopForLineNumber(this._showAtLineNumber),n=this._editor.getScrollTop(),o=this._editor.getOption(56),r=i-n-(this._domNode.clientHeight-o)/2;this._domNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._domNode.style.top=`${Math.max(Math.round(r),0)}px`}hide(){this.isVisible&&(this.isVisible=!1)}getPosition(){return null}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}updateFont(){[...Array.prototype.slice.call(this._domNode.getElementsByTagName("code")),...Array.prototype.slice.call(this._domNode.getElementsByClassName("code"))].forEach((e=>this._editor.applyFontInfo(e)))}updateContents(e){this._domNode.textContent="",this._domNode.appendChild(e),this.updateFont()}}class Me{constructor(e){this._editor=e,this._lineNumber=-1,this._result=[]}setLineNumber(e){this._lineNumber=e,this._result=[]}clearResult(){this._result=[]}computeSync(){const e=e=>({value:e}),t=this._editor.getLineDecorations(this._lineNumber),i=[];if(!t)return i;for(const n of t){if(!n.options.glyphMarginClassName)continue;const t=n.options.glyphMarginHoverMessage;t&&!(0,z.CP)(t)&&i.push(...(0,v._2)(t).map(e))}return i}onResult(e,t){this._result=this._result.concat(e)}getResult(){return this._result}getResultWithLoadingMessage(){return this.getResult()}}class Ie extends Ae{constructor(e,t,i=L.SW){super(Ie.ID,e),this._renderDisposeables=this._register(new r.SL),this._messages=[],this._lastLineNumber=-1,this._markdownRenderer=this._register(new W.$({editor:this._editor},t,i)),this._computer=new Me(this._editor),this._hoverOperation=new m(this._computer,(e=>this._withResult(e)),void 0,(e=>this._withResult(e)),300)}dispose(){this._hoverOperation.cancel(),super.dispose()}onModelDecorationsChanged(){this.isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._hoverOperation.start(0))}startShowingAt(e){this._lastLineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._lastLineNumber=e,this._computer.setLineNumber(e),this._hoverOperation.start(0))}hide(){this._lastLineNumber=-1,this._hoverOperation.cancel(),super.hide()}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._lastLineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const i=document.createDocumentFragment();for(const e of t){const t=this._markdownRenderer.render(e.value);this._renderDisposeables.add(t),i.appendChild((0,u.$)("div.hover-row",void 0,t.element))}this.updateContents(i),this.showAt(e)}}Ie.ID="editor.contrib.modesGlyphHoverWidget";var Te=i(365),Re=function(e,t){return function(i,n){t(i,n,e)}};let Oe=class e{constructor(e,t,i,n,o){this._editor=e,this._instantiationService=t,this._openerService=i,this._modeService=n,this._toUnhook=new r.SL,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration((e=>{e.hasChanged(50)&&(this._unhookEvents(),this._hookEvents())})),this._hoverVisibleKey=l.u.hoverVisible.bindTo(o)}static get(t){return t.getContribution(e.ID)}_hookEvents(){const e=()=>this._hideWidgets(),t=this._editor.getOption(50);this._isHoverEnabled=t.enabled,this._isHoverSticky=t.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown((e=>this._onEditorMouseDown(e)))),this._toUnhook.add(this._editor.onMouseUp((e=>this._onEditorMouseUp(e)))),this._toUnhook.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._toUnhook.add(this._editor.onKeyDown((e=>this._onKeyDown(e)))),this._toUnhook.add(this._editor.onDidChangeModelDecorations((()=>this._onModelDecorationsChanged())))):(this._toUnhook.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._toUnhook.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))),this._toUnhook.add(this._editor.onMouseLeave(e)),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange((e=>this._onEditorScrollChanged(e))))}_unhookEvents(){this._toUnhook.clear()}_onModelDecorationsChanged(){var e,t;null===(e=this._contentWidget)||void 0===e||e.onModelDecorationsChanged(),null===(t=this._glyphWidget)||void 0===t||t.onModelDecorationsChanged()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._isMouseDown=!0;const t=e.target.type;9!==t||e.target.detail!==Ee.ID?12===t&&e.target.detail===Ie.ID||(12!==t&&e.target.detail!==Ie.ID&&(this._hoverClicked=!1),this._hideWidgets()):this._hoverClicked=!0}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseMove(e){var t,i,n,o,r;let s=e.target.type;if((!this._isMouseDown||!this._hoverClicked)&&(!this._isHoverSticky||9!==s||e.target.detail!==Ee.ID)&&(!this._isHoverSticky||(null===(i=null===(t=e.event.browserEvent.view)||void 0===t?void 0:t.getSelection())||void 0===i?void 0:i.isCollapsed))&&(this._isHoverSticky||9!==s||e.target.detail!==Ee.ID||!(null===(n=this._contentWidget)||void 0===n?void 0:n.isColorPickerVisible()))&&(!this._isHoverSticky||12!==s||e.target.detail!==Ie.ID)){if(this._isHoverEnabled)return this._getOrCreateContentWidget().maybeShowAt(e)?void(null===(o=this._glyphWidget)||void 0===o||o.hide()):2===s&&e.target.position?(null===(r=this._contentWidget)||void 0===r||r.hide(),this._glyphWidget||(this._glyphWidget=new Ie(this._editor,this._modeService,this._openerService)),void this._glyphWidget.startShowingAt(e.target.position.lineNumber)):void this._hideWidgets();this._hideWidgets()}}_onKeyDown(e){5!==e.keyCode&&6!==e.keyCode&&57!==e.keyCode&&4!==e.keyCode&&this._hideWidgets()}_hideWidgets(){var e,t,i;this._isMouseDown&&this._hoverClicked&&(null===(e=this._contentWidget)||void 0===e?void 0:e.isColorPickerVisible())||(this._hoverClicked=!1,null===(t=this._glyphWidget)||void 0===t||t.hide(),null===(i=this._contentWidget)||void 0===i||i.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(Ee,this._editor,this._hoverVisibleKey)),this._contentWidget}isColorPickerVisible(){var e;return(null===(e=this._contentWidget)||void 0===e?void 0:e.isColorPickerVisible())||!1}showContentHover(e,t,i){this._getOrCreateContentWidget().startShowingAtRange(e,t,i)}dispose(){var e,t;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),null===(e=this._glyphWidget)||void 0===e||e.dispose(),null===(t=this._contentWidget)||void 0===t||t.dispose()}};Oe.ID="editor.contrib.hover",Oe=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([Re(1,B.TG),Re(2,L.v4),Re(3,c.h),Re(4,Q.i6)],Oe);class Fe extends s.R6{constructor(){super({id:"editor.action.showHover",label:n.N({key:"showHover",comment:["Label for action that will trigger the showing of a hover in the editor.","This allows for users to show the hover without using the mouse."]},"Show Hover"),alias:"Show Hover",precondition:void 0,kbOpts:{kbExpr:l.u.editorTextFocus,primary:(0,o.gx)(2089,2087),weight:100}})}run(e,t){if(!t.hasModel())return;let i=Oe.get(t);if(!i)return;const n=t.getPosition(),o=new a.e(n.lineNumber,n.column,n.lineNumber,n.column),r=2===t.getOption(2);i.showContentHover(o,1,r)}}class Pe extends s.R6{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:n.N({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){let i=Oe.get(t);if(!i)return;const n=t.getPosition();if(!n)return;const o=new a.e(n.lineNumber,n.column,n.lineNumber,n.column);Te.GotoDefinitionAtPositionEditorContribution.get(t).startFindDefinitionFromCursor(n).then((()=>{i.showContentHover(o,1,!0)}))}}(0,s._K)(Oe.ID,Oe),(0,s.Qr)(Fe),(0,s.Qr)(Pe),(0,_.Ic)(((e,t)=>{const i=e.getColor(b.pt);i&&t.addRule(`.monaco-editor .hoverHighlight { background-color: ${i}; }`);const n=e.getColor(b.yJ);n&&t.addRule(`.monaco-editor .monaco-hover { background-color: ${n}; }`);const o=e.getColor(b.CN);o&&(t.addRule(`.monaco-editor .monaco-hover { border: 1px solid ${o}; }`),t.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${o.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${o.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${o.transparent(.5)}; }`));const r=e.getColor(b.ur);r&&t.addRule(`.monaco-editor .monaco-hover a { color: ${r}; }`);const s=e.getColor(b.Sb);s&&t.addRule(`.monaco-editor .monaco-hover { color: ${s}; }`);const a=e.getColor(b.Lo);a&&t.addRule(`.monaco-editor .monaco-hover .hover-row .actions { background-color: ${a}; }`);const l=e.getColor(b.Sw);l&&t.addRule(`.monaco-editor .monaco-hover code { background-color: ${l}; }`)}))},3554:(e,t,i)=>{"use strict";i.r(t);var n=i(3580),o=i(4314),r=i(3860),s=i(9102),a=i(6830),l=i(469);class c{constructor(e,t,i){this._editRange=e,this._originalSelection=t,this._text=i}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new r.Y(i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn),i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn)):new r.Y(i.endLineNumber,i.endColumn-this._text.length,i.endLineNumber,i.endColumn)}}var u=i(9925),h=i(7781),d=i(7869),g=i(3411),f=i(5393),p=i(7301);let m=class e{constructor(e,t){this.decorationIds=[],this.editor=e,this.editorWorkerService=t}static get(t){return t.getContribution(e.ID)}dispose(){}run(t,i){this.currentRequest&&this.currentRequest.cancel();const n=this.editor.getSelection(),s=this.editor.getModel();if(!s||!n)return;let a=n;if(a.startLineNumber!==a.endLineNumber)return;const l=new u.yy(this.editor,5),h=s.uri;return this.editorWorkerService.canNavigateValueSet(h)?(this.currentRequest=(0,f.PG)((e=>this.editorWorkerService.navigateValueSet(h,a,i))),this.currentRequest.then((i=>{if(!i||!i.range||!i.value)return;if(!l.validate(this.editor))return;let n=o.e.lift(i.range),s=i.range,u=i.value.length-(a.endColumn-a.startColumn);s={startLineNumber:s.startLineNumber,startColumn:s.startColumn,endLineNumber:s.endLineNumber,endColumn:s.startColumn+i.value.length},u>1&&(a=new r.Y(a.startLineNumber,a.startColumn,a.endLineNumber,a.endColumn+u-1));const h=new c(n,a,i.value);this.editor.pushUndoStop(),this.editor.executeCommand(t,h),this.editor.pushUndoStop(),this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[{range:s,options:e.DECORATION}]),this.decorationRemover&&this.decorationRemover.cancel(),this.decorationRemover=(0,f.Vs)(350),this.decorationRemover.then((()=>this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[]))).catch(p.dL)})).catch(p.dL)):Promise.resolve(void 0)}};var _,v;m.ID="editor.contrib.inPlaceReplaceController",m.DECORATION=g.qx.register({description:"in-place-replace",className:"valueSetReplacement"}),m=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(_=1,v=l.p,function(e,t){v(e,t,_)})],m);class b extends a.R6{constructor(){super({id:"editor.action.inPlaceReplace.up",label:n.N("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:s.u.writable,kbOpts:{kbExpr:s.u.editorTextFocus,primary:3154,weight:100}})}run(e,t){const i=m.get(t);return i?i.run(this.id,!0):Promise.resolve(void 0)}}class y extends a.R6{constructor(){super({id:"editor.action.inPlaceReplace.down",label:n.N("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:s.u.writable,kbOpts:{kbExpr:s.u.editorTextFocus,primary:3156,weight:100}})}run(e,t){const i=m.get(t);return i?i.run(this.id,!1):Promise.resolve(void 0)}}(0,a._K)(m.ID,m),(0,a.Qr)(b),(0,a.Qr)(y),(0,h.Ic)(((e,t)=>{const i=e.getColor(d.Dl);i&&t.addRule(`.monaco-editor.vs .valueSetReplacement { outline: solid 2px ${i}; }`)}))},1491:(e,t,i)=>{"use strict";function n(e,t){let i=0;for(let n=0;nn,J:()=>o})},638:(e,t,i)=>{"use strict";i.r(t),i.d(t,{getReindentEditOperations:()=>_,IndentationToSpacesAction:()=>v,IndentationToTabsAction:()=>b,ChangeIndentationSizeAction:()=>y,IndentUsingTabs:()=>w,IndentUsingSpaces:()=>C,DetectIndentation:()=>S,ReindentLinesAction:()=>x,ReindentSelectedLinesAction:()=>k,AutoIndentOnPasteCommand:()=>D,AutoIndentOnPaste:()=>L,IndentationToSpacesCommand:()=>E,IndentationToTabsCommand:()=>A});var n=i(3580),o=i(5976),r=i(7295),s=i(6830),a=i(291),l=i(9386),c=i(4314),u=i(3860),h=i(9102),d=i(3411),g=i(3831),f=i(1200),p=i(1491),m=i(1157);function _(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return[];let o=g.zu.getIndentationRules(e.getLanguageIdentifier().id);if(!o)return[];for(i=Math.min(i,e.getLineCount());t<=i&&o.unIndentedLinePattern;){let i=e.getLineContent(t);if(!o.unIndentedLinePattern.test(i))break;t++}if(t>i-1)return[];const{tabSize:s,indentSize:c,insertSpaces:h}=e.getOptions(),f=(e,t)=>(t=t||1,a.U.shiftIndent(e,e.length+t,s,c,h)),p=(e,t)=>(t=t||1,a.U.unshiftIndent(e,e.length+t,s,c,h));let m,_=[],v=e.getLineContent(t),b=v;if(null!=n){m=n;let e=r.V8(v);b=m+v.substring(e.length),o.decreaseIndentPattern&&o.decreaseIndentPattern.test(b)&&(m=p(m),b=m+v.substring(e.length)),v!==b&&_.push(l.h.replaceMove(new u.Y(t,1,t,e.length+1),d.yO.normalizeIndentation(m,c,h)))}else m=r.V8(v);let y=m;o.increaseIndentPattern&&o.increaseIndentPattern.test(b)?(y=f(y),m=f(m)):o.indentNextLinePattern&&o.indentNextLinePattern.test(b)&&(y=f(y));for(let n=++t;n<=i;n++){let t=e.getLineContent(n),i=r.V8(t),s=y+t.substring(i.length);o.decreaseIndentPattern&&o.decreaseIndentPattern.test(s)&&(y=p(y),m=p(m)),i!==y&&_.push(l.h.replaceMove(new u.Y(n,1,n,i.length+1),d.yO.normalizeIndentation(y,c,h))),o.unIndentedLinePattern&&o.unIndentedLinePattern.test(t)||(o.increaseIndentPattern&&o.increaseIndentPattern.test(s)?(m=f(m),y=m):y=o.indentNextLinePattern&&o.indentNextLinePattern.test(s)?f(y):m)}return _}class v extends s.R6{constructor(){super({id:v.ID,label:n.N("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:h.u.writable})}run(e,t){let i=t.getModel();if(!i)return;let n=i.getOptions(),o=t.getSelection();if(!o)return;const r=new E(o,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop(),i.updateOptions({insertSpaces:!0})}}v.ID="editor.action.indentationToSpaces";class b extends s.R6{constructor(){super({id:b.ID,label:n.N("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:h.u.writable})}run(e,t){let i=t.getModel();if(!i)return;let n=i.getOptions(),o=t.getSelection();if(!o)return;const r=new A(o,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop(),i.updateOptions({insertSpaces:!1})}}b.ID="editor.action.indentationToTabs";class y extends s.R6{constructor(e,t){super(t),this.insertSpaces=e}run(e,t){const i=e.get(m.eJ),o=e.get(f.q);let r=t.getModel();if(!r)return;let s=o.getCreationOptions(r.getLanguageIdentifier().language,r.uri,r.isForSimpleWidget);const a=[1,2,3,4,5,6,7,8].map((e=>({id:e.toString(),label:e.toString(),description:e===s.tabSize?n.N("configuredTabSize","Configured Tab Size"):void 0}))),l=Math.min(r.getOptions().tabSize-1,7);setTimeout((()=>{i.pick(a,{placeHolder:n.N({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:a[l]}).then((e=>{e&&r&&!r.isDisposed()&&r.updateOptions({tabSize:parseInt(e.label,10),insertSpaces:this.insertSpaces})}))}),50)}}class w extends y{constructor(){super(!1,{id:w.ID,label:n.N("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}}w.ID="editor.action.indentUsingTabs";class C extends y{constructor(){super(!0,{id:C.ID,label:n.N("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}}C.ID="editor.action.indentUsingSpaces";class S extends s.R6{constructor(){super({id:S.ID,label:n.N("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){const i=e.get(f.q);let n=t.getModel();if(!n)return;let o=i.getCreationOptions(n.getLanguageIdentifier().language,n.uri,n.isForSimpleWidget);n.detectIndentation(o.insertSpaces,o.tabSize)}}S.ID="editor.action.detectIndentation";class x extends s.R6{constructor(){super({id:"editor.action.reindentlines",label:n.N("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:h.u.writable})}run(e,t){let i=t.getModel();if(!i)return;let n=_(i,1,i.getLineCount());n.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,n),t.pushUndoStop())}}class k extends s.R6{constructor(){super({id:"editor.action.reindentselectedlines",label:n.N("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:h.u.writable})}run(e,t){let i=t.getModel();if(!i)return;let n=t.getSelections();if(null===n)return;let o=[];for(let e of n){let t=e.startLineNumber,n=e.endLineNumber;if(t!==n&&1===e.endColumn&&n--,1===t){if(t===n)continue}else t--;let r=_(i,t,n);o.push(...r)}o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}}class D{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(let t of e)t.range&&"string"==typeof t.text&&this._edits.push(t)}getEditOperations(e,t){for(let e of this._edits)t.addEditOperation(c.e.lift(e.range),e.text);let i=!1;Array.isArray(this._edits)&&1===this._edits.length&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),i||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}class L{constructor(e){this.callOnDispose=new o.SL,this.callOnModel=new o.SL,this.editor=e,this.callOnDispose.add(e.onDidChangeConfiguration((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModel((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModelLanguage((()=>this.update())))}update(){this.callOnModel.clear(),this.editor.getOption(9)<4||this.editor.getOption(44)||this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste((({range:e})=>{this.trigger(e)})))}trigger(e){let t=this.editor.getSelections();if(null===t||t.length>1)return;const i=this.editor.getModel();if(!i)return;if(!i.isCheapToTokenize(e.getStartPosition().lineNumber))return;const n=this.editor.getOption(9),{tabSize:o,indentSize:s,insertSpaces:l}=i.getOptions();let u=[],h={shiftIndent:e=>a.U.shiftIndent(e,e.length+1,o,s,l),unshiftIndent:e=>a.U.unshiftIndent(e,e.length+1,o,s,l)},d=e.startLineNumber;for(;d<=e.endLineNumber&&this.shouldIgnoreLine(i,d);)d++;if(d>e.endLineNumber)return;let f=i.getLineContent(d);if(!/\S/.test(f.substring(0,e.startColumn-1))){let e=g.zu.getGoodIndentForLine(n,i,i.getLanguageIdentifier().id,d,h);if(null!==e){let t=r.V8(f),n=p.Y(e,o);if(n!==p.Y(t,o)){let e=p.J(n,o,l);u.push({range:new c.e(d,1,d,t.length+1),text:e}),f=e+f.substr(t.length)}else{let e=g.zu.getIndentMetadata(i,d);if(0===e||8===e)return}}}const m=d;for(;di.getLineTokens(e),getLanguageIdentifier:()=>i.getLanguageIdentifier(),getLanguageIdAtPosition:(e,t)=>i.getLanguageIdAtPosition(e,t),getLineContent:e=>e===m?f:i.getLineContent(e)},s=g.zu.getGoodIndentForLine(n,t,i.getLanguageIdentifier().id,d+1,h);if(null!==s){let t=p.Y(s,o),n=p.Y(r.V8(i.getLineContent(d+1)),o);if(t!==n){let s=t-n;for(let t=d+1;t<=e.endLineNumber;t++){let e=i.getLineContent(t),n=r.V8(e),a=p.Y(n,o)+s,h=p.J(a,o,l);h!==n&&u.push({range:new c.e(t,1,t,n.length+1),text:h})}}}}if(u.length>0){this.editor.pushUndoStop();let e=new D(u,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",e),this.editor.pushUndoStop()}}shouldIgnoreLine(e,t){e.forceTokenization(t);let i=e.getLineFirstNonWhitespaceColumn(t);if(0===i)return!0;let n=e.getLineTokens(t);if(n.getCount()>0){let e=n.findTokenIndexAtOffset(i);if(e>=0&&1===n.getStandardTokenType(e))return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}}function N(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return;let o="";for(let e=0;e{"use strict";i.r(t),i.d(t,{getInlayHints:()=>S,InlayHintsController:()=>x});var n=i(5393),o=i(7301),r=i(9954),s=i(5976),a=i(6830),l=i(1640),c=i(4101),u=i(9488),h=i(3910),d=i(1050),g=i(7781),f=i(4314),p=i(1036),m=i(4565),_=i(666),v=i(8401),b=i(8216),y=i(187),w=function(e,t){return function(i,n){t(i,n,e)}},C=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function S(e,t,i){return C(this,void 0,void 0,(function*(){const n=[],r=c.mX.ordered(e).reverse(),s=(0,u.xH)(r.map((r=>t.map((t=>Promise.resolve(r.provideInlayHints(e,t,i)).then((e=>{e&&n.push({list:e,provider:r})}),(e=>{(0,o.Cp)(e)})))))));return yield Promise.all(s),n}))}let x=class{constructor(e,t,i){this._editor=e,this._codeEditorService=t,this._themeService=i,this._disposables=new s.SL,this._sessionDisposables=new s.SL,this._getInlayHintsDelays=new p.Y(c.mX,250,2500),this._decorationsTypeIds=[],this._decorationIds=[],this._disposables.add(c.mX.onDidChange((()=>this._update()))),this._disposables.add(i.onDidColorThemeChange((()=>this._update()))),this._disposables.add(e.onDidChangeModel((()=>this._update()))),this._disposables.add(e.onDidChangeModelLanguage((()=>this._update()))),this._disposables.add(e.onDidChangeConfiguration((e=>{e.hasChanged(124)&&this._update()}))),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(124).enabled)return void this._removeAllDecorations();const e=this._editor.getModel();if(!e||!c.mX.has(e))return void this._removeAllDecorations();const t=new n.pY((()=>C(this,void 0,void 0,(function*(){const i=Date.now(),n=new d.A;this._sessionDisposables.add((0,s.OF)((()=>n.dispose(!0))));const o=this._editor.getVisibleRangesPlusViewportAboveBelow(),r=yield S(e,o,n.token),a=this._getInlayHintsDelays.update(e,Date.now()-i);t.delay=a,this._updateHintsDecorators(r)}))),this._getInlayHintsDelays.get(e));this._sessionDisposables.add(t),this._sessionDisposables.add(this._editor.onDidChangeModelContent((()=>t.schedule()))),this._disposables.add(this._editor.onDidScrollChange((()=>t.schedule()))),t.schedule();const i=new s.SL;this._sessionDisposables.add(i);for(const n of c.mX.all(e))"function"==typeof n.onDidChangeInlayHints&&i.add(n.onDidChangeInlayHints((()=>t.schedule())))}_updateHintsDecorators(e){const{fontSize:t,fontFamily:i}=this._getLayoutInfo(),n=this._themeService.getColorTheme().getColor(h.Pp),o=this._themeService.getColorTheme().getColor(h.VV),s=[],a=[],l="--inlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(l,i);for(const{list:i}of e)for(let e=0;et)&&(i=.9*t|0),{fontSize:i,fontFamily:e.fontFamily}}_removeAllDecorations(){this._decorationIds=this._editor.deltaDecorations(this._decorationIds,[]),this._decorationsTypeIds.forEach(this._codeEditorService.removeDecorationType,this._codeEditorService),this._decorationsTypeIds=[]}};x.ID="editor.contrib.InlayHints",x=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([w(1,l.$),w(2,g.XE)],x),(0,a._K)(x.ID,x),m.P.registerCommand("_executeInlayHintProvider",((e,...t)=>C(void 0,void 0,void 0,(function*(){const[i,n]=t;(0,v.p_)(_.o.isUri(i)),(0,v.p_)(f.e.isIRange(n));const o=yield e.get(b.S).createModelReference(i);try{const e=yield S(o.object.textEditorModel,[f.e.lift(n)],d.T.None);return(0,u.xH)(e.map((e=>e.list))).sort(((e,t)=>y.L.compare(e.position,t.position)))}finally{o.dispose()}}))))},7586:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ActiveGhostTextController:()=>te,GhostTextController:()=>J,ShowNextInlineSuggestionAction:()=>oe,ShowPreviousInlineSuggestionAction:()=>re,TriggerInlineSuggestionAction:()=>se,commitInlineSuggestionAction:()=>ne});var n,o=i(5976),r=i(6830),s=i(9102),a=i(5321),l=i(4314),c=i(1640),u=i(7295),h=i(7736),d=i(4141),g=i(72),f=i(9052),p=i(8411),m=i(187),_=i(4669),v=i(7781),b=i(7869),y=i(1264),w=i(3181),C=function(e,t){return function(i,n){t(i,n,e)}};const S=null===(n=window.trustedTypes)||void 0===n?void 0:n.createPolicy("editorGhostText",{createHTML:e=>e});class x extends o.JT{constructor(e){super(),this.editor=e,this._expanded=void 0,this.onDidChangeEmitter=new _.Q5,this.onDidChange=this.onDidChangeEmitter.event,this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(104)&&void 0===this._expanded&&this.onDidChangeEmitter.fire()})))}get expanded(){return void 0===this._expanded||this._expanded}setExpanded(e){this._expanded=!0,this.onDidChangeEmitter.fire()}}let k=class e extends o.JT{constructor(e,t,i){super(),this.editor=e,this._codeEditorService=t,this._themeService=i,this.codeEditorDecorationTypeKey=null,this.modelRef=this._register(new o.XK),this.decorationIds=[],this.viewZoneId=null,this.viewMoreContentWidget=null,this._register(this.editor.onDidChangeConfiguration((e=>{(e.hasChanged(27)||e.hasChanged(103)||e.hasChanged(86)||e.hasChanged(80)||e.hasChanged(41)||e.hasChanged(40)||e.hasChanged(56))&&this.render()}))),this._register((0,o.OF)((()=>{this.setModel(void 0)})))}get model(){var e;return null===(e=this.modelRef.value)||void 0===e?void 0:e.object}shouldShowHoverAtViewZone(e){return this.viewZoneId===e}setModel(e){var t,i;e!==this.model&&(this.modelRef.value=e?(t=e,i=e.onDidChange((()=>this.render())),{object:t,dispose:()=>i.dispose()}):void 0,this.render())}getRenderData(){var e;if(!this.editor.hasModel()||!(null===(e=this.model)||void 0===e?void 0:e.ghostText))return;const{minReservedLineCount:t,expanded:i}=this.model;let{position:n,lines:o}=this.model.ghostText;const r=this.editor.getModel(),s=r.getLineMaxColumn(n.lineNumber),{tabSize:a}=r.getOptions();return o.length>1&&n.column!==s&&(console.warn("Can only show multiline ghost text at the end of a line"),o=[],n=new m.L(n.lineNumber,s)),{tabSize:a,position:n,lines:o,minReservedLineCount:t,expanded:i}}render(){var t;const i=this.getRenderData();if(this.codeEditorDecorationTypeKey&&(this._codeEditorService.removeDecorationType(this.codeEditorDecorationTypeKey),this.codeEditorDecorationTypeKey=null),i&&i.lines.length>0){const n=this._themeService.getColorTheme().getColor(b.N5);let o,r;n&&(o=String(n.rgba.a),r=y.Il.Format.CSS.format(function(e){const{r:t,b:i,g:n}=e.rgba;return new y.Il(new y.VS(t,n,i,255))}(n)));const s=this._themeService.getColorTheme().getColor(b.x3);let a;s&&(a=`2px dashed ${s}`),this.codeEditorDecorationTypeKey="0-ghost-text-"+ ++e.decorationTypeCount;const l=((null===(t=this.editor.getModel())||void 0===t?void 0:t.getLineContent(i.position.lineNumber))||"").substr(0,i.position.column-1),c=function(e,t,i,n){const o=t+e,r=w.io.visibleColumnsByColumns(o,i);let s="",a=t.length+1;for(const t of e){if("\t"===t){const e=r[a+1]-r[a];for(let t=0;t{if(this.viewZoneId&&(e.removeZone(this.viewZoneId),this.viewZoneId=null),i){const t=i.lines.slice(1),n=Math.max(t.length,i.minReservedLineCount);if(n>0)if(i.expanded){const o=document.createElement("div");this.renderLines(o,i.tabSize,t),this.viewZoneId=e.addZone({afterLineNumber:i.position.lineNumber,afterColumn:i.position.column,heightInLines:n,domNode:o})}else t.length>0&&(this.viewMoreContentWidget=this.renderViewMoreLines(i.position,i.lines[0],t.length))}}))}renderViewMoreLines(e,t,i){const n=this.editor.getOption(40),r=document.createElement("div");r.className="suggest-preview-additional-widget",f.V.applyFontInfoSlow(r,n);const s=document.createElement("span");s.className="content-spacer",s.append(t),r.append(s);const l=document.createElement("span");l.className="content-newline suggest-preview-text",l.append("⏎ "),r.append(l);const c=new o.SL,u=document.createElement("div");return u.className="button suggest-preview-text",u.append(`+${i} lines…`),c.add(a.mu(u,"mousedown",(e=>{var t;null===(t=this.model)||void 0===t||t.setExpanded(!0),e.preventDefault(),this.editor.focus()}))),r.append(u),new D(this.editor,e,r,c)}renderLines(e,t,i){const n=this.editor.getOptions(),o=n.get(27),r=n.get(103),s=n.get(80),a=n.get(41),l=n.get(40),c=n.get(56),m=(0,g.l$)(1e4);m.appendASCIIString('
    ');for(let e=0,n=i.length;e');const g=u.$i(n),f=u.Ut(n),_=p.A.createEmpty(n);(0,h.d1)(new h.IJ(l.isMonospace&&!o,l.canUseHalfwidthRightwardsArrow,n,!1,g,f,0,_,[],t,0,l.spaceWidth,l.middotWidth,l.wsmiddotWidth,r,"none",s,a!==d.n0.OFF,null),m),m.appendASCIIString("
    ")}m.appendASCIIString(""),f.V.applyFontInfoSlow(e,l);const _=m.build(),v=S?S.createHTML(_):_;e.innerHTML=v}};k.decorationTypeCount=0,k=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([C(1,c.$),C(2,v.XE)],k);class D extends o.JT{constructor(e,t,i,n){super(),this.editor=e,this.position=t,this.domNode=i,this.allowEditorOverflow=!1,this.suppressMouseDown=!1,this._register(n),this._register((0,o.OF)((()=>{this.editor.removeContentWidget(this)}))),this.editor.addContentWidget(this)}getId(){return"editor.widget.viewMoreLinesWidget"}getDomNode(){return this.domNode}getPosition(){return{position:this.position,preference:[0]}}}(0,v.Ic)(((e,t)=>{const i=e.getColor(b.N5);if(i){const e=String(i.rgba.a),n=y.Il.Format.CSS.format(function(e){const{r:t,b:i,g:n}=e.rgba;return new y.Il(new y.VS(t,n,i,255))}(i));t.addRule(`.monaco-editor .suggest-preview-text .mtk1 { opacity: ${e}; color: ${n}; }`)}const n=e.getColor(b.x3);n&&t.addRule(`.monaco-editor .suggest-preview-text .mtk1 { border: 2px dashed ${n}; }`)}));var L=i(5393),N=i(1050),E=i(7301),A=i(4101),M=i(9386);class I{constructor(){this._isDisposed=!1,(0,o.wi)(this)}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||(null===(t=this._value)||void 0===t||t.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,null===(e=this._value)||void 0===e||e.dispose(),this._value=void 0}replace(e){const t=this._value;return this._value=e,t}}var T=i(8728),R=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class O extends o.JT{constructor(e,t){super(),this.editor=e,this.commandService=t,this.onDidChangeEmitter=new _.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.completionSession=this._register(new I),this.active=!1,this._register(t.onDidExecuteCommand((t=>{new Set([r.n_.id,r.kz.id,T.CoreEditingCommands.Tab.id,T.CoreEditingCommands.DeleteLeft.id,T.CoreEditingCommands.DeleteRight.id]).has(t.commandId)&&e.hasTextFocus()&&this.handleUserInput()}))),this._register(this.editor.onDidType((e=>{this.handleUserInput()}))),this._register(this.editor.onDidChangeCursorPosition((e=>{this.session&&!this.session.isValid&&this.hide()})))}handleUserInput(){this.session&&!this.session.isValid&&this.hide(),setTimeout((()=>{this.startSessionIfTriggered()}),0)}get session(){return this.completionSession.value}get ghostText(){var e;return null===(e=this.session)||void 0===e?void 0:e.ghostText}get minReservedLineCount(){return this.session?this.session.minReservedLineCount:0}get expanded(){return!!this.session&&this.session.expanded}setExpanded(e){var t;null===(t=this.session)||void 0===t||t.setExpanded(e)}setActive(e){var t;this.active=e,e&&(null===(t=this.session)||void 0===t||t.scheduleAutomaticUpdate())}startSessionIfTriggered(){this.editor.getOption(52).enabled&&(this.session&&this.session.isValid||this.startSession())}startSession(){this.completionSession.value||(this.completionSession.value=new F(this.editor,this.editor.getPosition(),(()=>this.active),this.commandService),this.completionSession.value.takeOwnership(this.completionSession.value.onDidChange((()=>{this.onDidChangeEmitter.fire()}))))}hide(){this.completionSession.clear(),this.onDidChangeEmitter.fire()}commitCurrentSuggestion(){var e;null===(e=this.session)||void 0===e||e.commitCurrentCompletion()}showNext(){var e;null===(e=this.session)||void 0===e||e.showNextInlineCompletion()}showPrevious(){var e;null===(e=this.session)||void 0===e||e.showPreviousInlineCompletion()}}class F extends x{constructor(e,t,i,n){let o;super(e),this.triggerPosition=t,this.shouldUpdate=i,this.commandService=n,this.minReservedLineCount=0,this.updateOperation=this._register(new I),this.cache=this._register(new I),this.updateSoon=this._register(new L.pY((()=>this.update(A.bw.Automatic)),50)),this.textModel=this.editor.getModel(),this.currentlySelectedCompletionId=void 0,this._register(this.onDidChange((()=>{const e=this.currentCompletion;if(e&&e.sourceInlineCompletion!==o){o=e.sourceInlineCompletion;const t=e.sourceProvider;t.handleItemDidShow&&t.handleItemDidShow(e.sourceInlineCompletions,o)}}))),this._register(this.editor.onDidChangeModelContent((e=>{if(this.cache.value){let e=!1;for(const t of this.cache.value.completions){const i=this.textModel.getDecorationRange(t.decorationId);i?t.synchronizedRange.equalsRange(i)||(e=!0,t.synchronizedRange=i):(0,E.dL)(new Error("Decoration has no range"))}e&&this.onDidChangeEmitter.fire()}this.scheduleAutomaticUpdate()}))),this.scheduleAutomaticUpdate()}fixAndGetIndexOfCurrentSelection(){if(!this.currentlySelectedCompletionId||!this.cache.value)return 0;if(0===this.cache.value.completions.length)return 0;const e=this.cache.value.completions.findIndex((e=>e.semanticId===this.currentlySelectedCompletionId));return-1===e?(this.currentlySelectedCompletionId=void 0,0):e}get currentCachedCompletion(){if(this.cache.value)return this.cache.value.completions[this.fixAndGetIndexOfCurrentSelection()]}showNextInlineCompletion(){var e;return R(this,void 0,void 0,(function*(){yield this.ensureUpdateWithExplicitContext();const t=(null===(e=this.cache.value)||void 0===e?void 0:e.completions)||[];if(t.length>0){const e=(this.fixAndGetIndexOfCurrentSelection()+1)%t.length;this.currentlySelectedCompletionId=t[e].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()}))}showPreviousInlineCompletion(){var e;return R(this,void 0,void 0,(function*(){yield this.ensureUpdateWithExplicitContext();const t=(null===(e=this.cache.value)||void 0===e?void 0:e.completions)||[];if(t.length>0){const e=(this.fixAndGetIndexOfCurrentSelection()+t.length-1)%t.length;this.currentlySelectedCompletionId=t[e].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()}))}ensureUpdateWithExplicitContext(){var e;return R(this,void 0,void 0,(function*(){this.updateOperation.value?this.updateOperation.value.triggerKind===A.bw.Explicit?yield this.updateOperation.value.promise:yield this.update(A.bw.Explicit):(null===(e=this.cache.value)||void 0===e?void 0:e.triggerKind)!==A.bw.Explicit&&(yield this.update(A.bw.Explicit))}))}get ghostText(){const e=this.currentCompletion;return e?V(e,this.editor.getModel()):void 0}get currentCompletion(){const e=this.currentCachedCompletion;if(e)return{text:e.inlineCompletion.text,range:e.synchronizedRange,command:e.inlineCompletion.command,sourceProvider:e.inlineCompletion.sourceProvider,sourceInlineCompletions:e.inlineCompletion.sourceInlineCompletions,sourceInlineCompletion:e.inlineCompletion.sourceInlineCompletion}}get isValid(){return this.editor.getPosition().lineNumber===this.triggerPosition.lineNumber}scheduleAutomaticUpdate(){this.updateOperation.clear(),this.updateSoon.schedule()}update(e){return R(this,void 0,void 0,(function*(){if(!this.shouldUpdate())return;const t=this.editor.getPosition(),i=(0,L.PG)((i=>R(this,void 0,void 0,(function*(){let n;try{n=yield function(e,t,i,n=N.T.None){return R(this,void 0,void 0,(function*(){const o=function(e,t){const i=t.getWordAtPosition(e),n=t.getLineMaxColumn(e.lineNumber);return i?new l.e(e.lineNumber,i.startColumn,e.lineNumber,n):l.e.fromPositions(e,e.with(void 0,n))}(e,t),r=A.zu.all(t),s=yield Promise.all(r.map((o=>R(this,void 0,void 0,(function*(){const r=yield o.provideInlineCompletions(t,e,i,n);return{completions:r,provider:o,dispose:()=>{r&&o.freeInlineCompletions(r)}}}))))),a=new Map;for(const e of s){const t=e.completions;if(t)for(const i of t.items.map((i=>({text:i.text,range:i.range?l.e.lift(i.range):o,command:i.command,sourceProvider:e.provider,sourceInlineCompletions:t,sourceInlineCompletion:i}))))i.range.startLineNumber===i.range.endLineNumber&&a.set(JSON.stringify({text:i.text,range:i.range}),i)}return{items:[...a.values()],dispose:()=>{for(const e of s)e.dispose()}}}))}(t,this.editor.getModel(),{triggerKind:e},i)}catch(e){return void(0,E.dL)(e)}i.isCancellationRequested||(this.cache.value=new B(this.editor,n,(()=>this.onDidChangeEmitter.fire()),e),this.onDidChangeEmitter.fire())})))),n=new P(i,e);this.updateOperation.value=n,yield i,this.updateOperation.value===n&&this.updateOperation.clear()}))}takeOwnership(e){this._register(e)}commitCurrentCompletion(){const e=this.currentCompletion;e&&this.commit(e)}commit(e){const t=this.cache.replace(void 0);this.editor.executeEdits("inlineSuggestion.accept",[M.h.replaceMove(e.range,e.text)]),e.command?this.commandService.executeCommand(e.command.id,...e.command.arguments||[]).finally((()=>{null==t||t.dispose()})).then(void 0,E.Cp):null==t||t.dispose(),this.onDidChangeEmitter.fire()}}class P{constructor(e,t){this.promise=e,this.triggerKind=t}dispose(){this.promise.cancel()}}class B extends o.JT{constructor(e,t,i,n){super(),this.triggerKind=n;const r=e.deltaDecorations([],t.items.map((e=>({range:e.range,options:{description:"inline-completion-tracking-range"}}))));this._register((0,o.OF)((()=>{e.deltaDecorations(r,[])}))),this.completions=t.items.map(((e,t)=>new z(e,r[t]))),this._register(e.onDidChangeModelContent((()=>{let t=!1;const n=e.getModel();for(const e of this.completions){const i=n.getDecorationRange(e.decorationId);i?e.synchronizedRange.equalsRange(i)||(t=!0,e.synchronizedRange=i):(0,E.dL)(new Error("Decoration has no range"))}t&&i()}))),this._register(t)}}class z{constructor(e,t){this.inlineCompletion=e,this.decorationId=t,this.semanticId=JSON.stringify({text:this.inlineCompletion.text,startLine:this.inlineCompletion.range.startLineNumber,startColumn:this.inlineCompletion.range.startColumn,command:this.inlineCompletion.command}),this.synchronizedRange=e.range}}function W(e){return e.replace(/^\s+/,"")}function V(e,t){const i=t.getValueInRange(e.range);let n;const o=t.getLineFirstNonWhitespaceColumn(e.range.startLineNumber);if(e.text.startsWith(i))n=e.text.substr(i.length);else{if(!(0===o||e.range.startColumn1&&t.getLineMaxColumn(r.lineNumber)!==r.column))return{lines:s,position:r}}var H=i(3472),$=i(7548),U=i(8250);class j extends x{constructor(e){super(e),this.isSuggestWidgetVisible=!1,this.currentGhostText=void 0,this._isActive=!1,this.minReservedLineCount=0,this.setInactiveDelayed=this._register(new L.pY((()=>{this.isSuggestWidgetVisible||this.isActive&&(this._isActive=!1,this.onDidChangeEmitter.fire())}),100));const t=U.SuggestController.get(this.editor);if(t){let e=!1;const i=()=>{e||(e=!0,this._register(t.widget.value.onDidShow((()=>{this.isSuggestWidgetVisible=!0,this._isActive=!0,this.updateFromSuggestion()}))),this._register(t.widget.value.onDidHide((()=>{this.isSuggestWidgetVisible=!1,this.setInactiveDelayed.schedule(),this.minReservedLineCount=0,this.updateFromSuggestion()}))),this._register(t.widget.value.onDidFocus((()=>{this.isSuggestWidgetVisible=!0,this._isActive=!0,this.updateFromSuggestion()}))))};this._register(_.ju.once(t.model.onDidTrigger)((e=>{i()})))}this.updateFromSuggestion(),this._register((0,o.OF)((()=>{const e=U.SuggestController.get(this.editor);e&&e.stopForceRenderingAbove()})))}get isActive(){return this._isActive}setExpanded(e){super.setExpanded(e),this.updateFromSuggestion()}isSuggestionPreviewEnabled(){return this.editor.getOption(104).preview}updateFromSuggestion(){const e=U.SuggestController.get(this.editor);if(!e)return void this.setCurrentInlineCompletion(void 0);if(!this.isSuggestWidgetVisible)return void this.setCurrentInlineCompletion(void 0);const t=e.widget.value.getFocusedItem();t?this.setCurrentInlineCompletion(function(e,t,i){const n=i.item;if(Array.isArray(n.completion.additionalTextEdits))return{text:"",range:l.e.fromPositions(t,t)};let{insertText:o}=n.completion;if(4&n.completion.insertTextRules){const i=(new H.Yj).parse(o),n=e.editor.getModel();$.l.adjustWhitespace(n,t,i,!0,!0),o=i.toString()}const r=e.getOverwriteInfo(n,!1);return{text:o,range:l.e.fromPositions(t.delta(0,-r.overwriteBefore),t.delta(0,Math.max(r.overwriteAfter,0)))}}(e,this.editor.getPosition(),t)):this.setCurrentInlineCompletion(void 0)}setCurrentInlineCompletion(e){this.currentGhostText=e?V(e,this.editor.getModel())||{lines:[],position:e.range.getEndPosition()}:void 0,this.currentGhostText&&this.expanded&&(this.minReservedLineCount=Math.max(this.minReservedLineCount,this.currentGhostText.lines.length-1));const t=U.SuggestController.get(this.editor);t&&(this.minReservedLineCount>=1&&this.isSuggestionPreviewEnabled()?t.forceRenderingAbove():t.stopForceRenderingAbove()),this.onDidChangeEmitter.fire()}get ghostText(){return this.isSuggestionPreviewEnabled()?this.currentGhostText:void 0}}var q=i(3580),K=i(4565),G=i(8819),Y=i(2065),Z=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},X=function(e,t){return function(i,n){t(i,n,e)}},Q=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};let J=class e extends o.JT{constructor(e,t,i){super(),this.editor=e,this.instantiationService=t,this.activeController=this._register(new o.XK),this.triggeredExplicitly=!1,this.contextKeys=new ee(i),this.widget=this._register(t.createInstance(k,this.editor)),this._register(this.editor.onDidChangeModel((()=>{this.updateModelController()}))),this._register(this.editor.onDidChangeConfiguration((e=>{e.hasChanged(104)&&this.updateModelController()}))),this.updateModelController()}static get(t){return t.getContribution(e.ID)}updateModelController(){const e=this.editor.getOption(104),t=this.editor.getOption(52);this.activeController.value=void 0,this.activeController.value=this.editor.hasModel()&&(e.preview||t.enabled||this.triggeredExplicitly)?this.instantiationService.createInstance(te,this.editor,this.widget,this.contextKeys):void 0}shouldShowHoverAt(e){var t;return(null===(t=this.activeController.value)||void 0===t?void 0:t.shouldShowHoverAt(e))||!1}shouldShowHoverAtViewZone(e){return this.widget.shouldShowHoverAtViewZone(e)}trigger(){var e;this.triggeredExplicitly=!0,this.activeController.value||this.updateModelController(),null===(e=this.activeController.value)||void 0===e||e.triggerInlineCompletion()}commit(){var e;null===(e=this.activeController.value)||void 0===e||e.commitInlineCompletion()}hide(){var e;null===(e=this.activeController.value)||void 0===e||e.hideInlineCompletion()}showNextInlineCompletion(){var e;null===(e=this.activeController.value)||void 0===e||e.showNextInlineCompletion()}showPreviousInlineCompletion(){var e;null===(e=this.activeController.value)||void 0===e||e.showPreviousInlineCompletion()}};J.inlineSuggestionVisible=new G.uy("inlineSuggestionVisible ",!1,q.N("inlineSuggestionVisible","Whether an inline suggestion is visible")),J.inlineSuggestionHasIndentation=new G.uy("inlineSuggestionHasIndentation",!1,q.N("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace")),J.ID="editor.contrib.ghostTextController",J=Z([X(1,Y.TG),X(2,G.i6)],J);class ee{constructor(e){this.contextKeyService=e,this.lastInlineCompletionVisibleValue=!1,this.inlineCompletionVisible=J.inlineSuggestionVisible.bindTo(this.contextKeyService),this.lastInlineCompletionSuggestsIndentationValue=!1,this.inlineCompletionSuggestsIndentation=J.inlineSuggestionHasIndentation.bindTo(this.contextKeyService)}setInlineCompletionVisible(e){e!==this.lastInlineCompletionVisibleValue&&(this.inlineCompletionVisible.set(e),this.lastInlineCompletionVisibleValue=e)}setInlineCompletionSuggestsIndentation(e){e!==this.lastInlineCompletionSuggestsIndentationValue&&(this.inlineCompletionSuggestsIndentation.set(e),this.lastInlineCompletionSuggestsIndentationValue=e)}}let te=class extends o.JT{constructor(e,t,i,n){super(),this.editor=e,this.widget=t,this.contextKeys=i,this.commandService=n,this.suggestWidgetAdapterModel=this._register(new j(this.editor)),this.inlineCompletionsModel=this._register(new O(this.editor,this.commandService)),this._register(this.suggestWidgetAdapterModel.onDidChange((()=>{this.updateModel(),this.updateContextKeys()}))),this.updateModel(),this._register((0,o.OF)((()=>{t.model!==this.suggestWidgetAdapterModel&&t.model!==this.inlineCompletionsModel||t.setModel(void 0),this.contextKeys.setInlineCompletionVisible(!1),this.contextKeys.setInlineCompletionSuggestsIndentation(!1)}))),this.inlineCompletionsModel&&this._register(this.inlineCompletionsModel.onDidChange((()=>{this.updateContextKeys()})))}get activeInlineCompletionsModel(){if(this.widget.model===this.inlineCompletionsModel)return this.inlineCompletionsModel}updateContextKeys(){var e,t;if(this.contextKeys.setInlineCompletionVisible(void 0!==(null===(e=this.activeInlineCompletionsModel)||void 0===e?void 0:e.ghostText)),null===(t=this.inlineCompletionsModel)||void 0===t?void 0:t.ghostText){const e=this.inlineCompletionsModel.ghostText.lines[0]||"",t=e.startsWith(" ")||e.startsWith("\t"),i=this.inlineCompletionsModel.ghostText.position,n=this.editor.getModel().getLineIndentColumn(i.lineNumber),o=i.column<=n;this.contextKeys.setInlineCompletionSuggestsIndentation(this.widget.model===this.inlineCompletionsModel&&t&&o)}else this.contextKeys.setInlineCompletionSuggestsIndentation(!1)}shouldShowHoverAt(e){var t;const i=null===(t=this.activeInlineCompletionsModel)||void 0===t?void 0:t.ghostText;return!!i&&e.containsPosition(i.position)}triggerInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.startSession()}commitInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.commitCurrentSuggestion()}hideInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.hide()}showNextInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.showNext()}showPreviousInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.showPrevious()}updateModel(){var e;this.widget.setModel(this.suggestWidgetAdapterModel.isActive?this.suggestWidgetAdapterModel:this.inlineCompletionsModel),null===(e=this.inlineCompletionsModel)||void 0===e||e.setActive(this.widget.model===this.inlineCompletionsModel)}};te=Z([X(3,K.H)],te);const ie=r._l.bindToContribution(J.get),ne=new ie({id:"editor.action.inlineSuggest.commit",precondition:G.Ao.and(J.inlineSuggestionVisible,J.inlineSuggestionHasIndentation.toNegated(),s.u.tabMovesFocus.toNegated()),kbOpts:{weight:100,primary:2},handler(e){e.commit(),e.editor.focus()}});(0,r.fK)(ne),(0,r.fK)(new ie({id:"editor.action.inlineSuggest.hide",precondition:J.inlineSuggestionVisible,kbOpts:{weight:100,primary:9},handler(e){e.hide()}}));class oe extends r.R6{constructor(){super({id:oe.ID,label:q.N("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:G.Ao.and(s.u.writable,J.inlineSuggestionVisible),kbOpts:{weight:100,primary:601}})}run(e,t){return Q(this,void 0,void 0,(function*(){const e=J.get(t);e&&(e.showNextInlineCompletion(),t.focus())}))}}oe.ID="editor.action.inlineSuggest.showNext";class re extends r.R6{constructor(){super({id:re.ID,label:q.N("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:G.Ao.and(s.u.writable,J.inlineSuggestionVisible),kbOpts:{weight:100,primary:599}})}run(e,t){return Q(this,void 0,void 0,(function*(){const e=J.get(t);e&&(e.showPreviousInlineCompletion(),t.focus())}))}}re.ID="editor.action.inlineSuggest.showPrevious";class se extends r.R6{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:q.N("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:s.u.writable})}run(e,t){return Q(this,void 0,void 0,(function*(){const e=J.get(t);e&&e.trigger()}))}}(0,r._K)(J.ID,J),(0,r.Qr)(se),(0,r.Qr)(oe),(0,r.Qr)(re)},2408:(e,t,i)=>{"use strict";i.r(t),i.d(t,{AbstractCaseAction:()=>H,AbstractDeleteAllToBoundaryAction:()=>P,AbstractSortLinesAction:()=>N,DeleteAllLeftAction:()=>B,DeleteAllRightAction:()=>z,DeleteLinesAction:()=>I,DuplicateSelectionAction:()=>D,IndentLinesAction:()=>T,InsertLineAfterAction:()=>F,InsertLineBeforeAction:()=>O,JoinLinesAction:()=>W,LowerCaseAction:()=>U,SnakeCaseAction:()=>K,SortLinesAscendingAction:()=>E,SortLinesDescendingAction:()=>A,TitleCaseAction:()=>j,TransposeAction:()=>V,TrimTrailingWhitespaceAction:()=>M,UpperCaseAction:()=>$});var n=i(3580),o=i(2258),r=i(8728),s=i(6830),a=i(1329),l=i(7295),c=i(9386),u=i(4314);class h{constructor(e,t){this._selection=e,this._cursors=t,this._selectionId=null}getEditOperations(e,t){let i=function(e,t){t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber));for(let e=t.length-2;e>=0;e--)t[e].lineNumber===t[e+1].lineNumber&&t.splice(e,1);let i=[],n=0,o=0,r=t.length;for(let s=1,a=e.getLineCount();s<=a;s++){let a=e.getLineContent(s),h=a.length+1,d=0;if(oe.getLineTokens(t),getLanguageIdentifier:()=>e.getLanguageIdentifier(),getLanguageIdAtPosition:(t,i)=>e.getLanguageIdAtPosition(t,i),getLineContent:null};if(n.startLineNumber===n.endLineNumber&&1===e.getLineMaxColumn(n.startLineNumber)){let i=n.startLineNumber,o=this._isMovingDown?i+1:i-1;1===e.getLineMaxColumn(o)?t.addEditOperation(new u.e(1,1,1,1),null):(t.addEditOperation(new u.e(i,1,i,1),e.getLineContent(o)),t.addEditOperation(new u.e(o,1,o,e.getLineMaxColumn(o)),null)),n=new f.Y(o,1,o,1)}else{let i,r;if(this._isMovingDown){i=n.endLineNumber+1,r=e.getLineContent(i),t.addEditOperation(new u.e(i-1,e.getLineMaxColumn(i-1),i,e.getLineMaxColumn(i)),null);let h=r;if(this.shouldAutoIndent(e,n)){let d=this.matchEnterRule(e,a,o,i,n.startLineNumber-1);if(null!==d){let t=l.V8(e.getLineContent(i)),n=d+y.Y(t,o),a=y.J(n,o,s);h=a+this.trimLeft(r)}else{c.getLineContent=t=>t===n.startLineNumber?e.getLineContent(i):e.getLineContent(t);let t=b.zu.getGoodIndentForLine(this._autoIndent,c,e.getLanguageIdAtPosition(i,1),n.startLineNumber,a);if(null!==t){let n=l.V8(e.getLineContent(i)),a=y.Y(t,o);if(a!==y.Y(n,o)){let e=y.J(a,o,s);h=e+this.trimLeft(r)}}}t.addEditOperation(new u.e(n.startLineNumber,1,n.startLineNumber,1),h+"\n");let g=this.matchEnterRuleMovingDown(e,a,o,n.startLineNumber,i,h);if(null!==g)0!==g&&this.getIndentEditsOfMovingBlock(e,t,n,o,s,g);else{c.getLineContent=t=>t===n.startLineNumber?h:t>=n.startLineNumber+1&&t<=n.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t);let r=b.zu.getGoodIndentForLine(this._autoIndent,c,e.getLanguageIdAtPosition(i,1),n.startLineNumber+1,a);if(null!==r){const i=l.V8(e.getLineContent(n.startLineNumber)),a=y.Y(r,o),c=y.Y(i,o);if(a!==c){const i=a-c;this.getIndentEditsOfMovingBlock(e,t,n,o,s,i)}}}}else t.addEditOperation(new u.e(n.startLineNumber,1,n.startLineNumber,1),h+"\n")}else if(i=n.startLineNumber-1,r=e.getLineContent(i),t.addEditOperation(new u.e(i,1,i+1,1),null),t.addEditOperation(new u.e(n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),"\n"+r),this.shouldAutoIndent(e,n)){c.getLineContent=t=>t===i?e.getLineContent(n.startLineNumber):e.getLineContent(t);let r=this.matchEnterRule(e,a,o,n.startLineNumber,n.startLineNumber-2);if(null!==r)0!==r&&this.getIndentEditsOfMovingBlock(e,t,n,o,s,r);else{let r=b.zu.getGoodIndentForLine(this._autoIndent,c,e.getLanguageIdAtPosition(n.startLineNumber,1),i,a);if(null!==r){let i=l.V8(e.getLineContent(n.startLineNumber)),a=y.Y(r,o),c=y.Y(i,o);if(a!==c){let i=a-c;this.getIndentEditsOfMovingBlock(e,t,n,o,s,i)}}}}}this._selectionId=t.trackSelection(n)}buildIndentConverter(e,t,i){return{shiftIndent:n=>_.U.shiftIndent(n,n.length+1,e,t,i),unshiftIndent:n=>_.U.unshiftIndent(n,n.length+1,e,t,i)}}parseEnterResult(e,t,i,n,o){if(o){let r=o.indentation;o.indentAction===v.wU.None||o.indentAction===v.wU.Indent?r=o.indentation+o.appendText:o.indentAction===v.wU.IndentOutdent?r=o.indentation:o.indentAction===v.wU.Outdent&&(r=t.unshiftIndent(o.indentation)+o.appendText);let s=e.getLineContent(n);if(this.trimLeft(s).indexOf(this.trimLeft(r))>=0){let o=l.V8(e.getLineContent(n)),s=l.V8(r),a=b.zu.getIndentMetadata(e,n);return null!==a&&2&a&&(s=t.unshiftIndent(s)),y.Y(s,i)-y.Y(o,i)}}return null}matchEnterRuleMovingDown(e,t,i,n,o,r){if(l.ow(r)>=0){let r=e.getLineMaxColumn(o),s=b.zu.getEnterAction(this._autoIndent,e,new u.e(o,r,o,r));return this.parseEnterResult(e,t,i,n,s)}{let o=n-1;for(;o>=1;){let t=e.getLineContent(o);if(l.ow(t)>=0)break;o--}if(o<1||n>e.getLineCount())return null;let r=e.getLineMaxColumn(o),s=b.zu.getEnterAction(this._autoIndent,e,new u.e(o,r,o,r));return this.parseEnterResult(e,t,i,n,s)}}matchEnterRule(e,t,i,n,o,r){let s=o;for(;s>=1;){let t;if(t=s===o&&void 0!==r?r:e.getLineContent(s),l.ow(t)>=0)break;s--}if(s<1||n>e.getLineCount())return null;let a=e.getLineMaxColumn(s),c=b.zu.getEnterAction(this._autoIndent,e,new u.e(s,a,s,a));return this.parseEnterResult(e,t,i,n,c)}trimLeft(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4)return!1;if(!e.isCheapToTokenize(t.startLineNumber))return!1;let i=e.getLanguageIdAtPosition(t.startLineNumber,1);return i===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==b.zu.getIndentRulesSupport(i)}getIndentEditsOfMovingBlock(e,t,i,n,o,r){for(let s=i.startLineNumber;s<=i.endLineNumber;s++){let a=e.getLineContent(s),c=l.V8(a),h=y.Y(c,n)+r,d=y.J(h,n,o);d!==c&&(t.addEditOperation(new u.e(s,1,s,c.length+1),d),s===i.endLineNumber&&i.endColumn<=c.length+1&&""===d&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&i.startLineNumber=o)return null;let r=[];for(let t=n;t<=o;t++)r.push(e.getLineContent(t));let s=r.slice(0);return s.sort(C.getCollator().compare),!0===i&&(s=s.reverse()),{startLineNumber:n,endLineNumber:o,before:r,after:s}}C._COLLATOR=null;var x=i(4144);class k extends s.R6{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;const i=t.getSelections().map(((e,t)=>({selection:e,index:t,ignore:!1})));i.sort(((e,t)=>u.e.compareRangesUsingStarts(e.selection,t.selection)));let n=i[0];for(let e=1;enew g.L(e.positionLineNumber,e.positionColumn))));let o=t.getSelection();if(null===o)return;let r=new h(o,n);t.pushUndoStop(),t.executeCommands(this.id,[r]),t.pushUndoStop()}}M.ID="editor.action.trimTrailingWhitespace";class I extends s.R6{constructor(){super({id:"editor.action.deleteLines",label:n.N("lines.delete","Delete Line"),alias:"Delete Line",precondition:p.u.writable,kbOpts:{kbExpr:p.u.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;let i=this._getLinesToRemove(t),n=t.getModel();if(1===n.getLineCount()&&1===n.getLineMaxColumn(1))return;let o=0,r=[],s=[];for(let e=0,t=i.length;e1&&(a-=1,u=n.getLineMaxColumn(a)),r.push(c.h.replace(new f.Y(a,u,l,h),"")),s.push(new f.Y(a-o,t.positionColumn,a-o,t.positionColumn)),o+=t.endLineNumber-t.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,r,s),t.pushUndoStop()}_getLinesToRemove(e){let t=e.getSelections().map((e=>{let t=e.endLineNumber;return e.startLineNumbere.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber));let i=[],n=t[0];for(let e=1;e=t[e].startLineNumber?n.endLineNumber=t[e].endLineNumber:(i.push(n),n=t[e]);return i.push(n),i}}class T extends s.R6{constructor(){super({id:"editor.action.indentLines",label:n.N("lines.indent","Indent Line"),alias:"Indent Line",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:2137,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,d.u.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class R extends s.R6{constructor(){super({id:"editor.action.outdentLines",label:n.N("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:2135,weight:100}})}run(e,t){r.CoreEditingCommands.Outdent.runEditorCommand(e,t,null)}}class O extends s.R6{constructor(){super({id:"editor.action.insertLineBefore",label:n.N("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:3075,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,d.u.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}class F extends s.R6{constructor(){super({id:"editor.action.insertLineAfter",label:n.N("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:2051,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,d.u.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}class P extends s.R6{run(e,t){if(!t.hasModel())return;const i=t.getSelection();let n=this._getRangesToDelete(t),o=[];for(let e=0,t=n.length-1;ec.h.replace(e,"")));t.pushUndoStop(),t.executeEdits(this.id,s,r),t.pushUndoStop()}}class B extends P{constructor(){super({id:"deleteAllLeft",label:n.N("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:p.u.writable,kbOpts:{kbExpr:p.u.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let i=null,n=[],o=0;return t.forEach((t=>{let r;if(1===t.endColumn&&o>0){let e=t.startLineNumber-o;r=new f.Y(e,t.startColumn,e,t.startColumn)}else r=new f.Y(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);o+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?i=r:n.push(r)})),i&&n.unshift(i),n}_getRangesToDelete(e){let t=e.getSelections();if(null===t)return[];let i=t,n=e.getModel();return null===n?[]:(i.sort(u.e.compareRangesUsingStarts),i=i.map((e=>{if(e.isEmpty()){if(1===e.startColumn){let t=Math.max(1,e.startLineNumber-1),i=1===e.startLineNumber?1:n.getLineContent(t).length+1;return new u.e(t,i,e.startLineNumber,1)}return new u.e(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return new u.e(e.startLineNumber,1,e.endLineNumber,e.endColumn)})),i)}}class z extends P{constructor(){super({id:"deleteAllRight",label:n.N("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:p.u.writable,kbOpts:{kbExpr:p.u.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let i=null,n=[];for(let o=0,r=t.length,s=0;o{if(e.isEmpty()){const i=t.getLineMaxColumn(e.startLineNumber);return e.startColumn===i?new u.e(e.startLineNumber,e.startColumn,e.startLineNumber+1,1):new u.e(e.startLineNumber,e.startColumn,e.startLineNumber,i)}return e}));return n.sort(u.e.compareRangesUsingStarts),n}}class W extends s.R6{constructor(){super({id:"editor.action.joinLines",label:n.N("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){let i=t.getSelections();if(null===i)return;let n=t.getSelection();if(null===n)return;i.sort(u.e.compareRangesUsingStarts);let o=[],r=i.reduce(((e,t)=>e.isEmpty()?e.endLineNumber===t.startLineNumber?(n.equalsSelection(e)&&(n=t),t):t.startLineNumber>e.endLineNumber+1?(o.push(e),t):new f.Y(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(o.push(e),t):new f.Y(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn)));o.push(r);let s=t.getModel();if(null===s)return;let a=[],l=[],h=n,d=0;for(let e=0,t=o.length;e=1){let e=!0;""===v&&(e=!1),!e||" "!==v.charAt(v.length-1)&&"\t"!==v.charAt(v.length-1)||(e=!1,v=v.replace(/[\s\uFEFF\xA0]+$/g," "));let n=t.substr(i-1);v+=(e?" ":"")+n,m=e?n.length+1:n.length}else m=0}let b=new u.e(g,p,t,i);if(!b.isEmpty()){let e;r.isEmpty()?(a.push(c.h.replace(b,v)),e=new f.Y(b.startLineNumber-d,v.length-m+1,g-d,v.length-m+1)):r.startLineNumber===r.endLineNumber?(a.push(c.h.replace(b,v)),e=new f.Y(r.startLineNumber-d,r.startColumn,r.endLineNumber-d,r.endColumn)):(a.push(c.h.replace(b,v)),e=new f.Y(r.startLineNumber-d,r.startColumn,r.startLineNumber-d,v.length-_)),null!==u.e.intersectRanges(b,n)?h=e:l.push(e)}d+=b.endLineNumber-b.startLineNumber}l.unshift(h),t.pushUndoStop(),t.executeEdits(this.id,a,l),t.pushUndoStop()}}class V extends s.R6{constructor(){super({id:"editor.action.transpose",label:n.N("editor.transpose","Transpose characters around the cursor"),alias:"Transpose characters around the cursor",precondition:p.u.writable})}run(e,t){let i=t.getSelections();if(null===i)return;let n=t.getModel();if(null===n)return;let o=[];for(let e=0,t=i.length;e=s){if(r.lineNumber===n.getLineCount())continue;let e=new u.e(r.lineNumber,Math.max(1,r.column-1),r.lineNumber+1,1),t=n.getValueInRange(e).split("").reverse().join("");o.push(new a.T4(new f.Y(r.lineNumber,Math.max(1,r.column-1),r.lineNumber+1,1),t))}else{let e=new u.e(r.lineNumber,Math.max(1,r.column-1),r.lineNumber,r.column+1),t=n.getValueInRange(e).split("").reverse().join("");o.push(new a.hP(e,t,new f.Y(r.lineNumber,r.column+1,r.lineNumber,r.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,o),t.pushUndoStop()}}class H extends s.R6{run(e,t){const i=t.getSelections();if(null===i)return;const n=t.getModel();if(null===n)return;const o=t.getOption(114),r=[];for(const e of i)if(e.isEmpty()){const i=e.getStartPosition(),s=t.getConfiguredWordAtPosition(i);if(!s)continue;const a=new u.e(i.lineNumber,s.startColumn,i.lineNumber,s.endColumn),l=n.getValueInRange(a);r.push(c.h.replace(a,this._modifyText(l,o)))}else{const t=n.getValueInRange(e);r.push(c.h.replace(e,this._modifyText(t,o)))}t.pushUndoStop(),t.executeEdits(this.id,r),t.pushUndoStop()}}class $ extends H{constructor(){super({id:"editor.action.transformToUppercase",label:n.N("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:p.u.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}}class U extends H{constructor(){super({id:"editor.action.transformToLowercase",label:n.N("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:p.u.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}}class j extends H{constructor(){super({id:"editor.action.transformToTitlecase",label:n.N("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:p.u.writable})}_modifyText(e,t){const i=("\r\n\t "+t).split("");let n="",o=!0;for(let t=0;t=0?(o=!0,n+=r):o?(o=!1,n+=r.toLocaleUpperCase()):n+=r.toLocaleLowerCase()}return n}}class q{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch(e){}}return this._actual}isSupported(){return null!==this.get()}}class K extends H{constructor(){super({id:"editor.action.transformToSnakecase",label:n.N("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:p.u.writable})}_modifyText(e,t){const i=K.regExp1.get(),n=K.regExp2.get();return i&&n?e.replace(i,"$1_$2").replace(n,"$1_$2$3").toLocaleLowerCase():e}}K.regExp1=new q("(\\p{Ll})(\\p{Lu})","gmu"),K.regExp2=new q("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu"),(0,s.Qr)(class extends k{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:n.N("lines.copyUp","Copy Line Up"),alias:"Copy Line Up",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:x.eH.MenubarSelectionMenu,group:"2_line",title:n.N({key:"miCopyLinesUp",comment:["&& denotes a mnemonic"]},"&&Copy Line Up"),order:1}})}}),(0,s.Qr)(class extends k{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:n.N("lines.copyDown","Copy Line Down"),alias:"Copy Line Down",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:x.eH.MenubarSelectionMenu,group:"2_line",title:n.N({key:"miCopyLinesDown",comment:["&& denotes a mnemonic"]},"Co&&py Line Down"),order:2}})}}),(0,s.Qr)(D),(0,s.Qr)(class extends L{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:n.N("lines.moveUp","Move Line Up"),alias:"Move Line Up",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:x.eH.MenubarSelectionMenu,group:"2_line",title:n.N({key:"miMoveLinesUp",comment:["&& denotes a mnemonic"]},"Mo&&ve Line Up"),order:3}})}}),(0,s.Qr)(class extends L{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:n.N("lines.moveDown","Move Line Down"),alias:"Move Line Down",precondition:p.u.writable,kbOpts:{kbExpr:p.u.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:x.eH.MenubarSelectionMenu,group:"2_line",title:n.N({key:"miMoveLinesDown",comment:["&& denotes a mnemonic"]},"Move &&Line Down"),order:4}})}}),(0,s.Qr)(E),(0,s.Qr)(A),(0,s.Qr)(M),(0,s.Qr)(I),(0,s.Qr)(T),(0,s.Qr)(R),(0,s.Qr)(O),(0,s.Qr)(F),(0,s.Qr)(B),(0,s.Qr)(z),(0,s.Qr)(W),(0,s.Qr)(V),(0,s.Qr)($),(0,s.Qr)(U),(0,s.Qr)(j),K.regExp1.isSupported()&&K.regExp2.isSupported()&&(0,s.Qr)(K)},674:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE:()=>x,LinkedEditingContribution:()=>D,LinkedEditingAction:()=>E,editorLinkedEditingBackground:()=>I});var n=i(3580),o=i(6830),r=i(9488),s=i(5976),a=i(187),l=i(1050),c=i(4314),u=i(4101),h=i(5393),d=i(3411),g=i(8819),f=i(9102),p=i(666),m=i(1640),_=i(7301),v=i(7295),b=i(3910),y=i(7781),w=i(1264),C=i(3831),S=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const x=new g.uy("LinkedEditingInputVisible",!1),k="linked-editing-decoration";let D=class e extends s.JT{constructor(e,t){super(),this._debounceDuration=200,this._localToDispose=this._register(new s.SL),this._editor=e,this._enabled=!1,this._visibleContextKey=x.bindTo(t),this._currentDecorations=[],this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new s.SL),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel((()=>this.reinitialize()))),this._register(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(59)||e.hasChanged(79))&&this.reinitialize()}))),this._register(u.id.onDidChange((()=>this.reinitialize()))),this._register(this._editor.onDidChangeModelLanguage((()=>this.reinitialize()))),this.reinitialize()}static get(t){return t.getContribution(e.ID)}reinitialize(){const e=this._editor.getModel(),t=null!==e&&(this._editor.getOption(59)||this._editor.getOption(79))&&u.id.has(e);if(t===this._enabled)return;if(this._enabled=t,this.clearRanges(),this._localToDispose.clear(),!t||null===e)return;this._languageWordPattern=C.zu.getWordDefinition(e.getLanguageIdentifier().id),this._localToDispose.add(e.onDidChangeLanguageConfiguration((()=>{this._languageWordPattern=C.zu.getWordDefinition(e.getLanguageIdentifier().id)})));const i=new h.vp(this._debounceDuration),n=()=>{this._rangeUpdateTriggerPromise=i.trigger((()=>this.updateRanges()),this._debounceDuration)},o=new h.vp(0),r=e=>{this._rangeSyncTriggerPromise=o.trigger((()=>this._syncRanges(e)))};this._localToDispose.add(this._editor.onDidChangeCursorPosition((()=>{n()}))),this._localToDispose.add(this._editor.onDidChangeModelContent((t=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const i=e.getDecorationRange(this._currentDecorations[0]);if(i&&t.changes.every((e=>i.intersectRanges(e.range))))return void r(this._currentDecorations)}n()}))),this._localToDispose.add({dispose:()=>{i.cancel(),o.cancel()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._currentDecorations||0===e.length)return;const t=this._editor.getModel(),i=t.getDecorationRange(e[0]);if(!i||i.startLineNumber!==i.endLineNumber)return this.clearRanges();const n=t.getValueInRange(i);if(this._currentWordPattern){const e=n.match(this._currentWordPattern);if((e?e[0].length:0)!==n.length)return this.clearRanges()}let o=[];for(let i=1,r=e.length;i1)return void this.clearRanges();const n=this._editor.getModel(),o=n.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===o){if(i.equals(this._currentRequestPosition))return;if(this._currentDecorations&&this._currentDecorations.length>0){const e=n.getDecorationRange(this._currentDecorations[0]);if(e&&e.containsPosition(i))return}}this._currentRequestPosition=i,this._currentRequestModelVersion=o;const r=(0,h.PG)((t=>S(this,void 0,void 0,(function*(){try{const s=yield M(n,i,t);if(r!==this._currentRequest)return;if(this._currentRequest=null,o!==n.getVersionId())return;let a=[];(null==s?void 0:s.ranges)&&(a=s.ranges),this._currentWordPattern=(null==s?void 0:s.wordPattern)||this._languageWordPattern;let l=!1;for(let e=0,t=a.length;e({range:t,options:e.DECORATION})));this._visibleContextKey.set(!0),this._currentDecorations=this._editor.deltaDecorations(this._currentDecorations,u)}catch(e){(0,_.VV)(e)||(0,_.dL)(e),this._currentRequest!==r&&this._currentRequest||this.clearRanges()}}))));return this._currentRequest=r,r}))}};var L,N;D.ID="editor.contrib.linkedEditing",D.DECORATION=d.qx.register({description:"linked-editing",stickiness:0,className:k}),D=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(L=1,N=g.i6,function(e,t){N(e,t,L)})],D);class E extends o.R6{constructor(){super({id:"editor.action.linkedEditing",label:n.N("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:g.Ao.and(f.u.writable,f.u.hasRenameProvider),kbOpts:{kbExpr:f.u.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){const i=e.get(m.$),[n,o]=Array.isArray(t)&&t||[void 0,void 0];return p.o.isUri(n)&&a.L.isIPosition(o)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(o),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),_.dL):super.runCommand(e,t)}run(e,t){const i=D.get(t);return i?Promise.resolve(i.updateRanges(!0)):Promise.resolve()}}const A=o._l.bindToContribution(D.get);function M(e,t,i){const n=u.id.ordered(e);return(0,h.Ps)(n.map((n=>()=>S(this,void 0,void 0,(function*(){try{return yield n.provideLinkedEditingRanges(e,t,i)}catch(e){return void(0,_.Cp)(e)}})))),(e=>!!e&&r.Of(null==e?void 0:e.ranges)))}(0,o.fK)(new A({id:"cancelLinkedEditingInput",precondition:x,handler:e=>e.clearRanges(),kbOpts:{kbExpr:f.u.editorTextFocus,weight:199,primary:9,secondary:[1033]}}));const I=(0,b.P6)("editor.linkedEditingBackground",{dark:w.Il.fromHex("#f00").transparent(.3),light:w.Il.fromHex("#f00").transparent(.3),hc:w.Il.fromHex("#f00").transparent(.3)},n.N("editorLinkedEditingBackground","Background color when the editor auto renames on type."));(0,y.Ic)(((e,t)=>{const i=e.getColor(I);i&&t.addRule(`.monaco-editor .${k} { background: ${i}; border-left-color: ${i}; }`)})),(0,o.sb)("_executeLinkedEditingProvider",((e,t)=>M(e,t,l.T.None))),(0,o._K)(D.ID,D),(0,o.Qr)(E)},4800:(e,t,i)=>{"use strict";i.r(t),i.d(t,{LinkDetector:()=>T});var n=i(3580),o=i(5393),r=i(1050),s=i(7301),a=i(9365),l=i(5976),c=i(1432),u=i(6830),h=i(3411),d=i(4101),g=i(9241),f=i(666),p=i(4314),m=i(1200),_=i(4565),v=i(9488),b=i(8401),y=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class w{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}resolve(e){return y(this,void 0,void 0,(function*(){return this._link.url?this._link.url:"function"==typeof this._provider.resolveLink?Promise.resolve(this._provider.resolveLink(this._link,e)).then((t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing"))))):Promise.reject(new Error("missing"))}))}}class C{constructor(e){this._disposables=new l.SL;let t=[];for(const[i,n]of e){const e=i.links.map((e=>new w(e,n)));t=C._union(t,e),(0,l.Wf)(i)&&this._disposables.add(i)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){let i,n,o,r,s=[];for(i=0,o=0,n=e.length,r=t.length;iPromise.resolve(n.provideLinks(e,t)).then((e=>{e&&(i[o]=[e,n])}),s.Cp)));return Promise.all(n).then((()=>{const e=new C((0,v.kX)(i));return t.isCancellationRequested?(e.dispose(),new C([])):e}))}_.P.registerCommand("_executeLinkProvider",((e,...t)=>y(void 0,void 0,void 0,(function*(){let[i,n]=t;(0,b.p_)(i instanceof f.o),"number"!=typeof n&&(n=0);const o=e.get(m.q).getModel(i);if(!o)return[];const s=yield S(o,r.T.None);if(!s)return[];for(let e=0;e{this._onEditorMouseMove(e,t)}))),this.listenersToRemove.add(n.onExecute((e=>{this.onEditorMouseUp(e)}))),this.listenersToRemove.add(n.onCancel((e=>{this.cleanUpActiveLinkDecoration()}))),this.enabled=e.getOption(60),this.listenersToRemove.add(e.onDidChangeConfiguration((t=>{const i=e.getOption(60);this.enabled!==i&&(this.enabled=i,this.updateDecorations([]),this.stop(),this.beginCompute())}))),this.listenersToRemove.add(e.onDidChangeModelContent((e=>this.onChange()))),this.listenersToRemove.add(e.onDidChangeModel((e=>this.onModelChanged()))),this.listenersToRemove.add(e.onDidChangeModelLanguage((e=>this.onModelModeChanged()))),this.listenersToRemove.add(d.pM.onDidChange((e=>this.onModelModeChanged()))),this.timeout=new o._F,this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null,this.beginCompute()}static get(t){return t.getContribution(e.ID)}onModelChanged(){this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.beginCompute()}onModelModeChanged(){this.stop(),this.beginCompute()}onChange(){this.timeout.setIfNotSet((()=>this.beginCompute()),e.RECOMPUTE_TIME)}beginCompute(){return e=this,t=void 0,n=function*(){if(!this.editor.hasModel()||!this.enabled)return;const e=this.editor.getModel();if(d.pM.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=o.PG((t=>S(e,t)));try{this.activeLinksList=yield this.computePromise,this.updateDecorations(this.activeLinksList.links)}catch(e){(0,s.dL)(e)}finally{this.computePromise=null}}},new((i=void 0)||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}));var e,t,i,n}updateDecorations(e){const t="altKey"===this.editor.getOption(67);let i=[],n=Object.keys(this.currentOccurrences);for(let e=0,t=n.length;e{t.activate(e,i),this.activeLinkDecorationId=t.decorationId}))}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e="altKey"===this.editor.getOption(67);if(this.activeLinkDecorationId){const t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations((i=>{t.deactivate(i,e)})),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;const t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,i=!1){if(!this.openerService)return;const{link:o}=e;o.resolve(r.T.None).then((e=>{if("string"==typeof e&&this.editor.hasModel()){const t=this.editor.getModel().uri;if(t.scheme===N.lg.file&&e.startsWith(`${N.lg.file}:`)){const i=f.o.parse(e);if(i.scheme===N.lg.file){const n=E.z_(i);let o=null;n.startsWith("/./")?o=`.${n.substr(1)}`:n.startsWith("//./")&&(o=`.${n.substr(2)}`),o&&(e=E.Vo(t,o))}}}return this.openerService.open(e,{openToSide:t,fromUserGesture:i,allowContributedOpeners:!0,allowCommands:!0})}),(e=>{const t=e instanceof Error?e.message:e;"invalid"===t?this.notificationService.warn(n.N("invalid.url","Failed to open this link because it is not well-formed: {0}",o.url.toString())):"missing"===t?this.notificationService.warn(n.N("missing.url","Failed to open this link because its target is missing.")):(0,s.dL)(e)}))}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;const t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(const e of t){const t=this.currentOccurrences[e.id];if(t)return t}return null}isEnabled(e,t){return Boolean(6===e.target.type&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){var e;this.timeout.cancel(),this.activeLinksList&&(null===(e=this.activeLinksList)||void 0===e||e.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){this.listenersToRemove.dispose(),this.stop(),this.timeout.dispose()}};T.ID="editor.linkDetector",T.RECOMPUTE_TIME=1e3,T=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([A(1,k.v4),A(2,x.lT)],T);class R extends u.R6{constructor(){super({id:"editor.action.openLink",label:n.N("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){let i=T.get(t);if(!i)return;if(!t.hasModel())return;let n=t.getSelections();for(let e of n){let t=i.getLinkOccurrence(e.getEndPosition());t&&i.openLinkOccurrence(t,!1)}}}(0,u._K)(T.ID,T),(0,u.Qr)(R),(0,L.Ic)(((e,t)=>{const i=e.getColor(D._Y);i&&t.addRule(`.monaco-editor .detected-link-active { color: ${i} !important; }`)}))},2276:(e,t,i)=>{"use strict";i.d(t,{O:()=>g});var n=i(3580),o=i(5393),r=i(5976),s=i(5152),a=i(4314),l=i(6830),c=i(8819),u=i(7781),h=i(3910),d=i(2321);let g=class e{constructor(t,i){this._messageWidget=new r.XK,this._messageListeners=new r.SL,this._editor=t,this._visible=e.MESSAGE_VISIBLE.bindTo(i),this._editorListener=this._editor.onDidAttemptReadOnlyEdit((()=>this._onDidAttemptReadOnlyEdit()))}static get(t){return t.getContribution(e.ID)}dispose(){this._editorListener.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){let i;(0,s.Z9)(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new _(this._editor,t,e),this._messageListeners.add(this._editor.onDidBlurEditorText((()=>this.closeMessage()))),this._messageListeners.add(this._editor.onDidChangeCursorPosition((()=>this.closeMessage()))),this._messageListeners.add(this._editor.onDidDispose((()=>this.closeMessage()))),this._messageListeners.add(this._editor.onDidChangeModel((()=>this.closeMessage()))),this._messageListeners.add(new o._F((()=>this.closeMessage()),3e3)),this._messageListeners.add(this._editor.onMouseMove((e=>{e.target.position&&(i?i.containsPosition(e.target.position)||this.closeMessage():i=new a.e(t.lineNumber-3,1,e.target.position.lineNumber+3,1))})))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(_.fadeOut(this._messageWidget.value))}_onDidAttemptReadOnlyEdit(){this._editor.hasModel()&&this.showMessage(n.N("editor.readonly","Cannot edit in read-only editor"),this._editor.getPosition())}};var f,p;g.ID="editor.contrib.messageController",g.MESSAGE_VISIBLE=new c.uy("messageVisible",!1,n.N("messageVisible","Whether the editor is currently showing an inline message")),g=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(f=1,p=c.i6,function(e,t){p(e,t,f)})],g);const m=l._l.bindToContribution(g.get);(0,l.fK)(new m({id:"leaveEditorMessage",precondition:g.MESSAGE_VISIBLE,handler:e=>e.closeMessage(),kbOpts:{weight:130,primary:9}}));class _{constructor(e,{lineNumber:t,column:i},n){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=e,this._editor.revealLinesInCenterIfOutsideViewport(t,t,0),this._position={lineNumber:t,column:i-1},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage");const o=document.createElement("div");o.classList.add("anchor","top"),this._domNode.appendChild(o);const r=document.createElement("div");r.classList.add("message"),r.textContent=n,this._domNode.appendChild(r);const s=document.createElement("div");s.classList.add("anchor","below"),this._domNode.appendChild(s),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}static fadeOut(e){let t;const i=()=>{e.dispose(),clearTimeout(t),e.getDomNode().removeEventListener("animationend",i)};return t=setTimeout(i,110),e.getDomNode().addEventListener("animationend",i),e.getDomNode().classList.add("fadeOut"),{dispose:i}}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2]}}afterRender(e){this._domNode.classList.toggle("below",2===e)}}(0,l._K)(g.ID,g),(0,u.Ic)(((e,t)=>{const i=e.getColor(h.EP);if(i){let n=e.type===d.e.HIGH_CONTRAST?2:1;t.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor.below { border-top-color: ${i}; }`),t.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor.top { border-bottom-color: ${i}; }`),t.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { border: ${n}px solid ${i}; }`)}const n=e.getColor(h._l);n&&t.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { background-color: ${n}; }`);const o=e.getColor(h.YI);o&&t.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { color: ${o}; }`)}))},8486:(e,t,i)=>{"use strict";i.r(t),i.d(t,{InsertCursorAbove:()=>C,InsertCursorBelow:()=>S,MultiCursorSessionResult:()=>L,MultiCursorSession:()=>N,MultiCursorSelectionController:()=>E,MultiCursorSelectionControllerAction:()=>A,AddSelectionToNextFindMatchAction:()=>M,AddSelectionToPreviousFindMatchAction:()=>I,MoveSelectionToNextFindMatchAction:()=>T,MoveSelectionToPreviousFindMatchAction:()=>R,SelectHighlightsAction:()=>O,CompatChangeAll:()=>F,SelectionHighlighter:()=>B});var n=i(3580),o=i(5393),r=i(2258),s=i(5976),a=i(5152),l=i(6830),c=i(3814),u=i(4314),h=i(3860),d=i(9102),g=i(4973),f=i(3411),p=i(4101),m=i(3391),_=i(4144),v=i(3910),b=i(7781),y=i(8819);function w(e,t){const i=t.filter((t=>!e.find((e=>e.equals(t)))));if(i.length>=1){const e=i.map((e=>`line ${e.viewState.position.lineNumber} column ${e.viewState.position.column}`)).join(", "),t=1===i.length?n.N("cursorAdded","Cursor added: {0}",e):n.N("cursorsAdded","Cursors added: {0}",e);(0,a.i7)(t)}}class C extends l.R6{constructor(){super({id:"editor.action.insertCursorAbove",label:n.N("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:d.u.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:_.eH.MenubarSelectionMenu,group:"3_multi",title:n.N({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(e,t,i){if(!t.hasModel())return;const n=i&&!0===i.logicalLine,o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.pushStackElement();const r=o.getCursorStates();o.setCursorStates(i.source,3,c.P.addCursorUp(o,r,n)),o.revealTopMostCursor(i.source),w(r,o.getCursorStates())}}class S extends l.R6{constructor(){super({id:"editor.action.insertCursorBelow",label:n.N("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:d.u.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:_.eH.MenubarSelectionMenu,group:"3_multi",title:n.N({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(e,t,i){if(!t.hasModel())return;const n=i&&!0===i.logicalLine,o=t._getViewModel();if(o.cursorConfig.readOnly)return;o.pushStackElement();const r=o.getCursorStates();o.setCursorStates(i.source,3,c.P.addCursorDown(o,r,n)),o.revealBottomMostCursor(i.source),w(r,o.getCursorStates())}}class x extends l.R6{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:n.N("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:d.u.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:_.eH.MenubarSelectionMenu,group:"3_multi",title:n.N({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,i){if(!e.isEmpty()){for(let n=e.startLineNumber;n1&&i.push(new h.Y(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn))}}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=t.getSelections(),o=t._getViewModel(),r=o.getCursorStates();let s=[];n.forEach((e=>this.getCursorsForSelection(e,i,s))),s.length>0&&t.setSelections(s),w(r,o.getCursorStates())}}class k extends l.R6{constructor(){super({id:"editor.action.addCursorsToBottom",label:n.N("mutlicursor.addCursorsToBottom","Add Cursors To Bottom"),alias:"Add Cursors To Bottom",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections(),n=t.getModel().getLineCount();let o=[];for(let e=i[0].startLineNumber;e<=n;e++)o.push(new h.Y(e,i[0].startColumn,e,i[0].endColumn));const r=t._getViewModel(),s=r.getCursorStates();o.length>0&&t.setSelections(o),w(s,r.getCursorStates())}}class D extends l.R6{constructor(){super({id:"editor.action.addCursorsToTop",label:n.N("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections();let n=[];for(let e=i[0].startLineNumber;e>=1;e--)n.push(new h.Y(e,i[0].startColumn,e,i[0].endColumn));const o=t._getViewModel(),r=o.getCursorStates();n.length>0&&t.setSelections(n),w(r,o.getCursorStates())}}class L{constructor(e,t,i){this.selections=e,this.revealRange=t,this.revealScrollType=i}}class N{constructor(e,t,i,n,o,r,s){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=i,this.searchText=n,this.wholeWord=o,this.matchCase=r,this.currentMatch=s}static create(e,t){if(!e.hasModel())return null;const i=t.getState();if(!e.hasTextFocus()&&i.isRevealed&&i.searchString.length>0)return new N(e,t,!1,i.searchString,i.wholeWord,i.matchCase,null);let n,o,r=!1;const s=e.getSelections();1===s.length&&s[0].isEmpty()?(r=!0,n=!0,o=!0):(n=i.wholeWord,o=i.matchCase);const a=e.getSelection();let l,c=null;if(a.isEmpty()){const t=e.getConfiguredWordAtPosition(a.getStartPosition());if(!t)return null;l=t.word,c=new h.Y(a.startLineNumber,t.startColumn,a.startLineNumber,t.endColumn)}else l=e.getModel().getValueInRange(a).replace(/\r\n/g,"\n");return new N(e,t,r,l,n,o,c)}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new L(t.concat(e),e,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new L(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findNextMatch(this.searchText,t.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(114):null,!1);return i?new h.Y(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new L(t.concat(e),e,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const e=this._getPreviousMatch();if(!e)return null;const t=this._editor.getSelections();return new L(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const e=this.currentMatch;return this.currentMatch=null,e}this.findController.highlightFindOptions();const e=this._editor.getSelections(),t=e[e.length-1],i=this._editor.getModel().findPreviousMatch(this.searchText,t.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(114):null,!1);return i?new h.Y(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}selectAll(){return this._editor.hasModel()?(this.findController.highlightFindOptions(),this._editor.getModel().findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(114):null,!1,1073741824)):[]}}class E extends s.JT{constructor(e){super(),this._sessionDispose=this._register(new s.SL),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}static get(e){return e.getContribution(E.ID)}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=N.create(this._editor,e);if(!t)return;this._session=t;const i={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(i.wholeWordOverride=1,i.matchCaseOverride=1,i.isRegexOverride=2),e.getState().change(i,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection((e=>{this._ignoreSelectionChange||this._endSession()}))),this._sessionDispose.add(this._editor.onDidBlurEditorText((()=>{this._endSession()}))),this._sessionDispose.add(e.getState().onFindReplaceStateChange((e=>{(e.matchCase||e.wholeWord)&&this._endSession()})))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const e={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(e,!1)}this._session=null}_setSelections(e){this._ignoreSelectionChange=!0,this._editor.setSelections(e),this._ignoreSelectionChange=!1}_expandEmptyToWord(e,t){if(!t.isEmpty())return t;const i=this._editor.getConfiguredWordAtPosition(t.getStartPosition());return i?new h.Y(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):t}_applySessionResult(e){e&&(this._setSelections(e.selections),e.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(e.revealRange,e.revealScrollType))}getSession(e){return this._session}addSelectionToNextFindMatch(e){if(this._editor.hasModel()){if(!this._session){const t=this._editor.getSelections();if(t.length>1){const i=e.getState().matchCase;if(!z(this._editor.getModel(),t,i)){const e=this._editor.getModel();let i=[];for(let n=0,o=t.length;n0&&i.isRegex)t=this._editor.getModel().findMatches(i.searchString,!0,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(114):null,!1,1073741824);else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll()}if(i.searchScope){const e=i.searchScope;let n=[];t.forEach((t=>{e.forEach((e=>{t.range.endLineNumber<=e.endLineNumber&&t.range.startLineNumber>=e.startLineNumber&&n.push(t)}))})),t=n}if(t.length>0){const e=this._editor.getSelection();for(let i=0,n=t.length;inew h.Y(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn))))}}}E.ID="editor.contrib.multiCursorController";class A extends l.R6{run(e,t){const i=E.get(t);if(!i)return;const n=m.CommonFindController.get(t);if(!n)return;const o=t._getViewModel();if(o){const e=o.getCursorStates();this._run(i,n),w(e,o.getCursorStates())}}}class M extends A{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:n.N("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:d.u.focus,primary:2082,weight:100},menuOpts:{menuId:_.eH.MenubarSelectionMenu,group:"3_multi",title:n.N({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}class I extends A{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:n.N("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:_.eH.MenubarSelectionMenu,group:"3_multi",title:n.N({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}class T extends A{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:n.N("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:d.u.focus,primary:(0,r.gx)(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}class R extends A{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:n.N("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}class O extends A{constructor(){super({id:"editor.action.selectHighlights",label:n.N("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:d.u.focus,primary:3114,weight:100},menuOpts:{menuId:_.eH.MenubarSelectionMenu,group:"3_multi",title:n.N({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}}class F extends A{constructor(){super({id:"editor.action.changeAll",label:n.N("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:y.Ao.and(d.u.writable,d.u.editorTextFocus),kbOpts:{kbExpr:d.u.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}class P{constructor(e,t,i,n){this.searchText=e,this.matchCase=t,this.wordSeparators=i,this.modelVersionId=n}static softEquals(e,t){return!e&&!t||!(!e||!t)&&e.searchText===t.searchText&&e.matchCase===t.matchCase&&e.wordSeparators===t.wordSeparators&&e.modelVersionId===t.modelVersionId}}class B extends s.JT{constructor(e){super(),this.editor=e,this._isEnabled=e.getOption(95),this.decorations=[],this.updateSoon=this._register(new o.pY((()=>this._update()),300)),this.state=null,this._register(e.onDidChangeConfiguration((t=>{this._isEnabled=e.getOption(95)}))),this._register(e.onDidChangeCursorSelection((e=>{this._isEnabled&&(e.selection.isEmpty()?3===e.reason?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())}))),this._register(e.onDidChangeModel((e=>{this._setState(null)}))),this._register(e.onDidChangeModelContent((e=>{this._isEnabled&&this.updateSoon.schedule()}))),this._register(m.CommonFindController.get(e).getState().onFindReplaceStateChange((e=>{this._update()})))}_update(){this._setState(B._createState(this._isEnabled,this.editor))}static _createState(e,t){if(!e)return null;if(!t.hasModel())return null;const i=t.getSelection();if(i.startLineNumber!==i.endLineNumber)return null;const n=E.get(t);if(!n)return null;const o=m.CommonFindController.get(t);if(!o)return null;let r=n.getSession(o);if(!r){const e=t.getSelections();if(e.length>1){const i=o.getState().matchCase;if(!z(t.getModel(),e,i))return null}r=N.create(t,o)}if(!r)return null;if(r.currentMatch)return null;if(/^[ \t]+$/.test(r.searchText))return null;if(r.searchText.length>200)return null;const s=o.getState(),a=s.matchCase;if(s.isRevealed){let e=s.searchString;a||(e=e.toLowerCase());let t=r.searchText;if(a||(t=t.toLowerCase()),e===t&&r.matchCase===s.matchCase&&r.wholeWord===s.wholeWord&&!s.isRegex)return null}return new P(r.searchText,r.matchCase,r.wholeWord?t.getOption(114):null,t.getModel().getVersionId())}_setState(e){if(P.softEquals(this.state,e))return void(this.state=e);if(this.state=e,!this.state)return void(this.decorations=this.editor.deltaDecorations(this.decorations,[]));if(!this.editor.hasModel())return;const t=this.editor.getModel();if(t.isTooLargeForTokenization())return;const i=p.vH.has(t)&&this.editor.getOption(69);let n=t.findMatches(this.state.searchText,!0,!1,this.state.matchCase,this.state.wordSeparators,!1).map((e=>e.range));n.sort(u.e.compareRangesUsingStarts);let o=this.editor.getSelections();o.sort(u.e.compareRangesUsingStarts);let r=[];for(let e=0,t=0,i=n.length,s=o.length;e=s)r.push(i),e++;else{const n=u.e.compareRangesUsingStarts(i,o[t]);n<0?(!o[t].isEmpty()&&u.e.areIntersecting(i,o[t])||r.push(i),e++):(n>0||e++,t++)}}const s=r.map((e=>({range:e,options:i?B._SELECTION_HIGHLIGHT:B._SELECTION_HIGHLIGHT_OVERVIEW})));this.decorations=this.editor.deltaDecorations(this.decorations,s)}dispose(){this._setState(null),super.dispose()}}function z(e,t,i){const n=W(e,t[0],!i);for(let o=1,r=t.length;o{"use strict";i.r(t),i.d(t,{TriggerParameterHintsAction:()=>K});var n=i(3580),o=i(5976),r=i(2065),s=i(9102),a=i(8819),l=i(6830),c=i(5321),u=i(4850),h=i(5152),d=i(9802),g=i(4669),f=i(1531),p=i(3947),m=i(7301),_=i(187),v=i(4101),b=i(1050),y=i(4565),w=i(666),C=i(8401),S=i(8216),x=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const k={Visible:new a.uy("parameterHintsVisible",!1),MultipleSignatures:new a.uy("parameterHintsMultipleSignatures",!1)};function D(e,t,i,n){return x(this,void 0,void 0,(function*(){const o=v.nD.ordered(e);for(const r of o)try{const o=yield r.provideSignatureHelp(e,t,n,i);if(o)return o}catch(e){(0,m.Cp)(e)}}))}y.P.registerCommand("_executeSignatureHelpProvider",((e,...t)=>x(void 0,void 0,void 0,(function*(){const[i,n,o]=t;(0,C.p_)(w.o.isUri(i)),(0,C.p_)(_.L.isIPosition(n)),(0,C.p_)("string"==typeof o||!o);const r=yield e.get(S.S).createModelReference(i);try{const e=yield D(r.object.textEditorModel,_.L.lift(n),{triggerKind:v.WW.Invoke,isRetrigger:!1,triggerCharacter:o},b.T.None);if(!e)return;return setTimeout((()=>e.dispose()),0),e.value}finally{r.dispose()}}))));var L,N=i(988),E=i(3910),A=i(7781),M=i(5393),I=i(4906);!function(e){e.Default={type:0},e.Pending=class{constructor(e,t){this.request=e,this.previouslyActiveHints=t,this.type=2}},e.Active=class{constructor(e){this.hints=e,this.type=1}}}(L||(L={}));class T extends o.JT{constructor(e,t=T.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new g.Q5),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=L.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new o.XK),this.triggerChars=new I.q,this.retriggerChars=new I.q,this.triggerId=0,this.editor=e,this.throttledDelayer=new M.vp(t),this._register(this.editor.onDidBlurEditorWidget((()=>this.cancel()))),this._register(this.editor.onDidChangeConfiguration((()=>this.onEditorConfigurationChange()))),this._register(this.editor.onDidChangeModel((e=>this.onModelChanged()))),this._register(this.editor.onDidChangeModelLanguage((e=>this.onModelChanged()))),this._register(this.editor.onDidChangeCursorSelection((e=>this.onCursorChange(e)))),this._register(this.editor.onDidChangeModelContent((e=>this.onModelContentChange()))),this._register(v.nD.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType((e=>this.onDidType(e)))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){2===this._state.type&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=L.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){const i=this.editor.getModel();if(!i||!v.nD.has(i))return;const n=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger((()=>this.doTrigger(n)),t).catch(m.dL)}next(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t%e==e-1,n=this.editor.getOption(73).cycle;!(e<2||i)||n?this.updateActiveSignature(i&&n?0:t+1):this.cancel()}previous(){if(1!==this.state.type)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=0===t,n=this.editor.getOption(73).cycle;!(e<2||i)||n?this.updateActiveSignature(i&&n?e-1:t-1):this.cancel()}updateActiveSignature(e){1===this.state.type&&(this.state=new L.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:e})),this._onChangedHints.fire(this.state.hints))}doTrigger(e){return t=this,i=void 0,o=function*(){const t=1===this.state.type||2===this.state.type,i=this.getLastActiveHints();if(this.cancel(!0),0===this._pendingTriggers.length)return!1;const n=this._pendingTriggers.reduce(R);this._pendingTriggers=[];const o={triggerKind:n.triggerKind,triggerCharacter:n.triggerCharacter,isRetrigger:t,activeSignatureHelp:i};if(!this.editor.hasModel())return!1;const r=this.editor.getModel(),s=this.editor.getPosition();this.state=new L.Pending((0,M.PG)((e=>D(r,s,o,e))),i);try{const t=yield this.state.request;return e!==this.triggerId?(null==t||t.dispose(),!1):t&&t.value.signatures&&0!==t.value.signatures.length?(this.state=new L.Active(t.value),this._lastSignatureHelpResult.value=t,this._onChangedHints.fire(this.state.hints),!0):(null==t||t.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1)}catch(t){return e===this.triggerId&&(this.state=L.Default),(0,m.dL)(t),!1}},new((n=void 0)||(n=Promise))((function(e,r){function s(e){try{l(o.next(e))}catch(e){r(e)}}function a(e){try{l(o.throw(e))}catch(e){r(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n((function(e){e(i)}))).then(s,a)}l((o=o.apply(t,i||[])).next())}));var t,i,n,o}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return 1===this.state.type||2===this.state.type||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars=new I.q,this.retriggerChars=new I.q;const e=this.editor.getModel();if(e)for(const t of v.nD.ordered(e)){for(const e of t.signatureHelpTriggerCharacters||[])this.triggerChars.add(e.charCodeAt(0)),this.retriggerChars.add(e.charCodeAt(0));for(const e of t.signatureHelpRetriggerCharacters||[])this.retriggerChars.add(e.charCodeAt(0))}}onDidType(e){if(!this.triggerOnType)return;const t=e.length-1,i=e.charCodeAt(t);(this.triggerChars.has(i)||this.isTriggered&&this.retriggerChars.has(i))&&this.trigger({triggerKind:v.WW.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){"mouse"===e.source?this.cancel():this.isTriggered&&this.trigger({triggerKind:v.WW.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:v.WW.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(73).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}function R(e,t){switch(t.triggerKind){case v.WW.Invoke:return t;case v.WW.ContentChange:return e;case v.WW.TriggerCharacter:default:return t}}T.DEFAULT_DELAY=120;var O=i(7295),F=i(3046),P=i(2321),B=i(9554),z=function(e,t){return function(i,n){t(i,n,e)}};const W=c.$,V=(0,B.q5)("parameter-hints-next",F.lA.chevronDown,n.N("parameterHintsNextIcon","Icon for show next parameter hint.")),H=(0,B.q5)("parameter-hints-previous",F.lA.chevronUp,n.N("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let $=class e extends o.JT{constructor(e,t,i,n){super(),this.editor=e,this.renderDisposeables=this._register(new o.SL),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new p.$({editor:e},n,i)),this.model=this._register(new T(e)),this.keyVisible=k.Visible.bindTo(t),this.keyMultipleSignatures=k.MultipleSignatures.bindTo(t),this._register(this.model.onChangedHints((e=>{e?(this.show(),this.render(e)):this.hide()})))}createParamaterHintDOMNodes(){const e=W(".editor-widget.parameter-hints-widget"),t=c.R3(e,W(".phwrapper"));t.tabIndex=-1;const i=c.R3(t,W(".controls")),n=c.R3(i,W(".button"+A.kS.asCSSSelector(H))),o=c.R3(i,W(".overloads")),r=c.R3(i,W(".button"+A.kS.asCSSSelector(V))),s=(0,u.sT)((0,u.jt)(n,"click"));this._register(s(this.previous,this));const a=(0,u.sT)((0,u.jt)(r,"click"));this._register(a(this.next,this));const l=W(".body"),h=new d.s$(l,{});this._register(h),t.appendChild(h.getDomNode());const f=c.R3(l,W(".signature")),p=c.R3(l,W(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:f,overloads:o,docs:p,scrollbar:h},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection((e=>{this.visible&&this.editor.layoutContentWidget(this)})));const m=()=>{if(!this.domNodes)return;const e=this.editor.getOption(40);this.domNodes.element.style.fontSize=`${e.fontSize}px`};m(),this._register(g.ju.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter((e=>e.hasChanged(40))).on(m,null)),this._register(this.editor.onDidLayoutChange((e=>this.updateMaxHeight()))),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParamaterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout((()=>{this.domNodes&&this.domNodes.element.classList.add("visible")}),100),this.editor.layoutContentWidget(this))}hide(){this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,this.domNodes&&this.domNodes.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(e){var t;if(this.renderDisposeables.clear(),!this.domNodes)return;const i=e.signatures.length>1;this.domNodes.element.classList.toggle("multiple",i),this.keyMultipleSignatures.set(i),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const o=e.signatures[e.activeSignature];if(!o)return;const r=c.R3(this.domNodes.signature,W(".code")),s=this.editor.getOption(40);r.style.fontSize=`${s.fontSize}px`,r.style.fontFamily=s.fontFamily;const a=o.parameters.length>0,l=null!==(t=o.activeParameter)&&void 0!==t?t:e.activeParameter;a?this.renderParameters(r,o,l):c.R3(r,W("span")).textContent=o.label;const u=o.parameters[l];if(null==u?void 0:u.documentation){const e=W("span.documentation");if("string"==typeof u.documentation)e.textContent=u.documentation;else{const t=this.renderMarkdownDocs(u.documentation);e.appendChild(t.element)}c.R3(this.domNodes.docs,W("p",{},e))}if(void 0===o.documentation);else if("string"==typeof o.documentation)c.R3(this.domNodes.docs,W("p",{},o.documentation));else{const e=this.renderMarkdownDocs(o.documentation);c.R3(this.domNodes.docs,e.element)}const d=this.hasDocs(o,u);if(this.domNodes.signature.classList.toggle("has-docs",d),this.domNodes.docs.classList.toggle("empty",!d),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,u){const e=this.getParameterLabel(o,l);this.announcedLabel!==e&&(h.Z9(n.N("hint","{0}, hint",e)),this.announcedLabel=e)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const t=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{var e;null===(e=this.domNodes)||void 0===e||e.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!(t&&"string"==typeof t.documentation&&(0,C.cW)(t.documentation).length>0||t&&"object"==typeof t.documentation&&(0,C.cW)(t.documentation).value.length>0||e.documentation&&"string"==typeof e.documentation&&(0,C.cW)(e.documentation).length>0||e.documentation&&"object"==typeof e.documentation&&(0,C.cW)(e.documentation.value).length>0)}renderParameters(e,t,i){const[n,o]=this.getParameterLabelOffsets(t,i),r=document.createElement("span");r.textContent=t.label.substring(0,n);const s=document.createElement("span");s.textContent=t.label.substring(n,o),s.className="parameter active";const a=document.createElement("span");a.textContent=t.label.substring(o),c.R3(e,r,s,a)}getParameterLabel(e,t){const i=e.parameters[t];return Array.isArray(i.label)?e.label.substring(i.label[0],i.label[1]):i.label}getParameterLabelOffsets(e,t){const i=e.parameters[t];if(i){if(Array.isArray(i.label))return i.label;if(i.label.length){const t=new RegExp(`(\\W|^)${(0,O.ec)(i.label)}(?=\\W|$)`,"g");t.test(e.label);const n=t.lastIndex-i.label.length;return n>=0?[n,t.lastIndex]:[0,0]}return[0,0]}return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}cancel(){this.model.cancel()}getDomNode(){return this.domNodes||this.createParamaterHintDOMNodes(),this.domNodes.element}getId(){return e.ID}trigger(e){this.model.trigger(e,0)}updateMaxHeight(){if(!this.domNodes)return;const e=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=e;const t=this.domNodes.element.getElementsByClassName("phwrapper");t.length&&(t[0].style.maxHeight=e)}};$.ID="editor.widget.parameterHintsWidget",$=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([z(1,a.i6),z(2,N.v4),z(3,f.h)],$),(0,A.Ic)(((e,t)=>{const i=e.getColor(E.CN);if(i){const n=e.type===P.e.HIGH_CONTRAST?2:1;t.addRule(`.monaco-editor .parameter-hints-widget { border: ${n}px solid ${i}; }`),t.addRule(`.monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid ${i.transparent(.5)}; }`),t.addRule(`.monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid ${i.transparent(.5)}; }`)}const n=e.getColor(E.yJ);n&&t.addRule(`.monaco-editor .parameter-hints-widget { background-color: ${n}; }`);const o=e.getColor(E.ur);o&&t.addRule(`.monaco-editor .parameter-hints-widget a { color: ${o}; }`);const r=e.getColor(E.Sb);r&&t.addRule(`.monaco-editor .parameter-hints-widget { color: ${r}; }`);const s=e.getColor(E.Sw);s&&t.addRule(`.monaco-editor .parameter-hints-widget code { background-color: ${s}; }`)}));let U=class e extends o.JT{constructor(e,t){super(),this.editor=e,this.widget=this._register(t.createInstance($,this.editor))}static get(t){return t.getContribution(e.ID)}cancel(){this.widget.cancel()}previous(){this.widget.previous()}next(){this.widget.next()}trigger(e){this.widget.trigger(e)}};var j,q;U.ID="editor.controller.parameterHints",U=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(j=1,q=r.TG,function(e,t){q(e,t,j)})],U);class K extends l.R6{constructor(){super({id:"editor.action.triggerParameterHints",label:n.N("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:s.u.hasSignatureHelpProvider,kbOpts:{kbExpr:s.u.editorTextFocus,primary:3082,weight:100}})}run(e,t){const i=U.get(t);i&&i.trigger({triggerKind:v.WW.Invoke})}}(0,l._K)(U.ID,U),(0,l.Qr)(K);const G=l._l.bindToContribution(U.get);(0,l.fK)(new G({id:"closeParameterHints",precondition:k.Visible,handler:e=>e.cancel(),kbOpts:{weight:175,kbExpr:s.u.focus,primary:9,secondary:[1033]}})),(0,l.fK)(new G({id:"showPrevParameterHint",precondition:a.Ao.and(k.Visible,k.MultipleSignatures),handler:e=>e.previous(),kbOpts:{weight:175,kbExpr:s.u.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),(0,l.fK)(new G({id:"showNextParameterHint",precondition:a.Ao.and(k.Visible,k.MultipleSignatures),handler:e=>e.next(),kbOpts:{weight:175,kbExpr:s.u.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))},2043:(e,t,i)=>{"use strict";i.d(t,{Fw:()=>M,Jy:()=>I,vk:()=>F,rc:()=>R,SC:()=>W,RX:()=>q,sH:()=>K,WL:()=>Y,xH:()=>Z,M8:()=>V,a7:()=>$,xk:()=>H,F8:()=>G,Zj:()=>U,IY:()=>j,KY:()=>P,IH:()=>B,R7:()=>z});var n=i(5321),o=i(317),r=i(4741),s=i(1264),a=i(4669),l=i(6248),c=i(1640),u=i(4527),h=i(3098),d=i(4742),g=i(5976),f=i(4314),p=i(3411);const m=new s.Il(new s.VS(0,122,204)),_={showArrow:!0,showFrame:!0,className:"",frameColor:m,arrowColor:m,keepEditorSelection:!1};class v{constructor(e,t,i,n,o,r){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=i,this.heightInLines=n,this._onDomNodeTop=o,this._onComputedHeight=r}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class b{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class y{constructor(e){this._editor=e,this._ruleName=y._IdGenerator.nextId(),this._decorations=[],this._color=null,this._height=-1}dispose(){this.hide(),n.uN(this._ruleName)}set color(e){this._color!==e&&(this._color=e,this._updateStyle())}set height(e){this._height!==e&&(this._height=e,this._updateStyle())}_updateStyle(){n.uN(this._ruleName),n.fk(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(e){this._decorations=this._editor.deltaDecorations(this._decorations,[{range:f.e.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._editor.deltaDecorations(this._decorations,[])}}y._IdGenerator=new d.R(".arrow-decoration-");var w=i(3580),C=i(8819),S=i(2065),x=i(5026),k=i(6830),D=i(3910),L=i(3046),N=i(8335),E=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},A=function(e,t){return function(i,n){t(i,n,e)}};const M=(0,S.yh)("IPeekViewService");var I;(0,x.z)(M,class{constructor(){this._widgets=new Map}addExclusiveWidget(e,t){const i=this._widgets.get(e);i&&(i.listener.dispose(),i.widget.dispose()),this._widgets.set(e,{widget:t,listener:t.onDidClose((()=>{const i=this._widgets.get(e);i&&i.widget===t&&(i.listener.dispose(),this._widgets.delete(e))}))})}}),function(e){e.inPeekEditor=new C.uy("inReferenceSearchEditor",!0,w.N("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),e.notInPeekEditor=e.inPeekEditor.toNegated()}(I||(I={}));let T=class{constructor(e,t){e instanceof u.H&&I.inPeekEditor.bindTo(t)}dispose(){}};function R(e){let t=e.get(c.$).getFocusedCodeEditor();return t instanceof u.H?t.getParentEditor():t}T.ID="editor.contrib.referenceController",T=E([A(1,C.i6)],T),(0,k._K)(T.ID,T);const O={headerBackgroundColor:s.Il.white,primaryHeadingColor:s.Il.fromHex("#333333"),secondaryHeadingColor:s.Il.fromHex("#6c6c6cb3")};let F=class extends class{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._positionMarkerId=[],this._viewZone=null,this._disposables=new g.SL,this.container=null,this._isShowing=!1,this.editor=e,this.options=l.I8(t),l.jB(this.options,_,!1),this.domNode=document.createElement("div"),this.options.isAccessible||(this.domNode.setAttribute("aria-hidden","true"),this.domNode.setAttribute("role","presentation")),this._disposables.add(this.editor.onDidLayoutChange((e=>{const t=this._getWidth(e);this.domNode.style.width=t+"px",this.domNode.style.left=this._getLeft(e)+"px",this._onWidth(t)})))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._viewZone=null})),this.editor.deltaDecorations(this._positionMarkerId,[]),this._positionMarkerId=[],this._disposables.dispose()}create(){this.domNode.classList.add("zone-widget"),this.options.className&&this.domNode.classList.add(this.options.className),this.container=document.createElement("div"),this.container.classList.add("zone-widget-container"),this.domNode.appendChild(this.container),this.options.showArrow&&(this._arrow=new y(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(e){e.frameColor&&(this.options.frameColor=e.frameColor),e.arrowColor&&(this.options.arrowColor=e.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){let e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){let e=this.options.arrowColor.toString();this._arrow.color=e}}_getWidth(e){return e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}_getLeft(e){return e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){if(this.domNode.style.height=`${e}px`,this.container){let t=e-this._decoratingElementsHeight();this.container.style.height=`${t}px`;const i=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(i))}this._resizeSash&&this._resizeSash.layout()}get position(){const[e]=this._positionMarkerId;if(!e)return;const t=this.editor.getModel();if(!t)return;const i=t.getDecorationRange(e);return i?i.getStartPosition():void 0}show(e,t){const i=f.e.isIRange(e)?f.e.lift(e):f.e.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:i,options:p.qx.EMPTY}])}hide(){this._viewZone&&(this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id)})),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._arrow&&this._arrow.hide()}_decoratingElementsHeight(){let e=this.editor.getOption(56),t=0;return this.options.showArrow&&(t+=2*Math.round(e/3)),this.options.showFrame&&(t+=2*Math.round(e/9)),t}_showImpl(e,t){const i=e.getStartPosition(),n=this.editor.getLayoutInfo(),o=this._getWidth(n);this.domNode.style.width=`${o}px`,this.domNode.style.left=this._getLeft(n)+"px";const r=document.createElement("div");r.style.overflow="hidden";const s=this.editor.getOption(56),a=Math.max(12,this.editor.getLayoutInfo().height/s*.8);t=Math.min(t,a);let l=0,c=0;if(this._arrow&&this.options.showArrow&&(l=Math.round(s/3),this._arrow.height=l,this._arrow.show(i)),this.options.showFrame&&(c=Math.round(s/9)),this.editor.changeViewZones((e=>{this._viewZone&&e.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new v(r,i.lineNumber,i.column,t,(e=>this._onViewZoneTop(e)),(e=>this._onViewZoneHeight(e))),this._viewZone.id=e.addZone(this._viewZone),this._overlayWidget=new b("vs.editor.contrib.zoneWidget"+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)})),this.container&&this.options.showFrame){const e=this.options.frameWidth?this.options.frameWidth:c;this.container.style.borderTopWidth=e+"px",this.container.style.borderBottomWidth=e+"px"}let u=t*s-this._decoratingElementsHeight();this.container&&(this.container.style.top=l+"px",this.container.style.height=u+"px",this.container.style.overflow="hidden"),this._doLayout(u,o),this.options.keepEditorSelection||this.editor.setSelection(e);const h=this.editor.getModel();if(h){const t=e.endLineNumber+1;t<=h.getLineCount()?this.revealLine(t,!1):this.revealLine(h.getLineCount(),!0)}}revealLine(e,t){t?this.editor.revealLineInCenter(e,0):this.editor.revealLine(e,0)}setCssClass(e,t){this.container&&(t&&this.container.classList.remove(t),this.container.classList.add(e))}_onWidth(e){}_doLayout(e,t){}_relayout(e){this._viewZone&&this._viewZone.heightInLines!==e&&this.editor.changeViewZones((t=>{this._viewZone&&(this._viewZone.heightInLines=e,t.layoutZone(this._viewZone.id))}))}_initSash(){if(this._resizeSash)return;let e;this._resizeSash=this._disposables.add(new h.g(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.hide(),this._resizeSash.state=0),this._disposables.add(this._resizeSash.onDidStart((t=>{this._viewZone&&(e={startY:t.startY,heightInLines:this._viewZone.heightInLines})}))),this._disposables.add(this._resizeSash.onDidEnd((()=>{e=void 0}))),this._disposables.add(this._resizeSash.onDidChange((t=>{if(e){let i=(t.currentY-e.startY)/this.editor.getOption(56),n=i<0?Math.ceil(i):Math.floor(i),o=e.heightInLines+n;o>5&&o<35&&this._relayout(o)}})))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(null===this.domNode.style.height?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}{constructor(e,t,i){super(e,t),this.instantiationService=i,this._onDidClose=new a.Q5,this.onDidClose=this._onDidClose.event,l.jB(this.options,O,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){let t=this.options;e.headerBackgroundColor&&(t.headerBackgroundColor=e.headerBackgroundColor),e.primaryHeadingColor&&(t.primaryHeadingColor=e.primaryHeadingColor),e.secondaryHeadingColor&&(t.secondaryHeadingColor=e.secondaryHeadingColor),super.style(e)}_applyStyles(){super._applyStyles();let e=this.options;this._headElement&&e.headerBackgroundColor&&(this._headElement.style.backgroundColor=e.headerBackgroundColor.toString()),this._primaryHeading&&e.primaryHeadingColor&&(this._primaryHeading.style.color=e.primaryHeadingColor.toString()),this._secondaryHeading&&e.secondaryHeadingColor&&(this._secondaryHeading.style.color=e.secondaryHeadingColor.toString()),this._bodyElement&&e.frameColor&&(this._bodyElement.style.borderColor=e.frameColor.toString())}_fillContainer(e){this.setCssClass("peekview-widget"),this._headElement=n.$(".head"),this._bodyElement=n.$(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){const i=n.$(".peekview-title");n.R3(this._headElement,i),n.mu(i,"click",(e=>this._onTitleClick(e))),this._fillTitleIcon(i),this._primaryHeading=n.$("span.filename"),this._secondaryHeading=n.$("span.dirname"),this._metaHeading=n.$("span.meta"),n.R3(i,this._primaryHeading,this._secondaryHeading,this._metaHeading);const s=n.$(".peekview-actions");n.R3(this._headElement,s);const a=this._getActionBarOptions();this._actionbarWidget=new o.o(s,a),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new r.aU("peekview.close",w.N("label.close","Close"),L.lA.close.classNames,!0,(()=>(this.dispose(),Promise.resolve()))),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:N.Id.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(e){}setTitle(e,t){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=e,this._primaryHeading.setAttribute("title",e),t?this._secondaryHeading.innerText=t:n.PO(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,n.$Z(this._metaHeading)):n.Cp(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0)return void this.dispose();const i=Math.ceil(1.2*this.editor.getOption(56)),n=Math.round(e-(i+2));this._doLayoutHead(i,t),this._doLayoutBody(n,t)}_doLayoutHead(e,t){this._headElement&&(this._headElement.style.height=`${e}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(e,t){this._bodyElement&&(this._bodyElement.style.height=`${e}px`)}};F=E([A(2,S.TG)],F);const P=(0,D.P6)("peekViewTitle.background",{dark:"#1E1E1E",light:"#FFFFFF",hc:"#0C141F"},w.N("peekViewTitleBackground","Background color of the peek view title area.")),B=(0,D.P6)("peekViewTitleLabel.foreground",{dark:"#FFFFFF",light:"#333333",hc:"#FFFFFF"},w.N("peekViewTitleForeground","Color of the peek view title.")),z=(0,D.P6)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161e6",hc:"#FFFFFF99"},w.N("peekViewTitleInfoForeground","Color of the peek view title info.")),W=(0,D.P6)("peekView.border",{dark:"#007acc",light:"#007acc",hc:D.lR},w.N("peekViewBorder","Color of the peek view borders and arrow.")),V=(0,D.P6)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hc:s.Il.black},w.N("peekViewResultsBackground","Background color of the peek view result list.")),H=(0,D.P6)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hc:s.Il.white},w.N("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),$=(0,D.P6)("peekViewResult.fileForeground",{dark:s.Il.white,light:"#1E1E1E",hc:s.Il.white},w.N("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),U=(0,D.P6)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hc:null},w.N("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),j=(0,D.P6)("peekViewResult.selectionForeground",{dark:s.Il.white,light:"#6C6C6C",hc:s.Il.white},w.N("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),q=(0,D.P6)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hc:s.Il.black},w.N("peekViewEditorBackground","Background color of the peek view editor.")),K=(0,D.P6)("peekViewEditorGutter.background",{dark:q,light:q,hc:q},w.N("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),G=(0,D.P6)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hc:null},w.N("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),Y=(0,D.P6)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hc:null},w.N("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),Z=(0,D.P6)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hc:D.xL},w.N("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."))},8275:(e,t,i)=>{"use strict";i.d(t,{X:()=>u});var n=i(4973),o=i(7781),r=i(7869),s=i(5976),a=i(5520),l=i(8401),c=i(8289);class u{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var i;const n=new s.SL;e.canAcceptInBackground=!!(null===(i=this.options)||void 0===i?void 0:i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const o=n.add(new s.XK);return o.value=this.doProvide(e,t),n.add(this.onDidActiveTextEditorControlChange((()=>{o.value=void 0,o.value=this.doProvide(e,t)}))),n}doProvide(e,t){const i=new s.SL,n=this.activeTextEditorControl;if(n&&this.canProvideWithTextEditor(n)){const o={editor:n},r=(0,a.Pi)(n);if(r){let e=(0,l.f6)(n.saveViewState());i.add(r.onDidChangeCursorPosition((()=>{e=(0,l.f6)(n.saveViewState())}))),o.restoreViewState=()=>{e&&n===this.activeTextEditorControl&&n.restoreViewState(e)},i.add((0,c.I)(t.onCancellationRequested)((()=>{var e;return null===(e=o.restoreViewState)||void 0===e?void 0:e.call(o)})))}i.add((0,s.OF)((()=>this.clearDecorations(n)))),i.add(this.provideWithTextEditor(o,e,t))}else i.add(this.provideWithoutTextEditor(e,t));return i}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus()}getModel(e){var t;return(0,a.QI)(e)?null===(t=e.getModel())||void 0===t?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations((e=>{const i=[];this.rangeHighlightDecorationId&&(i.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),i.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const s=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:(0,o.EN)(r.m9),position:n.sh.Full}}}],[a,l]=e.deltaDecorations(i,s);this.rangeHighlightDecorationId={rangeHighlightId:a,overviewRulerDecorationId:l}}))}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations((e=>{e.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])})),this.rangeHighlightDecorationId=void 0)}}},4454:(e,t,i)=>{"use strict";i.r(t),i.d(t,{RenameAction:()=>z,rename:()=>P});var n=i(3580),o=i(7301),r=i(8819),s=i(535),a=i(6830),l=i(9102),c=i(5976),u=i(187),h=i(3910),d=i(7781),g=i(1847),f=function(e,t){return function(i,n){t(i,n,e)}};const p=new r.uy("renameInputVisible",!1,(0,n.N)("renameInputVisible","Whether the rename input widget is visible"));let m=class{constructor(e,t,i,n,o){this._editor=e,this._acceptKeybindings=t,this._themeService=i,this._keybindingService=n,this._disposables=new c.SL,this.allowEditorOverflow=!0,this._visibleContextKey=p.bindTo(o),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(40)&&this._updateFont()}))),this._disposables.add(i.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){if(!this._domNode){this._domNode=document.createElement("div"),this._domNode.className="monaco-editor rename-box",this._input=document.createElement("input"),this._input.className="rename-input",this._input.type="text",this._input.setAttribute("aria-label",(0,n.N)("renameAriaLabel","Rename input. Type new name and press Enter to commit.")),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label);const e=()=>{var e,t;const[i,o]=this._acceptKeybindings;this._keybindingService.lookupKeybinding(i),this._label.innerText=(0,n.N)({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",null===(e=this._keybindingService.lookupKeybinding(i))||void 0===e?void 0:e.getLabel(),null===(t=this._keybindingService.lookupKeybinding(o))||void 0===t?void 0:t.getLabel())};e(),this._disposables.add(this._keybindingService.onDidUpdateKeybindings(e)),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())}return this._domNode}_updateStyles(e){var t,i,n,o;if(!this._input||!this._domNode)return;const r=e.getColor(h.rh);this._domNode.style.backgroundColor=String(null!==(t=e.getColor(h.D0))&&void 0!==t?t:""),this._domNode.style.boxShadow=r?` 0 0 8px 2px ${r}`:"",this._domNode.style.color=String(null!==(i=e.getColor(h.zJ))&&void 0!==i?i:""),this._input.style.backgroundColor=String(null!==(n=e.getColor(h.sE))&&void 0!==n?n:"");const s=e.getColor(h.dt);this._input.style.borderWidth=s?"1px":"0px",this._input.style.borderStyle=s?"solid":"none",this._input.style.borderColor=null!==(o=null==s?void 0:s.toString())&&void 0!==o?o:"none"}_updateFont(){if(!this._input||!this._label)return;const e=this._editor.getOption(40);this._input.style.fontFamily=e.fontFamily,this._input.style.fontWeight=e.fontWeight,this._input.style.fontSize=`${e.fontSize}px`,this._label.style.fontSize=.8*e.fontSize+"px"}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}afterRender(e){e||this.cancelInput(!0)}acceptInput(e){this._currentAcceptInput&&this._currentAcceptInput(e)}cancelInput(e){this._currentCancelInput&&this._currentCancelInput(e)}getInput(e,t,i,n,o,r){this._domNode.classList.toggle("preview",o),this._position=new u.L(e.startLineNumber,e.startColumn),this._input.value=t,this._input.setAttribute("selectionStart",i.toString()),this._input.setAttribute("selectionEnd",n.toString()),this._input.size=Math.max(1.1*(e.endColumn-e.startColumn),20);const s=new c.SL;return new Promise((e=>{this._currentCancelInput=t=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,e(t),!0),this._currentAcceptInput=i=>{0!==this._input.value.trim().length&&this._input.value!==t?(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,e({newName:this._input.value,wantsPreview:o&&i})):this.cancelInput(!0)},r.onCancellationRequested((()=>this.cancelInput(!0))),s.add(this._editor.onDidBlurEditorWidget((()=>this.cancelInput(!1)))),this._show()})).finally((()=>{s.dispose(),this._hide()}))}_show(){this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout((()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))}),100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};m=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([f(2,d.XE),f(3,g.d),f(4,r.i6)],m);var _=i(4101),v=i(5152),b=i(4314),y=i(2276),w=i(9925),C=i(9422),S=i(6007),x=i(666),k=i(1640),D=i(1050),L=i(5393),N=i(3557),E=i(2065),A=i(9872),M=i(3193),I=i(3187),T=i(8401),R=function(e,t){return function(i,n){t(i,n,e)}},O=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class F{constructor(e,t){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=_.G0.ordered(e)}hasProvider(){return this._providers.length>0}resolveRenameLocation(e){return O(this,void 0,void 0,(function*(){const t=[];for(this._providerRenameIdx=0;this._providerRenameIdx0?t.join("\n"):void 0}:{range:b.e.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join("\n"):void 0}}))}provideRenameEdits(e,t){return O(this,void 0,void 0,(function*(){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)}))}_provideRenameEdits(e,t,i,o){return O(this,void 0,void 0,(function*(){const r=this._providers[t];if(!r)return{edits:[],rejectReason:i.join("\n")};const s=yield r.provideRenameEdits(this.model,this.position,e,o);return s?s.rejectReason?this._provideRenameEdits(e,t+1,i.concat(s.rejectReason),o):s:this._provideRenameEdits(e,t+1,i.concat(n.N("no result","No result.")),o)}))}}function P(e,t,i){return O(this,void 0,void 0,(function*(){const n=new F(e,t),o=yield n.resolveRenameLocation(D.T.None);return(null==o?void 0:o.rejectReason)?{edits:[],rejectReason:o.rejectReason}:n.provideRenameEdits(i,D.T.None)}))}let B=class e{constructor(e,t,i,n,o,r,s){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=o,this._logService=r,this._configService=s,this._dispoableStore=new c.SL,this._cts=new D.A,this._renameInputField=this._dispoableStore.add(new L.Ue((()=>this._dispoableStore.add(this._instaService.createInstance(m,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"])))))}static get(t){return t.getContribution(e.ID)}dispose(){this._dispoableStore.dispose(),this._cts.dispose(!0)}run(){return O(this,void 0,void 0,(function*(){if(this._cts.dispose(!0),!this.editor.hasModel())return;const e=this.editor.getPosition(),t=new F(this.editor.getModel(),e);if(!t.hasProvider())return;let i;this._cts=new w.Dl(this.editor,5);try{const e=t.resolveRenameLocation(this._cts.token);this._progressService.showWhile(e,250),i=yield e}catch(t){return void y.O.get(this.editor).showMessage(t||n.N("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),e)}if(!i)return;if(i.rejectReason)return void y.O.get(this.editor).showMessage(i.rejectReason,e);if(this._cts.token.isCancellationRequested)return;this._cts.dispose(),this._cts=new w.Dl(this.editor,5,i.range);let o=this.editor.getSelection(),r=0,s=i.text.length;b.e.isEmpty(o)||b.e.spansMultipleLines(o)||!b.e.containsRange(i.range,o)||(r=Math.max(0,o.startColumn-i.range.startColumn),s=Math.min(i.range.endColumn,o.endColumn)-i.range.startColumn);const a=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),l=yield this._renameInputField.value.getInput(i.range,i.text,r,s,a,this._cts.token);if("boolean"==typeof l)return void(l&&this.editor.focus());this.editor.focus();const c=(0,L.eP)(t.provideRenameEdits(l.newName,this._cts.token),this._cts.token).then((e=>O(this,void 0,void 0,(function*(){e&&this.editor.hasModel()&&(e.rejectReason?this._notificationService.info(e.rejectReason):this._bulkEditService.apply(S.fo.convert(e),{editor:this.editor,showPreview:l.wantsPreview,label:n.N("label","Renaming '{0}'",null==i?void 0:i.text),quotableLabel:n.N("quotableLabel","Renaming {0}",null==i?void 0:i.text)}).then((e=>{e.ariaSummary&&(0,v.Z9)(n.N("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",i.text,l.newName,e.ariaSummary))})).catch((e=>{this._notificationService.error(n.N("rename.failedApply","Rename failed to apply edits")),this._logService.error(e)})))}))),(e=>{this._notificationService.error(n.N("rename.failed","Rename failed to compute edits")),this._logService.error(e)}));return this._progressService.showWhile(c,250),c}))}acceptRenameInput(e){this._renameInputField.value.acceptInput(e)}cancelRenameInput(){this._renameInputField.value.cancelInput(!0)}};B.ID="editor.contrib.renameController",B=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([R(1,E.TG),R(2,C.lT),R(3,S.vu),R(4,s.e),R(5,N.VZ),R(6,I.V)],B);class z extends a.R6{constructor(){super({id:"editor.action.rename",label:n.N("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:r.Ao.and(l.u.writable,l.u.hasRenameProvider),kbOpts:{kbExpr:l.u.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const i=e.get(k.$),[n,r]=Array.isArray(t)&&t||[void 0,void 0];return x.o.isUri(n)&&u.L.isIPosition(r)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(r),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),o.dL):super.runCommand(e,t)}run(e,t){const i=B.get(t);return i?i.run():Promise.resolve()}}(0,a._K)(B.ID,B),(0,a.Qr)(z);const W=a._l.bindToContribution(B.get);(0,a.fK)(new W({id:"acceptRenameInput",precondition:p,handler:e=>e.acceptRenameInput(!1),kbOpts:{weight:199,kbExpr:l.u.focus,primary:3}})),(0,a.fK)(new W({id:"acceptRenameInputWithPreview",precondition:r.Ao.and(p,r.Ao.has("config.editor.rename.enablePreview")),handler:e=>e.acceptRenameInput(!0),kbOpts:{weight:199,kbExpr:l.u.focus,primary:1027}})),(0,a.fK)(new W({id:"cancelRenameInput",precondition:p,handler:e=>e.cancelRenameInput(),kbOpts:{weight:199,kbExpr:l.u.focus,primary:9,secondary:[1033]}})),(0,a.sb)("_executeDocumentRenameProvider",(function(e,t,...i){const[n]=i;return(0,T.p_)("string"==typeof n),P(e,t,n)})),A.B.as(M.IP.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:n.N("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}})},689:(e,t,i)=>{"use strict";i.d(t,{x:()=>s});var n=i(187),o=i(4314),r=i(1741);class s{provideSelectionRanges(e,t){return i=this,n=void 0,r=function*(){const i=[];for(const n of t){const t=[];i.push(t);const o=new Map;yield new Promise((t=>s._bracketsRightYield(t,0,e,n,o))),yield new Promise((i=>s._bracketsLeftYield(i,0,e,n,o,t)))}return i},new((o=void 0)||(o=Promise))((function(e,t){function s(e){try{l(r.next(e))}catch(e){t(e)}}function a(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(s,a)}l((r=r.apply(i,n||[])).next())}));var i,n,o,r}static _bracketsRightYield(e,t,i,n,o){const a=new Map,l=Date.now();for(;;){if(t>=s._maxRounds){e();break}if(!n){e();break}let c=i.findNextBracket(n);if(!c){e();break}if(Date.now()-l>s._maxDuration){setTimeout((()=>s._bracketsRightYield(e,t+1,i,n,o)));break}const u=c.close[0];if(c.isOpen){let e=a.has(u)?a.get(u):0;a.set(u,e+1)}else{let e=a.has(u)?a.get(u):0;if(e-=1,a.set(u,Math.max(0,e)),e<0){let e=o.get(u);e||(e=new r.S,o.set(u,e)),e.push(c.range)}}n=c.range.getEndPosition()}}static _bracketsLeftYield(e,t,i,n,r,a){const l=new Map,c=Date.now();for(;;){if(t>=s._maxRounds&&0===r.size){e();break}if(!n){e();break}let u=i.findPrevBracket(n);if(!u){e();break}if(Date.now()-c>s._maxDuration){setTimeout((()=>s._bracketsLeftYield(e,t+1,i,n,r,a)));break}const h=u.close[0];if(u.isOpen){let e=l.has(h)?l.get(h):0;if(e-=1,l.set(h,Math.max(0,e)),e<0){let e=r.get(h);if(e){let t=e.shift();0===e.size&&r.delete(h);const n=o.e.fromPositions(u.range.getEndPosition(),t.getStartPosition()),l=o.e.fromPositions(u.range.getStartPosition(),t.getEndPosition());a.push({range:n}),a.push({range:l}),s._addBracketLeading(i,l,a)}}}else{let e=l.has(h)?l.get(h):0;l.set(h,e+1)}n=u.range.getStartPosition()}}static _addBracketLeading(e,t,i){if(t.startLineNumber===t.endLineNumber)return;const r=t.startLineNumber,s=e.getLineFirstNonWhitespaceColumn(r);0!==s&&s!==t.startColumn&&(i.push({range:o.e.fromPositions(new n.L(r,s),t.getEndPosition())}),i.push({range:o.e.fromPositions(new n.L(r,1),t.getEndPosition())}));const a=r-1;if(a>0){const r=e.getLineFirstNonWhitespaceColumn(a);r===t.startColumn&&r!==e.getLineLastNonWhitespaceColumn(a)&&(i.push({range:o.e.fromPositions(new n.L(a,r),t.getEndPosition())}),i.push({range:o.e.fromPositions(new n.L(a,1),t.getEndPosition())}))}}}s._maxDuration=30,s._maxRounds=2},1955:(e,t,i)=>{"use strict";i.r(t),i.d(t,{provideSelectionRanges:()=>w});var n=i(9488),o=i(1050),r=i(6830),s=i(187),a=i(4314),l=i(3860),c=i(9102),u=i(4101),h=i(3580),d=i(4144),g=i(7295),f=i(689),p=i(4565),m=i(7301),_=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class v{constructor(e,t){this.index=e,this.ranges=t}mov(e){let t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const i=new v(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}class b{constructor(e){this._editor=e,this._ignoreSelection=!1}static get(e){return e.getContribution(b.ID)}dispose(){var e;null===(e=this._selectionListener)||void 0===e||e.dispose()}run(e){return _(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),i=this._editor.getModel();if(!u.AC.has(i))return;if(this._state||(yield w(i,t.map((e=>e.getPosition())),this._editor.getOption(100),o.T.None).then((e=>{var i;if(n.Of(e)&&e.length===t.length&&this._editor.hasModel()&&n.fS(this._editor.getSelections(),t,((e,t)=>e.equalsSelection(t)))){for(let i=0;ie.containsPosition(t[i].getStartPosition())&&e.containsPosition(t[i].getEndPosition()))),e[i].unshift(t[i]);this._state=e.map((e=>new v(0,e))),null===(i=this._selectionListener)||void 0===i||i.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition((()=>{var e;this._ignoreSelection||(null===(e=this._selectionListener)||void 0===e||e.dispose(),this._state=void 0)}))}}))),!this._state)return;this._state=this._state.map((t=>t.mov(e)));const r=this._state.map((e=>l.Y.fromPositions(e.ranges[e.index].getStartPosition(),e.ranges[e.index].getEndPosition())));this._ignoreSelection=!0;try{this._editor.setSelections(r)}finally{this._ignoreSelection=!1}}))}}b.ID="editor.contrib.smartSelectController";class y extends r.R6{constructor(e,t){super(t),this._forward=e}run(e,t){return _(this,void 0,void 0,(function*(){let e=b.get(t);e&&(yield e.run(this._forward))}))}}function w(e,t,i,o){return _(this,void 0,void 0,(function*(){const r=u.AC.all(e);1===r.length&&r.unshift(new f.x);let l=[],c=[];for(const i of r)l.push(Promise.resolve(i.provideSelectionRanges(e,t,o)).then((e=>{if(n.Of(e)&&e.length===t.length)for(let i=0;i{if(0===t.length)return[];t.sort(((e,t)=>s.L.isBefore(e.getStartPosition(),t.getStartPosition())?1:s.L.isBefore(t.getStartPosition(),e.getStartPosition())||s.L.isBefore(e.getEndPosition(),t.getEndPosition())?-1:s.L.isBefore(t.getEndPosition(),e.getEndPosition())?1:0));let n,o=[];for(const e of t)(!n||a.e.containsRange(e,n)&&!a.e.equalsRange(e,n))&&(o.push(e),n=e);if(!i.selectLeadingAndTrailingWhitespace)return o;let r=[o[0]];for(let t=1;t=0;l--){let e=o.charCodeAt(l);if(l!==s&&(95===e||45===e))break;if((0,g.mK)(e)&&(0,g.df)(u))break;u=e}for(l+=1;c0&&0===t.getLineFirstNonWhitespaceColumn(i.lineNumber)&&0===t.getLineLastNonWhitespaceColumn(i.lineNumber)&&e.push({range:new a.e(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})}}),(0,r.f)("_executeSelectionRangeProvider",(function(e,...t){const[i]=t;return w(e,i,{selectLeadingAndTrailingWhitespace:!0},o.T.None)}))},3379:(e,t,i)=>{"use strict";i.r(t),i.d(t,{SnippetController2:()=>p});var n=i(5976),o=i(6830),r=i(4314),s=i(3860),a=i(9102),l=i(9599),c=i(8819),u=i(3557),h=i(7548),d=i(3580),g=function(e,t){return function(i,n){t(i,n,e)}};const f={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let p=class e{constructor(t,i,o){this._editor=t,this._logService=i,this._snippetListener=new n.SL,this._modelVersionId=-1,this._inSnippet=e.InSnippetMode.bindTo(o),this._hasNextTabstop=e.HasNextTabstop.bindTo(o),this._hasPrevTabstop=e.HasPrevTabstop.bindTo(o)}static get(t){return t.getContribution(e.ID)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),null===(e=this._session)||void 0===e||e.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,void 0===t?f:Object.assign(Object.assign({},f),t))}catch(t){this.cancel(),this._logService.error(t),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}}_doInsert(e,t){this._editor.hasModel()&&(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session?this._session.merge(e,t):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new h.l(this._editor,e,t),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent((e=>e.isFlush&&this.cancel()))),this._snippetListener.add(this._editor.onDidChangeModel((()=>this.cancel()))),this._snippetListener.add(this._editor.onDidChangeCursorSelection((()=>this._updateState()))))}_updateState(){if(this._session&&this._editor.hasModel()){if(this._modelVersionId===this._editor.getModel().getAlternativeVersionId())return this.cancel();if(!this._session.hasPlaceholder)return this.cancel();if(this._session.isAtLastPlaceholder||!this._session.isSelectionWithinPlaceholders())return this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){if(!this._session||!this._editor.hasModel())return void(this._currentChoice=void 0);const{choice:e}=this._session;if(e){if(this._currentChoice!==e){this._currentChoice=e,this._editor.setSelections(this._editor.getSelections().map((e=>s.Y.fromPositions(e.getStartPosition()))));const[t]=e.options;(0,l.i5)(this._editor,e.options.map(((e,i)=>({kind:13,label:e.value,insertText:e.value,sortText:"a".repeat(i+1),range:r.e.fromPositions(this._editor.getPosition(),this._editor.getPosition().delta(0,t.value.length))}))))}}else this._currentChoice=void 0}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var t;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),null===(t=this._session)||void 0===t||t.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){this._session&&this._session.prev(),this._updateState()}next(){this._session&&this._session.next(),this._updateState()}isInSnippet(){return Boolean(this._inSnippet.get())}};p.ID="snippetController2",p.InSnippetMode=new c.uy("inSnippetMode",!1,(0,d.N)("inSnippetMode","Whether the editor in current in snippet mode")),p.HasNextTabstop=new c.uy("hasNextTabstop",!1,(0,d.N)("hasNextTabstop","Whether there is a next tab stop when in snippet mode")),p.HasPrevTabstop=new c.uy("hasPrevTabstop",!1,(0,d.N)("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode")),p=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([g(1,u.VZ),g(2,c.i6)],p),(0,o._K)(p.ID,p);const m=o._l.bindToContribution(p.get);(0,o.fK)(new m({id:"jumpToNextSnippetPlaceholder",precondition:c.Ao.and(p.InSnippetMode,p.HasNextTabstop),handler:e=>e.next(),kbOpts:{weight:130,kbExpr:a.u.editorTextFocus,primary:2}})),(0,o.fK)(new m({id:"jumpToPrevSnippetPlaceholder",precondition:c.Ao.and(p.InSnippetMode,p.HasPrevTabstop),handler:e=>e.prev(),kbOpts:{weight:130,kbExpr:a.u.editorTextFocus,primary:1026}})),(0,o.fK)(new m({id:"leaveSnippet",precondition:p.InSnippetMode,handler:e=>e.cancel(!0),kbOpts:{weight:130,kbExpr:a.u.editorTextFocus,primary:9,secondary:[1033]}})),(0,o.fK)(new m({id:"acceptSnippet",precondition:p.InSnippetMode,handler:e=>e.finish()}))},3472:(e,t,i)=>{"use strict";i.d(t,{xv:()=>r,Vm:()=>a,Lv:()=>l,Yj:()=>f});class n{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return 95===e||e>=97&&e<=122||e>=65&&e<=90}text(e){this.value=e,this.pos=0}tokenText(e){return this.value.substr(e.pos,e.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};let e,t=this.pos,i=0,o=this.value.charCodeAt(t);if(e=n._table[o],"number"==typeof e)return this.pos+=1,{type:e,pos:t,len:1};if(n.isDigitCharacter(o)){e=8;do{i+=1,o=this.value.charCodeAt(t+i)}while(n.isDigitCharacter(o));return this.pos+=i,{type:e,pos:t,len:i}}if(n.isVariableCharacter(o)){e=9;do{o=this.value.charCodeAt(t+ ++i)}while(n.isVariableCharacter(o)||n.isDigitCharacter(o));return this.pos+=i,{type:e,pos:t,len:i}}e=10;do{i+=1,o=this.value.charCodeAt(t+i)}while(!isNaN(o)&&void 0===n._table[o]&&!n.isDigitCharacter(o)&&!n.isVariableCharacter(o));return this.pos+=i,{type:e,pos:t,len:i}}}n._table={36:0,58:1,44:2,123:3,125:4,92:5,47:6,124:7,43:11,45:12,63:13};class o{constructor(){this._children=[]}appendChild(e){return e instanceof r&&this._children[this._children.length-1]instanceof r?this._children[this._children.length-1].value+=e.value:(e.parent=this,this._children.push(e)),this}replace(e,t){const{parent:i}=e,n=i.children.indexOf(e),o=i.children.slice(0);o.splice(n,1,...t),i._children=o,function e(t,i){for(const n of t)n.parent=i,e(n.children,n)}(t,i)}get children(){return this._children}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof g)return e;e=e.parent}}toString(){return this.children.reduce(((e,t)=>e+t.toString()),"")}len(){return 0}}class r extends o{constructor(e){super(),this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new r(this.value)}}class s extends o{}class a extends s{constructor(e){super(),this.index=e}static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.indext.index?1:0}get isFinalTabstop(){return 0===this.index}get choice(){return 1===this._children.length&&this._children[0]instanceof l?this._children[0]:void 0}clone(){let e=new a(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}class l extends o{constructor(){super(...arguments),this.options=[]}appendChild(e){return e instanceof r&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){let e=new l;return this.options.forEach(e.appendChild,e),e}}class c extends o{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(e){const t=this;let i=!1,n=e.replace(this.regexp,(function(){return i=!0,t._replace(Array.prototype.slice.call(arguments,0,-2))}));return!i&&this._children.some((e=>e instanceof u&&Boolean(e.elseValue)))&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof u){let n=e[i.index]||"";n=i.resolve(n),t+=n}else t+=i.toString();return t}toString(){return""}clone(){let e=new c;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map((e=>e.clone())),e}}class u extends o{constructor(e,t,i,n){super(),this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=n}resolve(e){return"upcase"===this.shorthandName?e?e.toLocaleUpperCase():"":"downcase"===this.shorthandName?e?e.toLocaleLowerCase():"":"capitalize"===this.shorthandName?e?e[0].toLocaleUpperCase()+e.substr(1):"":"pascalcase"===this.shorthandName?e?this._toPascalCase(e):"":Boolean(e)&&"string"==typeof this.ifValue?this.ifValue:Boolean(e)||"string"!=typeof this.elseValue?e||"":this.elseValue}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase())).join(""):e}clone(){return new u(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class h extends s{constructor(e){super(),this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),void 0!==t&&(this._children=[new r(t)],!0)}clone(){const e=new h(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map((e=>e.clone())),e}}function d(e,t){const i=[...e];for(;i.length>0;){const e=i.shift();if(!t(e))break;i.unshift(...e.children)}}class g extends o{get placeholderInfo(){if(!this._placeholders){let e,t=[];this.walk((function(i){return i instanceof a&&(t.push(i),e=!e||e.indexn===e?(i=!0,!1):(t+=n.len(),!0))),i?t:-1}fullLen(e){let t=0;return d([e],(e=>(t+=e.len(),!0))),t}enclosingPlaceholders(e){let t=[],{parent:i}=e;for(;i;)i instanceof a&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk((t=>(t instanceof h&&t.resolve(e)&&(this._placeholders=void 0),!0))),this}appendChild(e){return this._placeholders=void 0,super.appendChild(e)}replace(e,t){return this._placeholders=void 0,super.replace(e,t)}clone(){let e=new g;return this._children=this.children.map((e=>e.clone())),e}walk(e){d(this.children,e)}}class f{constructor(){this._scanner=new n,this._token={type:14,pos:0,len:0}}static escape(e){return e.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(e){return/\${?CLIPBOARD/.test(e)}parse(e,t,i){this._scanner.text(e),this._token=this._scanner.next();const n=new g;for(;this._parse(n););const o=new Map,r=[];let s=0;n.walk((e=>(e instanceof a&&(s+=1,e.isFinalTabstop?o.set(0,void 0):!o.has(e.index)&&e.children.length>0?o.set(e.index,e.children):r.push(e)),!0)));for(const e of r){const t=o.get(e.index);if(t){const i=new a(e.index);i.transform=e.transform;for(const e of t)i.appendChild(e.clone());n.replace(e,[i])}}return i||(i=s>0&&t),!o.has(0)&&i&&n.appendChild(new a(0)),n}_accept(e,t){if(void 0===e||this._token.type===e){let e=!t||this._scanner.tokenText(this._token);return this._token=this._scanner.next(),e}return!1}_backTo(e){return this._scanner.pos=e.pos+e.len,this._token=e,!1}_until(e){const t=this._token;for(;this._token.type!==e;){if(14===this._token.type)return!1;if(5===this._token.type){const e=this._scanner.next();if(0!==e.type&&4!==e.type&&5!==e.type)return!1}this._token=this._scanner.next()}const i=this._scanner.value.substring(t.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),i}_parse(e){return this._parseEscaped(e)||this._parseTabstopOrVariableName(e)||this._parseComplexPlaceholder(e)||this._parseComplexVariable(e)||this._parseAnything(e)}_parseEscaped(e){let t;return!!(t=this._accept(5,!0))&&(t=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||t,e.appendChild(new r(t)),!0)}_parseTabstopOrVariableName(e){let t;const i=this._token;return this._accept(0)&&(t=this._accept(9,!0)||this._accept(8,!0))?(e.appendChild(/^\d+$/.test(t)?new a(Number(t)):new h(t)),!0):this._backTo(i)}_parseComplexPlaceholder(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(8,!0))))return this._backTo(i);const n=new a(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new r("${"+t+":")),n.children.forEach(e.appendChild,e),!0}else{if(!(n.index>0&&this._accept(7)))return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i);{const t=new l;for(;;){if(this._parseChoiceElement(t)){if(this._accept(2))continue;if(this._accept(7)&&(n.appendChild(t),this._accept(4)))return e.appendChild(n),!0}return this._backTo(i),!1}}}}_parseChoiceElement(e){const t=this._token,i=[];for(;2!==this._token.type&&7!==this._token.type;){let e;if(e=(e=this._accept(5,!0))?this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||e:this._accept(void 0,!0),!e)return this._backTo(t),!1;i.push(e)}return 0===i.length?(this._backTo(t),!1):(e.appendChild(new r(i.join(""))),!0)}_parseComplexVariable(e){let t;const i=this._token;if(!(this._accept(0)&&this._accept(3)&&(t=this._accept(9,!0))))return this._backTo(i);const n=new h(t);if(!this._accept(1))return this._accept(6)?this._parseTransform(n)?(e.appendChild(n),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(n),!0):this._backTo(i);for(;;){if(this._accept(4))return e.appendChild(n),!0;if(!this._parse(n))return e.appendChild(new r("${"+t+":")),n.children.forEach(e.appendChild,e),!0}}_parseTransform(e){let t=new c,i="",n="";for(;!this._accept(6);){let e;if(e=this._accept(5,!0))e=this._accept(6,!0)||e,i+=e;else{if(14===this._token.type)return!1;i+=this._accept(void 0,!0)}}for(;!this._accept(6);){let e;if(e=this._accept(5,!0))e=this._accept(5,!0)||this._accept(6,!0)||e,t.appendChild(new r(e));else if(!this._parseFormatString(t)&&!this._parseAnything(t))return!1}for(;!this._accept(4);){if(14===this._token.type)return!1;n+=this._accept(void 0,!0)}try{t.regexp=new RegExp(i,n)}catch(e){return!1}return e.transform=t,!0}_parseFormatString(e){const t=this._token;if(!this._accept(0))return!1;let i=!1;this._accept(3)&&(i=!0);let n=this._accept(8,!0);if(!n)return this._backTo(t),!1;if(!i)return e.appendChild(new u(Number(n))),!0;if(this._accept(4))return e.appendChild(new u(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1;if(this._accept(6)){let i=this._accept(9,!0);return i&&this._accept(4)?(e.appendChild(new u(Number(n),i)),!0):(this._backTo(t),!1)}if(this._accept(11)){let t=this._until(4);if(t)return e.appendChild(new u(Number(n),void 0,t,void 0)),!0}else if(this._accept(12)){let t=this._until(4);if(t)return e.appendChild(new u(Number(n),void 0,void 0,t)),!0}else if(this._accept(13)){let t=this._until(1);if(t){let i=this._until(4);if(i)return e.appendChild(new u(Number(n),void 0,t,i)),!0}}else{let t=this._until(4);if(t)return e.appendChild(new u(Number(n),void 0,void 0,t)),!0}return this._backTo(t),!1}_parseAnything(e){return 14!==this._token.type&&(e.appendChild(new r(this._scanner.tokenText(this._token))),this._accept(void 0),!0)}}},7548:(e,t,i)=>{"use strict";i.d(t,{l:()=>P});var n=i(9488),o=i(5976),r=i(7295),s=i(9386),a=i(4314),l=i(3860),c=i(3411),u=i(382),h=i(2065),d=i(3472),g=i(3580),f=i(8721),p=i(5935),m=i(3831),_=i(666);const v="code-workspace";function b(e){const t=e;return"string"==typeof(null==t?void 0:t.id)&&_.o.isUri(t.uri)}var y=i(8843);const w=new Uint8Array(16),C=[];for(let e=0;e<256;e++)C.push(e.toString(16).padStart(2,"0"));let S;S="object"==typeof crypto&&"function"==typeof crypto.getRandomValues?crypto.getRandomValues.bind(crypto):function(e){for(let t=0;tt!==e&&(t instanceof d.xv&&(o=(0,r.V8)((0,r.uq)(t.value).pop())),!0)));const s=(0,r.Mh)(o,n);t=t.replace(/(\r\n|\r|\n)(.*)/g,((e,t,i)=>`${t}${o.substr(s)}${i}`))}return t}if("TM_CURRENT_LINE"===t)return this._model.getLineContent(this._selection.positionLineNumber);if("TM_CURRENT_WORD"===t){const e=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return e&&e.word||void 0}return"TM_LINE_INDEX"===t?String(this._selection.positionLineNumber-1):"TM_LINE_NUMBER"===t?String(this._selection.positionLineNumber):void 0}}class D{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if("TM_FILENAME"===t)return f.EZ(this._model.uri.fsPath);if("TM_FILENAME_BASE"===t){const e=f.EZ(this._model.uri.fsPath),t=e.lastIndexOf(".");return t<=0?e:e.slice(0,t)}return"TM_DIRECTORY"===t&&this._labelService?"."===f.XX(this._model.uri.fsPath)?"":this._labelService.getUriLabel((0,p.XX)(this._model.uri)):"TM_FILEPATH"===t&&this._labelService?this._labelService.getUriLabel(this._model.uri):"RELATIVE_FILEPATH"===t&&this._labelService?this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0}):void 0}}class L{constructor(e,t,i,n){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=i,this._spread=n}resolve(e){if("CLIPBOARD"!==e.name)return;const t=this._readClipboardText();if(t){if(this._spread){const e=t.split(/\r\n|\n|\r/).filter((e=>!(0,r.m5)(e)));if(e.length===this._selectionCount)return e[this._selectionIdx]}return t}}}class N{constructor(e,t){this._model=e,this._selection=t}resolve(e){const{name:t}=e,i=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),n=m.zu.getComments(i);if(n)return"LINE_COMMENT"===t?n.lineCommentToken||void 0:"BLOCK_COMMENT_START"===t?n.blockCommentStartToken||void 0:"BLOCK_COMMENT_END"===t&&n.blockCommentEndToken||void 0}}class E{resolve(e){const{name:t}=e;return"CURRENT_YEAR"===t?String((new Date).getFullYear()):"CURRENT_YEAR_SHORT"===t?String((new Date).getFullYear()).slice(-2):"CURRENT_MONTH"===t?String((new Date).getMonth().valueOf()+1).padStart(2,"0"):"CURRENT_DATE"===t?String((new Date).getDate().valueOf()).padStart(2,"0"):"CURRENT_HOUR"===t?String((new Date).getHours().valueOf()).padStart(2,"0"):"CURRENT_MINUTE"===t?String((new Date).getMinutes().valueOf()).padStart(2,"0"):"CURRENT_SECOND"===t?String((new Date).getSeconds().valueOf()).padStart(2,"0"):"CURRENT_DAY_NAME"===t?E.dayNames[(new Date).getDay()]:"CURRENT_DAY_NAME_SHORT"===t?E.dayNamesShort[(new Date).getDay()]:"CURRENT_MONTH_NAME"===t?E.monthNames[(new Date).getMonth()]:"CURRENT_MONTH_NAME_SHORT"===t?E.monthNamesShort[(new Date).getMonth()]:"CURRENT_SECONDS_UNIX"===t?String(Math.floor(Date.now()/1e3)):void 0}}E.dayNames=[g.N("Sunday","Sunday"),g.N("Monday","Monday"),g.N("Tuesday","Tuesday"),g.N("Wednesday","Wednesday"),g.N("Thursday","Thursday"),g.N("Friday","Friday"),g.N("Saturday","Saturday")],E.dayNamesShort=[g.N("SundayShort","Sun"),g.N("MondayShort","Mon"),g.N("TuesdayShort","Tue"),g.N("WednesdayShort","Wed"),g.N("ThursdayShort","Thu"),g.N("FridayShort","Fri"),g.N("SaturdayShort","Sat")],E.monthNames=[g.N("January","January"),g.N("February","February"),g.N("March","March"),g.N("April","April"),g.N("May","May"),g.N("June","June"),g.N("July","July"),g.N("August","August"),g.N("September","September"),g.N("October","October"),g.N("November","November"),g.N("December","December")],E.monthNamesShort=[g.N("JanuaryShort","Jan"),g.N("FebruaryShort","Feb"),g.N("MarchShort","Mar"),g.N("AprilShort","Apr"),g.N("MayShort","May"),g.N("JuneShort","Jun"),g.N("JulyShort","Jul"),g.N("AugustShort","Aug"),g.N("SeptemberShort","Sep"),g.N("OctoberShort","Oct"),g.N("NovemberShort","Nov"),g.N("DecemberShort","Dec")];class A{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const t=function(e){return e.configuration?{id:e.id,configPath:e.configuration}:1===e.folders.length?{id:e.id,uri:e.folders[0].uri}:void 0}(this._workspaceService.getWorkspace());return t?"WORKSPACE_NAME"===e.name?this._resolveWorkspaceName(t):"WORKSPACE_FOLDER"===e.name?this._resoveWorkspacePath(t):void 0:void 0}_resolveWorkspaceName(e){if(b(e))return f.EZ(e.uri.path);let t=f.EZ(e.configPath.path);return t.endsWith(v)&&(t=t.substr(0,t.length-v.length-1)),t}_resoveWorkspacePath(e){if(b(e))return(0,y.D)(e.uri.fsPath);let t=f.EZ(e.configPath.path),i=e.configPath.fsPath;return i.endsWith(t)&&(i=i.substr(0,i.length-t.length-1)),i?(0,y.D)(i):"/"}}class M{resolve(e){const{name:t}=e;return"RANDOM"===t?Math.random().toString().slice(-6):"RANDOM_HEX"===t?Math.random().toString(16).slice(-6):"UUID"===t?function(){S(w),w[6]=15&w[6]|64,w[8]=63&w[8]|128;let e=0,t="";return t+=C[w[e++]],t+=C[w[e++]],t+=C[w[e++]],t+=C[w[e++]],t+="-",t+=C[w[e++]],t+=C[w[e++]],t+="-",t+=C[w[e++]],t+=C[w[e++]],t+="-",t+=C[w[e++]],t+=C[w[e++]],t+="-",t+=C[w[e++]],t+=C[w[e++]],t+=C[w[e++]],t+=C[w[e++]],t+=C[w[e++]],t+=C[w[e++]],t}():void 0}}var I=i(7781),T=i(3910),R=i(4349);(0,I.Ic)(((e,t)=>{function i(t){const i=e.getColor(t);return i?i.toString():"transparent"}t.addRule(`.monaco-editor .snippet-placeholder { background-color: ${i(T.u2)}; outline-color: ${i(T.Pk)}; }`),t.addRule(`.monaco-editor .finish-snippet-placeholder { background-color: ${i(T.I1)}; outline-color: ${i(T.U6)}; }`)}));class O{constructor(e,t,i,o){this._editor=e,this._snippet=t,this._offset=i,this._snippetLineLeadingWhitespace=o,this._nestingLevel=1,this._placeholderGroups=(0,n.vM)(t.placeholders,d.Vm.compareByIndex),this._placeholderGroupsIdx=-1}dispose(){this._placeholderDecorations&&this._editor.deltaDecorations([...this._placeholderDecorations.values()],[]),this._placeholderGroups.length=0}_initDecorations(){if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const e=this._editor.getModel();this._editor.changeDecorations((t=>{for(const i of this._snippet.placeholders){const n=this._snippet.offset(i),o=this._snippet.fullLen(i),r=a.e.fromPositions(e.getPositionAt(this._offset+n),e.getPositionAt(this._offset+n+o)),s=i.isFinalTabstop?O._decor.inactiveFinal:O._decor.inactive,l=t.addDecoration(r,s);this._placeholderDecorations.set(i,l)}}))}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){let e=[];for(const t of this._placeholderGroups[this._placeholderGroupsIdx])if(t.transform){const i=this._placeholderDecorations.get(t),n=this._editor.getModel().getDecorationRange(i),o=this._editor.getModel().getValueInRange(n),r=t.transform.resolve(o).split(/\r\n|\r|\n/);for(let e=1;e0&&this._editor.executeEdits("snippet.placeholderTransform",e)}let t=!1;!0===e&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,t=!0);const i=this._editor.getModel().changeDecorations((e=>{const i=new Set,n=[];for(const o of this._placeholderGroups[this._placeholderGroupsIdx]){const r=this._placeholderDecorations.get(o),s=this._editor.getModel().getDecorationRange(r);n.push(new l.Y(s.startLineNumber,s.startColumn,s.endLineNumber,s.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(o),e.changeDecorationOptions(r,o.isFinalTabstop?O._decor.activeFinal:O._decor.active),i.add(o);for(const t of this._snippet.enclosingPlaceholders(o)){const n=this._placeholderDecorations.get(t);e.changeDecorationOptions(n,t.isFinalTabstop?O._decor.activeFinal:O._decor.active),i.add(t)}}for(const[t,n]of this._placeholderDecorations)i.has(t)||e.changeDecorationOptions(n,t.isFinalTabstop?O._decor.inactiveFinal:O._decor.inactive);return n}));return t?this.move(e):null!=i?i:[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof d.Vm){const e=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(e).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||0===this._placeholderGroups.length}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}computePossibleSelections(){const e=new Map;for(const t of this._placeholderGroups){let i;for(const n of t){if(n.isFinalTabstop)break;i||(i=[],e.set(n.index,i));const t=this._placeholderDecorations.get(n),o=this._editor.getModel().getDecorationRange(t);if(!o){e.delete(n.index);break}i.push(o)}}return e}get choice(){return this._placeholderGroups[this._placeholderGroupsIdx][0].choice}merge(e){const t=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations((i=>{for(const n of this._placeholderGroups[this._placeholderGroupsIdx]){const o=e.shift();console.assert(!o._placeholderDecorations);const r=o._snippet.placeholderInfo.last.index;for(const e of o._snippet.placeholderInfo.all)e.isFinalTabstop?e.index=n.index+(r+1)/this._nestingLevel:e.index=n.index+e.index/this._nestingLevel;this._snippet.replace(n,o._snippet.children);const s=this._placeholderDecorations.get(n);i.removeDecoration(s),this._placeholderDecorations.delete(n);for(const e of o._snippet.placeholders){const n=o._snippet.offset(e),r=o._snippet.fullLen(e),s=a.e.fromPositions(t.getPositionAt(o._offset+n),t.getPositionAt(o._offset+n+r)),l=i.addDecoration(s,O._decor.inactive);this._placeholderDecorations.set(e,l)}}this._placeholderGroups=(0,n.vM)(this._snippet.placeholders,d.Vm.compareByIndex)}))}}O._decor={active:c.qx.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:c.qx.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:c.qx.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:c.qx.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};const F={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};class P{constructor(e,t,i=F){this._templateMerges=[],this._snippets=[],this._editor=e,this._template=t,this._options=i}static adjustWhitespace(e,t,i,n,o){const s=e.getLineContent(t.lineNumber),a=(0,r.V8)(s,0,t.column-1);let l;return i.walk((t=>{if(!(t instanceof d.xv)||t.parent instanceof d.Lv)return!0;const o=t.value.split(/\r\n|\r|\n/);if(n){const n=i.offset(t);if(0===n)o[0]=e.normalizeIndentation(o[0]);else{l=null!=l?l:i.toString();let t=l.charCodeAt(n-1);10!==t&&13!==t||(o[0]=e.normalizeIndentation(a+o[0]))}for(let t=1;te.get(u.ec,h.jt))),_=e.invokeWithinContext((e=>new D(e.get(R.e,h.jt),p))),v=()=>l;let b=0,y=p.getValueInRange(P.adjustSelection(p,e.getSelection(),i,0)),w=p.getValueInRange(P.adjustSelection(p,e.getSelection(),0,n)),C=p.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber);const S=e.getSelections().map(((e,t)=>({selection:e,idx:t}))).sort(((e,t)=>a.e.compareRangesUsingStarts(e.selection,t.selection)));for(const{selection:a,idx:l}of S){let u=P.adjustSelection(p,a,i,0),h=P.adjustSelection(p,a,0,n);y!==p.getValueInRange(u)&&(u=a),w!==p.getValueInRange(h)&&(h=a);const D=a.setStartPosition(u.startLineNumber,u.startColumn).setEndPosition(h.endLineNumber,h.endColumn),I=(new d.Yj).parse(t,!0,o),T=D.getStartPosition(),R=P.adjustWhitespace(p,T,I,r||l>0&&C!==p.getLineFirstNonWhitespaceColumn(a.positionLineNumber),!0);I.resolveVariables(new x([_,new L(v,l,S.length,"spread"===e.getOption(68)),new k(p,a,l,c),new N(p,a),new E,new A(m),new M]));const F=p.getOffsetAt(T)+b;b+=I.toString().length-p.getValueLengthInRange(D),g[l]=s.h.replace(D,I.toString()),g[l].identifier={major:l,minor:0},f[l]=new O(e,I,F,R)}return{edits:g,snippets:f}}dispose(){(0,o.B9)(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:e,snippets:t}=P.createEditsAndSnippets(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer);this._snippets=t,this._editor.executeEdits("snippet",e,(e=>this._snippets[0].hasPlaceholder?this._move(!0):e.filter((e=>!!e.identifier)).map((e=>l.Y.fromPositions(e.range.getEndPosition()))))),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=F){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:i,snippets:n}=P.createEditsAndSnippets(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer);this._editor.executeEdits("snippet",i,(e=>{for(const e of this._snippets)e.merge(n);return console.assert(0===n.length),this._snippets[0].hasPlaceholder?this._move(void 0):e.filter((e=>!!e.identifier)).map((e=>l.Y.fromPositions(e.range.getEndPosition())))}))}next(){const e=this._move(!0);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}prev(){const e=this._move(!1);this._editor.setSelections(e),this._editor.revealPositionInCenterIfOutsideViewport(e[0].getPosition())}_move(e){const t=[];for(const i of this._snippets){const n=i.move(e);t.push(...n)}return t}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get choice(){return this._snippets[0].choice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const e=this._editor.getSelections();if(e.length{e.push(...n.get(t))}))}e.sort(a.e.compareRangesUsingStarts);for(let[i,n]of t)if(n.length===e.length){n.sort(a.e.compareRangesUsingStarts);for(let o=0;o0}}},9599:(e,t,i)=>{"use strict";i.d(t,{_y:()=>y,GI:()=>w,A9:()=>S,ZJ:()=>x,kL:()=>D,wg:()=>E,i5:()=>M});var n=i(7301),o=i(4101),r=i(187),s=i(8819),a=i(1050),l=i(4314),c=i(5392),u=i(5976),h=i(4144),d=i(3472),g=i(4013),f=i(4565),p=i(8401),m=i(666),_=i(8216),v=i(3580),b=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const y={Visible:new s.uy("suggestWidgetVisible",!1,(0,v.N)("suggestWidgetVisible","Whether suggestion are visible")),DetailsVisible:new s.uy("suggestWidgetDetailsVisible",!1,(0,v.N)("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new s.uy("suggestWidgetMultipleSuggestions",!1,(0,v.N)("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new s.uy("suggestionMakesTextEdit",!0,(0,v.N)("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new s.uy("acceptSuggestionOnEnter",!0,(0,v.N)("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new s.uy("suggestionHasInsertAndReplaceRange",!1,(0,v.N)("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new s.uy("suggestionInsertMode",void 0,{type:"string",description:(0,v.N)("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new s.uy("suggestionCanResolve",!1,(0,v.N)("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},w=new h.eH("suggestWidgetStatusBar");class C{constructor(e,t,i,n){this.position=e,this.completion=t,this.container=i,this.provider=n,this.isInvalid=!1,this.score=c.CL.Default,this.distance=0,this.textLabel="string"==typeof t.label?t.label:t.label.name,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),l.e.isIRange(t.range)?(this.editStart=new r.L(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new r.L(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new r.L(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||l.e.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new r.L(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new r.L(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new r.L(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||l.e.spansMultipleLines(t.range.insert)||l.e.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),"function"!=typeof n.resolveCompletionItem&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(e){return b(this,void 0,void 0,(function*(){if(!this._resolveCache){const t=e.onCancellationRequested((()=>{this._resolveCache=void 0,this._isResolved=!1}));this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then((e=>{Object.assign(this.completion,e),this._isResolved=!0,t.dispose()}),(e=>{(0,n.VV)(e)&&(this._resolveCache=void 0,this._isResolved=!1)}))}return this._resolveCache}))}}class S{constructor(e=2,t=new Set,i=new Set,n=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=i,this.showDeprecated=n}}function x(){}S.default=new S;class k{constructor(e,t,i,n){this.items=e,this.needsClipboard=t,this.durations=i,this.disposable=n}}function D(e,t,i=S.default,r={triggerKind:0},s=a.T.None){return b(this,void 0,void 0,(function*(){const a=new g.G(!0);t=t.clone();const c=e.getWordAtPosition(t),h=c?new l.e(t.lineNumber,c.startColumn,t.lineNumber,c.endColumn):l.e.fromPositions(t),f={replace:h,insert:h.setEndPosition(t.lineNumber,t.column)},p=[],m=new u.SL,_=[];let v=!1;const y=(e,n,o)=>{var r,s,a;if(n){for(let o of n.suggestions)if(!i.kindFilter.has(o.kind)){if(!i.showDeprecated&&(null===(r=null==o?void 0:o.tags)||void 0===r?void 0:r.includes(1)))continue;o.range||(o.range=f),o.sortText||(o.sortText="string"==typeof o.label?o.label:o.label.name),!v&&o.insertTextRules&&4&o.insertTextRules&&(v=d.Yj.guessNeedsClipboard(o.insertText)),p.push(new C(t,o,n,e))}(0,u.Wf)(n)&&m.add(n),_.push({providerName:null!==(s=e._debugDisplayName)&&void 0!==s?s:"unkown_provider",elapsedProvider:null!==(a=n.duration)&&void 0!==a?a:-1,elapsedOverall:o.elapsed()})}},w=(()=>b(this,void 0,void 0,(function*(){})))();for(let a of o.KZ.orderedGroups(e)){let o=p.length;if(yield Promise.all(a.map((o=>b(this,void 0,void 0,(function*(){if(!(i.providerFilter.size>0)||i.providerFilter.has(o))try{const i=new g.G(!0),n=yield o.provideCompletionItems(e,t,r,s);y(o,n,i)}catch(e){(0,n.Cp)(e)}}))))),o!==p.length||s.isCancellationRequested)break}return yield w,s.isCancellationRequested?(m.dispose(),Promise.reject((0,n.F0)())):new k(p.sort(E(i.snippetSortOrder)),v,{entries:_,elapsed:a.elapsed()},m)}))}function L(e,t){if(e.sortTextLow&&t.sortTextLow){if(e.sortTextLowt.sortTextLow)return 1}return e.completion.labelt.completion.label?1:e.completion.kind-t.completion.kind}const N=new Map;function E(e){return N.get(e)}N.set(0,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return L(e,t)})),N.set(2,(function(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return L(e,t)})),N.set(1,L),f.P.registerCommand("_executeCompletionItemProvider",((e,...t)=>b(void 0,void 0,void 0,(function*(){const[i,n,o,s]=t;(0,p.p_)(m.o.isUri(i)),(0,p.p_)(r.L.isIPosition(n)),(0,p.p_)("string"==typeof o||!o),(0,p.p_)("number"==typeof s||!s);const l=yield e.get(_.S).createModelReference(i);try{const e={incomplete:!1,suggestions:[]},t=[],i=yield D(l.object.textEditorModel,r.L.lift(n),void 0,{triggerCharacter:o,triggerKind:o?1:0});for(const n of i.items)t.length<(null!=s?s:0)&&t.push(n.resolve(a.T.None)),e.incomplete=e.incomplete||n.container.incomplete,e.suggestions.push(n.completion);try{return yield Promise.all(t),e}finally{setTimeout((()=>i.disposable.dispose()),100)}}finally{l.dispose()}}))));const A=new class{constructor(){this.onlyOnceSuggestions=[]}provideCompletionItems(){let e={suggestions:this.onlyOnceSuggestions.slice(0)};return this.onlyOnceSuggestions.length=0,e}};function M(e,t){setTimeout((()=>{A.onlyOnceSuggestions.push(...t),e.getContribution("editor.contrib.suggestController").triggerSuggest((new Set).add(A))}),0)}o.KZ.register("*",A)},8250:(e,t,i)=>{"use strict";i.r(t),i.d(t,{SuggestController:()=>it,TriggerSuggestAction:()=>nt});var n=i(5152),o=i(9488),r=i(7301),s=i(2258),a=i(5976),l=i(9925),c=i(6830),u=i(9386),h=i(4314),d=i(9102),g=i(3379),f=i(3472),p=i(3702),m=i(6904),_=i(4101),v=i(5393),b=i(2065),y=i(3108),w=i(5026),C=i(1531),S=function(e,t){return function(i,n){t(i,n,e)}};class x{constructor(e){this.name=e}select(e,t,i){if(0===i.length)return 0;let n=i[0].score[0];for(let e=0;ethis._saveState()),500),this._disposables.add(e.onWillSaveState((e=>{e.reason===m.fk.SHUTDOWN&&this._saveState()})))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(e,t,i){this._withStrategy(e,t).memorize(e,t,i),this._persistSoon.schedule()}select(e,t,i){return this._withStrategy(e,t).select(e,t,i)}_withStrategy(t,i){var n,o;const r=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:null===(n=this._modeService.getLanguageIdentifier(t.getLanguageIdAtPosition(i.lineNumber,i.column)))||void 0===n?void 0:n.language,resource:t.uri});if((null===(o=this._strategy)||void 0===o?void 0:o.name)!==r){this._saveState();const t=e._strategyCtors.get(r)||k;this._strategy=new t;try{const t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,i=this._storageService.get(`${e._storagePrefix}/${r}`,t);i&&this._strategy.fromJSON(JSON.parse(i))}catch(e){}}return this._strategy}_saveState(){if(this._strategy){const t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,i=JSON.stringify(this._strategy);this._storageService.store(`${e._storagePrefix}/${this._strategy.name}`,i,t,1)}}};D._strategyCtors=new Map([["recentlyUsedByPrefix",class extends x{constructor(){super("recentlyUsedByPrefix"),this._trie=p.Id.forStrings(),this._seq=0}memorize(e,t,i){const{word:n}=e.getWordUntilPosition(t),o=`${e.getLanguageIdentifier().language}/${n}`;this._trie.set(o,{type:i.completion.kind,insertText:i.completion.insertText,touch:this._seq++})}select(e,t,i){let{word:n}=e.getWordUntilPosition(t);if(!n)return super.select(e,t,i);let o=`${e.getLanguageIdentifier().language}/${n}`,r=this._trie.get(o);if(r||(r=this._trie.findSubstr(o)),r)for(let e=0;ee.push([i,t]))),e.sort(((e,t)=>-(e[1].touch-t[1].touch))).forEach(((e,t)=>e[1].touch=t)),e.slice(0,200)}fromJSON(e){if(this._trie.clear(),e.length>0){this._seq=e[0][1].touch+1;for(const[t,i]of e)i.type="number"==typeof i.type?i.type:(0,_.jr)(i.type),this._trie.set(t,i)}}}],["recentlyUsed",class extends x{constructor(){super("recentlyUsed"),this._cache=new p.z6(300,.66),this._seq=0}memorize(e,t,i){const n=`${e.getLanguageIdentifier().language}/${i.textLabel}`;this._cache.set(n,{touch:this._seq++,type:i.completion.kind,insertText:i.completion.insertText})}select(e,t,i){if(0===i.length)return 0;const n=e.getLineContent(t.lineNumber).substr(t.column-10,t.column-1);if(/\s$/.test(n))return super.select(e,t,i);let o=i[0].score[0],r=-1,s=-1;for(let t=0;ts&&o.type===i[t].completion.kind&&o.insertText===i[t].completion.insertText&&(s=o.touch,r=t),i[t].completion.preselect)return t}return-1!==r?r:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();for(const[t,i]of e)i.touch=0,i.type="number"==typeof i.type?i.type:(0,_.jr)(i.type),this._cache.set(t,i);this._seq=this._cache.size}}],["first",k]]),D._storagePrefix="suggest/memories",D=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([S(0,m.Uy),S(1,C.h),S(2,y.Ui)],D);const L=(0,b.yh)("ISuggestMemories");(0,w.z)(L,D,!0);var N=i(3580),E=i(4565),A=i(8819),M=i(9989),I=i(9599);let T=class e{constructor(t,i){this._editor=t,this._index=0,this._ckOtherSuggestions=e.OtherSuggestions.bindTo(i)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),null===(e=this._listener)||void 0===e||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:t,index:i},n){0!==t.items.length&&e._moveIndex(!0,t,i)!==i?(this._acceptNext=n,this._model=t,this._index=i,this._listener=this._editor.onDidChangeCursorPosition((()=>{this._ignore||this.reset()})),this._ckOtherSuggestions.set(!0)):this.reset()}static _moveIndex(e,t,i){let n=i;for(;n=(n+t.items.length+(e?1:-1))%t.items.length,n!==i&&t.items[n].completion.additionalTextEdits;);return n}next(){this._move(!0)}prev(){this._move(!1)}_move(t){if(this._model)try{this._ignore=!0,this._index=e._moveIndex(t,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};var R,O;T.OtherSuggestions=new A.uy("hasOtherSuggestions",!1),T=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(R=1,O=A.i6,function(e,t){O(e,t,R)})],T);var F=i(4669),P=i(3860),B=i(5392),z=i(7295);class W{constructor(e,t,i,n,o,r,s){this.clipboardText=s,this._snippetCompareFn=W._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=n,this._options=o,this._refilterKind=1,this._lineContext=i,"top"===r?this._snippetCompareFn=W._compareCompletionItemsSnippetsUp:"bottom"===r&&(this._snippetCompareFn=W._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){this._lineContext.leadingLineContent===e.leadingLineContent&&this._lineContext.characterCountDelta===e.characterCountDelta||(this._refilterKind=this._lineContext.characterCountDelta2e3?B.EW:B.l7;for(let o=0;o=h)c.score=B.CL.Default;else if("string"==typeof c.completion.filterText){let t=l(n,r,e,c.completion.filterText,c.filterTextLow,0,!1);if(!t)continue;0===(0,z.zY)(c.completion.filterText,c.textLabel)?c.score=t:(c.score=(0,B.jB)(n,r,e,c.textLabel,c.labelLow,0),c.score[0]=t[0])}else{let t=l(n,r,e,c.textLabel,c.labelLow,0,!1);if(!t)continue;c.score=t}}c.idx=o,c.distance=this._wordDistance.distance(c.position,c.completion),a.push(c),e.push(c.textLabel.length)}this._filteredItems=a.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?(0,o.HW)(e.length-.85,e,((e,t)=>e-t)):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]t.distance?1:e.idxt.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return 1;if(27===t.completion.kind)return-1}return W._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(27===e.completion.kind)return-1;if(27===t.completion.kind)return 1}return W._compareCompletionItems(e,t)}}var V=i(1050),H=i(469),$=i(689);class U{static create(e,t){return i=this,n=void 0,s=function*(){if(!t.getOption(104).localityBonus)return U.None;if(!t.hasModel())return U.None;const i=t.getModel(),n=t.getPosition();if(!e.canComputeWordRanges(i.uri))return U.None;const[r]=yield(new $.x).provideSelectionRanges(i,[n]);if(0===r.length)return U.None;const s=yield e.computeWordRanges(i.uri,r[0].range);if(!s)return U.None;const a=i.getWordUntilPosition(n);return delete s[a.word],new class extends U{distance(e,i){if(!n.equals(t.getPosition()))return 0;if(17===i.kind)return 2<<20;let a="string"==typeof i.label?i.label:i.label.name,l=s[a];if((0,o.XY)(l))return 2<<20;let c=(0,o.ry)(l,h.e.fromPositions(e),h.e.compareRangesUsingStarts),u=c>=0?l[c]:l[Math.max(0,~c-1)],d=r.length;for(const e of r){if(!h.e.containsRange(e.range,u))break;d-=1}return d}}},new((r=void 0)||(r=Promise))((function(e,t){function o(e){try{l(s.next(e))}catch(e){t(e)}}function a(e){try{l(s.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof r?i:new r((function(e){e(i)}))).then(o,a)}l((s=s.apply(i,n||[])).next())}));var i,n,r,s}}U.None=new class extends U{distance(){return 0}};var j=i(4972),q=i(829),K=i(3557),G=function(e,t){return function(i,n){t(i,n,e)}};class Y{constructor(e,t,i,n){this.leadingLineContent=e.getLineContent(t.lineNumber).substr(0,t.column-1),this.leadingWord=e.getWordUntilPosition(t),this.lineNumber=t.lineNumber,this.column=t.column,this.auto=i,this.shy=n}static shouldAutoTrigger(e){if(!e.hasModel())return!1;const t=e.getModel(),i=e.getPosition();t.tokenizeIfCheap(i.lineNumber);const n=t.getWordAtPosition(i);return!!n&&n.endColumn===i.column&&!!isNaN(Number(n.word))}}let Z=class e{constructor(e,t,i,n,o){this._editor=e,this._editorWorkerService=t,this._clipboardService=i,this._telemetryService=n,this._logService=o,this._toDispose=new a.SL,this._quickSuggestDelay=10,this._triggerCharacterListener=new a.SL,this._triggerQuickSuggest=new v._F,this._state=0,this._completionDisposables=new a.SL,this._onDidCancel=new F.Q5,this._onDidTrigger=new F.Q5,this._onDidSuggest=new F.Q5,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new P.Y(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel((()=>{this._updateTriggerCharacters(),this.cancel()}))),this._toDispose.add(this._editor.onDidChangeModelLanguage((()=>{this._updateTriggerCharacters(),this.cancel()}))),this._toDispose.add(this._editor.onDidChangeConfiguration((()=>{this._updateTriggerCharacters(),this._updateQuickSuggest()}))),this._toDispose.add(_.KZ.onDidChange((()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()}))),this._toDispose.add(this._editor.onDidChangeCursorSelection((e=>{this._onCursorChange(e)})));let r=!1;this._toDispose.add(this._editor.onDidCompositionStart((()=>{r=!0}))),this._toDispose.add(this._editor.onDidCompositionEnd((()=>{r=!1,this._refilterCompletionItems()}))),this._toDispose.add(this._editor.onDidChangeModelContent((()=>{r||this._refilterCompletionItems()}))),this._updateTriggerCharacters(),this._updateQuickSuggest()}dispose(){(0,a.B9)(this._triggerCharacterListener),(0,a.B9)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateQuickSuggest(){this._quickSuggestDelay=this._editor.getOption(77),(isNaN(this._quickSuggestDelay)||!this._quickSuggestDelay&&0!==this._quickSuggestDelay||this._quickSuggestDelay<0)&&(this._quickSuggestDelay=10)}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(78)||!this._editor.hasModel()||!this._editor.getOption(107))return;const e=new Map;for(const t of _.KZ.all(this._editor.getModel()))for(const i of t.triggerCharacters||[]){let n=e.get(i);n||(n=new Set,n.add((0,I.ZJ)()),e.set(i,n)),n.add(t)}const t=t=>{if(!t){const e=this._editor.getPosition();t=this._editor.getModel().getLineContent(e.lineNumber).substr(0,e.column-1)}let i="";(0,z.YK)(t.charCodeAt(t.length-1))?(0,z.ZG)(t.charCodeAt(t.length-2))&&(i=t.substr(t.length-2)):i=t.charAt(t.length-1);const n=e.get(i);if(n){const e=this._completionModel?{items:this._completionModel.adopt(n),clipboardText:this._completionModel.clipboardText}:void 0;this.trigger({auto:!0,shy:!1,triggerCharacter:i},Boolean(this._completionModel),n,e)}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(t))}get state(){return this._state}cancel(e=!1){var t;0!==this._state&&(this._triggerQuickSuggest.cancel(),null===(t=this._requestToken)||void 0===t||t.cancel(),this._requestToken=void 0,this._state=0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){0!==this._state&&(this._editor.hasModel()&&_.KZ.has(this._editor.getModel())?this.trigger({auto:2===this._state,shy:!1},!0):this.cancel())}_onCursorChange(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||0!==e.reason&&3!==e.reason||"keyboard"!==e.source&&"deleteLeft"!==e.source)this.cancel();else if(_.KZ.has(t))if(0===this._state&&0===e.reason){if(!1===this._editor.getOption(76))return;if(!i.containsRange(this._currentSelection)&&!i.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))return;if(this._editor.getOption(104).snippetsPreventQuickSuggestions&&g.SnippetController2.get(this._editor).isInSnippet())return;this.cancel(),this._triggerQuickSuggest.cancelAndSet((()=>{if(0!==this._state)return;if(!Y.shouldAutoTrigger(this._editor))return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getPosition(),i=this._editor.getOption(76);if(!1!==i){if(!0===i);else{e.tokenizeIfCheap(t.lineNumber);const n=e.getLineTokens(t.lineNumber),o=n.getStandardTokenType(n.findTokenIndexAtOffset(Math.max(t.column-1-1,0)));if(!(i.other&&0===o||i.comments&&1===o||i.strings&&2===o))return}this.trigger({auto:!0,shy:!1})}}),this._quickSuggestDelay)}else 0!==this._state&&3===e.reason&&this._refilterCompletionItems()}_refilterCompletionItems(){Promise.resolve().then((()=>{if(0===this._state)return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getPosition(),i=new Y(e,t,2===this._state,!1);this._onNewContext(i)}))}trigger(t,i=!1,n,o){var s;if(!this._editor.hasModel())return;const a=this._editor.getModel(),l=t.auto,c=new Y(a,this._editor.getPosition(),l,t.shy);this.cancel(i),this._state=l?2:1,this._onDidTrigger.fire({auto:l,shy:t.shy,position:this._editor.getPosition()}),this._context=c;let u={triggerKind:null!==(s=t.triggerKind)&&void 0!==s?s:0};t.triggerCharacter&&(u={triggerKind:1,triggerCharacter:t.triggerCharacter}),this._requestToken=new V.A;const h=this._editor.getOption(99);let d=1;switch(h){case"top":d=0;break;case"bottom":d=2}const{itemKind:g,showDeprecated:f}=e._createSuggestFilter(this._editor),p=U.create(this._editorWorkerService,this._editor),m=(0,I.kL)(a,this._editor.getPosition(),new I.A9(d,g,n,f),u,this._requestToken.token);Promise.all([m,p]).then((([e,i])=>{return n=this,r=void 0,a=function*(){var n;if(null===(n=this._requestToken)||void 0===n||n.dispose(),!this._editor.hasModel())return;let r=null==o?void 0:o.clipboardText;if(!r&&e.needsClipboard&&(r=yield this._clipboardService.readText()),0===this._state)return;const s=this._editor.getModel();let a=e.items;if(o){const e=(0,I.wg)(d);a=a.concat(o.items).sort(e)}const c=new Y(s,this._editor.getPosition(),l,t.shy);this._completionModel=new W(a,this._context.column,{leadingLineContent:c.leadingLineContent,characterCountDelta:c.column-this._context.column},i,this._editor.getOption(104),this._editor.getOption(99),r),this._completionDisposables.add(e.disposable),this._onNewContext(c),this._reportDurationsTelemetry(e.durations)},new((s=void 0)||(s=Promise))((function(e,t){function i(e){try{l(a.next(e))}catch(e){t(e)}}function o(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var n;t.done?e(t.value):(n=t.value,n instanceof s?n:new s((function(e){e(n)}))).then(i,o)}l((a=a.apply(n,r||[])).next())}));var n,r,s,a})).catch(r.dL)}_reportDurationsTelemetry(e){this._telemetryGate++%230==0&&setTimeout((()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(e)}),this._logService.debug("suggest.durations.json",e)}))}static _createSuggestFilter(e){const t=new Set;"none"===e.getOption(99)&&t.add(27);const i=e.getOption(104);return i.showMethods||t.add(0),i.showFunctions||t.add(1),i.showConstructors||t.add(2),i.showFields||t.add(3),i.showVariables||t.add(4),i.showClasses||t.add(5),i.showStructs||t.add(6),i.showInterfaces||t.add(7),i.showModules||t.add(8),i.showProperties||t.add(9),i.showEvents||t.add(10),i.showOperators||t.add(11),i.showUnits||t.add(12),i.showValues||t.add(13),i.showConstants||t.add(14),i.showEnums||t.add(15),i.showEnumMembers||t.add(16),i.showKeywords||t.add(17),i.showWords||t.add(18),i.showColors||t.add(19),i.showFiles||t.add(20),i.showReferences||t.add(21),i.showColors||t.add(22),i.showFolders||t.add(23),i.showTypeParameters||t.add(24),i.showSnippets||t.add(27),i.showUsers||t.add(25),i.showIssues||t.add(26),{itemKind:t,showDeprecated:i.showDeprecated}}_onNewContext(e){if(this._context)if(e.lineNumber===this._context.lineNumber)if((0,z.V8)(e.leadingLineContent)===(0,z.V8)(this._context.leadingLineContent)){if(e.columnthis._context.leadingWord.startColumn){const e=new Set(_.KZ.all(this._editor.getModel()));for(let t of this._completionModel.allProvider)e.delete(t);const t=this._completionModel.adopt(new Set);this.trigger({auto:this._context.auto,shy:!1},!0,e,{items:t,clipboardText:this._completionModel.clipboardText})}else if(e.column>this._context.column&&this._completionModel.incomplete.size>0&&0!==e.leadingWord.word.length){const{incomplete:e}=this._completionModel,t=this._completionModel.adopt(e);this.trigger({auto:2===this._state,shy:!1,triggerKind:2},!0,e,{items:t,clipboardText:this._completionModel.clipboardText})}else{let t=this._completionModel.lineContext,i=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},0===this._completionModel.items.length){if(Y.shouldAutoTrigger(this._editor)&&this._context.leadingWord.endColumn0,i&&0===e.leadingWord.word.length)return void this.cancel()}this._onDidSuggest.fire({completionModel:this._completionModel,auto:this._context.auto,shy:this._context.shy,isFrozen:i})}}else this.cancel();else this.cancel()}};Z=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([G(1,H.p),G(2,j.p),G(3,q.b),G(4,K.VZ)],Z),i(8609),i(4954);var X=i(5321),Q=i(3799),J=i(8810),ee=i(7781),te=i(3910),ie=i(9802),ne=i(3947),oe=i(9365),re=i(3046),se=i(3098);class ae{constructor(){let e;this._onDidWillResize=new F.Q5,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new F.Q5,this.onDidResize=this._onDidResize.event,this._sashListener=new a.SL,this._size=new X.Ro(0,0),this._minSize=new X.Ro(0,0),this._maxSize=new X.Ro(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new se.g(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new se.g(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new se.g(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:se.l.North}),this._southSash=new se.g(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:se.l.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let t=0,i=0;this._sashListener.add(F.ju.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)((()=>{void 0===e&&(this._onDidWillResize.fire(),e=this._size,t=0,i=0)}))),this._sashListener.add(F.ju.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)((()=>{void 0!==e&&(e=void 0,t=0,i=0,this._onDidResize.fire({dimension:this._size,done:!0}))}))),this._sashListener.add(this._eastSash.onDidChange((n=>{e&&(i=n.currentX-n.startX,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))}))),this._sashListener.add(this._westSash.onDidChange((n=>{e&&(i=-(n.currentX-n.startX),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))}))),this._sashListener.add(this._northSash.onDidChange((n=>{e&&(t=-(n.currentY-n.startY),this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))}))),this._sashListener.add(this._southSash.onDidChange((n=>{e&&(t=n.currentY-n.startY,this.layout(e.height+t,e.width+i),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))}))),this._sashListener.add(F.ju.any(this._eastSash.onDidReset,this._westSash.onDidReset)((e=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))),this._sashListener.add(F.ju.any(this._northSash.onDidReset,this._southSash.onDidReset)((e=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))})))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(e,t,i,n){this._northSash.state=e?3:0,this._eastSash.state=t?3:0,this._southSash.state=i?3:0,this._westSash.state=n?3:0}layout(e=this.size.height,t=this.size.width){const{height:i,width:n}=this._minSize,{height:o,width:r}=this._maxSize;e=Math.max(i,Math.min(o,e)),t=Math.max(n,Math.min(r,t));const s=new X.Ro(t,e);X.Ro.equals(s,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=s,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(e){this._maxSize=e}get maxSize(){return this._maxSize}set minSize(e){this._minSize=e}get minSize(){return this._minSize}set preferredSize(e){this._preferredSize=e}get preferredSize(){return this._preferredSize}}function le(e){return!!e&&Boolean(e.completion.documentation||e.completion.detail&&e.completion.detail!==e.completion.label)}let ce=class{constructor(e,t){this._editor=e,this._onDidClose=new F.Q5,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new F.Q5,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new a.SL,this._renderDisposeable=new a.SL,this._borderWidth=1,this._size=new X.Ro(330,0),this.domNode=X.$(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(ne.$,{editor:e}),this._body=X.$(".body"),this._scrollbar=new ie.s$(this._body,{}),X.R3(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=X.R3(this._body,X.$(".header")),this._close=X.R3(this._header,X.$("span"+re.lA.close.cssSelector)),this._close.title=N.N("details.close","Close"),this._type=X.R3(this._header,X.$("p.type")),this._docs=X.R3(this._body,X.$("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(40)&&this._configureFont()})))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const e=this._editor.getOptions(),t=e.get(40),i=t.fontFamily,n=e.get(105)||t.fontSize,o=e.get(106)||t.lineHeight,r=t.fontWeight,s=`${n}px`,a=`${o}px`;this.domNode.style.fontSize=s,this.domNode.style.lineHeight=a,this.domNode.style.fontWeight=r,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=i,this._close.style.height=a,this._close.style.width=a}getLayoutInfo(){const e=this._editor.getOption(106)||this._editor.getOption(40).lineHeight,t=this._borderWidth;return{lineHeight:e,borderWidth:t,borderHeight:2*t,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=N.N("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,2*this.getLayoutInfo().lineHeight),this._onDidChangeContents.fire(this)}renderItem(e,t){var i,n;this._renderDisposeable.clear();let{detail:o,documentation:r}=e.completion;if(t){let t="";t+=`score: ${e.score[0]}\n`,t+=`prefix: ${null!==(i=e.word)&&void 0!==i?i:"(no prefix)"}\n`,t+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel}\n`,t+=`distance: ${e.distance} (localityBonus-setting)\n`,t+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"}\n`,t+=`commit_chars: ${null===(n=e.completion.commitCharacters)||void 0===n?void 0:n.join("")}\n`,r=(new oe.W5).appendCodeblock("empty",t),o=`Provider: ${e.provider._debugDisplayName}`}if(t||le(e)){if(this.domNode.classList.remove("no-docs","no-type"),o){const e=o.length>1e5?`${o.substr(0,1e5)}…`:o;this._type.textContent=e,this._type.title=e,X.$Z(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gim.test(e))}else X.PO(this._type),this._type.title="",X.Cp(this._type),this.domNode.classList.add("no-type");if(X.PO(this._docs),"string"==typeof r)this._docs.classList.remove("markdown-docs"),this._docs.textContent=r;else if(r){this._docs.classList.add("markdown-docs"),X.PO(this._docs);const e=this._markdownRenderer.render(r);this._docs.appendChild(e.element),this._renderDisposeable.add(e),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync((()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)})))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=e=>{e.preventDefault(),e.stopPropagation()},this._close.onclick=e=>{e.preventDefault(),e.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}else this.clearContents()}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(e,t){const i=new X.Ro(e,t);X.Ro.equals(i,this._size)||(this._size=i,X.dp(this.domNode,e,t)),this._scrollbar.scanDomNode()}scrollDown(e=8){this._body.scrollTop+=e}scrollUp(e=8){this._body.scrollTop-=e}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(e){this._borderWidth=e}get borderWidth(){return this._borderWidth}};ce=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([function(e,t){return function(i,n){t(i,n,e)}}(1,b.TG)],ce);class ue{constructor(e,t){let i,n;this.widget=e,this._editor=t,this._disposables=new a.SL,this._added=!1,this._resizable=new ae,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let o=0,r=0;this._disposables.add(this._resizable.onDidWillResize((()=>{i=this._topLeft,n=this._resizable.size}))),this._disposables.add(this._resizable.onDidResize((e=>{if(i&&n){this.widget.layout(e.dimension.width,e.dimension.height);let t=!1;e.west&&(r=n.width-e.dimension.width,t=!0),e.north&&(o=n.height-e.dimension.height,t=!0),t&&this._applyTopLeft({top:i.top+o,left:i.left+r})}e.done&&(i=void 0,n=void 0,o=0,r=0,this._userSize=e.dimension)}))),this._disposables.add(this.widget.onDidChangeContents((()=>{var e;this._anchorBox&&this._placeAtAnchor(this._anchorBox,null!==(e=this._userSize)&&void 0!==e?e:this.widget.size)})))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}hide(e=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),e&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(e){var t;const i=X.i(e);this._anchorBox=i,this._placeAtAnchor(this._anchorBox,null!==(t=this._userSize)&&void 0!==t?t:this.widget.size)}_placeAtAnchor(e,t){const i=X.D6(document.body),n=this.widget.getLayoutInfo();let o,r,s,a,l=new X.Ro(220,2*n.lineHeight),c=0,u=e.top,h=e.top+e.height-n.borderHeight,d=i.width-(e.left+e.width+n.borderWidth+n.horizontalPadding);c=-n.borderWidth+e.left+e.width,a=!0,o=new X.Ro(d,i.height-e.top-n.borderHeight-n.verticalPadding),r=o.with(void 0,e.top+e.height-n.borderHeight-n.verticalPadding),t.width>d&&(e.left>d&&(d=e.left-n.borderWidth-n.horizontalPadding,a=!1,c=Math.max(n.horizontalPadding,e.left-t.width-n.borderWidth),o=o.with(d),r=o.with(void 0,r.height)),e.width>1.3*d&&i.height-(e.top+e.height)>e.height&&(d=e.width,c=e.left,u=-n.borderWidth+e.top+e.height,o=new X.Ro(e.width-n.borderHeight,i.height-e.top-e.height-n.verticalPadding),r=o.with(void 0,e.top-n.verticalPadding),l=l.with(o.width)));let g,f=t.height,p=Math.max(o.height,r.height);f>p&&(f=p),f<=o.height?(s=!0,g=o):(s=!1,g=r),this._applyTopLeft({left:c,top:s?u:h-f}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!s,a,s,!a),this._resizable.minSize=l,this._resizable.maxSize=g,this._resizable.layout(f,Math.min(g.width,t.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(e){this._topLeft=e,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}var he=i(317),de=i(8335),ge=i(4144),fe=function(e,t){return function(i,n){t(i,n,e)}};class pe extends de.Mm{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id);if(!e)return super.updateLabel();this.label&&(this.label.textContent=(0,N.N)("ddd","{0} ({1})",this._action.label,pe.symbolPrintEnter(e)))}static symbolPrintEnter(e){var t;return null===(t=e.getLabel())||void 0===t?void 0:t.replace(/\benter\b/gi,"⏎")}}let me=class{constructor(e,t,i,n){this._menuService=i,this._contextKeyService=n,this._menuDisposables=new a.SL,this.element=X.R3(e,X.$(".suggest-status-bar"));const o=e=>e instanceof ge.U8?t.createInstance(pe,e):void 0;this._leftActions=new he.o(this.element,{actionViewItemProvider:o}),this._rightActions=new he.o(this.element,{actionViewItemProvider:o}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this.element.remove()}show(){const e=this._menuService.createMenu(I.GI,this._contextKeyService),t=()=>{const t=[],i=[];for(let[n,o]of e.getActions())"left"===n?t.push(...o):i.push(...o);this._leftActions.clear(),this._leftActions.push(t),this._rightActions.clear(),this._rightActions.push(i)};this._menuDisposables.add(e.onDidChange((()=>t()))),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};me=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([fe(1,b.TG),fe(2,ge.co),fe(3,A.i6)],me);var _e,ve=i(8801),be=i(6663),ye=i(5935),we=i(1144);function Ce(e,t,i,n){const o=n===_e.ROOT_FOLDER?["rootfolder-icon"]:n===_e.FOLDER?["folder-icon"]:["file-icon"];if(i){let r;if(r=i.scheme===be.lg.data?ye.Vb.parseMetaData(i).get(ye.Vb.META_DATA_LABEL):Se((0,ye.Hx)(i).toLowerCase()),n===_e.FOLDER)o.push(`${r}-name-folder-icon`);else{if(r){if(o.push(`${r}-name-file-icon`),r.length<=255){const e=r.split(".");for(let t=1;t{const e=this._editor.getOptions(),i=e.get(40),o=i.fontFamily,r=i.fontFeatureSettings,s=e.get(105)||i.fontSize,a=e.get(106)||i.lineHeight,l=i.fontWeight,c=`${s}px`,u=`${a}px`;t.root.style.fontSize=c,t.root.style.fontWeight=l,n.style.fontFamily=o,n.style.fontFeatureSettings=r,n.style.lineHeight=u,t.icon.style.height=u,t.icon.style.width=u,t.readMore.style.height=u,t.readMore.style.width=u};return o(),t.disposables.add(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(40)||e.hasChanged(105)||e.hasChanged(106))&&o()}))),t}renderElement(e,t,i){var n,r,s;const{completion:a}=e;i.root.id=Ne(t),i.colorspan.style.backgroundColor="";const l={labelEscapeNewLines:!0,matches:(0,B.mB)(e.score)};let c=[];if(19===a.kind&&Ae.extract(e,c))i.icon.className="icon customcolor",i.iconContainer.className="icon hide",i.colorspan.style.backgroundColor=c[0];else if(20===a.kind&&this._themeService.getFileIconTheme().hasFileIcons){i.icon.className="icon hide",i.iconContainer.className="icon hide";const t=Ce(this._modelService,this._modeService,De.o.from({scheme:"fake",path:e.textLabel}),_e.FILE),n=Ce(this._modelService,this._modeService,De.o.from({scheme:"fake",path:a.detail}),_e.FILE);l.extraClasses=t.length>n.length?t:n}else 23===a.kind&&this._themeService.getFileIconTheme().hasFolderIcons?(i.icon.className="icon hide",i.iconContainer.className="icon hide",l.extraClasses=(0,o.xH)([Ce(this._modelService,this._modeService,De.o.from({scheme:"fake",path:e.textLabel}),_e.FOLDER),Ce(this._modelService,this._modeService,De.o.from({scheme:"fake",path:a.detail}),_e.FOLDER)])):(i.icon.className="icon hide",i.iconContainer.className="",i.iconContainer.classList.add("suggest-icon",...(0,_.Sy)(a.kind).split(" ")));a.tags&&a.tags.indexOf(1)>=0&&(l.extraClasses=(l.extraClasses||[]).concat(["deprecated"]),l.matches=[]),i.iconLabel.setLabel(e.textLabel,void 0,l),"string"==typeof a.label?(i.parametersLabel.textContent="",i.qualifierLabel.textContent="",i.detailsLabel.textContent=Ie(a.detail||""),i.root.classList.add("string-label"),i.root.title=""):(i.parametersLabel.textContent=Ie(a.label.parameters||""),i.qualifierLabel.textContent=Ie(a.label.qualifier||""),i.detailsLabel.textContent=Ie(a.label.type||""),i.root.classList.remove("string-label"),i.root.title=`${e.textLabel}${null!==(n=a.label.parameters)&&void 0!==n?n:""} ${null!==(r=a.label.qualifier)&&void 0!==r?r:""} ${null!==(s=a.label.type)&&void 0!==s?s:""}`),this._editor.getOption(104).showInlineDetails?(0,X.$Z)(i.detailsLabel):(0,X.Cp)(i.detailsLabel),le(e)?(i.right.classList.add("can-expand-details"),(0,X.$Z)(i.readMore),i.readMore.onmousedown=e=>{e.stopPropagation(),e.preventDefault()},i.readMore.onclick=e=>{e.stopPropagation(),e.preventDefault(),this._onDidToggleDetails.fire()}):(i.right.classList.remove("can-expand-details"),(0,X.Cp)(i.readMore),i.readMore.onmousedown=null,i.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};function Ie(e){return e.replace(/\r\n|\r|\n/g,"")}Me=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([Le(1,ke.q),Le(2,C.h),Le(3,ee.XE)],Me);var Te=i(4527),Re=i(9870),Oe=function(e,t){return function(i,n){t(i,n,e)}};const Fe=(0,te.P6)("editorSuggestWidget.background",{dark:te.D0,light:te.D0,hc:te.D0},N.N("editorSuggestWidgetBackground","Background color of the suggest widget.")),Pe=(0,te.P6)("editorSuggestWidget.border",{dark:te.D1,light:te.D1,hc:te.D1},N.N("editorSuggestWidgetBorder","Border color of the suggest widget.")),Be=(0,te.P6)("editorSuggestWidget.foreground",{dark:te.NO,light:te.NO,hc:te.NO},N.N("editorSuggestWidgetForeground","Foreground color of the suggest widget.")),ze=(0,te.P6)("editorSuggestWidget.selectedForeground",{dark:te.NP,light:te.NP,hc:te.NP},N.N("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget.")),We=(0,te.P6)("editorSuggestWidget.selectedBackground",{dark:te.Vq,light:te.Vq,hc:te.Vq},N.N("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget.")),Ve=(0,te.P6)("editorSuggestWidget.highlightForeground",{dark:te.Gw,light:te.Gw,hc:te.Gw},N.N("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget.")),He=(0,te.P6)("editorSuggestWidget.focusHighlightForeground",{dark:te.PX,light:te.PX,hc:te.PX},N.N("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused."));class $e{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof Te.H}`}restore(){var e;const t=null!==(e=this._service.get(this._key,0))&&void 0!==e?e:"";try{const e=JSON.parse(t);if(X.Ro.is(e))return X.Ro.lift(e)}catch(e){}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}let Ue=class e{constructor(e,t,i,n,o){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new v._F,this._disposables=new a.SL,this._onDidSelect=new F.Q5,this._onDidFocus=new F.Q5,this._onDidHide=new F.Q5,this._onDidShow=new F.Q5,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new F.Q5,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new ae,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new je(this,e),this._persistedSize=new $e(t,e);class r{constructor(e,t,i=!1,n=!1){this.persistedSize=e,this.currentSize=t,this.persistHeight=i,this.persistWidth=n}}let s;this._disposables.add(this.element.onDidWillResize((()=>{this._contentWidget.lockPreference(),s=new r(this._persistedSize.restore(),this.element.size)}))),this._disposables.add(this.element.onDidResize((e=>{var t,i,n,o;if(this._resize(e.dimension.width,e.dimension.height),s&&(s.persistHeight=s.persistHeight||!!e.north||!!e.south,s.persistWidth=s.persistWidth||!!e.east||!!e.west),e.done){if(s){const{itemHeight:e,defaultSize:r}=this.getLayoutInfo(),a=Math.round(e/2);let{width:l,height:c}=this.element.size;(!s.persistHeight||Math.abs(s.currentSize.height-c)<=a)&&(c=null!==(i=null===(t=s.persistedSize)||void 0===t?void 0:t.height)&&void 0!==i?i:r.height),(!s.persistWidth||Math.abs(s.currentSize.width-l)<=a)&&(l=null!==(o=null===(n=s.persistedSize)||void 0===n?void 0:n.width)&&void 0!==o?o:r.width),this._persistedSize.store(new X.Ro(l,c))}this._contentWidget.unlockPreference(),s=void 0}}))),this._messageElement=X.R3(this.element.domNode,X.$(".message")),this._listElement=X.R3(this.element.domNode,X.$(".tree"));const l=o.createInstance(ce,this.editor);l.onDidClose(this.toggleDetails,this,this._disposables),this._details=new ue(l,this.editor);const c=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(104).showIcons);c();const u=o.createInstance(Me,this.editor);this._disposables.add(u),this._disposables.add(u.onDidToggleDetails((()=>this.toggleDetails()))),this._list=new Q.aV("SuggestWidget",this._listElement,{getHeight:e=>this.getLayoutInfo().itemHeight,getTemplateId:e=>"suggestion"},[u],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,accessibilityProvider:{getRole:()=>"option",getAriaLabel:e=>{if(e.isResolved&&this._isDetailsVisible()){const{documentation:t,detail:i}=e.completion,n=z.WU("{0}{1}",i||"",t?"string"==typeof t?t:t.value:"");return N.N("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",e.textLabel,n)}return e.textLabel},getWidgetAriaLabel:()=>N.N("suggest","Suggest"),getWidgetRole:()=>"listbox"}}),this._status=o.createInstance(me,this.element.domNode);const h=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(104).showStatusBar);h(),this._disposables.add((0,J.Jl)(this._list,n,{listInactiveFocusBackground:We,listInactiveFocusOutline:te.xL})),this._disposables.add(n.onDidColorThemeChange((e=>this._onThemeChange(e)))),this._onThemeChange(n.getColorTheme()),this._disposables.add(this._list.onMouseDown((e=>this._onListMouseDownOrTap(e)))),this._disposables.add(this._list.onTap((e=>this._onListMouseDownOrTap(e)))),this._disposables.add(this._list.onDidChangeSelection((e=>this._onListSelection(e)))),this._disposables.add(this._list.onDidChangeFocus((e=>this._onListFocus(e)))),this._disposables.add(this.editor.onDidChangeCursorSelection((()=>this._onCursorSelectionChanged()))),this._disposables.add(this.editor.onDidChangeConfiguration((e=>{e.hasChanged(104)&&(h(),c())}))),this._ctxSuggestWidgetVisible=I._y.Visible.bindTo(i),this._ctxSuggestWidgetDetailsVisible=I._y.DetailsVisible.bindTo(i),this._ctxSuggestWidgetMultipleSuggestions=I._y.MultipleSuggestions.bindTo(i),this._disposables.add(X.mu(this._details.widget.domNode,"keydown",(e=>{this._onDetailsKeydown.fire(e)}))),this._disposables.add(this.editor.onMouseDown((e=>this._onEditorMouseDown(e))))}dispose(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),null===(e=this._loadingTimeout)||void 0===e||e.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(e){this._details.widget.domNode.contains(e.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(e.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){0!==this._state&&this._contentWidget.layout()}_onListMouseDownOrTap(e){void 0!==e.element&&void 0!==e.index&&(e.browserEvent.preventDefault(),e.browserEvent.stopPropagation(),this._select(e.element,e.index))}_onListSelection(e){e.elements.length&&this._select(e.elements[0],e.indexes[0])}_select(e,t){const i=this._completionModel;i&&(this._onDidSelect.fire({item:e,index:t,model:i}),this.editor.focus())}_onThemeChange(e){const t=e.getColor(Fe);t&&(this.element.domNode.style.backgroundColor=t.toString(),this._messageElement.style.backgroundColor=t.toString(),this._details.widget.domNode.style.backgroundColor=t.toString());const i=e.getColor(Pe);i&&(this.element.domNode.style.borderColor=i.toString(),this._messageElement.style.borderColor=i.toString(),this._status.element.style.borderTopColor=i.toString(),this._details.widget.domNode.style.borderColor=i.toString(),this._detailsBorderColor=i.toString());const n=e.getColor(te.R8);n&&(this._detailsFocusBorderColor=n.toString()),this._details.widget.borderWidth="hc"===e.type?2:1}_onListFocus(e){var t;if(this._ignoreFocusEvents)return;if(!e.elements.length)return this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),void this.editor.setAriaOptions({activeDescendant:void 0});if(!this._completionModel)return;const i=e.elements[0],n=e.indexes[0];i!==this._focusedItem&&(null===(t=this._currentSuggestionDetails)||void 0===t||t.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=i,this._list.reveal(n),this._currentSuggestionDetails=(0,v.PG)((e=>{return t=this,n=void 0,r=function*(){const t=(0,v.Vg)((()=>{this._isDetailsVisible()&&this.showDetails(!0)}),250);e.onCancellationRequested((()=>t.dispose()));const n=yield i.resolve(e);return t.dispose(),n},new((o=void 0)||(o=Promise))((function(e,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(s,a)}l((r=r.apply(t,n||[])).next())}));var t,n,o,r})),this._currentSuggestionDetails.then((()=>{n>=this._list.length||i!==this._list.element(n)||(this._ignoreFocusEvents=!0,this._list.splice(n,1,[i]),this._list.setFocus([n]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:Ne(n)}))})).catch(r.dL)),this._onDidFocus.fire({item:i,index:n,model:this._completionModel})}_setState(t){if(this._state!==t)switch(this._state=t,this.element.domNode.classList.toggle("frozen",4===t),this.element.domNode.classList.remove("message"),t){case 0:X.Cp(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=e.LOADING_MESSAGE,X.Cp(this._listElement,this._status.element),X.$Z(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=e.NO_SUGGESTIONS_MESSAGE,X.Cp(this._listElement,this._status.element),X.$Z(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 3:case 4:X.Cp(this._messageElement),X.$Z(this._listElement,this._status.element),this._show();break;case 5:X.Cp(this._messageElement),X.$Z(this._listElement,this._status.element),this._details.show(),this._show()}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet((()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)}),100)}showTriggered(e,t){0===this._state&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=(0,v.Vg)((()=>this._setState(1)),t)))}showSuggestions(e,t,i,n){var o,r;if(this._contentWidget.setPosition(this.editor.getPosition()),null===(o=this._loadingTimeout)||void 0===o||o.dispose(),null===(r=this._currentSuggestionDetails)||void 0===r||r.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),i&&2!==this._state&&0!==this._state)return void this._setState(4);const s=this._completionModel.items.length,a=0===s;if(this._ctxSuggestWidgetMultipleSuggestions.set(s>1),a)return this._setState(n?0:2),void(this._completionModel=void 0);this._focusedItem=void 0,this._list.splice(0,this._list.length,this._completionModel.items),this._setState(i?4:3),this._list.reveal(t,0),this._list.setFocus([t]),this._layout(this.element.size),this._detailsBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsBorderColor)}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(0!==this._state&&2!==this._state&&1!==this._state&&this._completionModel)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){5===this._state?(this._setState(3),this._detailsBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsBorderColor)):3===this._state&&this._isDetailsVisible()&&(this._setState(5),this._detailsFocusBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsFocusBorderColor))}toggleDetails(){this._isDetailsVisible()?(this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):!le(this._list.getFocusedElements()[0])&&!this._explainMode||3!==this._state&&5!==this._state&&4!==this._state||(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){this._details.show(),e?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var e;null===(e=this._loadingTimeout)||void 0===e||e.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const t=this._persistedSize.restore(),i=Math.ceil(4.3*this.getLayoutInfo().itemHeight);t&&t.heightl&&(a=l);const c=this._completionModel?this._completionModel.stats.pLabelLen*r.typicalHalfwidthCharacterWidth:a,u=r.statusBarHeight+this._list.contentHeight+r.borderHeight,h=r.itemHeight+r.statusBarHeight,d=X.i(this.editor.getDomNode()),g=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),f=d.top+g.top+g.height,p=Math.min(o.height-f-r.verticalPadding,u),m=Math.min(d.top+g.top-r.verticalPadding,u);let _=Math.min(Math.max(m,p)+r.borderHeight,u);s===(null===(t=this._cappedHeight)||void 0===t?void 0:t.capped)&&(s=this._cappedHeight.wanted),s_&&(s=_),s>p||this._forceRenderingAbove?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),_=m):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),_=p),this.element.preferredSize=new X.Ro(c,r.defaultSize.height),this.element.maxSize=new X.Ro(l,_),this.element.minSize=new X.Ro(220,h),this._cappedHeight=s===u?{wanted:null!==(n=null===(i=this._cappedHeight)||void 0===i?void 0:i.wanted)&&void 0!==n?n:e.height,capped:s}:void 0}this._resize(a,s)}_resize(e,t){const{width:i,height:n}=this.element.maxSize;e=Math.min(i,e),t=Math.min(n,t);const{statusBarHeight:o}=this.getLayoutInfo();this._list.layout(t-o,e),this._listElement.style.height=t-o+"px",this.element.layout(t,e),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode)}getLayoutInfo(){const e=this.editor.getOption(40),t=(0,Re.u)(this.editor.getOption(106)||e.lineHeight,8,1e3),i=this.editor.getOption(104).showStatusBar&&2!==this._state&&1!==this._state?t:0,n=this._details.widget.borderWidth,o=2*n;return{itemHeight:t,statusBarHeight:i,borderWidth:n,borderHeight:o,typicalHalfwidthCharacterWidth:e.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new X.Ro(430,i+12*t+o)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(e){this._storageService.store("expandSuggestionDocs",e,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};Ue.LOADING_MESSAGE=N.N("suggestWidget.loading","Loading..."),Ue.NO_SUGGESTIONS_MESSAGE=N.N("suggestWidget.noSuggestions","No suggestions."),Ue=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([Oe(1,m.Uy),Oe(2,A.i6),Oe(3,ee.XE),Oe(4,b.TG)],Ue);class je{constructor(e,t){this._widget=e,this._editor=t,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return!this._hidden&&this._position&&this._preference?{position:this._position,preference:[this._preference]}:null}beforeRender(){const{height:e,width:t}=this._widget.element.size,{borderWidth:i,horizontalPadding:n}=this._widget.getLayoutInfo();return new X.Ro(t+2*i+n,e+2*i)}afterRender(e){this._widget._afterRender(e)}setPreference(e){this._preferenceLocked||(this._preference=e)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(e){this._position=e}}(0,ee.Ic)(((e,t)=>{const i=e.getColor(Ve);i&&t.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { color: ${i}; }`);const n=e.getColor(He);i&&t.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .monaco-highlighted-label .highlight { color: ${n}; }`);const o=e.getColor(Be);o&&t.addRule(`.monaco-editor .suggest-widget, .monaco-editor .suggest-details { color: ${o}; }`);const r=e.getColor(ze);r&&t.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused { color: ${r}; }`);const s=e.getColor(te.ur);s&&t.addRule(`.monaco-editor .suggest-details a { color: ${s}; }`);const a=e.getColor(te.Sw);a&&t.addRule(`.monaco-editor .suggest-details code { background-color: ${a}; }`)}));let qe=class e{constructor(t,i){this._editor=t,this._enabled=!1,this._ckAtEnd=e.AtEnd.bindTo(i),this._configListener=this._editor.onDidChangeConfiguration((e=>e.hasChanged(109)&&this._update())),this._update()}dispose(){var e;this._configListener.dispose(),null===(e=this._selectionListener)||void 0===e||e.dispose(),this._ckAtEnd.reset()}_update(){const e="on"===this._editor.getOption(109);if(this._enabled!==e)if(this._enabled=e,this._enabled){const e=()=>{if(!this._editor.hasModel())return void this._ckAtEnd.set(!1);const e=this._editor.getModel(),t=this._editor.getSelection(),i=e.getWordAtPosition(t.getStartPosition());i?this._ckAtEnd.set(i.endColumn===t.getStartPosition().column):this._ckAtEnd.set(!1)};this._selectionListener=this._editor.onDidChangeCursorSelection(e),e()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};qe.AtEnd=new A.uy("atEndOfWord",!1),qe=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([function(e,t){return function(i,n){t(i,n,e)}}(1,A.i6)],qe);var Ke=i(8401),Ge=i(4906);class Ye{constructor(e,t,i){this._disposables=new a.SL,this._disposables.add(t.onDidShow((()=>this._onItem(t.getFocusedItem())))),this._disposables.add(t.onDidFocus(this._onItem,this)),this._disposables.add(t.onDidHide(this.reset,this)),this._disposables.add(e.onWillType((n=>{if(this._active&&!t.isFrozen()){const t=n.charCodeAt(n.length-1);this._active.acceptCharacters.has(t)&&e.getOption(0)&&i(this._active.item)}})))}_onItem(e){if(!e||!(0,o.Of)(e.item.completion.commitCharacters))return void this.reset();if(this._active&&this._active.item.item===e.item)return;const t=new Ge.q;for(const i of e.item.completion.commitCharacters)i.length>0&&t.add(i.charCodeAt(0));this._active={acceptCharacters:t,item:e}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}class Ze{constructor(e,t){this._disposables=new a.SL,this._lastOvertyped=[],this._empty=!0,this._disposables.add(e.onWillType((()=>{if(!this._empty)return;if(!e.hasModel())return;const t=e.getSelections(),i=t.length;let n=!1;for(let e=0;eZe._maxSelectionLength)return;this._lastOvertyped[e]={value:o.getValueInRange(i),multiline:i.startLineNumber!==i.endLineNumber}}this._empty=!1}))),this._disposables.add(t.onDidCancel((e=>{this._empty||e.retrigger||(this._empty=!0)})))}getLastOvertypedInfo(e){if(!this._empty&&e>=0&&el.set(e.getOption(104).insertMode))),this.widget=this._toDispose.add(new v.Ue((()=>{const e=this._instantiationService.createInstance(Ue,this.editor);this._toDispose.add(e),this._toDispose.add(e.onDidSelect((e=>this._insertSuggestion(e,0)),this));const t=new Ye(this.editor,e,(e=>this._insertSuggestion(e,2)));this._toDispose.add(t),this._toDispose.add(this.model.onDidSuggest((e=>{0===e.completionModel.items.length&&t.reset()})));const i=I._y.MakesTextEdit.bindTo(this._contextKeyService),n=I._y.HasInsertAndReplaceRange.bindTo(this._contextKeyService),o=I._y.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add((0,a.OF)((()=>{i.reset(),n.reset(),o.reset()}))),this._toDispose.add(e.onDidFocus((({item:e})=>{const t=this.editor.getPosition(),r=e.editStart.column,s=t.column;let a=!0;"smart"!==this.editor.getOption(1)||2!==this.model.state||e.completion.command||e.completion.additionalTextEdits||4&e.completion.insertTextRules||s-r!==e.completion.insertText.length||(a=this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:r,endLineNumber:t.lineNumber,endColumn:s})!==e.completion.insertText),i.set(a),n.set(!Xe.L.equals(e.editInsertEnd,e.editReplaceEnd)),o.set(Boolean(e.provider.resolveCompletionItem)||Boolean(e.completion.documentation)||e.completion.detail!==e.completion.label)}))),this._toDispose.add(e.onDetailsKeyDown((e=>{e.toKeybinding().equals(new s.QC(!0,!1,!1,!1,33))||Qe.dz&&e.toKeybinding().equals(new s.QC(!1,!1,!1,!0,33))?e.stopPropagation():e.toKeybinding().isModifierKey()||this.editor.focus()}))),e}))),this._overtypingCapturer=this._toDispose.add(new v.Ue((()=>this._toDispose.add(new Ze(this.editor,this.model))))),this._alternatives=this._toDispose.add(new v.Ue((()=>this._toDispose.add(new T(this.editor,this._contextKeyService))))),this._toDispose.add(o.createInstance(qe,e)),this._toDispose.add(this.model.onDidTrigger((e=>{this.widget.value.showTriggered(e.auto,e.shy?250:50),this._lineSuffix.value=new tt(this.editor.getModel(),e.position)}))),this._toDispose.add(this.model.onDidSuggest((e=>{if(!e.shy){let t=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),e.completionModel.items);this.widget.value.showSuggestions(e.completionModel,t,e.isFrozen,e.auto)}}))),this._toDispose.add(this.model.onDidCancel((e=>{e.retrigger||this.widget.value.hideWidget()}))),this._toDispose.add(this.editor.onDidBlurEditorWidget((()=>{this.model.cancel(),this.model.clear()})));let c=I._y.AcceptSuggestionsOnEnter.bindTo(n),u=()=>{const e=this.editor.getOption(1);c.set("on"===e||"smart"===e)};this._toDispose.add(this.editor.onDidChangeConfiguration((()=>u()))),u()}static get(t){return t.getContribution(e.ID)}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose()}_insertSuggestion(e,t){if(!e||!e.item)return this._alternatives.value.reset(),this.model.cancel(),void this.model.clear();if(!this.editor.hasModel())return;const i=this.editor.getModel(),n=i.getAlternativeVersionId(),{item:o}=e,s=[],a=new V.A;1&t||this.editor.pushUndoStop();const c=this.getOverwriteInfo(o,Boolean(8&t));if(this._memoryService.memorize(i,this.editor.getPosition(),o),Array.isArray(o.completion.additionalTextEdits)){const e=l.ZF.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",o.completion.additionalTextEdits.map((e=>u.h.replace(h.e.lift(e.range),e.text)))),e.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!o.isResolved){const e=new Je.G(!0);let n;const r=i.onDidChangeContent((e=>{if(e.isFlush)return a.cancel(),void r.dispose();for(let t of e.changes){const e=h.e.getEndPosition(t.range);n&&!Xe.L.isBefore(e,n)||(n=e)}}));let c=t;t|=2;let d=!1,g=this.editor.onWillType((()=>{g.dispose(),d=!0,2&c||this.editor.pushUndoStop()}));s.push(o.resolve(a.token).then((()=>{if(!o.completion.additionalTextEdits||a.token.isCancellationRequested)return!1;if(n&&o.completion.additionalTextEdits.some((e=>Xe.L.isBefore(n,h.e.getStartPosition(e.range)))))return!1;d&&this.editor.pushUndoStop();const e=l.ZF.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",o.completion.additionalTextEdits.map((e=>u.h.replace(h.e.lift(e.range),e.text)))),e.restoreRelativeVerticalPositionOfCursor(this.editor),!d&&2&c||this.editor.pushUndoStop(),!0})).then((t=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",e.elapsed(),t),r.dispose(),g.dispose()})))}let{insertText:d}=o.completion;4&o.completion.insertTextRules||(d=f.Yj.escape(d)),g.SnippetController2.get(this.editor).insert(d,{overwriteBefore:c.overwriteBefore,overwriteAfter:c.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(1&o.completion.insertTextRules),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),2&t||this.editor.pushUndoStop(),o.completion.command?o.completion.command.id===nt.id?this.model.trigger({auto:!0,shy:!1},!0):(s.push(this._commandService.executeCommand(o.completion.command.id,...o.completion.command.arguments?[...o.completion.command.arguments]:[]).catch(r.dL)),this.model.cancel()):this.model.cancel(),4&t&&this._alternatives.value.set(e,(e=>{for(a.cancel();i.canUndo();){n!==i.getAlternativeVersionId()&&i.undo(),this._insertSuggestion(e,3|(8&t?8:0));break}})),this._alertCompletionItem(o),Promise.all(s).finally((()=>{this.model.clear(),a.dispose()}))}getOverwriteInfo(e,t){(0,Ke.p_)(this.editor.hasModel());let i="replace"===this.editor.getOption(104).insertMode;t&&(i=!i);const n=e.position.column-e.editStart.column,o=(i?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column;return{overwriteBefore:n+(this.editor.getPosition().column-e.position.column),overwriteAfter:o+(this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0)}}_alertCompletionItem(e){if((0,o.Of)(e.completion.additionalTextEdits)){let t=N.N("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);(0,n.Z9)(t)}}triggerSuggest(e){this.editor.hasModel()&&(this.model.trigger({auto:!1,shy:!1},!1,e),this.editor.revealLine(this.editor.getPosition().lineNumber,0),this.editor.focus())}triggerSuggestAndAcceptBest(e){if(!this.editor.hasModel())return;const t=this.editor.getPosition(),i=()=>{t.equals(this.editor.getPosition())&&this._commandService.executeCommand(e.fallback)},n=e=>{if(4&e.completion.insertTextRules||e.completion.additionalTextEdits)return!0;const t=this.editor.getPosition(),i=e.editStart.column,n=t.column;return n-i!==e.completion.insertText.length||this.editor.getModel().getValueInRange({startLineNumber:t.lineNumber,startColumn:i,endLineNumber:t.lineNumber,endColumn:n})!==e.completion.insertText};F.ju.once(this.model.onDidTrigger)((e=>{let t=[];F.ju.any(this.model.onDidTrigger,this.model.onDidCancel)((()=>{(0,a.B9)(t),i()}),void 0,t),this.model.onDidSuggest((({completionModel:e})=>{if((0,a.B9)(t),0===e.items.length)return void i();const o=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),e.items),r=e.items[o];n(r)?(this.editor.pushUndoStop(),this._insertSuggestion({index:o,item:r,model:e},7)):i()}),void 0,t)})),this.model.trigger({auto:!1,shy:!0}),this.editor.revealLine(t.lineNumber,0),this.editor.focus()}acceptSelectedSuggestion(e,t){const i=this.widget.value.getFocusedItem();let n=0;e&&(n|=4),t&&(n|=8),this._insertSuggestion(i,n)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.value.stopForceRenderingAbove()}};it.ID="editor.contrib.suggestController",it=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([et(1,L),et(2,E.H),et(3,A.i6),et(4,b.TG),et(5,K.VZ)],it);class nt extends c.R6{constructor(){super({id:nt.id,label:N.N("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:A.Ao.and(d.u.writable,d.u.hasCompletionItemProvider),kbOpts:{kbExpr:d.u.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t){const i=it.get(t);i&&i.triggerSuggest()}}nt.id="editor.action.triggerSuggest",(0,c._K)(it.ID,it),(0,c.Qr)(nt);const ot=190,rt=c._l.bindToContribution(it.get);(0,c.fK)(new rt({id:"acceptSelectedSuggestion",precondition:I._y.Visible,handler(e){e.acceptSelectedSuggestion(!0,!1)}})),M.W.registerKeybindingRule({id:"acceptSelectedSuggestion",when:A.Ao.and(I._y.Visible,d.u.textInputFocus),primary:2,weight:ot}),M.W.registerKeybindingRule({id:"acceptSelectedSuggestion",when:A.Ao.and(I._y.Visible,d.u.textInputFocus,I._y.AcceptSuggestionsOnEnter,I._y.MakesTextEdit),primary:3,weight:ot}),ge.BH.appendMenuItem(I.GI,{command:{id:"acceptSelectedSuggestion",title:N.N("accept.insert","Insert")},group:"left",order:1,when:I._y.HasInsertAndReplaceRange.toNegated()}),ge.BH.appendMenuItem(I.GI,{command:{id:"acceptSelectedSuggestion",title:N.N("accept.insert","Insert")},group:"left",order:1,when:A.Ao.and(I._y.HasInsertAndReplaceRange,I._y.InsertMode.isEqualTo("insert"))}),ge.BH.appendMenuItem(I.GI,{command:{id:"acceptSelectedSuggestion",title:N.N("accept.replace","Replace")},group:"left",order:1,when:A.Ao.and(I._y.HasInsertAndReplaceRange,I._y.InsertMode.isEqualTo("replace"))}),(0,c.fK)(new rt({id:"acceptAlternativeSelectedSuggestion",precondition:A.Ao.and(I._y.Visible,d.u.textInputFocus),kbOpts:{weight:ot,kbExpr:d.u.textInputFocus,primary:1027,secondary:[1026]},handler(e){e.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:I.GI,group:"left",order:2,when:A.Ao.and(I._y.HasInsertAndReplaceRange,I._y.InsertMode.isEqualTo("insert")),title:N.N("accept.replace","Replace")},{menuId:I.GI,group:"left",order:2,when:A.Ao.and(I._y.HasInsertAndReplaceRange,I._y.InsertMode.isEqualTo("replace")),title:N.N("accept.insert","Insert")}]})),E.P.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),(0,c.fK)(new rt({id:"hideSuggestWidget",precondition:I._y.Visible,handler:e=>e.cancelSuggestWidget(),kbOpts:{weight:ot,kbExpr:d.u.textInputFocus,primary:9,secondary:[1033]}})),(0,c.fK)(new rt({id:"selectNextSuggestion",precondition:A.Ao.and(I._y.Visible,I._y.MultipleSuggestions),handler:e=>e.selectNextSuggestion(),kbOpts:{weight:ot,kbExpr:d.u.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),(0,c.fK)(new rt({id:"selectNextPageSuggestion",precondition:A.Ao.and(I._y.Visible,I._y.MultipleSuggestions),handler:e=>e.selectNextPageSuggestion(),kbOpts:{weight:ot,kbExpr:d.u.textInputFocus,primary:12,secondary:[2060]}})),(0,c.fK)(new rt({id:"selectLastSuggestion",precondition:A.Ao.and(I._y.Visible,I._y.MultipleSuggestions),handler:e=>e.selectLastSuggestion()})),(0,c.fK)(new rt({id:"selectPrevSuggestion",precondition:A.Ao.and(I._y.Visible,I._y.MultipleSuggestions),handler:e=>e.selectPrevSuggestion(),kbOpts:{weight:ot,kbExpr:d.u.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),(0,c.fK)(new rt({id:"selectPrevPageSuggestion",precondition:A.Ao.and(I._y.Visible,I._y.MultipleSuggestions),handler:e=>e.selectPrevPageSuggestion(),kbOpts:{weight:ot,kbExpr:d.u.textInputFocus,primary:11,secondary:[2059]}})),(0,c.fK)(new rt({id:"selectFirstSuggestion",precondition:A.Ao.and(I._y.Visible,I._y.MultipleSuggestions),handler:e=>e.selectFirstSuggestion()})),(0,c.fK)(new rt({id:"toggleSuggestionDetails",precondition:I._y.Visible,handler:e=>e.toggleSuggestionDetails(),kbOpts:{weight:ot,kbExpr:d.u.textInputFocus,primary:2058,mac:{primary:266}},menuOpts:[{menuId:I.GI,group:"right",order:1,when:A.Ao.and(I._y.DetailsVisible,I._y.CanResolve),title:N.N("detail.more","show less")},{menuId:I.GI,group:"right",order:1,when:A.Ao.and(I._y.DetailsVisible.toNegated(),I._y.CanResolve),title:N.N("detail.less","show more")}]})),(0,c.fK)(new rt({id:"toggleExplainMode",precondition:I._y.Visible,handler:e=>e.toggleExplainMode(),kbOpts:{weight:100,primary:2133}})),(0,c.fK)(new rt({id:"toggleSuggestionFocus",precondition:I._y.Visible,handler:e=>e.toggleSuggestionFocus(),kbOpts:{weight:ot,kbExpr:d.u.textInputFocus,primary:2570,mac:{primary:778}}})),(0,c.fK)(new rt({id:"insertBestCompletion",precondition:A.Ao.and(d.u.textInputFocus,A.Ao.equals("config.editor.tabCompletion","on"),qe.AtEnd,I._y.Visible.toNegated(),T.OtherSuggestions.toNegated(),g.SnippetController2.InSnippetMode.toNegated()),handler:(e,t)=>{e.triggerSuggestAndAcceptBest((0,Ke.Kn)(t)?Object.assign({fallback:"tab"},t):{fallback:"tab"})},kbOpts:{weight:ot,primary:2}})),(0,c.fK)(new rt({id:"insertNextSuggestion",precondition:A.Ao.and(d.u.textInputFocus,A.Ao.equals("config.editor.tabCompletion","on"),T.OtherSuggestions,I._y.Visible.toNegated(),g.SnippetController2.InSnippetMode.toNegated()),handler:e=>e.acceptNextSuggestion(),kbOpts:{weight:ot,kbExpr:d.u.textInputFocus,primary:2}})),(0,c.fK)(new rt({id:"insertPrevSuggestion",precondition:A.Ao.and(d.u.textInputFocus,A.Ao.equals("config.editor.tabCompletion","on"),T.OtherSuggestions,I._y.Visible.toNegated(),g.SnippetController2.InSnippetMode.toNegated()),handler:e=>e.acceptPrevSuggestion(),kbOpts:{weight:ot,kbExpr:d.u.textInputFocus,primary:1026}})),(0,c.Qr)(class extends c.R6{constructor(){super({id:"editor.action.resetSuggestSize",label:N.N("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(e,t){it.get(t).resetWidgetSize()}})},4954:(e,t,i)=>{"use strict";var n=i(3580),o=i(7781),r=i(3910),s=i(3046);const a=(0,r.P6)("symbolIcon.arrayForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),l=(0,r.P6)("symbolIcon.booleanForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),c=(0,r.P6)("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},(0,n.N)("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),u=(0,r.P6)("symbolIcon.colorForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),h=(0,r.P6)("symbolIcon.constantForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),d=(0,r.P6)("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},(0,n.N)("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),g=(0,r.P6)("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},(0,n.N)("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),f=(0,r.P6)("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},(0,n.N)("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),p=(0,r.P6)("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},(0,n.N)("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),m=(0,r.P6)("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},(0,n.N)("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),_=(0,r.P6)("symbolIcon.fileForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),v=(0,r.P6)("symbolIcon.folderForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),b=(0,r.P6)("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},(0,n.N)("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),y=(0,r.P6)("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},(0,n.N)("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),w=(0,r.P6)("symbolIcon.keyForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),C=(0,r.P6)("symbolIcon.keywordForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),S=(0,r.P6)("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},(0,n.N)("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),x=(0,r.P6)("symbolIcon.moduleForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),k=(0,r.P6)("symbolIcon.namespaceForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),D=(0,r.P6)("symbolIcon.nullForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),L=(0,r.P6)("symbolIcon.numberForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),N=(0,r.P6)("symbolIcon.objectForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),E=(0,r.P6)("symbolIcon.operatorForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),A=(0,r.P6)("symbolIcon.packageForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),M=(0,r.P6)("symbolIcon.propertyForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),I=(0,r.P6)("symbolIcon.referenceForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),T=(0,r.P6)("symbolIcon.snippetForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),R=(0,r.P6)("symbolIcon.stringForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),O=(0,r.P6)("symbolIcon.structForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),F=(0,r.P6)("symbolIcon.textForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),P=(0,r.P6)("symbolIcon.typeParameterForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),B=(0,r.P6)("symbolIcon.unitForeground",{dark:r.dR,light:r.dR,hc:r.dR},(0,n.N)("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),z=(0,r.P6)("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},(0,n.N)("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));(0,o.Ic)(((e,t)=>{const i=e.getColor(a);i&&t.addRule(`${s.lA.symbolArray.cssSelector} { color: ${i}; }`);const n=e.getColor(l);n&&t.addRule(`${s.lA.symbolBoolean.cssSelector} { color: ${n}; }`);const o=e.getColor(c);o&&t.addRule(`${s.lA.symbolClass.cssSelector} { color: ${o}; }`);const r=e.getColor(S);r&&t.addRule(`${s.lA.symbolMethod.cssSelector} { color: ${r}; }`);const W=e.getColor(u);W&&t.addRule(`${s.lA.symbolColor.cssSelector} { color: ${W}; }`);const V=e.getColor(h);V&&t.addRule(`${s.lA.symbolConstant.cssSelector} { color: ${V}; }`);const H=e.getColor(d);H&&t.addRule(`${s.lA.symbolConstructor.cssSelector} { color: ${H}; }`);const $=e.getColor(g);$&&t.addRule(`\n\t\t\t${s.lA.symbolValue.cssSelector},${s.lA.symbolEnum.cssSelector} { color: ${$}; }`);const U=e.getColor(f);U&&t.addRule(`${s.lA.symbolEnumMember.cssSelector} { color: ${U}; }`);const j=e.getColor(p);j&&t.addRule(`${s.lA.symbolEvent.cssSelector} { color: ${j}; }`);const q=e.getColor(m);q&&t.addRule(`${s.lA.symbolField.cssSelector} { color: ${q}; }`);const K=e.getColor(_);K&&t.addRule(`${s.lA.symbolFile.cssSelector} { color: ${K}; }`);const G=e.getColor(v);G&&t.addRule(`${s.lA.symbolFolder.cssSelector} { color: ${G}; }`);const Y=e.getColor(b);Y&&t.addRule(`${s.lA.symbolFunction.cssSelector} { color: ${Y}; }`);const Z=e.getColor(y);Z&&t.addRule(`${s.lA.symbolInterface.cssSelector} { color: ${Z}; }`);const X=e.getColor(w);X&&t.addRule(`${s.lA.symbolKey.cssSelector} { color: ${X}; }`);const Q=e.getColor(C);Q&&t.addRule(`${s.lA.symbolKeyword.cssSelector} { color: ${Q}; }`);const J=e.getColor(x);J&&t.addRule(`${s.lA.symbolModule.cssSelector} { color: ${J}; }`);const ee=e.getColor(k);ee&&t.addRule(`${s.lA.symbolNamespace.cssSelector} { color: ${ee}; }`);const te=e.getColor(D);te&&t.addRule(`${s.lA.symbolNull.cssSelector} { color: ${te}; }`);const ie=e.getColor(L);ie&&t.addRule(`${s.lA.symbolNumber.cssSelector} { color: ${ie}; }`);const ne=e.getColor(N);ne&&t.addRule(`${s.lA.symbolObject.cssSelector} { color: ${ne}; }`);const oe=e.getColor(E);oe&&t.addRule(`${s.lA.symbolOperator.cssSelector} { color: ${oe}; }`);const re=e.getColor(A);re&&t.addRule(`${s.lA.symbolPackage.cssSelector} { color: ${re}; }`);const se=e.getColor(M);se&&t.addRule(`${s.lA.symbolProperty.cssSelector} { color: ${se}; }`);const ae=e.getColor(I);ae&&t.addRule(`${s.lA.symbolReference.cssSelector} { color: ${ae}; }`);const le=e.getColor(T);le&&t.addRule(`${s.lA.symbolSnippet.cssSelector} { color: ${le}; }`);const ce=e.getColor(R);ce&&t.addRule(`${s.lA.symbolString.cssSelector} { color: ${ce}; }`);const ue=e.getColor(O);ue&&t.addRule(`${s.lA.symbolStruct.cssSelector} { color: ${ue}; }`);const he=e.getColor(F);he&&t.addRule(`${s.lA.symbolText.cssSelector} { color: ${he}; }`);const de=e.getColor(P);de&&t.addRule(`${s.lA.symbolTypeParameter.cssSelector} { color: ${de}; }`);const ge=e.getColor(B);ge&&t.addRule(`${s.lA.symbolUnit.cssSelector} { color: ${ge}; }`);const fe=e.getColor(z);fe&&t.addRule(`${s.lA.symbolVariable.cssSelector} { color: ${fe}; }`)}))},9720:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ToggleTabFocusModeAction:()=>a});var n=i(3580),o=i(5152),r=i(6830),s=i(6345);class a extends r.R6{constructor(){super({id:a.ID,label:n.N({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),alias:"Toggle Tab Key Moves Focus",precondition:void 0,kbOpts:{kbExpr:null,primary:2091,mac:{primary:1323},weight:100}})}run(e,t){const i=!s.nG.getTabFocusMode();s.nG.setTabFocusMode(i),i?(0,o.Z9)(n.N("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element")):(0,o.Z9)(n.N("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}a.ID="editor.action.toggleTabFocusMode",(0,r.Qr)(a)},1725:(e,t,i)=>{"use strict";i.r(t);var n=i(3580),o=i(5976),r=i(6830),s=i(1640),a=i(8820),l=function(e,t){return function(i,n){t(i,n,e)}};const c="ignoreUnusualLineTerminators";let u=class extends o.JT{constructor(e,t,i){super(),this._editor=e,this._dialogService=t,this._codeEditorService=i,this._config=this._editor.getOption(111),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(111)&&(this._config=this._editor.getOption(111),this._checkForUnusualLineTerminators())}))),this._register(this._editor.onDidChangeModel((()=>{this._checkForUnusualLineTerminators()}))),this._register(this._editor.onDidChangeModelContent((e=>{e.isUndoing||this._checkForUnusualLineTerminators()})))}_checkForUnusualLineTerminators(){return e=this,t=void 0,o=function*(){if("off"===this._config)return;if(!this._editor.hasModel())return;const e=this._editor.getModel();e.mightContainUnusualLineTerminators()&&!0!==function(e,t){return e.getModelProperty(t.uri,c)}(this._codeEditorService,e)&&(this._editor.getOption(78)||("auto"!==this._config?(yield this._dialogService.confirm({title:n.N("unusualLineTerminators.title","Unusual Line Terminators"),message:n.N("unusualLineTerminators.message","Detected unusual line terminators"),detail:n.N("unusualLineTerminators.detail","This file contains one or more unusual line terminator characters, like Line Separator (LS) or Paragraph Separator (PS).\n\nIt is recommended to remove them from the file. This can be configured via `editor.unusualLineTerminators`."),primaryButton:n.N("unusualLineTerminators.fix","Fix this file"),secondaryButton:n.N("unusualLineTerminators.ignore","Ignore problem for this file")})).confirmed?e.removeUnusualLineTerminators(this._editor.getSelections()):function(e,t,i){e.setModelProperty(t.uri,c,!0)}(this._codeEditorService,e):e.removeUnusualLineTerminators(this._editor.getSelections())))},new((i=void 0)||(i=Promise))((function(n,r){function s(e){try{l(o.next(e))}catch(e){r(e)}}function a(e){try{l(o.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((o=o.apply(e,t||[])).next())}));var e,t,i,o}};u.ID="editor.contrib.unusualLineTerminatorsDetector",u=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([l(1,a.S),l(2,s.$)],u),(0,r._K)(u.ID,u)},185:(e,t,i)=>{"use strict";i.r(t);var n=i(5393),o=i(5976),r=i(6830),s=i(4101),a=i(1200),l=i(5072),c=i(7781),u=i(3108),h=i(7390),d=i(9510),g=function(e,t){return function(i,n){t(i,n,e)}};let f=class extends o.JT{constructor(e,t,i,o){super(),this._modelService=t,this._themeService=i,this._configurationService=o,this._editor=e,this._tokenizeViewport=new n.pY((()=>this._tokenizeViewportNow()),100),this._outstandingRequests=[],this._register(this._editor.onDidScrollChange((()=>{this._tokenizeViewport.schedule()}))),this._register(this._editor.onDidChangeModel((()=>{this._cancelAll(),this._tokenizeViewport.schedule()}))),this._register(this._editor.onDidChangeModelContent((e=>{this._cancelAll(),this._tokenizeViewport.schedule()}))),this._register(s.K7.onDidChange((()=>{this._cancelAll(),this._tokenizeViewport.schedule()}))),this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(h.e3)&&(this._cancelAll(),this._tokenizeViewport.schedule())}))),this._register(this._themeService.onDidColorThemeChange((()=>{this._cancelAll(),this._tokenizeViewport.schedule()})))}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,i=this._outstandingRequests.length;tthis._requestRange(e,n,t,i))))}_requestRange(e,t,i,o){const r=e.getVersionId(),s=(0,n.PG)((n=>Promise.resolve(i.provideDocumentRangeSemanticTokens(e,t,n))));return s.then((i=>{i&&!e.isDisposed()&&e.getVersionId()===r&&e.setPartialSemanticTokens(t,(0,l.h)(i,o,e.getLanguageIdentifier()))})).then((()=>this._removeOutstandingRequest(s)),(()=>this._removeOutstandingRequest(s))),s}};f.ID="editor.contrib.viewportSemanticTokens",f=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([g(1,a.q),g(2,c.XE),g(3,u.Ui)],f),(0,r._K)(f.ID,f)},3497:(e,t,i)=>{"use strict";i.r(t),i.d(t,{getOccurrencesAtPosition:()=>D});var n=i(3580),o=i(9488),r=i(5393),s=i(1050),a=i(7301),l=i(5976),c=i(6830),u=i(4314),h=i(9102),d=i(4973),g=i(3411),f=i(4101),p=i(8819),m=i(3910),_=i(7781),v=i(5152);const b=(0,m.P6)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hc:null},n.N("wordHighlight","Background color of a symbol during read-access, like reading a variable. The color must not be opaque so as not to hide underlying decorations."),!0),y=(0,m.P6)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hc:null},n.N("wordHighlightStrong","Background color of a symbol during write-access, like writing to a variable. The color must not be opaque so as not to hide underlying decorations."),!0),w=(0,m.P6)("editor.wordHighlightBorder",{light:null,dark:null,hc:m.xL},n.N("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable.")),C=(0,m.P6)("editor.wordHighlightStrongBorder",{light:null,dark:null,hc:m.xL},n.N("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable.")),S=(0,m.P6)("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},n.N("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),x=(0,m.P6)("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hc:"#C0A0C0CC"},n.N("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),k=new p.uy("hasWordHighlights",!1);function D(e,t,i){const n=f.vH.ordered(e);return(0,r.Ps)(n.map((n=>()=>Promise.resolve(n.provideDocumentHighlights(e,t,i)).then(void 0,a.Cp))),o.Of)}class L{constructor(e,t,i){this._wordRange=this._getCurrentWordRange(e,t),this.result=(0,r.PG)((n=>this._compute(e,t,i,n)))}_getCurrentWordRange(e,t){const i=e.getWordAtPosition(t.getPosition());return i?new u.e(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}isValid(e,t,i){const n=t.startLineNumber,o=t.startColumn,r=t.endColumn,s=this._getCurrentWordRange(e,t);let a=Boolean(this._wordRange&&this._wordRange.equalsRange(s));for(let t=0,s=i.length;!a&&t=r&&(a=!0)}return a}cancel(){this.result.cancel()}}class N extends L{_compute(e,t,i,n){return D(e,t.getPosition(),n).then((e=>e||[]))}}class E extends L{constructor(e,t,i){super(e,t,i),this._selectionIsEmpty=t.isEmpty()}_compute(e,t,i,n){return(0,r.Vs)(250,n).then((()=>{if(!t.isEmpty())return[];const n=e.getWordAtPosition(t.getPosition());return!n||n.word.length>1e3?[]:e.findMatches(n.word,!0,!1,!0,i,!1).map((e=>({range:e.range,kind:f.MY.Text})))}))}isValid(e,t,i){const n=t.isEmpty();return this._selectionIsEmpty===n&&super.isValid(e,t,i)}}(0,c.sb)("_executeDocumentHighlights",((e,t)=>D(e,t,s.T.None)));class A{constructor(e,t){this.toUnhook=new l.SL,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this._hasWordHighlights=k.bindTo(t),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(69),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition((e=>{this._ignorePositionChangeEvent||this.occurrencesHighlight&&this._onPositionChanged(e)}))),this.toUnhook.add(e.onDidChangeModelContent((e=>{this._stopAll()}))),this.toUnhook.add(e.onDidChangeConfiguration((e=>{let t=this.editor.getOption(69);this.occurrencesHighlight!==t&&(this.occurrencesHighlight=t,this._stopAll())}))),this._decorationIds=[],this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this._decorationIds.length>0}restore(){this.occurrencesHighlight&&this._run()}_getSortedHighlights(){return o.kX(this._decorationIds.map((e=>this.model.getDecorationRange(e))).sort(u.e.compareRangesUsingStarts))}moveNext(){let e=this._getSortedHighlights(),t=(e.findIndex((e=>e.containsPosition(this.editor.getPosition())))+1)%e.length,i=e[t];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(i.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(i);const n=this._getWord();if(n){const o=this.editor.getModel().getLineContent(i.startLineNumber);(0,v.Z9)(`${o}, ${t+1} of ${e.length} for '${n.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let e=this._getSortedHighlights(),t=(e.findIndex((e=>e.containsPosition(this.editor.getPosition())))-1+e.length)%e.length,i=e[t];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(i.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(i);const n=this._getWord();if(n){const o=this.editor.getModel().getLineContent(i.startLineNumber);(0,v.Z9)(`${o}, ${t+1} of ${e.length} for '${n.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this._decorationIds.length>0&&(this._decorationIds=this.editor.deltaDecorations(this._decorationIds,[]),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),-1!==this.renderDecorationsTimer&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),null!==this.workerRequest&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){this.occurrencesHighlight&&3===e.reason?this._run():this._stopAll()}_getWord(){let e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.getWordAtPosition({lineNumber:t,column:i})}_run(){let e=this.editor.getSelection();if(e.startLineNumber!==e.endLineNumber)return void this._stopAll();let t=e.startColumn,i=e.endColumn;const n=this._getWord();if(!n||n.startColumn>t||n.endColumn{e===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=t||[],this._beginRenderDecorations())}),a.dL)}var r,s,l}_beginRenderDecorations(){let e=(new Date).getTime(),t=this.lastCursorPositionChangeTime+250;e>=t?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout((()=>{this.renderDecorations()}),t-e)}renderDecorations(){this.renderDecorationsTimer=-1;let e=[];for(const t of this.workerRequestValue)t.range&&e.push({range:t.range,options:A._getDecorationOptions(t.kind)});this._decorationIds=this.editor.deltaDecorations(this._decorationIds,e),this._hasWordHighlights.set(this.hasDecorations())}static _getDecorationOptions(e){return e===f.MY.Write?this._WRITE_OPTIONS:e===f.MY.Text?this._TEXT_OPTIONS:this._REGULAR_OPTIONS}dispose(){this._stopAll(),this.toUnhook.dispose()}}A._WRITE_OPTIONS=g.qx.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:(0,_.EN)(x),position:d.sh.Center}}),A._TEXT_OPTIONS=g.qx.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight",overviewRuler:{color:(0,_.EN)(m.SP),position:d.sh.Center}}),A._REGULAR_OPTIONS=g.qx.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:(0,_.EN)(S),position:d.sh.Center}});let M=class e extends l.JT{constructor(e,t){super(),this.wordHighlighter=null;const i=()=>{e.hasModel()&&(this.wordHighlighter=new A(e,t))};this._register(e.onDidChangeModel((e=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),i()}))),i()}static get(t){return t.getContribution(e.ID)}saveViewState(){return!(!this.wordHighlighter||!this.wordHighlighter.hasDecorations())}moveNext(){this.wordHighlighter&&this.wordHighlighter.moveNext()}moveBack(){this.wordHighlighter&&this.wordHighlighter.moveBack()}restoreViewState(e){this.wordHighlighter&&e&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};var I,T;M.ID="editor.contrib.wordHighlighter",M=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(I=1,T=p.i6,function(e,t){T(e,t,I)})],M);class R extends c.R6{constructor(e,t){super(t),this._isNext=e}run(e,t){const i=M.get(t);i&&(this._isNext?i.moveNext():i.moveBack())}}class O extends c.R6{constructor(){super({id:"editor.action.wordHighlight.trigger",label:n.N("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:k.toNegated(),kbOpts:{kbExpr:h.u.editorTextFocus,primary:0,weight:100}})}run(e,t,i){const n=M.get(t);n&&n.restoreViewState(!0)}}(0,c._K)(M.ID,M),(0,c.Qr)(class extends R{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:n.N("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:k,kbOpts:{kbExpr:h.u.editorTextFocus,primary:65,weight:100}})}}),(0,c.Qr)(class extends R{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:n.N("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:k,kbOpts:{kbExpr:h.u.editorTextFocus,primary:1089,weight:100}})}}),(0,c.Qr)(O),(0,_.Ic)(((e,t)=>{const i=e.getColor(m.Rz);i&&(t.addRule(`.monaco-editor .focused .selectionHighlight { background-color: ${i}; }`),t.addRule(`.monaco-editor .selectionHighlight { background-color: ${i.transparent(.5)}; }`));const n=e.getColor(b);n&&t.addRule(`.monaco-editor .wordHighlight { background-color: ${n}; }`);const o=e.getColor(y);o&&t.addRule(`.monaco-editor .wordHighlightStrong { background-color: ${o}; }`);const r=e.getColor(m.g_);r&&t.addRule(`.monaco-editor .selectionHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${r}; box-sizing: border-box; }`);const s=e.getColor(w);s&&t.addRule(`.monaco-editor .wordHighlight { border: 1px ${"hc"===e.type?"dashed":"solid"} ${s}; box-sizing: border-box; }`);const a=e.getColor(C);a&&t.addRule(`.monaco-editor .wordHighlightStrong { border: 1px ${"hc"===e.type?"dashed":"solid"} ${a}; box-sizing: border-box; }`)}))},9453:(e,t,i)=>{"use strict";i.r(t),i.d(t,{MoveWordCommand:()=>v,WordLeftCommand:()=>b,WordRightCommand:()=>y,CursorWordStartLeft:()=>w,CursorWordEndLeft:()=>C,CursorWordLeft:()=>S,CursorWordStartLeftSelect:()=>x,CursorWordEndLeftSelect:()=>k,CursorWordLeftSelect:()=>D,CursorWordAccessibilityLeft:()=>L,CursorWordAccessibilityLeftSelect:()=>N,CursorWordStartRight:()=>E,CursorWordEndRight:()=>A,CursorWordRight:()=>M,CursorWordStartRightSelect:()=>I,CursorWordEndRightSelect:()=>T,CursorWordRightSelect:()=>R,CursorWordAccessibilityRight:()=>O,CursorWordAccessibilityRightSelect:()=>F,DeleteWordCommand:()=>P,DeleteWordLeftCommand:()=>B,DeleteWordRightCommand:()=>z,DeleteWordStartLeft:()=>W,DeleteWordEndLeft:()=>V,DeleteWordLeft:()=>H,DeleteWordStartRight:()=>$,DeleteWordEndRight:()=>U,DeleteWordRight:()=>j,DeleteInsideWord:()=>q});var n=i(3580),o=i(6830),r=i(1329),s=i(3181),a=i(5795),l=i(9410),c=i(187),u=i(4314),h=i(3860),d=i(9102),g=i(1106),f=i(8819),p=i(4141),m=i(3831),_=i(9282);class v extends o._l{constructor(e){super(e),this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=(0,l.u)(t.getOption(114)),o=t.getModel(),r=t.getSelections().map((e=>{const t=new c.L(e.positionLineNumber,e.positionColumn),i=this._move(n,o,t,this._wordNavigationType);return this._moveTo(e,i,this._inSelectionMode)}));if(o.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,r.map((e=>s.Vi.fromModelSelection(e)))),1===r.length){const e=new c.L(r[0].positionLineNumber,r[0].positionColumn);t.revealPosition(e,0)}}_moveTo(e,t,i){return i?new h.Y(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new h.Y(t.lineNumber,t.column,t.lineNumber,t.column)}}class b extends v{_move(e,t,i,n){return a.w.moveWordLeft(e,t,i,n)}}class y extends v{_move(e,t,i,n){return a.w.moveWordRight(e,t,i,n)}}class w extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class C extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class S extends b{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:f.Ao.and(d.u.textInputFocus,null===(e=f.Ao.and(g.U,_.c))||void 0===e?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}}class x extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class k extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class D extends b{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:f.Ao.and(d.u.textInputFocus,null===(e=f.Ao.and(g.U,_.c))||void 0===e?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class L extends b{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n){return super._move((0,l.u)(p.BH.wordSeparators.defaultValue),t,i,n)}}class N extends b{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n){return super._move((0,l.u)(p.BH.wordSeparators.defaultValue),t,i,n)}}class E extends y{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class A extends y{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:f.Ao.and(d.u.textInputFocus,null===(e=f.Ao.and(g.U,_.c))||void 0===e?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}}class M extends y{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class I extends y{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class T extends y{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:f.Ao.and(d.u.textInputFocus,null===(e=f.Ao.and(g.U,_.c))||void 0===e?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class R extends y{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class O extends y{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n){return super._move((0,l.u)(p.BH.wordSeparators.defaultValue),t,i,n)}}class F extends y{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n){return super._move((0,l.u)(p.BH.wordSeparators.defaultValue),t,i,n)}}class P extends o._l{constructor(e){super(e),this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=(0,l.u)(t.getOption(114)),o=t.getModel(),s=t.getSelections(),a=t.getOption(5),c=t.getOption(8),u=m.zu.getAutoClosingPairs(o.getLanguageIdentifier().id),h=t._getViewModel(),d=s.map((e=>{const i=this._delete({wordSeparators:n,model:o,selection:e,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(6),autoClosingBrackets:a,autoClosingQuotes:c,autoClosingPairs:u,autoClosedCharacters:h.getCursorAutoClosedCharacters()},this._wordNavigationType);return new r.T4(i,"")}));t.pushUndoStop(),t.executeCommands(this.id,d),t.pushUndoStop()}}class B extends P{_delete(e,t){return a.w.deleteWordLeft(e,t)||new u.e(1,1,1,1)}}class z extends P{_delete(e,t){let i=a.w.deleteWordRight(e,t);if(i)return i;const n=e.model.getLineCount(),o=e.model.getLineMaxColumn(n);return new u.e(n,o,n,o)}}class W extends B{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:d.u.writable})}}class V extends B{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:d.u.writable})}}class H extends B{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:d.u.writable,kbOpts:{kbExpr:d.u.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class $ extends z{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:d.u.writable})}}class U extends z{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:d.u.writable})}}class j extends z{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:d.u.writable,kbOpts:{kbExpr:d.u.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class q extends o.R6{constructor(){super({id:"deleteInsideWord",precondition:d.u.writable,label:n.N("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,i){if(!t.hasModel())return;const n=(0,l.u)(t.getOption(114)),o=t.getModel(),s=t.getSelections().map((e=>{const t=a.w.deleteInsideWord(n,o,e);return new r.T4(t,"")}));t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}(0,o.fK)(new w),(0,o.fK)(new C),(0,o.fK)(new S),(0,o.fK)(new x),(0,o.fK)(new k),(0,o.fK)(new D),(0,o.fK)(new E),(0,o.fK)(new A),(0,o.fK)(new M),(0,o.fK)(new I),(0,o.fK)(new T),(0,o.fK)(new R),(0,o.fK)(new L),(0,o.fK)(new N),(0,o.fK)(new O),(0,o.fK)(new F),(0,o.fK)(new W),(0,o.fK)(new V),(0,o.fK)(new H),(0,o.fK)(new $),(0,o.fK)(new U),(0,o.fK)(new j),(0,o.Qr)(q)},661:(e,t,i)=>{"use strict";i.r(t),i.d(t,{DeleteWordPartLeft:()=>c,DeleteWordPartRight:()=>u,WordPartLeftCommand:()=>h,CursorWordPartLeft:()=>d,CursorWordPartLeftSelect:()=>g,WordPartRightCommand:()=>f,CursorWordPartRight:()=>p,CursorWordPartRightSelect:()=>m});var n=i(6830),o=i(5795),r=i(4314),s=i(9102),a=i(9453),l=i(4565);class c extends a.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:s.u.writable,kbOpts:{kbExpr:s.u.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){return o.L.deleteWordPartLeft(e)||new r.e(1,1,1,1)}}class u extends a.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:s.u.writable,kbOpts:{kbExpr:s.u.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){let i=o.L.deleteWordPartRight(e);if(i)return i;const n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new r.e(n,s,n,s)}}class h extends a.MoveWordCommand{_move(e,t,i,n){return o.L.moveWordPartLeft(e,t,i)}}class d extends h{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:s.u.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}l.P.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class g extends h{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:s.u.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}l.P.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class f extends a.MoveWordCommand{_move(e,t,i,n){return o.L.moveWordPartRight(e,t,i)}}class p extends f{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:s.u.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class m extends f{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:s.u.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}(0,n.fK)(new c),(0,n.fK)(new u),(0,n.fK)(new d),(0,n.fK)(new g),(0,n.fK)(new p),(0,n.fK)(new m)},513:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CancellationTokenSource:()=>Ya,Emitter:()=>Za,KeyCode:()=>Xa,KeyMod:()=>Qa,MarkerSeverity:()=>nl,MarkerTag:()=>ol,Position:()=>Ja,Range:()=>el,Selection:()=>tl,SelectionDirection:()=>il,Token:()=>sl,Uri:()=>rl,editor:()=>al,languages:()=>ll});var n,o,r,s,a,l,c,u,h,d,g,f,p,m,_,v,b,y,w,C,S,x,k,D,L,N,E,A,M,I,T,R,O,F,P,B=i(4141),z=i(1050),W=i(4669),V=i(2258),H=i(666),$=i(187),U=i(4314),j=i(3860),q=i(5600);!function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"}(n||(n={})),function(e){e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"}(o||(o={})),function(e){e[e.Method=0]="Method",e[e.Function=1]="Function",e[e.Constructor=2]="Constructor",e[e.Field=3]="Field",e[e.Variable=4]="Variable",e[e.Class=5]="Class",e[e.Struct=6]="Struct",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Event=10]="Event",e[e.Operator=11]="Operator",e[e.Unit=12]="Unit",e[e.Value=13]="Value",e[e.Constant=14]="Constant",e[e.Enum=15]="Enum",e[e.EnumMember=16]="EnumMember",e[e.Keyword=17]="Keyword",e[e.Text=18]="Text",e[e.Color=19]="Color",e[e.File=20]="File",e[e.Reference=21]="Reference",e[e.Customcolor=22]="Customcolor",e[e.Folder=23]="Folder",e[e.TypeParameter=24]="TypeParameter",e[e.User=25]="User",e[e.Issue=26]="Issue",e[e.Snippet=27]="Snippet"}(r||(r={})),function(e){e[e.Deprecated=1]="Deprecated"}(s||(s={})),function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"}(a||(a={})),function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"}(l||(l={})),function(e){e[e.NotSet=0]="NotSet",e[e.ContentFlush=1]="ContentFlush",e[e.RecoverFromMarkers=2]="RecoverFromMarkers",e[e.Explicit=3]="Explicit",e[e.Paste=4]="Paste",e[e.Undo=5]="Undo",e[e.Redo=6]="Redo"}(c||(c={})),function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(u||(u={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(h||(h={})),function(e){e[e.None=0]="None",e[e.Keep=1]="Keep",e[e.Brackets=2]="Brackets",e[e.Advanced=3]="Advanced",e[e.Full=4]="Full"}(d||(d={})),function(e){e[e.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",e[e.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",e[e.accessibilitySupport=2]="accessibilitySupport",e[e.accessibilityPageSize=3]="accessibilityPageSize",e[e.ariaLabel=4]="ariaLabel",e[e.autoClosingBrackets=5]="autoClosingBrackets",e[e.autoClosingDelete=6]="autoClosingDelete",e[e.autoClosingOvertype=7]="autoClosingOvertype",e[e.autoClosingQuotes=8]="autoClosingQuotes",e[e.autoIndent=9]="autoIndent",e[e.automaticLayout=10]="automaticLayout",e[e.autoSurround=11]="autoSurround",e[e.codeLens=12]="codeLens",e[e.codeLensFontFamily=13]="codeLensFontFamily",e[e.codeLensFontSize=14]="codeLensFontSize",e[e.colorDecorators=15]="colorDecorators",e[e.columnSelection=16]="columnSelection",e[e.comments=17]="comments",e[e.contextmenu=18]="contextmenu",e[e.copyWithSyntaxHighlighting=19]="copyWithSyntaxHighlighting",e[e.cursorBlinking=20]="cursorBlinking",e[e.cursorSmoothCaretAnimation=21]="cursorSmoothCaretAnimation",e[e.cursorStyle=22]="cursorStyle",e[e.cursorSurroundingLines=23]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=24]="cursorSurroundingLinesStyle",e[e.cursorWidth=25]="cursorWidth",e[e.disableLayerHinting=26]="disableLayerHinting",e[e.disableMonospaceOptimizations=27]="disableMonospaceOptimizations",e[e.domReadOnly=28]="domReadOnly",e[e.dragAndDrop=29]="dragAndDrop",e[e.emptySelectionClipboard=30]="emptySelectionClipboard",e[e.extraEditorClassName=31]="extraEditorClassName",e[e.fastScrollSensitivity=32]="fastScrollSensitivity",e[e.find=33]="find",e[e.fixedOverflowWidgets=34]="fixedOverflowWidgets",e[e.folding=35]="folding",e[e.foldingStrategy=36]="foldingStrategy",e[e.foldingHighlight=37]="foldingHighlight",e[e.unfoldOnClickAfterEndOfLine=38]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=39]="fontFamily",e[e.fontInfo=40]="fontInfo",e[e.fontLigatures=41]="fontLigatures",e[e.fontSize=42]="fontSize",e[e.fontWeight=43]="fontWeight",e[e.formatOnPaste=44]="formatOnPaste",e[e.formatOnType=45]="formatOnType",e[e.glyphMargin=46]="glyphMargin",e[e.gotoLocation=47]="gotoLocation",e[e.hideCursorInOverviewRuler=48]="hideCursorInOverviewRuler",e[e.highlightActiveIndentGuide=49]="highlightActiveIndentGuide",e[e.hover=50]="hover",e[e.inDiffEditor=51]="inDiffEditor",e[e.inlineSuggest=52]="inlineSuggest",e[e.letterSpacing=53]="letterSpacing",e[e.lightbulb=54]="lightbulb",e[e.lineDecorationsWidth=55]="lineDecorationsWidth",e[e.lineHeight=56]="lineHeight",e[e.lineNumbers=57]="lineNumbers",e[e.lineNumbersMinChars=58]="lineNumbersMinChars",e[e.linkedEditing=59]="linkedEditing",e[e.links=60]="links",e[e.matchBrackets=61]="matchBrackets",e[e.minimap=62]="minimap",e[e.mouseStyle=63]="mouseStyle",e[e.mouseWheelScrollSensitivity=64]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=65]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=66]="multiCursorMergeOverlapping",e[e.multiCursorModifier=67]="multiCursorModifier",e[e.multiCursorPaste=68]="multiCursorPaste",e[e.occurrencesHighlight=69]="occurrencesHighlight",e[e.overviewRulerBorder=70]="overviewRulerBorder",e[e.overviewRulerLanes=71]="overviewRulerLanes",e[e.padding=72]="padding",e[e.parameterHints=73]="parameterHints",e[e.peekWidgetDefaultFocus=74]="peekWidgetDefaultFocus",e[e.definitionLinkOpensInPeek=75]="definitionLinkOpensInPeek",e[e.quickSuggestions=76]="quickSuggestions",e[e.quickSuggestionsDelay=77]="quickSuggestionsDelay",e[e.readOnly=78]="readOnly",e[e.renameOnType=79]="renameOnType",e[e.renderControlCharacters=80]="renderControlCharacters",e[e.renderIndentGuides=81]="renderIndentGuides",e[e.renderFinalNewline=82]="renderFinalNewline",e[e.renderLineHighlight=83]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=84]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=85]="renderValidationDecorations",e[e.renderWhitespace=86]="renderWhitespace",e[e.revealHorizontalRightPadding=87]="revealHorizontalRightPadding",e[e.roundedSelection=88]="roundedSelection",e[e.rulers=89]="rulers",e[e.scrollbar=90]="scrollbar",e[e.scrollBeyondLastColumn=91]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=92]="scrollBeyondLastLine",e[e.scrollPredominantAxis=93]="scrollPredominantAxis",e[e.selectionClipboard=94]="selectionClipboard",e[e.selectionHighlight=95]="selectionHighlight",e[e.selectOnLineNumbers=96]="selectOnLineNumbers",e[e.showFoldingControls=97]="showFoldingControls",e[e.showUnused=98]="showUnused",e[e.snippetSuggestions=99]="snippetSuggestions",e[e.smartSelect=100]="smartSelect",e[e.smoothScrolling=101]="smoothScrolling",e[e.stickyTabStops=102]="stickyTabStops",e[e.stopRenderingLineAfter=103]="stopRenderingLineAfter",e[e.suggest=104]="suggest",e[e.suggestFontSize=105]="suggestFontSize",e[e.suggestLineHeight=106]="suggestLineHeight",e[e.suggestOnTriggerCharacters=107]="suggestOnTriggerCharacters",e[e.suggestSelection=108]="suggestSelection",e[e.tabCompletion=109]="tabCompletion",e[e.tabIndex=110]="tabIndex",e[e.unusualLineTerminators=111]="unusualLineTerminators",e[e.useShadowDOM=112]="useShadowDOM",e[e.useTabStops=113]="useTabStops",e[e.wordSeparators=114]="wordSeparators",e[e.wordWrap=115]="wordWrap",e[e.wordWrapBreakAfterCharacters=116]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=117]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=118]="wordWrapColumn",e[e.wordWrapOverride1=119]="wordWrapOverride1",e[e.wordWrapOverride2=120]="wordWrapOverride2",e[e.wrappingIndent=121]="wrappingIndent",e[e.wrappingStrategy=122]="wrappingStrategy",e[e.showDeprecated=123]="showDeprecated",e[e.inlayHints=124]="inlayHints",e[e.editorClassName=125]="editorClassName",e[e.pixelRatio=126]="pixelRatio",e[e.tabFocusMode=127]="tabFocusMode",e[e.layoutInfo=128]="layoutInfo",e[e.wrappingInfo=129]="wrappingInfo"}(g||(g={})),function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"}(f||(f={})),function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"}(p||(p={})),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(m||(m={})),function(e){e[e.Other=0]="Other",e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(_||(_={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(v||(v={})),function(e){e[e.DependsOnKbLayout=-1]="DependsOnKbLayout",e[e.Unknown=0]="Unknown",e[e.Backspace=1]="Backspace",e[e.Tab=2]="Tab",e[e.Enter=3]="Enter",e[e.Shift=4]="Shift",e[e.Ctrl=5]="Ctrl",e[e.Alt=6]="Alt",e[e.PauseBreak=7]="PauseBreak",e[e.CapsLock=8]="CapsLock",e[e.Escape=9]="Escape",e[e.Space=10]="Space",e[e.PageUp=11]="PageUp",e[e.PageDown=12]="PageDown",e[e.End=13]="End",e[e.Home=14]="Home",e[e.LeftArrow=15]="LeftArrow",e[e.UpArrow=16]="UpArrow",e[e.RightArrow=17]="RightArrow",e[e.DownArrow=18]="DownArrow",e[e.Insert=19]="Insert",e[e.Delete=20]="Delete",e[e.KEY_0=21]="KEY_0",e[e.KEY_1=22]="KEY_1",e[e.KEY_2=23]="KEY_2",e[e.KEY_3=24]="KEY_3",e[e.KEY_4=25]="KEY_4",e[e.KEY_5=26]="KEY_5",e[e.KEY_6=27]="KEY_6",e[e.KEY_7=28]="KEY_7",e[e.KEY_8=29]="KEY_8",e[e.KEY_9=30]="KEY_9",e[e.KEY_A=31]="KEY_A",e[e.KEY_B=32]="KEY_B",e[e.KEY_C=33]="KEY_C",e[e.KEY_D=34]="KEY_D",e[e.KEY_E=35]="KEY_E",e[e.KEY_F=36]="KEY_F",e[e.KEY_G=37]="KEY_G",e[e.KEY_H=38]="KEY_H",e[e.KEY_I=39]="KEY_I",e[e.KEY_J=40]="KEY_J",e[e.KEY_K=41]="KEY_K",e[e.KEY_L=42]="KEY_L",e[e.KEY_M=43]="KEY_M",e[e.KEY_N=44]="KEY_N",e[e.KEY_O=45]="KEY_O",e[e.KEY_P=46]="KEY_P",e[e.KEY_Q=47]="KEY_Q",e[e.KEY_R=48]="KEY_R",e[e.KEY_S=49]="KEY_S",e[e.KEY_T=50]="KEY_T",e[e.KEY_U=51]="KEY_U",e[e.KEY_V=52]="KEY_V",e[e.KEY_W=53]="KEY_W",e[e.KEY_X=54]="KEY_X",e[e.KEY_Y=55]="KEY_Y",e[e.KEY_Z=56]="KEY_Z",e[e.Meta=57]="Meta",e[e.ContextMenu=58]="ContextMenu",e[e.F1=59]="F1",e[e.F2=60]="F2",e[e.F3=61]="F3",e[e.F4=62]="F4",e[e.F5=63]="F5",e[e.F6=64]="F6",e[e.F7=65]="F7",e[e.F8=66]="F8",e[e.F9=67]="F9",e[e.F10=68]="F10",e[e.F11=69]="F11",e[e.F12=70]="F12",e[e.F13=71]="F13",e[e.F14=72]="F14",e[e.F15=73]="F15",e[e.F16=74]="F16",e[e.F17=75]="F17",e[e.F18=76]="F18",e[e.F19=77]="F19",e[e.NumLock=78]="NumLock",e[e.ScrollLock=79]="ScrollLock",e[e.US_SEMICOLON=80]="US_SEMICOLON",e[e.US_EQUAL=81]="US_EQUAL",e[e.US_COMMA=82]="US_COMMA",e[e.US_MINUS=83]="US_MINUS",e[e.US_DOT=84]="US_DOT",e[e.US_SLASH=85]="US_SLASH",e[e.US_BACKTICK=86]="US_BACKTICK",e[e.US_OPEN_SQUARE_BRACKET=87]="US_OPEN_SQUARE_BRACKET",e[e.US_BACKSLASH=88]="US_BACKSLASH",e[e.US_CLOSE_SQUARE_BRACKET=89]="US_CLOSE_SQUARE_BRACKET",e[e.US_QUOTE=90]="US_QUOTE",e[e.OEM_8=91]="OEM_8",e[e.OEM_102=92]="OEM_102",e[e.NUMPAD_0=93]="NUMPAD_0",e[e.NUMPAD_1=94]="NUMPAD_1",e[e.NUMPAD_2=95]="NUMPAD_2",e[e.NUMPAD_3=96]="NUMPAD_3",e[e.NUMPAD_4=97]="NUMPAD_4",e[e.NUMPAD_5=98]="NUMPAD_5",e[e.NUMPAD_6=99]="NUMPAD_6",e[e.NUMPAD_7=100]="NUMPAD_7",e[e.NUMPAD_8=101]="NUMPAD_8",e[e.NUMPAD_9=102]="NUMPAD_9",e[e.NUMPAD_MULTIPLY=103]="NUMPAD_MULTIPLY",e[e.NUMPAD_ADD=104]="NUMPAD_ADD",e[e.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",e[e.NUMPAD_SUBTRACT=106]="NUMPAD_SUBTRACT",e[e.NUMPAD_DECIMAL=107]="NUMPAD_DECIMAL",e[e.NUMPAD_DIVIDE=108]="NUMPAD_DIVIDE",e[e.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",e[e.ABNT_C1=110]="ABNT_C1",e[e.ABNT_C2=111]="ABNT_C2",e[e.MAX_VALUE=112]="MAX_VALUE"}(b||(b={})),function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(y||(y={})),function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"}(w||(w={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(C||(C={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.TEXTAREA=1]="TEXTAREA",e[e.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",e[e.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",e[e.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",e[e.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",e[e.CONTENT_TEXT=6]="CONTENT_TEXT",e[e.CONTENT_EMPTY=7]="CONTENT_EMPTY",e[e.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",e[e.CONTENT_WIDGET=9]="CONTENT_WIDGET",e[e.OVERVIEW_RULER=10]="OVERVIEW_RULER",e[e.SCROLLBAR=11]="SCROLLBAR",e[e.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",e[e.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"}(S||(S={})),function(e){e[e.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",e[e.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",e[e.TOP_CENTER=2]="TOP_CENTER"}(x||(x={})),function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(k||(k={})),function(e){e[e.Off=0]="Off",e[e.On=1]="On",e[e.Relative=2]="Relative",e[e.Interval=3]="Interval",e[e.Custom=4]="Custom"}(D||(D={})),function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"}(L||(L={})),function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"}(N||(N={})),function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"}(E||(E={})),function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"}(A||(A={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(M||(M={})),function(e){e[e.File=0]="File",e[e.Module=1]="Module",e[e.Namespace=2]="Namespace",e[e.Package=3]="Package",e[e.Class=4]="Class",e[e.Method=5]="Method",e[e.Property=6]="Property",e[e.Field=7]="Field",e[e.Constructor=8]="Constructor",e[e.Enum=9]="Enum",e[e.Interface=10]="Interface",e[e.Function=11]="Function",e[e.Variable=12]="Variable",e[e.Constant=13]="Constant",e[e.String=14]="String",e[e.Number=15]="Number",e[e.Boolean=16]="Boolean",e[e.Array=17]="Array",e[e.Object=18]="Object",e[e.Key=19]="Key",e[e.Null=20]="Null",e[e.EnumMember=21]="EnumMember",e[e.Struct=22]="Struct",e[e.Event=23]="Event",e[e.Operator=24]="Operator",e[e.TypeParameter=25]="TypeParameter"}(I||(I={})),function(e){e[e.Deprecated=1]="Deprecated"}(T||(T={})),function(e){e[e.Hidden=0]="Hidden",e[e.Blink=1]="Blink",e[e.Smooth=2]="Smooth",e[e.Phase=3]="Phase",e[e.Expand=4]="Expand",e[e.Solid=5]="Solid"}(R||(R={})),function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(O||(O={})),function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"}(F||(F={})),function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"}(P||(P={}));class K{static chord(e,t){return(0,V.gx)(e,t)}}function G(){return{editor:void 0,languages:void 0,CancellationTokenSource:z.A,Emitter:W.Q5,KeyCode:b,KeyMod:K,Position:$.L,Range:U.e,Selection:j.Y,SelectionDirection:A,MarkerSeverity:y,MarkerTag:w,Uri:H.o,Token:q.WU}}K.CtrlCmd=2048,K.Shift=1024,K.Alt=512,K.WinCtrl=256;var Y,Z=i(1640),X=i(5321),Q=i(1741),J=i(3702),ee=i(3897),te=i(6663),ie=i(5935),ne=i(4565);!function(e){e[e.API=0]="API",e[e.USER=1]="USER"}(Y||(Y={}));var oe=i(988),re=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},se=function(e,t){return function(i,n){t(i,n,e)}},ae=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};let le=class{constructor(e){this._commandService=e}open(e,t){return ae(this,void 0,void 0,(function*(){if(!(0,oe.xn)(e,te.lg.command))return!1;if(!(null==t?void 0:t.allowCommands))return!0;"string"==typeof e&&(e=H.o.parse(e));let i=[];try{i=(0,ee.Q)(decodeURIComponent(e.query))}catch(t){try{i=(0,ee.Q)(e.query)}catch(e){}}return Array.isArray(i)||(i=[i]),yield this._commandService.executeCommand(e.path,...i),!0}))}};le=re([se(0,ne.H)],le);let ce=class{constructor(e){this._editorService=e}open(e,t){return ae(this,void 0,void 0,(function*(){let i;"string"==typeof e&&(e=H.o.parse(e));const n=/^L?(\d+)(?:,(\d+))?/.exec(e.fragment);return n&&(i={startLineNumber:parseInt(n[1]),startColumn:n[2]?parseInt(n[2]):1},e=e.with({fragment:""})),e.scheme===te.lg.file&&(e=(0,ie.AH)(e)),yield this._editorService.openCodeEditor({resource:e,options:Object.assign({selection:i,context:(null==t?void 0:t.fromUserGesture)?Y.USER:Y.API},null==t?void 0:t.editorOptions)},this._editorService.getFocusedCodeEditor(),null==t?void 0:t.openToSide),!0}))}};ce=re([se(0,Z.$)],ce);let ue=class{constructor(e,t){this._openers=new Q.S,this._validators=new Q.S,this._resolvers=new Q.S,this._resolvedUriTargets=new J.Y9((e=>e.with({path:null,fragment:null,query:null}).toString())),this._externalOpeners=new Q.S,this._defaultExternalOpener={openExternal:e=>ae(this,void 0,void 0,(function*(){return(0,oe.xn)(e,te.lg.http)||(0,oe.xn)(e,te.lg.https)?X.V3(e):window.location.href=e,!0}))},this._openers.push({open:(e,t)=>ae(this,void 0,void 0,(function*(){return!!((null==t?void 0:t.openExternal)||(0,oe.xn)(e,te.lg.mailto)||(0,oe.xn)(e,te.lg.http)||(0,oe.xn)(e,te.lg.https))&&(yield this._doOpenExternal(e,t),!0)}))}),this._openers.push(new le(t)),this._openers.push(new ce(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}registerValidator(e){return{dispose:this._validators.push(e)}}registerExternalUriResolver(e){return{dispose:this._resolvers.push(e)}}setDefaultExternalOpener(e){this._defaultExternalOpener=e}registerExternalOpener(e){return{dispose:this._externalOpeners.push(e)}}open(e,t){var i;return ae(this,void 0,void 0,(function*(){const n="string"==typeof e?H.o.parse(e):e,o=null!==(i=this._resolvedUriTargets.get(n))&&void 0!==i?i:e;for(const e of this._validators)if(!(yield e.shouldOpen(o)))return!1;for(const i of this._openers)if(yield i.open(e,t))return!0;return!1}))}resolveExternalUri(e,t){return ae(this,void 0,void 0,(function*(){for(const i of this._resolvers)try{const n=yield i.resolveExternalUri(e,t);if(n)return this._resolvedUriTargets.has(n.resolved)||this._resolvedUriTargets.set(n.resolved,e),n}catch(e){}throw new Error("Could not resolve external URI: "+e.toString())}))}_doOpenExternal(e,t){return ae(this,void 0,void 0,(function*(){const i="string"==typeof e?H.o.parse(e):e;let n,o;try{n=(yield this.resolveExternalUri(i,t)).resolved}catch(e){n=i}if(o="string"==typeof e&&i.toString()===n.toString()?e:encodeURI(n.toString(!0)),null==t?void 0:t.allowContributedOpeners){const e="string"==typeof(null==t?void 0:t.allowContributedOpeners)?null==t?void 0:t.allowContributedOpeners:void 0;for(const t of this._externalOpeners)if(yield t.openExternal(o,{sourceUri:i,preferredOpenerId:e},z.T.None))return!0}return this._defaultExternalOpener.openExternal(o,{sourceUri:i},z.T.None)}))}dispose(){this._validators.clear()}};ue=re([se(0,Z.$),se(1,ne.H)],ue);var he=i(5146),de=i(5976),ge=i(6248);const fe={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0};class pe extends de.JT{constructor(e,t={}){super(),this._onDidUpdate=this._register(new W.Q5),this._editor=e,this._options=ge.jB(t,fe,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=Boolean(this._options.alwaysRevealFirst),this._register(this._editor.onDidDispose((()=>this.dispose()))),this._register(this._editor.onDidUpdateDiff((()=>this._onDiffUpdated()))),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition((e=>{this.ignoreSelectionChange||(this.nextIdx=-1)}))),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel((e=>{this.revealFirst=!0}))),this._init()}_init(){this._editor.getLineChanges()}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(e){this.ranges=[],e&&e.forEach((e=>{!this._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach((e=>{this.ranges.push({rhs:!0,range:new U.e(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})})):this.ranges.push({rhs:!0,range:new U.e(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber,1)})})),this.ranges.sort(((e,t)=>e.range.getStartPosition().isBeforeOrEqual(t.range.getStartPosition())?-1:t.range.getStartPosition().isBeforeOrEqual(e.range.getStartPosition())?1:0)),this._onDidUpdate.fire(this)}_initIdx(e){let t=!1,i=this._editor.getPosition();if(i){for(let n=0,o=this.ranges.length;n=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));let i=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{let e=i.range.getStartPosition();this._editor.setPosition(e),this._editor.revealPositionInCenter(e,t)}finally{this.ignoreSelectionChange=!1}}canNavigate(){return this.ranges&&this.ranges.length>0}next(e=0){this._move(!0,e)}previous(e=0){this._move(!1,e)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}}var me=i(7374),_e=i(6518),ve=i(4973),be=i(4101),ye=i(8111),we=i(469),Ce=i(1531),Se=i(8216),xe=i(5393),ke=i(7301),De=i(1432),Le=i(8401);let Ne=!1;function Ee(e){De.$L&&(Ne||(Ne=!0,console.warn("Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/microsoft/monaco-editor#faq")),console.warn(e.message))}class Ae{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null)}setWorkerId(e){this._workerId=e}sendMessage(e,t){let i=String(++this._lastSentReq);return new Promise(((n,o)=>{this._pendingReplies[i]={resolve:n,reject:o},this._send({vsWorker:this._workerId,req:i,method:e,args:t})}))}handleMessage(e){e&&e.vsWorker&&(-1!==this._workerId&&e.vsWorker!==this._workerId||this._handleMessage(e))}_handleMessage(e){if(e.seq){let t=e;if(!this._pendingReplies[t.seq])return void console.warn("Got reply to unknown seq");let i=this._pendingReplies[t.seq];if(delete this._pendingReplies[t.seq],t.err){let e=t.err;return t.err.$isError&&(e=new Error,e.name=t.err.name,e.message=t.err.message,e.stack=t.err.stack),void i.reject(e)}return void i.resolve(t.res)}let t=e,i=t.req;this._handler.handleMessage(t.method,t.args).then((e=>{this._send({vsWorker:this._workerId,seq:i,res:e,err:void 0})}),(e=>{e.detail instanceof Error&&(e.detail=(0,ke.ri)(e.detail)),this._send({vsWorker:this._workerId,seq:i,res:void 0,err:(0,ke.ri)(e)})}))}_send(e){let t=[];if(e.req){const i=e;for(let e=0;e{this._protocol.handleMessage(e)}),(e=>{n&&n(e)}))),this._protocol=new Ae({sendMessage:(e,t)=>{this._worker.postMessage(e,t)},handleMessage:(e,t)=>{if("function"!=typeof i[e])return Promise.reject(new Error("Missing method "+e+" on main thread host."));try{return Promise.resolve(i[e].apply(i,t))}catch(e){return Promise.reject(e)}}}),this._protocol.setWorkerId(this._worker.getId());let o=null;void 0!==self.require&&"function"==typeof self.require.getConfig?o=self.require.getConfig():void 0!==self.requirejs&&(o=self.requirejs.s.contexts._.config);const r=Le.$E(i);this._onModuleLoaded=this._protocol.sendMessage("$initialize",[this._worker.getId(),JSON.parse(JSON.stringify(o)),t,r]);const s=(e,t)=>this._request(e,t);this._lazyProxy=new Promise(((e,i)=>{n=i,this._onModuleLoaded.then((t=>{e(Le.IU(t,s))}),(e=>{i(e),this._onError("Worker failed to load "+t,e)}))}))}getProxyObject(){return this._lazyProxy}_request(e,t){return new Promise(((i,n)=>{this._onModuleLoaded.then((()=>{this._protocol.sendMessage(e,t).then(i,n)}),n)}))}_onError(e,t){console.error(e),console.info(t)}}var Ie;const Te=null===(Ie=window.trustedTypes)||void 0===Ie?void 0:Ie.createPolicy("defaultWorkerFactory",{createScriptURL:e=>e});class Re{constructor(e,t,i,n,o){this.id=t;const r=function(e,t){if(De.li.MonacoEnvironment){if("function"==typeof De.li.MonacoEnvironment.getWorker)return De.li.MonacoEnvironment.getWorker(e,t);if("function"==typeof De.li.MonacoEnvironment.getWorkerUrl){const i=De.li.MonacoEnvironment.getWorkerUrl(e,t);return new Worker(Te?Te.createScriptURL(i):i,{name:t})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}("workerMain.js",i);"function"==typeof r.then?this.worker=r:this.worker=Promise.resolve(r),this.postMessage(e,[]),this.worker.then((e=>{e.onmessage=function(e){n(e.data)},e.onmessageerror=o,"function"==typeof e.addEventListener&&e.addEventListener("error",o)}))}getId(){return this.id}postMessage(e,t){this.worker&&this.worker.then((i=>i.postMessage(e,t)))}dispose(){this.worker&&this.worker.then((e=>e.terminate())),this.worker=null}}class Oe{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,t,i){let n=++Oe.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new Re(e,n,this._label||"anonymous"+n,t,(e=>{Ee(e),this._webWorkerFailedBeforeError=e,i(e)}))}}Oe.LAST_WORKER_ID=0;var Fe=i(3831),Pe=i(2484),Be=i(7295);function ze(e,t,i,n){return new Pe.Hs(e,t,i).ComputeDiff(n)}class We{constructor(e){const t=[],i=[];for(let n=0,o=e.length;n0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&o()){const r=i.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),a=n.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);let l=ze(r,a,o,!0).changes;s&&(l=function(e){if(e.length<=1)return e;const t=[e[0]];let i=t[0];for(let n=1,o=e.length;n1&&s>1&&e.charCodeAt(i-2)===t.charCodeAt(s-2);)i--,s--;(i>1||s>1)&&this._pushTrimWhitespaceCharChange(n,o+1,1,i,r+1,1,s)}{let i=qe(e,1),s=qe(t,1);const a=e.length+1,l=t.length+1;for(;i!0;const t=Date.now();return()=>Date.now()-tt&&(t=r),o>i&&(i=o),s>i&&(i=s)}t++,i++;let n=new Xe(i,t,0);for(let t=0,i=e.length;t=this._maxCharCode?0:this._states.get(e,t)}}let Je=null,et=null;class tt{static _createLink(e,t,i,n,o){let r=o-1;do{const i=t.charCodeAt(r);if(2!==e.get(i))break;r--}while(r>n);if(n>0){const e=t.charCodeAt(n-1),i=t.charCodeAt(r);(40===e&&41===i||91===e&&93===i||123===e&&125===i)&&r--}return{range:{startLineNumber:i,startColumn:n+1,endLineNumber:i,endColumn:r+2},url:t.substring(n,r+1)}}static computeLinks(e,t=function(){return null===Je&&(Je=new Qe([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),Je}()){const i=function(){if(null===et){et=new Ze.N(0);const e=" \t<>'\"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…";for(let t=0;t=0?(n+=i?1:-1,n<0?n=e.length-1:n%=e.length,e[n]):null}}it.INSTANCE=new it;var nt=i(4013),ot=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class rt extends class{constructor(e,t,i,n){this._uri=e,this._lines=t,this._eol=i,this._versionId=n,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return null===this._cachedTextValue&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const e of t)this._acceptDeleteRange(e.range),this._acceptInsertText(new $.L(e.range.startLineNumber,e.range.startColumn),e.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,i=new Uint32Array(t);for(let n=0;nthis._lines.length)t=this._lines.length,i=this._lines[t-1].length+1,n=!0;else{let e=this._lines[t-1].length+1;i<1?(i=1,n=!0):i>e&&(i=e,n=!0)}return n?{lineNumber:t,column:i}:e}}class st{constructor(e,t){this._host=e,this._models=Object.create(null),this._foreignModuleFactory=t,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(e){return this._models[e]}_getModels(){let e=[];return Object.keys(this._models).forEach((t=>e.push(this._models[t]))),e}acceptNewModel(e){this._models[e.url]=new rt(H.o.parse(e.url),e.lines,e.EOL,e.versionId)}acceptModelChanged(e,t){this._models[e]&&this._models[e].onEvents(t)}acceptRemovedModel(e){this._models[e]&&delete this._models[e]}computeDiff(e,t,i,n){return ot(this,void 0,void 0,(function*(){const o=this._getModel(e),r=this._getModel(t);if(!o||!r)return null;const s=o.getLinesContent(),a=r.getLinesContent(),l=new Ue(s,a,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:i,shouldMakePrettyDiff:!0,maxComputationTime:n}).computeDiff(),c=!(l.changes.length>0)&&this._modelsAreIdentical(o,r);return{quitEarly:l.quitEarly,identical:c,changes:l.changes}}))}_modelsAreIdentical(e,t){const i=e.getLineCount();if(i!==t.getLineCount())return!1;for(let n=1;n<=i;n++)if(e.getLineContent(n)!==t.getLineContent(n))return!1;return!0}computeMoreMinimalEdits(e,t){return ot(this,void 0,void 0,(function*(){const i=this._getModel(e);if(!i)return t;const n=[];let o;t=t.slice(0).sort(((e,t)=>e.range&&t.range?U.e.compareRangesUsingStarts(e.range,t.range):(e.range?0:1)-(t.range?0:1)));for(let{range:e,text:r,eol:s}of t){if("number"==typeof s&&(o=s),U.e.isEmpty(e)&&!r)continue;const t=i.getValueInRange(e);if(r=r.replace(/\r\n|\n|\r/g,i.eol),t===r)continue;if(Math.max(r.length,t.length)>st._diffLimit){n.push({range:e,text:r});continue}const a=(0,Pe.a$)(t,r,!1),l=i.offsetAt(U.e.lift(e).getStartPosition());for(const e of a){const t=i.positionAt(l+e.originalStart),o=i.positionAt(l+e.originalStart+e.originalLength),s={text:r.substr(e.modifiedStart,e.modifiedLength),range:{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:o.lineNumber,endColumn:o.column}};i.getValueInRange(s.range)!==s.text&&n.push(s)}}return"number"==typeof o&&n.push({eol:o,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),n}))}computeLinks(e){return ot(this,void 0,void 0,(function*(){let t=this._getModel(e);return t?function(e){return e&&"function"==typeof e.getLineCount&&"function"==typeof e.getLineContent?tt.computeLinks(e):[]}(t):null}))}textualSuggest(e,t,i,n){return ot(this,void 0,void 0,(function*(){const o=new nt.G(!0),r=new RegExp(i,n),s=new Set;e:for(let i of e){const e=this._getModel(i);if(e)for(let i of e.words(r))if(i!==t&&isNaN(Number(i))&&(s.add(i),s.size>st._suggestionsLimit))break e}return{words:Array.from(s),duration:o.elapsed()}}))}computeWordRanges(e,t,i,n){return ot(this,void 0,void 0,(function*(){let o=this._getModel(e);if(!o)return Object.create(null);const r=new RegExp(i,n),s=Object.create(null);for(let e=t.startLineNumber;ethis._host.fhr(e,t))),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(n,t),Promise.resolve(Le.$E(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,t){if(!this._foreignModule||"function"!=typeof this._foreignModule[e])return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(e){return Promise.reject(e)}}}st._diffLimit=1e5,st._suggestionsLimit=1e4,"function"==typeof importScripts&&(De.li.monaco=G());var at=i(1200),lt=i(3187),ct=i(9488),ut=i(3557),ht=function(e,t){return function(i,n){t(i,n,e)}},dt=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function gt(e,t){let i=e.getModel(t);return!!i&&!i.isTooLargeForSyncing()}let ft=class extends de.JT{constructor(e,t,i){super(),this._modelService=e,this._workerManager=this._register(new mt(this._modelService)),this._logService=i,this._register(be.pM.register("*",{provideLinks:(e,t)=>gt(this._modelService,e.uri)?this._workerManager.withWorker().then((t=>t.computeLinks(e.uri))).then((e=>e&&{links:e})):Promise.resolve({links:[]})})),this._register(be.KZ.register("*",new pt(this._workerManager,t,this._modelService)))}dispose(){super.dispose()}canComputeDiff(e,t){return gt(this._modelService,e)&>(this._modelService,t)}computeDiff(e,t,i,n){return this._workerManager.withWorker().then((o=>o.computeDiff(e,t,i,n)))}computeMoreMinimalEdits(e,t){if((0,ct.Of)(t)){if(!gt(this._modelService,e))return Promise.resolve(t);const i=nt.G.create(!0),n=this._workerManager.withWorker().then((i=>i.computeMoreMinimalEdits(e,t)));return n.finally((()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),i.elapsed()))),Promise.race([n,(0,xe.Vs)(1e3).then((()=>t))])}return Promise.resolve(void 0)}canNavigateValueSet(e){return gt(this._modelService,e)}navigateValueSet(e,t,i){return this._workerManager.withWorker().then((n=>n.navigateValueSet(e,t,i)))}canComputeWordRanges(e){return gt(this._modelService,e)}computeWordRanges(e,t){return this._workerManager.withWorker().then((i=>i.computeWordRanges(e,t)))}};ft=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([ht(0,at.q),ht(1,lt.V),ht(2,ut.VZ)],ft);class pt{constructor(e,t,i){this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=i}provideCompletionItems(e,t){return dt(this,void 0,void 0,(function*(){const i=this._configurationService.getValue(e.uri,t,"editor");if(!i.wordBasedSuggestions)return;const n=[];if("currentDocument"===i.wordBasedSuggestionsMode)gt(this._modelService,e.uri)&&n.push(e.uri);else for(const t of this._modelService.getModels())gt(this._modelService,t.uri)&&(t===e?n.unshift(t.uri):"allDocuments"!==i.wordBasedSuggestionsMode&&t.getLanguageIdentifier().id!==e.getLanguageIdentifier().id||n.push(t.uri));if(0===n.length)return;const o=Fe.zu.getWordDefinition(e.getLanguageIdentifier().id),r=e.getWordAtPosition(t),s=r?new U.e(t.lineNumber,r.startColumn,t.lineNumber,r.endColumn):U.e.fromPositions(t),a=s.setEndPosition(t.lineNumber,t.column),l=yield this._workerManager.withWorker(),c=yield l.textualSuggest(n,null==r?void 0:r.word,o);return c?{duration:c.duration,suggestions:c.words.map((e=>({kind:18,label:e,insertText:e,range:{insert:a,replace:s}})))}:void 0}))}}class mt extends de.JT{constructor(e){super(),this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=(new Date).getTime(),this._register(new xe.zh).cancelAndSet((()=>this._checkStopIdleWorker()),Math.round(15e4)),this._register(this._modelService.onModelRemoved((e=>this._checkStopEmptyWorker())))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){this._editorWorkerClient&&0===this._modelService.getModels().length&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){this._editorWorkerClient&&(new Date).getTime()-this._lastWorkerUsedTime>3e5&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=(new Date).getTime(),this._editorWorkerClient||(this._editorWorkerClient=new yt(this._modelService,!1,"editorWorkerService")),Promise.resolve(this._editorWorkerClient)}}class _t extends de.JT{constructor(e,t,i){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!i){let e=new xe.zh;e.cancelAndSet((()=>this._checkStopModelSync()),Math.round(3e4)),this._register(e)}}dispose(){for(let e in this._syncedModels)(0,de.B9)(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e){for(const t of e){let e=t.toString();this._syncedModels[e]||this._beginModelSync(t),this._syncedModels[e]&&(this._syncedModelsLastUsedTime[e]=(new Date).getTime())}}_checkStopModelSync(){let e=(new Date).getTime(),t=[];for(let i in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[i]>6e4&&t.push(i);for(const e of t)this._stopModelSync(e)}_beginModelSync(e){let t=this._modelService.getModel(e);if(!t)return;if(t.isTooLargeForSyncing())return;let i=e.toString();this._proxy.acceptNewModel({url:t.uri.toString(),lines:t.getLinesContent(),EOL:t.getEOL(),versionId:t.getVersionId()});const n=new de.SL;n.add(t.onDidChangeContent((e=>{this._proxy.acceptModelChanged(i.toString(),e)}))),n.add(t.onWillDispose((()=>{this._stopModelSync(i)}))),n.add((0,de.OF)((()=>{this._proxy.acceptRemovedModel(i)}))),this._syncedModels[i]=n}_stopModelSync(e){let t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],(0,de.B9)(t)}}class vt{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class bt{constructor(e){this._workerClient=e}fhr(e,t){return this._workerClient.fhr(e,t)}}class yt extends de.JT{constructor(e,t,i){super(),this._disposed=!1,this._modelService=e,this._keepIdleModels=t,this._workerFactory=new Oe(i),this._worker=null,this._modelManager=null}fhr(e,t){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new Me(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new bt(this)))}catch(e){Ee(e),this._worker=new vt(new st(new bt(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,(e=>(Ee(e),this._worker=new vt(new st(new bt(this),null)),this._getOrCreateWorker().getProxyObject())))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new _t(e,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(e){return this._disposed?Promise.reject((0,ke.F0)()):this._getProxy().then((t=>(this._getOrCreateModelManager(t).ensureSyncedResources(e),t)))}computeDiff(e,t,i,n){return this._withSyncedResources([e,t]).then((o=>o.computeDiff(e.toString(),t.toString(),i,n)))}computeMoreMinimalEdits(e,t){return this._withSyncedResources([e]).then((i=>i.computeMoreMinimalEdits(e.toString(),t)))}computeLinks(e){return this._withSyncedResources([e]).then((t=>t.computeLinks(e.toString())))}textualSuggest(e,t,i){return dt(this,void 0,void 0,(function*(){const n=yield this._withSyncedResources(e),o=i.source,r=(0,Be.mr)(i);return n.textualSuggest(e.map((e=>e.toString())),t,o,r)}))}computeWordRanges(e,t){return this._withSyncedResources([e]).then((i=>{let n=this._modelService.getModel(e);if(!n)return Promise.resolve(null);let o=Fe.zu.getWordDefinition(n.getLanguageIdentifier().id),r=o.source,s=(0,Be.mr)(o);return i.computeWordRanges(e.toString(),t,r,s)}))}navigateValueSet(e,t,i){return this._withSyncedResources([e]).then((n=>{let o=this._modelService.getModel(e);if(!o)return null;let r=Fe.zu.getWordDefinition(o.getLanguageIdentifier().id),s=r.source,a=(0,Be.mr)(r);return n.navigateValueSet(e.toString(),t,i,s,a)}))}dispose(){super.dispose(),this._disposed=!0}}class wt extends yt{constructor(e,t){super(e,t.keepIdleModels||!1,t.label),this._foreignModuleId=t.moduleId,this._foreignModuleCreateData=t.createData||null,this._foreignModuleHost=t.host||null,this._foreignProxy=null}fhr(e,t){if(!this._foreignModuleHost||"function"!=typeof this._foreignModuleHost[e])return Promise.reject(new Error("Missing method "+e+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[e].apply(this._foreignModuleHost,t))}catch(e){return Promise.reject(e)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then((e=>{const t=this._foreignModuleHost?Le.$E(this._foreignModuleHost):[];return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then((t=>{this._foreignModuleCreateData=null;const i=(t,i)=>e.fmr(t,i),n=(e,t)=>function(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)};let o={};for(const e of t)o[e]=n(e,i);return o}))}))),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then((e=>this.getProxy()))}}var Ct,St=i(8411),xt=i(7736),kt=i(3824);function Dt(e){return"string"==typeof e}function Lt(e){return!Dt(e)}function Nt(e){return!e}function Et(e,t){return e.ignoreCase&&t?t.toLowerCase():t}function At(e){return e.replace(/[&<>'"_]/g,"-")}function Mt(e,t){return new Error(`${e.languageId}: ${t}`)}function It(e,t,i,n,o){let r=null;return t.replace(/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g,(function(t,s,a,l,c,u,h,d,g){return Nt(a)?Nt(l)?!Nt(c)&&c0;){const t=e.tokenizer[i];if(t)return t;const n=i.lastIndexOf(".");i=n<0?null:i.substr(0,n)}return null}class Rt{constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}static create(e,t){return this._INSTANCE.create(e,t)}create(e,t){if(null!==e&&e.depth>=this._maxCacheDepth)return new Ot(e,t);let i=Ot.getStackElementId(e);i.length>0&&(i+="|"),i+=t;let n=this._entries[i];return n||(n=new Ot(e,t),this._entries[i]=n,n)}}Rt._INSTANCE=new Rt(5);class Ot{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";for(;null!==e;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){for(;null!==e&&null!==t;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return null===e&&null===t}equals(e){return Ot._equals(this,e)}push(e){return Rt.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return Rt.create(this.parent,e)}}class Ft{constructor(e,t){this.modeId=e,this.state=t}equals(e){return this.modeId===e.modeId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new Ft(this.modeId,this.state)}}class Pt{constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}static create(e,t){return this._INSTANCE.create(e,t)}create(e,t){if(null!==t)return new Bt(e,t);if(null!==e&&e.depth>=this._maxCacheDepth)return new Bt(e,t);let i=Ot.getStackElementId(e),n=this._entries[i];return n||(n=new Bt(e,null),this._entries[i]=n,n)}}Pt._INSTANCE=new Pt(5);class Bt{constructor(e,t){this.stack=e,this.embeddedModeData=t}clone(){return(this.embeddedModeData?this.embeddedModeData.clone():null)===this.embeddedModeData?this:Pt.create(this.stack,this.embeddedModeData)}equals(e){return e instanceof Bt&&!!this.stack.equals(e.stack)&&(null===this.embeddedModeData&&null===e.embeddedModeData||null!==this.embeddedModeData&&null!==e.embeddedModeData&&this.embeddedModeData.equals(e.embeddedModeData))}}class zt{constructor(){this._tokens=[],this._language=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterMode(e,t){this._language=t}emit(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._language||(this._lastTokenType=t,this._lastTokenLanguage=this._language,this._tokens.push(new q.WU(e,t,this._language)))}nestedModeTokenize(e,t,i,n){const o=i.modeId,r=i.state,s=be.RW.get(o);if(!s)return this.enterMode(n,o),this.emit(n,""),r;let a=s.tokenize(e,t,r,n);return this._tokens=this._tokens.concat(a.tokens),this._lastTokenType=null,this._lastTokenLanguage=null,this._language=null,a.endState}finalize(e){return new q.hG(this._tokens,e)}}class Wt{constructor(e,t){this._modeService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterMode(e,t){this._currentLanguageId=this._modeService.getLanguageIdentifier(t).id}emit(e,t){let i=this._theme.match(this._currentLanguageId,t);this._lastTokenMetadata!==i&&(this._lastTokenMetadata=i,this._tokens.push(e),this._tokens.push(i))}static _merge(e,t,i){let n=null!==e?e.length:0,o=t.length,r=null!==i?i.length:0;if(0===n&&0===o&&0===r)return new Uint32Array(0);if(0===n&&0===o)return i;if(0===o&&0===r)return e;let s=new Uint32Array(n+o+r);null!==e&&s.set(e);for(let e=0;e{if(o)return;let t=!1;for(let i=0,n=e.changedLanguages.length;i{}))}}getInitialState(){let e=Rt.create(null,this._lexer.start);return Pt.create(e,null)}tokenize(e,t,i,n){let o=new zt,r=this._tokenize(e,t,i,n,o);return o.finalize(r)}tokenize2(e,t,i,n){let o=new Wt(this._modeService,this._standaloneThemeService.getColorTheme().tokenTheme),r=this._tokenize(e,t,i,n,o);return o.finalize(r)}_tokenize(e,t,i,n,o){return i.embeddedModeData?this._nestedTokenize(e,t,i,n,o):this._myTokenize(e,t,i,n,o)}_findLeavingNestedModeOffset(e,t){let i=this._lexer.tokenizer[t.stack.state];if(!i&&(i=Tt(this._lexer,t.stack.state),!i))throw Mt(this._lexer,"tokenizer state is not defined: "+t.stack.state);let n=-1,o=!1;for(const t of i){if(!Lt(t.action)||"@pop"!==t.action.nextEmbedded)continue;o=!0;let i=t.regex,r=t.regex.source;if("^(?:"===r.substr(0,4)&&")"===r.substr(r.length-1,1)){let e=(i.ignoreCase?"i":"")+(i.unicode?"u":"");i=new RegExp(r.substr(4,r.length-5),e)}let s=e.search(i);-1===s||0!==s&&t.matchOnlyAtLineStart||(-1===n||s0&&o.nestedModeTokenize(s,!1,i.embeddedModeData,n);let a=e.substring(r);return this._myTokenize(a,t,i,n+r,o)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,i,n,o){o.enterMode(n,this._modeId);const r=e.length,s=t&&this._lexer.includeLF?e+"\n":e,a=s.length;let l=i.embeddedModeData,c=i.stack,u=0,h=null,d=!0;for(;d||u=a)break;d=!1;let e=this._lexer.tokenizer[_];if(!e&&(e=Tt(this._lexer,_),!e))throw Mt(this._lexer,"tokenizer state is not defined: "+_);let t=s.substr(u);for(const i of e)if((0===u||!i.matchOnlyAtLineStart)&&(v=t.match(i.regex),v)){b=v[0],y=i.action;break}}if(v||(v=[""],b=""),y||(u=this._lexer.maxStack)throw Mt(this._lexer,"maximum tokenizer stack size reached: ["+c.state+","+c.parent.state+",...]");c=c.push(_)}else if("@pop"===y.next){if(c.depth<=1)throw Mt(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(w));c=c.pop()}else if("@popall"===y.next)c=c.popall();else{let e=It(this._lexer,y.next,b,v,_);if("@"===e[0]&&(e=e.substr(1)),!Tt(this._lexer,e))throw Mt(this._lexer,"trying to set a next state '"+e+"' that is undefined in rule: "+this._safeRuleName(w));c=c.push(e)}}y.log&&"string"==typeof y.log&&(g=this._lexer,f=this._lexer.languageId+": "+It(this._lexer,y.log,b,v,_),console.log(`${g.languageId}: ${f}`))}if(null===S)throw Mt(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(w));const x=i=>{let r=this._modeService.getModeIdForLanguageName(i);r&&(i=r);const s=this._getNestedEmbeddedModeData(i);if(u0)throw Mt(this._lexer,"groups cannot be nested: "+this._safeRuleName(w));if(v.length!==S.length+1)throw Mt(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(w));let e=0;for(let t=1;te});class Ut{static colorizeElement(e,t,i,n){let o=(n=n||{}).theme||"vs",r=n.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!r)return console.error("Mode not detected"),Promise.resolve();e.setTheme(o);let s=i.firstChild?i.firstChild.nodeValue:"";return i.className+=" "+o,this.colorize(t,s||"",r,n).then((e=>{var t;const n=null!==(t=null==$t?void 0:$t.createHTML(e))&&void 0!==t?t:e;i.innerHTML=n}),(e=>console.error(e)))}static colorize(e,t,i,n){let o=4;n&&"number"==typeof n.tabSize&&(o=n.tabSize),Be.uS(t)&&(t=t.substr(1));let r=Be.uq(t),s=e.getModeId(i);if(!s)return Promise.resolve(qt(r,o));e.triggerMode(s);const a=be.RW.get(s);if(a)return jt(r,o,a);const l=be.RW.getPromise(s);return new Promise(l?(e,t)=>{l.then((i=>{jt(r,o,i).then(e,t)}),t)}:(e,t)=>{let i=null,n=null;const a=()=>{i&&(i.dispose(),i=null),n&&(n.dispose(),n=null);const a=be.RW.get(s);a?jt(r,o,a).then(e,t):e(qt(r,o))};n=new xe._F,n.cancelAndSet(a,500),i=be.RW.onDidChange((e=>{e.changedLanguages.indexOf(s)>=0&&a()}))})}static colorizeLine(e,t,i,n,o=4){const r=kt.wA.isBasicASCII(e,t),s=kt.wA.containsRTL(e,r,i);return(0,xt.tF)(new xt.IJ(!1,!0,e,!1,r,s,0,n,[],o,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,t,i=4){let n=e.getLineContent(t);e.forceTokenization(t);let o=e.getLineTokens(t).inflate();return this.colorizeLine(n,e.mightContainNonBasicASCII(),e.mightContainRTL(),o,i)}}function jt(e,t,i){return new Promise(((n,o)=>{const r=()=>{const s=function(e,t,i){let n=[],o=i.getInitialState();for(let r=0,s=e.length;r"),o=a.endState}return n.join("")}(e,t,i);if(i instanceof Vt){const e=i.getLoadStatus();if(!1===e.loaded)return void e.promise.then(r,o)}n(s)};r()}))}function qt(e,t){let i=[];const n=new Uint32Array(2);n[0]=0,n[1]=16793600;for(let o=0,r=e.length;o")}return i.join("")}var Kt=i(9069),Gt=i(4603),Yt=i(5520),Zt=i(6007),Xt=i(6345),Qt=i(9386),Jt=i(3108),ei=i(3193);class ti{constructor(e={},t=[],i=[]){this._contents=e,this._keys=t,this._overrides=i,this.isFrozen=!1}get contents(){return this.checkAndFreeze(this._contents)}get overrides(){return this.checkAndFreeze(this._overrides)}get keys(){return this.checkAndFreeze(this._keys)}isEmpty(){return 0===this._keys.length&&0===Object.keys(this._contents).length&&0===this._overrides.length}getValue(e){return e?(0,Jt.Mt)(this.contents,e):this.contents}override(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||"object"!=typeof t||!Object.keys(t).length)return this;let i={};for(const e of ct.EB([...Object.keys(this.contents),...Object.keys(t)])){let n=this.contents[e],o=t[e];o&&("object"==typeof n&&"object"==typeof o?(n=ge.I8(n),this.mergeContents(n,o)):n=o),i[e]=n}return new ti(i,this.keys,this.overrides)}merge(...e){const t=ge.I8(this.contents),i=ge.I8(this.overrides),n=[...this.keys];for(const o of e){this.mergeContents(t,o.contents);for(const e of o.overrides){const[t]=i.filter((t=>ct.fS(t.identifiers,e.identifiers)));t?this.mergeContents(t.contents,e.contents):i.push(ge.I8(e))}for(const e of o.keys)-1===n.indexOf(e)&&n.push(e)}return new ti(t,n,i)}freeze(){return this.isFrozen=!0,this}mergeContents(e,t){for(const i of Object.keys(t))i in e&&Le.Kn(e[i])&&Le.Kn(t[i])?this.mergeContents(e[i],t[i]):e[i]=ge.I8(t[i])}checkAndFreeze(e){return this.isFrozen&&!Object.isFrozen(e)?ge._A(e):e}getContentsForOverrideIdentifer(e){for(const t of this.overrides)if(-1!==t.identifiers.indexOf(e))return t.contents;return null}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,t){this.addKey(e),(0,Jt.KV)(this.contents,e,t,(e=>{throw new Error(e)}))}removeValue(e){this.removeKey(e)&&(0,Jt.xL)(this.contents,e)}addKey(e){let t=this.keys.length;for(let i=0;iconsole.error(`Conflict in default settings file: ${e}`)))});super(e,t,i)}}class ni{constructor(e,t,i=new ti,n=new ti,o=new J.Y9,r=new ti,s=new J.Y9,a=!0){this._defaultConfiguration=e,this._localUserConfiguration=t,this._remoteUserConfiguration=i,this._workspaceConfiguration=n,this._folderConfigurations=o,this._memoryConfiguration=r,this._memoryConfigurationByResource=s,this._freeze=a,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new J.Y9,this._userConfiguration=null}getValue(e,t,i){return this.getConsolidateConfigurationModel(t,i).getValue(e)}updateValue(e,t,i={}){let n;i.resource?(n=this._memoryConfigurationByResource.get(i.resource),n||(n=new ti,this._memoryConfigurationByResource.set(i.resource,n))):n=this._memoryConfiguration,void 0===t?n.removeValue(e):n.setValue(e,t),i.resource||(this._workspaceConsolidatedConfiguration=null)}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration}getConsolidateConfigurationModel(e,t){let i=this.getConsolidatedConfigurationModelForResource(e,t);return e.overrideIdentifier?i.override(e.overrideIdentifier):i}getConsolidatedConfigurationModelForResource({resource:e},t){let i=this.getWorkspaceConsolidatedConfiguration();if(t&&e){const n=t.getFolder(e);n&&(i=this.getFolderConsolidatedConfiguration(n.uri)||i);const o=this._memoryConfigurationByResource.get(e);o&&(i=i.merge(o))}return i}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(e){let t=this._foldersConsolidatedConfigurations.get(e);if(!t){const i=this.getWorkspaceConsolidatedConfiguration(),n=this._folderConfigurations.get(e);n?(t=i.merge(n),this._freeze&&(t=t.freeze()),this._foldersConsolidatedConfigurations.set(e,t)):t=i}return t}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce(((e,t)=>{const{contents:i,overrides:n,keys:o}=this._folderConfigurations.get(t);return e.push([t,{contents:i,overrides:n,keys:o}]),e}),[])}}static parse(e){const t=this.parseConfigurationModel(e.defaults),i=this.parseConfigurationModel(e.user),n=this.parseConfigurationModel(e.workspace),o=e.folders.reduce(((e,t)=>(e.set(H.o.revive(t[0]),this.parseConfigurationModel(t[1])),e)),new J.Y9);return new ni(t,i,new ti,n,o,new ti,new J.Y9,!1)}static parseConfigurationModel(e){return new ti(e.contents,e.keys,e.overrides).freeze()}}class oi{constructor(e,t,i,n){this.change=e,this.previous=t,this.currentConfiguraiton=i,this.currentWorkspace=n,this._previousConfiguration=void 0;const o=new Set;e.keys.forEach((e=>o.add(e))),e.overrides.forEach((([,e])=>e.forEach((e=>o.add(e))))),this.affectedKeys=[...o.values()];const r=new ti;this.affectedKeys.forEach((e=>r.setValue(e,{}))),this.affectedKeysTree=r.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=ni.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,t){var i;if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,e)){if(t){const n=this.previousConfiguration?this.previousConfiguration.getValue(e,t,null===(i=this.previous)||void 0===i?void 0:i.workspace):void 0,o=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!ge.fS(n,o)}return!0}return!1}doesAffectedKeysTreeContains(e,t){let i,n=(0,Jt.Od)({[t]:!0},(()=>{}));for(;"object"==typeof n&&(i=Object.keys(n)[0]);){if(!(e=e[i]))return!1;n=n[i]}return!0}}var ri=i(3580);class si extends de.JT{constructor(e,t,i,n,o){super(),this._contextKeyService=e,this._commandService=t,this._telemetryService=i,this._notificationService=n,this._logService=o,this._onDidUpdateKeybindings=this._register(new W.Q5),this._currentChord=null,this._currentChordChecker=new xe.zh,this._currentChordStatusMessage=null,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new xe._F,this._logging=!1}get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:W.ju.None}dispose(){super.dispose()}_log(e){this._logging&&this._logService.info(`[KeybindingService]: ${e}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(e,t){const i=this._getResolver().lookupPrimaryKeybinding(e,t);if(i)return i.resolvedKeybinding}dispatchEvent(e,t){return this._dispatch(e,t)}softDispatch(e,t){const i=this.resolveKeyboardEvent(e);if(i.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;const[n]=i.getDispatchParts();if(null===n)return null;const o=this._contextKeyService.getContext(t),r=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(o,r,n)}_enterChordMode(e,t){this._currentChord={keypress:e,label:t},this._currentChordStatusMessage=this._notificationService.status(ri.N("first.chord","({0}) was pressed. Waiting for second key of chord...",t));const i=Date.now();this._currentChordChecker.cancelAndSet((()=>{this._documentHasFocus()?Date.now()-i>5e3&&this._leaveChordMode():this._leaveChordMode()}),500)}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const i=this.resolveKeyboardEvent(e),[n]=i.getSingleModifierDispatchParts();return null!==n&&null===this._currentSingleModifier?(this._log(`+ Storing single modifier for possible chord ${n}.`),this._currentSingleModifier=n,this._currentSingleModifierClearTimeout.cancelAndSet((()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null}),300),!1):null!==n&&n===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${n} ${n}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(i,t,!0)):(this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1)}_doDispatch(e,t,i=!1){let n=!1;if(e.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),!1;let o=null,r=null;if(i){const[t]=e.getSingleModifierDispatchParts();o=t,r=t}else[o]=e.getDispatchParts(),r=this._currentChord?this._currentChord.keypress:null;if(null===o)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),n;const s=this._contextKeyService.getContext(t),a=e.getLabel(),l=this._getResolver().resolve(s,r,o);return this._logService.trace("KeybindingService#dispatch",a,null==l?void 0:l.commandId),l&&l.enterChord?(n=!0,this._enterChordMode(o,a),n):(this._currentChord&&(l&&l.commandId||(this._notificationService.status(ri.N("missing.chord","The key combination ({0}, {1}) is not a command.",this._currentChord.label,a),{hideAfter:1e4}),n=!0)),this._leaveChordMode(),l&&l.commandId&&(l.bubble||(n=!0),void 0===l.commandArgs?this._commandService.executeCommand(l.commandId).then(void 0,(e=>this._notificationService.warn(e))):this._commandService.executeCommand(l.commandId,l.commandArgs).then(void 0,(e=>this._notificationService.warn(e))),this._telemetryService.publicLog2("workbenchActionExecuted",{id:l.commandId,from:"keybinding"})),n)}mightProducePrintableCharacter(e){return!e.ctrlKey&&!e.metaKey&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30)}}class ai{constructor(e,t,i){this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(let t=0,i=e.length;t=0;i--)this._isTargetedForRemoval(e[i],o,r,t,s)&&e.splice(i,1)}return e.concat(i)}_addKeyPress(e,t){const i=this._map.get(e);if(void 0===i)return this._map.set(e,[t]),void this._addToLookupMap(t);for(let e=i.length-1;e>=0;e--){let n=i[e];if(n.command===t.command)continue;const o=n.keypressParts.length>1,r=t.keypressParts.length>1;o&&r&&n.keypressParts[1]!==t.keypressParts[1]||ai.whenIsEntirelyIncluded(n.when,t.when)&&this._removeFromLookupMap(n)}i.push(t),this._addToLookupMap(t)}_addToLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);void 0===t?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);if(void 0!==t)for(let i=0,n=t.length;i9===e.type?e.expr:[e];let n=i(e.negate()).concat(i(t));for(let e=0;et.contextMatchesRules(e.when)));return null!=n?n:i[i.length-1]}resolve(e,t,i){this._log(`| Resolving ${i}${t?` chorded from ${t}`:""}`);let n=null;if(null!==t){const e=this._map.get(t);if(void 0===e)return this._log("\\ No keybinding entries."),null;n=[];for(let t=0,o=e.length;t1&&null!==o.keypressParts[1]?(this._log(`\\ From ${n.length} keybinding entries, matched chord, when: ${li(o.when)}, source: ${ci(o)}.`),{enterChord:!0,leaveChord:!1,commandId:null,commandArgs:null,bubble:!1}):(this._log(`\\ From ${n.length} keybinding entries, matched ${o.command}, when: ${li(o.when)}, source: ${ci(o)}.`),{enterChord:!1,leaveChord:o.keypressParts.length>1,commandId:o.command,commandArgs:o.commandArgs,bubble:o.bubble}):(this._log(`\\ From ${n.length} keybinding entries, no when clauses matched the context.`),null)}_findCommand(e,t){for(let i=t.length-1;i>=0;i--){let n=t[i];if(ai.contextMatchesRules(e,n.when))return n}return null}static contextMatchesRules(e,t){return!t||t.evaluate(e)}}function li(e){return e?`${e.serialize()}`:"no when condition"}function ci(e){return e.extensionId?e.isBuiltinExtension?`built-in extension ${e.extensionId}`:`user extension ${e.extensionId}`:e.isDefault?"built-in":"user"}var ui=i(9989);class hi{constructor(e,t,i,n,o,r,s){this.resolvedKeybinding=e,this.keypressParts=e?di(e.getDispatchParts()):[],e&&0===this.keypressParts.length&&(this.keypressParts=di(e.getSingleModifierDispatchParts())),this.bubble=!!t&&94===t.charCodeAt(0),this.command=this.bubble?t.substr(1):t,this.commandArgs=i,this.when=n,this.isDefault=o,this.extensionId=r,this.isBuiltinExtension=s}}function di(e){let t=[];for(let i=0,n=e.length;ithis._getLabel(e)))}getAriaLabel(){return gi.X4.toLabel(this._os,this._parts,(e=>this._getAriaLabel(e)))}isChord(){return this._parts.length>1}getParts(){return this._parts.map((e=>this._getPart(e)))}_getPart(e){return new V.BQ(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchParts(){return this._parts.map((e=>this._getDispatchPart(e)))}getSingleModifierDispatchParts(){return this._parts.map((e=>this._getSingleModifierDispatchPart(e)))}}class pi extends fi{constructor(e,t){super(t,e.parts)}_keyCodeToUILabel(e){if(2===this._os)switch(e){case 15:return"←";case 16:return"↑";case 17:return"→";case 18:return"↓"}return V.kL.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":V.kL.toString(e.keyCode)}_getDispatchPart(e){return pi.getDispatchStr(e)}static getDispatchStr(e){if(e.isModifierKey())return null;let t="";return e.ctrlKey&&(t+="ctrl+"),e.shiftKey&&(t+="shift+"),e.altKey&&(t+="alt+"),e.metaKey&&(t+="meta+"),t+=V.kL.toString(e.keyCode),t}_getSingleModifierDispatchPart(e){return 5!==e.keyCode||e.shiftKey||e.altKey||e.metaKey?4!==e.keyCode||e.ctrlKey||e.altKey||e.metaKey?6!==e.keyCode||e.ctrlKey||e.shiftKey||e.metaKey?57!==e.keyCode||e.ctrlKey||e.shiftKey||e.altKey?null:"meta":"alt":"shift":"ctrl"}}var mi=i(9422),_i=i(382),vi=i(913),bi=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},yi=function(e,t){return function(i,n){t(i,n,e)}},wi=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class Ci{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new W.Q5}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let Si=class{constructor(e){this.modelService=e}setEditor(e){this.editor=e}createModelReference(e){let t=null;var i,n,o;return this.editor&&(i=this.editor,n=t=>this.findModel(t,e),o=t=>this.findModel(t.getOriginalEditor(),e)||this.findModel(t.getModifiedEditor(),e),t=(0,Yt.CL)(i)?n(i):o(i)),t?Promise.resolve(new de.Jz(new Ci(t))):Promise.reject(new Error("Model not found"))}findModel(e,t){let i=this.modelService.getModel(t);return i&&i.uri.toString()!==t.toString()?null:i}};Si=bi([yi(0,at.q)],Si);class xi{show(){return xi.NULL_PROGRESS_RUNNER}showWhile(e,t){return wi(this,void 0,void 0,(function*(){yield e}))}}xi.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class ki{confirm(e){return this.doConfirm(e).then((e=>({confirmed:e,checkboxChecked:!1})))}doConfirm(e){let t=e.message;return e.detail&&(t=t+"\n\n"+e.detail),Promise.resolve(window.confirm(t))}show(e,t,i,n){return Promise.resolve({choice:0})}}class Di{info(e){return this.notify({severity:Gt.Z.Info,message:e})}warn(e){return this.notify({severity:Gt.Z.Warning,message:e})}error(e){return this.notify({severity:Gt.Z.Error,message:e})}notify(e){switch(e.severity){case Gt.Z.Error:console.error(e.message);break;case Gt.Z.Warning:console.warn(e.message);break;default:console.log(e.message)}return Di.NO_OP}status(e,t){return de.JT.None}}Di.NO_OP=new mi.EO;class Li{constructor(e){this._onWillExecuteCommand=new W.Q5,this._onDidExecuteCommand=new W.Q5,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const i=ne.P.getCommand(e);if(!i)return Promise.reject(new Error(`command '${e}' not found`));try{this._onWillExecuteCommand.fire({commandId:e,args:t});const n=this._instantiationService.invokeFunction.apply(this._instantiationService,[i.handler,...t]);return this._onDidExecuteCommand.fire({commandId:e,args:t}),Promise.resolve(n)}catch(e){return Promise.reject(e)}}}class Ni extends si{constructor(e,t,i,n,o,r){super(e,t,i,n,o),this._cachedResolver=null,this._dynamicKeybindings=[],this._register(X.nm(r,X.tw.KEY_DOWN,(e=>{const t=new Kt.y(e);this._dispatch(t,t.target)&&(t.preventDefault(),t.stopPropagation())}))),this._register(X.nm(window,X.tw.KEY_UP,(e=>{const t=new Kt.y(e);this._singleModifierDispatch(t,t.target)&&t.preventDefault()})))}addDynamicKeybinding(e,t,i,n){const o=(0,V.gm)(t,De.OS),r=new de.SL;return o&&(this._dynamicKeybindings.push({keybinding:o,command:e,when:n,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}),r.add((0,de.OF)((()=>{for(let t=0;tthis._log(e)))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(e,t){let i=[],n=0;for(const o of e){const e=o.when||void 0,r=o.keybinding;if(r){const s=this.resolveKeybinding(r);for(const r of s)i[n++]=new hi(r,o.command,o.commandArgs,e,t,null,!1)}else i[n++]=new hi(void 0,o.command,o.commandArgs,e,t,null,!1)}return i}resolveKeybinding(e){return[new pi(e,De.OS)]}resolveKeyboardEvent(e){let t=new V.QC(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode).toChord();return new pi(t,De.OS)}}function Ei(e){return e&&"object"==typeof e&&(!e.overrideIdentifier||"string"==typeof e.overrideIdentifier)&&(!e.resource||e.resource instanceof H.o)}class Ai{constructor(){this._onDidChangeConfiguration=new W.Q5,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configuration=new ni(new ii,new ti)}getValue(e,t){const i="string"==typeof e?e:void 0,n=Ei(e)?e:Ei(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){const t={data:this._configuration.toData()};let i=[];for(const t of e){const[e,n]=t;this.getValue(e)!==n&&(this._configuration.updateValue(e,n),i.push(e))}if(i.length>0){const e=new oi({keys:i,overrides:[]},t,this._configuration);e.source=7,e.sourceConfig=null,this._onDidChangeConfiguration.fire(e)}return Promise.resolve()}}class Mi{constructor(e){this.configurationService=e,this._onDidChangeConfiguration=new W.Q5,this.configurationService.onDidChangeConfiguration((e=>{this._onDidChangeConfiguration.fire({affectedKeys:e.affectedKeys,affectsConfiguration:(t,i)=>e.affectsConfiguration(i)})}))}getValue(e,t,i){const n=$.L.isIPosition(t)&&t?"string"==typeof i?i:void 0:"string"==typeof t?t:void 0;return void 0===n?this.configurationService.getValue():this.configurationService.getValue(n)}}let Ii=class{constructor(e){this.configurationService=e}getEOL(e,t){const i=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return i&&"auto"!==i?i:De.IJ||De.dz?"\n":"\r\n"}};Ii=bi([yi(0,Jt.Ui)],Ii);class Ti{publicLog(e,t){return Promise.resolve(void 0)}publicLog2(e,t){return this.publicLog(e,t)}}class Ri{constructor(){const e=H.o.from({scheme:Ri.SCHEME,authority:"model",path:"/"});this.workspace={id:"4064f6ec-cb38-4ad0-af64-ee6467e63c82",folders:[new _i.md({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}}function Oi(e,t,i){if(!t)return;if(!(e instanceof Ai))return;let n=[];Object.keys(t).forEach((e=>{(0,Xt.ei)(e)&&n.push([`editor.${e}`,t[e]]),i&&(0,Xt.Pe)(e)&&n.push([`diffEditor.${e}`,t[e]])})),n.length>0&&e.updateValues(n)}Ri.SCHEME="inmemory";class Fi{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}apply(e,t){return wi(this,void 0,void 0,(function*(){const t=new Map;for(let i of e){if(!(i instanceof Zt.Gl))throw new Error("bad edit - only text edits are supported");const e=this._modelService.getModel(i.resource);if(!e)throw new Error("bad edit - model not found");if("number"==typeof i.versionId&&e.getVersionId()!==i.versionId)throw new Error("bad state - model changed in the meantime");let n=t.get(e);n||(n=[],t.set(e,n)),n.push(Qt.h.replaceMove(U.e.lift(i.textEdit.range),i.textEdit.text))}let i=0,n=0;for(const[e,o]of t)e.pushStackElement(),e.pushEditOperations([],o,(()=>[])),e.pushStackElement(),n+=1,i+=o.length;return{ariaSummary:Be.WU(vi.UL.bulkEditServiceSummary,i,n)}}))}}class Pi{getUriLabel(e,t){return"file"===e.scheme?e.fsPath:e.path}}class Bi{constructor(e,t){this._codeEditorService=e,this._container=t,this.onDidLayout=W.ju.None}get dimension(){return this._dimension||(this._dimension=X.D6(window.document.body)),this._dimension}get container(){return this._container}focus(){var e;null===(e=this._codeEditorService.getFocusedCodeEditor())||void 0===e||e.focus()}}var zi,Wi=i(5152),Vi=i(2073),Hi=i(8626),$i=i(3098),Ui=i(9052),ji=i(9925),qi=i(317),Ki=i(9802),Gi=i(4741),Yi=i(6830),Zi=i(7869),Xi=i(8819),Qi=i(3910),Ji=i(7781),en=i(3046),tn=i(9554);class nn{constructor(e,t,i,n){this.originalLineStart=e,this.originalLineEnd=t,this.modifiedLineStart=i,this.modifiedLineEnd=n}getType(){return 0===this.originalLineStart?1:0===this.modifiedLineStart?2:0}}class on{constructor(e){this.entries=e}}const rn=(0,tn.q5)("diff-review-insert",en.lA.add,ri.N("diffReviewInsertIcon","Icon for 'Insert' in diff review.")),sn=(0,tn.q5)("diff-review-remove",en.lA.remove,ri.N("diffReviewRemoveIcon","Icon for 'Remove' in diff review.")),an=(0,tn.q5)("diff-review-close",en.lA.close,ri.N("diffReviewCloseIcon","Icon for 'Close' in diff review."));class ln extends de.JT{constructor(e){super(),this._width=0,this._diffEditor=e,this._isVisible=!1,this.shadow=(0,Hi.X)(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=(0,Hi.X)(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new qi.o(this.actionBarContainer.domNode)),this._actionBar.push(new Gi.aU("diffreview.close",ri.N("label.close","Close"),"close-diff-review "+Ji.kS.asClassName(an),!0,(()=>{return e=this,t=void 0,n=function*(){return this.hide()},new((i=void 0)||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}));var e,t,i,n})),{label:!1,icon:!0}),this.domNode=(0,Hi.X)(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=(0,Hi.X)(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new Ki.s$(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(e.onDidUpdateDiff((()=>{this._isVisible&&(this._diffs=this._compute(),this._render())}))),this._register(e.getModifiedEditor().onDidChangeCursorPosition((()=>{this._isVisible&&this._render()}))),this._register(X.mu(this.domNode.domNode,"click",(e=>{e.preventDefault();let t=X.Fx(e.target,"diff-review-row");t&&this._goToRow(t)}))),this._register(X.mu(this.domNode.domNode,"keydown",(e=>{(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),this._goToRow(this._getNextRow())),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),this._goToRow(this._getPrevRow())),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033))&&(e.preventDefault(),this.hide()),(e.equals(10)||e.equals(3))&&(e.preventDefault(),this.accept())}))),this._diffs=[],this._currentDiff=null}prev(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let t=-1;for(let e=0,i=this._diffs.length;e0){const t=e[r-1];n=0===t.originalEndLineNumber?t.originalStartLineNumber+1:t.originalEndLineNumber+1,o=0===t.modifiedEndLineNumber?t.modifiedStartLineNumber+1:t.modifiedEndLineNumber+1}let s=t-3+1,a=i-3+1;if(sa){const e=a-p;p+=e,m+=e}if(m>f){const e=f-m;p+=e,m+=e}d[g++]=new nn(n,p,o,m)}n[o++]=new on(d)}let r=n[0].entries,s=[],a=0;for(let e=1,t=n.length;eu)&&(u=n),0!==o&&(0===h||od)&&(d=r)}let g=document.createElement("div");g.className="diff-review-row";let f=document.createElement("div");f.className="diff-review-cell diff-review-summary";const p=u-c+1,m=d-h+1;f.appendChild(document.createTextNode(`${s+1}/${this._diffs.length}: @@ -${c},${p} +${h},${m} @@`)),g.setAttribute("data-line",String(h));const _=e=>0===e?ri.N("no_lines_changed","no lines changed"):1===e?ri.N("one_line_changed","1 line changed"):ri.N("more_lines_changed","{0} lines changed",e),v=_(p),b=_(m);g.setAttribute("aria-label",ri.N({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",s+1,this._diffs.length,c,v,h,b)),g.appendChild(f),g.setAttribute("role","listitem"),l.appendChild(g);const y=t.get(56);let w=h;for(let s=0,c=a.length;se}),(0,Ji.Ic)(((e,t)=>{const i=e.getColor(Zi.hw);i&&t.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${i}; }`);const n=e.getColor(Qi._w);n&&t.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${n} 0 -6px 6px -6px inset; }`)}));class cn extends Yi.R6{constructor(){super({id:"editor.action.diffReview.next",label:ri.N("editor.action.diffReview.next","Go to Next Difference"),alias:"Go to Next Difference",precondition:Xi.Ao.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(e,t){const i=hn(e);i&&i.diffReviewNext()}}class un extends Yi.R6{constructor(){super({id:"editor.action.diffReview.prev",label:ri.N("editor.action.diffReview.prev","Go to Previous Difference"),alias:"Go to Previous Difference",precondition:Xi.Ao.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1089,weight:100}})}run(e,t){const i=hn(e);i&&i.diffReviewPrev()}}function hn(e){const t=e.get(Z.$),i=t.listDiffEditors(),n=t.getActiveCodeEditor();if(!n)return null;for(let e=0,t=i.length;en.modifiedStartLineNumber?ri.N("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):ri.N("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"),void 0,!0,(()=>bn(this,void 0,void 0,(function*(){const e=new U.e(n.originalStartLineNumber,1,n.originalEndLineNumber+1,1),t=n.originalModel.getValueInRange(e);yield this._clipboardService.writeText(t)})))));let c,u=0;n.originalEndLineNumber>n.modifiedStartLineNumber&&(c=new Gi.aU("diff.clipboard.copyDeletedLineContent",ri.N("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber),void 0,!0,(()=>bn(this,void 0,void 0,(function*(){const e=n.originalModel.getLineContent(n.originalStartLineNumber+u);yield this._clipboardService.writeText(e)})))),l.push(c)),i.getOption(78)||l.push(new Gi.aU("diff.inline.revertChange",ri.N("diff.inline.revertChange.label","Revert this change"),void 0,!0,(()=>bn(this,void 0,void 0,(function*(){const e=new U.e(n.originalStartLineNumber,1,n.originalEndLineNumber,n.originalModel.getLineMaxColumn(n.originalEndLineNumber)),t=n.originalModel.getValueInRange(e);if(0===n.modifiedEndLineNumber){const e=i.getModel().getLineMaxColumn(n.modifiedStartLineNumber);i.executeEdits("diffEditor",[{range:new U.e(n.modifiedStartLineNumber,e,n.modifiedStartLineNumber,e),text:a+t}])}else{const e=i.getModel().getLineMaxColumn(n.modifiedEndLineNumber);i.executeEdits("diffEditor",[{range:new U.e(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,e),text:t}])}})))));const h=(e,t)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:e,y:t}),getActions:()=>(c&&(c.label=ri.N("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber+u)),l),autoSelectFirstItem:!0})};this._register(X.mu(this._diffActions,"mousedown",(e=>{const{top:t,height:i}=X.i(this._diffActions);let n=Math.floor(s/3);e.preventDefault(),h(e.posx,t+i+n)}))),this._register(i.onMouseMove((e=>{(8===e.target.type||5===e.target.type)&&e.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,u=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,s)):this.visibility=!1}))),this._register(i.onMouseDown((e=>{!e.event.rightButton||8!==e.target.type&&5!==e.target.type||e.target.detail.viewZoneId===this._viewZoneId&&(e.event.preventDefault(),u=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,s),h(e.event.posx,e.event.posy+s))})))}get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,this._diffActions.style.visibility=e?"visible":"hidden")}_updateLightBulbPosition(e,t,i){const{top:n}=X.i(e),o=t-n,r=Math.floor(o/i),s=r*i;if(this._diffActions.style.top=`${s}px`,this.diff.viewLineCounts){let e=0;for(let t=0;t!this._zonesMap[String(e.id)]))}clean(e){this._zones.length>0&&e.changeViewZones((e=>{for(const t of this._zones)e.removeZone(t)})),this._zones=[],this._zonesMap={},this._decorations=e.deltaDecorations(this._decorations,[])}apply(e,t,i,n){const o=n?ji.ZF.capture(e):null;e.changeViewZones((t=>{for(const e of this._zones)t.removeZone(e);for(const e of this._inlineDiffMargins)e.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let n=0,o=i.zones.length;ne});let In=class e extends de.JT{constructor(t,i,n,o,r,s,a,l,c,u,h,d){super(),this._editorProgressService=d,this._onDidDispose=this._register(new W.Q5),this.onDidDispose=this._onDidDispose.event,this._onDidUpdateDiff=this._register(new W.Q5),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new W.Q5),this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._editorWorkerService=r,this._codeEditorService=l,this._contextKeyService=this._register(s.createScoped(t)),this._instantiationService=a.createChild(new _n.y([Xi.i6,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=c,this._notificationService=u,this._id=++Nn,this._state=0,this._updatingDiffProgress=null,this._domElement=t,i=i||{},this._renderSideBySide=!0,void 0!==i.renderSideBySide&&(this._renderSideBySide=i.renderSideBySide),this._maxComputationTime=5e3,void 0!==i.maxComputationTime&&(this._maxComputationTime=i.maxComputationTime),this._ignoreTrimWhitespace=!0,void 0!==i.ignoreTrimWhitespace&&(this._ignoreTrimWhitespace=i.ignoreTrimWhitespace),this._renderIndicators=!0,void 0!==i.renderIndicators&&(this._renderIndicators=i.renderIndicators),this._originalIsEditable=(0,B.O7)(i.originalEditable,!1),this._diffCodeLens=(0,B.O7)(i.diffCodeLens,!1),this._diffWordWrap=Hn(i.diffWordWrap,"inherit"),void 0!==i.isInEmbeddedEditor?this._contextKeyService.createKey("isInEmbeddedDiffEditor",i.isInEmbeddedEditor):this._contextKeyService.createKey("isInEmbeddedDiffEditor",!1),this._renderOverviewRuler=!0,void 0!==i.renderOverviewRuler&&(this._renderOverviewRuler=Boolean(i.renderOverviewRuler)),this._updateDecorationsRunner=this._register(new xe.pY((()=>this._updateDecorations()),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=(0,Hi.X)(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewDomElement=document.createElement("div"),this._overviewDomElement.className="diffOverview",this._overviewDomElement.style.position="absolute",this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode),this._register(X.mu(this._overviewDomElement,"mousedown",(e=>{this._modifiedEditor.delegateVerticalScrollbarMouseDown(e)}))),this._renderOverviewRuler&&this._containerDomElement.appendChild(this._overviewDomElement),this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode),this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode),this._beginUpdateDecorationsTimeout=-1,this._currentlyChangingViewZones=!1,this._diffComputationToken=0,this._originalEditorState=new Ln(h,o),this._modifiedEditorState=new Ln(h,o),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new xn.I(this._containerDomElement,i.dimension,(()=>this._onDidContainerSizeChanged()))),i.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(i,n.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(i,n.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=new ln(this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._enableSplitViewResizing=!0,void 0!==i.enableSplitViewResizing&&(this._enableSplitViewResizing=i.enableSplitViewResizing),this._renderSideBySide?this._setStrategy(new Bn(this._createDataSource(),this._enableSplitViewResizing)):this._setStrategy(new Wn(this._createDataSource(),this._enableSplitViewResizing)),this._register(c.onDidColorThemeChange((t=>{this._strategy&&this._strategy.applyColors(t)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._renderSideBySide)})));const g=Yi.Uc.getDiffEditorContributions();for(const e of g)try{this._register(a.createInstance(e.ctor,this))}catch(e){(0,ke.dL)(e)}this._codeEditorService.addDiffEditor(this)}_setState(e){this._state!==e&&(this._state=e,this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),1===this._state&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3)))}diffReviewNext(){this._reviewPane.next()}diffReviewPrev(){this._reviewPane.prev()}static _getClassName(e,t){let i="monaco-diff-editor monaco-editor-background ";return t&&(i+="side-by-side "),i+=(0,Ji.m6)(e.type),i}_recreateOverviewRulers(){this._renderOverviewRuler&&(this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._originalEditor.hasModel()&&(this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers())}_createLeftHandSideEditor(t,i){const n=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(t),i);this._register(n.onDidScrollChange((e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())}))),this._register(n.onDidChangeViewZones((()=>{this._onViewZonesChanged()}))),this._register(n.onDidChangeConfiguration((e=>{n.getModel()&&(e.hasChanged(40)&&this._updateDecorationsRunner.schedule(),e.hasChanged(129)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))}))),this._register(n.onDidChangeModelContent((()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})));const o=this._contextKeyService.createKey("isInDiffLeftEditor",n.hasWidgetFocus());return this._register(n.onDidFocusEditorWidget((()=>o.set(!0)))),this._register(n.onDidBlurEditorWidget((()=>o.set(!1)))),this._register(n.onDidContentSizeChange((t=>{const i=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,n=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:n,contentWidth:i,contentHeightChanged:t.contentHeightChanged,contentWidthChanged:t.contentWidthChanged})}))),n}_createRightHandSideEditor(t,i){const n=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(t),i);this._register(n.onDidScrollChange((e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())}))),this._register(n.onDidChangeViewZones((()=>{this._onViewZonesChanged()}))),this._register(n.onDidChangeConfiguration((e=>{n.getModel()&&(e.hasChanged(40)&&this._updateDecorationsRunner.schedule(),e.hasChanged(129)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))}))),this._register(n.onDidChangeModelContent((()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}))),this._register(n.onDidChangeModelOptions((e=>{e.tabSize&&this._updateDecorationsRunner.schedule()})));const o=this._contextKeyService.createKey("isInDiffRightEditor",n.hasWidgetFocus());return this._register(n.onDidFocusEditorWidget((()=>o.set(!0)))),this._register(n.onDidBlurEditorWidget((()=>o.set(!1)))),this._register(n.onDidContentSizeChange((t=>{const i=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,n=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:n,contentWidth:i,contentHeightChanged:t.contentHeightChanged,contentWidthChanged:t.contentWidthChanged})}))),n}_createInnerEditor(e,t,i,n){return e.createInstance(Vi.Gm,t,i,n)}dispose(){this._codeEditorService.removeDiffEditor(this),-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._cleanViewZonesAndDecorations(),this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode),this._renderOverviewRuler&&this._containerDomElement.removeChild(this._overviewDomElement),this._containerDomElement.removeChild(this._originalDomNode),this._originalEditor.dispose(),this._containerDomElement.removeChild(this._modifiedDomNode),this._modifiedEditor.dispose(),this._strategy.dispose(),this._containerDomElement.removeChild(this._reviewPane.domNode.domNode),this._containerDomElement.removeChild(this._reviewPane.shadow.domNode),this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode),this._reviewPane.dispose(),this._domElement.removeChild(this._containerDomElement),this._onDidDispose.fire(),super.dispose()}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return _e.g.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(t){let i=!1;void 0!==t.renderSideBySide&&this._renderSideBySide!==t.renderSideBySide&&(this._renderSideBySide=t.renderSideBySide,i=!0),void 0!==t.maxComputationTime&&(this._maxComputationTime=t.maxComputationTime,this._isVisible&&this._beginUpdateDecorationsSoon());let n=!1;void 0!==t.ignoreTrimWhitespace&&this._ignoreTrimWhitespace!==t.ignoreTrimWhitespace&&(this._ignoreTrimWhitespace=t.ignoreTrimWhitespace,n=!0),void 0!==t.renderIndicators&&this._renderIndicators!==t.renderIndicators&&(this._renderIndicators=t.renderIndicators,n=!0),n&&this._beginUpdateDecorations(),this._originalIsEditable=(0,B.O7)(t.originalEditable,this._originalIsEditable),this._diffCodeLens=(0,B.O7)(t.diffCodeLens,this._diffCodeLens),this._diffWordWrap=Hn(t.diffWordWrap,this._diffWordWrap),this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(t)),this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(t)),void 0!==t.enableSplitViewResizing&&(this._enableSplitViewResizing=t.enableSplitViewResizing),this._strategy.setEnableSplitViewResizing(this._enableSplitViewResizing),i&&(this._renderSideBySide?this._setStrategy(new Bn(this._createDataSource(),this._enableSplitViewResizing)):this._setStrategy(new Wn(this._createDataSource(),this._enableSplitViewResizing)),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._renderSideBySide)),void 0!==t.renderOverviewRuler&&this._renderOverviewRuler!==t.renderOverviewRuler&&(this._renderOverviewRuler=t.renderOverviewRuler,this._renderOverviewRuler?this._containerDomElement.appendChild(this._overviewDomElement):this._containerDomElement.removeChild(this._overviewDomElement))}getModel(){return{original:this._originalEditor.getModel(),modified:this._modifiedEditor.getModel()}}setModel(e){if(e&&(!e.original||!e.modified))throw new Error(e.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this._originalEditor.setModel(e?e.original:null),this._modifiedEditor.setModel(e?e.modified:null),this._updateDecorationsRunner.cancel(),e&&(this._originalEditor.setScrollTop(0),this._modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),e&&(this._recreateOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport()}getDomNode(){return this._domElement}getVisibleColumnFromPosition(e){return this._modifiedEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._modifiedEditor.getPosition()}setPosition(e){this._modifiedEditor.setPosition(e)}revealLine(e,t=0){this._modifiedEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._modifiedEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._modifiedEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._modifiedEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._modifiedEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._modifiedEditor.revealPositionNearTop(e,t)}getSelection(){return this._modifiedEditor.getSelection()}getSelections(){return this._modifiedEditor.getSelections()}setSelection(e){this._modifiedEditor.setSelection(e)}setSelections(e){this._modifiedEditor.setSelections(e)}revealLines(e,t,i=0){this._modifiedEditor.revealLines(e,t,i)}revealLinesInCenter(e,t,i=0){this._modifiedEditor.revealLinesInCenter(e,t,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._modifiedEditor.revealLinesInCenterIfOutsideViewport(e,t,i)}revealLinesNearTop(e,t,i=0){this._modifiedEditor.revealLinesNearTop(e,t,i)}revealRange(e,t=0,i=!1,n=!0){this._modifiedEditor.revealRange(e,t,i,n)}revealRangeInCenter(e,t=0){this._modifiedEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._modifiedEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._modifiedEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._modifiedEditor.getSupportedActions()}saveViewState(){return{original:this._originalEditor.saveViewState(),modified:this._modifiedEditor.saveViewState()}}restoreViewState(e){if(e&&e.original&&e.modified){const t=e;this._originalEditor.restoreViewState(t.original),this._modifiedEditor.restoreViewState(t.modified)}}layout(e){this._elementSizeObserver.observe(e)}focus(){this._modifiedEditor.focus()}hasTextFocus(){return this._originalEditor.hasTextFocus()||this._modifiedEditor.hasTextFocus()}trigger(e,t,i){this._modifiedEditor.trigger(e,t,i)}changeDecorations(e){return this._modifiedEditor.changeDecorations(e)}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._renderOverviewRuler)return;if(!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const t=this._elementSizeObserver.getHeight(),i=this._getReviewHeight(),n=e.ENTIRE_DIFF_OVERVIEW_WIDTH-2*e.ONE_OVERVIEW_WIDTH;this._modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:e.ONE_OVERVIEW_WIDTH,right:n+e.ONE_OVERVIEW_WIDTH,height:t-i}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:e.ONE_OVERVIEW_WIDTH,height:t-i}))}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout((()=>this._beginUpdateDecorations()),e.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(e,t){return!e&&!t||!(!e||!t)&&e.toString()===t.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout=-1;const t=this._originalEditor.getModel(),i=this._modifiedEditor.getModel();if(!t||!i)return;this._diffComputationToken++;const n=this._diffComputationToken;this._setState(1),this._editorWorkerService.canComputeDiff(t.uri,i.uri)?this._editorWorkerService.computeDiff(t.uri,i.uri,this._ignoreTrimWhitespace,this._maxComputationTime).then((e=>{n===this._diffComputationToken&&t===this._originalEditor.getModel()&&i===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=e,this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())}),(e=>{n===this._diffComputationToken&&t===this._originalEditor.getModel()&&i===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=null,this._updateDecorationsRunner.schedule())})):e._equals(t.uri,this._lastOriginalWarning)&&e._equals(i.uri,this._lastModifiedWarning)||(this._lastOriginalWarning=t.uri,this._lastModifiedWarning=i.uri,this._notificationService.warn(ri.N("diff.tooLarge","Cannot compare files because one file is too large.")))}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this._originalEditor),this._modifiedEditorState.clean(this._modifiedEditor)}_updateDecorations(){if(!this._originalEditor.getModel()||!this._modifiedEditor.getModel())return;const e=this._diffComputationResult?this._diffComputationResult.changes:[],t=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),i=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),n=this._strategy.getEditorsDiffDecorations(e,this._ignoreTrimWhitespace,this._renderIndicators,t,i);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,n.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,n.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(e){const t=Object.assign({},e);return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar=Object.assign({},t.scrollbar||{}),t.scrollbar.vertical="visible",t.folding=!1,t.codeLens=this._diffCodeLens,t.fixedOverflowWidgets=!0,t.minimap=Object.assign({},t.minimap||{}),t.minimap.enabled=!1,t}_adjustOptionsForLeftHandSide(e){const t=this._adjustOptionsForSubEditor(e);return this._renderSideBySide?t.wordWrapOverride1=this._diffWordWrap:t.wordWrapOverride1="off",e.originalAriaLabel&&(t.ariaLabel=e.originalAriaLabel),t.readOnly=!this._originalIsEditable,t.extraEditorClassName="original-in-monaco-diff-editor",Object.assign(Object.assign({},t),{dimension:{height:0,width:0}})}_adjustOptionsForRightHandSide(t){const i=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(i.ariaLabel=t.modifiedAriaLabel),i.wordWrapOverride1=this._diffWordWrap,i.revealHorizontalRightPadding=B.BH.revealHorizontalRightPadding.defaultValue+e.ENTIRE_DIFF_OVERVIEW_WIDTH,i.scrollbar.verticalHasArrows=!1,i.extraEditorClassName="modified-in-monaco-diff-editor",Object.assign(Object.assign({},i),{dimension:{height:0,width:0}})}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const t=this._elementSizeObserver.getWidth(),i=this._elementSizeObserver.getHeight(),n=this._getReviewHeight(),o=this._strategy.layout();this._originalDomNode.style.width=o+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=t-o+"px",this._modifiedDomNode.style.left=o+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=i-n+"px",this._overviewDomElement.style.width=e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=t-e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(e.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:o,height:i-n}),this._modifiedEditor.layout({width:t-o-(this._renderOverviewRuler?e.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:i-n}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(i-n,t,n),this._layoutOverviewViewport()}_layoutOverviewViewport(){const e=this._computeOverviewViewport();e?(this._overviewViewportDomElement.setTop(e.top),this._overviewViewportDomElement.setHeight(e.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const e=this._modifiedEditor.getLayoutInfo();if(!e)return null;const t=this._modifiedEditor.getScrollTop(),i=this._modifiedEditor.getScrollHeight(),n=Math.max(0,e.height),o=Math.max(0,n-0),r=i>0?o/i:0;return{height:Math.max(0,Math.floor(e.height*r)),top:Math.floor(t*r)}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getOptions:()=>({renderOverviewRuler:this._renderOverviewRuler}),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this._originalEditor,getModifiedEditor:()=>this._modifiedEditor}}_setStrategy(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(e,t){const i=this._diffComputationResult?this._diffComputationResult.changes:[];if(0===i.length||e=a?n=r+1:(n=r,o=r)}return i[n]}_getEquivalentLineForOriginalLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,(e=>e.originalStartLineNumber));if(!t)return e;const i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-i;return s<=o?n+Math.min(s,r):n+r-o+s}_getEquivalentLineForModifiedLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,(e=>e.modifiedStartLineNumber));if(!t)return e;const i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),o=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,r=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-n;return s<=r?i+Math.min(s,o):i+o-r+s}getDiffLineInformationForOriginal(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null}getDiffLineInformationForModified(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null}};In.ONE_OVERVIEW_WIDTH=15,In.ENTIRE_DIFF_OVERVIEW_WIDTH=30,In.UPDATE_DIFF_DECORATIONS_DELAY=200,In=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([Dn(3,Cn.p),Dn(4,we.p),Dn(5,Xi.i6),Dn(6,mn.TG),Dn(7,Z.$),Dn(8,Ji.XE),Dn(9,mi.lT),Dn(10,vn.i),Dn(11,Sn.e)],In);class Tn extends de.JT{constructor(e){super(),this._dataSource=e,this._insertColor=null,this._removeColor=null}applyColors(e){const t=(e.getColor(Qi.yp)||Qi.Cz).transparent(2),i=(e.getColor(Qi.P4)||Qi.ke).transparent(2),n=!t.equals(this._insertColor)||!i.equals(this._removeColor);return this._insertColor=t,this._removeColor=i,n}getEditorsDiffDecorations(e,t,i,n,o){o=o.sort(((e,t)=>e.afterLineNumber-t.afterLineNumber)),n=n.sort(((e,t)=>e.afterLineNumber-t.afterLineNumber));const r=this._getViewZones(e,n,o,i),s=this._getOriginalEditorDecorations(e,t,i),a=this._getModifiedEditorDecorations(e,t,i);return{original:{decorations:s.decorations,overviewZones:s.overviewZones,zones:r.original},modified:{decorations:a.decorations,overviewZones:a.overviewZones,zones:r.modified}}}}class Rn{constructor(e){this._source=e,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._indexe.afterLineNumber-t.afterLineNumber,_=(e,t)=>{if(null===t.domNode&&e.length>0){const i=e[e.length-1];if(i.afterLineNumber===t.afterLineNumber&&null===i.domNode)return void(i.heightInLines+=t.heightInLines)}e.push(t)},v=new Rn(this._modifiedForeignVZ),b=new Rn(this._originalForeignVZ);let y=1,w=1;for(let i=0,n=this._lineChanges.length;i<=n;i++){const C=i0?-1:0),g=C.modifiedStartLineNumber+(C.modifiedEndLineNumber>0?-1:0),h=C.originalEndLineNumber>0?On._getViewLineCount(this._originalEditor,C.originalStartLineNumber,C.originalEndLineNumber):0,u=C.modifiedEndLineNumber>0?On._getViewLineCount(this._modifiedEditor,C.modifiedStartLineNumber,C.modifiedEndLineNumber):0,f=Math.max(C.originalStartLineNumber,C.originalEndLineNumber),p=Math.max(C.modifiedStartLineNumber,C.modifiedEndLineNumber)):(d+=1e7+h,g+=1e7+u,f=d,p=g);let S=[],x=[];if(o){let e;e=C?C.originalEndLineNumber>0?C.originalStartLineNumber-y:C.modifiedStartLineNumber-w:r.getLineCount()-y;for(let t=0;to&&x.push({afterLineNumber:i,heightInLines:n-o,domNode:null,marginDomNode:null})}C&&(y=(C.originalEndLineNumber>0?C.originalEndLineNumber:C.originalStartLineNumber)+1,w=(C.modifiedEndLineNumber>0?C.modifiedEndLineNumber:C.modifiedStartLineNumber)+1)}for(;v.current&&v.current.afterLineNumber<=p;){let e;e=v.current.afterLineNumber<=g?d-g+v.current.afterLineNumber:f;let i=null;C&&C.modifiedStartLineNumber<=v.current.afterLineNumber&&v.current.afterLineNumber<=C.modifiedEndLineNumber&&(i=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),S.push({afterLineNumber:e,heightInLines:v.current.height/t,domNode:null,marginDomNode:i}),v.advance()}for(;b.current&&b.current.afterLineNumber<=f;){let t;t=b.current.afterLineNumber<=d?g-d+b.current.afterLineNumber:p,x.push({afterLineNumber:t,heightInLines:b.current.height/e,domNode:null}),b.advance()}if(null!==C&&$n(C)){const e=this._produceOriginalFromDiff(C,h,u);e&&S.push(e)}if(null!==C&&Un(C)){const e=this._produceModifiedFromDiff(C,h,u);e&&x.push(e)}let k=0,D=0;for(S=S.sort(m),x=x.sort(m);k=t.heightInLines?(e.heightInLines-=t.heightInLines,D++):(t.heightInLines-=e.heightInLines,k++)}for(;k(e.domNode||(e.domNode=jn()),e)))}}function Fn(e,t,i,n,o){return{range:new U.e(e,t,i,n),options:o}}const Pn={charDelete:gn.qx.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:gn.qx.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:gn.qx.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:gn.qx.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:gn.qx.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"line-insert",isWholeLine:!0}),lineInsertWithSign:gn.qx.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+Ji.kS.asClassName(En),marginClassName:"line-insert",isWholeLine:!0}),lineDelete:gn.qx.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"line-delete",isWholeLine:!0}),lineDeleteWithSign:gn.qx.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+Ji.kS.asClassName(An),marginClassName:"line-delete",isWholeLine:!0}),lineDeleteMargin:gn.qx.register({description:"diff-editor-line-delete-margin",marginClassName:"line-delete"})};class Bn extends Tn{constructor(e,t){super(e),this._disableSash=!1===t,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new $i.g(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart((()=>this._onSashDragStart())),this._sash.onDidChange((e=>this._onSashDrag(e))),this._sash.onDidEnd((()=>this._onSashDragEnd())),this._sash.onDidReset((()=>this._onSashReset()))}setEnableSplitViewResizing(e){const t=!1===e;this._disableSash!==t&&(this._disableSash=t,this._sash.state=this._disableSash?0:3)}layout(e=this._sashRatio){const t=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?In.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let i=Math.floor((e||.5)*t);const n=Math.floor(.5*t);return i=this._disableSash?n:i||n,t>2*Bn.MINIMUM_EDITOR_WIDTH?(it-Bn.MINIMUM_EDITOR_WIDTH&&(i=t-Bn.MINIMUM_EDITOR_WIDTH)):i=n,this._sashPosition!==i&&(this._sashPosition=i,this._sash.layout()),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(e){const t=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?In.ENTIRE_DIFF_OVERVIEW_WIDTH:0),i=this.layout((this._startSashPosition+(e.currentX-e.startX))/t);this._sashRatio=i/t,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(e){return 0}getVerticalSashLeft(e){return this._sashPosition}getVerticalSashHeight(e){return this._dataSource.getHeight()}_getViewZones(e,t,i){const n=this._dataSource.getOriginalEditor(),o=this._dataSource.getModifiedEditor();return new zn(e,t,i,n,o).getViewZones()}_getOriginalEditorDecorations(e,t,i){const n=this._dataSource.getOriginalEditor(),o=String(this._removeColor),r={decorations:[],overviewZones:[]},s=n.getModel(),a=n._getViewModel();for(const n of e)if(Un(n)){r.decorations.push({range:new U.e(n.originalStartLineNumber,1,n.originalEndLineNumber,1073741824),options:i?Pn.lineDeleteWithSign:Pn.lineDelete}),$n(n)&&n.charChanges||r.decorations.push(Fn(n.originalStartLineNumber,1,n.originalEndLineNumber,1073741824,Pn.charDeleteWholeLine));const e=qn(s,a,n.originalStartLineNumber,n.originalEndLineNumber);if(r.overviewZones.push(new fn.EY(e.startLineNumber,e.endLineNumber,o)),n.charChanges)for(const e of n.charChanges)if(Un(e))if(t)for(let t=e.originalStartLineNumber;t<=e.originalEndLineNumber;t++){let i,n;i=t===e.originalStartLineNumber?e.originalStartColumn:s.getLineFirstNonWhitespaceColumn(t),n=t===e.originalEndLineNumber?e.originalEndColumn:s.getLineLastNonWhitespaceColumn(t),r.decorations.push(Fn(t,i,t,n,Pn.charDelete))}else r.decorations.push(Fn(e.originalStartLineNumber,e.originalStartColumn,e.originalEndLineNumber,e.originalEndColumn,Pn.charDelete))}return r}_getModifiedEditorDecorations(e,t,i){const n=this._dataSource.getModifiedEditor(),o=String(this._insertColor),r={decorations:[],overviewZones:[]},s=n.getModel(),a=n._getViewModel();for(const n of e)if($n(n)){r.decorations.push({range:new U.e(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,1073741824),options:i?Pn.lineInsertWithSign:Pn.lineInsert}),Un(n)&&n.charChanges||r.decorations.push(Fn(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,1073741824,Pn.charInsertWholeLine));const e=qn(s,a,n.modifiedStartLineNumber,n.modifiedEndLineNumber);if(r.overviewZones.push(new fn.EY(e.startLineNumber,e.endLineNumber,o)),n.charChanges)for(const e of n.charChanges)if($n(e))if(t)for(let t=e.modifiedStartLineNumber;t<=e.modifiedEndLineNumber;t++){let i,n;i=t===e.modifiedStartLineNumber?e.modifiedStartColumn:s.getLineFirstNonWhitespaceColumn(t),n=t===e.modifiedEndLineNumber?e.modifiedEndColumn:s.getLineLastNonWhitespaceColumn(t),r.decorations.push(Fn(t,i,t,n,Pn.charInsert))}else r.decorations.push(Fn(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn,Pn.charInsert))}return r}}Bn.MINIMUM_EDITOR_WIDTH=100;class zn extends On{constructor(e,t,i,n,o){super(e,t,i,n,o)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(e,t,i){return i>t?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:i-t,domNode:null}:null}_produceModifiedFromDiff(e,t,i){return t>i?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-i,domNode:null}:null}}class Wn extends Tn{constructor(e,t){super(e),this._decorationsLeft=e.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(e.getOriginalEditor().onDidLayoutChange((t=>{this._decorationsLeft!==t.decorationsLeft&&(this._decorationsLeft=t.decorationsLeft,e.relayoutEditors())})))}setEnableSplitViewResizing(e){}_getViewZones(e,t,i,n){const o=this._dataSource.getOriginalEditor(),r=this._dataSource.getModifiedEditor();return new Vn(e,t,i,o,r,n).getViewZones()}_getOriginalEditorDecorations(e,t,i){const n=String(this._removeColor),o={decorations:[],overviewZones:[]},r=this._dataSource.getOriginalEditor(),s=r.getModel(),a=r._getViewModel();for(const t of e)if(Un(t)){o.decorations.push({range:new U.e(t.originalStartLineNumber,1,t.originalEndLineNumber,1073741824),options:Pn.lineDeleteMargin});const e=qn(s,a,t.originalStartLineNumber,t.originalEndLineNumber);o.overviewZones.push(new fn.EY(e.startLineNumber,e.endLineNumber,n))}return o}_getModifiedEditorDecorations(e,t,i){const n=this._dataSource.getModifiedEditor(),o=String(this._insertColor),r={decorations:[],overviewZones:[]},s=n.getModel(),a=n._getViewModel();for(const n of e)if($n(n)){r.decorations.push({range:new U.e(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,1073741824),options:i?Pn.lineInsertWithSign:Pn.lineInsert});const e=qn(s,a,n.modifiedStartLineNumber,n.modifiedEndLineNumber);if(r.overviewZones.push(new fn.EY(e.startLineNumber,e.endLineNumber,o)),n.charChanges){for(const e of n.charChanges)if($n(e))if(t)for(let t=e.modifiedStartLineNumber;t<=e.modifiedEndLineNumber;t++){let i,n;i=t===e.modifiedStartLineNumber?e.modifiedStartColumn:s.getLineFirstNonWhitespaceColumn(t),n=t===e.modifiedEndLineNumber?e.modifiedEndColumn:s.getLineLastNonWhitespaceColumn(t),r.decorations.push(Fn(t,i,t,n,Pn.charInsert))}else r.decorations.push(Fn(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn,Pn.charInsert))}else r.decorations.push(Fn(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,1073741824,Pn.charInsertWholeLine))}return r}layout(){return Math.max(5,this._decorationsLeft)}}class Vn extends On{constructor(e,t,i,n,o,r){super(e,t,i,n,o),this._originalModel=n.getModel(),this._renderIndicators=r,this._pendingLineChange=[],this._pendingViewZones=[],this._lineBreaksComputer=this._modifiedEditor._getViewModel().createLineBreaksComputer()}getViewZones(){const e=super.getViewZones();return this._finalize(e),e}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){const e=document.createElement("div");return e.className="inline-added-margin-view-zone",e}_produceOriginalFromDiff(e,t,i){const n=document.createElement("div");return n.className="inline-added-margin-view-zone",{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:i,domNode:document.createElement("div"),marginDomNode:n}}_produceModifiedFromDiff(e,t,i){const n=document.createElement("div");n.className=`view-lines line-delete ${kn.S}`;const o=document.createElement("div");o.className="inline-deleted-margin-view-zone";const r={shouldNotShrink:!0,afterLineNumber:0===e.modifiedEndLineNumber?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,minWidthInPx:0,domNode:n,marginDomNode:o,diff:{originalStartLineNumber:e.originalStartLineNumber,originalEndLineNumber:e.originalEndLineNumber,modifiedStartLineNumber:e.modifiedStartLineNumber,modifiedEndLineNumber:e.modifiedEndLineNumber,originalModel:this._originalModel,viewLineCounts:null}};for(let t=e.originalStartLineNumber;t<=e.originalEndLineNumber;t++)this._lineBreaksComputer.addRequest(this._originalModel.getLineContent(t),null);return this._pendingLineChange.push(e),this._pendingViewZones.push(r),r}_finalize(e){const t=this._modifiedEditor.getOptions(),i=this._modifiedEditor.getModel().getOptions().tabSize,n=t.get(40),o=t.get(27),r=n.typicalHalfwidthCharacterWidth,s=t.get(91),a=this._originalModel.mightContainNonBasicASCII(),l=this._originalModel.mightContainRTL(),c=t.get(56),u=t.get(128).decorationsWidth,h=t.get(103),d=t.get(86),g=t.get(80),f=t.get(41),p=this._lineBreaksComputer.finalize();let m=0;for(let t=0;t0,S=(0,dn.l$)(1e4);let x=0,k=0,D=null;for(let t=_.originalStartLineNumber;t<=_.originalEndLineNumber;t++){const r=t-_.originalStartLineNumber,s=this._originalModel.getLineTokens(t),b=s.getLineContent(),L=p[m++],N=pn.Kp.filter(w,t,1,b.length+1);if(L){let p=0;for(const e of L.breakOffsets){const t=s.sliceAndInflate(p,e,0),r=b.substring(p,e);x=Math.max(x,this._renderOriginalLine(k++,r,t,pn.Kp.extractWrapped(N,p,e),C,a,l,n,o,c,u,h,d,g,f,i,S,y)),p=e}for(D||(D=[]);D.lengthe.afterLineNumber-t.afterLineNumber))}_renderOriginalLine(e,t,i,n,o,r,s,a,l,c,u,h,d,g,f,p,m,_){m.appendASCIIString('
    ');const v=kt.wA.isBasicASCII(t,r),b=kt.wA.containsRTL(t,v,s),y=(0,xt.d1)(new xt.IJ(a.isMonospace&&!l,a.canUseHalfwidthRightwardsArrow,t,!1,v,b,0,i,n,p,0,a.spaceWidth,a.middotWidth,a.wsmiddotWidth,h,d,g,f!==B.n0.OFF,null),m);if(m.appendASCIIString("
    "),this._renderIndicators){const t=document.createElement("div");t.className=`delete-sign ${Ji.kS.asClassName(An)}`,t.setAttribute("style",`position:absolute;top:${e*c}px;width:${u}px;height:${c}px;right:0;`),_.appendChild(t)}const w=y.characterMapping.getAbsoluteOffsets();return w.length>0?w[w.length-1]:0}}function Hn(e,t){return(0,B.NY)(e,t,["off","on","inherit"])}function $n(e){return e.modifiedEndLineNumber>0}function Un(e){return e.originalEndLineNumber>0}function jn(){const e=document.createElement("div");return e.className="diagonal-fill",e}function qn(e,t,i,n){const o=e.getLineCount();return i=Math.min(o,Math.max(1,i)),n=Math.min(o,Math.max(1,n)),t.coordinatesConverter.convertModelRangeToViewRange(new U.e(i,e.getLineMinColumn(i),n,e.getLineMaxColumn(n)))}(0,Ji.Ic)(((e,t)=>{const i=e.getColor(Qi.yp);i&&(t.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { background-color: ${i}; }`),t.addRule(`.monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: ${i}; }`),t.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${i}; }`));const n=e.getColor(Qi.P4);n&&(t.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { background-color: ${n}; }`),t.addRule(`.monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: ${n}; }`),t.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${n}; }`));const o=e.getColor(Qi.XL);o&&t.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${"hc"===e.type?"dashed":"solid"} ${o}; }`);const r=e.getColor(Qi.mH);r&&t.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${"hc"===e.type?"dashed":"solid"} ${r}; }`);const s=e.getColor(Qi._w);s&&t.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${s}; }`);const a=e.getColor(Qi.LL);a&&t.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${a}; }`);const l=e.getColor(Qi.et);l&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport {\n\t\t\t\tbackground: ${l};\n\t\t\t}\n\t\t`);const c=e.getColor(Qi.AB);c&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:hover {\n\t\t\t\tbackground: ${c};\n\t\t\t}\n\t\t`);const u=e.getColor(Qi.yn);u&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:active {\n\t\t\t\tbackground: ${u};\n\t\t\t}\n\t\t`);const h=e.getColor(Qi.L_);t.addRule(`\n\t.monaco-editor .diagonal-fill {\n\t\tbackground-image: linear-gradient(\n\t\t\t-45deg,\n\t\t\t${h} 12.5%,\n\t\t\t#0000 12.5%, #0000 50%,\n\t\t\t${h} 50%, ${h} 62.5%,\n\t\t\t#0000 62.5%, #0000 100%\n\t\t);\n\t\tbackground-size: 8px 8px;\n\t}\n\t`)}));var Kn=i(653),Gn=i(2095),Yn=i(4144),Zn=i(1847),Xn=i(1106);class Qn extends de.JT{constructor(){super(),this._onCodeEditorAdd=this._register(new W.Q5),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new W.Q5),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onDiffEditorAdd=this._register(new W.Q5),this._onDiffEditorRemove=this._register(new W.Q5),this._onDecorationTypeRegistered=this._register(new W.Q5),this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null)}addCodeEditor(e){this._codeEditors[e.getId()]=e,this._onCodeEditorAdd.fire(e)}removeCodeEditor(e){delete this._codeEditors[e.getId()]&&this._onCodeEditorRemove.fire(e)}listCodeEditors(){return Object.keys(this._codeEditors).map((e=>this._codeEditors[e]))}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}removeDiffEditor(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.fire(e)}listDiffEditors(){return Object.keys(this._diffEditors).map((e=>this._diffEditors[e]))}getFocusedCodeEditor(){let e=null;const t=this.listCodeEditors();for(const i of t){if(i.hasTextFocus())return i;i.hasWidgetFocus()&&(e=i)}return e}setModelProperty(e,t,i){const n=e.toString();let o;this._modelProperties.has(n)?o=this._modelProperties.get(n):(o=new Map,this._modelProperties.set(n,o)),o.set(t,i)}getModelProperty(e,t){const i=e.toString();if(this._modelProperties.has(i))return this._modelProperties.get(i).get(t)}}class Jn{constructor(e,t,i){this._parent=e,this._editorId=t,this._styleSheet=i,this._refCount=0}ref(){this._refCount++}unref(){var e;this._refCount--,0===this._refCount&&(null===(e=this._styleSheet.parentNode)||void 0===e||e.removeChild(this._styleSheet),this._parent._removeEditorStyleSheets(this._editorId))}insertRule(e,t){this._styleSheet.sheet.insertRule(e,t)}removeRulesContainingSelector(e){X.uN(e,this._styleSheet)}}class eo{constructor(e){this._styleSheet=e}ref(){}unref(){}insertRule(e,t){this._styleSheet.sheet.insertRule(e,t)}removeRulesContainingSelector(e){X.uN(e,this._styleSheet)}}let to=class extends Qn{constructor(e,t){super(),this._decorationOptionProviders=new Map,this._editorStyleSheets=new Map,this._globalStyleSheet=e||null,this._themeService=t}_getOrCreateGlobalStyleSheet(){return this._globalStyleSheet||(this._globalStyleSheet=new eo(X.dS())),this._globalStyleSheet}_getOrCreateStyleSheet(e){if(!e)return this._getOrCreateGlobalStyleSheet();const t=e.getContainerDomNode();if(!X.OO(t))return this._getOrCreateGlobalStyleSheet();const i=e.getId();if(!this._editorStyleSheets.has(i)){const e=new Jn(this,i,X.dS(t));this._editorStyleSheets.set(i,e)}return this._editorStyleSheets.get(i)}_removeEditorStyleSheets(e){this._editorStyleSheets.delete(e)}registerDecorationType(e,t,i,n,o){let r=this._decorationOptionProviders.get(t);if(!r){const s=this._getOrCreateStyleSheet(o),a={styleSheet:s,key:t,parentTypeKey:n,options:i||Object.create(null)};r=n?new oo(this._themeService,s,a):new ro(e,this._themeService,s,a),this._decorationOptionProviders.set(t,r),this._onDecorationTypeRegistered.fire(t)}r.refCount++}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach((t=>t.removeDecorations(e)))))}resolveDecorationOptions(e,t){const i=this._decorationOptionProviders.get(e);if(!i)throw new Error("Unknown decoration type key: "+e);return i.getOptions(this,t)}};var io,no;to=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(io=1,no=Ji.XE,function(e,t){no(e,t,io)})],to);class oo{constructor(e,t,i){this._styleSheet=t,this._styleSheet.ref(),this._parentTypeKey=i.parentTypeKey,this.refCount=0,this._beforeContentRules=new ao(3,i,e),this._afterContentRules=new ao(4,i,e)}getOptions(e,t){const i=e.resolveDecorationOptions(this._parentTypeKey,!0);return this._beforeContentRules&&(i.beforeContentClassName=this._beforeContentRules.className),this._afterContentRules&&(i.afterContentClassName=this._afterContentRules.className),i}dispose(){this._beforeContentRules&&(this._beforeContentRules.dispose(),this._beforeContentRules=null),this._afterContentRules&&(this._afterContentRules.dispose(),this._afterContentRules=null),this._styleSheet.unref()}}class ro{constructor(e,t,i,n){this._disposables=new de.SL,this.description=e,this._styleSheet=i,this._styleSheet.ref(),this.refCount=0;const o=e=>{const i=new ao(e,n,t);if(this._disposables.add(i),i.hasContent)return i.className};this.className=o(0);const r=(e=>{const i=new ao(1,n,t);return this._disposables.add(i),i.hasContent?{className:i.className,hasLetterSpacing:i.hasLetterSpacing}:null})();r&&(this.inlineClassName=r.className,this.inlineClassNameAffectsLetterSpacing=r.hasLetterSpacing),this.beforeContentClassName=o(3),this.afterContentClassName=o(4),this.glyphMarginClassName=o(2);const s=n.options;this.isWholeLine=Boolean(s.isWholeLine),this.stickiness=s.rangeBehavior;const a=s.light&&s.light.overviewRulerColor||s.overviewRulerColor,l=s.dark&&s.dark.overviewRulerColor||s.overviewRulerColor;void 0===a&&void 0===l||(this.overviewRuler={color:a||l,darkColor:l||a,position:s.overviewRulerLane||ve.sh.Center})}getOptions(e,t){return t?{description:this.description,inlineClassName:this.inlineClassName,beforeContentClassName:this.beforeContentClassName,afterContentClassName:this.afterContentClassName,className:this.className,glyphMarginClassName:this.glyphMarginClassName,isWholeLine:this.isWholeLine,overviewRuler:this.overviewRuler,stickiness:this.stickiness}:this}dispose(){this._disposables.dispose(),this._styleSheet.unref()}}const so={color:"color:{0} !important;",opacity:"opacity:{0};",backgroundColor:"background-color:{0};",outline:"outline:{0};",outlineColor:"outline-color:{0};",outlineStyle:"outline-style:{0};",outlineWidth:"outline-width:{0};",border:"border:{0};",borderColor:"border-color:{0};",borderRadius:"border-radius:{0};",borderSpacing:"border-spacing:{0};",borderStyle:"border-style:{0};",borderWidth:"border-width:{0};",fontStyle:"font-style:{0};",fontWeight:"font-weight:{0};",fontSize:"font-size:{0};",fontFamily:"font-family:{0};",textDecoration:"text-decoration:{0};",cursor:"cursor:{0};",letterSpacing:"letter-spacing:{0};",gutterIconPath:"background:{0} center center no-repeat;",gutterIconSize:"background-size:{0};",contentText:"content:'{0}';",contentIconPath:"content:{0};",margin:"margin:{0};",padding:"padding:{0};",width:"width:{0};",height:"height:{0};"};class ao{constructor(e,t,i){this._theme=i.getColorTheme(),this._ruleType=e,this._providerArgs=t,this._usesThemeColors=!1,this._hasContent=!1,this._hasLetterSpacing=!1;let n=lo.getClassName(this._providerArgs.key,e);this._providerArgs.parentTypeKey&&(n=n+" "+lo.getClassName(this._providerArgs.parentTypeKey,e)),this._className=n,this._unThemedSelector=lo.getSelector(this._providerArgs.key,this._providerArgs.parentTypeKey,e),this._buildCSS(),this._usesThemeColors?this._themeListener=i.onDidColorThemeChange((e=>{this._theme=i.getColorTheme(),this._removeCSS(),this._buildCSS()})):this._themeListener=null}dispose(){this._hasContent&&(this._removeCSS(),this._hasContent=!1),this._themeListener&&(this._themeListener.dispose(),this._themeListener=null)}get hasContent(){return this._hasContent}get hasLetterSpacing(){return this._hasLetterSpacing}get className(){return this._className}_buildCSS(){const e=this._providerArgs.options;let t,i,n;switch(this._ruleType){case 0:t=this.getCSSTextForModelDecorationClassName(e),i=this.getCSSTextForModelDecorationClassName(e.light),n=this.getCSSTextForModelDecorationClassName(e.dark);break;case 1:t=this.getCSSTextForModelDecorationInlineClassName(e),i=this.getCSSTextForModelDecorationInlineClassName(e.light),n=this.getCSSTextForModelDecorationInlineClassName(e.dark);break;case 2:t=this.getCSSTextForModelDecorationGlyphMarginClassName(e),i=this.getCSSTextForModelDecorationGlyphMarginClassName(e.light),n=this.getCSSTextForModelDecorationGlyphMarginClassName(e.dark);break;case 3:t=this.getCSSTextForModelDecorationContentClassName(e.before),i=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.before),n=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.before);break;case 4:t=this.getCSSTextForModelDecorationContentClassName(e.after),i=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.after),n=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.after);break;default:throw new Error("Unknown rule type: "+this._ruleType)}const o=this._providerArgs.styleSheet;let r=!1;t.length>0&&(o.insertRule(`${this._unThemedSelector} {${t}}`,0),r=!0),i.length>0&&(o.insertRule(`.vs${this._unThemedSelector} {${i}}`,0),r=!0),n.length>0&&(o.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${n}}`,0),r=!0),this._hasContent=r}_removeCSS(){this._providerArgs.styleSheet.removeRulesContainingSelector(this._unThemedSelector)}getCSSTextForModelDecorationClassName(e){if(!e)return"";const t=[];return this.collectCSSText(e,["backgroundColor"],t),this.collectCSSText(e,["outline","outlineColor","outlineStyle","outlineWidth"],t),this.collectBorderSettingsCSSText(e,t),t.join("")}getCSSTextForModelDecorationInlineClassName(e){if(!e)return"";const t=[];return this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","cursor","color","opacity","letterSpacing"],t),e.letterSpacing&&(this._hasLetterSpacing=!0),t.join("")}getCSSTextForModelDecorationContentClassName(e){if(!e)return"";const t=[];if(void 0!==e){if(this.collectBorderSettingsCSSText(e,t),void 0!==e.contentIconPath&&t.push(Be.WU(so.contentIconPath,X.wY(H.o.revive(e.contentIconPath)))),"string"==typeof e.contentText){const i=e.contentText.match(/^.*$/m)[0].replace(/['\\]/g,"\\$&");t.push(Be.WU(so.contentText,i))}this.collectCSSText(e,["fontStyle","fontWeight","fontSize","fontFamily","textDecoration","color","opacity","backgroundColor","margin","padding"],t),this.collectCSSText(e,["width","height"],t)&&t.push("display:inline-block;")}return t.join("")}getCSSTextForModelDecorationGlyphMarginClassName(e){if(!e)return"";const t=[];return void 0!==e.gutterIconPath&&(t.push(Be.WU(so.gutterIconPath,X.wY(H.o.revive(e.gutterIconPath)))),void 0!==e.gutterIconSize&&t.push(Be.WU(so.gutterIconSize,e.gutterIconSize))),t.join("")}collectBorderSettingsCSSText(e,t){return!!this.collectCSSText(e,["border","borderColor","borderRadius","borderSpacing","borderStyle","borderWidth"],t)&&(t.push(Be.WU("box-sizing: border-box;")),!0)}collectCSSText(e,t,i){const n=i.length;for(let n of t){const t=this.resolveValue(e[n]);"string"==typeof t&&i.push(Be.WU(so[n],t))}return i.length!==n}resolveValue(e){if((0,_e.I)(e)){this._usesThemeColors=!0;const t=this._theme.getColor(e.id);return t?t.toString():"transparent"}return e}}class lo{static getClassName(e,t){return"ced-"+e+"-"+t}static getSelector(e,t,i){let n=".monaco-editor ."+this.getClassName(e,i);return t&&(n=n+"."+this.getClassName(t,i)),3===i?n+="::before":4===i&&(n+="::after"),n}}var co=function(e,t){return function(i,n){t(i,n,e)}};let uo=class extends to{constructor(e,t,i){super(e,i),this.onCodeEditorAdd((()=>this._checkContextKey())),this.onCodeEditorRemove((()=>this._checkContextKey())),this._editorIsOpen=t.createKey("editorIsOpen",!1),this._activeCodeEditor=null}_checkContextKey(){let e=!1;for(const t of this.listCodeEditors())if(!t.isSimpleWidget){e=!0;break}this._editorIsOpen.set(e)}setActiveCodeEditor(e){this._activeCodeEditor=e}getActiveCodeEditor(){return this._activeCodeEditor}openCodeEditor(e,t,i){return t?Promise.resolve(this.doOpenEditor(t,e)):Promise.resolve(null)}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){const i=t.resource.scheme;if(i===te.lg.http||i===te.lg.https)return(0,X.V3)(t.resource.toString()),e}return null}const i=t.options?t.options.selection:null;if(i)if("number"==typeof i.endLineNumber&&"number"==typeof i.endColumn)e.setSelection(i),e.revealRangeInCenter(i,1);else{const t={lineNumber:i.startLineNumber,column:i.startColumn};e.setPosition(t),e.revealPositionInCenter(t,1)}return e}findModel(e,t){const i=e.getModel();return i&&i.uri.toString()!==t.toString()?null:i}};uo=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([co(1,Xi.i6),co(2,Ji.XE)],uo);var ho=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},go=function(e,t){return function(i,n){t(i,n,e)}};let fo=0,po=!1,mo=class extends Vi.Gm{constructor(e,t,i,n,o,r,s,a,l,c){const u=Object.assign({},t);u.ariaLabel=u.ariaLabel||vi.B8.editorViewAccessibleLabel,u.ariaLabel=u.ariaLabel+";"+vi.B8.accessibilityHelpMessage,super(e,u,{},i,n,o,r,a,l,c),this._standaloneKeybindingService=s instanceof Ni?s:null,po||(po=!0,Wi.wW(document.body))}addCommand(e,t,i){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;let n="DYNAMIC_"+ ++fo,o=Xi.Ao.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,o),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if("string"!=typeof e.id||"string"!=typeof e.label||"function"!=typeof e.run)throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");if(!this._standaloneKeybindingService)return console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),de.JT.None;const t=e.id,i=e.label,n=Xi.Ao.and(Xi.Ao.equals("editorId",this.getId()),Xi.Ao.deserialize(e.precondition)),o=e.keybindings,r=Xi.Ao.and(n,Xi.Ao.deserialize(e.keybindingContext)),s=e.contextMenuGroupId||null,a=e.contextMenuOrder||0,l=(t,...i)=>Promise.resolve(e.run(this,...i)),c=new de.SL,u=this.getId()+":"+t;if(c.add(ne.P.registerCommand(u,l)),s){let e={command:{id:u,title:i},when:n,group:s,order:a};c.add(Yn.BH.appendMenuItem(Yn.eH.EditorContext,e))}if(Array.isArray(o))for(const e of o)c.add(this._standaloneKeybindingService.addDynamicKeybinding(u,e,l,r));let h=new Kn.p(u,i,i,n,l,this._contextKeyService);return this._actions[t]=h,c.add((0,de.OF)((()=>{delete this._actions[t]}))),c}_triggerCommand(e,t){if(this._codeEditorService instanceof uo)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};mo=ho([go(2,mn.TG),go(3,Z.$),go(4,ne.H),go(5,Xi.i6),go(6,Zn.d),go(7,Ji.XE),go(8,mi.lT),go(9,Xn.F)],mo);let _o=class extends mo{constructor(e,t,i,n,o,r,s,a,l,c,u,h,d,g,f){const p=Object.assign({},t);Oi(h,p,!1);const m=c.registerEditorContainer(e);"string"==typeof p.theme&&c.setTheme(p.theme),void 0!==p.autoDetectHighContrast&&c.setAutoDetectHighContrast(Boolean(p.autoDetectHighContrast));let _,v=p.model;if(delete p.model,super(e,p,n,o,r,s,a,c,u,d),this._contextViewService=l,this._configurationService=h,this._standaloneThemeService=c,this._register(i),this._register(m),void 0===v?(_=bo(g,f,p.value||"",p.language||"text/plain",void 0),this._ownsModel=!0):(_=v,this._ownsModel=!1),this._attachModel(_),_){let e={oldModelUrl:null,newModelUrl:_.uri};this._onDidChangeModel.fire(e)}}dispose(){super.dispose()}updateOptions(e){Oi(this._configurationService,e,!1),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_attachModel(e){super._attachModel(e),this._modelData&&this._contextViewService.setContainer(this._modelData.view.domNode.domNode)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};_o=ho([go(3,mn.TG),go(4,Z.$),go(5,ne.H),go(6,Xi.i6),go(7,Zn.d),go(8,vn.u),go(9,Gn.Z),go(10,mi.lT),go(11,Jt.Ui),go(12,Xn.F),go(13,at.q),go(14,Ce.h)],_o);let vo=class extends In{constructor(e,t,i,n,o,r,s,a,l,c,u,h,d,g,f){const p=Object.assign({},t);Oi(h,p,!0);const m=c.registerEditorContainer(e);"string"==typeof p.theme&&c.setTheme(p.theme),void 0!==p.autoDetectHighContrast&&c.setAutoDetectHighContrast(Boolean(p.autoDetectHighContrast)),super(e,p,{},f,a,o,n,l,c,u,d,g),this._contextViewService=s,this._configurationService=h,this._standaloneThemeService=c,this._register(i),this._register(m),this._contextViewService.setContainer(this._containerDomElement)}dispose(){super.dispose()}updateOptions(e){Oi(this._configurationService,e,!0),"string"==typeof e.theme&&this._standaloneThemeService.setTheme(e.theme),void 0!==e.autoDetectHighContrast&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(mo,t,i)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(e,t,i){return this.getModifiedEditor().addCommand(e,t,i)}createContextKey(e,t){return this.getModifiedEditor().createContextKey(e,t)}addAction(e){return this.getModifiedEditor().addAction(e)}};function bo(e,t,i,n,o){if(i=i||"",!n){const n=i.indexOf("\n");let r=i;return-1!==n&&(r=i.substring(0,n)),yo(e,i,t.createByFilepathOrFirstLine(o||null,r),o)}return yo(e,i,t.create(n),o)}function yo(e,t,i,n){return e.createModel(t,i,n)}vo=ho([go(3,mn.TG),go(4,Xi.i6),go(5,Zn.d),go(6,vn.u),go(7,we.p),go(8,Z.$),go(9,Gn.Z),go(10,mi.lT),go(11,Jt.Ui),go(12,vn.i),go(13,Sn.e),go(14,Cn.p)],vo);class wo{constructor(e){this._languageIdentifier=e}getId(){return this._languageIdentifier.language}}var Co=i(8721),So=i(4118);const xo="text/plain",ko="application/unknown";let Do=[],Lo=[],No=[];function Eo(e,t=!1){const i=function(e){return{id:e.id,mime:e.mime,filename:e.filename,extension:e.extension,filepattern:e.filepattern,firstline:e.firstline,userConfigured:e.userConfigured,filenameLowercase:e.filename?e.filename.toLowerCase():void 0,extensionLowercase:e.extension?e.extension.toLowerCase():void 0,filepatternLowercase:e.filepattern?e.filepattern.toLowerCase():void 0,filepatternOnPath:!!e.filepattern&&e.filepattern.indexOf(Co.KR.sep)>=0}}(e);Do.push(i),i.userConfigured?No.push(i):Lo.push(i),t&&!i.userConfigured&&Do.forEach((e=>{e.mime===i.mime||e.userConfigured||(i.extension&&e.extension===i.extension&&console.warn(`Overwriting extension <<${i.extension}>> to now point to mime <<${i.mime}>>`),i.filename&&e.filename===i.filename&&console.warn(`Overwriting filename <<${i.filename}>> to now point to mime <<${i.mime}>>`),i.filepattern&&e.filepattern===i.filepattern&&console.warn(`Overwriting filepattern <<${i.filepattern}>> to now point to mime <<${i.mime}>>`),i.firstline&&e.firstline===i.firstline&&console.warn(`Overwriting firstline <<${i.firstline}>> to now point to mime <<${i.mime}>>`))}))}function Ao(e,t,i){let n=null,o=null,r=null;for(let s=i.length-1;s>=0;s--){const a=i[s];if(t===a.filenameLowercase){n=a;break}if(a.filepattern&&(!o||a.filepattern.length>o.filepattern.length)){const i=a.filepatternOnPath?e:t;(0,So.EQ)(a.filepatternLowercase,i)&&(o=a)}a.extension&&(!r||a.extension.length>r.extension.length)&&t.endsWith(a.extensionLowercase)&&(r=a)}return n?n.mime:o?o.mime:r?r.mime:null}var Mo=i(1144),Io=i(9872);const To=Object.prototype.hasOwnProperty;class Ro extends de.JT{constructor(e=!0,t=!1){super(),this._onDidChange=this._register(new W.Q5),this.onDidChange=this._onDidChange.event,this._warnOnOverwrite=t,this._nextLanguageId2=1,this._languageIdToLanguage=[],this._languageToLanguageId=Object.create(null),this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(Mo.dQ.onDidChangeLanguages((e=>this._initializeFromRegistry()))))}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={};const e=Mo.dQ.getLanguages();this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach((e=>{let t=this._languages[e];t.name&&(this._nameMap[t.name]=t.identifier),t.aliases.forEach((e=>{this._lowercaseNameMap[e.toLowerCase()]=t.identifier})),t.mimetypes.forEach((e=>{this._mimeTypesMap[e]=t.identifier}))})),Io.B.as(ei.IP.Configuration).registerOverrideIdentifiers(Mo.dQ.getLanguages().map((e=>e.id))),this._onDidChange.fire()}_getLanguageId(e){if(this._languageToLanguageId[e])return this._languageToLanguageId[e];const t=this._nextLanguageId2++;return this._languageIdToLanguage[t]=e,this._languageToLanguageId[e]=t,t}_registerLanguage(e){const t=e.id;let i;if(To.call(this._languages,t))i=this._languages[t];else{const e=this._getLanguageId(t);i={identifier:new be.rl(t,e),name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[]},this._languages[t]=i}this._mergeLanguage(i,e)}_mergeLanguage(e,t){const i=t.id;let n=null;if(Array.isArray(t.mimetypes)&&t.mimetypes.length>0&&(e.mimetypes.push(...t.mimetypes),n=t.mimetypes[0]),n||(n=`text/x-${i}`,e.mimetypes.push(n)),Array.isArray(t.extensions)){t.configuration?e.extensions=t.extensions.concat(e.extensions):e.extensions=e.extensions.concat(t.extensions);for(let e of t.extensions)Eo({id:i,mime:n,extension:e},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(let o of t.filenames)Eo({id:i,mime:n,filename:o},this._warnOnOverwrite),e.filenames.push(o);if(Array.isArray(t.filenamePatterns))for(let e of t.filenamePatterns)Eo({id:i,mime:n,filepattern:e},this._warnOnOverwrite);if("string"==typeof t.firstLine&&t.firstLine.length>0){let e=t.firstLine;"^"!==e.charAt(0)&&(e="^"+e);try{let t=new RegExp(e);Be.IO(t)||Eo({id:i,mime:n,firstline:t},this._warnOnOverwrite)}catch(e){(0,ke.dL)(e)}}e.aliases.push(i);let o=null;if(void 0!==t.aliases&&Array.isArray(t.aliases)&&(o=0===t.aliases.length?[null]:t.aliases),null!==o)for(const t of o)t&&0!==t.length&&e.aliases.push(t);let r=null!==o&&o.length>0;if(r&&null===o[0]);else{let t=(r?o[0]:null)||i;!r&&e.name||(e.name=t)}t.configuration&&e.configurationFiles.push(t.configuration)}isRegisteredMode(e){return!!To.call(this._mimeTypesMap,e)||To.call(this._languages,e)}getModeIdForLanguageNameLowercase(e){return To.call(this._lowercaseNameMap,e)?this._lowercaseNameMap[e].language:null}extractModeIds(e){return e?e.split(",").map((e=>e.trim())).map((e=>To.call(this._mimeTypesMap,e)?this._mimeTypesMap[e].language:e)).filter((e=>To.call(this._languages,e))):[]}getLanguageIdentifier(e){if(e===ye.TG||0===e)return ye.pA;let t;if("string"==typeof e)t=e;else if(t=this._languageIdToLanguage[e],!t)return null;return To.call(this._languages,t)?this._languages[t].identifier:null}getModeIdsFromFilepathOrFirstLine(e,t){if(!e&&!t)return[];let i=function(e,t){let i;if(e)switch(e.scheme){case te.lg.file:i=e.fsPath;break;case te.lg.data:i=ie.Vb.parseMetaData(e).get(ie.Vb.META_DATA_LABEL);break;default:i=e.path}if(!i)return[ko];i=i.toLowerCase();const n=(0,Co.EZ)(i),o=Ao(i,n,No);if(o)return[o,xo];const r=Ao(i,n,Lo);if(r)return[r,xo];if(t){const e=function(e){if((0,Be.uS)(e)&&(e=e.substr(1)),e.length>0)for(let t=Do.length-1;t>=0;t--){const i=Do[t];if(!i.firstline)continue;const n=e.match(i.firstline);if(n&&n.length>0)return i.mime}return null}(t);if(e)return[e,xo]}return[ko]}(e,t);return this.extractModeIds(i.join(","))}}class Oo{constructor(e,t){let i;this._selector=t,this.languageIdentifier=this._selector(),this._onDidChange=new W.Q5({onFirstListenerAdd:()=>{i=e((()=>this._evaluate()))},onLastListenerRemove:()=>{i.dispose()}}),this.onDidChange=this._onDidChange.event}_evaluate(){let e=this._selector();e.id!==this.languageIdentifier.id&&(this.languageIdentifier=e,this._onDidChange.fire(this.languageIdentifier))}}class Fo extends de.JT{constructor(e=!1){super(),this._onDidCreateMode=this._register(new W.Q5),this.onDidCreateMode=this._onDidCreateMode.event,this._onLanguagesMaybeChanged=this._register(new W.Q5({leakWarningThreshold:200})),this.onLanguagesMaybeChanged=this._onLanguagesMaybeChanged.event,this._instantiatedModes={},this._registry=this._register(new Ro(!0,e)),this._register(this._registry.onDidChange((()=>this._onLanguagesMaybeChanged.fire())))}isRegisteredMode(e){return this._registry.isRegisteredMode(e)}getModeIdForLanguageName(e){return this._registry.getModeIdForLanguageNameLowercase(e)}getModeIdByFilepathOrFirstLine(e,t){const i=this._registry.getModeIdsFromFilepathOrFirstLine(e,t);return(0,ct.Xh)(i,null)}getModeId(e){const t=this._registry.extractModeIds(e);return(0,ct.Xh)(t,null)}getLanguageIdentifier(e){return this._registry.getLanguageIdentifier(e)}create(e){return new Oo(this.onLanguagesMaybeChanged,(()=>{const t=this.getModeId(e);return this._createModeAndGetLanguageIdentifier(t)}))}createByFilepathOrFirstLine(e,t){return new Oo(this.onLanguagesMaybeChanged,(()=>{const i=this.getModeIdByFilepathOrFirstLine(e,t);return this._createModeAndGetLanguageIdentifier(i)}))}_createModeAndGetLanguageIdentifier(e){const t=this.getLanguageIdentifier(e||"plaintext")||ye.pA;return this._getOrCreateMode(t.language),t}triggerMode(e){const t=this.getModeId(e);this._getOrCreateMode(t||"plaintext")}_getOrCreateMode(e){if(!this._instantiatedModes.hasOwnProperty(e)){let t=this.getLanguageIdentifier(e)||ye.pA;this._instantiatedModes[e]=new wo(t),this._onDidCreateMode.fire(this._instantiatedModes[e])}return this._instantiatedModes[e]}}var Po=i(7390),Bo=i(1264);class zo{constructor(e,t,i,n,o){this.token=e,this.index=t,this.fontStyle=i,this.foreground=n,this.background=o}}const Wo=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class Vo{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(null===e)return 0;const t=e.match(Wo);if(!t)throw new Error("Illegal value for token color: "+e);e=t[1].toUpperCase();let i=this._color2id.get(e);return i||(i=++this._lastColorId,this._color2id.set(e,i),this._id2color[i]=Bo.Il.fromHex("#"+e),i)}getColorMap(){return this._id2color.slice(0)}}class Ho{constructor(e,t){this._colorMap=e,this._root=t,this._cache=new Map}static createFromRawTokenTheme(e,t){return this.createFromParsedTokenTheme(function(e){if(!e||!Array.isArray(e))return[];let t=[],i=0;for(let n=0,o=e.length;n{let i=function(e,t){return et?1:0}(e.token,t.token);return 0!==i?i:e.index-t.index}));let i=0,n="000000",o="ffffff";for(;e.length>=1&&""===e[0].token;){let t=e.shift();-1!==t.fontStyle&&(i=t.fontStyle),null!==t.foreground&&(n=t.foreground),null!==t.background&&(o=t.background)}let r=new Vo;for(let e of t)r.getId(e);let s=r.getId(n),a=r.getId(o),l=new Uo(i,s,a),c=new jo(l);for(let t=0,i=e.length;t>>0,this._cache.set(t,i)}return(i|e<<0)>>>0}}const $o=/\b(comment|string|regex|regexp)\b/;class Uo{constructor(e,t,i){this._fontStyle=e,this._foreground=t,this._background=i,this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}clone(){return new Uo(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,i){-1!==e&&(this._fontStyle=e),0!==t&&(this._foreground=t),0!==i&&(this._background=i),this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}}class jo{constructor(e){this._mainRule=e,this._children=new Map}match(e){if(""===e)return this._mainRule;let t,i,n=e.indexOf(".");-1===n?(t=e,i=""):(t=e.substring(0,n),i=e.substring(n+1));let o=this._children.get(t);return void 0!==o?o.match(i):this._mainRule}insert(e,t,i,n){if(""===e)return void this._mainRule.acceptOverwrite(t,i,n);let o,r,s=e.indexOf(".");-1===s?(o=e,r=""):(o=e.substring(0,s),r=e.substring(s+1));let a=this._children.get(o);void 0===a&&(a=new jo(this._mainRule.clone()),this._children.set(o,a)),a.insert(r,t,i,n)}}const qo={base:"vs",inherit:!1,rules:[{token:"",foreground:"000000",background:"fffffe"},{token:"invalid",foreground:"cd3131"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"001188"},{token:"variable.predefined",foreground:"4864AA"},{token:"constant",foreground:"dd0000"},{token:"comment",foreground:"008000"},{token:"number",foreground:"098658"},{token:"number.hex",foreground:"3030c0"},{token:"regexp",foreground:"800000"},{token:"annotation",foreground:"808080"},{token:"type",foreground:"008080"},{token:"delimiter",foreground:"000000"},{token:"delimiter.html",foreground:"383838"},{token:"delimiter.xml",foreground:"0000FF"},{token:"tag",foreground:"800000"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"800000"},{token:"metatag",foreground:"e00000"},{token:"metatag.content.html",foreground:"FF0000"},{token:"metatag.html",foreground:"808080"},{token:"metatag.xml",foreground:"808080"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"863B00"},{token:"string.key.json",foreground:"A31515"},{token:"string.value.json",foreground:"0451A5"},{token:"attribute.name",foreground:"FF0000"},{token:"attribute.value",foreground:"0451A5"},{token:"attribute.value.number",foreground:"098658"},{token:"attribute.value.unit",foreground:"098658"},{token:"attribute.value.html",foreground:"0000FF"},{token:"attribute.value.xml",foreground:"0000FF"},{token:"string",foreground:"A31515"},{token:"string.html",foreground:"0000FF"},{token:"string.sql",foreground:"FF0000"},{token:"string.yaml",foreground:"0451A5"},{token:"keyword",foreground:"0000FF"},{token:"keyword.json",foreground:"0451A5"},{token:"keyword.flow",foreground:"AF00DB"},{token:"keyword.flow.scss",foreground:"0000FF"},{token:"operator.scss",foreground:"666666"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[Qi.cv]:"#FFFFFE",[Qi.NO]:"#000000",[Qi.ES]:"#E5EBF1",[Zi.tR]:"#D3D3D3",[Zi.Ym]:"#939393",[Qi.Rz]:"#ADD6FF4D",[Qi.PX]:"#9DDDFF"}},Ko={base:"vs-dark",inherit:!1,rules:[{token:"",foreground:"D4D4D4",background:"1E1E1E"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"74B0DF"},{token:"variable.predefined",foreground:"4864AA"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"B5CEA8"},{token:"number.hex",foreground:"5BB498"},{token:"regexp",foreground:"B46695"},{token:"annotation",foreground:"cc6666"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"DCDCDC"},{token:"delimiter.html",foreground:"808080"},{token:"delimiter.xml",foreground:"808080"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta.scss",foreground:"A79873"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"DD6A6F"},{token:"metatag.content.html",foreground:"9CDCFE"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key.json",foreground:"9CDCFE"},{token:"string.value.json",foreground:"CE9178"},{token:"attribute.name",foreground:"9CDCFE"},{token:"attribute.value",foreground:"CE9178"},{token:"attribute.value.number.css",foreground:"B5CEA8"},{token:"attribute.value.unit.css",foreground:"B5CEA8"},{token:"attribute.value.hex.css",foreground:"D4D4D4"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"keyword.json",foreground:"CE9178"},{token:"keyword.flow.scss",foreground:"569CD6"},{token:"operator.scss",foreground:"909090"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[Qi.cv]:"#1E1E1E",[Qi.NO]:"#D4D4D4",[Qi.ES]:"#3A3D41",[Zi.tR]:"#404040",[Zi.Ym]:"#707070",[Qi.Rz]:"#ADD6FF26"}},Go={base:"hc-black",inherit:!1,rules:[{token:"",foreground:"FFFFFF",background:"000000"},{token:"invalid",foreground:"f44747"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"1AEBFF"},{token:"variable.parameter",foreground:"9CDCFE"},{token:"constant",foreground:"569CD6"},{token:"comment",foreground:"608B4E"},{token:"number",foreground:"FFFFFF"},{token:"regexp",foreground:"C0C0C0"},{token:"annotation",foreground:"569CD6"},{token:"type",foreground:"3DC9B0"},{token:"delimiter",foreground:"FFFF00"},{token:"delimiter.html",foreground:"FFFF00"},{token:"tag",foreground:"569CD6"},{token:"tag.id.pug",foreground:"4F76AC"},{token:"tag.class.pug",foreground:"4F76AC"},{token:"meta",foreground:"D4D4D4"},{token:"meta.tag",foreground:"CE9178"},{token:"metatag",foreground:"569CD6"},{token:"metatag.content.html",foreground:"1AEBFF"},{token:"metatag.html",foreground:"569CD6"},{token:"metatag.xml",foreground:"569CD6"},{token:"metatag.php",fontStyle:"bold"},{token:"key",foreground:"9CDCFE"},{token:"string.key",foreground:"9CDCFE"},{token:"string.value",foreground:"CE9178"},{token:"attribute.name",foreground:"569CD6"},{token:"attribute.value",foreground:"3FF23F"},{token:"string",foreground:"CE9178"},{token:"string.sql",foreground:"FF0000"},{token:"keyword",foreground:"569CD6"},{token:"keyword.flow",foreground:"C586C0"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"909090"},{token:"predefined.sql",foreground:"FF00FF"}],colors:{[Qi.cv]:"#000000",[Qi.NO]:"#FFFFFF",[Zi.tR]:"#FFFFFF",[Zi.Ym]:"#FFFFFF"}};var Yo=i(2321);const Zo="vs",Xo="vs-dark",Qo="hc-black",Jo=Io.B.as(Qi.IP.ColorContribution),er=Io.B.as(Ji.IP.ThemingContribution);class tr{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;let i=t.base;e.length>0?(ir(e)?this.id=e:this.id=i+" "+e,this.themeName=e):(this.id=i,this.themeName=i),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const e=new Map;for(let t in this.themeData.colors)e.set(t,Bo.Il.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){let t=nr(this.themeData.base);for(let i in t.colors)e.has(i)||e.set(i,Bo.Il.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){return this.getColors().get(e)||(!1!==t?this.getDefault(e):void 0)}getDefault(e){let t=this.defaultColors[e];return t||(t=Jo.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return Object.prototype.hasOwnProperty.call(this.getColors(),e)}get type(){switch(this.base){case Zo:return Yo.e.LIGHT;case Qo:return Yo.e.HIGH_CONTRAST;default:return Yo.e.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){let i=nr(this.themeData.base);e=i.rules,i.encodedTokensColors&&(t=i.encodedTokensColors)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=Ho.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const n=this.tokenTheme._match([e].concat(t).join(".")).metadata,o=be.NX.getForeground(n),r=be.NX.getFontStyle(n);return{foreground:o,italic:Boolean(1&r),bold:Boolean(2&r),underline:Boolean(4&r)}}}function ir(e){return e===Zo||e===Xo||e===Qo}function nr(e){switch(e){case Zo:return qo;case Xo:return Ko;case Qo:return Go}}function or(e){let t=nr(e);return new tr(e,t)}class rr extends de.JT{constructor(){super(),this._onColorThemeChange=this._register(new W.Q5),this.onDidColorThemeChange=this._onColorThemeChange.event,this._environment=Object.create(null),this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(Zo,or(Zo)),this._knownThemes.set(Xo,or(Xo)),this._knownThemes.set(Qo,or(Qo));const e=function(){const e=new W.Q5,t=(0,tn.Ks)();return t.onDidChange((()=>e.fire())),{onDidChange:e.event,getCSS(){const e={},i=i=>{let n=i.defaults;for(;Ji.kS.isThemeIcon(n);){const e=t.getIcon(n.id);if(!e)return;n=e.defaults}const o=n.fontId;if(o){const r=t.getIconFont(o);if(r)return e[o]=r,`.codicon-${i.id}:before { content: '${n.fontCharacter}'; font-family: ${(0,X._h)(o)}; }`}return`.codicon-${i.id}:before { content: '${n.fontCharacter}'; }`},n=[];for(let e of t.getIcons()){const t=i(e);t&&n.push(t)}for(let t in e){const i=e[t].definition.src.map((e=>`${(0,X.wY)(e.location)} format('${e.format}')`)).join(", ");n.push(`@font-face { src: ${i}; font-family: ${(0,X._h)(t)}; }`)}return n.join("\n")}}}();this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS}\n${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(Zo),e.onDidChange((()=>{this._codiconCSS=e.getCSS(),this._updateCSS()})),X.uB("(forced-colors: active)",(()=>{this._updateActualTheme()}))}registerEditorContainer(e){return X.OO(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=X.dS(),this._globalStyleElement.className="monaco-colors",this._globalStyleElement.textContent=this._allCSS,this._styleElements.push(this._globalStyleElement)),de.JT.None}_registerShadowDomContainer(e){const t=X.dS(e);return t.className="monaco-colors",t.textContent=this._allCSS,this._styleElements.push(t),{dispose:()=>{for(let e=0;e{t.base===e&&t.notifyBaseUpdated()})),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;t=this._knownThemes.has(e)?this._knownThemes.get(e):this._knownThemes.get(Zo),this._desiredTheme=t,this._updateActualTheme()}_updateActualTheme(){const e=this._autoDetectHighContrast&&window.matchMedia("(forced-colors: active)").matches?this._knownThemes.get(Qo):this._desiredTheme;this._theme!==e&&(this._theme=e,this._updateThemeOrColorMap())}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._updateActualTheme()}_updateThemeOrColorMap(){let e=[],t={},i={addRule:i=>{t[i]||(e.push(i),t[i]=!0)}};er.getThemingParticipants().forEach((e=>e(this._theme,i,this._environment)));const n=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(function(e){let t=[];for(let i=1,n=e.length;ie.textContent=this._allCSS))}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}}var sr=i(3725);const ar="data-keybinding-context";class lr{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}setValue(e,t){return this._value[e]!==t&&(this._value[e]=t,!0)}removeValue(e){return e in this._value&&(delete this._value[e],!0)}getValue(e){const t=this._value[e];return void 0===t&&this._parent?this._parent.getValue(e):t}}class cr extends lr{constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}}cr.INSTANCE=new cr;class ur extends lr{constructor(e,t,i){super(e,null),this._configurationService=t,this._values=J.Id.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration((e=>{if(6===e.source){const e=Array.from(sr.$.map(this._values,(([e])=>e)));this._values.clear(),i.fire(new gr(e))}else{const t=[];for(const i of e.affectedKeys){const e=`config.${i}`,n=this._values.findSuperstr(e);void 0!==n&&(t.push(...sr.$.map(n,(([e])=>e))),this._values.deleteSuperstr(e)),this._values.has(e)&&(t.push(e),this._values.delete(e))}i.fire(new gr(t))}}))}dispose(){this._listener.dispose()}getValue(e){if(0!==e.indexOf(ur._keyPrefix))return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(ur._keyPrefix.length),i=this._configurationService.getValue(t);let n;switch(typeof i){case"number":case"boolean":case"string":n=i;break;default:n=Array.isArray(i)?JSON.stringify(i):i}return this._values.set(e,n),n}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}}ur._keyPrefix="config.";class hr{constructor(e,t,i){this._service=e,this._key=t,this._defaultValue=i,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){void 0===this._defaultValue?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class dr{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}}class gr{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}}class fr{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}}class pr{constructor(e){this._onDidChangeContext=new W.K3({merge:e=>new fr(e)}),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=e}createKey(e,t){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new hr(this,e,t)}bufferChangeEvents(e){this._onDidChangeContext.pause();try{e()}finally{this._onDidChangeContext.resume()}}createScoped(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new _r(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const t=this.getContextValuesContainer(this._myContextId);return ai.contextMatchesRules(t,e)}getContextKeyValue(e){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(e)}setContext(e,t){if(this._isDisposed)return;const i=this.getContextValuesContainer(this._myContextId);i&&i.setValue(e,t)&&this._onDidChangeContext.fire(new dr(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new dr(e))}getContext(e){return this._isDisposed?cr.INSTANCE:this.getContextValuesContainer(function(e){for(;e;){if(e.hasAttribute(ar)){const t=e.getAttribute(ar);return t?parseInt(t,10):NaN}e=e.parentElement}return 0}(e))}}let mr=class extends pr{constructor(e){super(0),this._contexts=new Map,this._toDispose=new de.SL,this._lastContextId=0;const t=new ur(this._myContextId,e,this._onDidChangeContext);this._contexts.set(this._myContextId,t),this._toDispose.add(t)}dispose(){this._onDidChangeContext.dispose(),this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(e){return this._isDisposed?cr.INSTANCE:this._contexts.get(e)||cr.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");let t=++this._lastContextId;return this._contexts.set(t,new lr(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};mr=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([function(e,t){return function(i,n){t(i,n,e)}}(0,Jt.Ui)],mr);class _r extends pr{constructor(e,t){if(super(e.createChildContext()),this._parentChangeListener=new de.XK,this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(ar)){let e="";this._domNode.classList&&(e=Array.from(this._domNode.classList.values()).join(", ")),console.error("Element already has context attribute"+(e?": "+e:""))}this._domNode.setAttribute(ar,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(this._onDidChangeContext.fire,this._onDidChangeContext)}dispose(){this._isDisposed||(this._onDidChangeContext.dispose(),this._parent.disposeContext(this._myContextId),this._parentChangeListener.dispose(),this._domNode.removeAttribute(ar),this._isDisposed=!0)}getContextValuesContainer(e){return this._isDisposed?cr.INSTANCE:this._parent.getContextValuesContainer(e)}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(e)}disposeContext(e){this._isDisposed||this._parent.disposeContext(e)}}ne.P.registerCommand(Xi.Eq,(function(e,t,i){e.get(Xi.i6).createKey(String(t),i)})),ne.P.registerCommand({id:"getContextKeyInfo",handler:()=>[...Xi.uy.all()].sort(((e,t)=>e.key.localeCompare(t.key))),description:{description:(0,ri.N)("getContextKeyInfo","A command that returns information about context keys"),args:[]}}),ne.P.registerCommand("_generateContextKeyInfo",(function(){const e=[],t=new Set;for(let i of Xi.uy.all())t.has(i.key)||(t.add(i.key),e.push(i));e.sort(((e,t)=>e.key.localeCompare(t.key))),console.log(JSON.stringify(e,void 0,2))}));var vr,br=i(1134),yr=i(161);function wr(e,t,i){const n=i.mode===vr.ALIGN?i.offset:i.offset+i.size,o=i.mode===vr.ALIGN?i.offset+i.size:i.offset;return 0===i.position?t<=e-n?n:t<=o?o-t:Math.max(e-t,0):t<=o?o-t:t<=e-n?n:0}!function(e){e[e.AVOID=0]="AVOID",e[e.ALIGN=1]="ALIGN"}(vr||(vr={}));class Cr extends de.JT{constructor(e,t){super(),this.container=null,this.delegate=null,this.toDisposeOnClean=de.JT.None,this.toDisposeOnSetContainer=de.JT.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=X.$(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,X.Cp(this.view),this.setContainer(e,t),this._register((0,de.OF)((()=>this.setContainer(null,1))))}setContainer(e,t){var i;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,null===(i=this.shadowRootHostElement)||void 0===i||i.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e){if(this.container=e,this.useFixedPosition=1!==t,this.useShadowDOM=3===t,this.useShadowDOM){this.shadowRootHostElement=X.$(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const e=document.createElement("style");e.textContent=Sr,this.shadowRoot.appendChild(e),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(X.$("slot"))}else this.container.appendChild(this.view);const i=new de.SL;Cr.BUBBLE_UP_EVENTS.forEach((e=>{i.add(X.mu(this.container,e,(e=>{this.onDOMEvent(e,!1)})))})),Cr.BUBBLE_DOWN_EVENTS.forEach((e=>{i.add(X.mu(this.container,e,(e=>{this.onDOMEvent(e,!0)}),!0))})),this.toDisposeOnSetContainer=i}}show(e){this.isVisible()&&this.hide(),X.PO(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2500",this.view.style.position=this.useFixedPosition?"fixed":"absolute",X.$Z(this.view),this.toDisposeOnClean=e.render(this.view)||de.JT.None,this.delegate=e,this.doLayout(),this.delegate.focus&&this.delegate.focus()}getViewElement(){return this.view}layout(){this.isVisible()&&(!1!==this.delegate.canRelayout||De.gn&&yr.D.pointerEvents?(this.delegate.layout&&this.delegate.layout(),this.doLayout()):this.hide())}doLayout(){if(!this.isVisible())return;let e,t=this.delegate.getAnchor();if(X.Re(t)){let i=X.i(t);e={top:i.top,left:i.left,width:i.width,height:i.height}}else e={top:t.y,left:t.x,width:t.width||1,height:t.height||2};const i=X.w(this.view),n=X.wn(this.view),o=this.delegate.anchorPosition||0,r=this.delegate.anchorAlignment||0;let s,a;if(0===(this.delegate.anchorAxisAlignment||0)){const t={offset:e.top-window.pageYOffset,size:e.height,position:0===o?0:1},l={offset:e.left,size:e.width,position:0===r?0:1,mode:vr.ALIGN};s=wr(window.innerHeight,n,t)+window.pageYOffset,br.e.intersects({start:s,end:s+n},{start:t.offset,end:t.offset+t.size})&&(l.mode=vr.AVOID),a=wr(window.innerWidth,i,l)}else{const t={offset:e.left,size:e.width,position:0===r?0:1},l={offset:e.top,size:e.height,position:0===o?0:1,mode:vr.ALIGN};a=wr(window.innerWidth,i,t),br.e.intersects({start:a,end:a+i},{start:t.offset,end:t.offset+t.size})&&(l.mode=vr.AVOID),s=wr(window.innerHeight,n,l)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(0===o?"bottom":"top"),this.view.classList.add(0===r?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const l=X.i(this.container);this.view.style.top=s-(this.useFixedPosition?X.i(this.view).top:l.top)+"px",this.view.style.left=a-(this.useFixedPosition?X.i(this.view).left:l.left)+"px",this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,(null==t?void 0:t.onHide)&&t.onHide(e),this.toDisposeOnClean.dispose(),X.Cp(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):t&&!X.jg(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}Cr.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],Cr.BUBBLE_DOWN_EVENTS=["click"];let Sr='\n\t:host {\n\t\tall: initial; /* 1st rule so subsequent properties are reset. */\n\t}\n\n\t@font-face {\n\t\tfont-family: "codicon";\n\t\tsrc: url("./codicon.ttf?5d4d76ab2ce5108968ad644d591a16a6") format("truetype");\n\t}\n\n\t.codicon[class*=\'codicon-\'] {\n\t\tfont: normal normal normal 16px/1 codicon;\n\t\tdisplay: inline-block;\n\t\ttext-decoration: none;\n\t\ttext-rendering: auto;\n\t\ttext-align: center;\n\t\t-webkit-font-smoothing: antialiased;\n\t\t-moz-osx-font-smoothing: grayscale;\n\t\tuser-select: none;\n\t\t-webkit-user-select: none;\n\t\t-ms-user-select: none;\n\t}\n\n\t:host {\n\t\tfont-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif;\n\t}\n\n\t:host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; }\n\t:host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; }\n\t:host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; }\n\t:host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; }\n\t:host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; }\n\n\t:host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; }\n\t:host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; }\n\t:host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; }\n\t:host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; }\n\t:host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; }\n\n\t:host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hans)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(zh-Hant)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ja)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif; }\n\t:host-context(.linux:lang(ko)) { font-family: system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif; }\n';var xr=i(6033),kr=i(8609),Dr=i(6268),Lr=i(3938),Nr=i(1212);const Er=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,Ar=/(&)?(&)([^\s&])/g,Mr=(0,en.CM)("menu-selection",en.lA.check),Ir=(0,en.CM)("menu-submenu",en.lA.chevronRight);var Tr;!function(e){e[e.Right=0]="Right",e[e.Left=1]="Left"}(Tr||(Tr={}));class Rr extends qi.o{constructor(e,t,i={}){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const n=document.createElement("div");n.classList.add("monaco-menu"),n.setAttribute("role","presentation"),super(n,{orientation:1,actionViewItemProvider:e=>this.doGetActionViewItem(e,i,o),context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...De.dz||De.IJ?[10]:[]],keyDown:!0}}),this.menuElement=n,this.actionsList.setAttribute("role","menu"),this.actionsList.tabIndex=0,this.menuDisposables=this._register(new de.SL),this.initializeStyleSheet(e),(0,X.nm)(n,X.tw.KEY_DOWN,(e=>{new Kt.y(e).equals(2)&&e.preventDefault()})),i.enableMnemonics&&this.menuDisposables.add((0,X.nm)(n,X.tw.KEY_DOWN,(e=>{const t=e.key.toLocaleLowerCase();if(this.mnemonics.has(t)){X.zB.stop(e,!0);const i=this.mnemonics.get(t);if(1===i.length&&(i[0]instanceof Fr&&i[0].container&&this.focusItemByElement(i[0].container),i[0].onClick(e)),i.length>1){const e=i.shift();e&&e.container&&(this.focusItemByElement(e.container),i.push(e)),this.mnemonics.set(t,i)}}}))),De.IJ&&this._register((0,X.nm)(n,X.tw.KEY_DOWN,(e=>{const t=new Kt.y(e);t.equals(14)||t.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),X.zB.stop(e,!0)):(t.equals(13)||t.equals(12))&&(this.focusedItem=0,this.focusPrevious(),X.zB.stop(e,!0))}))),this._register((0,X.nm)(this.domNode,X.tw.MOUSE_OUT,(e=>{let t=e.relatedTarget;(0,X.jg)(t,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),e.stopPropagation())}))),this._register((0,X.nm)(this.actionsList,X.tw.MOUSE_OVER,(e=>{let t=e.target;if(t&&(0,X.jg)(t,this.actionsList)&&t!==this.actionsList){for(;t.parentElement!==this.actionsList&&null!==t.parentElement;)t=t.parentElement;if(t.classList.contains("action-item")){const e=this.focusedItem;this.setFocusedItem(t),e!==this.focusedItem&&this.updateFocus()}}})));let o={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new Ki.s$(n,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const r=this.scrollableElement.getDomNode();r.style.position="",this._register((0,X.nm)(r,X.tw.MOUSE_UP,(e=>{e.preventDefault()}))),n.style.maxHeight=`${Math.max(10,window.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter((e=>{var t;return!(null===(t=i.submenuIds)||void 0===t?void 0:t.has(e.id))||(console.warn(`Found submenu cycle: ${e.id}`),!1)})),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter((e=>!(e instanceof Pr))).forEach(((e,t,i)=>{e.updatePositionInSet(t+1,i.length)}))}initializeStyleSheet(e){(0,X.OO)(e)?(this.styleSheet=(0,X.dS)(e),this.styleSheet.textContent=Br):(Rr.globalStyleSheet||(Rr.globalStyleSheet=(0,X.dS)(),Rr.globalStyleSheet.textContent=Br),this.styleSheet=Rr.globalStyleSheet)}style(e){const t=this.getContainer(),i=e.foregroundColor?`${e.foregroundColor}`:"",n=e.backgroundColor?`${e.backgroundColor}`:"",o=e.borderColor?`1px solid ${e.borderColor}`:"",r=e.shadowColor?`0 2px 4px ${e.shadowColor}`:"";t.style.border=o,this.domNode.style.color=i,this.domNode.style.backgroundColor=n,t.style.boxShadow=r,this.viewItems&&this.viewItems.forEach((t=>{(t instanceof Or||t instanceof Pr)&&t.style(e)}))}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(e){const t=this.focusedItem;this.setFocusedItem(e),t!==this.focusedItem&&this.updateFocus()}setFocusedItem(e){for(let t=0;t{this.element&&(this._register((0,X.nm)(this.element,X.tw.MOUSE_UP,(e=>{if(X.zB.stop(e,!0),Dr.vU){if(new Lr.n(e).rightButton)return;this.onClick(e)}else setTimeout((()=>{this.onClick(e)}),0)}))),this._register((0,X.nm)(this.element,X.tw.CONTEXT_MENU,(e=>{X.zB.stop(e,!0)}))))}),100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=(0,X.R3)(this.element,(0,X.$)("a.action-menu-item")),this._action.id===Gi.Z0.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=(0,X.R3)(this.item,(0,X.$)("span.menu-item-check"+Mr.cssSelector)),this.check.setAttribute("role","none"),this.label=(0,X.R3)(this.item,(0,X.$)("span.action-label")),this.options.label&&this.options.keybinding&&((0,X.R3)(this.item,(0,X.$)("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item&&this.item.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){if(this.label&&this.options.label){(0,X.PO)(this.label);let e=(0,Nr.x$)(this.getAction().label);if(e){const t=function(e){const t=Er,i=t.exec(e);if(!i)return e;const n=!i[1];return e.replace(t,n?"$2$3":"").trim()}(e);this.options.enableMnemonics||(e=t),this.label.setAttribute("aria-label",t.replace(/&&/g,"&"));const i=Er.exec(e);if(i){e=Be.YU(e),Ar.lastIndex=0;let t=Ar.exec(e);for(;t&&t[1];)t=Ar.exec(e);const n=e=>e.replace(/&&/g,"&");t?this.label.append(Be.j3(n(e.substr(0,t.index))," "),(0,X.$)("u",{"aria-hidden":"true"},t[3]),Be.oL(n(e.substr(t.index+t[0].length))," ")):this.label.innerText=n(e).trim(),this.item&&this.item.setAttribute("aria-keyshortcuts",(i[1]?i[1]:i[3]).toLocaleLowerCase())}else this.label.innerText=e.replace(/&&/g,"&").trim()}}}updateTooltip(){let e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=ri.N({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.item&&(this.item.title=e)}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.getAction().class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.getAction().enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){this.item&&(this.getAction().checked?(this.item.classList.add("checked"),this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked","true")):(this.item.classList.remove("checked"),this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked","false")))}getMnemonic(){return this.mnemonic}applyStyle(){if(!this.menuStyle)return;const e=this.element&&this.element.classList.contains("focused"),t=e&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,i=e&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,n=e&&this.menuStyle.selectionBorderColor?`thin solid ${this.menuStyle.selectionBorderColor}`:"";this.item&&(this.item.style.color=t?t.toString():"",this.item.style.backgroundColor=i?i.toString():""),this.check&&(this.check.style.color=t?t.toString():""),this.container&&(this.container.style.border=n)}style(e){this.menuStyle=e,this.applyStyle()}}class Fr extends Or{constructor(e,t,i,n){super(e,e,n),this.submenuActions=t,this.parentData=i,this.submenuOptions=n,this.mysubmenu=null,this.submenuDisposables=this._register(new de.SL),this.mouseOver=!1,this.expandDirection=n&&void 0!==n.expandDirection?n.expandDirection:Tr.Right,this.showScheduler=new xe.pY((()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))}),250),this.hideScheduler=new xe.pY((()=>{this.element&&!(0,X.jg)((0,X.vY)(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))}),750)}render(e){super.render(e),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=(0,X.R3)(this.item,(0,X.$)("span.submenu-indicator"+Ir.cssSelector)),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register((0,X.nm)(this.element,X.tw.KEY_UP,(e=>{let t=new Kt.y(e);(t.equals(17)||t.equals(3))&&(X.zB.stop(e,!0),this.createSubmenu(!0))}))),this._register((0,X.nm)(this.element,X.tw.KEY_DOWN,(e=>{let t=new Kt.y(e);(0,X.vY)()===this.item&&(t.equals(17)||t.equals(3))&&X.zB.stop(e,!0)}))),this._register((0,X.nm)(this.element,X.tw.MOUSE_OVER,(e=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())}))),this._register((0,X.nm)(this.element,X.tw.MOUSE_LEAVE,(e=>{this.mouseOver=!1}))),this._register((0,X.nm)(this.element,X.tw.FOCUS_OUT,(e=>{this.element&&!(0,X.jg)((0,X.vY)(),this.element)&&this.hideScheduler.schedule()}))),this._register(this.parentData.parent.onScroll((()=>{this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!1)}))))}updateEnabled(){}onClick(e){X.zB.stop(e,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(e){if(this.parentData.submenu&&(e||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch(e){}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(e,t,i,n){const o={top:0,left:0};return o.left=wr(e.width,t.width,{position:n===Tr.Right?0:1,offset:i.left,size:i.width}),o.left>=i.left&&o.left{new Kt.y(e).equals(15)&&(X.zB.stop(e,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))}))),this.submenuDisposables.add((0,X.nm)(this.submenuContainer,X.tw.KEY_DOWN,(e=>{new Kt.y(e).equals(15)&&X.zB.stop(e,!0)}))),this.submenuDisposables.add(this.parentData.submenu.onDidCancel((()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)}))),this.parentData.submenu.focus(e),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(e){var t;this.item&&(null===(t=this.item)||void 0===t||t.setAttribute("aria-expanded",e))}applyStyle(){if(super.applyStyle(),!this.menuStyle)return;const e=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=e?`${e}`:""),this.parentData.submenu&&this.parentData.submenu.style(this.menuStyle)}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class Pr extends xr.g{style(e){this.label&&(this.label.style.borderBottomColor=e.separatorColor?`${e.separatorColor}`:"")}}let Br=`\n.monaco-menu {\n\tfont-size: 13px;\n\n}\n\n${(0,kr.a)(Mr)}\n${(0,kr.a)(Ir)}\n\n.monaco-menu .monaco-action-bar {\n\ttext-align: right;\n\toverflow: hidden;\n\twhite-space: nowrap;\n}\n\n.monaco-menu .monaco-action-bar .actions-container {\n\tdisplay: flex;\n\tmargin: 0 auto;\n\tpadding: 0;\n\twidth: 100%;\n\tjustify-content: flex-end;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar.reverse .actions-container {\n\tflex-direction: row-reverse;\n}\n\n.monaco-menu .monaco-action-bar .action-item {\n\tcursor: pointer;\n\tdisplay: inline-block;\n\ttransition: transform 50ms ease;\n\tposition: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled {\n\tcursor: default;\n}\n\n.monaco-menu .monaco-action-bar.animated .action-item.active {\n\ttransform: scale(1.272019649, 1.272019649); /* 1.272019649 = √φ */\n}\n\n.monaco-menu .monaco-action-bar .action-item .icon,\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: inline-block;\n}\n\n.monaco-menu .monaco-action-bar .action-item .codicon {\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar .action-label {\n\tfont-size: 11px;\n\tmargin-right: 4px;\n}\n\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label,\n.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover {\n\topacity: 0.4;\n}\n\n/* Vertical actions */\n\n.monaco-menu .monaco-action-bar.vertical {\n\ttext-align: left;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tdisplay: block;\n\tborder-bottom: 1px solid #bbb;\n\tpadding-top: 1px;\n\tmargin-left: .8em;\n\tmargin-right: .8em;\n}\n\n.monaco-menu .secondary-actions .monaco-action-bar .action-label {\n\tmargin-left: 6px;\n}\n\n/* Action Items */\n.monaco-menu .monaco-action-bar .action-item.select-container {\n\toverflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */\n\tflex: 1;\n\tmax-width: 170px;\n\tmin-width: 60px;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n\tmargin-right: 10px;\n}\n\n.monaco-menu .monaco-action-bar.vertical {\n\tmargin-left: 0;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .actions-container {\n\tdisplay: block;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tpadding: 0;\n\ttransform: none;\n\tdisplay: flex;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.active {\n\ttransform: none;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\tflex: 1 1 auto;\n\tdisplay: flex;\n\theight: 2em;\n\talign-items: center;\n\tposition: relative;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label {\n\tflex: 1 1 auto;\n\ttext-decoration: none;\n\tpadding: 0 1em;\n\tbackground: none;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .keybinding,\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tdisplay: inline-block;\n\tflex: 2 1 auto;\n\tpadding: 0 1em;\n\ttext-align: right;\n\tfont-size: 12px;\n\tline-height: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon {\n\tfont-size: 16px !important;\n\tdisplay: flex;\n\talign-items: center;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before {\n\tmargin-left: auto;\n\tmargin-right: -20px;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding,\n.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator {\n\topacity: 0.4;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) {\n\tdisplay: inline-block;\n\tbox-sizing: border-box;\n\tmargin: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tposition: static;\n\toverflow: visible;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu {\n\tposition: absolute;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tpadding: 0.5em 0 0 0;\n\tmargin-bottom: 0.5em;\n\twidth: 100%;\n\theight: 0px !important;\n\tmargin-left: .8em !important;\n\tmargin-right: .8em !important;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator.text {\n\tpadding: 0.7em 1em 0.1em 1em;\n\tfont-weight: bold;\n\topacity: 1;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:hover {\n\tcolor: inherit;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tposition: absolute;\n\tvisibility: hidden;\n\twidth: 1em;\n\theight: 100%;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check {\n\tvisibility: visible;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n/* Context Menu */\n\n.context-view.monaco-menu-container {\n\toutline: 0;\n\tborder: none;\n\tanimation: fadeIn 0.083s linear;\n\t-webkit-app-region: no-drag;\n}\n\n.context-view.monaco-menu-container :focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical:focus,\n.context-view.monaco-menu-container .monaco-action-bar.vertical :focus {\n\toutline: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-item {\n\tborder: thin solid transparent; /* prevents jumping behaviour on hover or focus */\n}\n\n\n/* High Contrast Theming */\n:host-context(.hc-black) .context-view.monaco-menu-container {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused {\n\tbackground: none;\n}\n\n/* Vertical Action Bar Styles */\n\n.monaco-menu .monaco-action-bar.vertical {\n\tpadding: .5em 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-menu-item {\n\theight: 1.8em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator),\n.monaco-menu .monaco-action-bar.vertical .keybinding {\n\tfont-size: inherit;\n\tpadding: 0 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .menu-item-check {\n\tfont-size: inherit;\n\twidth: 2em;\n}\n\n.monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tfont-size: inherit;\n\tpadding: 0.2em 0 0 0;\n\tmargin-bottom: 0.2em;\n}\n\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator {\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n\n.monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\tfont-size: 60%;\n\tpadding: 0 1.8em;\n}\n\n:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator {\n\theight: 100%;\n\tmask-size: 10px 10px;\n\t-webkit-mask-size: 10px 10px;\n}\n\n.monaco-menu .action-item {\n\tcursor: default;\n}\n\n/* Arrows */\n.monaco-scrollable-element > .scrollbar > .scra {\n\tcursor: pointer;\n\tfont-size: 11px !important;\n}\n\n.monaco-scrollable-element > .visible {\n\topacity: 1;\n\n\t/* Background rule added for IE9 - to allow clicks on dom node */\n\tbackground:rgba(0,0,0,0);\n\n\ttransition: opacity 100ms linear;\n}\n.monaco-scrollable-element > .invisible {\n\topacity: 0;\n\tpointer-events: none;\n}\n.monaco-scrollable-element > .invisible.fade {\n\ttransition: opacity 800ms linear;\n}\n\n/* Scrollable Content Inset Shadow */\n.monaco-scrollable-element > .shadow {\n\tposition: absolute;\n\tdisplay: none;\n}\n.monaco-scrollable-element > .shadow.top {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 3px;\n\theight: 3px;\n\twidth: 100%;\n\tbox-shadow: #DDD 0 6px 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.left {\n\tdisplay: block;\n\ttop: 3px;\n\tleft: 0;\n\theight: 100%;\n\twidth: 3px;\n\tbox-shadow: #DDD 6px 0 6px -6px inset;\n}\n.monaco-scrollable-element > .shadow.top-left-corner {\n\tdisplay: block;\n\ttop: 0;\n\tleft: 0;\n\theight: 3px;\n\twidth: 3px;\n}\n.monaco-scrollable-element > .shadow.top.left {\n\tbox-shadow: #DDD 6px 6px 6px -6px inset;\n}\n\n/* ---------- Default Style ---------- */\n\n:host-context(.vs) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(100, 100, 100, .4);\n}\n:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(121, 121, 121, .4);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider {\n\tbackground: rgba(111, 195, 223, .6);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: rgba(100, 100, 100, .7);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider:hover {\n\tbackground: rgba(111, 195, 223, .8);\n}\n\n.monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(0, 0, 0, .6);\n}\n:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(191, 191, 191, .4);\n}\n:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider.active {\n\tbackground: rgba(111, 195, 223, 1);\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.top {\n\tbox-shadow: none;\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.left {\n\tbox-shadow: #000 6px 0 6px -6px inset;\n}\n\n:host-context(.vs-dark) .monaco-scrollable-element .shadow.top.left {\n\tbox-shadow: #000 6px 6px 6px -6px inset;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.top {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.left {\n\tbox-shadow: none;\n}\n\n:host-context(.hc-black) .monaco-scrollable-element .shadow.top.left {\n\tbox-shadow: none;\n}\n`;var zr=i(8810),Wr=i(4850);class Vr{constructor(e,t,i,n,o){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.themeService=o,this.focusToReturn=null,this.block=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;let i;this.focusToReturn=document.activeElement;let n=(0,X.Re)(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:n=>{let o=e.getMenuClassName?e.getMenuClassName():"";o&&(n.className+=" "+o),this.options.blockMouse&&(this.block=n.appendChild((0,X.$)(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",(0,Wr.jt)(this.block,X.tw.MOUSE_DOWN)((e=>e.stopPropagation())));const r=new de.SL,s=e.actionRunner||new Gi.Wi;return s.onBeforeRun(this.onActionRun,this,r),s.onDidRun(this.onDidActionRun,this,r),i=new Rr(n,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:s,getKeyBinding:e.getKeyBinding?e.getKeyBinding:e=>this.keybindingService.lookupKeybinding(e.id)}),r.add((0,zr.tj)(i,this.themeService)),i.onDidCancel((()=>this.contextViewService.hideContextView(!0)),null,r),i.onDidBlur((()=>this.contextViewService.hideContextView(!0)),null,r),(0,Wr.jt)(window,X.tw.BLUR)((()=>{this.contextViewService.hideContextView(!0)}),null,r),(0,Wr.jt)(window,X.tw.MOUSE_DOWN)((e=>{if(e.defaultPrevented)return;let t=new Lr.n(e),i=t.target;if(!t.rightButton){for(;i;){if(i===n)return;i=i.parentElement}this.contextViewService.hideContextView(!0)}}),null,r),(0,de.F8)(r,i)},focus:()=>{i&&i.focus(!!e.autoSelectFirstItem)},onHide:t=>{e.onHide&&e.onHide(!!t),this.block&&(this.block.remove(),this.block=null),this.focusToReturn&&this.focusToReturn.focus()}},n,!!n)}onActionRun(e){this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1),this.focusToReturn&&this.focusToReturn.focus()}onDidActionRun(e){e.error&&!(0,ke.VV)(e.error)&&this.notificationService.error(e.error)}}var Hr=i(829),$r=function(e,t){return function(i,n){t(i,n,e)}};let Ur=class extends de.JT{constructor(e,t,i,n,o){super(),this.contextMenuHandler=new Vr(i,e,t,n,o)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){this.contextMenuHandler.showContextMenu(e),X._q.getInstance().resetKeyStatus()}};Ur=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([$r(0,Hr.b),$r(1,mi.lT),$r(2,vn.u),$r(3,Zn.d),$r(4,Ji.XE)],Ur);const jr=(0,mn.yh)("layoutService");let qr=class extends de.JT{constructor(e){super(),this.layoutService=e,this.currentViewDisposable=de.JT.None,this.container=e.container,this.contextView=this._register(new Cr(this.container,1)),this.layout(),this._register(e.onDidLayout((()=>this.layout())))}setContainer(e,t){this.contextView.setContainer(e,t||1)}showContextView(e,t,i){t?t!==this.container&&(this.container=t,this.setContainer(t,i?3:2)):this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.contextView.show(e);const n=(0,de.OF)((()=>{this.currentViewDisposable===n&&this.hideContextView()}));return this.currentViewDisposable=n,n}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(e){this.contextView.hide(e)}};qr=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([function(e,t){return function(i,n){t(i,n,e)}}(0,jr)],qr);var Kr=i(8820);class Gr{constructor(e){this.incoming=new Map,this.outgoing=new Map,this.data=e}}class Yr{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(let t of this._nodes.values())0===t.outgoing.size&&e.push(t);return e}insertEdge(e,t){const i=this.lookupOrInsertNode(e),n=this.lookupOrInsertNode(t);i.outgoing.set(this._hashFn(t),n),n.incoming.set(this._hashFn(e),i)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(let e of this._nodes.values())e.outgoing.delete(t),e.incoming.delete(t)}lookupOrInsertNode(e){const t=this._hashFn(e);let i=this._nodes.get(t);return i||(i=new Gr(e),this._nodes.set(t,i)),i}isEmpty(){return 0===this._nodes.size}toString(){let e=[];for(let[t,i]of this._nodes)e.push(`${t}, (incoming)[${[...i.incoming.keys()].join(", ")}], (outgoing)[${[...i.outgoing.keys()].join(",")}]`);return e.join("\n")}findCycleSlow(){for(let[e,t]of this._nodes){const i=new Set([e]),n=this._findCycle(t,i);if(n)return n}}_findCycle(e,t){for(let[i,n]of e.outgoing){if(t.has(i))return[...t,i].join(" -> ");t.add(i);const e=this._findCycle(n,t);if(e)return e;t.delete(i)}}}var Zr=i(7108);class Xr extends Error{constructor(e){var t;super("cyclic dependency between services"),this.message=null!==(t=e.findCycleSlow())&&void 0!==t?t:`UNABLE to detect cycle, dumping graph: \n${e.toString()}`}}class Qr{constructor(e=new _n.y,t=!1,i){this._activeInstantiations=new Set,this._services=e,this._strict=t,this._parent=i,this._services.set(mn.TG,this)}createChild(e){return new Qr(e,this._strict,this)}invokeFunction(e,...t){let i=Jr.traceInvocation(e),n=!1;try{return e({get:(e,t)=>{if(n)throw(0,ke.L6)("service accessor is only valid during the invocation of its target method");const o=this._getOrCreateServiceInstance(e,i);if(!o&&t!==mn.jt)throw new Error(`[invokeFunction] unknown service '${e}'`);return o}},...t)}finally{n=!0,i.stop()}}createInstance(e,...t){let i,n;return e instanceof Zr.M?(i=Jr.traceCreation(e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=Jr.traceCreation(e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){let n=mn.I8.getServiceDependencies(e).sort(((e,t)=>e.index-t.index)),o=[];for(const t of n){let n=this._getOrCreateServiceInstance(t.id,i);if(!n&&this._strict&&!t.optional)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${t.id}.`);o.push(n)}let r=n.length>0?n[0].index:t.length;if(t.length!==r){console.warn(`[createInstance] First service dependency of ${e.name} at position ${r+1} conflicts with ${t.length} static arguments`);let i=r-t.length;t=i>0?t.concat(new Array(i)):t.slice(0,r)}return new e(...[...t,...o])}_setServiceInstance(e,t){if(this._services.get(e)instanceof Zr.M)this._services.set(e,t);else{if(!this._parent)throw new Error("illegalState - setting UNKNOWN service instance");this._parent._setServiceInstance(e,t)}}_getServiceInstanceOrDescriptor(e){let t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){let i=this._getServiceInstanceOrDescriptor(e);return i instanceof Zr.M?this._safeCreateAndCacheServiceInstance(e,i,t.branch(e,!0)):(t.branch(e,!1),i)}_safeCreateAndCacheServiceInstance(e,t,i){if(this._activeInstantiations.has(e))throw new Error(`illegal state - RECURSIVELY instantiating service '${e}'`);this._activeInstantiations.add(e);try{return this._createAndCacheServiceInstance(e,t,i)}finally{this._activeInstantiations.delete(e)}}_createAndCacheServiceInstance(e,t,i){const n=new Yr((e=>e.id.toString()));let o=0;const r=[{id:e,desc:t,_trace:i}];for(;r.length;){const t=r.pop();if(n.lookupOrInsertNode(t),o++>1e3)throw new Xr(n);for(let i of mn.I8.getServiceDependencies(t.desc.ctor)){let o=this._getServiceInstanceOrDescriptor(i.id);if(o||i.optional||console.warn(`[createInstance] ${e} depends on ${i.id} which is NOT registered.`),o instanceof Zr.M){const e={id:i.id,desc:o,_trace:t._trace.branch(i.id,!0)};n.insertEdge(t,e),r.push(e)}}}for(;;){const e=n.roots();if(0===e.length){if(!n.isEmpty())throw new Xr(n);break}for(const{data:t}of e){if(this._getServiceInstanceOrDescriptor(t.id)instanceof Zr.M){const e=this._createServiceInstanceWithOwner(t.id,t.desc.ctor,t.desc.staticArguments,t.desc.supportsDelayedInstantiation,t._trace);this._setServiceInstance(t.id,e)}n.removeNode(t)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,o){if(this._services.get(e)instanceof Zr.M)return this._createServiceInstance(t,i,n,o);if(this._parent)return this._parent._createServiceInstanceWithOwner(e,t,i,n,o);throw new Error(`illegalState - creating UNKNOWN service instance ${t.name}`)}_createServiceInstance(e,t=[],i,n){if(i){const i=new xe.Ue((()=>this._createInstance(e,t,n)));return new Proxy(Object.create(null),{get(e,t){if(t in e)return e[t];let n=i.value,o=n[t];return"function"!=typeof o||(o=o.bind(n),e[t]=o),o},set:(e,t,n)=>(i.value[t]=n,!0)})}return this._createInstance(e,t,n)}}class Jr{constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}static traceInvocation(e){return Jr._None}static traceCreation(e){return Jr._None}branch(e,t){let i=new Jr(2,e.toString());return this._dep.push([e,t,i]),i}stop(){let e=Date.now()-this._start;Jr._totals+=e;let t=!1,i=[`${0===this.type?"CREATE":"CALL"} ${this.name}`,`${function e(i,n){let o=[],r=new Array(i+1).join("\t");for(const[s,a,l]of n._dep)if(a&&l){t=!0,o.push(`${r}CREATES -> ${s}`);let n=e(i+1,l);n&&o.push(n)}else o.push(`${r}uses -> ${s}`);return o.join("\n")}(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${Jr._totals.toFixed(2)}ms)`];(e>2||t)&&console.log(i.join("\n"))}}Jr._None=new class extends Jr{constructor(){super(-1,null)}stop(){}branch(){return this}},Jr._totals=0;var es=i(4349),ts=i(343),is=i(8674);class ns{constructor(){this._byResource=new J.Y9,this._byOwner=new Map}set(e,t,i){let n=this._byResource.get(e);n||(n=new Map,this._byResource.set(e,n)),n.set(t,i);let o=this._byOwner.get(t);o||(o=new J.Y9,this._byOwner.set(t,o)),o.set(e,i)}get(e,t){let i=this._byResource.get(e);return null==i?void 0:i.get(t)}delete(e,t){let i=!1,n=!1,o=this._byResource.get(e);o&&(i=o.delete(t));let r=this._byOwner.get(t);if(r&&(n=r.delete(e)),i!==n)throw new Error("illegal state");return i&&n}values(e){var t,i,n,o;return"string"==typeof e?null!==(i=null===(t=this._byOwner.get(e))||void 0===t?void 0:t.values())&&void 0!==i?i:sr.$.empty():H.o.isUri(e)?null!==(o=null===(n=this._byResource.get(e))||void 0===n?void 0:n.values())&&void 0!==o?o:sr.$.empty():sr.$.map(sr.$.concat(...this._byOwner.values()),(e=>e[1]))}}class os{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new J.Y9,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const e=this._data.get(t);e&&this._substract(e);const i=this._resourceStats(t);this._add(i),this._data.set(t,i)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(e.scheme===te.lg.inMemory||e.scheme===te.lg.walkThrough||e.scheme===te.lg.walkThroughSnippet)return t;for(const{severity:i}of this._service.read({resource:e}))i===is.ZL.Error?t.errors+=1:i===is.ZL.Warning?t.warnings+=1:i===is.ZL.Info?t.infos+=1:t.unknowns+=1;return t}_substract(e){this.errors-=e.errors,this.warnings-=e.warnings,this.infos-=e.infos,this.unknowns-=e.unknowns}_add(e){this.errors+=e.errors,this.warnings+=e.warnings,this.infos+=e.infos,this.unknowns+=e.unknowns}}class rs{constructor(){this._onMarkerChanged=new W.Q5,this.onMarkerChanged=W.ju.debounce(this._onMarkerChanged.event,rs._debouncer,0),this._data=new ns,this._stats=new os(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(e,t){for(const i of t||[])this.changeOne(e,i,[])}changeOne(e,t,i){if((0,ct.XY)(i))this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);else{const n=[];for(const o of i){const i=rs._toMarker(e,t,o);i&&n.push(i)}this._data.set(t,e,n),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,i){let{code:n,severity:o,message:r,source:s,startLineNumber:a,startColumn:l,endLineNumber:c,endColumn:u,relatedInformation:h,tags:d}=i;if(r)return a=a>0?a:1,l=l>0?l:1,c=c>=a?c:a,u=u>0?u:l,{resource:t,owner:e,code:n,severity:o,message:r,source:s,startLineNumber:a,startColumn:l,endLineNumber:c,endColumn:u,relatedInformation:h,tags:d}}read(e=Object.create(null)){let{owner:t,resource:i,severities:n,take:o}=e;if((!o||o<0)&&(o=-1),t&&i){const e=this._data.get(i,t);if(e){const t=[];for(const i of e)if(rs._accept(i,n)){const e=t.push(i);if(o>0&&e===o)break}return t}return[]}if(t||i){const e=this._data.values(null!=i?i:t),r=[];for(const t of e)for(const e of t)if(rs._accept(e,n)){const t=r.push(e);if(o>0&&t===o)return r}return r}{const e=[];for(let t of this._data.values())for(let i of t)if(rs._accept(i,n)){const t=e.push(i);if(o>0&&t===o)return e}return e}}static _accept(e,t){return void 0===t||(t&e.severity)===e.severity}static _debouncer(e,t){e||(rs._dedupeMap=new J.Y9,e=[]);for(const i of t)rs._dedupeMap.has(i)||(rs._dedupeMap.set(i,!0),e.push(i));return e}}var ss=i(6904),as=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},ls=function(e,t){return function(i,n){t(i,n,e)}};let cs=class{constructor(e){this._commandService=e}createMenu(e,t,i=!1){return new us(e,i,this._commandService,t,this)}};cs=as([ls(0,ne.H)],cs);let us=class e{constructor(e,t,i,n,o){this._id=e,this._fireEventsForSubmenuChanges=t,this._commandService=i,this._contextKeyService=n,this._menuService=o,this._dispoables=new de.SL,this._onDidChange=new W.Q5,this.onDidChange=this._onDidChange.event,this._menuGroups=[],this._contextKeys=new Set,this._build();const r=new xe.pY((()=>this._build()),50);this._dispoables.add(r),this._dispoables.add(Yn.BH.onDidChangeMenu((t=>{t.has(e)&&r.schedule()})));const s=new xe.pY((()=>this._onDidChange.fire(this)),50);this._dispoables.add(s),this._dispoables.add(n.onDidChangeContext((e=>{e.affectsSome(this._contextKeys)&&s.schedule()})))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}_build(){this._menuGroups.length=0,this._contextKeys.clear();const t=Yn.BH.getMenuItems(this._id);let i;t.sort(e._compareMenuItems);for(let e of t){const t=e.group||"";i&&i[0]===t||(i=[t,[]],this._menuGroups.push(i)),i[1].push(e),this._collectContextKeys(e)}this._onDidChange.fire(this)}_collectContextKeys(t){if(e._fillInKbExprKeys(t.when,this._contextKeys),(0,Yn.vr)(t)){if(t.command.precondition&&e._fillInKbExprKeys(t.command.precondition,this._contextKeys),t.command.toggled){const i=t.command.toggled.condition||t.command.toggled;e._fillInKbExprKeys(i,this._contextKeys)}}else this._fireEventsForSubmenuChanges&&Yn.BH.getMenuItems(t.submenu).forEach(this._collectContextKeys,this)}getActions(e){const t=[];for(let i of this._menuGroups){const[n,o]=i,r=[];for(const t of o)if(this._contextKeyService.contextMatchesRules(t.when)){const i=(0,Yn.vr)(t)?new Yn.U8(t.command,t.alt,e,this._contextKeyService,this._commandService):new Yn.NZ(t,this._menuService,this._contextKeyService,e);r.push(i)}r.length>0&&t.push([n,r])}return t}static _fillInKbExprKeys(e,t){if(e)for(let i of e.keys())t.add(i)}static _compareMenuItems(t,i){let n=t.group,o=i.group;if(n!==o){if(!n)return 1;if(!o)return-1;if("navigation"===n)return-1;if("navigation"===o)return 1;let e=n.localeCompare(o);if(0!==e)return e}let r=t.order||0,s=i.order||0;return rs?1:e._compareTitles((0,Yn.vr)(t)?t.command.title:t.title,(0,Yn.vr)(i)?i.command.title:i.title)}static _compareTitles(e,t){const i="string"==typeof e?e:e.original,n="string"==typeof t?t:t.original;return i.localeCompare(n)}};us=as([ls(2,ne.H),ls(3,Xi.i6),ls(4,Yn.co)],us);var hs=i(6479),ds=function(e,t){return function(i,n){t(i,n,e)}};function gs(e){return e.toString()}class fs extends de.JT{constructor(e){super(),this.model=e,this._markersData=new Map,this._register((0,de.OF)((()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()})))}update(e,t){const i=[...this._markersData.keys()];this._markersData.clear();const n=this.model.deltaDecorations(i,t);for(let t=0;tthis._onModelAdded(e))),this._register(e.onModelAdded(this._onModelAdded,this)),this._register(e.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach((e=>e.dispose())),this._markerDecorations.clear()}getMarker(e,t){const i=this._markerDecorations.get(gs(e));return i&&i.getMarker(t)||null}_handleMarkerChange(e){e.forEach((e=>{const t=this._markerDecorations.get(gs(e));t&&this._updateDecorations(t)}))}_onModelAdded(e){const t=new fs(e);this._markerDecorations.set(gs(e.uri),t),this._updateDecorations(t)}_onModelRemoved(e){const t=this._markerDecorations.get(gs(e.uri));t&&(t.dispose(),this._markerDecorations.delete(gs(e.uri))),e.uri.scheme!==te.lg.inMemory&&e.uri.scheme!==te.lg.internal&&e.uri.scheme!==te.lg.vscode||this._markerService&&this._markerService.read({resource:e.uri}).map((e=>e.owner)).forEach((t=>this._markerService.remove(t,[e.uri])))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});let i=t.map((t=>({range:this._createDecorationRange(e.model,t),options:this._createDecorationOption(t)})));e.update(t,i)&&this._onDidChangeMarker.fire(e.model)}_createDecorationRange(e,t){let i=U.e.lift(t);if(t.severity!==is.ZL.Hint||this._hasMarkerTag(t,1)||this._hasMarkerTag(t,2)||(i=i.setEndPosition(i.startLineNumber,i.startColumn+2)),i=e.validateRange(i),i.isEmpty()){let t=e.getWordAtPosition(i.getStartPosition());if(t)i=new U.e(i.startLineNumber,t.startColumn,i.endLineNumber,t.endColumn);else{let t=e.getLineLastNonWhitespaceColumn(i.startLineNumber)||e.getLineMaxColumn(i.startLineNumber);1===t||(i=i.endColumn>=t?new U.e(i.startLineNumber,t-1,i.endLineNumber,t):new U.e(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn+1))}}else if(t.endColumn===Number.MAX_VALUE&&1===t.startColumn&&i.startLineNumber===i.endLineNumber){let n=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);n=0}};ps=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([ds(0,at.q),ds(1,is.lT)],ps);var ms=i(5026),_s=function(e,t){return function(i,n){t(i,n,e)}};let vs=class extends de.JT{constructor(e,t){super(),this._contextKeyService=e,this._configurationService=t,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new W.Q5,this._accessibilityModeEnabledContext=Xn.U.bindTo(this._contextKeyService);const i=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration("editor.accessibilitySupport")&&(i(),this._onDidChangeScreenReaderOptimized.fire())}))),i(),this.onDidChangeScreenReaderOptimized((()=>i()))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return"on"===e||"auto"===e&&2===this._accessibilitySupport}getAccessibilitySupport(){return this._accessibilitySupport}};vs=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([_s(0,Xi.i6),_s(1,Jt.Ui)],vs);var bs=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class ys{constructor(){this.mapTextToType=new Map,this.findText=""}writeText(e,t){return bs(this,void 0,void 0,(function*(){if(t)return void this.mapTextToType.set(t,e);try{return yield navigator.clipboard.writeText(e)}catch(e){console.error(e)}const i=document.activeElement,n=document.body.appendChild((0,X.$)("textarea",{"aria-hidden":!0}));n.style.height="1px",n.style.width="1px",n.style.position="absolute",n.value=e,n.focus(),n.select(),document.execCommand("copy"),i instanceof HTMLElement&&i.focus(),document.body.removeChild(n)}))}readText(e){return bs(this,void 0,void 0,(function*(){if(e)return this.mapTextToType.get(e)||"";try{return yield navigator.clipboard.readText()}catch(e){return console.error(e),""}}))}readFindText(){return bs(this,void 0,void 0,(function*(){return this.findText}))}writeFindText(e){return bs(this,void 0,void 0,(function*(){this.findText=e}))}}var ws=i(4862),Cs=function(e,t){return function(i,n){t(i,n,e)}},Ss=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function xs(e){return e.scheme===te.lg.file?e.fsPath:e.path}let ks=0;class Ds{constructor(e,t,i,n,o,r,s){this.id=++ks,this.type=0,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabel=t,this.strResource=i,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=n,this.groupOrder=o,this.sourceId=r,this.sourceOrder=s,this.isValid=!0}setValid(e){this.isValid=e}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class Ls{constructor(e,t){this.resourceLabel=e,this.reason=t}}class Ns{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,i]of this.elements)(0===i.reason?e:t).push(i.resourceLabel);let i=[];return e.length>0&&i.push(ri.N({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&i.push(ri.N({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",t.join(", "))),i.join("\n")}get size(){return this.elements.size}has(e){return this.elements.has(e)}set(e,t){this.elements.set(e,t)}delete(e){return this.elements.delete(e)}}class Es{constructor(e,t,i,n,o,r,s){this.id=++ks,this.type=1,this.actual=e,this.label=e.label,this.confirmBeforeUndo=e.confirmBeforeUndo||!1,this.resourceLabels=t,this.strResources=i,this.groupId=n,this.groupOrder=o,this.sourceId=r,this.sourceOrder=s,this.removedResources=null,this.invalidatedResources=null}canSplit(){return"function"==typeof this.actual.split}removeResource(e,t,i){this.removedResources||(this.removedResources=new Ns),this.removedResources.has(t)||this.removedResources.set(t,new Ls(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t),0===this.invalidatedResources.size&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new Ns),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new Ls(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class As{constructor(e,t){this.resourceLabel=e,this.strResource=t,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const e of this._past)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){let e=[];e.push(`* ${this.strResource}:`);for(let t=0;t=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join("\n")}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){1===e.type?e.setValid(this.resourceLabel,this.strResource,t):e.setValid(t)}setElementsValidFlag(e,t){for(const i of this._past)t(i.actual)&&this._setElementValidFlag(i,e);for(const i of this._future)t(i.actual)&&this._setElementValidFlag(i,e)}pushElement(e){for(const e of this._future)1===e.type&&e.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(e),this.versionId++}createSnapshot(e){const t=[];for(let e=0,i=this._past.length;e=0;e--)t.push(this._future[e].id);return new ws.YO(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,o=-1;for(let r=0,s=this._past.length;r=t||s.id!==e.elements[n])&&(i=!1,o=0),i||1!==s.type||s.removeResource(this.resourceLabel,this.strResource,0)}let r=-1;for(let o=this._future.length-1;o>=0;o--,n++){const s=this._future[o];i&&(n>=t||s.id!==e.elements[n])&&(i=!1,r=o),i||1!==s.type||s.removeResource(this.resourceLabel,this.strResource,0)}-1!==o&&(this._past=this._past.slice(0,o)),-1!==r&&(this._future=this._future.slice(r+1)),this.versionId++}getElements(){const e=[],t=[];for(const t of this._past)e.push(t.actual);for(const e of this._future)t.push(e.actual);return{past:e,future:t}}getClosestPastElement(){return 0===this._past.length?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return 0===this._future.length?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(e,t){for(let i=this._past.length-1;i>=0;i--)if(this._past[i]===e){t.has(this.strResource)?this._past[i]=t.get(this.strResource):this._past.splice(i,1);break}this.versionId++}splitFutureWorkspaceElement(e,t){for(let i=this._future.length-1;i>=0;i--)if(this._future[i]===e){t.has(this.strResource)?this._future[i]=t.get(this.strResource):this._future.splice(i,1);break}this.versionId++}moveBackward(e){this._past.pop(),this._future.push(e),this.versionId++}moveForward(e){this._future.pop(),this._past.push(e),this.versionId++}}class Ms{constructor(e){this.editStacks=e,this._versionIds=[];for(let e=0,t=this.editStacks.length;et.sourceOrder)&&(t=r,i=n)}return[t,i]}canUndo(e){if(e instanceof ws.gJ){const[,t]=this._findClosestUndoElementWithSource(e.id);return!!t}const t=this.getUriComparisonKey(e);return!!this._editStacks.has(t)&&this._editStacks.get(t).hasPastElements()}_onError(e,t){(0,ke.dL)(e);for(const e of t.strResources)this.removeElements(e);this._notificationService.error(e)}_acquireLocks(e){for(const t of e.editStacks)if(t.locked)throw new Error("Cannot acquire edit stack lock");for(const t of e.editStacks)t.locked=!0;return()=>{for(const t of e.editStacks)t.locked=!1}}_safeInvokeWithLocks(e,t,i,n,o){const r=this._acquireLocks(i);let s;try{s=t()}catch(t){return r(),n.dispose(),this._onError(t,e)}return s?s.then((()=>(r(),n.dispose(),o())),(t=>(r(),n.dispose(),this._onError(t,e)))):(r(),n.dispose(),o())}_invokeWorkspacePrepare(e){return Ss(this,void 0,void 0,(function*(){if(void 0===e.actual.prepareUndoRedo)return de.JT.None;const t=e.actual.prepareUndoRedo();return void 0===t?de.JT.None:t}))}_invokeResourcePrepare(e,t){if(1!==e.actual.type||void 0===e.actual.prepareUndoRedo)return t(de.JT.None);const i=e.actual.prepareUndoRedo();return i?(0,de.Wf)(i)?t(i):i.then((e=>t(e))):t(de.JT.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||Is);return new Ms(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new Rs(this._undo(e,0,!0));for(const e of t.strResources)this.removeElements(e);return this._notificationService.warn(n),new Rs}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,ri.N({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,ri.N({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const o=[];for(const e of i.editStacks)e.getClosestPastElement()!==t&&o.push(e.resourceLabel);if(o.length>0)return this._tryToSplitAndUndo(e,t,null,ri.N({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",t.label,o.join(", ")));const r=[];for(const e of i.editStacks)e.locked&&r.push(e.resourceLabel);return r.length>0?this._tryToSplitAndUndo(e,t,null,ri.N({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,r.join(", "))):i.isValid()?null:this._tryToSplitAndUndo(e,t,null,ri.N({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceUndo(e,t,i){const n=this._getAffectedEditStacks(t),o=this._checkWorkspaceUndo(e,t,n,!1);return o?o.returnValue:this._confirmAndExecuteWorkspaceUndo(e,t,n,i)}_isPartOfUndoGroup(e){if(!e.groupId)return!1;for(const[,t]of this._editStacks){const i=t.getClosestPastElement();if(i){if(i===e){const i=t.getSecondClosestPastElement();if(i&&i.groupId===e.groupId)return!0}if(i.groupId===e.groupId)return!0}}return!1}_confirmAndExecuteWorkspaceUndo(e,t,i,n){return Ss(this,void 0,void 0,(function*(){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){const o=yield this._dialogService.show(Gt.Z.Info,ri.N("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),[ri.N({key:"ok",comment:["{0} denotes a number that is > 1"]},"Undo in {0} Files",i.editStacks.length),ri.N("nok","Undo this File"),ri.N("cancel","Cancel")],{cancelId:2});if(2===o.choice)return;if(1===o.choice)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const r=this._checkWorkspaceUndo(e,t,i,!1);if(r)return r.returnValue;n=!0}let o;try{o=yield this._invokeWorkspacePrepare(t)}catch(e){return this._onError(e,t)}const r=this._checkWorkspaceUndo(e,t,i,!0);if(r)return o.dispose(),r.returnValue;for(const e of i.editStacks)e.moveBackward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.undo()),i,o,(()=>this._continueUndoInGroup(t.groupId,n)))}))}_resourceUndo(e,t,i){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(n=>(e.moveBackward(t),this._safeInvokeWithLocks(t,(()=>t.actual.undo()),new Ms([e]),n,(()=>this._continueUndoInGroup(t.groupId,i))))));{const e=ri.N({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestUndoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const r=o.getClosestPastElement();r&&r.groupId===e&&(!t||r.groupOrder>t.groupOrder)&&(t=r,i=n)}return[t,i]}_continueUndoInGroup(e,t){if(!e)return;const[,i]=this._findClosestUndoElementInGroup(e);return i?this._undo(i,0,t):void 0}undo(e){if(e instanceof ws.gJ){const[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return"string"==typeof e?this._undo(e,0,!1):this._undo(this.getUriComparisonKey(e),0,!1)}_undo(e,t=0,i){if(!this._editStacks.has(e))return;const n=this._editStacks.get(e),o=n.getClosestPastElement();if(o){if(o.groupId){const[e,n]=this._findClosestUndoElementInGroup(o.groupId);if(o!==e&&n)return this._undo(n,t,i)}if((o.sourceId!==t||o.confirmBeforeUndo)&&!i)return this._confirmAndContinueUndo(e,t,o);try{return 1===o.type?this._workspaceUndo(e,o,i):this._resourceUndo(n,o,i)}finally{}}}_confirmAndContinueUndo(e,t,i){return Ss(this,void 0,void 0,(function*(){if(1!==(yield this._dialogService.show(Gt.Z.Info,ri.N("confirmDifferentSource","Would you like to undo '{0}'?",i.label),[ri.N("confirmDifferentSource.ok","Undo"),ri.N("cancel","Cancel")],{cancelId:1})).choice)return this._undo(e,t,!0)}))}_findClosestRedoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const r=o.getClosestFutureElement();r&&r.sourceId===e&&(!t||r.sourceOrder0)return this._tryToSplitAndRedo(e,t,null,ri.N({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",t.label,o.join(", ")));const r=[];for(const e of i.editStacks)e.locked&&r.push(e.resourceLabel);return r.length>0?this._tryToSplitAndRedo(e,t,null,ri.N({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}",t.label,r.join(", "))):i.isValid()?null:this._tryToSplitAndRedo(e,t,null,ri.N({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime",t.label))}_workspaceRedo(e,t){const i=this._getAffectedEditStacks(t),n=this._checkWorkspaceRedo(e,t,i,!1);return n?n.returnValue:this._executeWorkspaceRedo(e,t,i)}_executeWorkspaceRedo(e,t,i){return Ss(this,void 0,void 0,(function*(){let n;try{n=yield this._invokeWorkspacePrepare(t)}catch(e){return this._onError(e,t)}const o=this._checkWorkspaceRedo(e,t,i,!0);if(o)return n.dispose(),o.returnValue;for(const e of i.editStacks)e.moveForward(t);return this._safeInvokeWithLocks(t,(()=>t.actual.redo()),i,n,(()=>this._continueRedoInGroup(t.groupId)))}))}_resourceRedo(e,t){if(t.isValid){if(!e.locked)return this._invokeResourcePrepare(t,(i=>(e.moveForward(t),this._safeInvokeWithLocks(t,(()=>t.actual.redo()),new Ms([e]),i,(()=>this._continueRedoInGroup(t.groupId))))));{const e=ri.N({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(e)}}else e.flushAllElements()}_findClosestRedoElementInGroup(e){if(!e)return[null,null];let t=null,i=null;for(const[n,o]of this._editStacks){const r=o.getClosestFutureElement();r&&r.groupId===e&&(!t||r.groupOrder=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([Cs(0,Kr.S),Cs(1,mi.lT)],Ts);class Rs{constructor(e){this.returnValue=e}}(0,ms.z)(ws.tJ,Ts);var Os=i(7746);const Fs=new xe.Ue((()=>{const e=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:e,collatorIsNumeric:e.resolvedOptions().numeric}}));var Ps=i(8801),Bs=i(4650),zs=i(9898),Ws=i(4742);const Vs={},Hs=new Ws.R("quick-input-button-icon-");function $s(e){if(!e)return;let t;const i=e.dark.toString();return Vs[i]?t=Vs[i]:(t=Hs.nextId(),X.fk(`.${t}`,`background-image: ${X.wY(e.light||e.dark)}`),X.fk(`.vs-dark .${t}, .hc-black .${t}`,`background-image: ${X.wY(e.dark)}`),Vs[i]=t),t}const Us=X.$;class js{constructor(e,t,i){this.os=t,this.keyElements=new Set,this.options=i||Object.create(null),this.labelBackground=this.options.keybindingLabelBackground,this.labelForeground=this.options.keybindingLabelForeground,this.labelBorder=this.options.keybindingLabelBorder,this.labelBottomBorder=this.options.keybindingLabelBottomBorder,this.labelShadow=this.options.keybindingLabelShadow,this.domNode=X.R3(e,Us(".monaco-keybinding")),this.didEverRender=!1,e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t){this.didEverRender&&this.keybinding===e&&js.areSame(this.matches,t)||(this.keybinding=e,this.matches=t,this.render())}render(){if(this.clear(),this.keybinding){let[e,t]=this.keybinding.getParts();e&&this.renderPart(this.domNode,e,this.matches?this.matches.firstPart:null),t&&(X.R3(this.domNode,Us("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderPart(this.domNode,t,this.matches?this.matches.chordPart:null)),this.domNode.title=this.keybinding.getAriaLabel()||""}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.applyStyles(),this.didEverRender=!0}clear(){X.PO(this.domNode),this.keyElements.clear()}renderPart(e,t,i){const n=gi.xo.modifierLabels[this.os];t.ctrlKey&&this.renderKey(e,n.ctrlKey,Boolean(null==i?void 0:i.ctrlKey),n.separator),t.shiftKey&&this.renderKey(e,n.shiftKey,Boolean(null==i?void 0:i.shiftKey),n.separator),t.altKey&&this.renderKey(e,n.altKey,Boolean(null==i?void 0:i.altKey),n.separator),t.metaKey&&this.renderKey(e,n.metaKey,Boolean(null==i?void 0:i.metaKey),n.separator);const o=t.keyLabel;o&&this.renderKey(e,o,Boolean(null==i?void 0:i.keyCode),"")}renderKey(e,t,i,n){X.R3(e,this.createKeyElement(t,i?".highlight":"")),n&&X.R3(e,Us("span.monaco-keybinding-key-separator",void 0,n))}renderUnbound(e){X.R3(e,this.createKeyElement((0,ri.N)("unbound","Unbound")))}createKeyElement(e,t=""){const i=Us("span.monaco-keybinding-key"+t,void 0,e);return this.keyElements.add(i),i}style(e){this.labelBackground=e.keybindingLabelBackground,this.labelForeground=e.keybindingLabelForeground,this.labelBorder=e.keybindingLabelBorder,this.labelBottomBorder=e.keybindingLabelBottomBorder,this.labelShadow=e.keybindingLabelShadow,this.applyStyles()}applyStyles(){var e;if(this.element){for(const t of this.keyElements)this.labelBackground&&(t.style.backgroundColor=null===(e=this.labelBackground)||void 0===e?void 0:e.toString()),this.labelBorder&&(t.style.borderColor=this.labelBorder.toString()),this.labelBottomBorder&&(t.style.borderBottomColor=this.labelBottomBorder.toString()),this.labelShadow&&(t.style.boxShadow=`inset 0 -1px 0 ${this.labelShadow}`);this.labelForeground&&(this.element.style.color=this.labelForeground.toString())}}static areSame(e,t){return e===t||!e&&!t||!!e&&!!t&&(0,ge.fS)(e.firstPart,t.firstPart)&&(0,ge.fS)(e.chordPart,t.chordPart)}}var qs=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};const Ks=X.$;class Gs{constructor(e){this.hidden=!1,this._onChecked=new W.Q5,this.onChecked=this._onChecked.event,Object.assign(this,e)}get checked(){return!!this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire(e))}dispose(){this._onChecked.dispose()}}class Ys{get templateId(){return Ys.ID}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=X.R3(e,Ks(".quick-input-list-entry"));const i=X.R3(t.entry,Ks("label.quick-input-list-label"));t.toDisposeTemplate.push(X.mu(i,X.tw.CLICK,(e=>{t.checkbox.offsetParent||e.preventDefault()}))),t.checkbox=X.R3(i,Ks("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(X.mu(t.checkbox,X.tw.CHANGE,(e=>{t.element.checked=t.checkbox.checked})));const n=X.R3(i,Ks(".quick-input-list-rows")),o=X.R3(n,Ks(".quick-input-list-row")),r=X.R3(n,Ks(".quick-input-list-row"));t.label=new Ps.g(o,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const s=X.R3(o,Ks(".quick-input-list-entry-keybinding"));t.keybinding=new js(s,De.OS);const a=X.R3(r,Ks(".quick-input-list-label-meta"));return t.detail=new Bs.q(a,!0),t.separator=X.R3(t.entry,Ks(".quick-input-list-separator")),t.actionBar=new qi.o(t.entry),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,i){i.toDisposeElement=(0,de.B9)(i.toDisposeElement),i.element=e,i.checkbox.checked=e.checked,i.toDisposeElement.push(e.onChecked((e=>i.checkbox.checked=e)));const{labelHighlights:n,descriptionHighlights:o,detailHighlights:r}=e,s=Object.create(null);s.matches=n||[],s.descriptionTitle=e.saneDescription,s.descriptionMatches=o||[],s.extraClasses=e.item.iconClasses,s.italic=e.item.italic,s.strikethrough=e.item.strikethrough,i.label.setLabel(e.saneLabel,e.saneDescription,s),i.keybinding.set(e.item.keybinding),i.detail.set(e.saneDetail,r),e.separator&&e.separator.label?(i.separator.textContent=e.separator.label,i.separator.style.display=""):i.separator.style.display="none",i.entry.classList.toggle("quick-input-list-separator-border",!!e.separator),i.actionBar.clear();const a=e.item.buttons;a&&a.length?(i.actionBar.push(a.map(((t,i)=>{let n=t.iconClass||(t.iconPath?$s(t.iconPath):void 0);t.alwaysVisible&&(n=n?`${n} always-visible`:"always-visible");const o=new Gi.aU(`id-${i}`,"",n,!0,(()=>{return i=this,n=void 0,r=function*(){e.fireButtonTriggered({button:t,item:e.item})},new((o=void 0)||(o=Promise))((function(e,t){function s(e){try{l(r.next(e))}catch(e){t(e)}}function a(e){try{l(r.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof o?i:new o((function(e){e(i)}))).then(s,a)}l((r=r.apply(i,n||[])).next())}));var i,n,o,r}));return o.tooltip=t.tooltip||"",o})),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions")}disposeElement(e,t,i){i.toDisposeElement=(0,de.B9)(i.toDisposeElement)}disposeTemplate(e){e.toDisposeElement=(0,de.B9)(e.toDisposeElement),e.toDisposeTemplate=(0,de.B9)(e.toDisposeTemplate)}}Ys.ID="listelement";class Zs{getHeight(e){return e.saneDetail?44:22}getTemplateId(e){return Ys.ID}}var Xs;!function(e){e[e.First=1]="First",e[e.Second=2]="Second",e[e.Last=3]="Last",e[e.Next=4]="Next",e[e.Previous=5]="Previous",e[e.NextPage=6]="NextPage",e[e.PreviousPage=7]="PreviousPage"}(Xs||(Xs={}));class Qs{constructor(e,t,i){this.parent=e,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnMeta=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new W.Q5,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new W.Q5,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new W.Q5,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new W.Q5,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new W.Q5,this.onButtonTriggered=this._onButtonTriggered.event,this._onKeyDown=new W.Q5,this.onKeyDown=this._onKeyDown.event,this._onLeave=new W.Q5,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=X.R3(this.parent,Ks(".quick-input-list"));const n=new Zs,o=new Js;this.list=i.createList("QuickInput",this.container,n,[new Ys],{identityProvider:{getId:e=>e.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:o}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown((e=>{const t=new Kt.y(e);switch(t.keyCode){case 10:this.toggleCheckbox();break;case 31:(De.dz?e.metaKey:e.ctrlKey)&&this.list.setFocus((0,ct.w6)(this.list.length));break;case 16:const t=this.list.getFocus();1===t.length&&0===t[0]&&this._onLeave.fire();break;case 18:const i=this.list.getFocus();1===i.length&&i[0]===this.list.length-1&&this._onLeave.fire()}this._onKeyDown.fire(t)}))),this.disposables.push(this.list.onMouseDown((e=>{2!==e.browserEvent.button&&e.browserEvent.preventDefault()}))),this.disposables.push(X.nm(this.container,X.tw.CLICK,(e=>{(e.x||e.y)&&this._onLeave.fire()}))),this.disposables.push(this.list.onMouseMiddleClick((e=>{this._onLeave.fire()}))),this.disposables.push(this.list.onContextMenu((e=>{"number"==typeof e.index&&(e.browserEvent.preventDefault(),this.list.setSelection([e.index]))}))),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return W.ju.map(this.list.onDidChangeFocus,(e=>e.elements.map((e=>e.item))))}get onDidChangeSelection(){return W.ju.map(this.list.onDidChangeSelection,(e=>({items:e.elements.map((e=>e.item)),event:e.browserEvent})))}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let i=0,n=e.length;i{t.hidden||(t.checked=e)}))}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=(0,de.B9)(this.elementDisposables);const t=e=>this.fireButtonTriggered(e);this.inputElements=e,this.elements=e.reduce(((i,n,o)=>{var r,s,a;if("separator"!==n.type){const l=o&&e[o-1],c=n.label&&n.label.replace(/\r?\n/g," "),u=n.meta&&n.meta.replace(/\r?\n/g," "),h=n.description&&n.description.replace(/\r?\n/g," "),d=n.detail&&n.detail.replace(/\r?\n/g," "),g=n.ariaLabel||[c,h,d].map((e=>(0,en.JL)(e))).filter((e=>!!e)).join(", ");i.push(new Gs({index:o,item:n,saneLabel:c,saneMeta:u,saneAriaLabel:g,saneDescription:h,saneDetail:d,labelHighlights:null===(r=n.highlights)||void 0===r?void 0:r.label,descriptionHighlights:null===(s=n.highlights)||void 0===s?void 0:s.description,detailHighlights:null===(a=n.highlights)||void 0===a?void 0:a.detail,checked:!1,separator:l&&"separator"===l.type?l:void 0,fireButtonTriggered:t}))}return i}),[]),this.elementDisposables.push(...this.elements),this.elementDisposables.push(...this.elements.map((e=>e.onChecked((()=>this.fireCheckedEvents()))))),this.elementsToIndexes=this.elements.reduce(((e,t,i)=>(e.set(t.item,i),e)),new Map),this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map((e=>e.item))}setFocusedElements(e){if(this.list.setFocus(e.filter((e=>this.elementsToIndexes.has(e))).map((e=>this.elementsToIndexes.get(e)))),e.length>0){const e=this.list.getFocus()[0];"number"==typeof e&&this.list.reveal(e)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter((e=>this.elementsToIndexes.has(e))).map((e=>this.elementsToIndexes.get(e))))}getCheckedElements(){return this.elements.filter((e=>e.checked)).map((e=>e.item))}setCheckedElements(e){try{this._fireCheckedEvents=!1;const t=new Set;for(const i of e)t.add(i);for(const e of this.elements)e.checked=t.has(e.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(e){this.list.getHTMLElement().style.pointerEvents=e?"":"none"}focus(e){if(!this.list.length)return;switch(e===Xs.Next&&this.list.getFocus()[0]===this.list.length-1&&(e=Xs.First),e===Xs.Previous&&0===this.list.getFocus()[0]&&(e=Xs.Last),e===Xs.Second&&this.list.length<2&&(e=Xs.First),e){case Xs.First:this.list.focusFirst();break;case Xs.Second:this.list.focusNth(1);break;case Xs.Last:this.list.focusLast();break;case Xs.Next:this.list.focusNext();break;case Xs.Previous:this.list.focusPrevious();break;case Xs.NextPage:this.list.focusNextPage();break;case Xs.PreviousPage:this.list.focusPreviousPage()}const t=this.list.getFocus()[0];"number"==typeof t&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}layout(e){this.list.getHTMLElement().style.maxHeight=e?`calc(${44*Math.floor(e/44)}px)`:"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;if((e=e.trim())&&(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail)){let t;this.elements.forEach((i=>{const n=this.matchOnLabel?(0,Le.f6)((0,Nr.Gt)(e,(0,Nr.Ho)(i.saneLabel))):void 0,o=this.matchOnDescription?(0,Le.f6)((0,Nr.Gt)(e,(0,Nr.Ho)(i.saneDescription||""))):void 0,r=this.matchOnDetail?(0,Le.f6)((0,Nr.Gt)(e,(0,Nr.Ho)(i.saneDetail||""))):void 0,s=this.matchOnMeta?(0,Le.f6)((0,Nr.Gt)(e,(0,Nr.Ho)(i.saneMeta||""))):void 0;if(n||o||r||s?(i.labelHighlights=n,i.descriptionHighlights=o,i.detailHighlights=r,i.hidden=!1):(i.labelHighlights=void 0,i.descriptionHighlights=void 0,i.detailHighlights=void 0,i.hidden=!i.item.alwaysShow),i.separator=void 0,!this.sortByLabel){const e=i.index&&this.inputElements[i.index-1];t=e&&"separator"===e.type?e:t,t&&!i.hidden&&(i.separator=t,t=void 0)}}))}else this.elements.forEach((e=>{e.labelHighlights=void 0,e.descriptionHighlights=void 0,e.detailHighlights=void 0,e.hidden=!1;const t=e.index&&this.inputElements[e.index-1];e.separator=t&&"separator"===t.type?t:void 0}));const t=this.elements.filter((e=>!e.hidden));if(this.sortByLabel&&e){const i=e.toLowerCase();t.sort(((e,t)=>function(e,t,i){const n=e.labelHighlights||[],o=t.labelHighlights||[];return n.length&&!o.length?-1:!n.length&&o.length?1:0===n.length&&0===o.length?0:function(e,t,i){const n=e.toLowerCase(),o=t.toLowerCase(),r=function(e,t,i){const n=e.toLowerCase(),o=t.toLowerCase(),r=n.startsWith(i),s=o.startsWith(i);if(r!==s)return r?-1:1;if(r&&s){if(n.lengtho.length)return 1}return 0}(e,t,i);if(r)return r;const s=n.endsWith(i);if(s!==o.endsWith(i))return s?-1:1;const a=function(e,t,i=!1){const n=e||"",o=t||"",r=Fs.value.collator.compare(n,o);return Fs.value.collatorIsNumeric&&0===r&&n!==o?n(e.set(t.item,i),e)),new Map),this.list.splice(0,this.list.length,t),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(t.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const e=this.list.getFocusedElements(),t=this.allVisibleChecked(e);for(const i of e)i.checked=!t}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(e){this.container.style.display=e?"":"none"}isDisplayed(){return"none"!==this.container.style.display}dispose(){this.elementDisposables=(0,de.B9)(this.elementDisposables),this.disposables=(0,de.B9)(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(e){this._onButtonTriggered.fire(e)}style(e){this.list.style(e)}}qs([zs.H],Qs.prototype,"onDidChangeFocus",null),qs([zs.H],Qs.prototype,"onDidChangeSelection",null);class Js{getWidgetAriaLabel(){return(0,ri.N)("quickInput","Quick Input")}getAriaLabel(e){return e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(){return"option"}}var ea=i(7927);const ta=X.$;class ia extends de.JT{constructor(e){super(),this.parent=e,this.onKeyDown=e=>X.nm(this.inputBox.inputElement,X.tw.KEY_DOWN,(t=>{e(new Kt.y(t))})),this.onMouseDown=e=>X.nm(this.inputBox.inputElement,X.tw.MOUSE_DOWN,(t=>{e(new Lr.n(t))})),this.onDidChange=e=>this.inputBox.onDidChange(e),this.container=X.R3(this.parent,ta(".quick-input-box")),this.inputBox=this._register(new ea.W(this.container,void 0))}get value(){return this.inputBox.value}set value(e){this.inputBox.value=e}select(e=null){this.inputBox.select(e)}isSelectionAtEnd(){return this.inputBox.isSelectionAtEnd()}get placeholder(){return this.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.inputBox.setPlaceHolder(e)}get ariaLabel(){return this.inputBox.getAriaLabel()}set ariaLabel(e){this.inputBox.setAriaLabel(e)}get password(){return"password"===this.inputBox.inputElement.type}set password(e){this.inputBox.inputElement.type=e?"password":"text"}setAttribute(e,t){this.inputBox.inputElement.setAttribute(e,t)}removeAttribute(e){this.inputBox.inputElement.removeAttribute(e)}showDecoration(e){e===Gt.Z.Ignore?this.inputBox.hideMessage():this.inputBox.showMessage({type:e===Gt.Z.Info?1:e===Gt.Z.Warning?2:3,content:""})}stylesForType(e){return this.inputBox.stylesForType(e===Gt.Z.Info?1:e===Gt.Z.Warning?2:3)}setFocus(){this.inputBox.focus()}layout(){this.inputBox.layout()}style(e){this.inputBox.style(e)}}var na=i(7488);const oa="done",ra="active",sa="infinite",aa="discrete",la={progressBarBackground:Bo.Il.fromHex("#0E70C0")};class ca extends de.JT{constructor(e,t){super(),this.options=t||Object.create(null),(0,ge.jB)(this.options,la,!1),this.workedVal=0,this.progressBarBackground=this.options.progressBarBackground,this._register(this.showDelayedScheduler=new xe.pY((()=>(0,X.$Z)(this.element)),0)),this.create(e)}create(e){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),e.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.element.appendChild(this.bit),this.applyStyles()}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(ra,sa,aa),this.workedVal=0,this.totalWork=void 0}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(oa),this.element.classList.contains(sa)?(this.bit.style.opacity="0",e?setTimeout((()=>this.off()),200):this.off()):(this.bit.style.width="inherit",e?setTimeout((()=>this.off()),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(aa,oa),this.element.classList.add(ra,sa),this}getContainer(){return this.element}style(e){this.progressBarBackground=e.progressBarBackground,this.applyStyles()}applyStyles(){if(this.bit){const e=this.progressBarBackground?this.progressBarBackground.toString():"";this.bit.style.backgroundColor=e}}}var ua=i(553),ha=i(6811);const da={buttonBackground:Bo.Il.fromHex("#0E639C"),buttonHoverBackground:Bo.Il.fromHex("#006BB3"),buttonForeground:Bo.Il.white};class ga extends de.JT{constructor(e,t){super(),this._onDidClick=this._register(new W.Q5),this.options=t||Object.create(null),(0,ge.jB)(this.options,da,!1),this.buttonForeground=this.options.buttonForeground,this.buttonBackground=this.options.buttonBackground,this.buttonHoverBackground=this.options.buttonHoverBackground,this.buttonSecondaryForeground=this.options.buttonSecondaryForeground,this.buttonSecondaryBackground=this.options.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=this.options.buttonSecondaryHoverBackground,this.buttonBorder=this.options.buttonBorder,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),e.appendChild(this._element),this._register(ua.o.addTarget(this._element)),[X.tw.CLICK,ua.t.Tap].forEach((e=>{this._register((0,X.nm)(this._element,e,(e=>{this.enabled?this._onDidClick.fire(e):X.zB.stop(e)})))})),this._register((0,X.nm)(this._element,X.tw.KEY_DOWN,(e=>{const t=new Kt.y(e);let i=!1;this.enabled&&(t.equals(3)||t.equals(10))?(this._onDidClick.fire(e),i=!0):t.equals(9)&&(this._element.blur(),i=!0),i&&X.zB.stop(t,!0)}))),this._register((0,X.nm)(this._element,X.tw.MOUSE_OVER,(e=>{this._element.classList.contains("disabled")||this.setHoverBackground()}))),this._register((0,X.nm)(this._element,X.tw.MOUSE_OUT,(e=>{this.applyStyles()}))),this.focusTracker=this._register((0,X.go)(this._element)),this._register(this.focusTracker.onDidFocus((()=>this.setHoverBackground()))),this._register(this.focusTracker.onDidBlur((()=>this.applyStyles()))),this.applyStyles()}get onDidClick(){return this._onDidClick.event}setHoverBackground(){let e;e=this.options.secondary?this.buttonSecondaryHoverBackground?this.buttonSecondaryHoverBackground.toString():null:this.buttonHoverBackground?this.buttonHoverBackground.toString():null,e&&(this._element.style.backgroundColor=e)}style(e){this.buttonForeground=e.buttonForeground,this.buttonBackground=e.buttonBackground,this.buttonHoverBackground=e.buttonHoverBackground,this.buttonSecondaryForeground=e.buttonSecondaryForeground,this.buttonSecondaryBackground=e.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=e.buttonSecondaryHoverBackground,this.buttonBorder=e.buttonBorder,this.applyStyles()}applyStyles(){if(this._element){let e,t;this.options.secondary?(t=this.buttonSecondaryForeground?this.buttonSecondaryForeground.toString():"",e=this.buttonSecondaryBackground?this.buttonSecondaryBackground.toString():""):(t=this.buttonForeground?this.buttonForeground.toString():"",e=this.buttonBackground?this.buttonBackground.toString():"");const i=this.buttonBorder?this.buttonBorder.toString():"";this._element.style.color=t,this._element.style.backgroundColor=e,this._element.style.borderWidth=i?"1px":"",this._element.style.borderStyle=i?"solid":"",this._element.style.borderColor=i}}get element(){return this._element}set label(e){this._element.classList.add("monaco-text-button"),this.options.supportIcons?(0,X.mc)(this._element,...(0,ha.T)(e)):this._element.textContent=e,"string"==typeof this.options.title?this._element.title=this.options.title:this.options.title&&(this._element.title=e)}set enabled(e){e?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}}var fa=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const pa=X.$,ma={iconClass:(0,en.CM)("quick-input-back",en.lA.arrowLeft).classNames,tooltip:(0,ri.N)("quickInput.back","Back"),handle:-1};class _a extends de.JT{constructor(e){super(),this.ui=e,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.noValidationMessage=_a.noPromptMessage,this._severity=Gt.Z.Ignore,this.buttonsUpdated=!1,this.onDidTriggerButtonEmitter=this._register(new W.Q5),this.onDidHideEmitter=this._register(new W.Q5),this.onDisposeEmitter=this._register(new W.Q5),this.visibleDisposables=this._register(new de.SL),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(e){this._title=e,this.update()}get description(){return this._description}set description(e){this._description=e,this.update()}get step(){return this._steps}set step(e){this._steps=e,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(e){this._totalSteps=e,this.update()}get enabled(){return this._enabled}set enabled(e){this._enabled=e,this.update()}get contextKey(){return this._contextKey}set contextKey(e){this._contextKey=e,this.update()}get busy(){return this._busy}set busy(e){this._busy=e,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(e){this._ignoreFocusOut=e,this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(e){this._validationMessage=e,this.update()}get severity(){return this._severity}set severity(e){this._severity=e,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton((e=>{-1!==this.buttons.indexOf(e)&&this.onDidTriggerButtonEmitter.fire(e)}))),this.ui.show(this),this.visible=!0,this.update())}hide(){this.visible&&this.ui.hide()}didHide(e=Os.Jq.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}update(){if(!this.visible)return;const e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:e||" "===this.ui.title.innerHTML||(this.ui.title.innerText=" ;");const t=this.getDescription();if(this.ui.description1.textContent!==t&&(this.ui.description1.textContent=t),this.ui.description2.textContent!==t&&(this.ui.description2.textContent=t),this.busy&&!this.busyDelay&&(this.busyDelay=new xe._F,this.busyDelay.setIfNotSet((()=>{this.visible&&this.ui.progressBar.infinite()}),800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const e=this.buttons.filter((e=>e===ma));this.ui.leftActionBar.push(e.map(((e,t)=>{const i=new Gi.aU(`id-${t}`,"",e.iconClass||$s(e.iconPath),!0,(()=>fa(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(e)}))));return i.tooltip=e.tooltip||"",i})),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const t=this.buttons.filter((e=>e!==ma));this.ui.rightActionBar.push(t.map(((e,t)=>{const i=new Gi.aU(`id-${t}`,"",e.iconClass||$s(e.iconPath),!0,(()=>fa(this,void 0,void 0,(function*(){this.onDidTriggerButtonEmitter.fire(e)}))));return i.tooltip=e.tooltip||"",i})),{icon:!0,label:!1})}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const i=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==i&&(this._lastValidationMessage=i,X.mc(this.ui.message,...(0,ha.T)(i))),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?(0,ri.N)("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==Gt.Z.Ignore){const t=this.ui.inputBox.stylesForType(e);this.ui.message.style.color=t.foreground?`${t.foreground}`:"",this.ui.message.style.backgroundColor=t.background?`${t.background}`:"",this.ui.message.style.border=t.border?`1px solid ${t.border}`:"",this.ui.message.style.paddingBottom="4px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.paddingBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}_a.noPromptMessage=(0,ri.N)("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");class va extends _a{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new W.Q5),this.onWillAcceptEmitter=this._register(new W.Q5),this.onDidAcceptEmitter=this._register(new W.Q5),this.onDidCustomEmitter=this._register(new W.Q5),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._sortByLabel=!0,this._autoFocusOnList=!0,this._itemActivation=this.ui.isScreenReaderOptimized()?Os.jG.NONE:Os.jG.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new W.Q5),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new W.Q5),this.onDidTriggerItemButtonEmitter=this._register(new W.Q5),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=e=>e,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this._value!==e&&(this._value=e||"",this.update(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(e){this._ariaLabel=e,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.update()}get items(){return this._items}set items(e){this._items=e,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(e){this._canSelectMany=e,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(e){this._canAcceptInBackground=e}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(e){this._matchOnDescription=e,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(e){this._matchOnDetail=e,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(e){this._matchOnLabel=e,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(e){this._sortByLabel=e,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(e){this._autoFocusOnList=e,this.update()}get itemActivation(){return this._itemActivation}set itemActivation(e){this._itemActivation=e}get activeItems(){return this._activeItems}set activeItems(e){this._activeItems=e,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(e){this._selectedItems=e,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?Os.X5:this.ui.keyMods}set valueSelection(e){this._valueSelection=e,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(e){this._customButton=e,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(e){this._customButtonLabel=e,this.update()}get customHover(){return this._customButtonHover}set customHover(e){this._customButtonHover=e,this.update()}get ok(){return this._ok}set ok(e){this._ok=e,this.update()}get hideInput(){return!!this._hideInput}set hideInput(e){this._hideInput=e,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(Xs.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange((e=>{e!==this.value&&(this._value=e,this.ui.list.filter(this.filterValue(this.ui.inputBox.value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(e))}))),this.visibleDisposables.add(this.ui.inputBox.onMouseDown((e=>{this.autoFocusOnList||this.ui.list.clearFocus()}))),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown((e=>{switch(e.keyCode){case 18:this.ui.list.focus(Xs.Next),this.canSelectMany&&this.ui.list.domFocus(),X.zB.stop(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(Xs.Previous):this.ui.list.focus(Xs.Last),this.canSelectMany&&this.ui.list.domFocus(),X.zB.stop(e,!0);break;case 12:this.ui.list.focus(Xs.NextPage),this.canSelectMany&&this.ui.list.domFocus(),X.zB.stop(e,!0);break;case 11:this.ui.list.focus(Xs.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),X.zB.stop(e,!0);break;case 17:if(!this._canAcceptInBackground)return;if(!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(Xs.First),X.zB.stop(e,!0));break;case 13:!e.ctrlKey&&!e.metaKey||e.shiftKey||e.altKey||(this.ui.list.focus(Xs.Last),X.zB.stop(e,!0))}}))),this.visibleDisposables.add(this.ui.onDidAccept((()=>{!this.canSelectMany&&this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)}))),this.visibleDisposables.add(this.ui.onDidCustom((()=>{this.onDidCustomEmitter.fire()}))),this.visibleDisposables.add(this.ui.list.onDidChangeFocus((e=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&(0,ct.fS)(e,this._activeItems,((e,t)=>e===t))||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))}))),this.visibleDisposables.add(this.ui.list.onDidChangeSelection((({items:e,event:t})=>{this.canSelectMany?e.length&&this.ui.list.setSelectedElements([]):this.selectedItemsToConfirm!==this._selectedItems&&(0,ct.fS)(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(t instanceof MouseEvent&&1===t.button))}))),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements((e=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&(0,ct.fS)(e,this._selectedItems,((e,t)=>e===t))||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e)))}))),this.visibleDisposables.add(this.ui.list.onButtonTriggered((e=>this.onDidTriggerItemButtonEmitter.fire(e)))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(e){let t=!1;this.onWillAcceptEmitter.fire({veto:()=>t=!0}),t||this.onDidAcceptEmitter.fire({inBackground:e})}registerQuickNavigation(){return X.nm(this.ui.container,X.tw.KEY_UP,(e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new Kt.y(e),i=t.keyCode;this._quickNavigate.keybindings.some((e=>{const[n,o]=e.getParts();return!(o||(n.shiftKey&&4===i?t.ctrlKey||t.altKey||t.metaKey:!(n.altKey&&6===i||n.ctrlKey&&5===i||n.metaKey&&57===i)))}))&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)}))}update(){if(!this.visible)return;const e=!!this._hideInput&&this._items.length>0;this.ui.container.classList.toggle("hidden-input",e&&!this.description);const t={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!e,progressBar:!e,visibleCount:!0,count:this.canSelectMany,ok:"default"===this.ok?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(t),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");const i=this.ariaLabel||this.placeholder||va.DEFAULT_ARIA_LABEL;if(this.ui.inputBox.ariaLabel!==i&&(this.ui.inputBox.ariaLabel=i),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.sortByLabel=this.sortByLabel,this.itemsUpdated)switch(this.itemsUpdated=!1,this.ui.list.setElements(this.items),this.ui.list.filter(this.filterValue(this.ui.inputBox.value)),this.ui.checkAll.checked=this.ui.list.getAllVisibleChecked(),this.ui.visibleCount.setCount(this.ui.list.getVisibleCount()),this.ui.count.setCount(this.ui.list.getCheckedCount()),this._itemActivation){case Os.jG.NONE:this._itemActivation=Os.jG.FIRST;break;case Os.jG.SECOND:this.ui.list.focus(Xs.Second),this._itemActivation=Os.jG.FIRST;break;case Os.jG.LAST:this.ui.list.focus(Xs.Last),this._itemActivation=Os.jG.FIRST;break;default:this.trySelectFirst()}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",this.ui.setComboboxAccessibility(!0),t.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(Xs.First))}}va.DEFAULT_ARIA_LABEL=(0,ri.N)("quickInputBox.ariaLabel","Type to narrow down results.");class ba extends de.JT{constructor(e){super(),this.options=e,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new W.Q5),this.onDidCustomEmitter=this._register(new W.Q5),this.onDidTriggerButtonEmitter=this._register(new W.Q5),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new W.Q5),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new W.Q5),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const e=e=>{this.keyMods.ctrlCmd=e.ctrlKey||e.metaKey,this.keyMods.alt=e.altKey};this._register(X.nm(window,X.tw.KEY_DOWN,e,!0)),this._register(X.nm(window,X.tw.KEY_UP,e,!0)),this._register(X.nm(window,X.tw.MOUSE_DOWN,e,!0))}getUI(){if(this.ui)return this.ui;const e=X.R3(this.parentElement,pa(".quick-input-widget.show-file-icons"));e.tabIndex=-1,e.style.display="none";const t=X.dS(e),i=X.R3(e,pa(".quick-input-titlebar")),n=this._register(new qi.o(i));n.domNode.classList.add("quick-input-left-action-bar");const o=X.R3(i,pa(".quick-input-title")),r=this._register(new qi.o(i));r.domNode.classList.add("quick-input-right-action-bar");const s=X.R3(e,pa(".quick-input-description")),a=X.R3(e,pa(".quick-input-header")),l=X.R3(a,pa("input.quick-input-check-all"));l.type="checkbox",this._register(X.mu(l,X.tw.CHANGE,(e=>{const t=l.checked;C.setAllVisibleChecked(t)}))),this._register(X.nm(l,X.tw.CLICK,(e=>{(e.x||e.y)&&d.setFocus()})));const c=X.R3(a,pa(".quick-input-description")),u=X.R3(a,pa(".quick-input-and-message")),h=X.R3(u,pa(".quick-input-filter")),d=this._register(new ia(h));d.setAttribute("aria-describedby",`${this.idPrefix}message`);const g=X.R3(h,pa(".quick-input-visible-count"));g.setAttribute("aria-live","polite"),g.setAttribute("aria-atomic","true");const f=new na.Z(g,{countFormat:(0,ri.N)({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")}),p=X.R3(h,pa(".quick-input-count"));p.setAttribute("aria-live","polite");const m=new na.Z(p,{countFormat:(0,ri.N)({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")}),_=X.R3(a,pa(".quick-input-action")),v=new ga(_);v.label=(0,ri.N)("ok","OK"),this._register(v.onDidClick((e=>{this.onDidAcceptEmitter.fire()})));const b=X.R3(a,pa(".quick-input-action")),y=new ga(b);y.label=(0,ri.N)("custom","Custom"),this._register(y.onDidClick((e=>{this.onDidCustomEmitter.fire()})));const w=X.R3(u,pa(`#${this.idPrefix}message.quick-input-message`)),C=this._register(new Qs(e,this.idPrefix+"list",this.options));this._register(C.onChangedAllVisibleChecked((e=>{l.checked=e}))),this._register(C.onChangedVisibleCount((e=>{f.setCount(e)}))),this._register(C.onChangedCheckedCount((e=>{m.setCount(e)}))),this._register(C.onLeave((()=>{setTimeout((()=>{d.setFocus(),this.controller instanceof va&&this.controller.canSelectMany&&C.clearFocus()}),0)}))),this._register(C.onDidChangeFocus((()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")})));const S=new ca(e);S.getContainer().classList.add("quick-input-progress");const x=X.go(e);return this._register(x),this._register(X.nm(e,X.tw.FOCUS,(e=>{this.previousFocusElement=e.relatedTarget instanceof HTMLElement?e.relatedTarget:void 0}),!0)),this._register(x.onDidBlur((()=>{this.getUI().ignoreFocusOut||this.options.ignoreFocusOut()||this.hide(Os.Jq.Blur),this.previousFocusElement=void 0}))),this._register(X.nm(e,X.tw.FOCUS,(e=>{d.setFocus()}))),this._register(X.nm(e,X.tw.KEY_DOWN,(t=>{const i=new Kt.y(t);switch(i.keyCode){case 3:X.zB.stop(t,!0),this.onDidAcceptEmitter.fire();break;case 9:X.zB.stop(t,!0),this.hide(Os.Jq.Gesture);break;case 2:if(!i.altKey&&!i.ctrlKey&&!i.metaKey){const n=[".action-label.codicon"];e.classList.contains("show-checkboxes")?n.push("input"):n.push("input[type=text]"),this.getUI().list.isDisplayed()&&n.push(".monaco-list");const o=e.querySelectorAll(n.join(", "));i.shiftKey&&i.target===o[0]?(X.zB.stop(t,!0),o[o.length-1].focus()):i.shiftKey||i.target!==o[o.length-1]||(X.zB.stop(t,!0),o[0].focus())}}}))),this.ui={container:e,styleSheet:t,leftActionBar:n,titleBar:i,title:o,description1:s,description2:c,rightActionBar:r,checkAll:l,filterContainer:h,inputBox:d,visibleCountContainer:g,visibleCount:f,countContainer:p,count:m,okContainer:_,ok:v,message:w,customButtonContainer:b,customButton:y,list:C,progressBar:S,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:()=>this.options.isScreenReaderOptimized(),show:e=>this.show(e),hide:()=>this.hide(),setVisibilities:e=>this.setVisibilities(e),setComboboxAccessibility:e=>this.setComboboxAccessibility(e),setEnabled:e=>this.setEnabled(e),setContextKey:e=>this.options.setContextKey(e)},this.updateStyles(),this.ui}pick(e,t={},i=z.T.None){return new Promise(((n,o)=>{let r=e=>{r=n,t.onKeyMods&&t.onKeyMods(s.keyMods),n(e)};if(i.isCancellationRequested)return void r(void 0);const s=this.createQuickPick();let a;const l=[s,s.onDidAccept((()=>{if(s.canSelectMany)r(s.selectedItems.slice()),s.hide();else{const e=s.activeItems[0];e&&(r(e),s.hide())}})),s.onDidChangeActive((e=>{const i=e[0];i&&t.onDidFocus&&t.onDidFocus(i)})),s.onDidChangeSelection((e=>{if(!s.canSelectMany){const t=e[0];t&&(r(t),s.hide())}})),s.onDidTriggerItemButton((e=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton(Object.assign(Object.assign({},e),{removeItem:()=>{const t=s.items.indexOf(e.item);if(-1!==t){const e=s.items.slice(),i=e.splice(t,1),n=s.activeItems.filter((e=>e!==i[0]));s.items=e,n&&(s.activeItems=n)}}})))),s.onDidChangeValue((e=>{!a||e||1===s.activeItems.length&&s.activeItems[0]===a||(s.activeItems=[a])})),i.onCancellationRequested((()=>{s.hide()})),s.onDidHide((()=>{(0,de.B9)(l),r(void 0)}))];s.title=t.title,s.canSelectMany=!!t.canPickMany,s.placeholder=t.placeHolder,s.ignoreFocusOut=!!t.ignoreFocusLost,s.matchOnDescription=!!t.matchOnDescription,s.matchOnDetail=!!t.matchOnDetail,s.matchOnLabel=void 0===t.matchOnLabel||t.matchOnLabel,s.autoFocusOnList=void 0===t.autoFocusOnList||t.autoFocusOnList,s.quickNavigate=t.quickNavigate,s.contextKey=t.contextKey,s.busy=!0,Promise.all([e,t.activeItem]).then((([e,t])=>{a=t,s.busy=!1,s.items=e,s.canSelectMany&&(s.selectedItems=e.filter((e=>"separator"!==e.type&&e.picked))),a&&(s.activeItems=[a])})),s.show(),Promise.resolve(e).then(void 0,(e=>{o(e),s.hide()}))}))}createQuickPick(){const e=this.getUI();return new va(e)}show(e){const t=this.getUI();this.onShowEmitter.fire();const i=this.controller;this.controller=e,i&&i.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(Gt.Z.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),X.mc(t.message),t.progressBar.stop(),t.list.setElements([]),t.list.matchOnDescription=!1,t.list.matchOnDetail=!1,t.list.matchOnLabel=!0,t.list.sortByLabel=!0,t.ignoreFocusOut=!1,this.setComboboxAccessibility(!1),t.inputBox.ariaLabel="";const n=this.options.backKeybindingLabel();ma.tooltip=n?(0,ri.N)("quickInput.backWithKeybinding","Back ({0})",n):(0,ri.N)("quickInput.back","Back"),t.container.style.display="",this.updateLayout(),t.inputBox.setFocus()}setVisibilities(e){const t=this.getUI();t.title.style.display=e.title?"":"none",t.description1.style.display=e.description&&(e.inputBox||e.checkAll)?"":"none",t.description2.style.display=!e.description||e.inputBox||e.checkAll?"none":"",t.checkAll.style.display=e.checkAll?"":"none",t.filterContainer.style.display=e.inputBox?"":"none",t.visibleCountContainer.style.display=e.visibleCount?"":"none",t.countContainer.style.display=e.count?"":"none",t.okContainer.style.display=e.ok?"":"none",t.customButtonContainer.style.display=e.customButton?"":"none",t.message.style.display=e.message?"":"none",t.progressBar.getContainer().style.display=e.progressBar?"":"none",t.list.display(!!e.list),t.container.classList[e.checkBox?"add":"remove"]("show-checkboxes"),this.updateLayout()}setComboboxAccessibility(e){if(e!==this.comboboxAccessibility){const t=this.getUI();this.comboboxAccessibility=e,this.comboboxAccessibility?(t.inputBox.setAttribute("role","combobox"),t.inputBox.setAttribute("aria-haspopup","true"),t.inputBox.setAttribute("aria-autocomplete","list"),t.inputBox.setAttribute("aria-activedescendant",t.list.getActiveDescendant()||"")):(t.inputBox.removeAttribute("role"),t.inputBox.removeAttribute("aria-haspopup"),t.inputBox.removeAttribute("aria-autocomplete"),t.inputBox.removeAttribute("aria-activedescendant"))}}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.getAction().enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.getAction().enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var t;const i=this.controller;if(i){const n=!(null===(t=this.ui)||void 0===t?void 0:t.container.contains(document.activeElement));this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",n||(this.previousFocusElement&&this.previousFocusElement.offsetParent?(this.previousFocusElement.focus(),this.previousFocusElement=void 0):this.options.returnFocus()),i.didHide(e)}}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(.62*this.dimension.width,ba.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&.4*this.dimension.height)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:i,contrastBorder:n,widgetShadow:o}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e?e.toString():"",this.ui.container.style.backgroundColor=t?t.toString():"",this.ui.container.style.color=i?i.toString():"",this.ui.container.style.border=n?`1px solid ${n}`:"",this.ui.container.style.boxShadow=o?`0 0 8px 2px ${o}`:"",this.ui.inputBox.style(this.styles.inputBox),this.ui.count.style(this.styles.countBadge),this.ui.ok.style(this.styles.button),this.ui.customButton.style(this.styles.button),this.ui.progressBar.style(this.styles.progressBar),this.ui.list.style(this.styles.list);const r=[];this.styles.list.pickerGroupBorder&&r.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.list.pickerGroupBorder}; }`),this.styles.list.pickerGroupForeground&&r.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.list.pickerGroupForeground}; }`),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(r.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&r.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&r.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&r.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&r.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&r.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),r.push("}"));const s=r.join("\n");s!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=s)}}}ba.MAX_WIDTH=600;var ya=i(1157),wa=i(725),Ca=i(8289),Sa=function(e,t){return function(i,n){t(i,n,e)}};let xa=class extends de.JT{constructor(e,t){super(),this.quickInputService=e,this.instantiationService=t,this.registry=Io.B.as(wa.IP.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(e="",t){this.doShowOrPick(e,!1,t)}doShowOrPick(e,t,i){var n;const[o,r]=this.getOrInstantiateProvider(e),s=this.visibleQuickAccess,a=null==s?void 0:s.descriptor;if(s&&r&&a===r)return e===r.prefix||(null==i?void 0:i.preserveValue)||(s.picker.value=e),void this.adjustValueSelection(s.picker,r,i);if(r&&!(null==i?void 0:i.preserveValue)){let t;if(s&&a&&a!==r){const e=s.value.substr(a.prefix.length);e&&(t=`${r.prefix}${e}`)}if(!t){const e=null==o?void 0:o.defaultFilterValue;e===wa.Ry.LAST?t=this.lastAcceptedPickerValues.get(r):"string"==typeof e&&(t=`${r.prefix}${e}`)}"string"==typeof t&&(e=t)}const l=new de.SL,c=l.add(this.quickInputService.createQuickPick());let u,h;c.value=e,this.adjustValueSelection(c,r,i),c.placeholder=null==r?void 0:r.placeholder,c.quickNavigate=null==i?void 0:i.quickNavigateConfiguration,c.hideInput=!!c.quickNavigate&&!s,("number"==typeof(null==i?void 0:i.itemActivation)||(null==i?void 0:i.quickNavigateConfiguration))&&(c.itemActivation=null!==(n=null==i?void 0:i.itemActivation)&&void 0!==n?n:ya.jG.SECOND),c.contextKey=null==r?void 0:r.contextKey,c.filterValue=e=>e.substring(r?r.prefix.length:0),(null==r?void 0:r.placeholder)&&(c.ariaLabel=null==r?void 0:r.placeholder),t&&(u=new Promise((e=>h=e)),l.add((0,Ca.I)(c.onWillAccept)((e=>{e.veto(),c.hide()})))),l.add(this.registerPickerListeners(c,o,r,e));const d=l.add(new z.A);return o&&l.add(o.provide(c,d.token)),(0,Ca.I)(c.onDidHide)((()=>{0===c.selectedItems.length&&d.cancel(),l.dispose(),null==h||h(c.selectedItems)})),c.show(),t?u:void 0}adjustValueSelection(e,t,i){var n;let o;o=(null==i?void 0:i.preserveValue)?[e.value.length,e.value.length]:[null!==(n=null==t?void 0:t.prefix.length)&&void 0!==n?n:0,e.value.length],e.valueSelection=o}registerPickerListeners(e,t,i,n){const o=new de.SL,r=this.visibleQuickAccess={picker:e,descriptor:i,value:n};return o.add((0,de.OF)((()=>{r===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)}))),o.add(e.onDidChangeValue((e=>{const[i]=this.getOrInstantiateProvider(e);i!==t?this.show(e,{preserveValue:!0}):r.value=e}))),i&&o.add(e.onDidAccept((()=>{this.lastAcceptedPickerValues.set(i,e.value)}))),o}getOrInstantiateProvider(e){const t=this.registry.getQuickAccessProvider(e);if(!t)return[void 0,void 0];let i=this.mapProviderToDescriptor.get(t);return i||(i=this.instantiationService.createInstance(t.ctor),this.mapProviderToDescriptor.set(t,i)),[i,t]}};xa=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([Sa(0,ya.eJ),Sa(1,mn.TG)],xa);var ka=function(e,t){return function(i,n){t(i,n,e)}};let Da=class extends Ji.bB{constructor(e,t,i,n,o){super(i),this.instantiationService=e,this.contextKeyService=t,this.accessibilityService=n,this.layoutService=o,this.contexts=new Map}get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(xa))),this._quickAccess}createController(e=this.layoutService,t){var i,n;const o={idPrefix:"quickInput_",container:e.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>{},setContextKey:e=>this.setContextKey(e),returnFocus:()=>e.focus(),createList:(e,t,i,n,o)=>this.instantiationService.createInstance(ts.ev,e,t,i,n,o),styles:this.computeStyles()},r=this._register(new ba(Object.assign(Object.assign({},o),t)));return r.layout(e.dimension,null!==(n=null===(i=e.offset)||void 0===i?void 0:i.top)&&void 0!==n?n:0),this._register(e.onDidLayout((t=>{var i,n;return r.layout(t,null!==(n=null===(i=e.offset)||void 0===i?void 0:i.top)&&void 0!==n?n:0)}))),this._register(r.onShow((()=>this.resetContextKeys()))),this._register(r.onHide((()=>this.resetContextKeys()))),r}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new Xi.uy(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),t&&t.get()||(this.resetContextKeys(),t&&t.set(!0))}resetContextKeys(){this.contexts.forEach((e=>{e.get()&&e.reset()}))}pick(e,t={},i=z.T.None){return this.controller.pick(e,t,i)}createQuickPick(){return this.controller.createQuickPick()}updateStyles(){this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:Object.assign({},(0,zr.o)(this.theme,{quickInputBackground:Qi.zK,quickInputForeground:Qi.tZ,quickInputTitleBackground:Qi.lo,contrastBorder:Qi.lR,widgetShadow:Qi.rh})),inputBox:(0,zr.o)(this.theme,{inputForeground:Qi.zJ,inputBackground:Qi.sE,inputBorder:Qi.dt,inputValidationInfoBackground:Qi._l,inputValidationInfoForeground:Qi.YI,inputValidationInfoBorder:Qi.EP,inputValidationWarningBackground:Qi.RV,inputValidationWarningForeground:Qi.SU,inputValidationWarningBorder:Qi.C3,inputValidationErrorBackground:Qi.p,inputValidationErrorForeground:Qi._t,inputValidationErrorBorder:Qi.OZ}),countBadge:(0,zr.o)(this.theme,{badgeBackground:Qi.g8,badgeForeground:Qi.qe,badgeBorder:Qi.lR}),button:(0,zr.o)(this.theme,{buttonForeground:Qi.j5,buttonBackground:Qi.b7,buttonHoverBackground:Qi.GO,buttonBorder:Qi.lR}),progressBar:(0,zr.o)(this.theme,{progressBarBackground:Qi.zR}),keybindingLabel:(0,zr.o)(this.theme,{keybindingLabelBackground:Qi.oQ,keybindingLabelForeground:Qi.lW,keybindingLabelBorder:Qi.AW,keybindingLabelBottomBorder:Qi.K1,keybindingLabelShadow:Qi.rh}),list:(0,zr.o)(this.theme,{listBackground:Qi.zK,listInactiveFocusForeground:Qi.NP,listInactiveFocusBackground:Qi.Vq,listFocusOutline:Qi.xL,listInactiveFocusOutline:Qi.xL,pickerGroupBorder:Qi.op,pickerGroupForeground:Qi.kJ})}}};Da=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([ka(0,mn.TG),ka(1,Xi.i6),ka(2,Ji.XE),ka(3,Xn.F),ka(4,jr)],Da);var La=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Na=function(e,t){return function(i,n){t(i,n,e)}};let Ea=class extends Da{constructor(e,t,i,n,o,r){super(t,i,n,o,r),this.host=void 0;const s=Ma.get(e);this.host={_serviceBrand:void 0,get container(){return s.widget.getDomNode()},get dimension(){return e.getLayoutInfo()},get onDidLayout(){return e.onDidLayoutChange},focus:()=>e.focus()}}createController(){return super.createController(this.host)}};Ea=La([Na(1,mn.TG),Na(2,Xi.i6),Na(3,Ji.XE),Na(4,Xn.F),Na(5,jr)],Ea);let Aa=class{constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}get activeService(){const e=this.codeEditorService.getFocusedCodeEditor();if(!e)throw new Error("Quick input service needs a focused editor to work.");let t=this.mapEditorToService.get(e);if(!t){const i=t=this.instantiationService.createInstance(Ea,e);this.mapEditorToService.set(e,t),(0,Ca.I)(e.onDidDispose)((()=>{i.dispose(),this.mapEditorToService.delete(e)}))}return t}get quickAccess(){return this.activeService.quickAccess}pick(e,t={},i=z.T.None){return this.activeService.pick(e,t,i)}createQuickPick(){return this.activeService.createQuickPick()}};Aa=La([Na(0,mn.TG),Na(1,Z.$)],Aa);class Ma{constructor(e){this.editor=e,this.widget=new Ia(this.editor)}static get(e){return e.getContribution(Ma.ID)}dispose(){this.widget.dispose()}}Ma.ID="editor.controller.quickInput";class Ia{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return Ia.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}var Ta;Ia.ID="editor.contrib.quickInputWidget",(0,Yi._K)(Ma.ID,Ma),function(e){const t=new _n.y;class i{constructor(e,t){this._serviceId=e,this._factory=t,this._value=null}get id(){return this._serviceId}get(e){if(!this._value){if(e&&(this._value=e[this._serviceId.toString()]),this._value||(this._value=this._factory(e)),!this._value)throw new Error("Service "+this._serviceId+" is missing!");t.set(this._serviceId,this._value)}return this._value}}e.LazyStaticService=i;let n=[];function o(e,t){let o=new i(e,t);return n.push(o),o}e.init=function(e){let t=new _n.y;for(const[e,i]of(0,ms.d)())t.set(e,i);for(let i in e)e.hasOwnProperty(i)&&t.set((0,mn.yh)(i),e[i]);n.forEach((i=>t.set(i.id,i.get(e))));let i=new Qr(t,!0);return t.set(mn.TG,i),[t,i]},e.instantiationService=o(mn.TG,(()=>new Qr(t,!0)));const r=new Ai;e.configurationService=o(Jt.Ui,(()=>r)),e.resourceConfigurationService=o(lt.V,(()=>new Mi(r))),e.resourcePropertiesService=o(lt.y,(()=>new Ii(r))),e.contextService=o(_i.ec,(()=>new Ri)),e.labelService=o(es.e,(()=>new Pi)),e.telemetryService=o(Hr.b,(()=>new Ti)),e.dialogService=o(Kr.S,(()=>new ki)),e.notificationService=o(mi.lT,(()=>new Di)),e.markerService=o(is.lT,(()=>new rs)),e.modeService=o(Ce.h,(e=>new Fo)),e.standaloneThemeService=o(Gn.Z,(()=>new rr)),e.logService=o(ut.VZ,(()=>new ut.$V(new ut.kw))),e.undoRedoService=o(ws.tJ,(t=>new Ts(e.dialogService.get(t),e.notificationService.get(t)))),e.modelService=o(at.q,(t=>new Po.BR(e.configurationService.get(t),e.resourcePropertiesService.get(t),e.standaloneThemeService.get(t),e.logService.get(t),e.undoRedoService.get(t)))),e.markerDecorationsService=o(hs.i,(t=>new ps(e.modelService.get(t),e.markerService.get(t)))),e.contextKeyService=o(Xi.i6,(t=>new mr(e.configurationService.get(t)))),e.codeEditorService=o(Z.$,(t=>new uo(null,e.contextKeyService.get(t),e.standaloneThemeService.get(t)))),e.editorProgressService=o(Sn.e,(()=>new xi)),e.storageService=o(ss.Uy,(()=>new ss.vm)),e.editorWorkerService=o(we.p,(t=>new ft(e.modelService.get(t),e.resourceConfigurationService.get(t),e.logService.get(t))))}(Ta||(Ta={}));class Ra extends de.JT{constructor(e,t){super();const[i,n]=Ta.init(t);this._serviceCollection=i,this._instantiationService=n;const o=this.get(Jt.Ui),r=this.get(mi.lT),s=this.get(Hr.b),a=this.get(Ji.XE),l=this.get(ut.VZ),c=this.get(Xi.i6);let u=(e,i)=>{let n=null;return t&&(n=t[e.toString()]),n||(n=i()),this._serviceCollection.set(e,n),n};u(Xn.F,(()=>new vs(c,o))),u(ts.Lw,(()=>new ts.XN(a)));let h=u(ne.H,(()=>new Li(this._instantiationService))),d=u(Zn.d,(()=>this._register(new Ni(c,h,s,r,l,e)))),g=u(jr,(()=>new Bi(Ta.codeEditorService.get(Z.$),e)));u(ya.eJ,(()=>new Aa(n,Ta.codeEditorService.get(Z.$))));let f=u(vn.u,(()=>this._register(new qr(g))));u(Cn.p,(()=>new ys)),u(vn.i,(()=>{const e=new Ur(s,r,f,d,a);return e.configure({blockMouse:!1}),this._register(e)})),u(Yn.co,(()=>new cs(h))),u(Zt.vu,(()=>new Fi(Ta.modelService.get(at.q))))}get(e){let t=this._serviceCollection.get(e);if(!t)throw new Error("Missing service "+e);return t}set(e,t){this._serviceCollection.set(e,t)}has(e){return this._serviceCollection.has(e)}}function Oa(e,t,i){let n=new Ra(e,t),o=null;n.has(Se.S)||(o=new Si(Ta.modelService.get()),n.set(Se.S,o)),n.has(oe.v4)||n.set(oe.v4,new ue(n.get(Z.$),n.get(ne.H)));let r=i(n);return o&&o.setEditor(r),r}function Fa(e,t){return"boolean"==typeof e?e:t}function Pa(e,t){return"string"==typeof e?e:t}function Ba(e,t=!1){t&&(e=e.map((function(e){return e.toLowerCase()})));const i=function(e){const t={};for(const i of e)t[i]=!0;return t}(e);return t?function(e){return void 0!==i[e.toLowerCase()]&&i.hasOwnProperty(e.toLowerCase())}:function(e){return void 0!==i[e]&&i.hasOwnProperty(e)}}function za(e,t){t=t.replace(/@@/g,"");let i,n=0;do{i=!1,t=t.replace(/@(\w+)/g,(function(n,o){i=!0;let r="";if("string"==typeof e[o])r=e[o];else{if(!(e[o]&&e[o]instanceof RegExp))throw void 0===e[o]?Mt(e,"language definition does not contain attribute '"+o+"', used at: "+t):Mt(e,"attribute reference '"+o+"' must be a string, used at: "+t);r=e[o].source}return Nt(r)?"":"(?:"+r+")"})),n++}while(i&&n<5);t=t.replace(/\x01/g,"@");let o=(e.ignoreCase?"i":"")+(e.unicode?"u":"");return new RegExp(t,o)}function Wa(e,t,i,n){let o=-1,r=i,s=i.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);s&&(s[3]&&(o=parseInt(s[3]),s[2]&&(o+=100)),r=s[4]);let a,l="~",c=r;if(r&&0!==r.length?/^\w*$/.test(c)?l="==":(s=r.match(/^(@|!@|~|!~|==|!=)(.*)$/),s&&(l=s[1],c=s[2])):(l="!=",c=""),"~"!==l&&"!~"!==l||!/^(\w|\|)*$/.test(c))if("@"===l||"!@"===l){let i=e[c];if(!i)throw Mt(e,"the @ match target '"+c+"' is not defined, in rule: "+t);if(!function(e,t){if(!t)return!1;if(!Array.isArray(t))return!1;for(const e of t)if("string"!=typeof e)return!1;return!0}(0,i))throw Mt(e,"the @ match target '"+c+"' must be an array of strings, in rule: "+t);let n=Ba(i,e.ignoreCase);a=function(e){return"@"===l?n(e):!n(e)}}else if("~"===l||"!~"===l)if(c.indexOf("$")<0){let t=za(e,"^"+c+"$");a=function(e){return"~"===l?t.test(e):!t.test(e)}}else a=function(t,i,n,o){return za(e,"^"+It(e,c,i,n,o)+"$").test(t)};else if(c.indexOf("$")<0){let t=Et(e,c);a=function(e){return"=="===l?e===t:e!==t}}else{let t=Et(e,c);a=function(i,n,o,r,s){let a=It(e,t,n,o,r);return"=="===l?i===a:i!==a}}else{let t=Ba(c.split("|"),e.ignoreCase);a=function(e){return"~"===l?t(e):!t(e)}}return-1===o?{name:i,value:n,test:function(e,t,i,n){return a(e,e,t,i,n)}}:{name:i,value:n,test:function(e,t,i,n){let r=function(e,t,i,n){if(n<0)return e;if(n=100){n-=100;let e=i.split(".");if(e.unshift(i),n=0&&(n.tokenSubst=!0),"string"==typeof i.bracket)if("@open"===i.bracket)n.bracket=1;else{if("@close"!==i.bracket)throw Mt(e,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+t);n.bracket=-1}if(i.next){if("string"!=typeof i.next)throw Mt(e,"the next state must be a string value in rule: "+t);{let o=i.next;if(!/^(@pop|@push|@popall)$/.test(o)&&("@"===o[0]&&(o=o.substr(1)),o.indexOf("$")<0&&!function(e,t){let i=t;for(;i&&i.length>0;){if(e.stateNames[i])return!0;const t=i.lastIndexOf(".");i=t<0?null:i.substr(0,t)}return!1}(e,It(e,o,"",[],""))))throw Mt(e,"the next state '"+i.next+"' is not defined in rule: "+t);n.next=o}}return"number"==typeof i.goBack&&(n.goBack=i.goBack),"string"==typeof i.switchTo&&(n.switchTo=i.switchTo),"string"==typeof i.log&&(n.log=i.log),"string"==typeof i.nextEmbedded&&(n.nextEmbedded=i.nextEmbedded,e.usesEmbedded=!0),n}}if(Array.isArray(i)){let n=[];for(let o=0,r=i.length;o0&&"^"===i[0],this.name=this.name+": "+i,this.regex=za(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")")}setAction(e,t){this.action=Va(e,this.name,t)}}class $a{constructor(e,t){this._languageIdentifier=e,this._actual=t}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i,n){if("function"==typeof this._actual.tokenize)return Ua.adaptTokenize(this._languageIdentifier.language,this._actual,e,i,n);throw new Error("Not supported!")}tokenize2(e,t,i){let n=this._actual.tokenizeEncoded(e,i);return new q.Hi(n.tokens,n.endState)}}class Ua{constructor(e,t,i){this._standaloneThemeService=e,this._languageIdentifier=t,this._actual=i}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t,i){let n=[],o=0;for(let r=0,s=e.length;r0&&o[r-1]===c)continue;let u=l.startIndex;0===a?u=0:uPromise.resolve(e[0])));const Ga=G();Ga.editor={create:function(e,t,i){return Oa(e,i||{},(i=>new _o(e,t,i,i.get(mn.TG),i.get(Z.$),i.get(ne.H),i.get(Xi.i6),i.get(Zn.d),i.get(vn.u),i.get(Gn.Z),i.get(mi.lT),i.get(Jt.Ui),i.get(Xn.F),i.get(at.q),i.get(Ce.h))))},onDidCreateEditor:function(e){return Ta.codeEditorService.get().onCodeEditorAdd((t=>{e(t)}))},createDiffEditor:function(e,t,i){return Oa(e,i||{},(i=>new vo(e,t,i,i.get(mn.TG),i.get(Xi.i6),i.get(Zn.d),i.get(vn.u),i.get(we.p),i.get(Z.$),i.get(Gn.Z),i.get(mi.lT),i.get(Jt.Ui),i.get(vn.i),i.get(Sn.e),i.get(Cn.p))))},createDiffNavigator:function(e,t){return new pe(e,t)},createModel:function(e,t,i){return bo(Ta.modelService.get(),Ta.modeService.get(),e,t,i)},setModelLanguage:function(e,t){Ta.modelService.get().setMode(e,Ta.modeService.get().create(t))},setModelMarkers:function(e,t,i){e&&Ta.markerService.get().changeOne(t,e.uri,i)},getModelMarkers:function(e){return Ta.markerService.get().read(e)},onDidChangeMarkers:function(e){return Ta.markerService.get().onMarkerChanged(e)},getModels:function(){return Ta.modelService.get().getModels()},getModel:function(e){return Ta.modelService.get().getModel(e)},onDidCreateModel:function(e){return Ta.modelService.get().onModelAdded(e)},onWillDisposeModel:function(e){return Ta.modelService.get().onModelRemoved(e)},onDidChangeModelLanguage:function(e){return Ta.modelService.get().onModelModeChanged((t=>{e({model:t.model,oldLanguage:t.oldModeId})}))},createWebWorker:function(e){return function(e,t){return new wt(e,t)}(Ta.modelService.get(),e)},colorizeElement:function(e,t){const i=Ta.standaloneThemeService.get();return i.registerEditorContainer(e),Ut.colorizeElement(i,Ta.modeService.get(),e,t)},colorize:function(e,t,i){return Ta.standaloneThemeService.get().registerEditorContainer(document.body),Ut.colorize(Ta.modeService.get(),e,t,i)},colorizeModelLine:function(e,t,i=4){return Ta.standaloneThemeService.get().registerEditorContainer(document.body),Ut.colorizeModelLine(e,t,i)},tokenize:function(e,t){Ta.modeService.get().triggerMode(t);let i=(n=t,be.RW.get(n)||{getInitialState:()=>ye.nO,tokenize:(e,t,i,o)=>(0,ye.Ri)(n,e,i,o)});var n;let o=(0,Be.uq)(e),r=[],s=i.getInitialState();for(let e=0,t=o.length;e{n.getId()===e&&(i.dispose(),t())}));return i},getEncodedLanguageId:function(e){let t=Ta.modeService.get().getLanguageIdentifier(e);return t?t.id:0},setLanguageConfiguration:function(e,t){let i=Ta.modeService.get().getLanguageIdentifier(e);if(!i)throw new Error(`Cannot set configuration for unknown language ${e}`);return Fe.zu.register(i,t,100)},setColorMap:function(e){if(e){const t=[null];for(let i=1,n=e.length;ifunction(e){return"tokenizeEncoded"in e}(e)?new $a(i,e):new Ua(Ta.standaloneThemeService.get(),i,e);return ja(t)?be.RW.registerPromise(e,t.then((e=>n(e)))):be.RW.register(e,n(t))},setMonarchTokensProvider:function(e,t){const i=t=>function(e,t,i,n){return new Vt(e,t,i,n)}(Ta.modeService.get(),Ta.standaloneThemeService.get(),e,function(e,t){if(!t||"object"!=typeof t)throw new Error("Monarch: expecting a language definition object");let i={};i.languageId=e,i.includeLF=Fa(t.includeLF,!1),i.noThrow=!1,i.maxStack=100,i.start="string"==typeof t.start?t.start:null,i.ignoreCase=Fa(t.ignoreCase,!1),i.unicode=Fa(t.unicode,!1),i.tokenPostfix=Pa(t.tokenPostfix,"."+i.languageId),i.defaultToken=Pa(t.defaultToken,"source"),i.usesEmbedded=!1;let n=t;function o(e,r,s){for(const a of s){let s=a.include;if(s){if("string"!=typeof s)throw Mt(i,"an 'include' attribute must be a string at: "+e);if("@"===s[0]&&(s=s.substr(1)),!t.tokenizer[s])throw Mt(i,"include target '"+s+"' is not defined at: "+e);o(e+"."+s,r,t.tokenizer[s])}else{const t=new Ha(e);if(Array.isArray(a)&&a.length>=1&&a.length<=3)if(t.setRegex(n,a[0]),a.length>=3)if("string"==typeof a[1])t.setAction(n,{token:a[1],next:a[2]});else{if("object"!=typeof a[1])throw Mt(i,"a next state as the last element of a rule can only be given if the action is either an object or a string, at: "+e);{const e=a[1];e.next=a[2],t.setAction(n,e)}}else t.setAction(n,a[1]);else{if(!a.regex)throw Mt(i,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+e);a.name&&"string"==typeof a.name&&(t.name=a.name),a.matchOnlyAtStart&&(t.matchOnlyAtLineStart=Fa(a.matchOnlyAtLineStart,!1)),t.setRegex(n,a.regex),t.setAction(n,a.action)}r.push(t)}}}if(n.languageId=e,n.includeLF=i.includeLF,n.ignoreCase=i.ignoreCase,n.unicode=i.unicode,n.noThrow=i.noThrow,n.usesEmbedded=i.usesEmbedded,n.stateNames=t.tokenizer,n.defaultToken=i.defaultToken,!t.tokenizer||"object"!=typeof t.tokenizer)throw Mt(i,"a language definition must define the 'tokenizer' attribute as an object");i.tokenizer=[];for(let e in t.tokenizer)if(t.tokenizer.hasOwnProperty(e)){i.start||(i.start=e);const n=t.tokenizer[e];i.tokenizer[e]=new Array,o("tokenizer."+e,i.tokenizer[e],n)}if(i.usesEmbedded=n.usesEmbedded,t.brackets){if(!Array.isArray(t.brackets))throw Mt(i,"the 'brackets' attribute must be defined as an array")}else t.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];let r=[];for(let e of t.brackets){let t=e;if(t&&Array.isArray(t)&&3===t.length&&(t={token:t[2],open:t[0],close:t[1]}),t.open===t.close)throw Mt(i,"open and close brackets in a 'brackets' attribute must be different: "+t.open+"\n hint: use the 'bracket' attribute if matching on equal brackets is required.");if("string"!=typeof t.open||"string"!=typeof t.token||"string"!=typeof t.close)throw Mt(i,"every element in the 'brackets' array must be a '{open,close,token}' object or array");r.push({token:t.token+i.tokenPostfix,open:Et(i,t.open),close:Et(i,t.close)})}return i.brackets=r,i.noThrow=!0,i}(e,t));return ja(t)?be.RW.registerPromise(e,t.then((e=>i(e)))):be.RW.register(e,i(t))},registerReferenceProvider:function(e,t){return be.FL.register(e,t)},registerRenameProvider:function(e,t){return be.G0.register(e,t)},registerCompletionItemProvider:function(e,t){return be.KZ.register(e,t)},registerSignatureHelpProvider:function(e,t){return be.nD.register(e,t)},registerHoverProvider:function(e,t){return be.xp.register(e,{provideHover:(e,i,n)=>{let o=e.getWordAtPosition(i);return Promise.resolve(t.provideHover(e,i,n)).then((e=>{if(e)return!e.range&&o&&(e.range=new U.e(i.lineNumber,o.startColumn,i.lineNumber,o.endColumn)),e.range||(e.range=new U.e(i.lineNumber,i.column,i.lineNumber,i.column)),e}))}})},registerDocumentSymbolProvider:function(e,t){return be.vJ.register(e,t)},registerDocumentHighlightProvider:function(e,t){return be.vH.register(e,t)},registerLinkedEditingRangeProvider:function(e,t){return be.id.register(e,t)},registerDefinitionProvider:function(e,t){return be.Ct.register(e,t)},registerImplementationProvider:function(e,t){return be.vI.register(e,t)},registerTypeDefinitionProvider:function(e,t){return be.tA.register(e,t)},registerCodeLensProvider:function(e,t){return be.He.register(e,t)},registerCodeActionProvider:function(e,t){return be.H9.register(e,{provideCodeActions:(e,i,n,o)=>{let r=Ta.markerService.get().read({resource:e.uri}).filter((e=>U.e.areIntersectingOrTouching(e,i)));return t.provideCodeActions(e,i,{markers:r,only:n.only},o)}})},registerDocumentFormattingEditProvider:function(e,t){return be.Az.register(e,t)},registerDocumentRangeFormattingEditProvider:function(e,t){return be.vN.register(e,t)},registerOnTypeFormattingEditProvider:function(e,t){return be.ln.register(e,t)},registerLinkProvider:function(e,t){return be.pM.register(e,t)},registerColorProvider:function(e,t){return be.OH.register(e,t)},registerFoldingRangeProvider:function(e,t){return be.aC.register(e,t)},registerDeclarationProvider:function(e,t){return be.RN.register(e,t)},registerSelectionRangeProvider:function(e,t){return be.AC.register(e,t)},registerDocumentSemanticTokensProvider:function(e,t){return be.wT.register(e,t)},registerDocumentRangeSemanticTokensProvider:function(e,t){return be.K7.register(e,t)},registerInlineCompletionsProvider:function(e,t){return be.zu.register(e,t)},DocumentHighlightKind:h,CompletionItemKind:r,CompletionItemTag:s,CompletionItemInsertTextRule:o,SymbolKind:I,SymbolTag:T,IndentAction:m,CompletionTriggerKind:a,SignatureHelpTriggerKind:M,InlayHintKind:_,InlineCompletionTriggerKind:v,FoldingRangeKind:be.AD};const Ya=Ga.CancellationTokenSource,Za=Ga.Emitter,Xa=Ga.KeyCode,Qa=Ga.KeyMod,Ja=Ga.Position,el=Ga.Range,tl=Ga.Selection,il=Ga.SelectionDirection,nl=Ga.MarkerSeverity,ol=Ga.MarkerTag,rl=Ga.Uri,sl=Ga.Token,al=Ga.editor,ll=Ga.languages;((null===(qa=De.li.MonacoEnvironment)||void 0===qa?void 0:qa.globalAPI)||"function"==typeof define&&i.amdO)&&(self.monaco=Ga),void 0!==self.require&&"function"==typeof self.require.config&&self.require.config({ignoreDuplicateModules:["vscode-languageserver-types","vscode-languageserver-types/main","vscode-languageserver-textdocument","vscode-languageserver-textdocument/main","vscode-nls","vscode-nls/vscode-nls","jsonc-parser","jsonc-parser/main","vscode-uri","vscode-uri/index","vs/basic-languages/typescript/typescript"]})},9477:(e,t,i)=>{"use strict";i.r(t);var n=i(5321),o=i(8626),r=i(8764),s=i(5152),a=i(3794),l=i(5976),c=i(1432),u=i(7295),h=i(666),d=i(6830),g=i(9102),f=i(9720),p=i(8819),m=i(2065),_=i(1847),v=i(988),b=i(3910),y=i(7781),w=i(913),C=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},S=function(e,t){return function(i,n){t(i,n,e)}};const x=new p.uy("accessibilityHelpWidgetVisible",!1);let k=class e extends l.JT{constructor(e,t){super(),this._editor=e,this._widget=this._register(t.createInstance(D,this._editor))}static get(t){return t.getContribution(e.ID)}show(){this._widget.show()}hide(){this._widget.hide()}};k.ID="editor.contrib.accessibilityHelpController",k=C([S(1,m.TG)],k);let D=class e extends a.${constructor(e,t,i,r){super(),this._contextKeyService=t,this._keybindingService=i,this._openerService=r,this._editor=e,this._isVisibleKey=x.bindTo(this._contextKeyService),this._domNode=(0,o.X)(document.createElement("div")),this._domNode.setClassName("accessibilityHelpWidget"),this._domNode.setDisplay("none"),this._domNode.setAttribute("role","dialog"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode=(0,o.X)(document.createElement("div")),this._contentDomNode.setAttribute("role","document"),this._domNode.appendChild(this._contentDomNode),this._isVisible=!1,this._register(this._editor.onDidLayoutChange((()=>{this._isVisible&&this._layout()}))),this._register(n.mu(this._contentDomNode.domNode,"keydown",(e=>{if(this._isVisible&&(e.equals(2083)&&((0,s.Z9)(w.Oe.emergencyConfOn),this._editor.updateOptions({accessibilitySupport:"on"}),n.PO(this._contentDomNode.domNode),this._buildContent(),this._contentDomNode.domNode.focus(),e.preventDefault(),e.stopPropagation()),e.equals(2086))){(0,s.Z9)(w.Oe.openingDocs);let t=this._editor.getRawOptions().accessibilityHelpUrl;void 0===t&&(t="https://go.microsoft.com/fwlink/?linkid=852450"),this._openerService.open(h.o.parse(t)),e.preventDefault(),e.stopPropagation()}}))),this.onblur(this._contentDomNode.domNode,(()=>{this.hide()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return e.ID}getDomNode(){return this._domNode.domNode}getPosition(){return{preference:null}}show(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())}_descriptionForCommand(e,t,i){let n=this._keybindingService.lookupKeybinding(e);return n?u.WU(t,n.getAriaLabel()):u.WU(i,e)}_buildContent(){const e=this._editor.getOptions(),t=this._editor.getSelections();let i=0;if(t){const e=this._editor.getModel();e&&t.forEach((t=>{i+=e.getValueLengthInRange(t)}))}let n=function(e,t){return e&&0!==e.length?1===e.length?t?u.WU(w.Oe.singleSelectionRange,e[0].positionLineNumber,e[0].positionColumn,t):u.WU(w.Oe.singleSelection,e[0].positionLineNumber,e[0].positionColumn):t?u.WU(w.Oe.multiSelectionRange,e.length,t):e.length>0?u.WU(w.Oe.multiSelection,e.length):"":w.Oe.noSelection}(t,i);e.get(51)?e.get(78)?n+=w.Oe.readonlyDiffEditor:n+=w.Oe.editableDiffEditor:e.get(78)?n+=w.Oe.readonlyEditor:n+=w.Oe.editableEditor;const o=c.dz?w.Oe.changeConfigToOnMac:w.Oe.changeConfigToOnWinLinux;switch(e.get(2)){case 0:n+="\n\n - "+o;break;case 2:n+="\n\n - "+w.Oe.auto_on;break;case 1:n+="\n\n - "+w.Oe.auto_off,n+=" "+o}e.get(127)?n+="\n\n - "+this._descriptionForCommand(f.ToggleTabFocusModeAction.ID,w.Oe.tabFocusModeOnMsg,w.Oe.tabFocusModeOnMsgNoKb):n+="\n\n - "+this._descriptionForCommand(f.ToggleTabFocusModeAction.ID,w.Oe.tabFocusModeOffMsg,w.Oe.tabFocusModeOffMsgNoKb),n+="\n\n - "+(c.dz?w.Oe.openDocMac:w.Oe.openDocWinLinux),n+="\n\n"+w.Oe.outroMsg,this._contentDomNode.domNode.appendChild((0,r.BO)(n)),this._contentDomNode.domNode.setAttribute("aria-label",n)}hide(){this._isVisible&&(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,n.PO(this._contentDomNode.domNode),this._editor.focus())}_layout(){let t=this._editor.getLayoutInfo(),i=Math.max(5,Math.min(e.WIDTH,t.width-40)),n=Math.max(5,Math.min(e.HEIGHT,t.height-40));this._domNode.setWidth(i),this._domNode.setHeight(n);let o=Math.round((t.height-n)/2);this._domNode.setTop(o);let r=Math.round((t.width-i)/2);this._domNode.setLeft(r)}};D.ID="editor.contrib.accessibilityHelpWidget",D.WIDTH=500,D.HEIGHT=300,D=C([S(1,p.i6),S(2,_.d),S(3,v.v4)],D);class L extends d.R6{constructor(){super({id:"editor.action.showAccessibilityHelp",label:w.Oe.showAccessibilityHelpAction,alias:"Show Accessibility Help",precondition:void 0,kbOpts:{primary:571,weight:100,linux:{primary:1595,secondary:[571]}}})}run(e,t){let i=k.get(t);i&&i.show()}}(0,d._K)(k.ID,k),(0,d.Qr)(L);const N=d._l.bindToContribution(k.get);(0,d.fK)(new N({id:"closeAccessibilityHelp",precondition:x,handler:e=>e.hide(),kbOpts:{weight:200,kbExpr:g.u.focus,primary:9,secondary:[1033]}})),(0,y.Ic)(((e,t)=>{const i=e.getColor(b.D0);i&&t.addRule(`.monaco-editor .accessibilityHelpWidget { background-color: ${i}; }`);const n=e.getColor(b.Hf);n&&t.addRule(`.monaco-editor .accessibilityHelpWidget { color: ${n}; }`);const o=e.getColor(b.rh);o&&t.addRule(`.monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px ${o}; }`);const r=e.getColor(b.lR);r&&t.addRule(`.monaco-editor .accessibilityHelpWidget { border: 2px solid ${r}; }`)}))},9646:(e,t,i)=>{"use strict";i.r(t),i.d(t,{IPadShowKeyboard:()=>a});var n=i(5321),o=i(5976),r=i(6830),s=i(1432);class a extends o.JT{constructor(e){super(),this.editor=e,this.widget=null,s.gn&&(this._register(e.onDidChangeConfiguration((()=>this.update()))),this.update())}update(){const e=!this.editor.getOption(78);!this.widget&&e?this.widget=new l(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}a.ID="editor.contrib.iPadShowKeyboard";class l extends o.JT{constructor(e){super(),this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(n.nm(this._domNode,"touchstart",(e=>{this.editor.focus()}))),this._register(n.nm(this._domNode,"focus",(e=>{this.editor.focus()}))),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return l.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}l.ID="editor.contrib.ShowKeyboardWidget",(0,r._K)(a.ID,a)},7830:(e,t,i)=>{"use strict";i.r(t);var n=i(5321),o=i(1264),r=i(5976),s=i(6830),a=i(4101),l=i(8111),c=i(1531),u=i(2095),h=i(3910),d=i(7781),g=i(913),f=i(2321),p=function(e,t){return function(i,n){t(i,n,e)}};let m=class e extends r.JT{constructor(e,t,i){super(),this._editor=e,this._modeService=i,this._widget=null,this._register(this._editor.onDidChangeModel((e=>this.stop()))),this._register(this._editor.onDidChangeModelLanguage((e=>this.stop()))),this._register(a.RW.onDidChange((e=>this.stop()))),this._register(this._editor.onKeyUp((e=>9===e.keyCode&&this.stop())))}static get(t){return t.getContribution(e.ID)}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new v(this._editor,this._modeService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};m.ID="editor.contrib.inspectTokens",m=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([p(1,u.Z),p(2,c.h)],m);class _ extends s.R6{constructor(){super({id:"editor.action.inspectTokens",label:g.ug.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){let i=m.get(t);i&&i.launch()}}class v extends r.JT{constructor(e,t){var i;super(),this.allowEditorOverflow=!0,this._editor=e,this._modeService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=(i=this._model.getLanguageIdentifier(),a.RW.get(i.language)||{getInitialState:()=>l.nO,tokenize:(e,t,n,o)=>(0,l.Ri)(i.language,e,n,o),tokenize2:(e,t,n,o)=>(0,l.mh)(i.id,e,n,o)}),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition((e=>this._compute(this._editor.getPosition())))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return v._ID}_compute(e){let t=this._getTokensAtLine(e.lineNumber),i=0;for(let n=t.tokens1.length-1;n>=0;n--){let o=t.tokens1[n];if(e.column-1>=o.offset){i=n;break}}let r=0;for(let i=t.tokens2.length>>>1;i>=0;i--)if(e.column-1>=t.tokens2[i<<1]){r=i;break}let s=this._model.getLineContent(e.lineNumber),a="";if(i{const i=e.getColor(h.CN);if(i){let n=e.type===f.e.HIGH_CONTRAST?2:1;t.addRule(`.monaco-editor .tokens-inspect-widget { border: ${n}px solid ${i}; }`),t.addRule(`.monaco-editor .tokens-inspect-widget .tokens-inspect-separator { background-color: ${i}; }`)}const n=e.getColor(h.yJ);n&&t.addRule(`.monaco-editor .tokens-inspect-widget { background-color: ${n}; }`);const o=e.getColor(h.Sb);o&&t.addRule(`.monaco-editor .tokens-inspect-widget { color: ${o}; }`)}))},7720:(e,t,i)=>{"use strict";i.r(t),i.d(t,{GotoLineAction:()=>U,StandaloneCommandsQuickAccessProvider:()=>$});var n,o=i(9872),r=i(725),s=i(913),a=i(1640),l=i(3580),c=i(1050),u=i(5976),h=i(5393),d=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function g(e){const t=e;return Array.isArray(t.items)}!function(e){e[e.NO_ACTION=0]="NO_ACTION",e[e.CLOSE_PICKER=1]="CLOSE_PICKER",e[e.REFRESH_PICKER=2]="REFRESH_PICKER",e[e.REMOVE_ITEM=3]="REMOVE_ITEM"}(n||(n={}));class f extends u.JT{constructor(e,t){super(),this.prefix=e,this.options=t}provide(e,t){var i;const o=new u.SL;let r;e.canAcceptInBackground=!!(null===(i=this.options)||void 0===i?void 0:i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const s=o.add(new u.XK),a=()=>d(this,void 0,void 0,(function*(){const i=s.value=new u.SL;null==r||r.dispose(!0),e.busy=!1,r=new c.A(t);const n=r.token,o=e.value.substr(this.prefix.length).trim(),a=this._getPicks(o,i,n),l=(t,i)=>{var n;let r,s;if(g(t)?(r=t.items,s=t.active):r=t,0===r.length){if(i)return!1;o.length>0&&(null===(n=this.options)||void 0===n?void 0:n.noResultsPick)&&(r=[this.options.noResultsPick])}return e.items=r,s&&(e.activeItems=[s]),!0};if(null===a);else if(function(e){const t=e;return!!t.picks&&t.additionalPicks instanceof Promise}(a)){let t=!1,i=!1;yield Promise.all([(()=>d(this,void 0,void 0,(function*(){yield(0,h.Vs)(f.FAST_PICKS_RACE_DELAY),n.isCancellationRequested||i||(t=l(a.picks,!0))})))(),(()=>d(this,void 0,void 0,(function*(){e.busy=!0;try{const o=yield a.additionalPicks;if(n.isCancellationRequested)return;let r,s,c,u;if(g(a.picks)?(r=a.picks.items,s=a.picks.active):r=a.picks,g(o)?(c=o.items,u=o.active):c=o,c.length>0||!t){let t;if(!s&&!u){const i=e.activeItems[0];i&&-1!==r.indexOf(i)&&(t=i)}l({items:[...r,...c],active:s||u||t})}}finally{n.isCancellationRequested||(e.busy=!1),i=!0}})))()])}else if(a instanceof Promise){e.busy=!0;try{const t=yield a;if(n.isCancellationRequested)return;l(t)}finally{n.isCancellationRequested||(e.busy=!1)}}else l(a)}));return o.add(e.onDidChangeValue((()=>a()))),a(),o.add(e.onDidAccept((t=>{const[i]=e.selectedItems;"function"==typeof(null==i?void 0:i.accept)&&(t.inBackground||e.hide(),i.accept(e.keyMods,t))}))),o.add(e.onDidTriggerItemButton((({button:i,item:o})=>d(this,void 0,void 0,(function*(){var r,s;if("function"==typeof o.trigger){const l=null!==(s=null===(r=o.buttons)||void 0===r?void 0:r.indexOf(i))&&void 0!==s?s:-1;if(l>=0){const i=o.trigger(l,e.keyMods),r="number"==typeof i?i:yield i;if(t.isCancellationRequested)return;switch(r){case n.NO_ACTION:break;case n.CLOSE_PICKER:e.hide();break;case n.REFRESH_PICKER:a();break;case n.REMOVE_ITEM:const t=e.items.indexOf(o);if(-1!==t){const i=e.items.slice();i.splice(t,1),e.items=i}}}}}))))),o}}f.FAST_PICKS_RACE_DELAY=200;var p=i(5392),m=i(8401),_=i(3702),v=i(6904),b=i(3108),y=i(2065),w=i(1847),C=i(4565),S=i(829),x=i(7301),k=i(8820),D=i(4603),L=i(9488);function N(e,t){return t&&(e.stack||e.stacktrace)?l.N("stackTrace.format","{0}: {1}",A(e),E(e.stack)||E(e.stacktrace)):A(e)}function E(e){return Array.isArray(e)?e.join("\n"):e}function A(e){return"string"==typeof e.code&&"number"==typeof e.errno&&"string"==typeof e.syscall?l.N("nodeExceptionMessage","A system error occurred ({0})",e.message):e.message||l.N("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function M(e=null,t=!1){if(!e)return l.N("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(e)){const i=L.kX(e),n=M(i[0],t);return i.length>1?l.N("error.moreErrors","{0} ({1} errors in total)",n,i.length):n}if(m.HD(e))return e;if(e.detail){const i=e.detail;if(i.error)return N(i.error,t);if(i.exception)return N(i.exception,t)}return e.stack?N(e,t):e.message?e.message:l.N("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var I=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},T=function(e,t){return function(i,n){t(i,n,e)}},R=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};let O=class e extends f{constructor(t,i,n,o,r,s){super(e.PREFIX,t),this.instantiationService=i,this.keybindingService=n,this.commandService=o,this.telemetryService=r,this.dialogService=s,this.commandsHistory=this._register(this.instantiationService.createInstance(F)),this.options=t}_getPicks(t,i,n){return R(this,void 0,void 0,(function*(){const o=yield this.getCommandPicks(i,n);if(n.isCancellationRequested)return[];const r=[];for(const i of o){const n=(0,m.f6)(e.WORD_FILTER(t,i.label)),o=i.commandAlias?(0,m.f6)(e.WORD_FILTER(t,i.commandAlias)):void 0;n||o?(i.highlights={label:n,detail:this.options.showAlias?o:void 0},r.push(i)):t===i.commandId&&r.push(i)}const s=new Map;for(const e of r){const t=s.get(e.label);t?(e.description=e.commandId,t.description=t.commandId):s.set(e.label,e)}r.sort(((e,t)=>{const i=this.commandsHistory.peek(e.commandId),n=this.commandsHistory.peek(t.commandId);return i&&n?i>n?-1:1:i?-1:n?1:e.label.localeCompare(t.label)}));const a=[];let c=!1;for(let e=0;eR(this,void 0,void 0,(function*(){this.commandsHistory.push(t.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:t.commandId,from:"quick open"});try{yield this.commandService.executeCommand(t.commandId)}catch(e){(0,x.VV)(e)||this.dialogService.show(D.Z.Error,(0,l.N)("canNotRun","Command '{0}' resulted in an error ({1})",t.label,M(e)),[(0,l.N)("ok","OK")])}}))}))}return a}))}};O.PREFIX=">",O.WORD_FILTER=(0,p.or)(p.Ji,p.KZ,p.ir),O=I([T(1,y.TG),T(2,w.d),T(3,C.H),T(4,S.b),T(5,k.S)],O);let F=class e extends u.JT{constructor(e,t){super(),this.storageService=e,this.configurationService=t,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((()=>this.updateConfiguration())))}updateConfiguration(){this.configuredCommandsHistoryLength=e.getConfiguredCommandHistoryLength(this.configurationService),e.cache&&e.cache.limit!==this.configuredCommandsHistoryLength&&(e.cache.limit=this.configuredCommandsHistoryLength,e.saveState(this.storageService))}load(){const t=this.storageService.get(e.PREF_KEY_CACHE,0);let i;if(t)try{i=JSON.parse(t)}catch(e){}const n=e.cache=new _.z6(this.configuredCommandsHistoryLength,1);if(i){let e;e=i.usesLRU?i.entries:i.entries.sort(((e,t)=>e.value-t.value)),e.forEach((e=>n.set(e.key,e.value)))}e.counter=this.storageService.getNumber(e.PREF_KEY_COUNTER,0,e.counter)}push(t){e.cache&&(e.cache.set(t,e.counter++),e.saveState(this.storageService))}peek(t){var i;return null===(i=e.cache)||void 0===i?void 0:i.peek(t)}static saveState(t){if(!e.cache)return;const i={usesLRU:!0,entries:[]};e.cache.forEach(((e,t)=>i.entries.push({key:t,value:e}))),t.store(e.PREF_KEY_CACHE,JSON.stringify(i),0,0),t.store(e.PREF_KEY_COUNTER,e.counter,0,0)}static getConfiguredCommandHistoryLength(t){var i,n;const o=null===(n=null===(i=t.getValue().workbench)||void 0===i?void 0:i.commandPalette)||void 0===n?void 0:n.history;return"number"==typeof o?o:e.DEFAULT_COMMANDS_HISTORY_LENGTH}};F.DEFAULT_COMMANDS_HISTORY_LENGTH=50,F.PREF_KEY_CACHE="commandPalette.mru.cache",F.PREF_KEY_COUNTER="commandPalette.mru.counter",F.counter=1,F=I([T(0,v.Uy),T(1,b.Ui)],F);var P=i(1212);class B extends O{constructor(e,t,i,n,o,r){super(e,t,i,n,o,r)}getCodeEditorCommandPicks(){const e=this.activeTextEditorControl;if(!e)return[];const t=[];for(const i of e.getSupportedActions())t.push({commandId:i.id,commandAlias:i.alias,label:(0,P.x$)(i.label)||i.id});return t}}var z=i(6830),W=i(9102),V=i(1157),H=function(e,t){return function(i,n){t(i,n,e)}};let $=class extends B{constructor(e,t,i,n,o,r){super({showAlias:!1},e,i,n,o,r),this.codeEditorService=t}get activeTextEditorControl(){return(0,m.f6)(this.codeEditorService.getFocusedCodeEditor())}getCommandPicks(){return e=this,t=void 0,n=function*(){return this.getCodeEditorCommandPicks()},new((i=void 0)||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}));var e,t,i,n}};$=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([H(0,y.TG),H(1,a.$),H(2,w.d),H(3,C.H),H(4,S.b),H(5,k.S)],$),o.B.as(r.IP.Quickaccess).registerQuickAccessProvider({ctor:$,prefix:$.PREFIX,helpEntries:[{description:s.UX.quickCommandHelp,needsEditor:!0}]});class U extends z.R6{constructor(){super({id:"editor.action.quickCommand",label:s.UX.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:W.u.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(V.eJ).quickAccess.show($.PREFIX)}}(0,z.Qr)(U)},2097:(e,t,i)=>{"use strict";i.r(t),i.d(t,{GotoLineAction:()=>y,StandaloneGotoLineQuickAccessProvider:()=>_});var n=i(3580),o=i(5976),r=i(8275),s=i(5520);class a extends r.X{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const t=(0,n.N)("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,o.JT.None}provideWithTextEditor(e,t,i){const n=e.editor,r=new o.SL;r.add(t.onDidAccept((i=>{const[o]=t.selectedItems;if(o){if(!this.isValidLineNumber(n,o.lineNumber))return;this.gotoLocation(e,{range:this.toRange(o.lineNumber,o.column),keyMods:t.keyMods,preserveFocus:i.inBackground}),i.inBackground||t.hide()}})));const l=()=>{const e=this.parsePosition(n,t.value.trim().substr(a.PREFIX.length)),i=this.getPickLabel(n,e.lineNumber,e.column);if(t.items=[{lineNumber:e.lineNumber,column:e.column,label:i}],t.ariaLabel=i,!this.isValidLineNumber(n,e.lineNumber))return void this.clearDecorations(n);const o=this.toRange(e.lineNumber,e.column);n.revealRangeInCenter(o,0),this.addDecorations(n,o)};l(),r.add(t.onDidChangeValue((()=>l())));const c=(0,s.Pi)(n);return c&&2===c.getOptions().get(57).renderType&&(c.updateOptions({lineNumbers:"on"}),r.add((0,o.OF)((()=>c.updateOptions({lineNumbers:"relative"}))))),r}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const i=t.split(/,|:|#/).map((e=>parseInt(e,10))).filter((e=>!isNaN(e))),n=this.lineCount(e)+1;return{lineNumber:i[0]>0?i[0]:n+i[0],column:i[1]}}getPickLabel(e,t,i){if(this.isValidLineNumber(e,t))return this.isValidColumn(e,t,i)?(0,n.N)("gotoLineColumnLabel","Go to line {0} and character {1}.",t,i):(0,n.N)("gotoLineLabel","Go to line {0}.",t);const o=e.getPosition()||{lineNumber:1,column:1},r=this.lineCount(e);return r>1?(0,n.N)("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",o.lineNumber,o.column,r):(0,n.N)("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",o.lineNumber,o.column)}isValidLineNumber(e,t){return!(!t||"number"!=typeof t)&&t>0&&t<=this.lineCount(e)}isValidColumn(e,t,i){if(!i||"number"!=typeof i)return!1;const n=this.getModel(e);if(!n)return!1;const o={lineNumber:t,column:i};return n.validatePosition(o).equals(o)}lineCount(e){var t,i;return null!==(i=null===(t=this.getModel(e))||void 0===t?void 0:t.getLineCount())&&void 0!==i?i:0}}a.PREFIX=":";var l=i(9872),c=i(725),u=i(1640),h=i(8401),d=i(913),g=i(4669),f=i(6830),p=i(9102),m=i(1157);let _=class extends a{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=g.ju.None}get activeTextEditorControl(){return(0,h.f6)(this.editorService.getFocusedCodeEditor())}};var v,b;_=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(v=0,b=u.$,function(e,t){b(e,t,v)})],_),l.B.as(c.IP.Quickaccess).registerQuickAccessProvider({ctor:_,prefix:_.PREFIX,helpEntries:[{description:d.qq.gotoLineActionLabel,needsEditor:!0}]});class y extends f.R6{constructor(){super({id:"editor.action.gotoLine",label:d.qq.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:p.u.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(m.eJ).quickAccess.show(_.PREFIX)}}(0,f.Qr)(y)},8936:(e,t,i)=>{"use strict";i.r(t),i.d(t,{GotoLineAction:()=>B,StandaloneGotoSymbolQuickAccessProvider:()=>O}),i(8609),i(4954);var n=i(3580),o=i(1050),r=i(5976),s=i(4314),a=i(8275),l=i(4101),c=i(6895),u=i(7295),h=i(5392),d=i(8721),g=i(1432);const f=[void 0,[]];function p(e,t,i=0,n=0){const o=t;return o.values&&o.values.length>1?function(e,t,i,n){let o=0;const r=[];for(const s of t){const[t,a]=m(e,s,i,n);if("number"!=typeof t)return f;o+=t,r.push(...a)}return[o,_(r)]}(e,o.values,i,n):m(e,t,i,n)}function m(e,t,i,n){const o=(0,h.EW)(t.original,t.originalLowercase,i,e,e.toLowerCase(),n,!0);return o?[o[0],(0,h.mB)(o)]:f}function _(e){const t=e.sort(((e,t)=>e.start-t.start)),i=[];let n;for(const e of t)!n||(r=e,(o=n).end=0;let s;const a=e.split(" ");if(a.length>1)for(const e of a){const{pathNormalized:t,normalized:i,normalizedLowercase:n}=b(e);i&&(s||(s=[]),s.push({original:e,originalLowercase:e.toLowerCase(),pathNormalized:t,normalized:i,normalizedLowercase:n}))}return{original:e,originalLowercase:t,pathNormalized:i,normalized:n,normalizedLowercase:o,values:s,containsPathSeparator:r}}function b(e){let t;t=g.ED?e.replace(/\//g,d.ir):e.replace(/\\/g,d.ir);const i=(0,u.R1)(t).replace(/\s/g,"");return{pathNormalized:t,normalized:i,normalizedLowercase:i.toLowerCase()}}function y(e){return Array.isArray(e)?v(e.map((e=>e.original)).join(" ")):v(e.original)}var w=i(3046),C=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class S extends a.X{constructor(e=Object.create(null)){super(e),this.options=e,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,(0,n.N)("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),r.JT.None}provideWithTextEditor(e,t,i){const n=e.editor,o=this.getModel(n);return o?l.vJ.has(o)?this.doProvideWithEditorSymbols(e,o,t,i):this.doProvideWithoutEditorSymbols(e,o,t,i):r.JT.None}doProvideWithoutEditorSymbols(e,t,i,o){const s=new r.SL;return this.provideLabelPick(i,(0,n.N)("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),(()=>{C(this,void 0,void 0,(function*(){(yield this.waitForLanguageSymbolRegistry(t,s))&&!o.isCancellationRequested&&s.add(this.doProvideWithEditorSymbols(e,t,i,o))}))})(),s}provideLabelPick(e,t){e.items=[{label:t,index:0,kind:14}],e.ariaLabel=t}waitForLanguageSymbolRegistry(e,t){return C(this,void 0,void 0,(function*(){if(l.vJ.has(e))return!0;let i;const n=new Promise((e=>i=e)),o=t.add(l.vJ.onDidChange((()=>{l.vJ.has(e)&&(o.dispose(),i(!0))})));return t.add((0,r.OF)((()=>i(!1)))),n}))}doProvideWithEditorSymbols(e,t,i,s){const a=e.editor,l=new r.SL;l.add(i.onDidAccept((t=>{const[n]=i.selectedItems;n&&n.range&&(this.gotoLocation(e,{range:n.range.selection,keyMods:i.keyMods,preserveFocus:t.inBackground}),t.inBackground||i.hide())}))),l.add(i.onDidTriggerItemButton((({item:t})=>{t&&t.range&&(this.gotoLocation(e,{range:t.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())})));const c=this.getDocumentSymbols(t,s);let u;const h=()=>C(this,void 0,void 0,(function*(){null==u||u.dispose(!0),i.busy=!1,u=new o.A(s),i.busy=!0;try{const e=v(i.value.substr(S.PREFIX.length).trim()),t=yield this.doGetSymbolPicks(c,e,void 0,u.token);if(s.isCancellationRequested)return;t.length>0?i.items=t:e.original.length>0?this.provideLabelPick(i,(0,n.N)("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(i,(0,n.N)("noSymbolResults","No editor symbols"))}finally{s.isCancellationRequested||(i.busy=!1)}}));l.add(i.onDidChangeValue((()=>h()))),h();let d=!0;return l.add(i.onDidChangeActive((()=>{const[e]=i.activeItems;if(e&&e.range){if(d)return void(d=!1);a.revealRangeInCenter(e.range.selection,0),this.addDecorations(a,e.range.decoration)}}))),l}doGetSymbolPicks(e,t,i,o){return C(this,void 0,void 0,(function*(){const r=yield e;if(o.isCancellationRequested)return[];const a=0===t.original.indexOf(S.SCOPE_PREFIX),c=a?1:0;let h,d;t.values&&t.values.length>1?(h=y(t.values[0]),d=y(t.values.slice(1))):h=t;const g=[];for(let e=0;ec){let e=!1;if(h!==t&&([_,v]=p(f,Object.assign(Object.assign({},t),{values:void 0}),c,m),"number"==typeof _&&(e=!0)),"number"!=typeof _&&([_,v]=p(f,h,c,m),"number"!=typeof _))continue;if(!e&&d){if(C&&d.original.length>0&&([b,y]=p(C,d)),"number"!=typeof b)continue;"number"==typeof _&&(_+=b)}}const S=o.tags&&o.tags.indexOf(1)>=0;g.push({index:e,kind:o.kind,score:_,label:f,ariaLabel:a,description:C,highlights:S?void 0:{label:v,description:y},range:{selection:s.e.collapseToStart(o.selectionRange),decoration:o.range},strikethrough:S,buttons:(()=>{var e,t;const i=(null===(e=this.options)||void 0===e?void 0:e.openSideBySideDirection)?null===(t=this.options)||void 0===t?void 0:t.openSideBySideDirection():void 0;if(i)return[{iconClass:"right"===i?w.lA.splitHorizontal.classNames:w.lA.splitVertical.classNames,tooltip:"right"===i?(0,n.N)("openToSide","Open to the Side"):(0,n.N)("openToBottom","Open to the Bottom")}]})()})}const f=g.sort(((e,t)=>a?this.compareByKindAndScore(e,t):this.compareByScore(e,t)));let m=[];if(a){let e,t,i=0;function _(){t&&"number"==typeof e&&i>0&&(t.label=(0,u.WU)(k[e]||x,i))}for(const n of f)e!==n.kind?(_(),e=n.kind,i=1,t={type:"separator"},m.push(t)):i++,m.push(n);_()}else f.length>0&&(m=[{label:(0,n.N)("symbols","symbols ({0})",g.length),type:"separator"},...f]);return m}))}compareByScore(e,t){if("number"!=typeof e.score&&"number"==typeof t.score)return 1;if("number"==typeof e.score&&"number"!=typeof t.score)return-1;if("number"==typeof e.score&&"number"==typeof t.score){if(e.score>t.score)return-1;if(e.scoret.index?1:0}compareByKindAndScore(e,t){const i=k[e.kind]||x,n=k[t.kind]||x,o=i.localeCompare(n);return 0===o?this.compareByScore(e,t):o}getDocumentSymbols(e,t){return C(this,void 0,void 0,(function*(){const i=yield c.C3.create(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()}))}}S.PREFIX="@",S.SCOPE_PREFIX=":",S.PREFIX_BY_CATEGORY=`${S.PREFIX}${S.SCOPE_PREFIX}`;const x=(0,n.N)("property","properties ({0})"),k={5:(0,n.N)("method","methods ({0})"),11:(0,n.N)("function","functions ({0})"),8:(0,n.N)("_constructor","constructors ({0})"),12:(0,n.N)("variable","variables ({0})"),4:(0,n.N)("class","classes ({0})"),22:(0,n.N)("struct","structs ({0})"),23:(0,n.N)("event","events ({0})"),24:(0,n.N)("operator","operators ({0})"),10:(0,n.N)("interface","interfaces ({0})"),2:(0,n.N)("namespace","namespaces ({0})"),3:(0,n.N)("package","packages ({0})"),25:(0,n.N)("typeParameter","type parameters ({0})"),1:(0,n.N)("modules","modules ({0})"),6:(0,n.N)("property","properties ({0})"),9:(0,n.N)("enum","enumerations ({0})"),21:(0,n.N)("enumMember","enumeration members ({0})"),14:(0,n.N)("string","strings ({0})"),0:(0,n.N)("file","files ({0})"),17:(0,n.N)("array","arrays ({0})"),15:(0,n.N)("number","numbers ({0})"),16:(0,n.N)("boolean","booleans ({0})"),18:(0,n.N)("object","objects ({0})"),19:(0,n.N)("key","keys ({0})"),7:(0,n.N)("field","fields ({0})"),13:(0,n.N)("constant","constants ({0})")};var D=i(9872),L=i(725),N=i(1640),E=i(8401),A=i(913),M=i(4669),I=i(6830),T=i(9102),R=i(1157);let O=class extends S{constructor(e){super(),this.editorService=e,this.onDidActiveTextEditorControlChange=M.ju.None}get activeTextEditorControl(){return(0,E.f6)(this.editorService.getFocusedCodeEditor())}};var F,P;O=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(F=0,P=N.$,function(e,t){P(e,t,F)})],O),D.B.as(L.IP.Quickaccess).registerQuickAccessProvider({ctor:O,prefix:S.PREFIX,helpEntries:[{description:A.aq.quickOutlineActionLabel,prefix:S.PREFIX,needsEditor:!0},{description:A.aq.quickOutlineByCategoryActionLabel,prefix:S.PREFIX_BY_CATEGORY,needsEditor:!0}]});class B extends I.R6{constructor(){super({id:"editor.action.quickOutline",label:A.aq.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:T.u.hasDocumentSymbolProvider,kbOpts:{kbExpr:T.u.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(R.eJ).quickAccess.show(S.PREFIX)}}(0,I.Qr)(B)},8944:(e,t,i)=>{"use strict";i.r(t);var n=i(9872),o=i(725),r=i(913),s=i(1157),a=i(3580),l=i(5976);let c=class e{constructor(e){this.quickInputService=e,this.registry=n.B.as(o.IP.Quickaccess)}provide(t){const i=new l.SL;i.add(t.onDidAccept((()=>{const[e]=t.selectedItems;e&&this.quickInputService.quickAccess.show(e.prefix,{preserveValue:!0})}))),i.add(t.onDidChangeValue((t=>{const i=this.registry.getQuickAccessProvider(t.substr(e.PREFIX.length));i&&i.prefix&&i.prefix!==e.PREFIX&&this.quickInputService.quickAccess.show(i.prefix,{preserveValue:!0})})));const{editorProviders:n,globalProviders:o}=this.getQuickAccessProviders();return t.items=0===n.length||0===o.length?[...0===n.length?o:n]:[{label:(0,a.N)("globalCommands","global commands"),type:"separator"},...o,{label:(0,a.N)("editorCommands","editor commands"),type:"separator"},...n],i}getQuickAccessProviders(){const t=[],i=[];for(const n of this.registry.getQuickAccessProviders().sort(((e,t)=>e.prefix.localeCompare(t.prefix))))if(n.prefix!==e.PREFIX)for(const e of n.helpEntries){const o=e.prefix||n.prefix,r=o||"…";(e.needsEditor?i:t).push({prefix:o,label:r,ariaLabel:(0,a.N)("helpPickAriaLabel","{0}, {1}",r,e.description),description:e.description})}return{editorProviders:i,globalProviders:t}}};var u,h;c.PREFIX="?",c=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(u=0,h=s.eJ,function(e,t){h(e,t,u)})],c),n.B.as(o.IP.Quickaccess).registerQuickAccessProvider({ctor:c,prefix:"",helpEntries:[{description:r.ld.helpQuickAccessActionLabel,needsEditor:!0}]})},5048:(e,t,i)=>{"use strict";i.r(t),i.d(t,{StandaloneReferencesController:()=>d});var n=i(6830),o=i(1640),r=i(4318),s=i(3108),a=i(8819),l=i(2065),c=i(9422),u=i(6904),h=function(e,t){return function(i,n){t(i,n,e)}};let d=class extends r.J{constructor(e,t,i,n,o,r,s){super(!0,e,t,i,n,o,r,s)}};d=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([h(1,a.i6),h(2,o.$),h(3,c.lT),h(4,l.TG),h(5,u.Uy),h(6,s.Ui)],d),(0,n._K)(r.J.ID,d)},5662:(e,t,i)=>{"use strict";i.r(t);var n=i(6830),o=i(2095),r=i(913);class s extends n.R6{constructor(){super({id:"editor.action.toggleHighContrast",label:r.xi.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(e,t){const i=e.get(o.Z);this._originalThemeName?(i.setTheme(this._originalThemeName),this._originalThemeName=null):(this._originalThemeName=i.getColorTheme().themeName,i.setTheme("hc-black"))}}(0,n.Qr)(s)},2095:(e,t,i)=>{"use strict";i.d(t,{Z:()=>n});const n=(0,i(2065).yh)("themeService")},3580:(e,t,i)=>{"use strict";function n(e,t,...i){return function(e,t){let i;return i=0===t.length?e:e.replace(/\{(\d+)\}/g,(function(e,i){const n=i[0];return void 0!==t[n]?t[n]:e})),i}(t,i)}i.d(t,{N:()=>n})},1106:(e,t,i)=>{"use strict";i.d(t,{F:()=>r,U:()=>s});var n=i(2065),o=i(8819);const r=(0,n.yh)("accessibilityService"),s=new o.uy("accessibilityModeEnabled",!1)},8335:(e,t,i)=>{"use strict";i.d(t,{Mm:()=>k,Id:()=>L,vr:()=>x});var n=i(5321),o=i(4850),r=i(4741),s=i(5976),a=i(3580),l=i(4144),c=i(5606),u=i(1847),h=i(8030),d=i(9422),g=i(7781),f=i(6033),p=i(4669),m=i(553),_=i(9069);class v extends r.Wi{constructor(e,t){super(),this._onDidChangeVisibility=new p.Q5,this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=(0,n.R3)(e,(0,n.$)(".monaco-dropdown")),this._label=(0,n.R3)(this._element,(0,n.$)(".dropdown-label"));let i=t.labelRenderer;i||(i=e=>(e.textContent=t.label||"",null));for(const e of[n.tw.CLICK,n.tw.MOUSE_DOWN,m.t.Tap])this._register((0,n.nm)(this.element,e,(e=>n.zB.stop(e,!0))));for(const e of[n.tw.MOUSE_DOWN,m.t.Tap])this._register((0,n.nm)(this._label,e,(e=>{e instanceof MouseEvent&&e.detail>1||(this.visible?this.hide():this.show())})));this._register((0,n.nm)(this._label,n.tw.KEY_UP,(e=>{const t=new _.y(e);(t.equals(3)||t.equals(10))&&(n.zB.stop(e,!0),this.visible?this.hide():this.show())})));const o=i(this._label);o&&this._register(o),this._register(m.o.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),this.hide(),this.boxContainer&&(this.boxContainer.remove(),this.boxContainer=void 0),this.contents&&(this.contents.remove(),this.contents=void 0),this._label&&(this._label.remove(),this._label=void 0)}}class b extends v{constructor(e,t){super(e,t),this._actions=[],this._contextMenuProvider=t.contextMenuProvider,this.actions=t.actions||[],this.actionProvider=t.actionProvider,this.menuClassName=t.menuClassName||"",this.menuAsChild=!!t.menuAsChild}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this.actionProvider?this.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:e=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this.menuClassName,onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this.menuAsChild?this.element:void 0})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class y extends f.Y{constructor(e,t,i,n=Object.create(null)){super(null,e,n),this.actionItem=null,this._onDidChangeVisibility=this._register(new p.Q5),this.menuActionsOrProvider=t,this.contextMenuProvider=i,this.options=n,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const t=Array.isArray(this.menuActionsOrProvider),i={contextMenuProvider:this.contextMenuProvider,labelRenderer:e=>{this.element=(0,n.R3)(e,(0,n.$)("a.action-label"));let t=[];return"string"==typeof this.options.classNames?t=this.options.classNames.split(/\s+/g).filter((e=>!!e)):this.options.classNames&&(t=this.options.classNames),t.find((e=>"icon"===e))||t.push("codicon"),this.element.classList.add(...t),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",null},menuAsChild:this.options.menuAsChild,actions:t?this.menuActionsOrProvider:void 0,actionProvider:t?void 0:this.menuActionsOrProvider};if(this.dropdownMenu=this._register(new b(e,i)),this._register(this.dropdownMenu.onDidChangeVisibility((e=>{var t;null===(t=this.element)||void 0===t||t.setAttribute("aria-expanded",`${e}`),this._onDidChangeVisibility.fire(e)}))),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const e=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return e.options.anchorAlignmentProvider()}})}this.updateEnabled()}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}updateEnabled(){var e,t;const i=!this.getAction().enabled;null===(e=this.actionItem)||void 0===e||e.classList.toggle("disabled",i),null===(t=this.element)||void 0===t||t.classList.toggle("disabled",i)}}var w=i(1432),C=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},S=function(e,t){return function(i,n){t(i,n,e)}};function x(e,t,i,n,o,a,c){const u=e.getActions(t);return function(e,t,i,n=(e=>"navigation"===e),o=Number.MAX_SAFE_INTEGER,s=(()=>!1),a=!1){let c,u;Array.isArray(t)?(c=t,u=t):(c=t.primary,u=t.secondary);const h=new Set;for(const[t,o]of e){let e;n(t)?(e=c,e.length>0&&a&&e.push(new r.Z0)):(e=u,e.length>0&&e.push(new r.Z0));for(let n of o){i&&(n=n instanceof l.U8&&n.alt?n.alt:n);const o=e.push(n);n instanceof r.wY&&h.add({group:t,action:n,index:o-1})}}for(const{group:e,action:t,index:i}of h){const r=n(e)?c:u,a=t.actions;(a.length<=1||r.length+a.length-2<=o)&&s(t,e,r.length)&&r.splice(i,1,...a)}if(c!==u&&c.length>o){const e=c.splice(o,c.length-o);u.unshift(...e,new r.Z0)}}(u,i,!1,"string"==typeof n?e=>e===n:n,o,a,c),function(e){const t=new s.SL;for(const[,i]of e)for(const e of i)t.add(e);return t}(u)}let k=class extends f.g{constructor(e,t,i){super(void 0,e,{icon:!(!e.class&&!e.item.icon),label:!e.class&&!e.item.icon}),this._keybindingService=t,this._notificationService=i,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new s.XK),this._altKey=n._q.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}onClick(e){return t=this,i=void 0,o=function*(){e.preventDefault(),e.stopPropagation();try{yield this.actionRunner.run(this._commandAction,this._context)}catch(e){this._notificationService.error(e)}},new((n=void 0)||(n=Promise))((function(e,r){function s(e){try{l(o.next(e))}catch(e){r(e)}}function a(e){try{l(o.throw(e))}catch(e){r(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n((function(e){e(i)}))).then(s,a)}l((o=o.apply(t,i||[])).next())}));var t,i,n,o}render(e){super.render(e),e.classList.add("menu-entry"),this._updateItemClass(this._menuItemAction.item);let t=!1,i=this._altKey.keyStatus.altKey||(w.ED||w.IJ)&&this._altKey.keyStatus.shiftKey;const n=()=>{const e=t&&i;e!==this._wantsAltCommand&&(this._wantsAltCommand=e,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._menuItemAction.alt&&this._register(this._altKey.event((e=>{i=e.altKey||(w.ED||w.IJ)&&e.shiftKey,n()}))),this._register((0,o.jt)(e,"mouseleave")((e=>{t=!1,n()}))),this._register((0,o.jt)(e,"mouseenter")((e=>{t=!0,n()})))}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}updateTooltip(){if(this.label){const e=this._keybindingService.lookupKeybinding(this._commandAction.id),t=e&&e.getLabel(),i=this._commandAction.tooltip||this._commandAction.label;let n=t?(0,a.N)("titleAndKb","{0} ({1})",i,t):i;if(!this._wantsAltCommand&&this._menuItemAction.alt){const e=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,t=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id),i=t&&t.getLabel(),o=i?(0,a.N)("titleAndKb","{0} ({1})",e,i):e;n+=`\n[${h.xo.modifierLabels[w.OS].altKey}] ${o}`}this.label.title=n}}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){var t;this._itemClassDispose.value=void 0;const{element:i,label:o}=this;if(!i||!o)return;const r=this._commandAction.checked&&(null===(t=e.toggled)||void 0===t?void 0:t.icon)?e.toggled.icon:e.icon;if(r)if(g.kS.isThemeIcon(r)){const e=g.kS.asClassNameArray(r);o.classList.add(...e),this._itemClassDispose.value=(0,s.OF)((()=>{o.classList.remove(...e)}))}else r.light&&o.style.setProperty("--menu-entry-icon-light",(0,n.wY)(r.light)),r.dark&&o.style.setProperty("--menu-entry-icon-dark",(0,n.wY)(r.dark)),o.classList.add("icon"),this._itemClassDispose.value=(0,s.OF)((()=>{o.classList.remove("icon"),o.style.removeProperty("--menu-entry-icon-light"),o.style.removeProperty("--menu-entry-icon-dark")}))}};k=C([S(1,u.d),S(2,d.lT)],k);let D=class extends y{constructor(e,t){super(e,{getActions:()=>e.actions},t,{menuAsChild:!0,classNames:g.kS.isThemeIcon(e.item.icon)?g.kS.asClassName(e.item.icon):void 0})}render(e){if(super.render(e),this.element){e.classList.add("menu-entry");const{icon:t}=this._action.item;t&&!g.kS.isThemeIcon(t)&&(this.element.classList.add("icon"),t.light&&this.element.style.setProperty("--menu-entry-icon-light",(0,n.wY)(t.light)),t.dark&&this.element.style.setProperty("--menu-entry-icon-dark",(0,n.wY)(t.dark)))}}};function L(e,t){return t instanceof l.U8?e.createInstance(k,t):t instanceof l.NZ?e.createInstance(D,t):void 0}D=C([S(1,c.i)],D)},4144:(e,t,i)=>{"use strict";i.d(t,{vr:()=>f,eH:()=>p,co:()=>m,BH:()=>_,NZ:()=>v,U8:()=>b});var n=i(4741),o=i(2065),r=i(8819),s=i(4565),a=i(5976),l=i(4669),c=i(7781),u=i(3725),h=i(1741),d=i(3046),g=function(e,t){return function(i,n){t(i,n,e)}};function f(e){return void 0!==e.command}class p{constructor(e){this.id=p._idPool++,this._debugName=e}}p._idPool=0,p.CommandPalette=new p("CommandPalette"),p.EditorContext=new p("EditorContext"),p.SimpleEditorContext=new p("SimpleEditorContext"),p.EditorContextCopy=new p("EditorContextCopy"),p.EditorContextPeek=new p("EditorContextPeek"),p.MenubarEditMenu=new p("MenubarEditMenu"),p.MenubarCopy=new p("MenubarCopy"),p.MenubarGoMenu=new p("MenubarGoMenu"),p.MenubarSelectionMenu=new p("MenubarSelectionMenu"),p.InlineCompletionsActions=new p("InlineCompletionsActions");const m=(0,o.yh)("menuService"),_=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new l.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:e=>e===p.CommandPalette}}addCommand(e){return this.addCommands(u.$.single(e))}addCommands(e){for(const t of e)this._commands.set(t.id,t);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,a.OF)((()=>{let t=!1;for(const i of e)t=this._commands.delete(i.id)||t;t&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)}))}getCommand(e){return this._commands.get(e)}getCommands(){const e=new Map;return this._commands.forEach(((t,i)=>e.set(i,t))),e}appendMenuItem(e,t){return this.appendMenuItems(u.$.single({id:e,item:t}))}appendMenuItems(e){const t=new Set,i=new h.S;for(const{id:n,item:o}of e){let e=this._menuItems.get(n);e||(e=new h.S,this._menuItems.set(n,e)),i.push(e.push(o)),t.add(n)}return this._onDidChangeMenu.fire(t),(0,a.OF)((()=>{if(i.size>0){for(let e of i)e();this._onDidChangeMenu.fire(t),i.clear()}}))}getMenuItems(e){let t;return t=this._menuItems.has(e)?[...this._menuItems.get(e)]:[],e===p.CommandPalette&&this._appendImplicitItems(t),t}_appendImplicitItems(e){const t=new Set;for(const i of e)f(i)&&(t.add(i.command.id),i.alt&&t.add(i.alt.id));this._commands.forEach(((i,n)=>{t.has(n)||e.push({command:i})}))}};class v extends n.wY{constructor(e,t,i,n){super(`submenuitem.${e.submenu.id}`,"string"==typeof e.title?e.title:e.title.value,[],"submenu"),this.item=e,this._menuService=t,this._contextKeyService=i,this._options=n}get actions(){const e=[],t=this._menuService.createMenu(this.item.submenu,this._contextKeyService),i=t.getActions(this._options);t.dispose();for(const[,t]of i)t.length>0&&(e.push(...t),e.push(new n.Z0));return e.length&&e.pop(),e}}let b=class e{constructor(t,i,n,o,r){var s;if(this._commandService=r,this.id=t.id,this.label=(null==n?void 0:n.renderShortTitle)&&t.shortTitle?"string"==typeof t.shortTitle?t.shortTitle:t.shortTitle.value:"string"==typeof t.title?t.title:t.title.value,this.tooltip=null!==(s=t.tooltip)&&void 0!==s?s:"",this.enabled=!t.precondition||o.contextMatchesRules(t.precondition),this.checked=!1,t.toggled){const e=t.toggled.condition?t.toggled:{condition:t.toggled};this.checked=o.contextMatchesRules(e.condition),this.checked&&e.tooltip&&(this.tooltip="string"==typeof e.tooltip?e.tooltip:e.tooltip.value),e.title&&(this.label="string"==typeof e.title?e.title:e.title.value)}this.item=t,this.alt=i?new e(i,void 0,n,o,r):void 0,this._options=n,c.kS.isThemeIcon(t.icon)&&(this.class=d.dT.asClassName(t.icon))}dispose(){}run(...e){var t,i;let n=[];return(null===(t=this._options)||void 0===t?void 0:t.arg)&&(n=[...n,this._options.arg]),(null===(i=this._options)||void 0===i?void 0:i.shouldForwardArgs)&&(n=[...n,...e]),this._commandService.executeCommand(this.id,...n)}};b=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([g(3,r.i6),g(4,s.H)],b)},4972:(e,t,i)=>{"use strict";i.d(t,{p:()=>n});const n=(0,i(2065).yh)("clipboardService")},4565:(e,t,i)=>{"use strict";i.d(t,{H:()=>c,P:()=>u});var n=i(5976),o=i(8401),r=i(2065),s=i(4669),a=i(1741),l=i(3725);const c=(0,r.yh)("commandService"),u=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new s.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(e,t){if(!e)throw new Error("invalid command");if("string"==typeof e){if(!t)throw new Error("invalid command");return this.registerCommand({id:e,handler:t})}if(e.description){const t=[];for(let i of e.description.args)t.push(i.constraint);const i=e.handler;e.handler=function(e,...n){return(0,o.D8)(n,t),i(e,...n)}}const{id:i}=e;let r=this._commands.get(i);r||(r=new a.S,this._commands.set(i,r));let s=r.unshift(e),l=(0,n.OF)((()=>{s();const e=this._commands.get(i);(null==e?void 0:e.isEmpty())&&this._commands.delete(i)}));return this._onDidRegisterCommand.fire(i),l}registerCommandAlias(e,t){return u.registerCommand(e,((e,...i)=>e.get(c).executeCommand(t,...i)))}getCommand(e){const t=this._commands.get(e);if(t&&!t.isEmpty())return l.$.first(t)}getCommands(){const e=new Map;for(const t of this._commands.keys()){const i=this.getCommand(t);i&&e.set(t,i)}return e}};u.registerCommand("noop",(()=>{}))},3108:(e,t,i)=>{"use strict";i.d(t,{Ui:()=>s,Od:()=>a,KV:()=>l,xL:()=>c,Mt:()=>h,MR:()=>d,O4:()=>g});var n=i(9872),o=i(2065),r=i(3193);const s=(0,o.yh)("configurationService");function a(e,t){const i=Object.create(null);for(let n in e)l(i,n,e[n],t);return i}function l(e,t,i,n){const o=t.split("."),r=o.pop();let s=e;for(let e=0;econsole.error(`Conflict in default settings: ${e}`)));return e}},3193:(e,t,i)=>{"use strict";i.d(t,{IP:()=>l,G1:()=>_,Uh:()=>v});var n=i(3580),o=i(4669),r=i(9872),s=i(8401),a=i(1294);const l={Configuration:"base.contributions.configuration"},c={properties:{},patternProperties:{}},u={properties:{},patternProperties:{}},h={properties:{},patternProperties:{}},d={properties:{},patternProperties:{}},g={properties:{},patternProperties:{}},f={properties:{},patternProperties:{}},p="vscode://schemas/settings/resourceLanguage",m=r.B.as(a.I.JSONContribution),_=new RegExp("\\[.*\\]$");function v(e){return e.substring(1,e.length-1)}const b=new class{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new o.Q5,this._onDidUpdateConfiguration=new o.Q5,this.defaultValues={},this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:n.N("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting",allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.excludedConfigurationProperties={},m.registerSchema(p,this.resourceLanguageSettingsSchema)}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const i=[];e.forEach((e=>{i.push(...this.validateAndRegisterProperties(e,t,e.extensionInfo)),this.configurationContributors.push(e),this.registerJSONConfiguration(e)})),m.registerSchema(p,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(i)}registerOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}validateAndRegisterProperties(e,t=!0,i,n=3){var o;n=s.Jp(e.scope)?n:e.scope;let r=[],a=e.properties;if(a)for(let e in a){if(t&&y(e)){delete a[e];continue}const l=a[e];this.updatePropertyDefaultValue(e,l),_.test(e)?l.scope=void 0:(l.scope=s.Jp(l.scope)?n:l.scope,l.restricted=s.Jp(l.restricted)?!!(null===(o=null==i?void 0:i.restrictedConfigurations)||void 0===o?void 0:o.includes(e)):l.restricted),!a[e].hasOwnProperty("included")||a[e].included?(this.configurationProperties[e]=a[e],!a[e].deprecationMessage&&a[e].markdownDeprecationMessage&&(a[e].deprecationMessage=a[e].markdownDeprecationMessage),r.push(e)):(this.excludedConfigurationProperties[e]=a[e],delete a[e])}let l=e.allOf;if(l)for(let e of l)r.push(...this.validateAndRegisterProperties(e,t,i,n));return r}getConfigurationProperties(){return this.configurationProperties}registerJSONConfiguration(e){const t=e=>{let i=e.properties;if(i)for(const e in i)this.updateSchema(e,i[e]);let n=e.allOf;n&&n.forEach(t)};t(e)}updateSchema(e,t){switch(c.properties[e]=t,t.scope){case 1:u.properties[e]=t;break;case 2:h.properties[e]=t;break;case 6:d.properties[e]=t;break;case 3:g.properties[e]=t;break;case 4:f.properties[e]=t;break;case 5:f.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,i={type:"object",description:n.N("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:n.N("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:p};this.updatePropertyDefaultValue(t,i),c.properties[t]=i,u.properties[t]=i,h.properties[t]=i,d.properties[t]=i,g.properties[t]=i,f.properties[t]=i}this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){let i=this.defaultValues[e];s.o8(i)&&(i=t.default),s.o8(i)&&(i=function(e){switch(Array.isArray(e)?e[0]:e){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}(t.type)),t.default=i}};function y(e){return e.trim()?_.test(e)?n.N("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",e):void 0!==b.getConfigurationProperties()[e]?n.N("config.property.duplicate","Cannot register '{0}'. This property is already registered.",e):null:n.N("config.property.empty","Cannot register an empty property")}r.B.add(l.Configuration,b)},8819:(e,t,i)=>{"use strict";i.d(t,{Ao:()=>c,uy:()=>L,i6:()=>N,Eq:()=>E});var n=i(7295),o=i(2065),r=i(1432);let s=r.WE||"";const a=new Map;a.set("false",!1),a.set("true",!0),a.set("isMac",r.dz),a.set("isLinux",r.IJ),a.set("isWindows",r.ED),a.set("isWeb",r.$L),a.set("isMacNative",r.dz&&!r.$L),a.set("isEdge",s.indexOf("Edg/")>=0),a.set("isFirefox",s.indexOf("Firefox")>=0),a.set("isChrome",s.indexOf("Chrome")>=0),a.set("isSafari",s.indexOf("Safari")>=0);const l=Object.prototype.hasOwnProperty;class c{static has(e){return g.create(e)}static equals(e,t){return f.create(e,t)}static regex(e,t){return S.create(e,t)}static not(e){return v.create(e)}static and(...e){return k.create(e)}static or(...e){return D.create(e)}static deserialize(e,t=!1){if(e)return this._deserializeOrExpression(e,t)}static _deserializeOrExpression(e,t){let i=e.split("||");return D.create(i.map((e=>this._deserializeAndExpression(e,t))))}static _deserializeAndExpression(e,t){let i=e.split("&&");return k.create(i.map((e=>this._deserializeOne(e,t))))}static _deserializeOne(e,t){if((e=e.trim()).indexOf("!=")>=0){let i=e.split("!=");return _.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf("==")>=0){let i=e.split("==");return f.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf("=~")>=0){let i=e.split("=~");return S.create(i[0].trim(),this._deserializeRegexValue(i[1],t))}if(e.indexOf(" in ")>=0){let t=e.split(" in ");return p.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(e)){const t=e.split(">=");return y.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(e)){const t=e.split(">");return b.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(e)){const t=e.split("<=");return C.create(t[0].trim(),t[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(e)){const t=e.split("<");return w.create(t[0].trim(),t[1].trim())}return/^\!\s*/.test(e)?v.create(e.substr(1).trim()):g.create(e)}static _deserializeValue(e,t){if("true"===(e=e.trim()))return!0;if("false"===e)return!1;let i=/^'([^']*)'$/.exec(e);return i?i[1].trim():e}static _deserializeRegexValue(e,t){if((0,n.m5)(e)){if(t)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let i=e.indexOf("/"),o=e.lastIndexOf("/");if(i===o||i<0){if(t)throw new Error(`bad regexp-value '${e}', missing /-enclosure`);return console.warn(`bad regexp-value '${e}', missing /-enclosure`),null}let r=e.slice(i+1,o),s="i"===e[o+1]?"i":"";try{return new RegExp(r,s)}catch(i){if(t)throw new Error(`bad regexp-value '${e}', parse error: ${i}`);return console.warn(`bad regexp-value '${e}', parse error: ${i}`),null}}}function u(e,t){return e.cmp(t)}class h{constructor(){this.type=0}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}evaluate(e){return!1}serialize(){return"false"}keys(){return[]}negate(){return d.INSTANCE}}h.INSTANCE=new h;class d{constructor(){this.type=1}cmp(e){return this.type-e.type}equals(e){return e.type===this.type}evaluate(e){return!0}serialize(){return"true"}keys(){return[]}negate(){return h.INSTANCE}}d.INSTANCE=new d;class g{constructor(e){this.key=e,this.type=2}static create(e){const t=a.get(e);return"boolean"==typeof t?t?d.INSTANCE:h.INSTANCE:new g(e)}cmp(e){return e.type!==this.type?this.type-e.type:A(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return v.create(this.key)}}class f{constructor(e,t){this.key=e,this.value=t,this.type=4}static create(e,t){if("boolean"==typeof t)return t?g.create(e):v.create(e);const i=a.get(e);return"boolean"==typeof i?t===(i?"true":"false")?d.INSTANCE:h.INSTANCE:new f(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:M(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}evaluate(e){return e.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return _.create(this.key,this.value)}}class p{constructor(e,t){this.key=e,this.valueKey=t,this.type=10}static create(e,t){return new p(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:M(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type&&this.key===e.key&&this.valueKey===e.valueKey}evaluate(e){const t=e.getValue(this.valueKey),i=e.getValue(this.key);return Array.isArray(t)?t.indexOf(i)>=0:"string"==typeof i&&"object"==typeof t&&null!==t&&l.call(t,i)}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return m.create(this)}}class m{constructor(e){this._actual=e,this.type=11}static create(e){return new m(e)}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class _{constructor(e,t){this.key=e,this.value=t,this.type=5}static create(e,t){if("boolean"==typeof t)return t?v.create(e):g.create(e);const i=a.get(e);return"boolean"==typeof i?t===(i?"true":"false")?h.INSTANCE:d.INSTANCE:new _(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:M(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}evaluate(e){return e.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return f.create(this.key,this.value)}}class v{constructor(e){this.key=e,this.type=3}static create(e){const t=a.get(e);return"boolean"==typeof t?t?h.INSTANCE:d.INSTANCE:new v(e)}cmp(e){return e.type!==this.type?this.type-e.type:A(this.key,e.key)}equals(e){return e.type===this.type&&this.key===e.key}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return g.create(this.key)}}class b{constructor(e,t){this.key=e,this.value=t,this.type=12}static create(e,t){return new b(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:M(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}evaluate(e){return parseFloat(e.getValue(this.key))>parseFloat(this.value)}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return C.create(this.key,this.value)}}class y{constructor(e,t){this.key=e,this.value=t,this.type=13}static create(e,t){return new y(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:M(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}evaluate(e){return parseFloat(e.getValue(this.key))>=parseFloat(this.value)}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return w.create(this.key,this.value)}}class w{constructor(e,t){this.key=e,this.value=t,this.type=14}static create(e,t){return new w(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:M(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type&&this.key===e.key&&this.value===e.value}evaluate(e){return parseFloat(e.getValue(this.key))e.key)return 1;const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return ti?1:0}equals(e){if(e.type===this.type){const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return this.key===e.key&&t===i}return!1}evaluate(e){let t=e.getValue(this.key);return!!this.regexp&&this.regexp.test(t)}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return x.create(this)}}class x{constructor(e){this._actual=e,this.type=8}static create(e){return new x(e)}cmp(e){return e.type!==this.type?this.type-e.type:this._actual.cmp(e._actual)}equals(e){return e.type===this.type&&this._actual.equals(e._actual)}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class k{constructor(e){this.expr=e,this.type=6}static create(e){return k._normalizeArr(e)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,i=this.expr.length;t1;){const e=t[t.length-1];if(9!==e.type)break;t.pop();const i=t.pop(),n=D.create(e.expr.map((e=>k.create([e,i]))));n&&(t.push(n),t.sort(u))}return 1===t.length?t[0]:new k(t)}}serialize(){return this.expr.map((e=>e.serialize())).join(" && ")}keys(){const e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){let e=[];for(let t of this.expr)e.push(t.negate());return D.create(e)}}class D{constructor(e){this.expr=e,this.type=9}static create(e){const t=D._normalizeArr(e);if(0!==t.length)return 1===t.length?t[0]:new D(t)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.lengthe.expr.length)return 1;for(let t=0,i=this.expr.length;te.serialize())).join(" || ")}keys(){const e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){let e=[];for(let t of this.expr)e.push(t.negate());const t=e=>9===e.type?e.expr:[e];for(;e.length>1;){const i=e.shift(),n=e.shift(),o=[];for(const e of t(i))for(const i of t(n))o.push(c.and(e,i));e.unshift(c.or(...o))}return e[0]}}class L extends g{constructor(e,t,i){super(e),this._defaultValue=t,"object"==typeof i?L._info.push(Object.assign(Object.assign({},i),{key:e})):!0!==i&&L._info.push({key:e,description:i,type:null!=t?typeof t:void 0})}static all(){return L._info.values()}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return c.not(this.key)}isEqualTo(e){return c.equals(this.key,e)}}L._info=[];const N=(0,o.yh)("contextKeyService"),E="setContext";function A(e,t){return et?1:0}function M(e,t,i,n){return ei?1:tn?1:0}},9282:(e,t,i)=>{"use strict";i.d(t,{c:()=>s,d:()=>a});var n=i(3580),o=i(8819),r=i(1432);const s=new o.uy("isWindows",r.ED,(0,n.N)("isWindows","Whether the operating system is Windows")),a="inputFocus"},5606:(e,t,i)=>{"use strict";i.d(t,{u:()=>o,i:()=>r});var n=i(2065);const o=(0,n.yh)("contextViewService"),r=(0,n.yh)("contextMenuService")},8820:(e,t,i)=>{"use strict";i.d(t,{S:()=>n});const n=(0,i(2065).yh)("dialogService")},7108:(e,t,i)=>{"use strict";i.d(t,{M:()=>n});class n{constructor(e,t=[],i=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=i}}},5026:(e,t,i)=>{"use strict";i.d(t,{z:()=>r,d:()=>s});var n=i(7108);const o=[];function r(e,t,i){t instanceof n.M||(t=new n.M(t,[],i)),o.push([e,t])}function s(){return o}},2065:(e,t,i)=>{"use strict";var n;i.d(t,{I8:()=>n,TG:()=>o,yh:()=>s,jt:()=>a}),function(e){e.serviceIds=new Map,e.DI_TARGET="$di$target",e.DI_DEPENDENCIES="$di$dependencies",e.getServiceDependencies=function(t){return t[e.DI_DEPENDENCIES]||[]}}(n||(n={}));const o=s("instantiationService");function r(e,t,i,o){t[n.DI_TARGET]===t?t[n.DI_DEPENDENCIES].push({id:e,index:i,optional:o}):(t[n.DI_DEPENDENCIES]=[{id:e,index:i,optional:o}],t[n.DI_TARGET]=t)}function s(e){if(n.serviceIds.has(e))return n.serviceIds.get(e);const t=function(e,i,n){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");r(t,e,n,!1)};return t.toString=()=>e,n.serviceIds.set(e,t),t}function a(e){return function(t,i,n){if(3!==arguments.length)throw new Error("@optional-decorator can only be used to decorate a parameter");r(e,t,n,!0)}}},972:(e,t,i)=>{"use strict";i.d(t,{y:()=>n});class n{constructor(...e){this._entries=new Map;for(let[t,i]of e)this.set(t,i)}set(e,t){const i=this._entries.get(e);return this._entries.set(e,t),i}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}}},1294:(e,t,i)=>{"use strict";i.d(t,{I:()=>r});var n=i(9872),o=i(4669);const r={JSONContribution:"base.contributions.json"},s=new class{constructor(){this._onDidChangeSchema=new o.Q5,this.schemasById={}}registerSchema(e,t){var i;this.schemasById[(i=e,i.length>0&&"#"===i.charAt(i.length-1)?i.substring(0,i.length-1):i)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}};n.B.add(r.JSONContribution,s)},1847:(e,t,i)=>{"use strict";i.d(t,{d:()=>n});const n=(0,i(2065).yh)("keybindingService")},9989:(e,t,i)=>{"use strict";i.d(t,{W:()=>l});var n=i(2258),o=i(1432),r=i(4565),s=i(9872);class a{constructor(){this._coreKeybindings=[],this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(1===o.OS){if(e&&e.win)return e.win}else if(2===o.OS){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){const t=a.bindToCurrentPlatform(e);if(t&&t.primary){const i=(0,n.gm)(t.primary,o.OS);i&&this._registerDefaultKeybinding(i,e.id,e.args,e.weight,0,e.when)}if(t&&Array.isArray(t.secondary))for(let i=0,r=t.secondary.length;i=21&&e<=30||e>=31&&e<=56||80===e||81===e||82===e||83===e||84===e||85===e||86===e||110===e||111===e||87===e||88===e||89===e||90===e||91===e||92===e}_assertNoCtrlAlt(e,t){e.ctrlKey&&e.altKey&&!e.metaKey&&a._mightProduceChar(e.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",e," for ",t)}_registerDefaultKeybinding(e,t,i,n,r,s){1===o.OS&&this._assertNoCtrlAlt(e.parts[0],t),this._coreKeybindings.push({keybinding:e,command:t,commandArgs:i,when:s,weight1:n,weight2:r,extensionId:null,isBuiltinExtension:!1}),this._cachedMergedKeybindings=null}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=[].concat(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(c)),this._cachedMergedKeybindings.slice(0)}}const l=new a;function c(e,t){return e.weight1!==t.weight1?e.weight1-t.weight1:e.commandt.command?1:e.weight2-t.weight2}s.B.add("platform.keybindingsRegistry",l)},4349:(e,t,i)=>{"use strict";i.d(t,{e:()=>n});const n=(0,i(2065).yh)("labelService")},343:(e,t,i)=>{"use strict";i.d(t,{Lw:()=>je,XN:()=>qe,ls:()=>Nt,ev:()=>_t,CQ:()=>Ye});var n=i(5321),o=i(5976),r=i(9488),s=i(3799),a=i(4669),l=i(1050);class c{constructor(e,t){this.renderer=e,this.modelProvider=t}get templateId(){return this.renderer.templateId}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:o.JT.None}}renderElement(e,t,i,n){if(i.disposable&&i.disposable.dispose(),!i.data)return;const o=this.modelProvider();if(o.isResolved(e))return this.renderer.renderElement(o.get(e),e,i.data,n);const r=new l.A,s=o.resolve(e,r.token);i.disposable={dispose:()=>r.cancel()},this.renderer.renderPlaceholder(e,i.data),s.then((t=>this.renderer.renderElement(t,e,i.data,n)))}disposeTemplate(e){e.disposable&&(e.disposable.dispose(),e.disposable=void 0),e.data&&(this.renderer.disposeTemplate(e.data),e.data=void 0)}}class u{constructor(e,t){this.modelProvider=e,this.accessibilityProvider=t}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(e){const t=this.modelProvider();return t.isResolved(e)?this.accessibilityProvider.getAriaLabel(t.get(e)):null}}var h,d=i(3580),g=i(3108),f=i(3193),p=i(8819),m=i(2065),_=i(1847),v=i(9872),b=i(8810),y=i(7781),w=i(9282),C=i(3725),S=i(9069);!function(e){e[e.Unknown=0]="Unknown",e[e.Twistie=1]="Twistie",e[e.Element=2]="Element"}(h||(h={}));class x extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class k{constructor(e){this.fn=e,this._map=new WeakMap}map(e){let t=this._map.get(e);return t||(t=this.fn(e),this._map.set(e,t)),t}}var D=i(3547),L=i(5707),N=i(4850),E=i(5392),A=i(2484);function M(e){return"object"==typeof e&&"visibility"in e&&"data"in e}function I(e){switch(e){case!0:return 1;case!1:return 0;default:return e}}function T(e){return"boolean"==typeof e.collapsible}class R{constructor(e,t,i,n={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new a.E7,this._onDidChangeCollapseState=new a.Q5,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new a.Q5,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new a.Q5,this.onDidSplice=this._onDidSplice.event,this.collapseByDefault=void 0!==n.collapseByDefault&&n.collapseByDefault,this.filter=n.filter,this.autoExpandSingleChildren=void 0!==n.autoExpandSingleChildren&&n.autoExpandSingleChildren,this.root={parent:void 0,element:i,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(e,t,i=C.$.empty(),n={}){if(0===e.length)throw new x(this.user,"Invalid tree location");n.diffIdentityProvider?this.spliceSmart(n.diffIdentityProvider,e,t,i,n):this.spliceSimple(e,t,i,n)}spliceSmart(e,t,i,n,o,r){var s;void 0===n&&(n=C.$.empty()),void 0===r&&(r=null!==(s=o.diffDepth)&&void 0!==s?s:0);const{parentNode:a}=this.getParentNodeWithListIndex(t),l=[...n],c=t[t.length-1],u=new A.Hs({getElements:()=>a.children.map((t=>e.getId(t.element).toString()))},{getElements:()=>[...a.children.slice(0,c),...l,...a.children.slice(c+i)].map((t=>e.getId(t.element).toString()))}).ComputeDiff(!1);if(u.quitEarly)return this.spliceSimple(t,i,l,o);const h=t.slice(0,-1),d=(t,i,n)=>{if(r>0)for(let s=0;st.originalStart-e.originalStart)))d(g,f,g-(e.originalStart+e.originalLength)),g=e.originalStart,f=e.modifiedStart-c,this.spliceSimple([...h,g],e.originalLength,C.$.slice(l,f,f+e.modifiedLength),o);d(g,f,g)}spliceSimple(e,t,i=C.$.empty(),{onDidCreateNode:n,onDidDeleteNode:o}){const{parentNode:r,listIndex:s,revealed:a,visible:l}=this.getParentNodeWithListIndex(e),c=[],u=C.$.map(i,(e=>this.createTreeNode(e,r,r.visible?1:0,a,c,n))),h=e[e.length-1],d=r.children.length>0;let g=0;for(let e=h;e>=0&&ee+(t.visible?t.renderNodeCount:0)),0);this._updateAncestorsRenderNodeCount(r,m-e),this.list.splice(s,e,c)}if(_.length>0&&o){const e=t=>{o(t),t.children.forEach(e)};_.forEach(e)}const b=r.children.length>0;d!==b&&this.setCollapsible(e.slice(0,-1),b),this._onDidSplice.fire({insertedNodes:f,deletedNodes:_});let y=r;for(;y;){if(2===y.visibility){this.refilter();break}y=y.parent}}rerender(e){if(0===e.length)throw new x(this.user,"Invalid tree location");const{node:t,listIndex:i,revealed:n}=this.getTreeNodeWithListIndex(e);t.visible&&n&&this.list.splice(i,1,[t])}has(e){return this.hasTreeNode(e)}getListIndex(e){const{listIndex:t,visible:i,revealed:n}=this.getTreeNodeWithListIndex(e);return i&&n?t:-1}getListRenderCount(e){return this.getTreeNode(e).renderNodeCount}isCollapsible(e){return this.getTreeNode(e).collapsible}setCollapsible(e,t){const i=this.getTreeNode(e);void 0===t&&(t=!i.collapsible);const n={collapsible:t};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,n)))}isCollapsed(e){return this.getTreeNode(e).collapsed}setCollapsed(e,t,i){const n=this.getTreeNode(e);void 0===t&&(t=!n.collapsed);const o={collapsed:t,recursive:i||!1};return this.eventBufferer.bufferEvents((()=>this._setCollapseState(e,o)))}_setCollapseState(e,t){const{node:i,listIndex:n,revealed:o}=this.getTreeNodeWithListIndex(e),r=this._setListNodeCollapseState(i,n,o,t);if(i!==this.root&&this.autoExpandSingleChildren&&r&&!T(t)&&i.collapsible&&!i.collapsed&&!t.recursive){let n=-1;for(let e=0;e-1){n=-1;break}n=e}n>-1&&this._setCollapseState([...e,n],t)}return r}_setListNodeCollapseState(e,t,i,n){const o=this._setNodeCollapseState(e,n,!1);if(!i||!e.visible||!o)return o;const r=e.renderNodeCount,s=this.updateNodeAfterCollapseChange(e),a=r-(-1===t?0:1);return this.list.splice(t+1,a,s.slice(1)),o}_setNodeCollapseState(e,t,i){let n;if(e===this.root?n=!1:(T(t)?(n=e.collapsible!==t.collapsible,e.collapsible=t.collapsible):e.collapsible?(n=e.collapsed!==t.collapsed,e.collapsed=t.collapsed):n=!1,n&&this._onDidChangeCollapseState.fire({node:e,deep:i})),!T(t)&&t.recursive)for(const i of e.children)n=this._setNodeCollapseState(i,t,!0)||n;return n}expandTo(e){this.eventBufferer.bufferEvents((()=>{let t=this.getTreeNode(e);for(;t.parent;)t=t.parent,e=e.slice(0,e.length-1),t.collapsed&&this._setCollapseState(e,{collapsed:!1,recursive:!1})}))}refilter(){const e=this.root.renderNodeCount,t=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,e,t)}createTreeNode(e,t,i,n,o,r){const s={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:"boolean"==typeof e.collapsible?e.collapsible:void 0!==e.collapsed,collapsed:void 0===e.collapsed?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},a=this._filterNode(s,i);s.visibility=a,n&&o.push(s);const l=e.children||C.$.empty(),c=n&&0!==a&&!s.collapsed,u=C.$.map(l,(e=>this.createTreeNode(e,s,a,c,o,r)));let h=0,d=1;for(const e of u)s.children.push(e),d+=e.renderNodeCount,e.visible&&(e.visibleChildIndex=h++);return s.collapsible=s.collapsible||s.children.length>0,s.visibleChildrenCount=h,s.visible=2===a?h>0:1===a,s.visible?s.collapsed||(s.renderNodeCount=d):(s.renderNodeCount=0,n&&o.pop()),r&&r(s),s}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(e,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterCollapseChange(e,t){if(!1===e.visible)return 0;if(t.push(e),e.renderNodeCount=1,!e.collapsed)for(const i of e.children)e.renderNodeCount+=this._updateNodeAfterCollapseChange(i,t);return this._onDidChangeRenderNodeCount.fire(e),e.renderNodeCount}updateNodeAfterFilterChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterFilterChange(e,e.visible?1:0,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterFilterChange(e,t,i,n=!0){let o;if(e!==this.root){if(o=this._filterNode(e,t),0===o)return e.visible=!1,e.renderNodeCount=0,!1;n&&i.push(e)}const r=i.length;e.renderNodeCount=e===this.root?0:1;let s=!1;if(e.collapsed&&0===o)e.visibleChildrenCount=0;else{let t=0;for(const r of e.children)s=this._updateNodeAfterFilterChange(r,o,i,n&&!e.collapsed)||s,r.visible&&(r.visibleChildIndex=t++);e.visibleChildrenCount=t}return e!==this.root&&(e.visible=2===o?s:1===o),e.visible?e.collapsed||(e.renderNodeCount+=i.length-r):(e.renderNodeCount=0,n&&i.pop()),this._onDidChangeRenderNodeCount.fire(e),e.visible}_updateAncestorsRenderNodeCount(e,t){if(0!==t)for(;e;)e.renderNodeCount+=t,this._onDidChangeRenderNodeCount.fire(e),e=e.parent}_filterNode(e,t){const i=this.filter?this.filter.filter(e.element,t):1;return"boolean"==typeof i?(e.filterData=void 0,i?1:0):M(i)?(e.filterData=i.data,I(i.visibility)):(e.filterData=void 0,I(i))}hasTreeNode(e,t=this.root){if(!e||0===e.length)return!0;const[i,...n]=e;return!(i<0||i>t.children.length)&&this.hasTreeNode(n,t.children[i])}getTreeNode(e,t=this.root){if(!e||0===e.length)return t;const[i,...n]=e;if(i<0||i>t.children.length)throw new x(this.user,"Invalid tree location");return this.getTreeNode(n,t.children[i])}getTreeNodeWithListIndex(e){if(0===e.length)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:t,listIndex:i,revealed:n,visible:o}=this.getParentNodeWithListIndex(e),r=e[e.length-1];if(r<0||r>t.children.length)throw new x(this.user,"Invalid tree location");const s=t.children[r];return{node:s,listIndex:i,revealed:n,visible:o&&s.visible}}getParentNodeWithListIndex(e,t=this.root,i=0,n=!0,o=!0){const[r,...s]=e;if(r<0||r>t.children.length)throw new x(this.user,"Invalid tree location");for(let e=0;ee.element))),this.data=e}}function q(e){return e instanceof L.kX?new j(e):e}class K{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=o.JT.None}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(q(e),t)}onDragOver(e,t,i,n,o=!0){const s=this.dnd.onDragOver(q(e),t&&t.element,i,n),a=this.autoExpandNode!==t;if(a&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),void 0===t)return s;if(a&&"boolean"!=typeof s&&s.autoExpand&&(this.autoExpandDisposable=(0,O.Vg)((()=>{const e=this.modelProvider(),i=e.getNodeLocation(t);e.isCollapsed(i)&&e.setCollapsed(i,!1),this.autoExpandNode=void 0}),500)),"boolean"==typeof s||!s.accept||void 0===s.bubble||s.feedback)return o?s:{accept:"boolean"==typeof s?s:s.accept,effect:"boolean"==typeof s?void 0:s.effect,feedback:[i]};if(1===s.bubble){const i=this.modelProvider(),o=i.getNodeLocation(t),r=i.getParentNodeLocation(o),s=i.getNode(r),a=r&&i.getListIndex(r);return this.onDragOver(e,s,a,n,!1)}const l=this.modelProvider(),c=l.getNodeLocation(t),u=l.getListIndex(c),h=l.getListRenderCount(c);return Object.assign(Object.assign({},s),{feedback:(0,r.w6)(u,u+h)})}drop(e,t,i,n){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(q(e),t&&t.element,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}class G{constructor(e){this.delegate=e}getHeight(e){return this.delegate.getHeight(e.element)}getTemplateId(e){return this.delegate.getTemplateId(e.element)}hasDynamicHeight(e){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(e.element)}setDynamicHeight(e,t){this.delegate.setDynamicHeight&&this.delegate.setDynamicHeight(e.element,t)}}var Y;!function(e){e.None="none",e.OnHover="onHover",e.Always="always"}(Y||(Y={}));class Z{constructor(e,t=[]){this._elements=t,this.onDidChange=a.ju.forEach(e,(e=>this._elements=e))}get elements(){return this._elements}}class X{constructor(e,t,i,n,r={}){this.renderer=e,this.modelProvider=t,this.activeNodes=n,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=X.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new B.r,this.activeIndentNodes=new Set,this.indentGuidesDisposable=o.JT.None,this.disposables=new o.SL,this.templateId=e.templateId,this.updateOptions(r),a.ju.map(i,(e=>e.node))(this.onDidChangeNodeTwistieState,this,this.disposables),e.onDidChangeTwistieState&&e.onDidChangeTwistieState(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(void 0!==e.indent&&(this.indent=(0,P.u)(e.indent,0,40)),void 0!==e.renderIndentGuides){const t=e.renderIndentGuides!==Y.None;if(t!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=t,this.indentGuidesDisposable.dispose(),t)){const e=new o.SL;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,e),this.indentGuidesDisposable=e,this._onDidChangeActiveNodes(this.activeNodes.elements)}}void 0!==e.hideTwistiesOfChildlessElements&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=(0,n.R3)(e,(0,n.$)(".monaco-tl-row")),i=(0,n.R3)(t,(0,n.$)(".monaco-tl-indent")),r=(0,n.R3)(t,(0,n.$)(".monaco-tl-twistie")),s=(0,n.R3)(t,(0,n.$)(".monaco-tl-contents")),a=this.renderer.renderTemplate(s);return{container:e,indent:i,twistie:r,indentGuidesDisposable:o.JT.None,templateData:a}}renderElement(e,t,i,n){"number"==typeof n&&(this.renderedNodes.set(e,{templateData:i,height:n}),this.renderedElements.set(e.element,e));const o=X.DefaultIndent+(e.depth-1)*this.indent;i.twistie.style.paddingLeft=`${o}px`,i.indent.style.width=o+this.indent-16+"px",this.renderTwistie(e,i),"number"==typeof n&&this.renderIndentGuides(e,i),this.renderer.renderElement(e,t,i.templateData,n)}disposeElement(e,t,i,n){i.indentGuidesDisposable.dispose(),this.renderer.disposeElement&&this.renderer.disposeElement(e,t,i.templateData,n),"number"==typeof n&&(this.renderedNodes.delete(e),this.renderedElements.delete(e.element))}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}onDidChangeTwistieState(e){const t=this.renderedElements.get(e);t&&this.onDidChangeNodeTwistieState(t)}onDidChangeNodeTwistieState(e){const t=this.renderedNodes.get(e);t&&(this.renderTwistie(e,t.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(e,t.templateData))}renderTwistie(e,t){t.twistie.classList.remove(...W.classNamesArray);let i=!1;this.renderer.renderTwistie&&(i=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(i||t.twistie.classList.add(...W.classNamesArray),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded")}renderIndentGuides(e,t){if((0,n.PO)(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const i=new o.SL,r=this.modelProvider();let s=e;for(;;){const e=r.getNodeLocation(s),a=r.getParentNodeLocation(e);if(!a)break;const l=r.getNode(a),c=(0,n.$)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(l)&&c.classList.add("active"),0===t.indent.childElementCount?t.indent.appendChild(c):t.indent.insertBefore(c,t.indent.firstElementChild),this.renderedIndentGuides.add(l,c),i.add((0,o.OF)((()=>this.renderedIndentGuides.delete(l,c)))),s=l}t.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,i=this.modelProvider();e.forEach((e=>{const n=i.getNodeLocation(e);try{const o=i.getParentNodeLocation(n);e.collapsible&&e.children.length>0&&!e.collapsed?t.add(e):o&&t.add(i.getNode(o))}catch(e){}})),this.activeIndentNodes.forEach((e=>{t.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.remove("active")))})),t.forEach((e=>{this.activeIndentNodes.has(e)||this.renderedIndentGuides.forEach(e,(e=>e.classList.add("active")))})),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),(0,o.B9)(this.disposables)}}X.DefaultIndent=8;class Q{constructor(e,t,i){this.tree=e,this.keyboardNavigationLabelProvider=t,this._filter=i,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new o.SL,e.onWillRefilter(this.reset,this,this.disposables)}get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set pattern(e){this._pattern=e,this._lowercasePattern=e.toLowerCase()}filter(e,t){if(this._filter){const i=this._filter.filter(e,t);if(this.tree.options.simpleKeyboardNavigation)return i;let n;if(n="boolean"==typeof i?i?1:0:M(i)?I(i.visibility):i,0===n)return!1}if(this._totalCount++,this.tree.options.simpleKeyboardNavigation||!this._pattern)return this._matchCount++,{data:E.CL.Default,visibility:!0};const i=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),n=Array.isArray(i)?i:[i];for(const e of n){const t=e&&e.toString();if(void 0===t)return{data:E.CL.Default,visibility:!0};const i=(0,E.EW)(this._pattern,this._lowercasePattern,0,t,t.toLowerCase(),0,!0);if(i)return this._matchCount++,1===n.length?{data:i,visibility:!0}:{data:{label:t,score:i},visibility:!0}}return this.tree.options.filterOnType?2:{data:E.CL.Default,visibility:!0}}reset(){this._totalCount=0,this._matchCount=0}dispose(){(0,o.B9)(this.disposables)}}class J{constructor(e,t,i,r,s){this.tree=e,this.view=i,this.filter=r,this.keyboardNavigationDelegate=s,this._enabled=!1,this._pattern="",this._empty=!1,this._onDidChangeEmptyState=new a.Q5,this.positionClassName="ne",this.automaticKeyboardNavigation=!0,this.triggered=!1,this._onDidChangePattern=new a.Q5,this.enabledDisposables=new o.SL,this.disposables=new o.SL,this.domNode=(0,n.$)(`.monaco-list-type-filter.${this.positionClassName}`),this.domNode.draggable=!0,(0,N.jt)(this.domNode,"dragstart")(this.onDragStart,this,this.disposables),this.messageDomNode=(0,n.R3)(i.getHTMLElement(),(0,n.$)(".monaco-list-type-filter-message")),this.labelDomNode=(0,n.R3)(this.domNode,(0,n.$)("span.label"));const l=(0,n.R3)(this.domNode,(0,n.$)(".controls"));this._filterOnType=!!e.options.filterOnType,this.filterOnTypeDomNode=(0,n.R3)(l,(0,n.$)("input.filter")),this.filterOnTypeDomNode.type="checkbox",this.filterOnTypeDomNode.checked=this._filterOnType,this.filterOnTypeDomNode.tabIndex=-1,this.updateFilterOnTypeTitleAndIcon(),(0,N.jt)(this.filterOnTypeDomNode,"input")(this.onDidChangeFilterOnType,this,this.disposables),this.clearDomNode=(0,n.R3)(l,(0,n.$)("button.clear"+$.cssSelector)),this.clearDomNode.tabIndex=-1,this.clearDomNode.title=(0,d.N)("clear","Clear"),this.keyboardNavigationEventFilter=e.options.keyboardNavigationEventFilter,t.onDidSplice(this.onDidSpliceModel,this,this.disposables),this.updateOptions(e.options)}get enabled(){return this._enabled}get pattern(){return this._pattern}get filterOnType(){return this._filterOnType}updateOptions(e){e.simpleKeyboardNavigation?this.disable():this.enable(),void 0!==e.filterOnType&&(this._filterOnType=!!e.filterOnType,this.filterOnTypeDomNode.checked=this._filterOnType,this.updateFilterOnTypeTitleAndIcon()),void 0!==e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation),this.tree.refilter(),this.render(),this.automaticKeyboardNavigation||this.onEventOrInput("")}enable(){if(this._enabled)return;const e=a.ju.chain((0,N.jt)(this.view.getHTMLElement(),"keydown")).filter((e=>!(0,s.cK)(e.target)||e.target===this.filterOnTypeDomNode)).filter((e=>"Dead"!==e.key&&!/^Media/.test(e.key))).map((e=>new S.y(e))).filter(this.keyboardNavigationEventFilter||(()=>!0)).filter((()=>this.automaticKeyboardNavigation||this.triggered)).filter((e=>this.keyboardNavigationDelegate.mightProducePrintableCharacter(e)&&!(18===e.keyCode||16===e.keyCode||15===e.keyCode||17===e.keyCode)||(this.pattern.length>0||this.triggered)&&(9===e.keyCode||1===e.keyCode)&&!e.altKey&&!e.ctrlKey&&!e.metaKey||1===e.keyCode&&(F.dz?e.altKey&&!e.metaKey:e.ctrlKey)&&!e.shiftKey)).forEach((e=>{e.stopPropagation(),e.preventDefault()})).event,t=(0,N.jt)(this.clearDomNode,"click");a.ju.chain(a.ju.any(e,t)).event(this.onEventOrInput,this,this.enabledDisposables),this.filter.pattern="",this.tree.refilter(),this.render(),this._enabled=!0,this.triggered=!1}disable(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.clear(),this.tree.refilter(),this.render(),this._enabled=!1,this.triggered=!1)}onEventOrInput(e){"string"==typeof e?this.onInput(e):e instanceof MouseEvent||9===e.keyCode||1===e.keyCode&&(F.dz?e.altKey:e.ctrlKey)?this.onInput(""):1===e.keyCode?this.onInput(0===this.pattern.length?"":this.pattern.substr(0,this.pattern.length-1)):this.onInput(this.pattern+e.browserEvent.key)}onInput(e){const t=this.view.getHTMLElement();e&&!this.domNode.parentElement?t.append(this.domNode):!e&&this.domNode.parentElement&&(this.domNode.remove(),this.tree.domFocus()),this._pattern=e,this._onDidChangePattern.fire(e),this.filter.pattern=e,this.tree.refilter(),e&&this.tree.focusNext(0,!0,void 0,(e=>!E.CL.isDefault(e.filterData)));const i=this.tree.getFocus();if(i.length>0){const e=i[0];null===this.tree.getRelativeTop(e)&&this.tree.reveal(e,.5)}this.render(),e||(this.triggered=!1)}onDragStart(){const e=this.view.getHTMLElement(),{left:t}=(0,n.i)(e),i=e.clientWidth,r=i/2,s=this.domNode.clientWidth,a=new o.SL;let l=this.positionClassName;const c=()=>{switch(l){case"nw":this.domNode.style.top="4px",this.domNode.style.left="4px";break;case"ne":this.domNode.style.top="4px",this.domNode.style.left=i-s-6+"px"}};c(),this.domNode.classList.remove(l),this.domNode.classList.add("dragging"),a.add((0,o.OF)((()=>this.domNode.classList.remove("dragging")))),(0,N.jt)(document,"dragover")((e=>{e.preventDefault();const i=e.clientX-t;e.dataTransfer&&(e.dataTransfer.dropEffect="none"),l=i{this.positionClassName=l,this.domNode.className=`monaco-list-type-filter ${this.positionClassName}`,this.domNode.style.top="",this.domNode.style.left="",(0,o.B9)(a)}),null,a),D.P$.CurrentDragAndDropData=new D.TN("vscode-ui"),a.add((0,o.OF)((()=>D.P$.CurrentDragAndDropData=void 0)))}onDidSpliceModel(){this._enabled&&0!==this.pattern.length&&(this.tree.refilter(),this.render())}onDidChangeFilterOnType(){this.tree.updateOptions({filterOnType:this.filterOnTypeDomNode.checked}),this.tree.refilter(),this.tree.domFocus(),this.render(),this.updateFilterOnTypeTitleAndIcon()}updateFilterOnTypeTitleAndIcon(){this.filterOnType?(this.filterOnTypeDomNode.classList.remove(...H.classNamesArray),this.filterOnTypeDomNode.classList.add(...V.classNamesArray),this.filterOnTypeDomNode.title=(0,d.N)("disable filter on type","Disable Filter on Type")):(this.filterOnTypeDomNode.classList.remove(...V.classNamesArray),this.filterOnTypeDomNode.classList.add(...H.classNamesArray),this.filterOnTypeDomNode.title=(0,d.N)("enable filter on type","Enable Filter on Type"))}render(){const e=this.filter.totalCount>0&&0===this.filter.matchCount;this.pattern&&this.tree.options.filterOnType&&e?(this.messageDomNode.textContent=(0,d.N)("empty","No elements found"),this._empty=!0):(this.messageDomNode.innerText="",this._empty=!1),this.domNode.classList.toggle("no-matches",e),this.domNode.title=(0,d.N)("found","Matched {0} out of {1} elements",this.filter.matchCount,this.filter.totalCount),this.labelDomNode.textContent=this.pattern.length>16?"…"+this.pattern.substr(this.pattern.length-16):this.pattern,this._onDidChangeEmptyState.fire(this._empty)}shouldAllowFocus(e){return!(this.enabled&&this.pattern&&!this.filterOnType)||this.filter.totalCount>0&&this.filter.matchCount<=1||!E.CL.isDefault(e.filterData)}dispose(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.dispose(),this._enabled=!1,this.triggered=!1),this._onDidChangePattern.dispose(),(0,o.B9)(this.disposables)}}function ee(e){let t=h.Unknown;return(0,n.uU)(e.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?t=h.Twistie:(0,n.uU)(e.browserEvent.target,"monaco-tl-contents","monaco-tl-row")&&(t=h.Element),{browserEvent:e.browserEvent,element:e.element?e.element.element:null,target:t}}function te(e,t){t(e),e.children.forEach((e=>te(e,t)))}class ie{constructor(e){this.identityProvider=e,this.nodes=[],this._onDidChange=new a.Q5,this.onDidChange=this._onDidChange.event}get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}set(e,t){var i;!(null===(i=t)||void 0===i?void 0:i.__forceEvent)&&(0,r.fS)(this.nodes,e)||this._set(e,!1,t)}_set(e,t,i){if(this.nodes=[...e],this.elements=void 0,this._nodeSet=void 0,!t){const e=this;this._onDidChange.fire({get elements(){return e.get()},browserEvent:i})}}get(){return this.elements||(this.elements=this.nodes.map((e=>e.element))),[...this.elements]}getNodes(){return this.nodes}has(e){return this.nodeSet.has(e)}onDidModelSplice({insertedNodes:e,deletedNodes:t}){if(!this.identityProvider){const e=this.createNodeSet(),i=t=>e.delete(t);return t.forEach((e=>te(e,i))),void this.set([...e.values()])}const i=new Set,n=e=>i.add(this.identityProvider.getId(e.element).toString());t.forEach((e=>te(e,n)));const o=new Map,r=e=>o.set(this.identityProvider.getId(e.element).toString(),e);e.forEach((e=>te(e,r)));const s=[];for(const e of this.nodes){const t=this.identityProvider.getId(e.element).toString();if(i.has(t)){const e=o.get(t);e&&s.push(e)}else s.push(e)}this._set(s,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class ne extends s.sx{constructor(e,t){super(e),this.tree=t}onViewPointer(e){if((0,s.cK)(e.browserEvent.target)||(0,s.hD)(e.browserEvent.target))return;const t=e.element;if(!t)return super.onViewPointer(e);if(this.isSelectionRangeChangeEvent(e)||this.isSelectionSingleChangeEvent(e))return super.onViewPointer(e);const i=e.browserEvent.target,n=i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&e.browserEvent.offsetX<16;let o=!1;if(o="function"==typeof this.tree.expandOnlyOnTwistieClick?this.tree.expandOnlyOnTwistieClick(t.element):!!this.tree.expandOnlyOnTwistieClick,o&&!n&&2!==e.browserEvent.detail)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&2===e.browserEvent.detail)return super.onViewPointer(e);if(t.collapsible){const i=this.tree.model,r=i.getNodeLocation(t),s=e.browserEvent.altKey;if(this.tree.setFocus([r]),i.setCollapsed(r,void 0,s),o&&n)return}super.onViewPointer(e)}onDoubleClick(e){!e.browserEvent.target.classList.contains("monaco-tl-twistie")&&this.tree.expandOnDoubleClick&&super.onDoubleClick(e)}}class oe extends s.aV{constructor(e,t,i,n,o,r,s,a){super(e,t,i,n,a),this.focusTrait=o,this.selectionTrait=r,this.anchorTrait=s}createMouseController(e){return new ne(this,e.tree)}splice(e,t,i=[]){if(super.splice(e,t,i),0===i.length)return;const n=[],o=[];let s;i.forEach(((t,i)=>{this.focusTrait.has(t)&&n.push(e+i),this.selectionTrait.has(t)&&o.push(e+i),this.anchorTrait.has(t)&&(s=e+i)})),n.length>0&&super.setFocus((0,r.cU)([...super.getFocus(),...n])),o.length>0&&super.setSelection((0,r.cU)([...super.getSelection(),...o])),"number"==typeof s&&super.setAnchor(s)}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map((e=>this.element(e))),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map((e=>this.element(e))),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(void 0===e?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class re{constructor(e,t,i,r,l={}){this._options=l,this.eventBufferer=new a.E7,this.disposables=new o.SL,this._onWillRefilter=new a.Q5,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new a.Q5;const c=new G(i),u=new a.ZD,h=new a.ZD,d=new Z(h.event);this.renderers=r.map((e=>new X(e,(()=>this.model),u.event,d,l)));for(let e of this.renderers)this.disposables.add(e);let g;var f,p;l.keyboardNavigationLabelProvider&&(g=new Q(this,l.keyboardNavigationLabelProvider,l.filter),l=Object.assign(Object.assign({},l),{filter:g}),this.disposables.add(g)),this.focus=new ie(l.identityProvider),this.selection=new ie(l.identityProvider),this.anchor=new ie(l.identityProvider),this.view=new oe(e,t,c,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},(f=()=>this.model,(p=l)&&Object.assign(Object.assign({},p),{identityProvider:p.identityProvider&&{getId:e=>p.identityProvider.getId(e.element)},dnd:p.dnd&&new K(f,p.dnd),multipleSelectionController:p.multipleSelectionController&&{isSelectionSingleChangeEvent:e=>p.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element})),isSelectionRangeChangeEvent:e=>p.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},accessibilityProvider:p.accessibilityProvider&&Object.assign(Object.assign({},p.accessibilityProvider),{getSetSize(e){const t=f(),i=t.getNodeLocation(e),n=t.getParentNodeLocation(i);return t.getNode(n).visibleChildrenCount},getPosInSet:e=>e.visibleChildIndex+1,isChecked:p.accessibilityProvider&&p.accessibilityProvider.isChecked?e=>p.accessibilityProvider.isChecked(e.element):void 0,getRole:p.accessibilityProvider&&p.accessibilityProvider.getRole?e=>p.accessibilityProvider.getRole(e.element):()=>"treeitem",getAriaLabel:e=>p.accessibilityProvider.getAriaLabel(e.element),getWidgetAriaLabel:()=>p.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:p.accessibilityProvider&&p.accessibilityProvider.getWidgetRole?()=>p.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:p.accessibilityProvider&&p.accessibilityProvider.getAriaLevel?e=>p.accessibilityProvider.getAriaLevel(e.element):e=>e.depth,getActiveDescendantId:p.accessibilityProvider.getActiveDescendantId&&(e=>p.accessibilityProvider.getActiveDescendantId(e.element))}),keyboardNavigationLabelProvider:p.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},p.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:e=>p.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}),enableKeyboardNavigation:p.simpleKeyboardNavigation}))),{tree:this})),this.model=this.createModel(e,this.view,l),u.input=this.model.onDidChangeCollapseState;const m=a.ju.forEach(this.model.onDidSplice,(e=>{this.eventBufferer.bufferEvents((()=>{this.focus.onDidModelSplice(e),this.selection.onDidModelSplice(e)}))}));if(m((()=>null),null,this.disposables),h.input=a.ju.chain(a.ju.any(m,this.focus.onDidChange,this.selection.onDidChange)).debounce((()=>null),0).map((()=>{const e=new Set;for(const t of this.focus.getNodes())e.add(t);for(const t of this.selection.getNodes())e.add(t);return[...e.values()]})).event,!1!==l.keyboardSupport){const e=a.ju.chain(this.view.onKeyDown).filter((e=>!(0,s.cK)(e.target))).map((e=>new S.y(e)));e.filter((e=>15===e.keyCode)).on(this.onLeftArrow,this,this.disposables),e.filter((e=>17===e.keyCode)).on(this.onRightArrow,this,this.disposables),e.filter((e=>10===e.keyCode)).on(this.onSpace,this,this.disposables)}if(l.keyboardNavigationLabelProvider){const e=l.keyboardNavigationDelegate||s.WK;this.typeFilterController=new J(this,this.model,this.view,g,e),this.focusNavigationFilter=e=>this.typeFilterController.shouldAllowFocus(e),this.disposables.add(this.typeFilterController)}this.styleElement=(0,n.dS)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===Y.Always)}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return a.ju.map(this.view.onMouseDblClick,ee)}get onPointer(){return a.ju.map(this.view.onPointer,ee)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get expandOnDoubleClick(){return void 0===this._options.expandOnDoubleClick||this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return void 0===this._options.expandOnlyOnTwistieClick||this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}updateOptions(e={}){this._options=Object.assign(Object.assign({},this._options),e);for(const t of this.renderers)t.updateOptions(e);this.view.updateOptions({enableKeyboardNavigation:this._options.simpleKeyboardNavigation,automaticKeyboardNavigation:this._options.automaticKeyboardNavigation,smoothScrolling:this._options.smoothScrolling,horizontalScrolling:this._options.horizontalScrolling}),this.typeFilterController&&this.typeFilterController.updateOptions(this._options),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===Y.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}domFocus(){this.view.domFocus()}layout(e,t){this.view.layout(e,t)}style(e){const t=`.${this.view.domId}`,i=[];e.treeIndentGuidesStroke&&(i.push(`.monaco-list${t}:hover .monaco-tl-indent > .indent-guide, .monaco-list${t}.always .monaco-tl-indent > .indent-guide { border-color: ${e.treeIndentGuidesStroke.transparent(.4)}; }`),i.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=i.join("\n"),this.view.style(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,t)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(e,t){const i=e.map((e=>this.model.getNode(e)));this.selection.set(i,t);const n=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setSelection(n,t,!0)}getSelection(){return this.selection.get()}setFocus(e,t){const i=e.map((e=>this.model.getNode(e)));this.focus.set(i,t);const n=e.map((e=>this.model.getListIndex(e))).filter((e=>e>-1));this.view.setFocus(n,t,!0)}focusNext(e=1,t=!1,i,n=this.focusNavigationFilter){this.view.focusNext(e,t,i,n)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);-1!==i&&this.view.reveal(i,t)}getRelativeTop(e){const t=this.model.getListIndex(e);return-1===t?null:this.view.getRelativeTop(t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!0)){const e=this.model.getParentNodeLocation(n);if(!e)return;const t=this.model.getListIndex(e);this.view.reveal(t),this.view.setFocus([t])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!1)){if(!i.children.some((e=>e.visible)))return;const[e]=this.view.getFocus(),t=e+1;this.view.reveal(t),this.view.setFocus([t])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(0===t.length)return;const i=t[0],n=this.model.getNodeLocation(i),o=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,o)}dispose(){(0,o.B9)(this.disposables),this.view.dispose()}}class se{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new R(e,t,null,i),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,i.sorter&&(this.sorter={compare:(e,t)=>i.sorter.compare(e.element,t.element)}),this.identityProvider=i.identityProvider}setChildren(e,t=C.$.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=C.$.empty(),i){const n=new Set,o=new Set;this.model.splice([...e,0],Number.MAX_VALUE,t,Object.assign(Object.assign({},i),{onDidCreateNode:e=>{var t;if(null===e.element)return;const r=e;if(n.add(r.element),this.nodes.set(r.element,r),this.identityProvider){const e=this.identityProvider.getId(r.element).toString();o.add(e),this.nodesByIdentity.set(e,r)}null===(t=i.onDidCreateNode)||void 0===t||t.call(i,r)},onDidDeleteNode:e=>{var t;if(null===e.element)return;const r=e;if(n.has(r.element)||this.nodes.delete(r.element),this.identityProvider){const e=this.identityProvider.getId(r.element).toString();o.has(e)||this.nodesByIdentity.delete(e)}null===(t=i.onDidDeleteNode)||void 0===t||t.call(i,r)}}))}preserveCollapseState(e=C.$.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),C.$.map(e,(e=>{let t=this.nodes.get(e.element);if(!t&&this.identityProvider){const i=this.identityProvider.getId(e.element).toString();t=this.nodesByIdentity.get(i)}if(!t)return Object.assign(Object.assign({},e),{children:this.preserveCollapseState(e.children)});const i="boolean"==typeof e.collapsible?e.collapsible:t.collapsible,n=void 0!==e.collapsed?e.collapsed:t.collapsed;return Object.assign(Object.assign({},e),{collapsible:i,collapsed:n,children:this.preserveCollapseState(e.children)})}))}rerender(e){const t=this.getElementLocation(e);this.model.rerender(t)}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getElementLocation(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getElementLocation(e);return this.model.getListRenderCount(t)}isCollapsible(e){const t=this.getElementLocation(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getElementLocation(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getElementLocation(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getElementLocation(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getElementLocation(e);this.model.expandTo(t)}refilter(){this.model.refilter()}getNode(e=null){if(null===e)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new x(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(null===e)throw new x(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new x(this.user,`Tree element not found: ${e}`);const i=this.model.getNodeLocation(t),n=this.model.getParentNodeLocation(i);return this.model.getNode(n).element}getElementLocation(e){if(null===e)return[];const t=this.nodes.get(e);if(!t)throw new x(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function ae(e){return{element:{elements:[e.element],incompressible:e.incompressible||!1},children:C.$.map(C.$.from(e.children),ae),collapsible:e.collapsible,collapsed:e.collapsed}}function le(e){const t=[e.element],i=e.incompressible||!1;let n,o;for(;[o,n]=C.$.consume(C.$.from(e.children),2),1===o.length&&!o[0].incompressible;)e=o[0],t.push(e.element);return{element:{elements:t,incompressible:i},children:C.$.map(C.$.concat(o,n),le),collapsible:e.collapsible,collapsed:e.collapsed}}function ce(e,t=0){let i;return i=tce(e,0))),0===t&&e.element.incompressible?{element:e.element.elements[t],children:i,incompressible:!0,collapsible:e.collapsible,collapsed:e.collapsed}:{element:e.element.elements[t],children:i,collapsible:e.collapsible,collapsed:e.collapsed}}function ue(e){return ce(e,0)}function he(e,t,i){return e.element===t?Object.assign(Object.assign({},e),{children:i}):Object.assign(Object.assign({},e),{children:C.$.map(C.$.from(e.children),(e=>he(e,t,i)))})}class de{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new se(e,t,i),this.enabled=void 0===i.compressionEnabled||i.compressionEnabled,this.identityProvider=i.identityProvider}get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}setChildren(e,t=C.$.empty(),i){const n=i.diffIdentityProvider&&(o=i.diffIdentityProvider,{getId:e=>e.elements.map((e=>o.getId(e).toString())).join("\0")});var o;if(null===e){const e=C.$.map(t,this.enabled?le:ae);return void this._setChildren(null,e,{diffIdentityProvider:n,diffDepth:1/0})}const r=this.nodes.get(e);if(!r)throw new Error("Unknown compressed tree node");const s=this.model.getNode(r),a=this.model.getParentNodeLocation(r),l=this.model.getNode(a),c=he(ue(s),e,t),u=(this.enabled?le:ae)(c),h=l.children.map((e=>e===s?u:e));this._setChildren(l.element,h,{diffIdentityProvider:n,diffDepth:s.depth-l.depth})}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const t=this.model.getNode().children,i=C.$.map(t,ue),n=C.$.map(i,e?le:ae);this._setChildren(null,n,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,i){const n=new Set;this.model.setChildren(e,t,Object.assign(Object.assign({},i),{onDidCreateNode:e=>{for(const t of e.element.elements)n.add(t),this.nodes.set(t,e.element)},onDidDeleteNode:e=>{for(const t of e.element.elements)n.has(t)||this.nodes.delete(t)}}))}has(e){return this.nodes.has(e)}getListIndex(e){const t=this.getCompressedNode(e);return this.model.getListIndex(t)}getListRenderCount(e){const t=this.getCompressedNode(e);return this.model.getListRenderCount(t)}getNode(e){if(void 0===e)return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return null===t?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),i=this.model.getParentNodeLocation(t);return null===i?null:i.elements[i.elements.length-1]}isCollapsible(e){const t=this.getCompressedNode(e);return this.model.isCollapsible(t)}setCollapsible(e,t){const i=this.getCompressedNode(e);return this.model.setCollapsible(i,t)}isCollapsed(e){const t=this.getCompressedNode(e);return this.model.isCollapsed(t)}setCollapsed(e,t,i){const n=this.getCompressedNode(e);return this.model.setCollapsed(n,t,i)}expandTo(e){const t=this.getCompressedNode(e);this.model.expandTo(t)}rerender(e){const t=this.getCompressedNode(e);this.model.rerender(t)}refilter(){this.model.refilter()}getCompressedNode(e){if(null===e)return null;const t=this.nodes.get(e);if(!t)throw new x(this.user,`Tree element not found: ${e}`);return t}}const ge=e=>e[e.length-1];class fe{constructor(e,t){this.unwrapper=e,this.node=t}get element(){return null===this.node.element?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map((e=>new fe(this.unwrapper,e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class pe{constructor(e,t,i={}){this.rootRef=null,this.elementMapper=i.elementMapper||ge;const n=e=>this.elementMapper(e.elements);this.nodeMapper=new k((e=>new fe(n,e))),this.model=new de(e,function(e,t){return{splice(i,n,o){t.splice(i,n,o.map((t=>e.map(t))))},updateElementHeight(e,i){t.updateElementHeight(e,i)}}}(this.nodeMapper,t),function(e,t){return Object.assign(Object.assign({},t),{identityProvider:t.identityProvider&&{getId:i=>t.identityProvider.getId(e(i))},sorter:t.sorter&&{compare:(e,i)=>t.sorter.compare(e.elements[0],i.elements[0])},filter:t.filter&&{filter:(i,n)=>t.filter.filter(e(i),n)}})}(n,i))}get onDidSplice(){return a.ju.map(this.model.onDidSplice,(({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map((e=>this.nodeMapper.map(e))),deletedNodes:t.map((e=>this.nodeMapper.map(e)))})))}get onDidChangeCollapseState(){return a.ju.map(this.model.onDidChangeCollapseState,(({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t})))}get onDidChangeRenderNodeCount(){return a.ju.map(this.model.onDidChangeRenderNodeCount,(e=>this.nodeMapper.map(e)))}setChildren(e,t=C.$.empty(),i={}){this.model.setChildren(e,t,i)}setCompressionEnabled(e){this.model.setCompressionEnabled(e)}has(e){return this.model.has(e)}getListIndex(e){return this.model.getListIndex(e)}getListRenderCount(e){return this.model.getListRenderCount(e)}getNode(e){return this.nodeMapper.map(this.model.getNode(e))}getNodeLocation(e){return e.element}getParentNodeLocation(e){return this.model.getParentNodeLocation(e)}isCollapsible(e){return this.model.isCollapsible(e)}setCollapsible(e,t){return this.model.setCollapsible(e,t)}isCollapsed(e){return this.model.isCollapsed(e)}setCollapsed(e,t,i){return this.model.setCollapsed(e,t,i)}expandTo(e){return this.model.expandTo(e)}rerender(e){return this.model.rerender(e)}refilter(){return this.model.refilter()}getCompressedTreeNode(e=null){return this.model.getNode(e)}}var me=i(9898);class _e extends re{constructor(e,t,i,n,o={}){super(e,t,i,n,o)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}setChildren(e,t=C.$.empty(),i){this.model.setChildren(e,t,i)}rerender(e){void 0!==e?this.model.rerender(e):this.view.rerender()}hasElement(e){return this.model.has(e)}createModel(e,t,i){return new se(e,t,i)}}class ve{constructor(e,t){this._compressedTreeNodeProvider=e,this.renderer=t,this.templateId=t.templateId,t.onDidChangeTwistieState&&(this.onDidChangeTwistieState=t.onDidChangeTwistieState)}get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}renderTemplate(e){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){const o=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);1===o.element.elements.length?(i.compressedTreeNode=void 0,this.renderer.renderElement(e,t,i.data,n)):(i.compressedTreeNode=o,this.renderer.renderCompressedElements(o,t,i.data,n))}disposeElement(e,t,i,n){i.compressedTreeNode?this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(i.compressedTreeNode,t,i.data,n):this.renderer.disposeElement&&this.renderer.disposeElement(e,t,i.data,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return!!this.renderer.renderTwistie&&this.renderer.renderTwistie(e,t)}}!function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([me.H],ve.prototype,"compressedTreeNodeProvider",null);class be extends _e{constructor(e,t,i,n,o={}){const r=()=>this;super(e,t,i,n.map((e=>new ve(r,e))),function(e,t){return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(i){let n;try{n=e().getCompressedTreeNode(i)}catch(e){return t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i)}return 1===n.element.elements.length?t.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(i):t.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(n.element.elements)}}})}(r,o))}setChildren(e,t=C.$.empty(),i){this.model.setChildren(e,t,i)}createModel(e,t,i){return new pe(e,t,i)}updateOptions(e={}){super.updateOptions(e),void 0!==e.compressionEnabled&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}var ye=i(7301),we=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function Ce(e){return Object.assign(Object.assign({},e),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function Se(e,t){return!!t.parent&&(t.parent===e||Se(e,t.parent))}class xe{constructor(e){this.node=e}get element(){return this.node.element.element}get children(){return this.node.children.map((e=>new xe(e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class ke{constructor(e,t,i){this.renderer=e,this.nodeMapper=t,this.onDidChangeTwistieState=i,this.renderedNodes=new Map,this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...U.classNamesArray),!0):(t.classList.remove(...U.classNamesArray),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function De(e){return{browserEvent:e.browserEvent,elements:e.elements.map((e=>e.element))}}function Le(e){return{browserEvent:e.browserEvent,element:e.element&&e.element.element,target:e.target}}class Ne extends L.kX{constructor(e){super(e.elements.map((e=>e.element))),this.data=e}}function Ee(e){return e instanceof L.kX?new Ne(e):e}class Ae{constructor(e){this.dnd=e}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map((e=>e.element)),t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(Ee(e),t)}onDragOver(e,t,i,n,o=!0){return this.dnd.onDragOver(Ee(e),t&&t.element,i,n)}drop(e,t,i,n){this.dnd.drop(Ee(e),t&&t.element,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}function Me(e){return e&&Object.assign(Object.assign({},e),{collapseByDefault:!0,identityProvider:e.identityProvider&&{getId:t=>e.identityProvider.getId(t.element)},dnd:e.dnd&&new Ae(e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent:t=>e.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},t),{element:t.element})),isSelectionRangeChangeEvent:t=>e.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))},accessibilityProvider:e.accessibilityProvider&&Object.assign(Object.assign({},e.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",isChecked:e.accessibilityProvider.isChecked?t=>{var i;return!!(null===(i=e.accessibilityProvider)||void 0===i?void 0:i.isChecked(t.element))}:void 0,getAriaLabel:t=>e.accessibilityProvider.getAriaLabel(t.element),getWidgetAriaLabel:()=>e.accessibilityProvider.getWidgetAriaLabel(),getWidgetRole:e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider.getAriaLevel&&(t=>e.accessibilityProvider.getAriaLevel(t.element)),getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))}),filter:e.filter&&{filter:(t,i)=>e.filter.filter(t.element,i)},keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}),sorter:void 0,expandOnlyOnTwistieClick:void 0===e.expandOnlyOnTwistieClick?void 0:"function"!=typeof e.expandOnlyOnTwistieClick?e.expandOnlyOnTwistieClick:t=>e.expandOnlyOnTwistieClick(t.element),additionalScrollHeight:e.additionalScrollHeight})}function Ie(e,t){t(e),e.children.forEach((e=>Ie(e,t)))}class Te{constructor(e,t,i,n,r,s={}){this.user=e,this.dataSource=r,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new a.Q5,this._onDidChangeNodeSlowState=new a.Q5,this.nodeMapper=new k((e=>new xe(e))),this.disposables=new o.SL,this.identityProvider=s.identityProvider,this.autoExpandSingleChildren=void 0!==s.autoExpandSingleChildren&&s.autoExpandSingleChildren,this.sorter=s.sorter,this.collapseByDefault=s.collapseByDefault,this.tree=this.createTree(e,t,i,n,s),this.root=Ce({element:void 0,parent:null,hasChildren:!0}),this.identityProvider&&(this.root=Object.assign(Object.assign({},this.root),{id:null})),this.nodes.set(null,this.root),this.tree.onDidChangeCollapseState(this._onDidChangeCollapseState,this,this.disposables)}get onDidChangeFocus(){return a.ju.map(this.tree.onDidChangeFocus,De)}get onDidChangeSelection(){return a.ju.map(this.tree.onDidChangeSelection,De)}get onMouseDblClick(){return a.ju.map(this.tree.onMouseDblClick,Le)}get onPointer(){return a.ju.map(this.tree.onPointer,Le)}get onDidFocus(){return this.tree.onDidFocus}get onDidDispose(){return this.tree.onDidDispose}createTree(e,t,i,n,o){const r=new G(i),s=n.map((e=>new ke(e,this.nodeMapper,this._onDidChangeNodeSlowState.event))),a=Me(o)||{};return new _e(e,t,r,s,a)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}domFocus(){this.tree.domFocus()}layout(e,t){this.tree.layout(e,t)}style(e){this.tree.style(e)}getInput(){return this.root.element}setInput(e,t){return we(this,void 0,void 0,(function*(){this.refreshPromises.forEach((e=>e.cancel())),this.refreshPromises.clear(),this.root.element=e;const i=t&&{viewState:t,focus:[],selection:[]};yield this._updateChildren(e,!0,!1,i),i&&(this.tree.setFocus(i.focus),this.tree.setSelection(i.selection)),t&&"number"==typeof t.scrollTop&&(this.scrollTop=t.scrollTop)}))}_updateChildren(e=this.root.element,t=!0,i=!1,n,o){return we(this,void 0,void 0,(function*(){if(void 0===this.root.element)throw new x(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield a.ju.toPromise(this._onDidRender.event));const r=this.getDataNode(e);if(yield this.refreshAndRenderNode(r,t,n,o),i)try{this.tree.rerender(r)}catch(e){}}))}rerender(e){if(void 0===e||e===this.root.element)return void this.tree.rerender();const t=this.getDataNode(e);this.tree.rerender(t)}collapse(e,t=!1){const i=this.getDataNode(e);return this.tree.collapse(i===this.root?null:i,t)}expand(e,t=!1){return we(this,void 0,void 0,(function*(){if(void 0===this.root.element)throw new x(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield a.ju.toPromise(this._onDidRender.event));const i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i))return!1;if(i.refreshPromise&&(yield this.root.refreshPromise,yield a.ju.toPromise(this._onDidRender.event)),i!==this.root&&!i.refreshPromise&&!this.tree.isCollapsed(i))return!1;const n=this.tree.expand(i===this.root?null:i,t);return i.refreshPromise&&(yield this.root.refreshPromise,yield a.ju.toPromise(this._onDidRender.event)),n}))}setSelection(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setSelection(i,t)}getSelection(){return this.tree.getSelection().map((e=>e.element))}setFocus(e,t){const i=e.map((e=>this.getDataNode(e)));this.tree.setFocus(i,t)}getFocus(){return this.tree.getFocus().map((e=>e.element))}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getDataNode(e){const t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new x(this.user,`Data tree node not found: ${e}`);return t}refreshAndRenderNode(e,t,i,n){return we(this,void 0,void 0,(function*(){yield this.refreshNode(e,t,i),this.render(e,i,n)}))}refreshNode(e,t,i){return we(this,void 0,void 0,(function*(){let n;return this.subTreeRefreshPromises.forEach(((o,r)=>{!n&&function(e,t){return e===t||Se(e,t)||Se(t,e)}(r,e)&&(n=o.then((()=>this.refreshNode(e,t,i))))})),n||this.doRefreshSubTree(e,t,i)}))}doRefreshSubTree(e,t,i){return we(this,void 0,void 0,(function*(){let n;e.refreshPromise=new Promise((e=>n=e)),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally((()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)}));try{const o=yield this.doRefreshNode(e,t,i);e.stale=!1,yield O.jT.settled(o.map((e=>this.doRefreshSubTree(e,t,i))))}finally{n()}}))}doRefreshNode(e,t,i){return we(this,void 0,void 0,(function*(){let n;if(e.hasChildren=!!this.dataSource.hasChildren(e.element),e.hasChildren){const t=(0,O.Vs)(800);t.then((()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)}),(e=>null)),n=this.doGetChildren(e).finally((()=>t.cancel()))}else n=Promise.resolve(C.$.empty());try{const o=yield n;return this.setChildren(e,o,t,i)}catch(t){if(e!==this.root&&this.tree.hasElement(e)&&this.tree.collapse(e),(0,ye.VV)(t))return[];throw t}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}}))}doGetChildren(e){let t=this.refreshPromises.get(e);return t||(t=(0,O.PG)((()=>we(this,void 0,void 0,(function*(){const t=yield this.dataSource.getChildren(e.element);return this.processChildren(t)})))),this.refreshPromises.set(e,t),t.finally((()=>{this.refreshPromises.delete(e)})))}_onDidChangeCollapseState({node:e,deep:t}){null!==e.element&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(ye.dL))}setChildren(e,t,i,n){const o=[...t];if(0===e.children.length&&0===o.length)return[];const r=new Map,s=new Map;for(const t of e.children)if(r.set(t.element,t),this.identityProvider){const e=this.tree.isCollapsed(t);s.set(t.id,{node:t,collapsed:e})}const a=[],l=o.map((t=>{const o=!!this.dataSource.hasChildren(t);if(!this.identityProvider){const i=Ce({element:t,parent:e,hasChildren:o});return o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(i.collapsedByDefault=!1,a.push(i)),i}const l=this.identityProvider.getId(t).toString(),c=s.get(l);if(c){const e=c.node;return r.delete(e.element),this.nodes.delete(e.element),this.nodes.set(t,e),e.element=t,e.hasChildren=o,i?c.collapsed?(e.children.forEach((e=>Ie(e,(e=>this.nodes.delete(e.element))))),e.children.splice(0,e.children.length),e.stale=!0):a.push(e):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(e.collapsedByDefault=!1,a.push(e)),e}const u=Ce({element:t,parent:e,id:l,hasChildren:o});return n&&n.viewState.focus&&n.viewState.focus.indexOf(l)>-1&&n.focus.push(u),n&&n.viewState.selection&&n.viewState.selection.indexOf(l)>-1&&n.selection.push(u),n&&n.viewState.expanded&&n.viewState.expanded.indexOf(l)>-1?a.push(u):o&&this.collapseByDefault&&!this.collapseByDefault(t)&&(u.collapsedByDefault=!1,a.push(u)),u}));for(const e of r.values())Ie(e,(e=>this.nodes.delete(e.element)));for(const e of l)this.nodes.set(e.element,e);return e.children.splice(0,e.children.length,...l),e!==this.root&&this.autoExpandSingleChildren&&1===l.length&&0===a.length&&(l[0].collapsedByDefault=!1,a.push(l[0])),a}render(e,t,i){const n=e.children.map((e=>this.asTreeElement(e,t))),o=i&&Object.assign(Object.assign({},i),{diffIdentityProvider:i.diffIdentityProvider&&{getId:e=>i.diffIdentityProvider.getId(e.element)}});this.tree.setChildren(e===this.root?null:e,n,o),e!==this.root&&this.tree.setCollapsible(e,e.hasChildren),this._onDidRender.fire()}asTreeElement(e,t){if(e.stale)return{element:e,collapsible:e.hasChildren,collapsed:!0};let i;return i=!(t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1)&&e.collapsedByDefault,e.collapsedByDefault=void 0,{element:e,children:e.hasChildren?C.$.map(e.children,(e=>this.asTreeElement(e,t))):[],collapsible:e.hasChildren,collapsed:i}}processChildren(e){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),e}dispose(){this.disposables.dispose()}}class Re{constructor(e){this.node=e}get element(){return{elements:this.node.element.elements.map((e=>e.element)),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map((e=>new Re(e)))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}}class Oe{constructor(e,t,i,n){this.renderer=e,this.nodeMapper=t,this.compressibleNodeMapperProvider=i,this.onDidChangeTwistieState=n,this.renderedNodes=new Map,this.disposables=[],this.templateId=e.templateId}renderTemplate(e){return{templateData:this.renderer.renderTemplate(e)}}renderElement(e,t,i,n){this.renderer.renderElement(this.nodeMapper.map(e),t,i.templateData,n)}renderCompressedElements(e,t,i,n){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}renderTwistie(e,t){return e.slow?(t.classList.add(...U.classNamesArray),!0):(t.classList.remove(...U.classNamesArray),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=(0,o.B9)(this.disposables)}}class Fe extends Te{constructor(e,t,i,n,o,r,s={}){super(e,t,i,o,r,s),this.compressionDelegate=n,this.compressibleNodeMapper=new k((e=>new Re(e))),this.filter=s.filter}createTree(e,t,i,n,o){const r=new G(i),s=n.map((e=>new Oe(e,this.nodeMapper,(()=>this.compressibleNodeMapper),this._onDidChangeNodeSlowState.event))),a=function(e){const t=e&&Me(e);return t&&Object.assign(Object.assign({},t),{keyboardNavigationLabelProvider:t.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},t.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel:t=>e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map((e=>e.element)))})})}(o)||{};return new be(e,t,r,s,a)}asTreeElement(e,t){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(e.element)},super.asTreeElement(e,t))}updateOptions(e={}){this.tree.updateOptions(e)}render(e,t){if(!this.identityProvider)return super.render(e,t);const i=e=>this.identityProvider.getId(e).toString(),n=e=>{const t=new Set;for(const n of e){const e=this.tree.getCompressedTreeNode(n===this.root?null:n);if(e.element)for(const n of e.element.elements)t.add(i(n.element))}return t},o=n(this.tree.getSelection()),r=n(this.tree.getFocus());super.render(e,t);const s=this.getSelection();let a=!1;const l=this.getFocus();let c=!1;const u=e=>{const t=e.element;if(t)for(let e=0;e{const t="boolean"==typeof(i=this.filter.filter(e,1))?i?1:0:M(i)?I(i.visibility):I(i);var i;if(2===t)throw new Error("Recursive tree visibility not supported in async data compressed trees");return 1===t}))),super.processChildren(e)}}class Pe extends re{constructor(e,t,i,n,o,r={}){super(e,t,i,n,r),this.user=e,this.dataSource=o,this.identityProvider=r.identityProvider}createModel(e,t,i){return new se(e,t,i)}}var Be=i(1106),ze=i(3937);class We{constructor(e,t,i){this.columns=e,this.getColumnSize=i,this.templateId=We.TemplateId,this.renderedTemplates=new Set;const n=new Map(t.map((e=>[e.templateId,e])));this.renderers=[];for(const t of e){const e=n.get(t.templateId);if(!e)throw new Error(`Table cell renderer for template id ${t.templateId} not found.`);this.renderers.push(e)}}renderTemplate(e){const t=(0,n.R3)(e,(0,n.$)(".monaco-table-tr")),i=[],o=[];for(let e=0;enew Ve(e,t))),u={size:c.reduce(((e,t)=>e+t.column.weight),0),views:c.map((e=>({size:e.column.weight,view:e})))};this.splitview=new ze.z(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:u}),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;const h=new We(o,r,(e=>this.splitview.getViewSize(e)));var d;this.list=new s.aV(e,this.domNode,(d=i,{getHeight:e=>d.getHeight(e),getTemplateId:()=>We.TemplateId}),[h],l),this.columnLayoutDisposable=a.ju.any(...c.map((e=>e.onDidLayout)))((([e,t])=>h.layoutColumn(e,t))),this.styleElement=(0,n.dS)(this.domNode),this.style({})}get onDidChangeFocus(){return this.list.onDidChangeFocus}get onDidChangeSelection(){return this.list.onDidChangeSelection}get onMouseDblClick(){return this.list.onMouseDblClick}get onPointer(){return this.list.onPointer}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}updateOptions(e){this.list.updateOptions(e)}splice(e,t,i=[]){this.list.splice(e,t,i)}getHTMLElement(){return this.domNode}style(e){const t=[];t.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\ttop: ${this.virtualDelegate.headerRowHeight+1}px;\n\t\t\theight: calc(100% - ${this.virtualDelegate.headerRowHeight}px);\n\t\t}`),this.styleElement.textContent=t.join("\n"),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.splitview.dispose(),this.list.dispose(),this.columnLayoutDisposable.dispose()}}He.InstanceCount=0;var $e=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s},Ue=function(e,t){return function(i,n){t(i,n,e)}};const je=(0,m.yh)("listService");let qe=class{constructor(e){this._themeService=e,this.disposables=new o.SL,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}get lastFocusedList(){return this._lastFocusedWidget}register(e,t){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;const e=new s.wD((0,n.dS)(),"");this.disposables.add((0,b.Jl)(e,this._themeService))}if(this.lists.some((t=>t.widget===e)))throw new Error("Cannot register the same widget multiple times");const i={widget:e,extraContextKeys:t};return this.lists.push(i),e.getHTMLElement()===document.activeElement&&(this._lastFocusedWidget=e),(0,o.F8)(e.onDidFocus((()=>this._lastFocusedWidget=e)),(0,o.OF)((()=>this.lists.splice(this.lists.indexOf(i),1))),e.onDidDispose((()=>{this.lists=this.lists.filter((e=>e!==i)),this._lastFocusedWidget===e&&(this._lastFocusedWidget=void 0)})))}dispose(){this.disposables.dispose()}};qe=$e([Ue(0,y.XE)],qe);const Ke=new p.uy("listFocus",!0),Ge=new p.uy("listSupportsMultiselect",!0),Ye=p.Ao.and(Ke,p.Ao.not(w.d)),Ze=new p.uy("listHasSelectionOrFocus",!1),Xe=new p.uy("listDoubleSelection",!1),Qe=new p.uy("listMultiSelection",!1),Je=new p.uy("listSelectionNavigation",!1),et=new p.uy("listSupportsKeyboardNavigation",!0),tt="listAutomaticKeyboardNavigation",it=new p.uy(tt,!0);let nt=!1;function ot(e,t){const i=e.createScoped(t.getHTMLElement());return Ke.bindTo(i),i}const rt="workbench.list.multiSelectModifier",st="workbench.list.openMode",at="workbench.list.horizontalScrolling",lt="workbench.list.keyboardNavigation",ct="workbench.list.automaticKeyboardNavigation",ut="workbench.tree.indent",ht="workbench.tree.renderIndentGuides",dt="workbench.list.smoothScrolling",gt="workbench.tree.expandMode";function ft(e){return"alt"===e.getValue(rt)}class pt extends o.JT{constructor(e){super(),this.configurationService=e,this.useAltAsMultipleSelectionModifier=ft(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration((e=>{e.affectsConfiguration(rt)&&(this.useAltAsMultipleSelectionModifier=ft(this.configurationService))})))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:(0,s.Zo)(e)}isSelectionRangeChangeEvent(e){return(0,s.wn)(e)}}function mt(e,t,i){const n=new o.SL,r=Object.assign({},e);if(!1!==e.multipleSelectionSupport&&!e.multipleSelectionController){const e=new pt(t);r.multipleSelectionController=e,n.add(e)}return r.keyboardNavigationDelegate={mightProducePrintableCharacter:e=>i.mightProducePrintableCharacter(e)},r.smoothScrolling=Boolean(t.getValue(dt)),[r,n]}let _t=class extends s.aV{constructor(e,t,i,n,o,r,s,a,l,c){const u=void 0!==o.horizontalScrolling?o.horizontalScrolling:Boolean(l.getValue(at)),[h,d]=mt(o,l,c);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},(0,b.o)(a.getColorTheme(),b.O2)),h),{horizontalScrolling:u})),this.disposables.add(d),this.contextKeyService=ot(r,this),this.themeService=a,Ge.bindTo(this.contextKeyService).set(!(!1===o.multipleSelectionSupport)),Je.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)),this.listHasSelectionOrFocus=Ze.bindTo(this.contextKeyService),this.listDoubleSelection=Xe.bindTo(this.contextKeyService),this.listMultiSelection=Qe.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=ft(l),this.disposables.add(this.contextKeyService),this.disposables.add(s.register(this)),o.overrideStyles&&this.updateStyles(o.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(l.onDidChangeConfiguration((e=>{e.affectsConfiguration(rt)&&(this._useAltAsMultipleSelectionModifier=ft(l));let t={};if(e.affectsConfiguration(at)&&void 0===this.horizontalScrolling){const e=Boolean(l.getValue(at));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(dt)){const e=Boolean(l.getValue(dt));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new wt(this,Object.assign({configurationService:l},o)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=(0,b.Jl)(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),super.dispose()}};_t=$e([Ue(5,p.i6),Ue(6,je),Ue(7,y.XE),Ue(8,g.Ui),Ue(9,_.d)],_t);let vt=class extends class{constructor(e,t,i,n,o={}){const r=()=>this.model,a=n.map((e=>new c(e,r)));this.list=new s.aV(e,t,i,a,function(e,t){return Object.assign(Object.assign({},t),{accessibilityProvider:t.accessibilityProvider&&new u(e,t.accessibilityProvider)})}(r,o))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return a.ju.map(this.list.onMouseDblClick,(({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i})))}get onPointer(){return a.ju.map(this.list.onPointer,(({element:e,index:t,browserEvent:i})=>({element:void 0===e?void 0:this._model.get(e),index:t,browserEvent:i})))}get onDidChangeSelection(){return a.ju.map(this.list.onDidChangeSelection,(({elements:e,indexes:t,browserEvent:i})=>({elements:e.map((e=>this._model.get(e))),indexes:t,browserEvent:i})))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,(0,r.w6)(e.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map((e=>this.model.get(e)))}style(e){this.list.style(e)}dispose(){this.list.dispose()}}{constructor(e,t,i,n,r,s,a,l,c,u){const h=void 0!==r.horizontalScrolling?r.horizontalScrolling:Boolean(c.getValue(at)),[d,g]=mt(r,c,u);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},(0,b.o)(l.getColorTheme(),b.O2)),d),{horizontalScrolling:h})),this.disposables=new o.SL,this.disposables.add(g),this.contextKeyService=ot(s,this),this.themeService=l,this.horizontalScrolling=r.horizontalScrolling,Ge.bindTo(this.contextKeyService).set(!(!1===r.multipleSelectionSupport)),Je.bindTo(this.contextKeyService).set(Boolean(r.selectionNavigation)),this._useAltAsMultipleSelectionModifier=ft(c),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),r.overrideStyles&&this.updateStyles(r.overrideStyles),r.overrideStyles&&this.disposables.add((0,b.Jl)(this,l,r.overrideStyles)),this.disposables.add(c.onDidChangeConfiguration((e=>{e.affectsConfiguration(rt)&&(this._useAltAsMultipleSelectionModifier=ft(c));let t={};if(e.affectsConfiguration(at)&&void 0===this.horizontalScrolling){const e=Boolean(c.getValue(at));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(dt)){const e=Boolean(c.getValue(dt));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new wt(this,Object.assign({configurationService:c},r)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=(0,b.Jl)(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),this.disposables.dispose(),super.dispose()}};vt=$e([Ue(5,p.i6),Ue(6,je),Ue(7,y.XE),Ue(8,g.Ui),Ue(9,_.d)],vt);let bt=class extends He{constructor(e,t,i,n,r,s,a,l,c,u,h){const d=void 0!==s.horizontalScrolling?s.horizontalScrolling:Boolean(u.getValue(at)),[g,f]=mt(s,u,h);super(e,t,i,n,r,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},(0,b.o)(c.getColorTheme(),b.O2)),g),{horizontalScrolling:d})),this.disposables=new o.SL,this.disposables.add(f),this.contextKeyService=ot(a,this),this.themeService=c,Ge.bindTo(this.contextKeyService).set(!(!1===s.multipleSelectionSupport)),Je.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this.listHasSelectionOrFocus=Ze.bindTo(this.contextKeyService),this.listDoubleSelection=Xe.bindTo(this.contextKeyService),this.listMultiSelection=Qe.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=ft(u),this.disposables.add(this.contextKeyService),this.disposables.add(l.register(this)),s.overrideStyles&&this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection((()=>{const e=this.getSelection(),t=this.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.listHasSelectionOrFocus.set(e.length>0||t.length>0),this.listMultiSelection.set(e.length>1),this.listDoubleSelection.set(2===e.length)}))}))),this.disposables.add(this.onDidChangeFocus((()=>{const e=this.getSelection(),t=this.getFocus();this.listHasSelectionOrFocus.set(e.length>0||t.length>0)}))),this.disposables.add(u.onDidChangeConfiguration((e=>{e.affectsConfiguration(rt)&&(this._useAltAsMultipleSelectionModifier=ft(u));let t={};if(e.affectsConfiguration(at)&&void 0===this.horizontalScrolling){const e=Boolean(u.getValue(at));t=Object.assign(Object.assign({},t),{horizontalScrolling:e})}if(e.affectsConfiguration(dt)){const e=Boolean(u.getValue(dt));t=Object.assign(Object.assign({},t),{smoothScrolling:e})}Object.keys(t).length>0&&this.updateOptions(t)}))),this.navigator=new Ct(this,Object.assign({configurationService:u},s)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles)}updateStyles(e){var t;null===(t=this._styler)||void 0===t||t.dispose(),this._styler=(0,b.Jl)(this,this.themeService,e)}dispose(){var e;null===(e=this._styler)||void 0===e||e.dispose(),this.disposables.dispose(),super.dispose()}};bt=$e([Ue(6,p.i6),Ue(7,je),Ue(8,y.XE),Ue(9,g.Ui),Ue(10,_.d)],bt);class yt extends o.JT{constructor(e,t){var i;super(),this.widget=e,this._onDidOpen=this._register(new a.Q5),this.onDidOpen=this._onDidOpen.event,this._register(a.ju.filter(this.widget.onDidChangeSelection,(e=>e.browserEvent instanceof KeyboardEvent))((e=>this.onSelectionFromKeyboard(e)))),this._register(this.widget.onPointer((e=>this.onPointer(e.element,e.browserEvent)))),this._register(this.widget.onMouseDblClick((e=>this.onMouseDblClick(e.element,e.browserEvent)))),"boolean"!=typeof(null==t?void 0:t.openOnSingleClick)&&(null==t?void 0:t.configurationService)?(this.openOnSingleClick="doubleClick"!==(null==t?void 0:t.configurationService.getValue(st)),this._register(null==t?void 0:t.configurationService.onDidChangeConfiguration((()=>{this.openOnSingleClick="doubleClick"!==(null==t?void 0:t.configurationService.getValue(st))})))):this.openOnSingleClick=null===(i=null==t?void 0:t.openOnSingleClick)||void 0===i||i}onSelectionFromKeyboard(e){if(1!==e.elements.length)return;const t=e.browserEvent,i="boolean"!=typeof t.preserveFocus||t.preserveFocus,n="boolean"==typeof t.pinned?t.pinned:!i;this._open(this.getSelectedElement(),i,n,!1,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick)return;if(2===t.detail)return;const i=1===t.button,n=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!0,i,n,t)}onMouseDblClick(e,t){if(!t)return;const i=t.target;if(i.classList.contains("monaco-tl-twistie")||i.classList.contains("monaco-icon-label")&&i.classList.contains("folder-icon")&&t.offsetX<16)return;const n=t.ctrlKey||t.metaKey||t.altKey;this._open(e,!1,!0,n,t)}_open(e,t,i,n,o){e&&this._onDidOpen.fire({editorOptions:{preserveFocus:t,pinned:i,revealIfVisible:!0},sideBySide:n,element:e,browserEvent:o})}}class wt extends yt{constructor(e,t){super(e,t),this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class Ct extends yt{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class St extends yt{constructor(e,t){super(e,t)}getSelectedElement(){var e;return null!==(e=this.widget.getSelection()[0])&&void 0!==e?e:void 0}}function xt(e,t){let i=!1;return n=>{if(i)return i=!1,!1;const o=t.softDispatch(n,e);return o&&o.enterChord?(i=!0,!1):(i=!1,!0)}}let kt=class extends _e{constructor(e,t,i,n,o,r,s,a,l,c,u){const{options:h,getAutomaticKeyboardNavigation:d,disposable:g}=At(t,o,r,l,c,u);super(e,t,i,n,h),this.disposables.add(g),this.internals=new Mt(this,o,d,o.overrideStyles,r,s,a,l,u),this.disposables.add(this.internals)}};kt=$e([Ue(5,p.i6),Ue(6,je),Ue(7,y.XE),Ue(8,g.Ui),Ue(9,_.d),Ue(10,Be.F)],kt);let Dt=class extends be{constructor(e,t,i,n,o,r,s,a,l,c,u){const{options:h,getAutomaticKeyboardNavigation:d,disposable:g}=At(t,o,r,l,c,u);super(e,t,i,n,h),this.disposables.add(g),this.internals=new Mt(this,o,d,o.overrideStyles,r,s,a,l,u),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles)}};Dt=$e([Ue(5,p.i6),Ue(6,je),Ue(7,y.XE),Ue(8,g.Ui),Ue(9,_.d),Ue(10,Be.F)],Dt);let Lt=class extends Pe{constructor(e,t,i,n,o,r,s,a,l,c,u,h){const{options:d,getAutomaticKeyboardNavigation:g,disposable:f}=At(t,r,s,c,u,h);super(e,t,i,n,o,d),this.disposables.add(f),this.internals=new Mt(this,r,g,r.overrideStyles,s,a,l,c,h),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles)}};Lt=$e([Ue(6,p.i6),Ue(7,je),Ue(8,y.XE),Ue(9,g.Ui),Ue(10,_.d),Ue(11,Be.F)],Lt);let Nt=class extends Te{constructor(e,t,i,n,o,r,s,a,l,c,u,h){const{options:d,getAutomaticKeyboardNavigation:g,disposable:f}=At(t,r,s,c,u,h);super(e,t,i,n,o,d),this.disposables.add(f),this.internals=new Mt(this,r,g,r.overrideStyles,s,a,l,c,h),this.disposables.add(this.internals)}get onDidOpen(){return this.internals.onDidOpen}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles)}};Nt=$e([Ue(6,p.i6),Ue(7,je),Ue(8,y.XE),Ue(9,g.Ui),Ue(10,_.d),Ue(11,Be.F)],Nt);let Et=class extends Fe{constructor(e,t,i,n,o,r,s,a,l,c,u,h,d){const{options:g,getAutomaticKeyboardNavigation:f,disposable:p}=At(t,s,a,u,h,d);super(e,t,i,n,o,r,g),this.disposables.add(p),this.internals=new Mt(this,s,f,s.overrideStyles,a,l,c,u,d),this.disposables.add(this.internals)}};function At(e,t,i,n,o,r){var s;et.bindTo(i),nt||(it.bindTo(i),nt=!0);const a=()=>{let e=Boolean(i.getContextKeyValue(tt));return e&&(e=Boolean(n.getValue(ct))),e},l=r.isScreenReaderOptimized(),c=t.simpleKeyboardNavigation||l?"simple":n.getValue(lt),u=void 0!==t.horizontalScrolling?t.horizontalScrolling:Boolean(n.getValue(at)),[h,d]=mt(t,n,o),g=t.additionalScrollHeight;return{getAutomaticKeyboardNavigation:a,disposable:d,options:Object.assign(Object.assign({keyboardSupport:!1},h),{indent:n.getValue(ut),renderIndentGuides:n.getValue(ht),smoothScrolling:Boolean(n.getValue(dt)),automaticKeyboardNavigation:a(),simpleKeyboardNavigation:"simple"===c,filterOnType:"filter"===c,horizontalScrolling:u,keyboardNavigationEventFilter:xt(e,o),additionalScrollHeight:g,hideTwistiesOfChildlessElements:t.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:null!==(s=t.expandOnlyOnTwistieClick)&&void 0!==s?s:"doubleClick"===n.getValue(gt)})}}Et=$e([Ue(7,p.i6),Ue(8,je),Ue(9,y.XE),Ue(10,g.Ui),Ue(11,_.d),Ue(12,Be.F)],Et);let Mt=class{constructor(e,t,i,n,o,r,s,a,l){this.tree=e,this.themeService=s,this.disposables=[],this.contextKeyService=ot(o,e),Ge.bindTo(this.contextKeyService).set(!(!1===t.multipleSelectionSupport)),Je.bindTo(this.contextKeyService).set(Boolean(t.selectionNavigation)),this.hasSelectionOrFocus=Ze.bindTo(this.contextKeyService),this.hasDoubleSelection=Xe.bindTo(this.contextKeyService),this.hasMultiSelection=Qe.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=ft(a);const c=new Set;c.add(tt);const u=()=>{const t=l.isScreenReaderOptimized()?"simple":a.getValue(lt);e.updateOptions({simpleKeyboardNavigation:"simple"===t,filterOnType:"filter"===t})};this.updateStyleOverrides(n),this.disposables.push(this.contextKeyService,r.register(e),e.onDidChangeSelection((()=>{const t=e.getSelection(),i=e.getFocus();this.contextKeyService.bufferChangeEvents((()=>{this.hasSelectionOrFocus.set(t.length>0||i.length>0),this.hasMultiSelection.set(t.length>1),this.hasDoubleSelection.set(2===t.length)}))})),e.onDidChangeFocus((()=>{const t=e.getSelection(),i=e.getFocus();this.hasSelectionOrFocus.set(t.length>0||i.length>0)})),a.onDidChangeConfiguration((n=>{let o={};if(n.affectsConfiguration(rt)&&(this._useAltAsMultipleSelectionModifier=ft(a)),n.affectsConfiguration(ut)){const e=a.getValue(ut);o=Object.assign(Object.assign({},o),{indent:e})}if(n.affectsConfiguration(ht)){const e=a.getValue(ht);o=Object.assign(Object.assign({},o),{renderIndentGuides:e})}if(n.affectsConfiguration(dt)){const e=Boolean(a.getValue(dt));o=Object.assign(Object.assign({},o),{smoothScrolling:e})}if(n.affectsConfiguration(lt)&&u(),n.affectsConfiguration(ct)&&(o=Object.assign(Object.assign({},o),{automaticKeyboardNavigation:i()})),n.affectsConfiguration(at)&&void 0===t.horizontalScrolling){const e=Boolean(a.getValue(at));o=Object.assign(Object.assign({},o),{horizontalScrolling:e})}n.affectsConfiguration(gt)&&void 0===t.expandOnlyOnTwistieClick&&(o=Object.assign(Object.assign({},o),{expandOnlyOnTwistieClick:"doubleClick"===a.getValue(gt)})),Object.keys(o).length>0&&e.updateOptions(o)})),this.contextKeyService.onDidChangeContext((t=>{t.affectsSome(c)&&e.updateOptions({automaticKeyboardNavigation:i()})})),l.onDidChangeScreenReaderOptimized((()=>u()))),this.navigator=new St(e,Object.assign({configurationService:a},t)),this.disposables.push(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}updateStyleOverrides(e){(0,o.B9)(this.styler),this.styler=e?(0,b.Jl)(this.tree,this.themeService,e):o.JT.None}dispose(){this.disposables=(0,o.B9)(this.disposables),(0,o.B9)(this.styler),this.styler=void 0}};Mt=$e([Ue(4,p.i6),Ue(5,je),Ue(6,y.XE),Ue(7,g.Ui),Ue(8,Be.F)],Mt),v.B.as(f.IP.Configuration).registerConfiguration({id:"workbench",order:7,title:(0,d.N)("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[rt]:{type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[(0,d.N)("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),(0,d.N)("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:(0,d.N)({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"The modifier to be used to add an item in trees and lists to a multi-selection with the mouse (for example in the explorer, open editors and scm view). The 'Open to Side' mouse gestures - if supported - will adapt such that they do not conflict with the multiselect modifier.")},[st]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,d.N)({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.")},[at]:{type:"boolean",default:!1,description:(0,d.N)("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[ut]:{type:"number",default:8,minimum:0,maximum:40,description:(0,d.N)("tree indent setting","Controls tree indentation in pixels.")},[ht]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:(0,d.N)("render tree indent guides","Controls whether the tree should render indent guides.")},[dt]:{type:"boolean",default:!1,description:(0,d.N)("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[lt]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[(0,d.N)("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),(0,d.N)("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),(0,d.N)("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:(0,d.N)("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter.")},[ct]:{type:"boolean",default:!0,markdownDescription:(0,d.N)("automatic keyboard navigation setting","Controls whether keyboard navigation in lists and trees is automatically triggered simply by typing. If set to `false`, keyboard navigation is only triggered when executing the `list.toggleKeyboardNavigation` command, for which you can assign a keyboard shortcut.")},[gt]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,d.N)("expand mode","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.")}}})},3557:(e,t,i)=>{"use strict";i.d(t,{VZ:()=>s,in:()=>a,kw:()=>u,$V:()=>h});var n=i(2065),o=i(5976),r=i(4669);const s=(0,n.yh)("logService");var a;!function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Info=2]="Info",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.Off=6]="Off"}(a||(a={}));const l=a.Info;class c extends o.JT{constructor(){super(...arguments),this.level=l,this._onDidChangeLogLevel=this._register(new r.Q5)}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}class u extends c{constructor(e=l){super(),this.setLevel(e)}trace(e,...t){this.getLevel()<=a.Trace&&console.log("%cTRACE","color: #888",e,...t)}debug(e,...t){this.getLevel()<=a.Debug&&console.log("%cDEBUG","background: #eee; color: #888",e,...t)}info(e,...t){this.getLevel()<=a.Info&&console.log("%c INFO","color: #33f",e,...t)}error(e,...t){this.getLevel()<=a.Error&&console.log("%c ERR","color: #f33",e,...t)}dispose(){}}class h extends o.JT{constructor(e){super(),this.logger=e,this._register(e)}getLevel(){return this.logger.getLevel()}trace(e,...t){this.logger.trace(e,...t)}debug(e,...t){this.logger.debug(e,...t)}info(e,...t){this.logger.info(e,...t)}error(e,...t){this.logger.error(e,...t)}}},8674:(e,t,i)=>{"use strict";i.d(t,{ZL:()=>n,H0:()=>o,lT:()=>l});var n,o,r=i(2065),s=i(3580),a=i(4603);!function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"}(n||(n={})),function(e){e.compare=function(e,t){return t-e};const t=Object.create(null);t[e.Error]=(0,s.N)("sev.error","Error"),t[e.Warning]=(0,s.N)("sev.warning","Warning"),t[e.Info]=(0,s.N)("sev.info","Info"),e.toString=function(e){return t[e]||""},e.fromSeverity=function(t){switch(t){case a.Z.Error:return e.Error;case a.Z.Warning:return e.Warning;case a.Z.Info:return e.Info;case a.Z.Ignore:return e.Hint}},e.toSeverity=function(t){switch(t){case e.Error:return a.Z.Error;case e.Warning:return a.Z.Warning;case e.Info:return a.Z.Info;case e.Hint:return a.Z.Ignore}}}(n||(n={})),function(e){const t="";function i(e,i){let o=[t];return e.source?o.push(e.source.replace("¦","\\¦")):o.push(t),e.code?"string"==typeof e.code?o.push(e.code.replace("¦","\\¦")):o.push(e.code.value.replace("¦","\\¦")):o.push(t),void 0!==e.severity&&null!==e.severity?o.push(n.toString(e.severity)):o.push(t),e.message&&i?o.push(e.message.replace("¦","\\¦")):o.push(t),void 0!==e.startLineNumber&&null!==e.startLineNumber?o.push(e.startLineNumber.toString()):o.push(t),void 0!==e.startColumn&&null!==e.startColumn?o.push(e.startColumn.toString()):o.push(t),void 0!==e.endLineNumber&&null!==e.endLineNumber?o.push(e.endLineNumber.toString()):o.push(t),void 0!==e.endColumn&&null!==e.endColumn?o.push(e.endColumn.toString()):o.push(t),o.push(t),o.join("¦")}e.makeKey=function(e){return i(e,!0)},e.makeKeyOptionalMessage=i}(o||(o={}));const l=(0,r.yh)("markerService")},9422:(e,t,i)=>{"use strict";i.d(t,{lT:()=>n,EO:()=>o}),i(4603);const n=(0,i(2065).yh)("notificationService");class o{}},988:(e,t,i)=>{"use strict";i.d(t,{v4:()=>l,SW:()=>c,xn:()=>u});var n=i(5976),o=i(7295),r=i(666),s=i(2065),a=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const l=(0,s.yh)("openerService"),c=Object.freeze({_serviceBrand:void 0,registerOpener:()=>n.JT.None,registerValidator:()=>n.JT.None,registerExternalUriResolver:()=>n.JT.None,setDefaultExternalOpener(){},registerExternalOpener:()=>n.JT.None,open(){return a(this,void 0,void 0,(function*(){return!1}))},resolveExternalUri(e){return a(this,void 0,void 0,(function*(){return{resolved:e,dispose(){}}}))}});function u(e,t){return r.o.isUri(e)?(0,o.qq)(e.scheme,t):(0,o.ok)(e,t+":")}},535:(e,t,i)=>{"use strict";i.d(t,{E:()=>o,e:()=>r});var n=i(2065);class o{constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}}o.None=Object.freeze({report(){}});const r=(0,n.yh)("editorProgressService")},725:(e,t,i)=>{"use strict";i.d(t,{Ry:()=>n,IP:()=>a});var n,o=i(9872),r=i(9488),s=i(5976);!function(e){e[e.PRESERVE=0]="PRESERVE",e[e.LAST=1]="LAST"}(n||(n={}));const a={Quickaccess:"workbench.contributions.quickaccess"};o.B.add(a.Quickaccess,new class{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return 0===e.prefix.length?this.defaultProvider=e:this.providers.push(e),this.providers.sort(((e,t)=>t.prefix.length-e.prefix.length)),(0,s.OF)((()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)}))}getQuickAccessProviders(){return(0,r.kX)([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find((t=>e.startsWith(t.prefix)))||this.defaultProvider}})},1157:(e,t,i)=>{"use strict";i.d(t,{jG:()=>o.jG,eJ:()=>r});var n=i(2065),o=i(7746);const r=(0,n.yh)("quickInputService")},9872:(e,t,i)=>{"use strict";i.d(t,{B:()=>r});var n=i(8401),o=i(5146);const r=new class{constructor(){this.data=new Map}add(e,t){o.ok(n.HD(e)),o.ok(n.Kn(t)),o.ok(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}}},6904:(e,t,i)=>{"use strict";i.d(t,{Uy:()=>g,vm:()=>m,fk:()=>f});var n,o=i(2065),r=i(4669),s=i(5976),a=i(8401),l=i(5393),c=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};!function(e){e[e.None=0]="None",e[e.Initialized=1]="Initialized",e[e.Closed=2]="Closed"}(n||(n={}));class u extends s.JT{constructor(e,t=Object.create(null)){super(),this.database=e,this.options=t,this._onDidChangeStorage=this._register(new r.Q5),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=n.None,this.cache=new Map,this.flushDelayer=new l.rH(u.DEFAULT_FLUSH_DELAY),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal((e=>this.onDidChangeItemsExternal(e))))}onDidChangeItemsExternal(e){var t,i;null===(t=e.changed)||void 0===t||t.forEach(((e,t)=>this.accept(t,e))),null===(i=e.deleted)||void 0===i||i.forEach((e=>this.accept(e,void 0)))}accept(e,t){if(this.state===n.Closed)return;let i=!1;(0,a.Jp)(t)?i=this.cache.delete(e):this.cache.get(e)!==t&&(this.cache.set(e,t),i=!0),i&&this._onDidChangeStorage.fire(e)}get(e,t){const i=this.cache.get(e);return(0,a.Jp)(i)?t:i}getBoolean(e,t){const i=this.get(e);return(0,a.Jp)(i)?t:"true"===i}getNumber(e,t){const i=this.get(e);return(0,a.Jp)(i)?t:parseInt(i,10)}set(e,t){return c(this,void 0,void 0,(function*(){if(this.state===n.Closed)return;if((0,a.Jp)(t))return this.delete(e);const i=String(t);return this.cache.get(e)!==i?(this.cache.set(e,i),this.pendingInserts.set(e,i),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire(e),this.flushDelayer.trigger((()=>this.flushPending()))):void 0}))}delete(e){return c(this,void 0,void 0,(function*(){if(this.state!==n.Closed)return this.cache.delete(e)?(this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire(e),this.flushDelayer.trigger((()=>this.flushPending()))):void 0}))}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return c(this,void 0,void 0,(function*(){if(!this.hasPending)return;const e={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(e).finally((()=>{var e;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)null===(e=this.whenFlushedCallbacks.pop())||void 0===e||e()}))}))}dispose(){this.flushDelayer.cancel(),this.flushDelayer.dispose(),super.dispose()}}u.DEFAULT_FLUSH_DELAY=100;class h{constructor(){this.onDidChangeItemsExternal=r.ju.None,this.items=new Map}updateItems(e){return c(this,void 0,void 0,(function*(){e.insert&&e.insert.forEach(((e,t)=>this.items.set(t,e))),e.delete&&e.delete.forEach((e=>this.items.delete(e)))}))}}const d="__$__targetStorageMarker",g=(0,o.yh)("storageService");var f;!function(e){e[e.NONE=0]="NONE",e[e.SHUTDOWN=1]="SHUTDOWN"}(f||(f={}));class p extends s.JT{constructor(e={flushInterval:p.DEFAULT_FLUSH_INTERVAL}){super(),this.options=e,this._onDidChangeValue=this._register(new r.K3),this._onDidChangeTarget=this._register(new r.K3),this._onWillSaveState=this._register(new r.Q5),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._globalKeyTargets=void 0}emitDidChangeValue(e,t){t===d?(0===e?this._globalKeyTargets=void 0:1===e&&(this._workspaceKeyTargets=void 0),this._onDidChangeTarget.fire({scope:e})):this._onDidChangeValue.fire({scope:e,key:t,target:this.getKeyTargets(e)[t]})}get(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.get(e,i)}getBoolean(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.getBoolean(e,i)}getNumber(e,t,i){var n;return null===(n=this.getStorage(t))||void 0===n?void 0:n.getNumber(e,i)}store(e,t,i,n){(0,a.Jp)(t)?this.remove(e,i):this.withPausedEmitters((()=>{var o;this.updateKeyTarget(e,i,n),null===(o=this.getStorage(i))||void 0===o||o.set(e,t)}))}remove(e,t){this.withPausedEmitters((()=>{var i;this.updateKeyTarget(e,t,void 0),null===(i=this.getStorage(t))||void 0===i||i.delete(e)}))}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,i){var n,o;const r=this.getKeyTargets(t);"number"==typeof i?r[e]!==i&&(r[e]=i,null===(n=this.getStorage(t))||void 0===n||n.set(d,JSON.stringify(r))):"number"==typeof r[e]&&(delete r[e],null===(o=this.getStorage(t))||void 0===o||o.set(d,JSON.stringify(r)))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get globalKeyTargets(){return this._globalKeyTargets||(this._globalKeyTargets=this.loadKeyTargets(0)),this._globalKeyTargets}getKeyTargets(e){return 0===e?this.globalKeyTargets:this.workspaceKeyTargets}loadKeyTargets(e){const t=this.get(d,e);if(t)try{return JSON.parse(t)}catch(e){}return Object.create(null)}}p.DEFAULT_FLUSH_INTERVAL=6e4;class m extends p{constructor(){super(),this.globalStorage=new u(new h),this.workspaceStorage=new u(new h),this._register(this.workspaceStorage.onDidChangeStorage((e=>this.emitDidChangeValue(1,e)))),this._register(this.globalStorage.onDidChangeStorage((e=>this.emitDidChangeValue(0,e))))}getStorage(e){return 0===e?this.globalStorage:this.workspaceStorage}}},829:(e,t,i)=>{"use strict";i.d(t,{b:()=>n});const n=(0,i(2065).yh)("telemetryService")},3910:(e,t,i)=>{"use strict";i.d(t,{IP:()=>u,P6:()=>d,dR:()=>g,Id:()=>f,XZ:()=>p,R8:()=>m,lR:()=>_,xL:()=>v,ur:()=>b,Sw:()=>y,rh:()=>w,sE:()=>C,zJ:()=>S,dt:()=>x,PR:()=>k,XE:()=>D,Pv:()=>L,_l:()=>N,YI:()=>E,EP:()=>A,RV:()=>M,SU:()=>I,C3:()=>T,p:()=>R,_t:()=>O,OZ:()=>F,j5:()=>z,b7:()=>W,GO:()=>V,g8:()=>H,qe:()=>$,_w:()=>U,et:()=>j,AB:()=>q,yn:()=>K,zR:()=>G,A2:()=>Y,lX:()=>Z,b6:()=>X,gp:()=>Q,uo:()=>J,pW:()=>ee,fe:()=>te,c6:()=>ie,T8:()=>ne,Du:()=>oe,fE:()=>re,cv:()=>se,NO:()=>ae,D0:()=>le,Hf:()=>ce,D1:()=>ue,Ng:()=>he,zK:()=>de,tZ:()=>ge,lo:()=>fe,kJ:()=>pe,op:()=>me,oQ:()=>_e,lW:()=>ve,AW:()=>be,K1:()=>ye,hE:()=>we,yb:()=>Ce,ES:()=>Se,Rz:()=>xe,g_:()=>ke,ny:()=>De,MU:()=>Le,jU:()=>Ne,pn:()=>Ee,Ei:()=>Ae,gk:()=>Me,pt:()=>Ie,yJ:()=>Te,Sb:()=>Re,CN:()=>Oe,Lo:()=>Fe,_Y:()=>Pe,VV:()=>Be,Pp:()=>ze,Fu:()=>We,sK:()=>Ve,Cz:()=>He,ke:()=>$e,yp:()=>Ue,P4:()=>je,XL:()=>qe,mH:()=>Ke,LL:()=>Ge,L_:()=>Ye,_b:()=>Ze,_2:()=>Xe,Oo:()=>Qe,dC:()=>Je,M6:()=>et,rg:()=>tt,yt:()=>it,s$:()=>nt,F3:()=>ot,mV:()=>rt,$d:()=>st,AS:()=>at,Gw:()=>lt,PX:()=>ct,vG:()=>ut,oS:()=>ht,S:()=>dt,Un:()=>gt,ux:()=>ft,NP:()=>mt,Vq:()=>_t,Cd:()=>vt,DE:()=>bt,Hz:()=>yt,jb:()=>wt,$D:()=>Ct,E3:()=>St,ZG:()=>xt,u2:()=>kt,Pk:()=>Dt,I1:()=>Lt,U6:()=>Nt,Fm:()=>Et,SP:()=>At,KT:()=>Mt,ov:()=>It,Gj:()=>Tt,Iv:()=>Rt,kV:()=>Ot,CA:()=>Ft,Xy:()=>Pt,br:()=>Bt,Jp:()=>zt,BO:()=>Wt,OL:()=>Vt,Zn:()=>Ut,kw:()=>jt,Sn:()=>Kt});var n=i(9872),o=i(1264),r=i(4669),s=i(3580),a=i(1294),l=i(5393),c=i(8401);const u={ColorContribution:"base.contributions.colors"},h=new class{constructor(){this._onDidChangeSchema=new r.Q5,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(e,t,i,n=!1,o){let r={id:e,description:i,defaults:t,needsTransparency:n,deprecationMessage:o};this.colorsById[e]=r;let s={type:"string",description:i,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return o&&(s.deprecationMessage=o),this.colorSchema.properties[e]=s,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(i),this._onDidChangeSchema.fire(),e}resolveDefaultColor(e,t){const i=this.colorsById[e];if(i&&i.defaults)return Kt(i.defaults[t.type],t)}getColorSchema(){return this.colorSchema}toString(){return Object.keys(this.colorsById).sort(((e,t)=>{let i=-1===e.indexOf(".")?0:1,n=-1===t.indexOf(".")?0:1;return i!==n?i-n:e.localeCompare(t)})).map((e=>`- \`${e}\`: ${this.colorsById[e].description}`)).join("\n")}};function d(e,t,i,n,o){return h.registerColor(e,t,i,n,o)}n.B.add(u.ColorContribution,h);const g=d("foreground",{dark:"#CCCCCC",light:"#616161",hc:"#FFFFFF"},s.N("foreground","Overall foreground color. This color is only used if not overridden by a component.")),f=d("errorForeground",{dark:"#F48771",light:"#A1260D",hc:"#F48771"},s.N("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),p=d("icon.foreground",{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},s.N("iconForeground","The default color for icons in the workbench.")),m=d("focusBorder",{dark:"#007FD4",light:"#0090F1",hc:"#F38518"},s.N("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),_=d("contrastBorder",{light:null,dark:null,hc:"#6FC3DF"},s.N("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),v=d("contrastActiveBorder",{light:null,dark:null,hc:m},s.N("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),b=d("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},s.N("textLinkForeground","Foreground color for links in text.")),y=d("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hc:o.Il.black},s.N("textCodeBlockBackground","Background color for code blocks in text.")),w=d("widget.shadow",{dark:Ut(o.Il.black,.36),light:Ut(o.Il.black,.16),hc:null},s.N("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),C=d("input.background",{dark:"#3C3C3C",light:o.Il.white,hc:o.Il.black},s.N("inputBoxBackground","Input box background.")),S=d("input.foreground",{dark:g,light:g,hc:g},s.N("inputBoxForeground","Input box foreground.")),x=d("input.border",{dark:null,light:null,hc:_},s.N("inputBoxBorder","Input box border.")),k=d("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hc:_},s.N("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),D=d("inputOption.activeBackground",{dark:Ut(m,.4),light:Ut(m,.2),hc:o.Il.transparent},s.N("inputOption.activeBackground","Background color of activated options in input fields.")),L=d("inputOption.activeForeground",{dark:o.Il.white,light:o.Il.black,hc:null},s.N("inputOption.activeForeground","Foreground color of activated options in input fields.")),N=d("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hc:o.Il.black},s.N("inputValidationInfoBackground","Input validation background color for information severity.")),E=d("inputValidation.infoForeground",{dark:null,light:null,hc:null},s.N("inputValidationInfoForeground","Input validation foreground color for information severity.")),A=d("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hc:_},s.N("inputValidationInfoBorder","Input validation border color for information severity.")),M=d("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hc:o.Il.black},s.N("inputValidationWarningBackground","Input validation background color for warning severity.")),I=d("inputValidation.warningForeground",{dark:null,light:null,hc:null},s.N("inputValidationWarningForeground","Input validation foreground color for warning severity.")),T=d("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hc:_},s.N("inputValidationWarningBorder","Input validation border color for warning severity.")),R=d("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hc:o.Il.black},s.N("inputValidationErrorBackground","Input validation background color for error severity.")),O=d("inputValidation.errorForeground",{dark:null,light:null,hc:null},s.N("inputValidationErrorForeground","Input validation foreground color for error severity.")),F=d("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hc:_},s.N("inputValidationErrorBorder","Input validation border color for error severity.")),P=d("dropdown.background",{dark:"#3C3C3C",light:o.Il.white,hc:o.Il.black},s.N("dropdownBackground","Dropdown background.")),B=d("dropdown.foreground",{dark:"#F0F0F0",light:null,hc:o.Il.white},s.N("dropdownForeground","Dropdown foreground.")),z=d("button.foreground",{dark:o.Il.white,light:o.Il.white,hc:o.Il.white},s.N("buttonForeground","Button foreground color.")),W=d("button.background",{dark:"#0E639C",light:"#007ACC",hc:null},s.N("buttonBackground","Button background color.")),V=d("button.hoverBackground",{dark:$t(W,.2),light:Ht(W,.2),hc:null},s.N("buttonHoverBackground","Button background color when hovering.")),H=d("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hc:o.Il.black},s.N("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),$=d("badge.foreground",{dark:o.Il.white,light:"#333",hc:o.Il.white},s.N("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),U=d("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hc:null},s.N("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),j=d("scrollbarSlider.background",{dark:o.Il.fromHex("#797979").transparent(.4),light:o.Il.fromHex("#646464").transparent(.4),hc:Ut(_,.6)},s.N("scrollbarSliderBackground","Scrollbar slider background color.")),q=d("scrollbarSlider.hoverBackground",{dark:o.Il.fromHex("#646464").transparent(.7),light:o.Il.fromHex("#646464").transparent(.7),hc:Ut(_,.8)},s.N("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),K=d("scrollbarSlider.activeBackground",{dark:o.Il.fromHex("#BFBFBF").transparent(.4),light:o.Il.fromHex("#000000").transparent(.6),hc:_},s.N("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),G=d("progressBar.background",{dark:o.Il.fromHex("#0E70C0"),light:o.Il.fromHex("#0E70C0"),hc:_},s.N("progressBarBackground","Background color of the progress bar that can show for long running operations.")),Y=d("editorError.background",{dark:null,light:null,hc:null},s.N("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Z=d("editorError.foreground",{dark:"#F48771",light:"#E51400",hc:null},s.N("editorError.foreground","Foreground color of error squigglies in the editor.")),X=d("editorError.border",{dark:null,light:null,hc:o.Il.fromHex("#E47777").transparent(.8)},s.N("errorBorder","Border color of error boxes in the editor.")),Q=d("editorWarning.background",{dark:null,light:null,hc:null},s.N("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),J=d("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hc:null},s.N("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),ee=d("editorWarning.border",{dark:null,light:null,hc:o.Il.fromHex("#FFCC00").transparent(.8)},s.N("warningBorder","Border color of warning boxes in the editor.")),te=d("editorInfo.background",{dark:null,light:null,hc:null},s.N("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),ie=d("editorInfo.foreground",{dark:"#75BEFF",light:"#75BEFF",hc:null},s.N("editorInfo.foreground","Foreground color of info squigglies in the editor.")),ne=d("editorInfo.border",{dark:null,light:null,hc:o.Il.fromHex("#75BEFF").transparent(.8)},s.N("infoBorder","Border color of info boxes in the editor.")),oe=d("editorHint.foreground",{dark:o.Il.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hc:null},s.N("editorHint.foreground","Foreground color of hint squigglies in the editor.")),re=d("editorHint.border",{dark:null,light:null,hc:o.Il.fromHex("#eeeeee").transparent(.8)},s.N("hintBorder","Border color of hint boxes in the editor.")),se=d("editor.background",{light:"#fffffe",dark:"#1E1E1E",hc:o.Il.black},s.N("editorBackground","Editor background color.")),ae=d("editor.foreground",{light:"#333333",dark:"#BBBBBB",hc:o.Il.white},s.N("editorForeground","Editor default foreground color.")),le=d("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hc:"#0C141F"},s.N("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),ce=d("editorWidget.foreground",{dark:g,light:g,hc:g},s.N("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),ue=d("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hc:_},s.N("editorWidgetBorder","Border color of editor widgets. The color is only used if the widget chooses to have a border and if the color is not overridden by a widget.")),he=d("editorWidget.resizeBorder",{light:null,dark:null,hc:null},s.N("editorWidgetResizeBorder","Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget.")),de=d("quickInput.background",{dark:le,light:le,hc:le},s.N("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),ge=d("quickInput.foreground",{dark:ce,light:ce,hc:ce},s.N("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),fe=d("quickInputTitle.background",{dark:new o.Il(new o.VS(255,255,255,.105)),light:new o.Il(new o.VS(0,0,0,.06)),hc:"#000000"},s.N("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),pe=d("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hc:o.Il.white},s.N("pickerGroupForeground","Quick picker color for grouping labels.")),me=d("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hc:o.Il.white},s.N("pickerGroupBorder","Quick picker color for grouping borders.")),_e=d("keybindingLabel.background",{dark:new o.Il(new o.VS(128,128,128,.17)),light:new o.Il(new o.VS(221,221,221,.4)),hc:o.Il.transparent},s.N("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),ve=d("keybindingLabel.foreground",{dark:o.Il.fromHex("#CCCCCC"),light:o.Il.fromHex("#555555"),hc:o.Il.white},s.N("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),be=d("keybindingLabel.border",{dark:new o.Il(new o.VS(51,51,51,.6)),light:new o.Il(new o.VS(204,204,204,.4)),hc:new o.Il(new o.VS(111,195,223))},s.N("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),ye=d("keybindingLabel.bottomBorder",{dark:new o.Il(new o.VS(68,68,68,.6)),light:new o.Il(new o.VS(187,187,187,.4)),hc:new o.Il(new o.VS(111,195,223))},s.N("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),we=d("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},s.N("editorSelectionBackground","Color of the editor selection.")),Ce=d("editor.selectionForeground",{light:null,dark:null,hc:"#000000"},s.N("editorSelectionForeground","Color of the selected text for high contrast.")),Se=d("editor.inactiveSelectionBackground",{light:Ut(we,.5),dark:Ut(we,.5),hc:Ut(we,.5)},s.N("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),xe=d("editor.selectionHighlightBackground",{light:qt(we,se,.3,.6),dark:qt(we,se,.3,.6),hc:null},s.N("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),ke=d("editor.selectionHighlightBorder",{light:null,dark:null,hc:v},s.N("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),De=d("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hc:null},s.N("editorFindMatch","Color of the current search match.")),Le=d("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hc:null},s.N("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),Ne=d("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hc:null},s.N("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),Ee=d("editor.findMatchBorder",{light:null,dark:null,hc:v},s.N("editorFindMatchBorder","Border color of the current search match.")),Ae=d("editor.findMatchHighlightBorder",{light:null,dark:null,hc:v},s.N("findMatchHighlightBorder","Border color of the other search matches.")),Me=d("editor.findRangeHighlightBorder",{dark:null,light:null,hc:Ut(v,.4)},s.N("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),Ie=d("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hc:"#ADD6FF26"},s.N("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),Te=d("editorHoverWidget.background",{light:le,dark:le,hc:le},s.N("hoverBackground","Background color of the editor hover.")),Re=d("editorHoverWidget.foreground",{light:ce,dark:ce,hc:ce},s.N("hoverForeground","Foreground color of the editor hover.")),Oe=d("editorHoverWidget.border",{light:ue,dark:ue,hc:ue},s.N("hoverBorder","Border color of the editor hover.")),Fe=d("editorHoverWidget.statusBarBackground",{dark:$t(Te,.2),light:Ht(Te,.05),hc:le},s.N("statusBarBackground","Background color of the editor hover status bar.")),Pe=d("editorLink.activeForeground",{dark:"#4E94CE",light:o.Il.blue,hc:o.Il.cyan},s.N("activeLinkForeground","Color of active links.")),Be=d("editorInlayHint.foreground",{dark:le,light:ce,hc:le},s.N("editorInlayHintForeground","Foreground color of inline hints")),ze=d("editorInlayHint.background",{dark:ce,light:le,hc:ce},s.N("editorInlayHintBackground","Background color of inline hints")),We=d("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hc:"#FFCC00"},s.N("editorLightBulbForeground","The color used for the lightbulb actions icon.")),Ve=d("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},s.N("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),He=new o.Il(new o.VS(155,185,85,.2)),$e=new o.Il(new o.VS(255,0,0,.2)),Ue=d("diffEditor.insertedTextBackground",{dark:He,light:He,hc:null},s.N("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),je=d("diffEditor.removedTextBackground",{dark:$e,light:$e,hc:null},s.N("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),qe=d("diffEditor.insertedTextBorder",{dark:null,light:null,hc:"#33ff2eff"},s.N("diffEditorInsertedOutline","Outline color for the text that got inserted.")),Ke=d("diffEditor.removedTextBorder",{dark:null,light:null,hc:"#FF008F"},s.N("diffEditorRemovedOutline","Outline color for text that got removed.")),Ge=d("diffEditor.border",{dark:null,light:null,hc:_},s.N("diffEditorBorder","Border color between the two text editors.")),Ye=d("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hc:null},s.N("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),Ze=d("list.focusBackground",{dark:null,light:null,hc:null},s.N("listFocusBackground","List/Tree background color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Xe=d("list.focusForeground",{dark:null,light:null,hc:null},s.N("listFocusForeground","List/Tree foreground color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Qe=d("list.focusOutline",{dark:m,light:m,hc:v},s.N("listFocusOutline","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),Je=d("list.activeSelectionBackground",{dark:"#094771",light:"#0060C0",hc:null},s.N("listActiveSelectionBackground","List/Tree background color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),et=d("list.activeSelectionForeground",{dark:o.Il.white,light:o.Il.white,hc:null},s.N("listActiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.")),tt=d("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hc:null},s.N("listInactiveSelectionBackground","List/Tree background color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),it=d("list.inactiveSelectionForeground",{dark:null,light:null,hc:null},s.N("listInactiveSelectionForeground","List/Tree foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),nt=d("list.inactiveFocusBackground",{dark:null,light:null,hc:null},s.N("listInactiveFocusBackground","List/Tree background color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),ot=d("list.inactiveFocusOutline",{dark:null,light:null,hc:null},s.N("listInactiveFocusOutline","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")),rt=d("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hc:null},s.N("listHoverBackground","List/Tree background when hovering over items using the mouse.")),st=d("list.hoverForeground",{dark:null,light:null,hc:null},s.N("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),at=d("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hc:null},s.N("listDropBackground","List/Tree drag and drop background when moving items around using the mouse.")),lt=d("list.highlightForeground",{dark:"#18A3FF",light:"#0066BF",hc:m},s.N("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),ct=d("list.focusHighlightForeground",{dark:lt,light:lt,hc:lt},s.N("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.")),ut=d("listFilterWidget.background",{light:"#efc1ad",dark:"#653723",hc:o.Il.black},s.N("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),ht=d("listFilterWidget.outline",{dark:o.Il.transparent,light:o.Il.transparent,hc:"#f38518"},s.N("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),dt=d("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hc:_},s.N("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),gt=d("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hc:"#a9a9a9"},s.N("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),ft=d("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hc:null},s.N("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),pt=d("quickInput.list.focusBackground",{dark:null,light:null,hc:null},"",void 0,s.N("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),mt=d("quickInputList.focusForeground",{dark:et,light:et,hc:et},s.N("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),_t=d("quickInputList.focusBackground",{dark:jt(pt,Je,"#062F4A"),light:jt(pt,Je,"#D6EBFF"),hc:null},s.N("quickInput.listFocusBackground","Quick picker background color for the focused item.")),vt=d("menu.border",{dark:null,light:null,hc:_},s.N("menuBorder","Border color of menus.")),bt=d("menu.foreground",{dark:B,light:g,hc:B},s.N("menuForeground","Foreground color of menu items.")),yt=d("menu.background",{dark:P,light:P,hc:P},s.N("menuBackground","Background color of menu items.")),wt=d("menu.selectionForeground",{dark:et,light:et,hc:et},s.N("menuSelectionForeground","Foreground color of the selected menu item in menus.")),Ct=d("menu.selectionBackground",{dark:Je,light:Je,hc:Je},s.N("menuSelectionBackground","Background color of the selected menu item in menus.")),St=d("menu.selectionBorder",{dark:null,light:null,hc:v},s.N("menuSelectionBorder","Border color of the selected menu item in menus.")),xt=d("menu.separatorBackground",{dark:"#BBBBBB",light:"#888888",hc:_},s.N("menuSeparatorBackground","Color of a separator menu item in menus.")),kt=d("editor.snippetTabstopHighlightBackground",{dark:new o.Il(new o.VS(124,124,124,.3)),light:new o.Il(new o.VS(10,50,100,.2)),hc:new o.Il(new o.VS(124,124,124,.3))},s.N("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),Dt=d("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hc:null},s.N("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),Lt=d("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hc:null},s.N("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),Nt=d("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new o.Il(new o.VS(10,50,100,.5)),hc:"#525252"},s.N("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),Et=d("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hc:"#AB5A00"},s.N("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),At=d("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},s.N("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Mt=d("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hc:"#AB5A00"},s.N("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),It=d("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hc:"#ffffff"},s.N("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),Tt=d("minimap.errorHighlight",{dark:new o.Il(new o.VS(255,18,18,.7)),light:new o.Il(new o.VS(255,18,18,.7)),hc:new o.Il(new o.VS(255,50,50,1))},s.N("minimapError","Minimap marker color for errors.")),Rt=d("minimap.warningHighlight",{dark:J,light:J,hc:ee},s.N("overviewRuleWarning","Minimap marker color for warnings.")),Ot=d("minimap.background",{dark:null,light:null,hc:null},s.N("minimapBackground","Minimap background color.")),Ft=d("minimapSlider.background",{light:Ut(j,.5),dark:Ut(j,.5),hc:Ut(j,.5)},s.N("minimapSliderBackground","Minimap slider background color.")),Pt=d("minimapSlider.hoverBackground",{light:Ut(q,.5),dark:Ut(q,.5),hc:Ut(q,.5)},s.N("minimapSliderHoverBackground","Minimap slider background color when hovering.")),Bt=d("minimapSlider.activeBackground",{light:Ut(K,.5),dark:Ut(K,.5),hc:Ut(K,.5)},s.N("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),zt=d("problemsErrorIcon.foreground",{dark:Z,light:Z,hc:Z},s.N("problemsErrorIconForeground","The color used for the problems error icon.")),Wt=d("problemsWarningIcon.foreground",{dark:J,light:J,hc:J},s.N("problemsWarningIconForeground","The color used for the problems warning icon.")),Vt=d("problemsInfoIcon.foreground",{dark:ie,light:ie,hc:ie},s.N("problemsInfoIconForeground","The color used for the problems info icon."));function Ht(e,t){return{op:0,value:e,factor:t}}function $t(e,t){return{op:1,value:e,factor:t}}function Ut(e,t){return{op:2,value:e,factor:t}}function jt(...e){return{op:3,values:e}}function qt(e,t,i,n){return{op:4,value:e,background:t,factor:i,transparency:n}}function Kt(e,t){if(null!==e)return"string"==typeof e?"#"===e[0]?o.Il.fromHex(e):t.getColor(e):e instanceof o.Il?e:"object"==typeof e?function(e,t){var i,n,r;switch(e.op){case 0:return null===(i=Kt(e.value,t))||void 0===i?void 0:i.darken(e.factor);case 1:return null===(n=Kt(e.value,t))||void 0===n?void 0:n.lighten(e.factor);case 2:return null===(r=Kt(e.value,t))||void 0===r?void 0:r.transparent(e.factor);case 3:for(const i of e.values){const e=Kt(i,t);if(e)return e}return;case 4:const s=Kt(e.value,t);if(!s)return;const a=Kt(e.background,t);return a?s.isDarkerThan(a)?o.Il.getLighterColor(s,a,e.factor).transparent(e.transparency):o.Il.getDarkerColor(s,a,e.factor).transparent(e.transparency):s.transparent(e.factor*e.transparency);default:throw(0,c.vE)(e)}}(e,t):void 0}const Gt="vscode://schemas/workbench-colors";let Yt=n.B.as(a.I.JSONContribution);Yt.registerSchema(Gt,h.getColorSchema());const Zt=new l.pY((()=>Yt.notifySchemaChanged(Gt)),200);h.onDidChangeSchema((()=>{Zt.isScheduled()||Zt.schedule()}))},9554:(e,t,i)=>{"use strict";i.d(t,{q5:()=>h,Ks:()=>d,s_:()=>m});var n=i(9872),o=i(7781),r=i(4669),s=i(3580),a=i(1294),l=i(5393),c=i(3046);const u=new class{constructor(){this._onDidChange=new r.Q5,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:(0,s.N)("iconDefintion.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:(0,s.N)("iconDefintion.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${c.dT.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(e,t,i,n){const o=this.iconsById[e];if(o){if(i&&!o.description){o.description=i,this.iconSchema.properties[e].markdownDescription=`${i} $(${e})`;const t=this.iconReferenceSchema.enum.indexOf(e);-1!==t&&(this.iconReferenceSchema.enumDescriptions[t]=i),this._onDidChange.fire()}return o}let r={id:e,description:i,defaults:t,deprecationMessage:n};this.iconsById[e]=r;let s={$ref:"#/definitions/icons"};return n&&(s.deprecationMessage=n),i&&(s.markdownDescription=`${i}: $(${e})`),this.iconSchema.properties[e]=s,this.iconReferenceSchema.enum.push(e),this.iconReferenceSchema.enumDescriptions.push(i||""),this._onDidChange.fire(),{id:e}}getIcons(){return Object.keys(this.iconsById).map((e=>this.iconsById[e]))}getIcon(e){return this.iconsById[e]}getIconSchema(){return this.iconSchema}getIconFont(e){return this.iconFontsById[e]}toString(){const e=(e,t)=>e.id.localeCompare(t.id),t=e=>{for(;o.kS.isThemeIcon(e.defaults);)e=this.iconsById[e.defaults.id];return`codicon codicon-${e?e.id:""}`};let i=[];i.push("| preview | identifier | default codicon ID | description"),i.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const n=Object.keys(this.iconsById).map((e=>this.iconsById[e]));for(const r of n.filter((e=>!!e.description)).sort(e))i.push(`||${r.id}|${o.kS.isThemeIcon(r.defaults)?r.defaults.id:r.id}|${r.description||""}|`);i.push("| preview | identifier "),i.push("| ----------- | --------------------------------- |");for(const r of n.filter((e=>!o.kS.isThemeIcon(e.defaults))).sort(e))i.push(`||${r.id}|`);return i.join("\n")}};function h(e,t,i,n){return u.registerIcon(e,t,i,n)}function d(){return u}n.B.add("base.contributions.icons",u),function(){for(const e of c.fK.all)u.registerIcon(e.id,e.definition,e.description);c.fK.onDidRegister((e=>u.registerIcon(e.id,e.definition,e.description)))}();const g="vscode://schemas/icons";let f=n.B.as(a.I.JSONContribution);f.registerSchema(g,u.getIconSchema());const p=new l.pY((()=>f.notifySchemaChanged(g)),200);u.onDidChange((()=>{p.isScheduled()||p.schedule()}));const m=h("widget-close",c.lA.close,(0,s.N)("widgetClose","Icon for the close action in widgets."))},8810:(e,t,i)=>{"use strict";i.d(t,{o:()=>o,WZ:()=>s,Jl:()=>a,O2:()=>l,tj:()=>u});var n=i(3910);function o(e,t){const i=Object.create(null);for(let o in t){const r=t[o];r&&(i[o]=(0,n.Sn)(r,e))}return i}function r(e,t,i){function n(){const n=o(e.getColorTheme(),t);"function"==typeof i?i(n):i.style(n)}return n(),e.onDidColorThemeChange(n)}function s(e,t,i){return r(t,{badgeBackground:(null==i?void 0:i.badgeBackground)||n.g8,badgeForeground:(null==i?void 0:i.badgeForeground)||n.qe,badgeBorder:n.lR},e)}function a(e,t,i){return r(t,Object.assign(Object.assign({},l),i||{}),e)}const l={listFocusBackground:n._b,listFocusForeground:n._2,listFocusOutline:n.Oo,listActiveSelectionBackground:n.dC,listActiveSelectionForeground:n.M6,listFocusAndSelectionBackground:n.dC,listFocusAndSelectionForeground:n.M6,listInactiveSelectionBackground:n.rg,listInactiveSelectionForeground:n.yt,listInactiveFocusBackground:n.s$,listInactiveFocusOutline:n.F3,listHoverBackground:n.mV,listHoverForeground:n.$d,listDropBackground:n.AS,listSelectionOutline:n.xL,listHoverOutline:n.xL,listFilterWidgetBackground:n.vG,listFilterWidgetOutline:n.oS,listFilterWidgetNoMatchesOutline:n.S,listMatchesShadow:n.rh,treeIndentGuidesStroke:n.Un,tableColumnsBorder:n.ux},c={shadowColor:n.rh,borderColor:n.Cd,foregroundColor:n.DE,backgroundColor:n.Hz,selectionForegroundColor:n.jb,selectionBackgroundColor:n.$D,selectionBorderColor:n.E3,separatorColor:n.ZG};function u(e,t,i){return r(t,Object.assign(Object.assign({},c),i),e)}},2321:(e,t,i)=>{"use strict";var n;i.d(t,{e:()=>n}),function(e){e.DARK="dark",e.LIGHT="light",e.HIGH_CONTRAST="hc"}(n||(n={}))},7781:(e,t,i)=>{"use strict";i.d(t,{XE:()=>c,EN:()=>d,kS:()=>h,m6:()=>g,IP:()=>f,Ic:()=>m,bB:()=>_});var n=i(2065),o=i(5976),r=i(9872),s=i(4669),a=i(2321),l=i(3046);const c=(0,n.yh)("themeService");var u,h;function d(e){return{id:e}}function g(e){switch(e){case a.e.DARK:return"vs-dark";case a.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}!function(e){e.isThemeColor=function(e){return e&&"object"==typeof e&&"string"==typeof e.id}}(u||(u={})),function(e){e.isThemeIcon=function(e){return e&&"object"==typeof e&&"string"==typeof e.id&&(void 0===e.color||u.isThemeColor(e.color))};const t=new RegExp(`^\\$\\((${l.dT.iconNameExpression}(?:${l.dT.iconModifierExpression})?)\\)$`);e.fromString=function(e){const i=t.exec(e);if(!i)return;let[,n]=i;return{id:n}},e.modify=function(e,t){let i=e.id;const n=i.lastIndexOf("~");return-1!==n&&(i=i.substring(0,n)),t&&(i=`${i}~${t}`),{id:i}},e.isEqual=function(e,t){var i,n;return e.id===t.id&&(null===(i=e.color)||void 0===i?void 0:i.id)===(null===(n=t.color)||void 0===n?void 0:n.id)},e.asThemeIcon=function(e){return{id:e.id}},e.asClassNameArray=l.dT.asClassNameArray,e.asClassName=l.dT.asClassName,e.asCSSSelector=l.dT.asCSSSelector}(h||(h={}));const f={ThemingContribution:"base.contributions.theming"};let p=new class{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new s.Q5}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),(0,o.OF)((()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)}))}getThemingParticipants(){return this.themingParticipants}};function m(e){return p.onColorThemeChange(e)}r.B.add(f.ThemingContribution,p);class _ extends o.JT{constructor(e){super(),this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange((e=>this.onThemeChange(e))))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}},4862:(e,t,i)=>{"use strict";i.d(t,{tJ:()=>n,YO:()=>o,Xt:()=>r,gJ:()=>s});const n=(0,i(2065).yh)("undoRedoService");class o{constructor(e,t){this.resource=e,this.elements=t}}class r{constructor(){this.id=r._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}r._ID=0,r.None=new r;class s{constructor(){this.id=s._ID++,this.order=1}nextOrder(){return 0===this.id?0:this.order++}}s._ID=0,s.None=new s},382:(e,t,i)=>{"use strict";i.d(t,{ec:()=>o,md:()=>r});var n=i(2065);i(3702);const o=(0,n.yh)("contextService");class r{constructor(e,t){this.raw=t,this.uri=e.uri,this.index=e.index,this.name=e.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}},4173:function(e,t,i){var n;(function(o,r){"use strict";function s(){a.width=o.innerWidth,a.height=5*d.barThickness;var e=a.getContext("2d");e.shadowBlur=d.shadowBlur,e.shadowColor=d.shadowColor;var t,i=e.createLinearGradient(0,0,a.width,0);for(t in d.barColors)i.addColorStop(t,d.barColors[t]);e.lineWidth=d.barThickness,e.beginPath(),e.moveTo(0,d.barThickness/2),e.lineTo(Math.ceil(u*a.width),d.barThickness/2),e.strokeStyle=i,e.stroke()}!function(){for(var e=0,t=["ms","moz","webkit","o"],i=0;i{const n=Symbol("SemVer ANY");class o{static get ANY(){return n}constructor(e,t){if(t=r(t),e instanceof o){if(e.loose===!!t.loose)return e;e=e.value}c("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(e){const t=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],i=e.match(t);if(!i)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==i[1]?i[1]:"","="===this.operator&&(this.operator=""),i[2]?this.semver=new u(i[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(c("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return l(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Comparator is required");if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return""===this.value||new h(e.value,t).test(this.value);if(""===e.operator)return""===e.value||new h(this.value,t).test(e.semver);const i=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),n=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),r=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=l(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=l(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return i||n||r&&s||a||c}}e.exports=o;const r=i(4167),{re:s,t:a}=i(6152),l=i(1427),c=i(4272),u=i(7800),h=i(1540)},1540:(e,t,i)=>{class n{constructor(e,t){if(t=r(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof s)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${e}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!f(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&p(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){e=e.trim();const t=`parseRange:${Object.keys(this.options).join(",")}:${e}`,i=o.get(t);if(i)return i;const n=this.options.loose,r=n?c[u.HYPHENRANGELOOSE]:c[u.HYPHENRANGE];e=e.replace(r,L(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(c[u.COMPARATORTRIM],h),a("comparator trim",e,c[u.COMPARATORTRIM]),e=(e=(e=e.replace(c[u.TILDETRIM],d)).replace(c[u.CARETTRIM],g)).split(/\s+/).join(" ");const l=n?c[u.COMPARATORLOOSE]:c[u.COMPARATOR],p=e.split(" ").map((e=>_(e,this.options))).join(" ").split(/\s+/).map((e=>D(e,this.options))).filter(this.options.loose?e=>!!e.match(l):()=>!0).map((e=>new s(e,this.options))),m=(p.length,new Map);for(const e of p){if(f(e))return[e];m.set(e.value,e)}m.size>1&&m.has("")&&m.delete("");const v=[...m.values()];return o.set(t,v),v}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some((i=>m(i,t)&&e.set.some((e=>m(e,t)&&i.every((i=>e.every((e=>i.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}for(let t=0;t"<0.0.0-0"===e.value,p=e=>""===e.value,m=(e,t)=>{let i=!0;const n=e.slice();let o=n.pop();for(;i&&n.length;)i=n.every((e=>o.intersects(e,t))),o=n.pop();return i},_=(e,t)=>(a("comp",e,t),e=w(e,t),a("caret",e),e=b(e,t),a("tildes",e),e=S(e,t),a("xrange",e),e=k(e,t),a("stars",e),e),v=e=>!e||"x"===e.toLowerCase()||"*"===e,b=(e,t)=>e.trim().split(/\s+/).map((e=>y(e,t))).join(" "),y=(e,t)=>{const i=t.loose?c[u.TILDELOOSE]:c[u.TILDE];return e.replace(i,((t,i,n,o,r)=>{let s;return a("tilde",e,t,i,n,o,r),v(i)?s="":v(n)?s=`>=${i}.0.0 <${+i+1}.0.0-0`:v(o)?s=`>=${i}.${n}.0 <${i}.${+n+1}.0-0`:r?(a("replaceTilde pr",r),s=`>=${i}.${n}.${o}-${r} <${i}.${+n+1}.0-0`):s=`>=${i}.${n}.${o} <${i}.${+n+1}.0-0`,a("tilde return",s),s}))},w=(e,t)=>e.trim().split(/\s+/).map((e=>C(e,t))).join(" "),C=(e,t)=>{a("caret",e,t);const i=t.loose?c[u.CARETLOOSE]:c[u.CARET],n=t.includePrerelease?"-0":"";return e.replace(i,((t,i,o,r,s)=>{let l;return a("caret",e,t,i,o,r,s),v(i)?l="":v(o)?l=`>=${i}.0.0${n} <${+i+1}.0.0-0`:v(r)?l="0"===i?`>=${i}.${o}.0${n} <${i}.${+o+1}.0-0`:`>=${i}.${o}.0${n} <${+i+1}.0.0-0`:s?(a("replaceCaret pr",s),l="0"===i?"0"===o?`>=${i}.${o}.${r}-${s} <${i}.${o}.${+r+1}-0`:`>=${i}.${o}.${r}-${s} <${i}.${+o+1}.0-0`:`>=${i}.${o}.${r}-${s} <${+i+1}.0.0-0`):(a("no pr"),l="0"===i?"0"===o?`>=${i}.${o}.${r}${n} <${i}.${o}.${+r+1}-0`:`>=${i}.${o}.${r}${n} <${i}.${+o+1}.0-0`:`>=${i}.${o}.${r} <${+i+1}.0.0-0`),a("caret return",l),l}))},S=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map((e=>x(e,t))).join(" ")),x=(e,t)=>{e=e.trim();const i=t.loose?c[u.XRANGELOOSE]:c[u.XRANGE];return e.replace(i,((i,n,o,r,s,l)=>{a("xRange",e,i,n,o,r,s,l);const c=v(o),u=c||v(r),h=u||v(s),d=h;return"="===n&&d&&(n=""),l=t.includePrerelease?"-0":"",c?i=">"===n||"<"===n?"<0.0.0-0":"*":n&&d?(u&&(r=0),s=0,">"===n?(n=">=",u?(o=+o+1,r=0,s=0):(r=+r+1,s=0)):"<="===n&&(n="<",u?o=+o+1:r=+r+1),"<"===n&&(l="-0"),i=`${n+o}.${r}.${s}${l}`):u?i=`>=${o}.0.0${l} <${+o+1}.0.0-0`:h&&(i=`>=${o}.${r}.0${l} <${o}.${+r+1}.0-0`),a("xRange return",i),i}))},k=(e,t)=>(a("replaceStars",e,t),e.trim().replace(c[u.STAR],"")),D=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(c[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),L=e=>(t,i,n,o,r,s,a,l,c,u,h,d,g)=>`${i=v(n)?"":v(o)?`>=${n}.0.0${e?"-0":""}`:v(r)?`>=${n}.${o}.0${e?"-0":""}`:s?`>=${i}`:`>=${i}${e?"-0":""}`} ${l=v(c)?"":v(u)?`<${+c+1}.0.0-0`:v(h)?`<${c}.${+u+1}.0-0`:d?`<=${c}.${u}.${h}-${d}`:e?`<${c}.${u}.${+h+1}-0`:`<=${l}`}`.trim(),N=(e,t,i)=>{for(let i=0;i0){const n=e[i].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},7800:(e,t,i)=>{const n=i(4272),{MAX_LENGTH:o,MAX_SAFE_INTEGER:r}=i(1266),{re:s,t:a}=i(6152),l=i(4167),{compareIdentifiers:c}=i(4126);class u{constructor(e,t){if(t=l(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid Version: ${e}`);if(e.length>o)throw new TypeError(`version is longer than ${o} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const i=e.trim().match(t.loose?s[a.LOOSE]:s[a.FULL]);if(!i)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");i[4]?this.prerelease=i[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[e]&&(this.prerelease[e]++,e=-2);-1===e&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error(`invalid increment argument: ${e}`)}return this.format(),this.raw=this.version,this}}e.exports=u},3974:(e,t,i)=>{const n=i(155);e.exports=(e,t)=>{const i=n(e.trim().replace(/^[=v]+/,""),t);return i?i.version:null}},1427:(e,t,i)=>{const n=i(3641),o=i(7351),r=i(3365),s=i(4457),a=i(2687),l=i(6039);e.exports=(e,t,i,c)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof i&&(i=i.version),e===i;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof i&&(i=i.version),e!==i;case"":case"=":case"==":return n(e,i,c);case"!=":return o(e,i,c);case">":return r(e,i,c);case">=":return s(e,i,c);case"<":return a(e,i,c);case"<=":return l(e,i,c);default:throw new TypeError(`Invalid operator: ${t}`)}}},6751:(e,t,i)=>{const n=i(7800),o=i(155),{re:r,t:s}=i(6152);e.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let i=null;if((t=t||{}).rtl){let t;for(;(t=r[s.COERCERTL].exec(e))&&(!i||i.index+i[0].length!==e.length);)i&&t.index+t[0].length===i.index+i[0].length||(i=t),r[s.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;r[s.COERCERTL].lastIndex=-1}else i=e.match(r[s.COERCE]);return null===i?null:o(`${i[2]}.${i[3]||"0"}.${i[4]||"0"}`,t)}},2995:(e,t,i)=>{const n=i(7800);e.exports=(e,t,i)=>{const o=new n(e,i),r=new n(t,i);return o.compare(r)||o.compareBuild(r)}},1844:(e,t,i)=>{const n=i(6004);e.exports=(e,t)=>n(e,t,!0)},6004:(e,t,i)=>{const n=i(7800);e.exports=(e,t,i)=>new n(e,i).compare(new n(t,i))},2513:(e,t,i)=>{const n=i(155),o=i(3641);e.exports=(e,t)=>{if(o(e,t))return null;{const i=n(e),o=n(t),r=i.prerelease.length||o.prerelease.length,s=r?"pre":"",a=r?"prerelease":"";for(const e in i)if(("major"===e||"minor"===e||"patch"===e)&&i[e]!==o[e])return s+e;return a}}},3641:(e,t,i)=>{const n=i(6004);e.exports=(e,t,i)=>0===n(e,t,i)},3365:(e,t,i)=>{const n=i(6004);e.exports=(e,t,i)=>n(e,t,i)>0},4457:(e,t,i)=>{const n=i(6004);e.exports=(e,t,i)=>n(e,t,i)>=0},3866:(e,t,i)=>{const n=i(7800);e.exports=(e,t,i,o)=>{"string"==typeof i&&(o=i,i=void 0);try{return new n(e,i).inc(t,o).version}catch(e){return null}}},2687:(e,t,i)=>{const n=i(6004);e.exports=(e,t,i)=>n(e,t,i)<0},6039:(e,t,i)=>{const n=i(6004);e.exports=(e,t,i)=>n(e,t,i)<=0},2439:(e,t,i)=>{const n=i(7800);e.exports=(e,t)=>new n(e,t).major},3332:(e,t,i)=>{const n=i(7800);e.exports=(e,t)=>new n(e,t).minor},7351:(e,t,i)=>{const n=i(6004);e.exports=(e,t,i)=>0!==n(e,t,i)},155:(e,t,i)=>{const{MAX_LENGTH:n}=i(1266),{re:o,t:r}=i(6152),s=i(7800),a=i(4167);e.exports=(e,t)=>{if(t=a(t),e instanceof s)return e;if("string"!=typeof e)return null;if(e.length>n)return null;if(!(t.loose?o[r.LOOSE]:o[r.FULL]).test(e))return null;try{return new s(e,t)}catch(e){return null}}},8425:(e,t,i)=>{const n=i(7800);e.exports=(e,t)=>new n(e,t).patch},1298:(e,t,i)=>{const n=i(155);e.exports=(e,t)=>{const i=n(e,t);return i&&i.prerelease.length?i.prerelease:null}},2737:(e,t,i)=>{const n=i(6004);e.exports=(e,t,i)=>n(t,e,i)},1761:(e,t,i)=>{const n=i(2995);e.exports=(e,t)=>e.sort(((e,i)=>n(i,e,t)))},826:(e,t,i)=>{const n=i(1540);e.exports=(e,t,i)=>{try{t=new n(t,i)}catch(e){return!1}return t.test(e)}},5626:(e,t,i)=>{const n=i(2995);e.exports=(e,t)=>e.sort(((e,i)=>n(e,i,t)))},6798:(e,t,i)=>{const n=i(155);e.exports=(e,t)=>{const i=n(e,t);return i?i.version:null}},2543:(e,t,i)=>{const n=i(6152);e.exports={re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:i(1266).SEMVER_SPEC_VERSION,SemVer:i(7800),compareIdentifiers:i(4126).compareIdentifiers,rcompareIdentifiers:i(4126).rcompareIdentifiers,parse:i(155),valid:i(6798),clean:i(3974),inc:i(3866),diff:i(2513),major:i(2439),minor:i(3332),patch:i(8425),prerelease:i(1298),compare:i(6004),rcompare:i(2737),compareLoose:i(1844),compareBuild:i(2995),sort:i(5626),rsort:i(1761),gt:i(3365),lt:i(2687),eq:i(3641),neq:i(7351),gte:i(4457),lte:i(6039),cmp:i(1427),coerce:i(6751),Comparator:i(4890),Range:i(1540),satisfies:i(826),toComparators:i(434),maxSatisfying:i(4600),minSatisfying:i(142),minVersion:i(734),validRange:i(2617),outside:i(2416),gtr:i(9903),ltr:i(1611),intersects:i(1413),simplifyRange:i(9901),subset:i(2792)}},1266:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={SEMVER_SPEC_VERSION:"2.0.0",MAX_LENGTH:256,MAX_SAFE_INTEGER:t,MAX_SAFE_COMPONENT_LENGTH:16}},4272:e=>{const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},4126:e=>{const t=/^[0-9]+$/,i=(e,i)=>{const n=t.test(e),o=t.test(i);return n&&o&&(e=+e,i=+i),e===i?0:n&&!o?-1:o&&!n?1:ei(t,e)}},4167:e=>{const t=["includePrerelease","loose","rtl"];e.exports=e=>e?"object"!=typeof e?{loose:!0}:t.filter((t=>e[t])).reduce(((e,t)=>(e[t]=!0,e)),{}):{}},6152:(e,t,i)=>{const{MAX_SAFE_COMPONENT_LENGTH:n}=i(1266),o=i(4272),r=(t=e.exports={}).re=[],s=t.src=[],a=t.t={};let l=0;const c=(e,t,i)=>{const n=l++;o(n,t),a[e]=n,s[n]=t,r[n]=new RegExp(t,i?"g":void 0)};c("NUMERICIDENTIFIER","0|[1-9]\\d*"),c("NUMERICIDENTIFIERLOOSE","[0-9]+"),c("NONNUMERICIDENTIFIER","\\d*[a-zA-Z-][a-zA-Z0-9-]*"),c("MAINVERSION",`(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})\\.(${s[a.NUMERICIDENTIFIER]})`),c("MAINVERSIONLOOSE",`(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})\\.(${s[a.NUMERICIDENTIFIERLOOSE]})`),c("PRERELEASEIDENTIFIER",`(?:${s[a.NUMERICIDENTIFIER]}|${s[a.NONNUMERICIDENTIFIER]})`),c("PRERELEASEIDENTIFIERLOOSE",`(?:${s[a.NUMERICIDENTIFIERLOOSE]}|${s[a.NONNUMERICIDENTIFIER]})`),c("PRERELEASE",`(?:-(${s[a.PRERELEASEIDENTIFIER]}(?:\\.${s[a.PRERELEASEIDENTIFIER]})*))`),c("PRERELEASELOOSE",`(?:-?(${s[a.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${s[a.PRERELEASEIDENTIFIERLOOSE]})*))`),c("BUILDIDENTIFIER","[0-9A-Za-z-]+"),c("BUILD",`(?:\\+(${s[a.BUILDIDENTIFIER]}(?:\\.${s[a.BUILDIDENTIFIER]})*))`),c("FULLPLAIN",`v?${s[a.MAINVERSION]}${s[a.PRERELEASE]}?${s[a.BUILD]}?`),c("FULL",`^${s[a.FULLPLAIN]}$`),c("LOOSEPLAIN",`[v=\\s]*${s[a.MAINVERSIONLOOSE]}${s[a.PRERELEASELOOSE]}?${s[a.BUILD]}?`),c("LOOSE",`^${s[a.LOOSEPLAIN]}$`),c("GTLT","((?:<|>)?=?)"),c("XRANGEIDENTIFIERLOOSE",`${s[a.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),c("XRANGEIDENTIFIER",`${s[a.NUMERICIDENTIFIER]}|x|X|\\*`),c("XRANGEPLAIN",`[v=\\s]*(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:\\.(${s[a.XRANGEIDENTIFIER]})(?:${s[a.PRERELEASE]})?${s[a.BUILD]}?)?)?`),c("XRANGEPLAINLOOSE",`[v=\\s]*(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:\\.(${s[a.XRANGEIDENTIFIERLOOSE]})(?:${s[a.PRERELEASELOOSE]})?${s[a.BUILD]}?)?)?`),c("XRANGE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAIN]}$`),c("XRANGELOOSE",`^${s[a.GTLT]}\\s*${s[a.XRANGEPLAINLOOSE]}$`),c("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),c("COERCERTL",s[a.COERCE],!0),c("LONETILDE","(?:~>?)"),c("TILDETRIM",`(\\s*)${s[a.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",c("TILDE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAIN]}$`),c("TILDELOOSE",`^${s[a.LONETILDE]}${s[a.XRANGEPLAINLOOSE]}$`),c("LONECARET","(?:\\^)"),c("CARETTRIM",`(\\s*)${s[a.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",c("CARET",`^${s[a.LONECARET]}${s[a.XRANGEPLAIN]}$`),c("CARETLOOSE",`^${s[a.LONECARET]}${s[a.XRANGEPLAINLOOSE]}$`),c("COMPARATORLOOSE",`^${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]})$|^$`),c("COMPARATOR",`^${s[a.GTLT]}\\s*(${s[a.FULLPLAIN]})$|^$`),c("COMPARATORTRIM",`(\\s*)${s[a.GTLT]}\\s*(${s[a.LOOSEPLAIN]}|${s[a.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",c("HYPHENRANGE",`^\\s*(${s[a.XRANGEPLAIN]})\\s+-\\s+(${s[a.XRANGEPLAIN]})\\s*$`),c("HYPHENRANGELOOSE",`^\\s*(${s[a.XRANGEPLAINLOOSE]})\\s+-\\s+(${s[a.XRANGEPLAINLOOSE]})\\s*$`),c("STAR","(<|>)?=?\\s*\\*"),c("GTE0","^\\s*>=\\s*0.0.0\\s*$"),c("GTE0PRE","^\\s*>=\\s*0.0.0-0\\s*$")},9903:(e,t,i)=>{const n=i(2416);e.exports=(e,t,i)=>n(e,t,">",i)},1413:(e,t,i)=>{const n=i(1540);e.exports=(e,t,i)=>(e=new n(e,i),t=new n(t,i),e.intersects(t))},1611:(e,t,i)=>{const n=i(2416);e.exports=(e,t,i)=>n(e,t,"<",i)},4600:(e,t,i)=>{const n=i(7800),o=i(1540);e.exports=(e,t,i)=>{let r=null,s=null,a=null;try{a=new o(t,i)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(r&&-1!==s.compare(e)||(r=e,s=new n(r,i)))})),r}},142:(e,t,i)=>{const n=i(7800),o=i(1540);e.exports=(e,t,i)=>{let r=null,s=null,a=null;try{a=new o(t,i)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(r&&1!==s.compare(e)||(r=e,s=new n(r,i)))})),r}},734:(e,t,i)=>{const n=i(7800),o=i(1540),r=i(3365);e.exports=(e,t)=>{e=new o(e,t);let i=new n("0.0.0");if(e.test(i))return i;if(i=new n("0.0.0-0"),e.test(i))return i;i=null;for(let t=0;t{const t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":s&&!r(t,s)||(s=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!s||i&&!r(i,s)||(i=s)}return i&&e.test(i)?i:null}},2416:(e,t,i)=>{const n=i(7800),o=i(4890),{ANY:r}=o,s=i(1540),a=i(826),l=i(3365),c=i(2687),u=i(6039),h=i(4457);e.exports=(e,t,i,d)=>{let g,f,p,m,_;switch(e=new n(e,d),t=new s(t,d),i){case">":g=l,f=u,p=c,m=">",_=">=";break;case"<":g=c,f=h,p=l,m="<",_="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,d))return!1;for(let i=0;i{e.semver===r&&(e=new o(">=0.0.0")),s=s||e,a=a||e,g(e.semver,s.semver,d)?s=e:p(e.semver,a.semver,d)&&(a=e)})),s.operator===m||s.operator===_)return!1;if((!a.operator||a.operator===m)&&f(e,a.semver))return!1;if(a.operator===_&&p(e,a.semver))return!1}return!0}},9901:(e,t,i)=>{const n=i(826),o=i(6004);e.exports=(e,t,i)=>{const r=[];let s=null,a=null;const l=e.sort(((e,t)=>o(e,t,i)));for(const e of l)n(e,t,i)?(a=e,s||(s=e)):(a&&r.push([s,a]),a=null,s=null);s&&r.push([s,null]);const c=[];for(const[e,t]of r)e===t?c.push(e):t||e!==l[0]?t?e===l[0]?c.push(`<=${t}`):c.push(`${e} - ${t}`):c.push(`>=${e}`):c.push("*");const u=c.join(" || "),h="string"==typeof t.raw?t.raw:String(t);return u.length{const n=i(1540),o=i(4890),{ANY:r}=o,s=i(826),a=i(6004),l=(e,t,i)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===r){if(1===t.length&&t[0].semver===r)return!0;e=i.includePrerelease?[new o(">=0.0.0-0")]:[new o(">=0.0.0")]}if(1===t.length&&t[0].semver===r){if(i.includePrerelease)return!0;t=[new o(">=0.0.0")]}const n=new Set;let l,h,d,g,f,p,m;for(const t of e)">"===t.operator||">="===t.operator?l=c(l,t,i):"<"===t.operator||"<="===t.operator?h=u(h,t,i):n.add(t.semver);if(n.size>1)return null;if(l&&h){if(d=a(l.semver,h.semver,i),d>0)return null;if(0===d&&(">="!==l.operator||"<="!==h.operator))return null}for(const e of n){if(l&&!s(e,String(l),i))return null;if(h&&!s(e,String(h),i))return null;for(const n of t)if(!s(e,String(n),i))return!1;return!0}let _=!(!h||i.includePrerelease||!h.semver.prerelease.length)&&h.semver,v=!(!l||i.includePrerelease||!l.semver.prerelease.length)&&l.semver;_&&1===_.prerelease.length&&"<"===h.operator&&0===_.prerelease[0]&&(_=!1);for(const e of t){if(m=m||">"===e.operator||">="===e.operator,p=p||"<"===e.operator||"<="===e.operator,l)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),">"===e.operator||">="===e.operator){if(g=c(l,e,i),g===e&&g!==l)return!1}else if(">="===l.operator&&!s(l.semver,String(e),i))return!1;if(h)if(_&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===_.major&&e.semver.minor===_.minor&&e.semver.patch===_.patch&&(_=!1),"<"===e.operator||"<="===e.operator){if(f=u(h,e,i),f===e&&f!==h)return!1}else if("<="===h.operator&&!s(h.semver,String(e),i))return!1;if(!e.operator&&(h||l)&&0!==d)return!1}return!(l&&p&&!h&&0!==d||h&&m&&!l&&0!==d||v||_)},c=(e,t,i)=>{if(!e)return t;const n=a(e.semver,t.semver,i);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},u=(e,t,i)=>{if(!e)return t;const n=a(e.semver,t.semver,i);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,i={})=>{if(e===t)return!0;e=new n(e,i),t=new n(t,i);let o=!1;e:for(const n of e.set){for(const e of t.set){const t=l(n,e,i);if(o=o||null!==t,t)continue e}if(o)return!1}return!0}},434:(e,t,i)=>{const n=i(1540);e.exports=(e,t)=>new n(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},2617:(e,t,i)=>{const n=i(1540);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},9602:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},4411:(e,t,i)=>{"use strict";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var i=0,o=arguments.length;i1)i=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,i=this.head.value}for(var o=0;null!==n;o++)i=e(i,n.value,o),n=n.next;return i},n.prototype.reduceReverse=function(e,t){var i,n=this.tail;if(arguments.length>1)i=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,i=this.tail.value}for(var o=this.length-1;null!==n;o--)i=e(i,n.value,o),n=n.prev;return i},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,i=this.head;null!==i;t++)e[t]=i.value,i=i.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,i=this.tail;null!==i;t++)e[t]=i.value,i=i.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var i=new n;if(tthis.length&&(t=this.length);for(var o=0,r=this.head;null!==r&&othis.length&&(t=this.length);for(var o=this.length,r=this.tail;null!==r&&o>t;o--)r=r.prev;for(;null!==r&&o>e;o--,r=r.prev)i.push(r.value);return i},n.prototype.splice=function(e,t,...i){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,r=this.head;null!==r&&n{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,i)=>(n.f[i](e,t),t)),[])),n.u=e=>e+".js",n.miniCssF=e=>{},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},n.l=(t,i,o,r)=>{if(e[t])e[t].push(i);else{var s,a;if(void 0!==o)for(var l=document.getElementsByTagName("script"),c=0;c{s.onerror=s.onload=null,clearTimeout(d);var o=e[t];if(delete e[t],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((e=>e(n))),i)return i(n)},d=setTimeout(h.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=h.bind(null,s.onerror),s.onload=h.bind(null,s.onload),a&&document.head.appendChild(s)}},n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/js/",(()=>{var e={143:0};n.f.j=(t,i)=>{var o=n.o(e,t)?e[t]:void 0;if(0!==o)if(o)i.push(o[2]);else{var r=new Promise(((i,n)=>o=e[t]=[i,n]));i.push(o[2]=r);var s=n.p+n.u(t),a=new Error;n.l(s,(i=>{if(n.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var r=i&&("load"===i.type?"missing":i.type),s=i&&i.target&&i.target.src;a.message="Loading chunk "+t+" failed.\n("+r+": "+s+")",a.name="ChunkLoadError",a.type=r,a.request=s,o[1](a)}}),"chunk-"+t,t)}};var t=(t,i)=>{var o,r,[s,a,l]=i,c=0;for(o in a)n.o(a,o)&&(n.m[o]=a[o]);for(l&&l(n),t&&t(i);c